
Hello List, I am trying to use boost::signals with boost bind... but I always get this compiler error: 1>c:\program files\boost\boost_1_42\boost\bind\bind.hpp(69) : error C2825: 'F': must be a class or namespace when followed by '::' 1> c:\program files\boost\boost_1_42\boost\bind\bind_template.hpp(15) : see reference to class template instantiation 'boost::_bi::result_traits<R,F>' being compiled 1> with 1> [ 1> R=boost::_bi::unspecified, 1> F=__w64 long (__stdcall ticketman::Window::* )(UINT,WPARAM,LPARAM) 1> ] I am unable to make sence of it... /*CODE*/ /* boost::signal masqurading as a Window Procedure */ static boost::signal<::LRESULT (::HWND,::UINT,::WPARAM,::LPARAM)> WindowProc; /* Window Procedure */ ::LRESULT CALLBACK WndProc( ::HWND hWnd, ::UINT message, ::WPARAM wParam, ::LPARAM lParam ) { return WindowProc(hWnd, message, wParam, lParam); }; class Window : public boost::noncopyable { public: /* Deconstructor */ ~Window( ) { WindowProc.disconnect(m_Connection); }; private: friend ::LRESULT CALLBACK WndProc(::HWND, ::UINT, ::WPARAM, ::LPARAM); virtual ::LRESULT CALLBACK WndProc(::UINT, ::WPARAM, ::LPARAM) = 0; protected: /* Constructor */ Window( ::HINSTANCE hInstance ) : m_Window(NULL) { m_Connection = WindowProc.connect( boost::bind( &Window::WndProc, this, _1, _2, _3 ) ); m_Instance = hInstance;//Might need some work... }; /* Varibles */ static ::HINSTANCE m_Instance; ::HWND m_Window; boost::signals::connection m_Connection; }; I have tried enabling WIN_API for boost and also trying to turn the pure virtual method into a method... still no luck. Thank you, Etienne
participants (2)
-
Etienne Pretorius
-
Rutger ter Borg