boost::bind issues
Hello all:
I'm trying to boost::bind a couple of callbacks and was getting errors;
could someone help me figure out what's going on?
First, the errors:
19:22:36: Compiling staticObject.cpp.
staticObject.cpp: In constructor ‘StaticObject::StaticObject()’:
staticObject.cpp:20:143: error: no matching function for call to
‘OlcStringEntry::OlcStringEntry(std::string, int,
boost::_bi::bind_t
OlcStringEntry(const std::string &name, FLAG flag, StringGetter& get, StringSetter& set);
Do you really want to pass getter/setter by (non-const) reference? If so, you can't pass binders, you should first create boost::function objects and pass them: StringGetter getter = bind(&BaseObject::GetName, this); OlcStringEntry(..., getter,...); Of course, pay attention to the getter/setter objects lifetime.
participants (2)
-
Igor R
-
Littlefield, Tyler