localspook wrote:
It looks like using an inline namespace is exactly what libc++ does. But even
with libc++, the following code compiles just fine
(https://godbolt.org/z/PYz5aafvv):
```cpp
#include <ranges>
struct MyClass1 {};
struct MyClass2 {};
namespace std::ranges {
template <> constexpr bool enable_view<MyClass1> = true;
}
namespace std { namespace ranges {
template <> constexpr bool enable_view<MyClass2> = true;
} }
```
Is this guaranteed to work by the standard? If not, it seems like a really
unexpected footgun
https://github.com/llvm/llvm-project/pull/174170
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits