Boost logo

Boost Users :

From: gast128 (gast128_at_[hidden])
Date: 2007-06-06 11:55:54


Aaron Windsor <aaron.windsor <at> gmail.com> writes:
 
<snip>

> My point in the previous email is that your graph doesn't have any
> interior properties, but you're trying to access vertex properties -
> this is what's causing the compile-time error. So, for instance, if
> you added any bundled vertex property:
>
> struct vertex_properties { int label; };
>
> void Foo()
> {
> typedef boost::adjacency_list<boost::vecS, boost::listS,
> boost::undirectedS, vertex_properties> graph_t;
> graph_t graph;
> graph_t::vertex_descriptor v = add_vertex(graph);
> graph[v];
> }
>
> It should compile.
>
> Regards,
> Aaron

Yes this compiles. So I switched back too my original code, and then it does
not compile:

namespace boost
{
    enum vertex_HVERTEX_t { vertex_HVERTEX = 127 };
    BOOST_INSTALL_PROPERTY(vertex, HVERTEX);
}

void Foo()
{
    typedef boost::property<boost::vertex_HVERTEX_t, int> prop_t;
    typedef boost::adjacency_list<boost::vecS, boost::listS,
boost::undirectedS, prop_t> graph_t;
    graph_t graph;

    graph_t::vertex_descriptor v = add_vertex(graph);
    graph[v];
}

So some structs are more equal than other structs (since both boost::property
as your vertex_properties are structures)?

Wkr,
me


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