utf-42
Loading...
Searching...
No Matches
utf-42
Compile-time polymorphic string literals in Modern C++

🌐 utf-42

Compile-time polymorphic string literals for modern C++

utf-42 is a small, header-only C++ utility that allows you to define a string once and obtain it as a std::basic_string_view of any character type (char, wchar_t, char8_t, char16_t, char32_t) entirely at compile time.

It achieves this by leveraging the compiler’s built-in handling of Unicode string literal prefixes ("", L"", u8"", u"", U"") and selecting the appropriate encoding using consteval dispatch.

The result is zero runtime overhead, no heap allocation, and no runtime Unicode transcoding.

πŸ“š Index

  1. πŸ“– Intoduction
    1. ✨ Features
    2. ❓ Motivation
    3. πŸ“¦ Requirementss
    4. ⚠️ Important Limitations
    5. 🧠 Design Philosophy
  2. πŸ› οΈ Technical documentation
    1. πŸš€ Usage
    2. πŸ”— Inclusion in Your Project
  3. πŸ“„ License