[llvm-bugs] [Bug 24855] New: List initialization of class T with a T results in error
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Sep 16 20:15:20 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24855
Bug ID: 24855
Summary: List initialization of class T with a T results in
error
Product: clang
Version: 3.6
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++14
Assignee: unassignedclangbugs at nondot.org
Reporter: tayabajonotaki at hotmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
struct A {
int i {};
bool b {};
};
int main() {
A a;
A a2 {a};
}
I expect the previous piece of code to compile and initialize a2 to be
initialized by the default-generated copy constructor. Instead, it results in
an error:
error: no viable conversion from 'A' to 'int'
A a2 {a};
^
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150917/e9181d13/attachment.html>
More information about the llvm-bugs
mailing list