c++ - intel compiler error: no instance of overloaded function boost::put() -
i using intel compiler 13.0.1 , boost 1.52 following error when use boost::get() , boost::put()
i use boost::adjacency_list<> graph type. properties assigned vertices. get() , put() functions fetch properties using boost::property_map <> interface. use custom properties define own struct property storage , corresponding tag property
//g --> graph_t type //vd --> vertex //p --> property fetched graph object vertex vd (used auto c++11) // auto p = boost::get(propertytag(), g, vd); //fetch property using put. modify p (do anything) boost::put(propertytag(), g, vd, p) // update property using put when compile intel compiler, following error:
error: no instance of overloaded function "boost::put" matches argument list argument types are: (propertytag, graph_t, const size_t, nodeinfo) boost::put(propertytag(), g, vd, p); ^ detected during: instantiation of ... note error comes boost::put() , not boost::get() .
these get() , put() inside function modify_properties(). function used function object my_functor(...). use boost::bind() functor , function used inside it.
template <typename graph_t> struct my_functor { public: my_functor() { } my_functor(graph_t& g_) : g(g_) { } template<typename vertex> void operator()(vertex vd) { modify_properties(vd); } private: graph_t& g; } auto f = boost::bind(my_functor<graph_t>(g), _1) //placeholder vertex_descriptor //call "f" on vertex f (vd) //goes functor vd placeholder, calls modify_property(vd), calls boost::get() , boost::put().. does have function unwrapping using boost::bind ? know intel 13.0 version not capable of handling std::bind (c++11) well. use boost bind. or boost::bind not allow modify thing (const-ness) because boost::get() works fine. boost::put() trouble
Comments
Post a Comment