Re: [PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-27 Thread Keno Fischer via cfe-commits
loladiro updated this revision to Diff 72712. loladiro added a comment. Some extra _AFTER_CXX11 that may be necessary - please double check me here, C++11 constexpr rules are not exactly my specialty ;). Repository: rL LLVM https://reviews.llvm.org/D24372 Files: include/memory test/std/

Re: [PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-27 Thread Keno Fischer via cfe-commits
loladiro added a comment. Before I commit this, I just realized __libcpp_compressed_pair_imp& operator=(const __libcpp_compressed_pair_imp& __p) _NOEXCEPT_(is_nothrow_copy_assignable<_T1>::value && is_nothrow_copy_assignable<_T2>::value) { _T1::operator=(

Re: [PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-27 Thread Marshall Clow via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. This looks good to me. I appreciate the cleverness in the tests. Repository: rL LLVM https://reviews.llvm.org/D24372 ___ cfe-commit

Re: [PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-26 Thread Keno Fischer via cfe-commits
loladiro updated this revision to Diff 72581. loladiro added a comment. back to _VSTD::forward, address review comments, add tests for non-empty deleter and unique_ptrs of arrays. Repository: rL LLVM https://reviews.llvm.org/D24372 Files: include/memory test/std/utilities/memory/unique.

Re: [PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-26 Thread Eric Fiselier via cfe-commits
EricWF added a comment. FYI `std::move` and `std::forward` are now constexpr in C++11. There is no need to use `__forward`. Repository: rL LLVM https://reviews.llvm.org/D24372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

Re: [PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-15 Thread Eric Fiselier via cfe-commits
EricWF added a comment. Thanks for working on this. That static initialization bug is ugly. My only concern with this patch is that adding `constexpr` to unconstrained constructors is going to result compile errors caused by Clang's eager instantiation. Also, unlike @mclow.lists, I think we sh

Re: [PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-15 Thread Keno Fischer via cfe-commits
loladiro updated this revision to Diff 71528. loladiro added a comment. Add private copy of forward (__forward) that is constexpr even in C++11 mode, use test suggested by @rsmith Repository: rL LLVM https://reviews.llvm.org/D24372 Files: include/memory test/std/utilities/memory/unique

Re: [PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-14 Thread Eric Fiselier via cfe-commits
static_cast(t) also works as a constexpr C++11 forward. On Sep 13, 2016 4:07 PM, "Keno Fischer" wrote: > loladiro added inline comments. > > > Comment at: include/memory:2137 > @@ -2132,3 +2136,3 @@ > > -_LIBCPP_INLINE_VISIBILITY > +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONS

Re: [PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-13 Thread Keno Fischer via cfe-commits
loladiro 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) mclow.lists wro

Re: [PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-13 Thread Marshall Clow via cfe-commits
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 wro

Re: [PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-13 Thread Keno Fischer via cfe-commits
loladiro added a comment. Small bump here. Is it possible to rewrite these without std::forward, so we can have the const-initialization behavior on C++11 (or is there are different solution?). Repository: rL LLVM https://reviews.llvm.org/D24372 __

Re: [PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-09 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: test/std/utilities/memory/unique.ptr/unique.ptr.runtime/unique.ptr.runtime.ctor/constinit.pass.cpp:19-23 @@ +18,6 @@ + +_LIBCPP_SAFE_STATIC static std::unique_ptr a; + +int main() { +assert(a == nullptr); +} This

Re: [PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-09 Thread Marshall Clow via cfe-commits
mclow.lists added a comment. This all looks good to me - but with a couple nits. Comment at: include/memory:2137 @@ -2132,3 +2136,3 @@ -_LIBCPP_INLINE_VISIBILITY +_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR __libcpp_compressed_pair_imp& operator=(__libcpp_compress

Re: [PATCH] D24372: [libcxx] Sprinkle constexpr over compressed_pair

2016-09-08 Thread Eric Fiselier via cfe-commits
I believe mclow is working on this On Sep 8, 2016 9:30 PM, "Keno Fischer" wrote: > loladiro created this revision. > loladiro added reviewers: EricWF, mclow.lists. > loladiro added a subscriber: cfe-commits. > loladiro set the repository for this revision to rL LLVM. > > Without this, unique_ptr