skystrife / cpptoml

cpptoml is a header-only library for parsing TOML
MIT License
587 stars 133 forks source link

compile issue #131

Open crackun24 opened 4 months ago

crackun24 commented 4 months ago
The err info I meet is /vcpkg/installed/x64-linux/include/cpptoml.h: In static member function 'static cpptoml::value_traits<T, typename std::enable_if<(((! cpptoml::valid_value_or_string_convertible::value) && (! std::is_floating_point<typename std::decay<_Tp>::type>::value)) && std::is_signed<typename std::decay<_Tp>::type>::value)>::type>::value_type cpptoml::value_traits<T, typename std::enable_if<(((! cpptoml::valid_value_or_string_convertible::value) && (! std::is_floating_point<typename std::decay<_Tp>::type>::value)) && std::is_signed<typename std::decay<_Tp>::type>::value)>::type>::construct(T&&)': 5.874 /vcpkg/installed/x64-linux/include/cpptoml.h:344:25: error: 'numeric_limits' is not a member of 'std' 5.874 344 if (val < (std::numeric_limits::min)()) 5.874 ^~~~~~ 5.874 /vcpkg/installed/x64-linux/include/cpptoml.h:344:47: error: expected primary-expression before '>' token 5.874 344 if (val < (std::numeric_limits::min)()) 5.874 ^ 5.875 /vcpkg/installed/x64-linux/include/cpptoml.h:344:50: error: '::min' has not been declared; did you mean 'std::min'? 5.875 344 if (val < (std::numeric_limits::min)()) 5.875 ^~~ 5.875 std::min 5.875 In file included from /usr/local/include/c++/14.1.0/algorithm:61, 5.875 from /vcpkg/installed/x64-linux/include/cpptoml.h:10: 5.875 /usr/local/include/c++/14.1.0/bits/stl_algo.h:5695:5: note: 'std::min' declared here 5.875 5695 min(initializer_list<_Tp> __l, _Compare __comp) 5.875 ^~~ 5.876 /vcpkg/installed/x64-linux/include/cpptoml.h:349:25: error: 'numeric_limits' is not a member of 'std' 5.876 349 if (val > (std::numeric_limits::max)()) 5.876 ^~~~~~ 5.876 /vcpkg/installed/x64-linux/include/cpptoml.h:349:47: error: expected primary-expression before '>' token 5.876 349 if (val > (std::numeric_limits::max)()) 5.876 ^ 5.877 /vcpkg/installed/x64-linux/include/cpptoml.h:349:50: error: '::max' has not been declared; did you mean 'std::max'? 5.877 349 if (val > (std::numeric_limits::max)()) 5.877 ^~~ 5.877 std::max 5.877 /usr/local/include/c++/14.1.0/bits/stl_algo.h:5715:5: note: 'std::max' declared here 5.877 5715 max(initializer_list<_Tp> __l, _Compare __comp) 5.877 ^~~ 5.878 /vcpkg/installed/x64-linux/include/cpptoml.h: In static member function 'static cpptoml::value_traits<T, typename std::enable_if<((! cpptoml::valid_value_or_string_convertible::value) && std::is_unsigned<typename std::decay<_Tp>::type>::value)>::type>::value_type cpptoml::value_traits<T, typename std::enable_if<((! cpptoml::valid_value_or_string_convertible::value) && std::is_unsigned<typename std::decay<_Tp>::type>::value)>::type>::construct(T&&)': 5.878 /vcpkg/installed/x64-linux/include/cpptoml.h:369:47: error: 'numeric_limits' is not a member of 'std' 5.878 369 if (val > static_cast((std::numeric_limits::max)())) 5.878 ^~~~~~ 5.878 /vcpkg/installed/x64-linux/include/cpptoml.h:369:69: error: expected primary-expression before '>' token 5.878 369 if (val > static_cast((std::numeric_limits::max)())) 5.878 ^ 5.878 /vcpkg/installed/x64-linux/include/cpptoml.h:369:72: error: '::max' has not been declared; did you mean 'std::max'? 5.878 369 if (val > static_cast((std::numeric_limits::max)())) 5.878 ^~~ 5.878 std::max 5.878 /usr/local/include/c++/14.1.0/bits/stl_algo.h:5715:5: note: 'std::max' declared here 5.878 5715 max(initializer_list<_Tp> __l, _Compare __comp) 5.878 ^~~ 5.901 /vcpkg/installed/x64-linux/include/cpptoml.h: In function 'typename std::enable_if<((! std::is_floating_point<_Tp>::value) && std::is_signed<_Tp>::value), cpptoml::option >::type cpptoml::get_impl(const std::shared_ptr&)': 5.901 /vcpkg/installed/x64-linux/include/cpptoml.h:1226:30: error: 'numeric_limits' is not a member of 'std' 5.901 1226 if (v->get() < (std::numeric_limits::min)()) 5.901 ^~~~~~ 5.901 /vcpkg/installed/x64-linux/include/cpptoml.h:1226:46: error: expected primary-expression before '>' token 5.901 1226 if (v->get() < (std::numeric_limits::min)()) 5.901 ^ 5.901 /vcpkg/installed/x64-linux/include/cpptoml.h:1226:49: error: '::min' has not been declared; did you mean 'std::min'? 5.901 1226 if (v->get() < (std::numeric_limits::min)()) 5.901 ^~~ 5.901 std::min 5.901 /usr/local/include/c++/14.1.0/bits/stl_algo.h:5695:5: note: 'std::min' declared here 5.901 5695 min(initializer_list<_Tp> __l, _Compare __comp) 5.901 ^~~ 5.903 /vcpkg/installed/x64-linux/include/cpptoml.h:1230:30: error: 'numeric_limits' is not a member of 'std' 5.903 1230 if (v->get() > (std::numeric_limits::max)()) 5.903 ^~~~~~ 5.903 /vcpkg/installed/x64-linux/include/cpptoml.h:1230:46: error: expected primary-expression before '>' token 5.903 1230 if (v->get() > (std::numeric_limits::max)()) 5.903 ^ 5.904 /vcpkg/installed/x64-linux/include/cpptoml.h:1230:49: error: '::max' has not been declared; did you mean 'std::max'? 5.904 1230 if (v->get() > (std::numeric_limits::max)()) 5.904 ^~~ 5.904 std::max 5.904 /usr/local/include/c++/14.1.0/bits/stl_algo.h:5715:5: note: 'std::max' declared here 5.904 5715 max(initializer_list<_Tp> __l, _Compare __comp) 5.904 ^~~ 5.905 /vcpkg/installed/x64-linux/include/cpptoml.h: In function 'typename std::enable_if<((! std::is_same<T, bool>::value) && std::is_unsigned<_Tp>::value), cpptoml::option >::type cpptoml::get_impl(const std::shared_ptr&)': 5.905 /vcpkg/installed/x64-linux/include/cpptoml.h:1253:53: error: 'numeric_limits' is not a member of 'std' 5.905 1253 if (static_cast(v->get()) > (std::numeric_limits::max)()) 5.905 ^~~~~~ 5.905 /vcpkg/installed/x64-linux/include/cpptoml.h:1253:69: error: expected primary-expression before '>' token 5.905 1253 if (static_cast(v->get()) > (std::numeric_limits::max)()) 5.905 ^ 5.905 /vcpkg/installed/x64-linux/include/cpptoml.h:1253:72: error: '::max' has not been declared; did you mean 'std::max'? 5.905 1253 if (static_cast(v->get()) > (std::numeric_limits::max)()) 5.905 ^~~ 5.905 std::max 5.905 /usr/local/include/c++/14.1.0/bits/stl_algo.h:5715:5: note: 'std::max' declared here 5.905 5715 max(initializer_list<_Tp> __l, _Compare __comp) 5.905 ^~~ 5.940 /vcpkg/installed/x64-linux/include/cpptoml.h: In member function 'std::shared_ptr cpptoml::parser::parse_number(std::__cxx11::basic_string::iterator&, const std::__cxx11::basic_string::iterator&)': 5.940 /vcpkg/installed/x64-linux/include/cpptoml.h:2732:33: error: 'numeric_limits' is not a member of 'std' 5.940 2732 auto val = std::numeric_limits::infinity(); 5.940 ^~~~~~ 5.940 /vcpkg/installed/x64-linux/include/cpptoml.h:2732:48: error: expected primary-expression before 'double' 5.940 2732 auto val = std::numeric_limits::infinity(); 5.940 ^~ 5.941 /vcpkg/installed/x64-linux/include/cpptoml.h:2741:33: error: 'numeric_limits' is not a member of 'std' 5.941 2741 auto val = std::numeric_limits::quiet_NaN(); 5.941 ^~~~~~ 5.941 /vcpkg/installed/x64-linux/include/cpptoml.h:2741:48: error: expected primary-expression before 'double' 5.941 2741 auto val = std::numeric_limits::quiet_NaN(); 5.941 ^~ 5.958 /vcpkg/installed/x64-linux/include/cpptoml.h: In member function 'void cpptoml::toml_writer::write(const cpptoml::value&)': 5.958 /vcpkg/installed/x64-linux/include/cpptoml.h:3481:38: error: 'numeric_limits' is not a member of 'std' 5.958 3481 << std::setprecision(std::numeric_limits::max_digits10) 5.958 ^~~~~~ 5.958 /vcpkg/installed/x64-linux/include/cpptoml.h:3481:53: error: expected primary-expression before 'double' 5.958 3481 << std::setprecision(std::numeric_limits::max_digits10) 5.958 ^~ 6.378 make[2]: [CMakeFiles/FeiShuApi.dir/build.make:118: CMakeFiles/FeiShuApi.dir/src/Config.cpp.o] Error 1 6.378 make[1]: [CMakeFiles/Makefile2:83: CMakeFiles/FeiShuApi.dir/all] Error 2 6.378 make: *** [Makefile:91: all] Error 2

system : ubuntu using cpp17