[libcxx-commits] [libcxx] [libc++] LWG 3821 uses_allocator_construction_args should have overload for pair-like (PR #66939)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 27 09:17:18 PDT 2023


================
@@ -284,7 +284,8 @@ struct _LIBCPP_TEMPLATE_VIS pair
     }
 
     template <__pair_like _PairLike>
-      requires(is_constructible_v<first_type, decltype(std::get<0>(std::declval<_PairLike&&>()))> &&
+      requires(!__is_specialization_of_subrange<remove_cvref_t<_PairLike>>::value &&
----------------
ldionne wrote:

I think this is fine, but I would then move the tests that checked for `pair(subrange)` from `pair/ctor.pair-like.pass.cpp` to the subrange tests for `operator pair-like`. Does that make sense?

https://github.com/llvm/llvm-project/pull/66939


More information about the libcxx-commits mailing list