This was voted into C++20 in San Diego.
Details
Diff Detail
- Repository
- rCXX libc++
- Build Status
Buildable 24949 Build 24948: arc lint + arc unit
Event Timeline
libcxx/include/functional | ||
---|---|---|
2535 | Is this a viable implementation strategy? The nice part is that this allows us to reuse these metafunctions to implement make_tuple and make_pair before C++20, but IDK whether the standard allows us to bring these names into namespace std with a using declaration? Is that observable (e.g. through ADL associated namespaces)? | |
libcxx/include/utility | ||
619–621 | This is hardly the "right" place to implement this, however this is the only way I could find not to create another header. |
libcxx/include/functional | ||
---|---|---|
2535 | After more thought: No, this is not viable. I believe these are technically customization points for users, so it needs to have the same declaration as in the standard, not just the same spelling. Bummer. I guess the best route is to have __foo for use pre-C++20, and the we can implement foo in terms of __foo? |
libcxx/include/utility | ||
---|---|---|
619–621 | Meh. Just put it where it fits best. |
libcxx/include/functional | ||
---|---|---|
2535 |
We need to fix that.. Only things that are specifically designed to be customization points should be customizable by users. We need a way to tag things in the standard as being a customization point. |
I agree with your concerns about this living in <utility>, but as long as people can get it by including <type_traits>, then we're good.
libcxx/include/functional | ||
---|---|---|
2535 |
We use this approach in lots of other places. | |
libcxx/include/utility | ||
631 | You've still got a C++20 here :-) |
Is this a viable implementation strategy? The nice part is that this allows us to reuse these metafunctions to implement make_tuple and make_pair before C++20, but IDK whether the standard allows us to bring these names into namespace std with a using declaration?
Is that observable (e.g. through ADL associated namespaces)?