------- Comment #2 from redi at gcc dot gnu dot org 2009-12-04 09:48 ------- SMART<A> a();
This does not declare an object of type SMART<A>, it declares a function called 'a' which returns SMART<A> You need to change that to: SMART<A> a; or SMART<A> a = SMART<A>(); -- redi at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42272