public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42328]  New: rejects valid friend
@ 2009-12-07 23:04 igodard at pacbell dot net
  2009-12-07 23:14 ` [Bug c++/42328] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: igodard at pacbell dot net @ 2009-12-07 23:04 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 823 bytes --]

This code:

template<typename T, typename U>
class   freeList {
public:
    void foo() {};
    };

class   bar {};

class   baz : protected freeList<bar, baz> {
template<typename T>
friend
void    freeList<T, baz>::foo();
    };
int main() {
    baz b;
    return 0;
    }

gets you:

s3:~/ootbc/personal/ivan$ g++ foo.cc
foo.cc:12: error: member ‘void freeList<T, baz>::foo()’ declared as friend
before type ‘freeList<T, baz>’ defined

FWIW, Comeau accepts it.


-- 
           Summary: rejects valid friend
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-03-28 10:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-42328-4@http.gcc.gnu.org/bugzilla/>
2015-03-27 18:22 ` [Bug c++/42328] rejects valid friend paolo.carlini at oracle dot com
2015-03-27 19:32 ` richard-gccbugzilla at metafoo dot co.uk
2015-03-27 20:33 ` paolo.carlini at oracle dot com
2015-03-28 12:35 ` paolo at gcc dot gnu.org
2015-03-28 12:56 ` paolo.carlini at oracle dot com
2009-12-07 23:04 [Bug c++/42328] New: " igodard at pacbell dot net
2009-12-07 23:14 ` [Bug c++/42328] " pinskia at gcc dot gnu dot org
2009-12-07 23:35 ` paolo dot carlini at oracle dot com
2009-12-08  2:16 ` igodard at pacbell dot net
2009-12-08  9:57 ` redi at gcc dot gnu dot org
2009-12-08 15:20 ` igodard at pacbell dot net

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).