utf-42
Loading...
Searching...
No Matches
utf42 Namespace Reference

Main namespace of the library. More...

Classes

class  basic_string_view
 A class that provides a lightweight, non-owning view of a string. More...
 
struct  is_character
 Type trait that checks whether a type is a supported character type. More...
 
struct  poly_enc
 Container holding all character-encoded views of a string literal. More...
 

Functions

template<typename char_t >
constexpr basic_string_view< char_tvisit_poly_enc (const poly_enc &oPolyEnv)
 Selects the appropriate encoded string view for a given character type.
 

Detailed Description

Main namespace of the library.

Function Documentation

◆ visit_poly_enc()

template<typename char_t >
constexpr basic_string_view< char_t > utf42::visit_poly_enc ( const poly_enc oPolyEnv)
constexpr

Selects the appropriate encoded string view for a given character type.

This function is evaluated at compile time and returns a std::basic_string_view<char_t> referring to the correctly encoded literal stored in the provided poly_enc.

Template Parameters
char_tDesired character type.
Parameters
oPolyEnvPolymorphic encoding container.
Returns
A string view of the requested character type.