https://github.com/zwuis requested changes to this pull request.

> https://github.com/cplusplus/draft/issues/8714
> 
> ~~TL;DR: Reopening pre-existing namespaces is ok.~~

Sorry that I misread the discussion. Reopening namespaces in `std` is UB.

```cpp
// possible library implementation
namespace std {
inline namespace __v1 {
namespace ranges { /* enable_view */ }
}
}

// user code
namespace std::ranges {} // This is not __v1::ranges
namespace std {
// ok but we can add an option to emit warnings
template <>
constexpr bool ranges::enable_view<MyClass> = true;
}
```

https://github.com/llvm/llvm-project/pull/174170
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to