libxr  1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
LibXR::Detail::RuntimeStringArgumentTraits< T > Struct Template Reference

Compile-time traits for formatted retained-string arguments. More...

#include <libxr_string.hpp>

Public Types

using Decayed = std::remove_cvref_t<T>
 
using Normalized = typename RuntimeStringNormalized<Decayed>::Type
 

Static Public Attributes

static constexpr bool is_text
 
static constexpr bool is_pointer
 
static constexpr bool has_static_capacity
 

Detailed Description

template<typename T>
struct LibXR::Detail::RuntimeStringArgumentTraits< T >

Compile-time traits for formatted retained-string arguments.

格式化保留字符串参数的编译期类型特征。

The formatted variant must allocate before seeing future values, so only bounded value-like argument types are accepted. Text-like runtime arguments are intentionally rejected and should be handled by the plain concatenation constructor instead.

格式化版本必须在看到未来值之前完成分配,因此这里只接受长度可界定的 值类型参数。运行期文本参数会被拒绝,应改用普通拼接构造。

Definition at line 150 of file libxr_string.hpp.

Member Typedef Documentation

◆ Decayed

template<typename T >
using LibXR::Detail::RuntimeStringArgumentTraits< T >::Decayed = std::remove_cvref_t<T>

Definition at line 152 of file libxr_string.hpp.

◆ Normalized

template<typename T >
using LibXR::Detail::RuntimeStringArgumentTraits< T >::Normalized = typename RuntimeStringNormalized<Decayed>::Type

Definition at line 153 of file libxr_string.hpp.

Field Documentation

◆ has_static_capacity

template<typename T >
bool LibXR::Detail::RuntimeStringArgumentTraits< T >::has_static_capacity
staticconstexpr
Initial value:
=
!is_text && (std::is_same_v<Decayed, std::nullptr_t> || is_pointer ||
std::is_integral_v<Normalized> ||
std::is_floating_point_v<Normalized>)

Definition at line 164 of file libxr_string.hpp.

◆ is_pointer

template<typename T >
bool LibXR::Detail::RuntimeStringArgumentTraits< T >::is_pointer
staticconstexpr
Initial value:
=
std::is_pointer_v<Decayed> &&
!std::is_function_v<std::remove_pointer_t<Decayed>>

Definition at line 160 of file libxr_string.hpp.

◆ is_text

template<typename T >
bool LibXR::Detail::RuntimeStringArgumentTraits< T >::is_text
staticconstexpr
Initial value:
=
std::is_array_v<Decayed> || std::is_same_v<Decayed, char*> ||
std::is_same_v<Decayed, const char*> || std::is_same_v<Decayed, std::string> ||
std::is_same_v<Decayed, std::string_view>

Definition at line 155 of file libxr_string.hpp.


The documentation for this struct was generated from the following file: