[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 21 10:26:51 PST 2024
yxsamliu wrote:
The issue above seems to be a clang bug to me according to https://cplusplus.github.io/CWG/issues/1467.html
List-initialization of an object or reference of type T is defined as follows:
If T is a class type and the initializer list has a single element of type cv T or a class type derived from T, the object is initialized from that element.
Therefore `b` should be initialized from `a` instead of `A(a)`.
https://github.com/llvm/llvm-project/pull/77768
More information about the cfe-commits
mailing list