diff --git a/toml/lexer.hpp b/toml/lexer.hpp index 5d019a3..a238d1c 100644 --- a/toml/lexer.hpp +++ b/toml/lexer.hpp @@ -264,21 +264,20 @@ using lex_array_table = sequence; using lex_utf8_2byte = sequence< - in_range(0xC2), static_cast(0xDF)>, - in_range(0x80), static_cast(0xBF)> + in_range<'\xC2', '\xDF'>, + in_range<'\x80', '\xBF'> >; using lex_utf8_3byte = sequence(0xE0)>, in_range(0xA0), static_cast(0xBF)>>, - sequence(0xE1), static_cast(0xEC)>, in_range(0x80), static_cast(0xBF)>>, - sequence(0xED)>, in_range(0x80), static_cast(0x9F)>>, - sequence(0xEE), static_cast(0xEF)>, in_range(0x80), static_cast(0xBF)>> - >, in_range(0x80), static_cast(0xBF)>>; + sequence, in_range<'\xA0', '\xBF'>>, + sequence, in_range<'\x80', '\xBF'>>, + sequence, in_range<'\x80', '\x9F'>>, + sequence, in_range<'\x80', '\xBF'>> + >, in_range<'\x80', '\xBF'>>; using lex_utf8_4byte = sequence(0xF0)>, in_range(0x90), static_cast(0xBF)>>, - sequence(0xF1), static_cast(0xF3)>, in_range(0x80), static_cast(0xBF)>>, - sequence(0xF4)>, in_range(0x80), static_cast(0x8F)>> - >, in_range(0x80), static_cast(0xBF)>, - in_range(0x80), static_cast(0xBF)>>; + sequence, in_range<'\x90', '\xBF'>>, + sequence, in_range<'\x80', '\xBF'>>, + sequence, in_range<'\x80', '\x8F'>> + >, in_range<'\x80', '\xBF'>, in_range<'\x80', '\xBF'>>; using lex_utf8_code = either< lex_utf8_1byte, lex_utf8_2byte,