ValeevGroup / SeQuant

SeQuant: Symbolic Algebra of Tensors over Operators and Scalars
GNU General Public License v3.0
17 stars 6 forks source link

Doesn't compile with C++17 #200

Closed ajay-mk closed 5 months ago

ajay-mk commented 5 months ago

Compiling with C++17 fails and gives the following errors. C++20 works fine. Compiler versions tested: AppleClang 15.0.0.15000309 and Clang 18.1.6

[1/23] Building CXX object CMakeFiles/SeQuant.dir/SeQuant/core/context.cpp.o
FAILED: CMakeFiles/SeQuant.dir/SeQuant/core/context.cpp.o 
/opt/homebrew/bin/ccache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DBOOST_CHRONO_DYN_LINK -DBOOST_CHRONO_NO_LIB -DBOOST_LOCALE_DYN_LINK -DBOOST_LOCALE_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DSEQUANT_HAS_EIGEN=1 -DSEQUANT_USE_SYSTEM_BOOST_HASH=1 -I/Users/ajay/Code/SeQuant -I/Users/ajay/Code/SeQuant/cmake-build-debug -I/Users/ajay/Code/SeQuant/cmake-build-debug/_deps/rangev3-src/include -isystem /opt/homebrew/Cellar/boost/1.85.0/include -isystem /opt/homebrew/include/eigen3 -g -std=c++17 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -fcolor-diagnostics -MD -MT CMakeFiles/SeQuant.dir/SeQuant/core/context.cpp.o -MF CMakeFiles/SeQuant.dir/SeQuant/core/context.cpp.o.d -o CMakeFiles/SeQuant.dir/SeQuant/core/context.cpp.o -c /Users/ajay/Code/SeQuant/SeQuant/core/context.cpp
In file included from /Users/ajay/Code/SeQuant/SeQuant/core/context.cpp:2:
In file included from /Users/ajay/Code/SeQuant/SeQuant/core/context.hpp:5:
In file included from /Users/ajay/Code/SeQuant/SeQuant/core/index_space_registry.hpp:8:
In file included from /Users/ajay/Code/SeQuant/SeQuant/core/space.hpp:14:
In file included from /Users/ajay/Code/SeQuant/SeQuant/core/utility/string.hpp:8:
/Users/ajay/Code/SeQuant/SeQuant/core/meta.hpp:129:16: error: use of undeclared identifier 'char8_t'; did you mean 'char16_t'?
struct is_char<char8_t> : std::true_type {};
               ^~~~~~~
               char16_t
/Users/ajay/Code/SeQuant/SeQuant/core/meta.hpp:129:23: error: expected '(' for function-style cast or type construction
struct is_char<char8_t> : std::true_type {};
               ~~~~~~~^
In file included from /Users/ajay/Code/SeQuant/SeQuant/core/context.cpp:2:
In file included from /Users/ajay/Code/SeQuant/SeQuant/core/context.hpp:5:
/Users/ajay/Code/SeQuant/SeQuant/core/index_space_registry.hpp:1191:26: error: no member named 'contains' in 'std::map<sequant::QuantumNumbersAttr, sequant::TypeAttr>'
      if (!qn2type_found.contains(qn)) {
           ~~~~~~~~~~~~~ ^
3 errors generated.
evaleev commented 5 months ago

OK, will fix