This used to work fine with g++-3.*
$ cat test.cc
struct o {};
template <typename T>
struct test
{
int m(int (o::*recv)(T&) = &o::operator());
};
$ g++ test.cc
test.cc:6: internal compiler error: in cp_lexer_peek_nth_token, at
cp/parser.c:500
Please submit a full bug report,
with preprocessed source if appropriate.
--
Summary: parse error with class operator as default argument
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bitmap at pan dot homelinux dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: Configured with: ../src/configure -v --enable-
languages=c,c++,ja
GCC host triplet: g++ (GCC) 4.1.0 20050607 (experimental)
GCC target triplet: Target: i486-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22535