I need to observer template with my Notification classes. I use this code:
#include <Poco/Notification.h>
#include <Poco/Observer.h>
#include <Util/RegisterObserver.h>
namespace RPC {
class ParseErrorNotify : public Poco::Notification{
public:
ParseErrorNotify();
private:
//std::string m_message;
};
template <class C>
class Observer:public Poco::Observer<C,ParseErrorNotify>{
public:
typedef Poco::Observer<C,ParseErrorNotify> Base;
Observer(C& object, Base::Callback method):Base(object,method){}
};
}
But I have error while compile:
ParseErrorNotify.h:20:35: error: 'Poco::Base::Callback' is not a type
I'm using gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1). It's so strange, because with MSVC2010 on win compile ok.