StormByte 3.0.0
C++26 foundation of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Detail Namespace Reference

Private specialization point for non-trivial types. More...

Classes

struct  Codec
 Size / write / read for one type T. More...
struct  Codec< std::string >
 StormByte::Detail::Codec specialization for std::string. More...
struct  Codec< std::wstring >
 StormByte::Detail::Codec specialization for std::wstring. More...
struct  Codec< std::u16string >
 StormByte::Detail::Codec specialization for std::u16string. More...
struct  Codec< std::u32string >
 StormByte::Detail::Codec specialization for std::u32string. More...
struct  Codec< Safe::String >
 StormByte::Detail::Codec specialization for StormByte::Safe::String. More...
struct  Codec< Safe::WString >
 StormByte::Detail::Codec specialization for StormByte::Safe::WString. More...

Functions

STORMBYTE_FORCE_INLINE bool NextUtf8 (std::string_view utf8, std::size_t &index, char32_t &cp) noexcept
 One UTF-8 sequence.

Variables

template<typename T>
constexpr bool codec_always_false_v = false
 Compile-time false dependent on T.

Detailed Description

Private specialization point for non-trivial types.

Other StormByte modules (and only those) specialize StormByte::Detail::Codec for their own types. Do not specialize StormByte::Serializable itself.

Function Documentation

◆ NextUtf8()

STORMBYTE_FORCE_INLINE bool StormByte::Detail::NextUtf8 ( std::string_view utf8,
std::size_t & index,
char32_t & cp )
noexcept

One UTF-8 sequence.

Invalid bytes become U+FFFD.

Parameters
utf8Source.
indexAdvanced past the sequence.
cpDecoded code point.
Returns
False at the end of utf8.

Variable Documentation

◆ codec_always_false_v

template<typename T>
bool StormByte::Detail::codec_always_false_v = false
constexpr

Compile-time false dependent on T.

Template Parameters
TIgnored; exists so static_assert is delayed to instantiation.