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.
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.cppwith
em++ -std=c++20 main.cppwhile result with an error as :
I know c++20 concept are recent feature so i thought it might be emscripten that doesn't support this feature.