File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ int main() {
149149 std::cerr << "parsing failure\n";
150150 return EXIT_FAILURE;
151151 }
152- std::cout << "parsed the number "<< i << std::endl;
152+ std::cout << "parsed the number " << i << std::endl;
153153
154154 std::string binstr = "1001111000011001110110111001001010110100111000110001100";
155155
@@ -158,7 +158,7 @@ int main() {
158158 std::cerr << "parsing failure\n";
159159 return EXIT_FAILURE;
160160 }
161- std::cout << "parsed the number "<< i << std::endl;
161+ std::cout << "parsed the number " << i << std::endl;
162162
163163 std::string hexstr = "4f0cedc95a718c";
164164
@@ -167,7 +167,7 @@ int main() {
167167 std::cerr << "parsing failure\n";
168168 return EXIT_FAILURE;
169169 }
170- std::cout << "parsed the number "<< i << std::endl;
170+ std::cout << "parsed the number " << i << std::endl;
171171 return EXIT_SUCCESS;
172172}
173173```
Original file line number Diff line number Diff line change @@ -237,7 +237,12 @@ struct is_supported_char_type
237237 : std::integral_constant<bool , std::is_same<UC, char >::value ||
238238 std::is_same<UC, wchar_t >::value ||
239239 std::is_same<UC, char16_t >::value ||
240- std::is_same<UC, char32_t >::value> {};
240+ std::is_same<UC, char32_t >::value
241+ #ifdef __cpp_char8_t
242+ || std::is_same<UC, char8_t >::value
243+ #endif
244+ > {
245+ };
241246
242247// Compares two ASCII strings in a case insensitive manner.
243248template <typename UC>
@@ -748,6 +753,11 @@ template <> constexpr char16_t const *str_const_nan<char16_t>() {
748753template <> constexpr char32_t const *str_const_nan<char32_t >() {
749754 return U" nan" ;
750755}
756+ #ifdef __cpp_char8_t
757+ template <> constexpr char8_t const *str_const_nan<char8_t >() {
758+ return u8" nan" ;
759+ }
760+ #endif
751761
752762template <typename UC> constexpr UC const *str_const_inf ();
753763template <> constexpr char const *str_const_inf<char >() { return " infinity" ; }
@@ -760,6 +770,11 @@ template <> constexpr char16_t const *str_const_inf<char16_t>() {
760770template <> constexpr char32_t const *str_const_inf<char32_t >() {
761771 return U" infinity" ;
762772}
773+ #ifdef __cpp_char8_t
774+ template <> constexpr char8_t const *str_const_inf<char8_t >() {
775+ return u8" infinity" ;
776+ }
777+ #endif
763778
764779template <typename = void > struct int_luts {
765780 static constexpr uint8_t chdigit[] = {
You can’t perform that action at this time.
0 commit comments