This is really what D110243 should have done. These variables are
inline in the spec. We unfortunately need to support pre-C++17 since
some of these inline variables are in C++17 parts of the library that
we provide pre-C++17 as an extension.
Details
- Reviewers
Mordante - Group Reviewers
Restricted Project
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Thanks for working on this. LGTM, but I would like to bikeshed regarding the name.
libcxx/include/__config | ||
---|---|---|
895 | I wonder should we use this instead? And just constexpr in the #else. For me that makes it easier to understand what the macro does. |
libcxx/include/__config | ||
---|---|---|
895 | The problem is that we still want those variables to be constexpr even in pre C++17. |
libcxx/include/__config | ||
---|---|---|
895 | Yes therefore I suggested "And just constexpr in the #else". With our attributes we often write the "ideal" version for a certain C++ version and a work-around for older versions. |
It turns out that this is more complicated than it seems. I am going to abandon this in favour of the stack of patches starting at D145422.
I wonder should we use this instead? And just constexpr in the #else. For me that makes it easier to understand what the macro does.