https://bugs.llvm.org/show_bug.cgi?id=50559
Bug ID: 50559
Summary: Wrong initialization performed with empty initializer
list
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
Given code below:
```
struct S {
S(std::initializer_list<double>); // #1
S(std::initializer_list<int>); // #2
S(); // #3
// ...
};
int main() {
S s1 = {}; // invoked #3
s1 = {}; // should invoke #3 again, but tries to invoke #1 or #2 and call is
ambigious.
}
```
Code is tried to be miscompiled, `s1` should be value initialized due to empty
initializer list assignment.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs