Execution

This is the locale-based, runtime encoding. It uses a number of compile-time and runtime heuristics to eventually be resolved to an implementation-defined encoding. It is not required to work in constant expressions either: for this, use ztd::text::literal, which represents the compile-time string (e.g. "my string") encoding.

Currently, the hierachy of behaviors is like so:

  • If the platform is MacOS, then it assumes this is UTF-8;

  • Otherwise, if the cuneicode, then Cuneicode will be used.

Warning

The C Standard Library has many design defects in its production of code points, which may make it unsuitable even if your C Standard Library recognizes certain locales (e.g., Big5-HKSCS). The runtime will always attempt to load iconv if the definition is turned on, since it may do a better job than the C Standard Library’s interfaces until C23.

Even if, on a given platform, it can be assumed to be a static encoding (e.g., Apple/MacOS where it always returns the “C” Locale but processes text as UTF-8), ztd::text::execution will always present itself as a runtime and unknowable encoding. This is to prevent portability issues from relying on, e.g., ztd::text::is_decode_injective_v<ztd::text::execution> being true during development and working with that assumption, only to have it break when ported to a platform where that assumption no longer holds.

Warning

doxygenvariable: Cannot find file: /home/docs/checkouts/readthedocs.org/user_builds/ztdtext/checkouts/latest/documentation/source/_build/cmake-build/documentation/doxygen/xml/index.xml

Warning

doxygenclass: Cannot find file: /home/docs/checkouts/readthedocs.org/user_builds/ztdtext/checkouts/latest/documentation/source/_build/cmake-build/documentation/doxygen/xml/index.xml

Internal Types

Warning

⚠️ Names with double underscores, and within the __*detail and __*impl namespaces are reserved for the implementation. Referencing this entity directly is bad, and the name/functionality can be changed at any point in the future. Relying on anything not guaranteed by the documentation is ☢️☢️Undefined Behavior☢️☢️.

MacOS-based

Warning

doxygenclass: Cannot find file: /home/docs/checkouts/readthedocs.org/user_builds/ztdtext/checkouts/latest/documentation/source/_build/cmake-build/documentation/doxygen/xml/index.xml