This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/10118: Conversion of ptrmem to derived class in template arg fails
- From: bangerth at dealii dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, philippeb at videotron dot ca
- Date: 18 Mar 2003 00:26:07 -0000
- Subject: Re: c++/10118: Conversion of ptrmem to derived class in template arg fails
- Reply-to: bangerth at dealii dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, philippeb at videotron dot ca, gcc-gnats at gcc dot gnu dot org
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