I am using bundled properties:
typedef unsigned position_type;
template<typename T>
class POS
{
public:
...
};
template<typename T>
struct LEN
{
T len_sq;
};
typedef POS POSITION;
typedef LEN LENGTH;
typedef adjacency_list DG;
typedef graph_traits<DG>::vertex_descriptor Vertex;
typedef graph_traits<DG>::edge_descriptor Edge;
...and I am calling add_edge() like this [from within the graph class so
(*this) resolves to the graph object]:
LENGTH l;
l.len_sq = whatever;
e01 = add_edge(v0, v1, l, *this);
The g++ compiler is punishing me with huge error reports that say:
../main.cpp: In constructor ‘DelaunayGraph<T>::DelaunayGraph(const int&,
const int&) [with T = unsigned int]’:
../main.cpp:126: instantiated from here
../main.cpp:101: error: no match for ‘operator=’ in
‘((DelaunayGraph<unsigned int>*)this)->DelaunayGraph<unsigned int>::e01 =
boost::add_edge [with Graph = boost::adjacency_list, Config =
boost::detail::adj_list_gen, boost::vecS, boost::vecS,
boost::bidirectionalS, boost::property, boost::property, boost::no_property,
boost::listS>::config, Base =
boost::bidirectional_graph_helper_with_property, boost::vecS, boost::vecS,
boost::bidirectionalS, boost::property, boost::property, boost::no_property,
boost::listS>::config>](((DelaunayGraph<unsigned
int>*)this)->DelaunayGraph<unsigned int>::v0, ((DelaunayGraph<unsigned
int>*)this)->DelaunayGraph<unsigned int>::v1, ((const
boost::property&)(& boost::property(((const LEN<unsigned int>&)((const LEN<unsigned
int>*)(& l)))))),
((boost::vec_adj_list_impl,
boost::detail::adj_list_gen, boost::vecS, boost::vecS,
boost::bidirectionalS, boost::property, boost::property, boost::no_property,
boost::listS>::config,
boost::bidirectional_graph_helper_with_property, boost::vecS, boost::vecS,
boost::bidirectionalS, boost::property, boost::property, boost::no_property,
boost::listS>::config> >&)(&((DelaunayGraph<unsigned
int>*)this)->DelaunayGraph<unsigned
int>::<anonymous>.boost::adjacency_list::<anonymous>)))’
/usr/include/boost/graph/detail/edge.hpp:35: note: candidates are:
boost::detail::edge_desc_impl&
boost::detail::edge_desc_impl::operator=(const
boost::detail::edge_desc_impl&)
make: *** [main.o] Error 1
Yow. It doesn't like the LENGTH param. What can I do? I tried adding an
assignment operator and copy constructor, no go. What am I doing wrong?
Eric