http://llvm.org/bugs/show_bug.cgi?id=21493

            Bug ID: 21493
           Summary: Compilation error when initializing in an agreggate
                    containing a deleted copy constructor using
                    initializer list from  a template function
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

This valid code:

struct X  { X(int);  X(const X&) = delete; };
struct A { X v; };
template <typename T> void id() { A s{ {0 } }; }
int main() { id<A>(); }

does not compile:

test.cc:3:43: error: call to deleted constructor of 'X'
template <typename T> void id() {  A s  { {0 }  }; }
                                          ^~~~
test.cc:4:14: note: in instantiation of function template specialization
'id<A>' requested here
int main() { id<A>(); }
             ^
test.cc:1:22: note: 'X' has been explicitly marked deleted here
struct X  { X(int);  X(const X&) = delete; };

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to