[PATCH] D54485: [libcxx] Implement P0318R1: unwrap_ref_decay and unwrap_reference

Louis Dionne via Phabricator reviews at reviews.llvm.org
Mon Nov 19 11:03:37 PST 2018


ldionne added inline comments.
Herald added a subscriber: jkorous.


================
Comment at: libcxx/include/functional:2536
+#if _LIBCPP_STD_VER > 17
+using __detail::unwrap_reference;
+using __detail::unwrap_ref_decay;
----------------
EricWF wrote:
> ldionne wrote:
> > 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)?
> 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`?
> 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.

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.


Repository:
  rCXX libc++

https://reviews.llvm.org/D54485





More information about the libcxx-commits mailing list