vincentlaucsb / csv-parser

A high-performance, fully-featured CSV parser and serializer for modern C++.
MIT License
864 stars 144 forks source link

compiling under gcc-10 #194

Closed cailtin closed 2 years ago

cailtin commented 2 years ago

it seems that somebody is expecting that the std::string will unbox and provide a const char (which is funny std::string has that)

~/third_party/C++/csv-parser/build$ g++ --version g++ (SUSE Linux) 10.3.0 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ free -h total used free shared buff/cache available Mem: 62Gi 3.6Gi 22Gi 65Mi 36Gi 58Gi Swap: 11Gi 0B 11Gi

uname -a Linux torin 5.3.18-150300.59.46-preempt #1 SMP PREEMPT Tue Feb 1 16:19:33 UTC 2022 (fb6d1ec) x86_64 x86_64 x86_64 GNU/Linux

[ 26%] Building CXX object programs/CMakeFiles/data_type_bench.dir/data_type_bench.cpp.o /home/clopez/third_party/C++/csv-parser/programs/data_type_bench.cpp: In function ‘long double get_max(std::string, std::string, bool)’: /home/clopez/third_party/C++/csv-parser/programs/data_type_bench.cpp:25:13: error: no matching function for call to ‘from_chars(const char&, const char, long double&)’ 25 | ); | ^ In file included from /home/clopez/third_party/C++/csv-parser/programs/data_type_bench.cpp:1: /usr/include/c++/10/charconv:595:5: note: candidate: ‘template std::detail::integer_from_chars_result_type<_Tp> std::from_chars(const char, const char, _Tp&, int)’ 595 | from_chars(const char __first, const char last, _Tp& value, | ^~~~~~ /usr/include/c++/10/charconv:595:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/10/charconv:40, from /home/clopez/third_party/C++/csv-parser/programs/data_type_bench.cpp:1: /usr/include/c++/10/type_traits: In substitution of ‘template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = std::from_chars_result]’: /usr/include/c++/10/charconv:584:11: required by substitution of ‘template using integer_from_chars_result_type = std::enable_if_t<std::_or<std::or_<std::is_same<typename std::remove_cv< >::type, signed char>, std::is_same<typename std::remove_cv< >::type, short int>, std::is_same<typename std::remove_cv< >::type, int>, std::is_same<typename std::remove_cv< >::type, long int>, std::is_same<typename std::remove_cv< >::type, long long int>, std::is_same<typename std::removecv< >::type, int128> >, std::or<std::is_same<typename std::remove_cv< >::type, unsigned char>, std::is_same<typename std::remove_cv< >::type, short unsigned int>, std::is_same<typename std::remove_cv< >::type, unsigned int>, std::is_same<typename std::remove_cv< >::type, long unsigned int>, std::is_same<typename std::remove_cv< >::type, long long unsigned int>, std::is_same<typename std::remove_cv< >::type, int128 unsigned> >, std::is_same<char, typename std::remove_cv< >::type> >::value, std::from_chars_result> [with _Tp = long double]’ /usr/include/c++/10/charconv:595:5: required by substitution of ‘template std::detail::__integer_from_chars_result_type<_Tp> std::from_chars(const char, const char, _Tp&, int) [with _Tp = long double]’ /home/clopez/third_party/C++/csv-parser/programs/data_type_bench.cpp:25:13: required from here /usr/include/c++/10/type_traits:2554:11: error: no type named ‘type’ in ‘struct std::enable_if<false, std::from_chars_result>’ 2554 | using enable_if_t = typename enable_if<_Cond, _Tp>::type; | ^~~ make[2]: [programs/CMakeFiles/data_type_bench.dir/build.make:80: programs/CMakeFiles/data_type_bench.dir/data_type_bench.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:296: programs/CMakeFiles/data_type_bench.dir/all] Error 2

cailtin commented 2 years ago

closing nobody cares