[libcxx-commits] [PATCH] D119958: Remove __uncvref; use __uncvref_t instead
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 17 12:08:32 PST 2022
Quuxplusone accepted this revision.
Quuxplusone added a comment.
This revision is now accepted and ready to land.
LGTM mod comments if the CI is green; but please wait for CI to be green, requesting re-review if something new crops up.
================
Comment at: libcxx/test/std/thread/futures/futures.task/futures.task.members/ctor2.compile.pass.cpp:28
- return 0;
-}
+static_assert(!std::is_constructible<PT, std::allocator_arg_t, test_allocator<A>, VPT>::value, "");
----------------
Please expand this test to something like
https://godbolt.org/z/4n9c8cTK7
```
struct A { A(int); };
using PA = std::packaged_task<A(int)>;
using PI = std::packaged_task<int(int)>;
static_assert(!std::is_constructible<PA, std::allocator_arg_t, std::allocator<A>, const PA&>::value, "");
static_assert(!std::is_constructible<PA, std::allocator_arg_t, std::allocator<A>, const PA&&>::value, "");
static_assert(!std::is_constructible<PA, std::allocator_arg_t, std::allocator<A>, volatile PA&>::value, "");
static_assert(!std::is_constructible<PA, std::allocator_arg_t, std::allocator<A>, volatile PA&&>::value, "");
static_assert( std::is_constructible<PA, std::allocator_arg_t, std::allocator<A>, const PI&>::value, "");
static_assert( std::is_constructible<PA, std::allocator_arg_t, std::allocator<A>, const PI&&>::value, "");
static_assert( std::is_constructible<PA, std::allocator_arg_t, std::allocator<A>, volatile PI&>::value, "");
static_assert( std::is_constructible<PA, std::allocator_arg_t, std::allocator<A>, volatile PI&&>::value, "");
```
However, cppreference/GCC/MSVC all agree that this ctor was removed entirely in C++17, so we've got a bug here. I've filed it as https://github.com/llvm/llvm-project/issues/53912 — feel free to take a look if it piques your interest. As I said over there, whoever takes it on should dig up the original paper that removed this ctor, because this might be just the tip of the iceberg.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119958/new/
https://reviews.llvm.org/D119958
More information about the libcxx-commits
mailing list