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
Found the Problem....
/* Window Procedure */ ::LRESULT CALLBACK WndProc( ::HWND hWnd, ::UINT message, ::WPARAM wParam, ::LPARAM lParam ) { return WindowProc(hWnd, message, wParam, lParam);
Calling Four paramters here.....
};
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;
CALLBACK calling wrong in class... (removed CALLBACK)
protected: /* Constructor */ Window( ::HINSTANCE hInstance ) : m_Window(NULL) { m_Connection = WindowProc.connect( boost::bind( &Window::WndProc, this, _1, _2, _3
Missing ,_4 since I am calling ::HWND, ::UINT, ::WPARAM, ::LPARAM
) ); m_Instance = hInstance;//Might need some work... }; /* Varibles */ static ::HINSTANCE m_Instance; ::HWND m_Window; boost::signals::connection m_Connection;
};
On 2010/03/02 09:37 AM, Rutger ter Borg wrote:
Etienne Pretorius wrote:
I have tried enabling WIN_API for boost and also trying to turn the pure virtual method into a method... still no luck.
Aren't you missing argument _4?
Cheers,
Rutger
Thank you. It compiles now.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Etienne Pretorius
-
Rutger ter Borg