------- Comment #3 from reichelt at gcc dot gnu dot org 2008-12-28 23:43 ------- Simpler testcase:
=============================== struct A { template<typename T> A(T); }; struct B { void foo(); }; A a = B().*(&B::foo); =============================== This is invalid use of a bound non-static member function. You have to call the function: (B().*(&B::foo))() This has nothing to do with C++0x. The bug is related to PR26496 which fixed a similar case long ago. The code ICEs since GCC 3.4.0 and was wrongly accepted before. -- reichelt at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |reichelt at gcc dot gnu dot | |org Keywords| |ice-on-invalid-code, | |monitored Summary|[C++0x] ICE when abusing |[4.2/4.3/4.4 regression] ICE |std::function |with invalid use of bound | |member function Target Milestone|--- |4.2.5 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38228