[libcxx-commits] [libcxx] [libc++] Fix ambiguity when using std::scoped_allocator constructor (PR #80261)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Feb 5 08:40:25 PST 2024
================
@@ -104,13 +104,20 @@ int main(int, char**) {
assert(a.outer_allocator() == A1<int>(4));
assert((a.inner_allocator() == std::scoped_allocator_adaptor<A2<int>, A3<int>>(A2<int>(5), A3<int>(6))));
}
- // Test for LWG2782
{
+ // Test for LWG2782
static_assert(!std::is_convertible<A1<int>, A2<int>>::value, "");
static_assert(
!std::is_convertible< std::scoped_allocator_adaptor<A1<int>>, std::scoped_allocator_adaptor<A2<int>>>::value,
"");
}
+ {
+ // Test construction from convertible-to-allocator types
----------------
ldionne wrote:
```suggestion
// Test construction from convertible-to-allocator types (https://github.com/llvm/llvm-project/issues/78754)
```
https://github.com/llvm/llvm-project/pull/80261
More information about the libcxx-commits
mailing list