Broken check for std::ranges?
rnurgaliyev opened this issue · comments
Renat Nurgaliyev commented
Hello!
I am very confused by the change introduced in 2cf8c88. According to https://en.cppreference.com/w/cpp/feature_test, #if defined(__cpp_lib_ranges)
was a correct way to check if std::ranges
is usable. I believe that #if __has_include(<ranges>)
is not working as expected, since ranges.h is available in libfmt - a folly dependency. This code won't compile in C++17. And also it is not even done correctly in some places ("range" vs "ranges"):
folly/folly/test/PortabilityTest.cpp
Lines 58 to 60 in 2cf8c88