Boost logo

Boost Users :

From: Vasco Lohrenscheit (v.lohrenscheit_at_[hidden])
Date: 2003-11-28 04:11:52


Hello,

I have some problems with graph properties. For a project I created a layer
above the boost graph library. So i have:

template <typename N, typename E, typename GT> GraphNode : public N {}
template <typename N, typename E, typename GT> GraphEdge : public E {}

template <typename N, typename E> Graph {}

with BGL properties like:

typedef GraphNode<N,E,GraphTraits> tNode;
typedef property <typename tNode::vertex_property, tNode*> NodeProperty;

As internal graph properties i use pointers to GraphNode and GraphEdge with
property tags defined in N and E, e.g.

class LogicState {
public:
    enum vertex_state_t {vertex_state=123;}
    static const vertex_state_t PropertyTag;
}
const LogicState::vertex_state_t LogicState::PropertyTag=vertex_state;

and template specialization for property_kind:

template <> struct property_kind <GraphEdge<LogicState, LogicConstraint,
GraphTraits> > {
    typedef vertex_property_tg type;
};

with using put(tNode::PropertyTag, graph, somestate); i get the following
compile error:

error C2679: binary '=' : no operator found which takes a right-hand operand
of type 'GraphEdge<N,E,G> ' (or there is no acceptable conversion)
        with
        [
            N=LogicState,
            E=LogicConstraint,
            G=Graph<LogicState,LogicConstraint>::tGraphTraits
        ]

in line 316 in property_map.hpp: "static_cast<const PropertyMap&>(pa)[k] =
v;"

I'm using the current cvs version of boost and vc++7.1. Any ideas what can
cause this problem ? Why there exist no "=" operator ? Where should it be
defined/generated in normal cases ? Without my layer, with pure BGL and
BOOST_INSTALL_PROPERTY I had it already working.

Shouldn't it also be of type GraphEdge<N,E,G>* ? I've checked my code and
everywhere I used pointers (in the property definition and with the put).

Then another questions: The online docs for the BGL weren't very helpfull
for me. Is the BGL book better, or is it only an enhanced version of the
online docs ?

   best regards,

        Vasco Lohrenscheit


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net