This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/42272] derived template default argument
- From: "redi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Dec 2009 09:48:56 -0000
- Subject: [Bug c++/42272] derived template default argument
- References: <bug-42272-18525@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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