Hi,
I want to create hierarchy of property maps like this:
#include
#include
using namespace boost;
struct Base_NodeP {
int basic_property;
};
struct NodeP : public Base_NodeP {
// using Base_NodeP::basic_property
int derived_property;
};
int main(){
typedef adjacency_list, no_property> TGraph;
property_map::type _basic_property;
property_map::type _derived_property;
TGraph tgraph;
_derived_property = get(&NodeP::derived_property, tgraph);
_basic_property = get(&NodeP::basic_property, tgraph);
return 0;
}
When I compile this code in MSVS 2008, I'm getting
error C2679: binary '=' : no operator found which takes a right-hand operand
of type 'boost::bundle_property_map' (or there is
no acceptable conversion).
gcc 4.3.2 gives similar error:
error: no match for ‘operator=’ in ‘_basic_property = boost::get [with
OutEdgeListS = boost::setS, VertexListS = boost::vecS, DirectedS =
boost::undirectedS, VertexProperty = boost::property, EdgeProperty = boost::no_property, GraphProperty =
boost::no_property, EdgeListS = boost::listS, T = int, Bundle =
Base_NodeP](&Base_NodeP::basic_property,
((boost::adjacency_list, boost::no_property,
boost::no_property, boost::listS>&)(& tgraph)))
When I uncomment "using Base_NodeP::basic_property" in NodeP declaration,
MSVS is happy, but gcc
still cannot compile the code.
Do you have any suggestions, how can I make this code work under gcc? Am I
doing something wrong?
Thanks for any help,
Oleg
--
View this message in context: http://old.nabble.com/Property-maps-hierarchy-compilation-errors-tp28137714p...
Sent from the Boost - Users mailing list archive at Nabble.com.