[libcxx-commits] [libcxx] [clang] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 24 04:50:34 PST 2024


alexfh wrote:

We've started seeing `call to constructor of 'SomeType' is ambiguous` errors after this patch on some code. In the case I closely inspected the code looks like https://gcc.godbolt.org/z/3MbWf69cx:

```
#include <vector>
struct A {
    A() {}
};

struct B {
    explicit B(A);
    explicit B(std::vector<A>);
};

struct C {
    B b;
    C() : b({A()}) {}
};
```

Is the new error expected? (I would totally agree with it, just making sure. And the behavior is now different to that of GCC trunk.)

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


More information about the libcxx-commits mailing list