is_state_independent_vļƒ

template<typename _Encoding, typename _Type>
constexpr bool ztd::text::is_state_independent_v = !::std::is_constructible_v<_Type, _Encoding> && ::std::is_default_constructible_v<_Type>ļƒ

Whether or not the given type can be constructed without information from the encoding itself.

Remark

This value tells users at compile time whether or not they need to be careful with the state. Rather than let users have to work this independently, two functions ā€” ztd::text::make_encode_state(_Encoding) and ztd::text::make_encode_state(_Encoding) ā€” handle the details here.

Template Parameters:
  • _Encoding ā€“ The encoding that may contain necessary information.

  • _Type ā€“ The state type that may need information from the encoding to be successfully constructed.