Skip to content

Commit af4d3c2

Browse files
committed
update single headers.
1 parent 54f3585 commit af4d3c2

File tree

2 files changed

+56
-56
lines changed

2 files changed

+56
-56
lines changed

single-header/ctre-unicode.hpp

+28-28
Original file line numberDiff line numberDiff line change
@@ -1429,35 +1429,35 @@ using word_chars = set<char_range<'A','Z'>, char_range<'a','z'>, char_range<'0',
14291429
using space_chars = enumeration<' ', '\t', '\n', '\v', '\f', '\r'>;
14301430

14311431
using vertical_space_chars = enumeration<
1432-
(char)0x000A, // Linefeed (LF)
1433-
(char)0x000B, // Vertical tab (VT)
1434-
(char)0x000C, // Form feed (FF)
1435-
(char)0x000D, // Carriage return (CR)
1436-
(char32_t)0x0085, // Next line (NEL)
1437-
(char32_t)0x2028, // Line separator
1438-
(char32_t)0x2029 // Paragraph separator
1432+
char{0x000A}, // Linefeed (LF)
1433+
char{0x000B}, // Vertical tab (VT)
1434+
char{0x000C}, // Form feed (FF)
1435+
char{0x000D}, // Carriage return (CR)
1436+
char32_t{0x0085}, // Next line (NEL)
1437+
char32_t{0x2028}, // Line separator
1438+
char32_t{0x2029} // Paragraph separator
14391439
>;
14401440

14411441
using horizontal_space_chars = enumeration<
1442-
(char)0x0009, // Horizontal tab (HT)
1443-
(char)0x0020, // Space
1444-
(char32_t)0x00A0, // Non-break space
1445-
(char32_t)0x1680, // Ogham space mark
1446-
(char32_t)0x180E, // Mongolian vowel separator
1447-
(char32_t)0x2000, // En quad
1448-
(char32_t)0x2001, // Em quad
1449-
(char32_t)0x2002, // En space
1450-
(char32_t)0x2003, // Em space
1451-
(char32_t)0x2004, // Three-per-em space
1452-
(char32_t)0x2005, // Four-per-em space
1453-
(char32_t)0x2006, // Six-per-em space
1454-
(char32_t)0x2007, // Figure space
1455-
(char32_t)0x2008, // Punctuation space
1456-
(char32_t)0x2009, // Thin space
1457-
(char32_t)0x200A, // Hair space
1458-
(char32_t)0x202F, // Narrow no-break space
1459-
(char32_t)0x205F, // Medium mathematical space
1460-
(char32_t)0x3000 // Ideographic space
1442+
char{0x0009}, // Horizontal tab (HT)
1443+
char{0x0020}, // Space
1444+
char32_t{0x00A0}, // Non-break space
1445+
char32_t{0x1680}, // Ogham space mark
1446+
char32_t{0x180E}, // Mongolian vowel separator
1447+
char32_t{0x2000}, // En quad
1448+
char32_t{0x2001}, // Em quad
1449+
char32_t{0x2002}, // En space
1450+
char32_t{0x2003}, // Em space
1451+
char32_t{0x2004}, // Three-per-em space
1452+
char32_t{0x2005}, // Four-per-em space
1453+
char32_t{0x2006}, // Six-per-em space
1454+
char32_t{0x2007}, // Figure space
1455+
char32_t{0x2008}, // Punctuation space
1456+
char32_t{0x2009}, // Thin space
1457+
char32_t{0x200A}, // Hair space
1458+
char32_t{0x202F}, // Narrow no-break space
1459+
char32_t{0x205F}, // Medium mathematical space
1460+
char32_t{0x3000} // Ideographic space
14611461
>;
14621462

14631463
using alphanum_chars = set<char_range<'A','Z'>, char_range<'a','z'>, char_range<'0','9'> >;
@@ -2169,9 +2169,9 @@ template <auto V, size_t N, typename... Ts, typename Parameters> static constexp
21692169
template <auto V, size_t N, typename... Ts, typename Parameters> static constexpr auto apply(pcre::finish_hexdec, ctll::term<V>, pcre_context<ctll::list<number<N>, Ts...>, Parameters> subject) {
21702170
constexpr size_t max_char = std::numeric_limits<char>::max();
21712171
if constexpr (N <= max_char) {
2172-
return pcre_context{ctll::push_front(character<(char)N>(), ctll::list<Ts...>()), subject.parameters};
2172+
return pcre_context{ctll::push_front(character<char{N}>(), ctll::list<Ts...>()), subject.parameters};
21732173
} else {
2174-
return pcre_context{ctll::push_front(character<(char32_t)N>(), ctll::list<Ts...>()), subject.parameters};
2174+
return pcre_context{ctll::push_front(character<char32_t{N}>(), ctll::list<Ts...>()), subject.parameters};
21752175
}
21762176
}
21772177

single-header/ctre.hpp

+28-28
Original file line numberDiff line numberDiff line change
@@ -1426,35 +1426,35 @@ using word_chars = set<char_range<'A','Z'>, char_range<'a','z'>, char_range<'0',
14261426
using space_chars = enumeration<' ', '\t', '\n', '\v', '\f', '\r'>;
14271427

14281428
using vertical_space_chars = enumeration<
1429-
(char)0x000A, // Linefeed (LF)
1430-
(char)0x000B, // Vertical tab (VT)
1431-
(char)0x000C, // Form feed (FF)
1432-
(char)0x000D, // Carriage return (CR)
1433-
(char32_t)0x0085, // Next line (NEL)
1434-
(char32_t)0x2028, // Line separator
1435-
(char32_t)0x2029 // Paragraph separator
1429+
char{0x000A}, // Linefeed (LF)
1430+
char{0x000B}, // Vertical tab (VT)
1431+
char{0x000C}, // Form feed (FF)
1432+
char{0x000D}, // Carriage return (CR)
1433+
char32_t{0x0085}, // Next line (NEL)
1434+
char32_t{0x2028}, // Line separator
1435+
char32_t{0x2029} // Paragraph separator
14361436
>;
14371437

14381438
using horizontal_space_chars = enumeration<
1439-
(char)0x0009, // Horizontal tab (HT)
1440-
(char)0x0020, // Space
1441-
(char32_t)0x00A0, // Non-break space
1442-
(char32_t)0x1680, // Ogham space mark
1443-
(char32_t)0x180E, // Mongolian vowel separator
1444-
(char32_t)0x2000, // En quad
1445-
(char32_t)0x2001, // Em quad
1446-
(char32_t)0x2002, // En space
1447-
(char32_t)0x2003, // Em space
1448-
(char32_t)0x2004, // Three-per-em space
1449-
(char32_t)0x2005, // Four-per-em space
1450-
(char32_t)0x2006, // Six-per-em space
1451-
(char32_t)0x2007, // Figure space
1452-
(char32_t)0x2008, // Punctuation space
1453-
(char32_t)0x2009, // Thin space
1454-
(char32_t)0x200A, // Hair space
1455-
(char32_t)0x202F, // Narrow no-break space
1456-
(char32_t)0x205F, // Medium mathematical space
1457-
(char32_t)0x3000 // Ideographic space
1439+
char{0x0009}, // Horizontal tab (HT)
1440+
char{0x0020}, // Space
1441+
char32_t{0x00A0}, // Non-break space
1442+
char32_t{0x1680}, // Ogham space mark
1443+
char32_t{0x180E}, // Mongolian vowel separator
1444+
char32_t{0x2000}, // En quad
1445+
char32_t{0x2001}, // Em quad
1446+
char32_t{0x2002}, // En space
1447+
char32_t{0x2003}, // Em space
1448+
char32_t{0x2004}, // Three-per-em space
1449+
char32_t{0x2005}, // Four-per-em space
1450+
char32_t{0x2006}, // Six-per-em space
1451+
char32_t{0x2007}, // Figure space
1452+
char32_t{0x2008}, // Punctuation space
1453+
char32_t{0x2009}, // Thin space
1454+
char32_t{0x200A}, // Hair space
1455+
char32_t{0x202F}, // Narrow no-break space
1456+
char32_t{0x205F}, // Medium mathematical space
1457+
char32_t{0x3000} // Ideographic space
14581458
>;
14591459

14601460
using alphanum_chars = set<char_range<'A','Z'>, char_range<'a','z'>, char_range<'0','9'> >;
@@ -2166,9 +2166,9 @@ template <auto V, size_t N, typename... Ts, typename Parameters> static constexp
21662166
template <auto V, size_t N, typename... Ts, typename Parameters> static constexpr auto apply(pcre::finish_hexdec, ctll::term<V>, pcre_context<ctll::list<number<N>, Ts...>, Parameters> subject) {
21672167
constexpr size_t max_char = std::numeric_limits<char>::max();
21682168
if constexpr (N <= max_char) {
2169-
return pcre_context{ctll::push_front(character<(char)N>(), ctll::list<Ts...>()), subject.parameters};
2169+
return pcre_context{ctll::push_front(character<char{N}>(), ctll::list<Ts...>()), subject.parameters};
21702170
} else {
2171-
return pcre_context{ctll::push_front(character<(char32_t)N>(), ctll::list<Ts...>()), subject.parameters};
2171+
return pcre_context{ctll::push_front(character<char32_t{N}>(), ctll::list<Ts...>()), subject.parameters};
21722172
}
21732173
}
21742174

0 commit comments

Comments
 (0)