public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/45606]  New: match a method prototyped a typedef alias with the original type (using stdlib)
@ 2010-09-09  2:28 hugo dot arregui at gmail dot com
  2010-09-09  2:28 ` [Bug c++/45606] " hugo dot arregui at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: hugo dot arregui at gmail dot com @ 2010-09-09  2:28 UTC (permalink / raw)
  To: gcc-bugs

I cannot reproduce the error without std.

I wrote an small testcase, wich one I include to make clear the situation.

The code:

#include <list>

template<class T>
class Test
{
    protected:
        typedef std::list<T> ListAlias;
        ListAlias list;
    public:
        typedef typename ListAlias::const_iterator const_iterator;
        inline const_iterator begin() const;

};

template<class T>
inline typename std::list<T>::const_iterator Test<T>::begin() const
{
    return list.begin();
};

The error:

test.cpp:16:46: error: prototype for 'typename std::list<T>::const_iterator
Test<T>::begin() const' does not match any in class 'Test<T>'
test.cpp:11:31: error: candidate is: Test<T>::const_iterator Test<T>::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


^ permalink raw reply	[flat|nested] 13+ messages in thread
[parent not found: <bug-45606-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2011-02-27 22:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-09  2:28 [Bug c++/45606] New: match a method prototyped a typedef alias with the original type (using stdlib) hugo dot arregui at gmail dot com
2010-09-09  2:28 ` [Bug c++/45606] " hugo dot arregui at gmail dot com
2010-09-09 16:32 ` [Bug c++/45606] [4.5/4.6 Regresssion] " redi at gcc dot gnu dot org
2010-09-09 16:56 ` paolo dot carlini at oracle dot com
2010-09-09 18:23 ` [Bug c++/45606] [4.5/4.6 Regression] " hjl dot tools at gmail dot com
2010-09-10 13:25 ` rguenth at gcc dot gnu dot org
2010-09-10 20:07 ` dodji at gcc dot gnu dot org
2010-09-13 15:56 ` rguenth at gcc dot gnu dot org
2010-09-19 20:33 ` dodji at gcc dot gnu dot org
     [not found] <bug-45606-4@http.gcc.gnu.org/bugzilla/>
2010-11-02 12:44 ` dodji at gcc dot gnu.org
2010-11-02 13:04 ` dodji at gcc dot gnu.org
2010-12-16 13:07 ` rguenth at gcc dot gnu.org
2011-02-27 23:13 ` bangerth at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).