yhirose / cpp-peglib

A single file C++ header-only PEG (Parsing Expression Grammars) library
MIT License
883 stars 112 forks source link

fix #162 #163

Closed apache-hb closed 3 years ago

yhirose commented 3 years ago

@Apache-HB, it looks a bit different from your suggestion using __cpp_lib_to_chars in #162. Is there any reason why you don't like your original suggestion any more? I am just curious.

If you want to take the define symbol approach, could you name it CPPPEGLIB_HAS_CHARCONV which corresponds to define symbols in other my 'cpp-' projects like cpp-httplib. Thanks!

apache-hb commented 3 years ago

i realized that if <charconv> was not available then __cpp_lib_to_chars would not be defined, resulting in a compiler error.

yhirose commented 3 years ago

@Apache-HB, thanks for your fine contribution!