9 #define SCL_ASSERT_TYPE(type) static_asssert(META::exists<T::type>(), "CharTraits<T, CharT>: T::type should exist") 10 #define SCL_TYPE(type) typename T::type 11 #define SCL_char std::declval<CharT>() 12 #define SCL_rptr std::declval<CharT*>() 13 #define SCL_ptr std::declval<const CharT*>() 14 #define SCL_size std::declval<std::size_t>() 15 #define SCL_int std::declval<int>() 24 template <
class T,
class CharT>
26 constexpr
operator bool()
const{
33 static_assert(
META::is_same<
SCL_TYPE(char_type), CharT>(),
"CharTraits<T, CharT>: T::char_type should be CharT");
34 static_assert(
SemiRegular<
SCL_TYPE(state_type)>{},
"CharTraits<T, CharT>: T::state_type should be SemiRegular");
37 "CharTraits<T, CharT>: The result of T::eq(CharT, Chart) should be a bool" 41 "CharTraits<T, CharT>: The result of T::lt(CharT, Chart) should be a bool" 45 "CharTraits<T, CharT>: The result of T::compare(CharT, Chart) should be an int" 49 "CharTraits<T, CharT>: The result of T::length(CharT, Chart) should be an std::size_t" 53 "CharTraits<T, CharT>: The result of T::find(const CharT*, std::size_t, CharT) should be a const CharT*" 57 "CharTraits<T, CharT>: The result of T::move(SCL_rptr, SCL_ptr, SCL_size) should be a CharT*" 61 "CharTraits<T, CharT>: The result of T::copy(SCL_rptr, SCL_ptr, SCL_size) should be a CharT*" 66 "CharTraits<T, CharT>: There should be T::assign(CharT, CharT)" 71 "CharTraits<T, CharT>: T::assign(CharT*, std::size_t, CharT) should return a CharT*" 75 "CharTraits<T, CharT>: T::not_eof(int) should return an int" 79 "CharTraits<T, CharT>: T::to_char_type(int) should return a CharT" 83 "CharTraits<T, CharT>: T::to_int_type(CharT) should return an int" 87 "CharTraits<T, CharT>: T::to_int_type(int, int) should return a bool" 91 "CharTraits<T, CharT>: T::eof() should return an int" 99 #undef SCL_ASSERT_TYPE
Global namespace of the SCL.
#define SCL_ASSERT_TYPE(type)
SemiRegular concept, a type is semi regular if it is Copyable and DefaultConstructible.