Weitere ähnliche Inhalte
Kürzlich hochgeladen (10)
char32_tとXpressiveと
- 6. char32_tとchar16_t
• リテラル
– char s1[] = "hoge";
– wchar_t s2[] = L"hoge";
– char16_t s3[] = u"hoge";
– char32_t s4[] = U"hoge";
– char s5[] = u8"hoge";
- 7. char32_tとchar16_t
• リテラル
– char const* s1 = "foo";
– wchar_t const* s2 = L"foo";
– char16_t const* s3 = u"foo";
– char32_t const* s4 = U"foo";
– char const* s5 = u8"foo";
- 18. char32_tとchar16_t (続)
• なぜ? std::locale::classic()
– 下を持っている
•codecvt<char, wchar_t>
•codecvt<char, char16_t>
•codecvt<char, char32_t>
- 27. おまけ
• traitsクラスを作る
– やっつけなので
null_regex_traits<char32_t>
から派生
struct u32_traits : …… {
- 30. おまけ
• traitsクラスを作る
NewLine = 1 << ……,
};
typedef boost::uint_value_t<
NewLine>::least_t
char_class_type;
- 31. おまけ
• traitsクラスを作る
private:
static std::unordered_map<
char_type, char_class_type>
LoadCategoryMap();
– isctype内で使用
- 32. おまけ
• traitsクラスを作る
namespace Property {
boost::proto::terminal<
boost::xpressive::detail::
posix_charset_placeholder>::type
const L = {{"L", false}};
……