http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56889
Daniel Krügler <daniel.kruegler at googlemail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.kruegler at | |googlemail dot com --- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2013-04-09 09:10:52 UTC --- There are several problems in your example: 1) You have not declared a default constructor in template Stack, but you have provided user-declared constructors (The deleted ones). This has the effect that the Stack template has a no implicitly declared default constructor, which again has the effect that the initializer-list constructor generated by the compiler in vector_stack is deleted, because it would implicitly call the missing default constructor of Stack. Solution: Add a (defaulted) default constructor to the Stack template. 2) The clone function in vector_stack would call the copy constructor of that type. But this one is deleted, because the Stack template has an explicitly deleted copy constructor. This is a design error.