[Bug c++/45606] New: match a method prototyped a typedef alias with the original type (using stdlib)

2010-09-08 Thread hugo dot arregui at gmail dot com
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



[Bug c++/45606] match a method prototyped a typedef alias with the original type (using stdlib)

2010-09-08 Thread hugo dot arregui at gmail dot com


--- Comment #1 from hugo dot arregui at gmail dot com  2010-09-09 02:28 
---
Created an attachment (id=21745)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21745&action=view)
ii file


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45606