|
Boost Users : |
From: Krishna Roskin (krish_at_[hidden])
Date: 2007-11-20 04:48:09
Hey all,
I've been having some problems inheriting from adjacency_list. My code
is real simple:
---------- 8>< ----------
#include<iostream>
#include<string>
#include<boost/graph/adjacency_list.hpp>
using namespace boost;
class Weighted : public adjacency_list<vecS, vecS, bidirectionalS,
property<vertex_distance_t, double>, no_property, no_property> {
};
int main(int argc, char* argv[]) {
Weighted m;
property_map<Weighted, vertex_distance_t>::type
pmap = get(vertex_distance, m);
return 0;
}
---------- 8>< ----------
The error is:
main.cpp: In function int main(int, char**):
main.cpp:16: error: conversion from
boost
::vec_adj_list_vertex_property_map<boost::adjacency_list<boost::vecS,
boost::vecS, boost::bidirectionalS,
boost::property<boost::vertex_distance_t, double, boost::no_property>,
boost::no_property, boost::no_property, boost::listS>,
boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS,
boost::property<boost::vertex_distance_t, double, boost::no_property>,
boost::no_property, boost::no_property, boost::listS>*, double,
double&, boost::vertex_distance_t> to non-scalar type
boost::vec_adj_list_vertex_property_map<Weighted, Weighted*, double,
double&, boost::vertex_distance_t> requested
make: *** [main.o] Error 1
Is there some reason that this won't work? Is it a bug? If I try to
get property_maps for edge properties, I don't have problems.
Any help greatly appreciated,
-krish
-- Krishna Roskin Center for Biomolecular Science and Engineering, UC Santa Cruz mailto:krish_at_[hidden] http://www.soe.ucsc.edu/~krish/
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