#7308 closed Bugs (fixed)
Property maps from bundled properties (with base member)
Reported by: | Owned by: | Jeremiah Willcock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | graph |
Version: | Boost 1.51.0 | Severity: | Problem |
Keywords: | property map, bundled properties, base member | Cc: | bgrube@… |
Description
In boost 1.50.0 the creation of property maps from a base member in bundled properties worked. After the modifications on bundled properties in boost 1.51.0 the code below fails compilation (gcc 4.7.1).
#include "boost/graph/adjacency_list.hpp" struct Base { int base_value; }; struct Vertex : Base { double some_value; }; int main() { using namespace boost; // graph with bundled vertex property adjacency_list< vecS, vecS, directedS, Vertex > graph(1); // accessing members, works as expected graph[ *vertices(graph).first ].some_value = 3.14; graph[ *vertices(graph).first ].base_value = 42; // property maps from bundled properties get( &Vertex::some_value, graph ); // works as expected get( &Vertex::base_value, graph ); // works with 1.50.0, fails with 1.51.0 }
The issue is also present for the PBGL.
Change History (4)
comment:1 by , 10 years ago
Cc: | added |
---|
comment:2 by , 10 years ago
Creating a property named vertex_bundle
will confuse the compiler, since there is a built-in property in adjacency_list
by that name already. The original code will take a bit more work to fix. As a workaround, could you try putting in an explicit cast to int Vertex::*
on &Vertex::base_value
? That worked for me.
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 10 years ago
Two lawmakers have filed fake handbags bills to legalize the half-gallon jugs, but a group of beer distributors is fighting both measures and appears to have helped cheap louis vuitton damier ebene canvas effectively kill both for the year. The half-gallon size growlers are an industry standard and are sold at christian louboutin outlet breweries around the country.
Probably related: Code like
compiles with Boost 1.50.0 but does not with 1.51.0 (using clang 3.1).