[PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 13 15:03:48 PDT 2016
mclow.lists added inline comments.
================
Comment at: include/memory:2137
@@ -2132,3 +2136,3 @@
- _LIBCPP_INLINE_VISIBILITY
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
__libcpp_compressed_pair_imp& operator=(__libcpp_compressed_pair_imp&& __p)
----------------
loladiro wrote:
> mclow.lists wrote:
> > Have you tested this on C++11?
> > I suspect that some of these need to be `_LIBCPP_CONSTEXPR_AFTER_CXX11`
> Well, as I mentioned there are other problems on C++11, namely forward not being constexpr (so even the simple constructors below can't be constant initialized in C++11). I would REALLY like for unique_ptr to be constant initialized even in C++11 mode. I feel like arguably the standard requires it by marking the constructor `constexpr`.
One way to deal with that is to define a call `__forward()` that is the same as `forward()` except that it's constexpr in C++11, and have compressed_pair call that.
Repository:
rL LLVM
https://reviews.llvm.org/D24372
More information about the cfe-commits
mailing list