This was voted into C++20 in San Diego.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
libcxx/include/functional | ||
---|---|---|
2536 ↗ | (On Diff #173915) | 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 ↗ | (On Diff #173915) | 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 | ||
---|---|---|
2536 ↗ | (On Diff #173915) | 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 ↗ | (On Diff #173915) | Meh. Just put it where it fits best. |
libcxx/include/functional | ||
---|---|---|
2536 ↗ | (On Diff #173915) |
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 | ||
---|---|---|
2536 ↗ | (On Diff #173915) |
We use this approach in lots of other places. |
libcxx/include/utility | ||
631 ↗ | (On Diff #174665) | You've still got a C++20 here :-) |