Closed elanhickler closed 7 months ago
To build with C++20 you need the utf8 string fix.
$<$<COMPILE_LANGUAGE:CXX>:-fno-char8_t>
add that to the compile options or better add it if the version >= 20
(the c++20 insistence that a utf8 char and a char are not the same is a huge clusterf**k by the way, which is mostly fixed in 23; that flag turns it off)
add_compile_options(
# Do *not* use the new, breaking char8_t UTF-8 bits in C++20.
$<$<COMPILE_LANGUAGE:CXX>:-fno-char8_t>
)
which cmake file do you add this to? i tried the one in src and the one in the main folder already, still getting char errors
I also changed the line set(CMAKE_CXX_STANDARD 20)
so it would be 20 instead of 17
When I try to switch conduit to build with C++20, I get errors.
Severity Code Description Project File Line Suppression State Error C2679 binary '<<': no operator found which takes a right-hand operand of type 'std::basic_string<char8_t,std::char_traits,std::allocator>' (or there is no acceptable conversion) conduit-impl F:(PROGRAMMING)\clapconduithydrus\src\conduit-shared\clap-base-class.h 604
Severity Code Description Project File Line Suppression State Error C2440 'return': cannot convert from 'std::basic_string<char8_t,std::char_traits,std::allocator>' to 'std::basic_string<char,std::char_traits,std::allocator>' conduit-impl F:(PROGRAMMING)\clapconduithydrus\build\libs\sst\sst-plugininfra\libs\filesystem\include\filesystem\import.h 21
Severity Code Description Project File Line Suppression State Error C2088 '<<': illegal for class conduit-impl F:(PROGRAMMING)\clapconduithydrus\src\conduit-shared\clap-base-class.h 607