Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] bundled properties and forward declarations (changes from 1.42 -> 1.46.1 ?)
From: Anders Wallin (anders.e.e.wallin_at_[hidden])
Date: 2011-08-10 13:23:13


Here is an example:
http://codepad.org/66RTChdX
(the cmake file I use is here: http://codepad.org/NRpRDwsP)
this compiles with gcc 4.5.2 and boost 1.42,
but does NOT compile with gcc 4.6.1 and boost 1.46.1, giving me an error:
"/usr/include/boost/pending/detail/property.hpp:27:18: error: ‘struct
boost::property<boost::edge_bundle_t, EdgeProperty,
boost::no_property>’ has no member named ‘m_value’"

hope this illustrates my problem,

Anders

On Wed, Aug 10, 2011 at 7:46 PM, Anders Wallin
<anders.e.e.wallin_at_[hidden]> wrote:
> I have code using bundled properties roughly like this that compiles
> with boost 1.42:
> struct EdgeProperty;
> typedef adjacency_list< ... , EdgeProperty , ...> MyGraph;
> typedef graph_traits<MyGraph>::edge_descriptor Edge;
>
> struct EdgeProperty {
>    Edge next;
> };
>
>
> When trying to compile this with boost 1.46.1 I get "error: forward
> declaration of EdgeProperty’". I am not sure why.
> The obvious solution would be to move the definition of EdgeProperty
> before the MyGraph typedef, but then I run into a circular
> dependency problem as I want to store an edge_descriptor in EdgeProperty.
>
> any ideas?
>
> Anders
>


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