[libcxx-commits] [PATCH] D65161: [libc++] Implement LWG 2510

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 19 09:37:09 PDT 2019


zoecarver added inline comments.


================
Comment at: libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.fail.cpp:10
 // <memory>
 
+// struct allocator_arg_t { explicit allocator_arg_t() = default; };
----------------
ldionne wrote:
> zoecarver wrote:
> > `// UNSUPPORTED: c++98, c++03`
> I think we should do our best to support this test (and the similar ones below) in C++03, since this is a DR.
That's probably a good idea. See my comment below. There are a few other tests, maybe we should update/enable those too? 


================
Comment at: libcxx/test/std/utilities/memory/allocator.tag/allocator_arg.fail.cpp:19
 
-int main(int, char**)
-{
-    test(std::allocator_arg);
+std::allocator_arg_t f() { return {}; } // expected-error 1 {{chosen constructor is explicit in copy-initialization}}
 
----------------
If we are keeping this test we should update this function to `return std:: allocator_arg_t ()`. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65161/new/

https://reviews.llvm.org/D65161





More information about the libcxx-commits mailing list