55#if __cplusplus >= 201703L
62#if __cplusplus < 201103L
63#pragma error "C++ minimum version required is 11"
78#if __cplusplus >= 202002L
80#define make_poly_enc(char_t, lit) utf42::visit_poly_enc<char_t>( \
92#define make_poly_enc(char_t, lit) utf42::visit_poly_enc<char_t>( \
113#if __cplusplus >= 202002L
115#define cons_poly_enc(lit) utf42::poly_enc{ \
125#define cons_poly_enc(lit) utf42::poly_enc{ \
154 std::is_same<T, char>::value ||
155 std::is_same<T, wchar_t>::value ||
156#if __cplusplus >= 202002
L
157 std::is_same<T, char8_t>
::value ||
159 std::is_same<T, char16_t>
::value ||
160 std::is_same<T, char32_t>
::value
164#if __cplusplus >= 201703L
175#if __cplusplus >= 201703L
178 template<
typename char_t>
198 template<
typename char_t>
224 template<std::
size_t N>
227 static_assert(
N > 0,
"basic_string_view: invalid length");
249 std::basic_string<char_t>
str()
const {
260#if __cplusplus >= 202002L
303#if __cplusplus >= 202002L
329#if __cplusplus >= 202002L
348#if __cplusplus >= 202002L
349 template<CharacterType
char_t>
353 template<
typename char_t>
360#if __cplusplus >= 202002L
361 template<CharacterType
char_t>
366 template<
typename char_t>
368 static_assert(
false,
"Unsupported character type");
385#if __cplusplus >= 202002L
417#if __cplusplus >= 202002L
418 template<CharacterType
char_t>
419 consteval std::basic_string_view<char_t>
424 template<
typename char_t>
433#undef LIB_UTF_42_CHAR_TYPE
Concept constraining a type to a supported character type.
Definition utf42.h:269
Concept constraining a type to an floating point type.
Definition utf42.h:287
Concept constraining a type to an integral type.
Definition utf42.h:278
Main namespace of the library.
std::basic_string_view< char_t > basic_string_view
String view type for poly_enc.
Definition utf42.h:179
consteval std::basic_string_view< char_t > visit_poly_enc(const poly_enc &oPolyEnv)
Selects the appropriate encoded string view for a given character type.
Definition utf42.h:420
constexpr bool is_character_v
Convenience variable template for is_char.
Definition utf42.h:172
Type trait that checks whether a type is a supported character type.
Definition utf42.h:161
Container holding all character-encoded views of a string literal.
Definition utf42.h:299
constexpr basic_string_view< char_t > visit() const noexcept
Selects the appropriate encoded string view for a given character type.
Definition utf42.h:362
constexpr poly_enc(const basic_string_view< char > txt_char, const basic_string_view< wchar_t > txt_char_w, const basic_string_view< char8_t > txt_char_8, const basic_string_view< char16_t > txt_char_16, const basic_string_view< char32_t > txt_char_32) noexcept
Constructs a polymorphic encoding container.
Definition utf42.h:318
basic_string_view< char16_t > TXT_CHAR_16
UTF-16 character literal.
Definition utf42.h:306
basic_string_view< char8_t > TXT_CHAR_8
UTF-8 character literal. Only defined if C++20 is available.
Definition utf42.h:304
basic_string_view< char > TXT_CHAR
Narrow character literal.
Definition utf42.h:301
basic_string_view< char32_t > TXT_CHAR_32
UTF-32 character literal.
Definition utf42.h:307
basic_string_view< wchar_t > TXT_CHAR_W
Wide character literal.
Definition utf42.h:302