[luabind] pass by ref, no matching overload found
Brought to you by:
arvidn,
daniel_wallin
From: Сергей В. <iva...@gm...> - 2015-03-31 21:33:22
|
I want to pass parameters in method by reference. class Node : public EventReceiver { public: virtual void setTag ( const std::string& name, const std::string& value ) ... }; And this is luabind code to expose Node to lua: class_<Node, EventReceiver> ( "Node" ) .def ( constructor<> () ) .def ( "setTag", &Node::setTag ) ... I want to set tag for node from lua script: node = scene:find ( "NewGameButton" ) node:setTag ( "scale", value ) I get luabind error: No matching overload found, candidates: void setTag(Node&,std::string const&,std::string const&) But this line works fine node:setTag ( "scale", "str_value" ) How to get setTag working in both cases? |