Fail to compile libstdc++ with concepts on clang experimental version

sotrdg sotrdg euloanty@live.com
Wed Oct 9 21:18:00 GMT 2019


https://github.com/saarraz/clang-concepts-monorepo/issues/26

https://github.com/euloanty/fast_io
This project

/usr/local/bin/clang++ -Xclang -fconcepts-ts -ffast-math -std=gnu++2a -MD -MT CMakeFiles/integer_scientific.dir/0009.floating_point/integer_scientific.cc.o -MF CMakeFiles/integer_scientific.dir/0009.floating_point/integer_scientific.cc.o.d -o CMakeFiles/integer_scientific.dir/0009.floating_point/integer_scientific.cc.o -c '../0009.floating point/integer_scientific.cc'
In file included from ../0009.floating point/integer_scientific.cc:1:
In file included from ../0009.floating point/../../include/fast_io.h:9:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:234:14: error: expected primary expression before '!'; did you forget parentheses?
requires !_Std_pair<_Tp>
^
1 error generated.
ninja: build stopped: subcommand failed.

Also. the clang compiler can't compile functions like

void f(std::unsigned_integral T)

It has to be
void f(std::unsigned_integral auto T)

It compiles it is the requirement of C++ 20.

Same with

concept bool is forbidden.

Please fix these issues. Thank you


More information about the Libstdc++ mailing list