<div dir="ltr"><p dir="ltr">static_cast<T&&>(t) also works as a constexpr C++11 forward.</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Sep 13, 2016 4:07 PM, "Keno Fischer" <<a href="mailto:kfischer@college.harvard.edu" target="_blank">kfischer@college.harvard.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">loladiro added inline comments.<br>
<br>
================<br>
Comment at: include/memory:2137<br>
@@ -2132,3 +2136,3 @@<br>
<br>
-    _LIBCPP_INLINE_VISIBILITY<br>
+    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR<br>
     __libcpp_compressed_pair_imp& operator=(__libcpp_compressed_<wbr>pair_imp&& __p)<br>
----------------<br>
mclow.lists wrote:<br>
> loladiro wrote:<br>
> > mclow.lists wrote:<br>
> > > Have you tested this on C++11?<br>
> > > I suspect that some of these need to be `_LIBCPP_CONSTEXPR_AFTER_CXX11<wbr>`<br>
> > 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`.<br>
> 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.<br>
><br>
I was worried that something in the definition of forward required C++14 constexpr semantics? Is that not the case. If so this sounds like a good solution, and I can update the patch accordingly.<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D24372" rel="noreferrer" target="_blank">https://reviews.llvm.org/D2437<wbr>2</a><br>
<br>
<br>
<br>
</blockquote></div></div>
</div>