public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/47172] New: [C++0x] cannot call member function without object
@ 2011-01-04 21:42 marc.glisse at normalesup dot org
  2011-01-04 22:28 ` [Bug c++/47172] [4.6 Regression] " redi at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-01-04 21:42 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [C++0x] cannot call member function without object
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: marc.glisse@normalesup.org


The following code fails to compile with -std=c++0x, but compiles with c++98 or
if I change the prototype of f to make it return void. It doesn't look like PR
46731.

struct A
{
    int f() const;
};

template <class T>
struct B : A { };

template <class T>
struct C : B<T>
{
    void g();
};

template <class T>
void C<T>::g()
{
    A::f();
}

bug.cpp:18:11: error: cannot call member function 'int A::f() const' without
object


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

end of thread, other threads:[~2011-02-17  6:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-04 21:42 [Bug c++/47172] New: [C++0x] cannot call member function without object marc.glisse at normalesup dot org
2011-01-04 22:28 ` [Bug c++/47172] [4.6 Regression] " redi at gcc dot gnu.org
2011-01-04 22:50 ` hjl.tools at gmail dot com
2011-01-19 20:54 ` jakub at gcc dot gnu.org
2011-02-07 20:16 ` dodji at gcc dot gnu.org
2011-02-09 14:28 ` dodji at gcc dot gnu.org
2011-02-11  7:48 ` dodji at gcc dot gnu.org
2011-02-11 11:09 ` dodji at gcc dot gnu.org
2011-02-11 15:40 ` hjl.tools at gmail dot com
2011-02-11 17:40 ` dodji at gcc dot gnu.org
2011-02-14  8:40 ` ebotcazou at gcc dot gnu.org
2011-02-17  6:52 ` dodji at gcc dot gnu.org
2011-02-17  7:20 ` dodji at gcc dot gnu.org

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