I'm using clang-12.0.1 and libstdc++ from gcc-11.1.0. When including <ranges>, I get the following error:
[build] /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../include/c++/11.1.0/ranges:3392:19: error: missing 'typename' prior to dependent type name 'iterator_traits<iterator_t<_Base>>::iterator_category'
[build] using _Cat = iterator_traits<iterator_t<_Base>>::iterator_category;
[build] ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Is this a library bug?
Clang has not implemented P0634R3 yet, as per the current posted status.
So to answer your question:
Is this a library bug?
Nope! Since the ranges library is only available in C++20, GCC's implementation is free to use syntax that is only available as per that version of the standard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With