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/
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=(
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
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.
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.
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
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
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
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
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
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
__
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
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
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
14 matches
Mail list logo