I cannot reproduce the error without std.
I wrote an small testcase, wich one I include to make clear the situation.
The code:
#include
template
class Test
{
protected:
typedef std::list ListAlias;
ListAlias list;
public:
typedef typename ListAlias::const_iterator const_iterator;
inline const_iterator begin() const;
};
template
inline typename std::list::const_iterator Test::begin() const
{
return list.begin();
};
The error:
test.cpp:16:46: error: prototype for 'typename std::list::const_iterator
Test::begin() const' does not match any in class 'Test'
test.cpp:11:31: error: candidate is: Test::const_iterator Test::begin()
const
The ii file is really long with the include header, and I think that the
testcase is small.
--
Summary: match a method prototyped a typedef alias with the
original type (using stdlib)
Product: gcc
Version: 4.5.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hugo dot arregui at gmail dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45606