In copy-list-initialization, if an explicit constructor is chosen, the initialization is ill-formed and the diagnostic should be reported. #92813
Labels
clang:diagnostics
New/improved warning or error message in Clang, but not in clang-tidy or static analyzer
Consider the following testcase (see below).
According to 13.3.1.7 Initialization by list-initialization is C++11 standard
"In copy-list-initialization, if an explicit constructor is chosen, the initialization is ill-formed."
However, clang doesn't report an error.
Clang doesn't report any diagnostic for it.
Microsoft's cl compiler (version 19) complains about it:
Older gcc compiler (gcc 10.2.0) also complains about it:
The text was updated successfully, but these errors were encountered: