http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48507
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-04-07 22:21:42 UTC --- This is invalid C++03 and C++98. The reason is that sub_pred is a local class which is not a valid template argument type. C++0x allows this though. So compiling with -std=c++0x and it works.