[libcxx-commits] [PATCH] D63050: Test that correct value category is used in scoped_allocator_adaptor::construct

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jun 8 10:29:00 PDT 2019


zoecarver added a comment.

For the pair section of the issue, I ran into a few problems. The genesis of the problem is the fact that this compiles (and I can't figure out why):

  struct Foo
  {
  	typedef std::allocator<Foo> allocator_type;
  	
  	Foo(std::allocator_arg_t, allocator_type&&) { }
  	Foo(allocator_type&) { }
  };
  
  int main()
  {
  	using Alloc1 = std::allocator<pair<Foo, Foo>>;
  	using Alloc2 = std::allocator<Foo>;
  	static_assert( std::is_constructible<Foo, std::allocator_arg_t, Alloc1&>::value);
  	static_assert(!std::is_constructible<Foo, std::allocator_arg_t, Alloc2&>::value);
  }


Repository:
  rCXX libc++

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

https://reviews.llvm.org/D63050





More information about the libcxx-commits mailing list