Boost logo

Boost Users :

From: Sam Peterson (peabodyenator_at_[hidden])
Date: 2007-08-31 20:34:06


According to the release notes of version 1.33, bundled properties are
now supposed to work with the subgraph adapter. I am currently using
1.34 However, I'm receiving a compiler error that I never was before
I tried to switch to the subgraph adapter:

graph.cpp:569: instantiated from here
boost_1_34_1/boost/graph/properties.hpp:355: error: no type named
'vertex_bundled' in 'class boost::subgraph<boos\
t::adjacency_list<boost::setS, boost::vecS, boost::bidirectionalS,
Paper, boost::property<boost::edge_index_t, lo\
ng unsigned int, boost::no_property>, boost::no_property, boost::listS> >'

The line in question looks like this:

    put(&Paper::authors, *g,
        index_map.index_map[atoi(current_paper_id->c_str())], name_index);

My bundled properties and graph typdefs look like this:

struct Paper
{
  unsigned int paper_id;
  std::string title;
  std::vector<std::size_t> authors;
  std::string subject;
  std::string description;
  std::string publisher;
  std::string date_of_paper;
  std::string format;
  std::string identifier;
  std::string source;
  template<class Archive>
  void serialize(Archive & ar, const unsigned int version) {
    ar & paper_id;
    ar & title;
    ar & authors;
    ar & subject;
    ar & description;
    ar & publisher;
    ar & date_of_paper;
    ar & format;
    ar & identifier;
    ar & source;
  }
};

typedef boost::adjacency_list_traits<boost::setS, boost::vecS,
                                     boost::undirectedS> Traits;
typedef boost::adjacency_list<
     boost::setS, // OutEdgeList container
     boost::vecS, // Vertex container
     boost::bidirectionalS, // Directed status
     Paper, // Vertex bundled properties
     boost::property<boost::edge_index_t, std::size_t>
> PaperGraph_t;
typedef boost::subgraph < PaperGraph_t > PaperGraph;
typedef boost::graph_traits<PaperGraph>::vertex_descriptor PaperVertex;
typedef boost::graph_traits<PaperGraph>::edge_descriptor PaperEdge;

Is there anything I'm doing wrong or is this a bug?

-- 
Sam Peterson
peabody_at_[hidden]
peabodyenator_at_[hidden]

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