I use boost 1.46.1
The full error code is too long, so I did not put it. It looks like color
map needs to know the number of vertices (so expecting a vector):
The full error message is here
------ Build started: Project: implicit_astar, Configuration: Debug Win32
------
1> implicit_astar_test1.cpp
1>c:\program files
(x86)\boost\boost_1_46_1\boost\property_map\property_map.hpp(361): error
C2106: '=' : left operand must be l-value
1> c:\program files
(x86)\boost\boost_1_46_1\boost\graph\breadth_first_search.hpp(72) : see
reference to function template instantiation 'void
boost::put,Vertex,unsigned
int,boost::default_color_type>(const
boost::put_get_helper &,K,const V &)' being
compiled
1> with
1> [
1>
Property=boost::property>>>>>,
1> Vertex=unsigned int,
1> Reference=unsigned int,
1>
LvaluePropertyMap=boost::vec_adj_list_vertex_id_map>>>>>,unsigned int>,
1> K=unsigned int,
1> V=boost::default_color_type
1> ]
1> c:\program files
(x86)\boost\boost_1_46_1\boost\graph\astar_search.hpp(260) : see reference
to function template instantiation 'void
boost::breadth_first_visit,ColorMap>(const
IncidenceGraph &,unsigned int,Buffer &,BFSVisitor,ColorMap)' being compiled
1> with
1> [
1> VertexListGraph=graph_t,
1> AStarHeuristic=manhattan_dist,
1> UniformCostVisitor=puzzle_visitor,
1> UpdatableQueue=MutableQueue,
1>
PredecessorMap=boost::vec_adj_list_vertex_property_map,
1>
CostMap=boost::vec_adj_list_vertex_property_map,
1>
DistanceMap=boost::vec_adj_list_vertex_property_map,
1>
WeightMap=boost::adj_list_edge_property_map,boost::edge_weight_t>,
1>
ColorMap=boost::vec_adj_list_vertex_id_map>>>>>,unsigned int>,
1> BinaryFunction=boost::closed_plus<D>,
1> BinaryPredicate=std::less<D>,
1> IncidenceGraph=graph_t,
1> Buffer=MutableQueue,
1>
BFSVisitor=boost::detail::astar_bfs_visitor,MutableQueue,boost::vec_adj_list_vertex_property_map,boost::vec_adj_list_vertex_property_map,boost::vec_adj_list_vertex_property_map,boost::adj_list_edge_property_map,boost::edge_weight_t>,boost::vec_adj_list_vertex_id_map>>>>>,unsigned int>,boost::closed_plus<D>,std::less<D>>
1> ]
1> c:\program files
(x86)\boost\boost_1_46_1\boost\graph\astar_search.hpp(373) : see reference
to function template instantiation 'void
boost::astar_search_no_init,boost::vec_adj_list_vertex_property_map,boost::vec_adj_list_vertex_property_map,boost::adj_list_edge_property_map,boost::vec_adj_list_vertex_id_mapboost::vertex_color_t,T,Base,Vertex>,boost::vec_adj_list_vertex_property_map,const Default,boost::closed_plus<D>,unsigned
int,unsigned int>(const VertexListGraph &,unsigned
int,AStarHeuristic,AStarVisitor,PredecessorMap,CostMap,DistanceMap,WeightMap,ColorMap,VertexIndexMap,CompareFunction,CombineFunction,CostInf,CostZero)'
being compiled
1> with
1> [
1> VertexListGraph=graph_t,
1> AStarHeuristic=manhattan_dist,
1> Arg=const puzzle_visitor,
1> Graph=graph_t,
1> GraphPtr=graph_t *,
1> ValueType=unsigned int,
1> Reference=unsigned int &,
1> Tag=boost::vertex_predecessor_t,
1> Directed=boost::undirected_tag,
1> Value=unsigned int,
1> Ref=unsigned int &,
1> Vertex=unsigned int,
1> Property=boost::property,
1> T=boost::default_color_type,
1> Base=boost::property>>>>,
1> Default=const std::less<D>,
1> AStarVisitor=const puzzle_visitor,
1> PredecessorMap=const
boost::vec_adj_list_vertex_property_map,
1>
CostMap=boost::vec_adj_list_vertex_property_map,
1>
DistanceMap=boost::vec_adj_list_vertex_property_map,
1>
WeightMap=boost::adj_list_edge_property_map,boost::edge_weight_t>,
1>
ColorMap=boost::vec_adj_list_vertex_id_map>>>>>,unsigned int>,
1>
VertexIndexMap=boost::vec_adj_list_vertex_property_map,
1> CompareFunction=const std::less<D>,
1> CombineFunction=const boost::closed_plus<D>,
1> CostInf=const std::numeric_limits<unsigned int>::_Ty,
1> CostZero=const D
1> ]
1>
c:\cppprojects\implicit_astar\implicit_astar\implicit_astar_test1.cpp(269)
: see reference to function template instantiation 'void
boost::astar_search_no_init>(const
VertexListGraph &,unsigned int,AStarHeuristic,const
boost::bgl_named_params>
&)' being compiled
1> with
1> [
1> T=ColorMap,
1> Tag=boost::vertex_color_t,
1>
Base=boost::bgl_named_params,boost::graph_visitor_t,boost::no_property>>>>>,
1> VertexListGraph=graph_t,
1> AStarHeuristic=manhattan_dist
1> ]
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
On Wed, Jul 20, 2011 at 8:09 PM, Jeremiah Willcock wrote:
On Wed, 20 Jul 2011, anilpanicker wrote:
I'm trying to compile the puzzle 8 given in this link
http://www.cs.rpi.edu/~beevek/**research/astar_bgl04.pdfhttp://www.cs.rpi.edu/~beevek/research/astar_bgl04.pdf
using astar_search_no_init()
but I get this error "error C2106: '=' : left operand must be l-value"
I'm using VS2010. Can someone please help me
What is the full error message you get, including the instantiation stack?
Which version of Boost are you using?
-- Jeremiah Willcock
______________________________**_________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/**mailman/listinfo.cgi/boost-**usershttp://lists.boost.org/mailman/listinfo.cgi/boost-users