Subscribing to an event compile error
Posted: Mon Jan 12, 2009 15:37
I am unable to subscribe to an event using template member function.
Generates
Generates
I have had a look at similar errors found with a search in the forum, but none are related to template member functions. I am sure this is not an error on my behalf, can someone confirm if this is a limitation of the library, a bug or a compiler bug.
Using visual studio 2005 sp1.
Thanks
Code: Select all
w->subscribeEvent( PushButton::EventClicked, Event::Subscriber( &Options_gui::activate<GRAPHICS>, this ) );
Generates
Error 3 error C2661: 'CEGUI::SubscriberSlot::SubscriberSlot' : no overloaded function takes 2 arguments
Code: Select all
w->subscribeEvent( PushButton::EventClicked, Event::Subscriber( MemberFunctionSlot<Options_gui>( &Options_gui::activate<GRAPHICS>, this ) ) );
Generates
error C2665: 'CEGUI::MemberFunctionSlot<T>::MemberFunctionSlot' : none of the 2 overloads could convert all the argument types
with
[
T=LVD::Options_gui
]
g:\projects\devjau_lvd_svn\branches\wip\dependencies\cegui-0.6.1_lvd\include\ceguimemberfunctionslot.h(48): could be 'CEGUI::MemberFunctionSlot<T>::MemberFunctionSlot(bool (__thiscall LVD::Options_gui::* )(const CEGUI::EventArgs &),T *)'
with
[
T=LVD::Options_gui
]
while trying to match the argument list '(overloaded-function, LVD::Options_gui *const )'
I have had a look at similar errors found with a search in the forum, but none are related to template member functions. I am sure this is not an error on my behalf, can someone confirm if this is a limitation of the library, a bug or a compiler bug.
Using visual studio 2005 sp1.
Thanks