Hello, I have some problems with building my c++ 20 project with emscripten. The problems seems to be with c++20 concepts. I made a little example: `main.cpp` ``` #include <concepts> template <typename T> concept Test = std::movable<T>; template <Test T> class MyTest { public: T value; }; int main() { MyTest<int> test; } ``` with `em++ -std=c++20 main.cpp` while result with an error as : ``` main.cpp:1:10: fatal error: 'concepts' file not found #include <concepts> ^~~~~~~~~~ 1 error generated. emcc: error: '/tmp/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=21 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/tmp/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -std=c++20 main.cpp -c -o /tmp/emscripten_temp_gra_mqr_/main_0.o' failed (1) ``` I know c++20 concept are recent feature so i thought it might be emscripten that doesn't support this feature.
Activity
sbc100 commentedon May 19, 2021
This would require us to upgrade our version of libcxx.. which is something we should probably do anyway. Currently we include the llvm-10 version (
emscripten/system/lib/libcxx/readme.txt
Line 1 in 5435522
Arcahub commentedon May 20, 2021
Thank you for your fast answer do you have any idea of when this update can be released ?
sbc100 commentedon May 20, 2021
I opened a new issue to update our llvm libraries: #14244
Its hard to say how long it will take someone to take a look at it.
Add test for C++20 concepts. NFC
Add test for C++20 concepts. NFC
Add test for C++20 concepts. NFC (#14301)