[libcxx-commits] [libcxx] [libc++] LWG 3821 uses_allocator_construction_args should have overload for pair-like (PR #66939)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Oct 1 14:31:26 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 &&
----------------
huixie90 wrote:
Actually I found an example where without the fix, it is ambiguous between `pair`'s constructor and `subranges`' `operator Pairlike`.
https://godbolt.org/z/fefaEzz9M
https://github.com/llvm/llvm-project/pull/66939
More information about the libcxx-commits
mailing list