This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28317] template function returning nested class fails to compile when defined outside of its class
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jul 2006 18:20:10 -0000
- Subject: [Bug c++/28317] template function returning nested class fails to compile when defined outside of its class
- References: <bug-28317-5724@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rguenth at gcc dot gnu dot org 2006-07-08 18:20 -------
You are missing a 'typename'. Inner is a dependent type, so it needs to read
template <typename T>
typename Outer<T>::Inner
Outer<T>::get() const
{
return Inner();
}
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28317