This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/55576] Fails to compile a call to template member function


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55576

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-12-03 16:00:35 UTC ---
I don't think this is a G++ bug, there are three problems with this code:

1) You need to #include <new> to use placement new
2) factory::apply is non-const but the parameter 'f' is const
3) f.template apply<T> finds the current instantiation, ::apply<T>, rather than
the member function you are trying to call, use f.FactoryT::template apply<T>
instead


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]