Jump to content
  • Advertisement
Sign in to follow this  
Eniak19

Problem about the STL and Boost Graph

This topic is 4011 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

there are some problem about the STL and Boost Graph.Is there any one familer with both of them? in my code,i worte main(){ typedef std::pair<int, int> Edge; //some thing unhappy broke out there typedef std::pair<MotionClip,MotionClip> Edge; //some thing unhappy broke out there Edge e[] = {Edge(A,B),Edge(B,A)}; //A or B are the MotionClip or int,which is up to above typedef adjacency_list<> Graph; Graph g(2); add_edge(e[0].first,e[0].second,g); add_edge(e[1].first,e[1].second,g); } if i use the typedef std::pair<int, int> Edge , as will as the Boost Example told me,nothing wrong here.But if i use the typedef std::pair<MotionClip,MotionClip> Edge, MotionClip is a class which i used,the net told me the error below,so what should i do now? error C2665: 'boost::add_edge' : none of the 2 overloads could convert all the argument types d:\program files\microsoft visual studio 8\vc\include\boost\graph\detail\adjacency_list.hpp(674): could be 'std::pair<_Ty1,_Ty2> boost::add_edge<boost::detail::adj_list_gen<Graph,VertexListS,OutEdgeListS,DirectedS,VertexProperty,EdgeProperty,GraphProperty,EdgeListS>::config>(__w64 unsigned int,__w64 unsigned int,boost::directed_graph_helper<Config> &)' with [ _Ty1=boost::detail::edge_desc_impl<boost::directed_tag,__w64 unsigned int>, _Ty2=bool, Graph=boost::adjacency_list<>, VertexListS=boost::vecS, OutEdgeListS=boost::vecS, DirectedS=boost::directedS, VertexProperty=boost::detail::retag_property_list<boost::vertex_bundle_t,boost::no_property>::type, EdgeProperty=boost::detail::retag_property_list<boost::edge_bundle_t,boost::no_property>::type, GraphProperty=boost::no_property, EdgeListS=boost::listS, Config=boost::detail::adj_list_gen<boost::adjacency_list<>,boost::vecS,boost::vecS,boost::directedS,boost::detail::retag_property_list<boost::vertex_bundle_t,boost::no_property>::type,boost::detail::retag_property_list<boost::edge_bundle_t,boost::no_property>::type,boost::no_property,boost::listS>::config ] d:\program files\microsoft visual studio 8\vc\include\boost\graph\detail\adjacency_list.hpp(2112): or 'std::pair<_Ty1,_Ty2> boost::add_edge<Graph,boost::detail::adj_list_gen<Graph,VertexListS,OutEdgeListS,DirectedS,VertexProperty,EdgeProperty,GraphProperty,EdgeListS>::config,boost::directed_graph_helper<Config>>(__w64 unsigned int,__w64 unsigned int,boost::vec_adj_list_impl<Graph,Config,Base> &)' with [ _Ty1=boost::detail::edge_desc_impl<boost::directed_tag,__w64 unsigned int>, _Ty2=bool, Graph=boost::adjacency_list<>, VertexListS=boost::vecS, OutEdgeListS=boost::vecS, DirectedS=boost::directedS, VertexProperty=boost::detail::retag_property_list<boost::vertex_bundle_t,boost::no_property>::type, EdgeProperty=boost::detail::retag_property_list<boost::edge_bundle_t,boost::no_property>::type, GraphProperty=boost::no_property, EdgeListS=boost::listS, Config=boost::detail::adj_list_gen<boost::adjacency_list<>,boost::vecS,boost::vecS,boost::directedS,boost::detail::retag_property_list<boost::vertex_bundle_t,boost::no_property>::type,boost::detail::retag_property_list<boost::edge_bundle_t,boost::no_property>::type,boost::no_property,boost::listS>::config, Base=boost::directed_graph_helper<boost::detail::adj_list_gen<boost::adjacency_list<>,boost::vecS,boost::vecS,boost::directedS,boost::detail::retag_property_list<boost::vertex_bundle_t,boost::no_property>::type,boost::detail::retag_property_list<boost::edge_bundle_t,boost::no_property>::type,boost::no_property,boost::listS>::config> ] while trying to match the argument list '(MotionClip, MotionClip, Graph)'

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!