|
Boost Users : |
Subject: Re: [Boost-users] [graph] vertex property Graph type cyclic definition problem. forward declaration not possible.
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2011-10-12 14:56:21
On Wed, 12 Oct 2011, Christoph wrote:
> Hi,
>
> i would like to use the bundled properties feature of the boost graph
> library to specify the vertex properties of my graph. The problem is
> that i would like to have some graph type dependent descriptor type map
> defined within these vertex properties.
(snip)
> I do not want to use (void*) and std::reinterpret_cast to work around
> this problem. I hope that you can help me with a technique not using
> casts.
>
> I assume that there may be a possibility to first declare the graph type
> without the vertex_properties struct and then 'adding' the
> vertex_propterties struct after defining the graph.
You can use the adjacency_list_traits class for that; see
<URL:http://www.boost.org/doc/libs/1_47_0/libs/graph/doc/adjacency_list_traits.html>
for details.
-- Jeremiah Willcock
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