This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/10118: Conversion of ptrmem to derived class in template arg fails


Old Synopsis: Convertion of pointer to member function to derived class at compile time
New Synopsis: Conversion of ptrmem to derived class in template arg fails

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Tue Mar 18 00:26:06 2003
State-Changed-Why:
    Confirmed:
    -------------------------
    struct A { void foo(); };
    struct B : A {};
    typedef void (B::*B_ptr) ();
    
    template <class T, void (T::* U)()>  struct CT {};
    
    CT<B, (B_ptr) &A::foo>  c;
    --------------------------
    
    g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
    x.cc:8: error: `{A::foo(), 0}' is not a valid template argument
    x.cc:8: error: it must be a pointer-to-member of the form `&X::Y'
    x.cc:8: error: expected constructor, destructor, or type conversion
    
    This never compiled from 2.95 to present mainline.
    
    W.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10118


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]