1 #pragma once    // Source encoding: UTF-8 with BOM (π is a lowercase Greek "pi").    10         basic_string, basic_string_view, 
string, string_view, u16string, wstring,
    11         iterator_traits, move, 
next    16         class Result_char = char16_t,
    20         -> basic_string<Result_char>
    25         if constexpr( 
sizeof( Char ) > 1 )
    27             static_assert( magnitude_bits_per_<Char> == 16 );   
    28             return string( sv.begin(), sv.end() );
    32             basic_string<Result_char> result( 
n_units_for( sv ), Result_char() );
    38     template< 
class Char >
    41     { 
return from_string_view<Char>( s ); }
    43     template< 
class Char >
    44     inline auto from( 
const basic_string<Char>& s )
    46     { 
return from_string_view<Char>( s ); }
    48     inline auto from( u16string s )
    52     template< 
class Char >
    53     inline auto from( 
const basic_string_view<Char>& s )
    55     { 
return from_string_view<Char>( s ); }
    57     template< 
class Char >
    60     { 
return from_string_view<Char, wchar_t>( s ); }
    62     template< 
class Char >
    63     inline auto wide_from( 
const basic_string<Char>& s )
    65     { 
return from_string_view<Char, wchar_t>( s ); }
    71     template< 
class Char >
    72     inline auto wide_from( 
const basic_string_view<Char>& s )
    74     { 
return from_string_view<Char, wchar_t>( s ); }
 
auto n_units_for(const basic_string_view< Char > &sv) noexcept -> Size
Some_type * P_
Creates a raw pointer type.
auto wide_from(const P_< const Char > s) -> wstring
auto from_string_view(const basic_string_view< Char > &sv) -> basic_string< Result_char >
auto is_empty(const Collection &c) -> Truth
auto next(P_< const char > p) -> P_< const char >
CPPX_USE_STD(basic_string, basic_string_view, string, string_view, u16string, wstring, iterator_traits, move, next)
#define CPPX_ITEMS_OF(c)
$items_of(c) effectively expands to std::begin(c), std::end(c).
auto utf16_from_bytes(const Span_< In_iterator > bytes_range, const Out_iterator destination) -> Out_iterator
std::enable_if_t< condition, Result > Enable_if_
Just more readable than enable_if_t.
auto from(const P_< const Char > s) -> u16string