This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19076] Pointer to member function not matched
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Dec 2004 20:01:57 -0000
- Subject: [Bug c++/19076] Pointer to member function not matched
- References: <20041219095715.19076.pcarlini@suse.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-12-19 20:01 -------
Why not the minimal testcase:
---------------------
template <typename> struct X;
template<typename _Tp, typename _Cp> struct X<_Tp _Cp::*> {};
typedef int F();
struct S { F f; };
typedef F S::*PMF;
X<PMF> s;
--------------------
g/x> c++ -c x.cc
x.cc:9: error: aggregate `X<int (S::*)()> s' has incomplete type and cannot be
defined
x.cc:9: error: storage size of `s' isn't known
g/x> icc -c x.cc
The problem is really that F is a reference to a function. If we define
the typedef as
typedef int F;
then everything is fine.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19076