Modify

Ticket #4914 (closed Bugs: fixed)

Opened 3 years ago

Last modified 3 years ago

Compile error reverse_graph and filter_graph

Reported by: gast128@… Owned by: asutton
Milestone: To Be Determined Component: graph
Version: Boost 1.45.0 Severity: Problem
Keywords: Cc:

Description

Hello all,

posted thru gmane but got all kinds of 'You seem to be top-posting. Don't do that.' messages.

We just upgraded to Boost 1.45 with vs2008 but we got an error in code which has been built fine in the past. Sample code:

#include <boost\graph\adjacency_list.hpp> #include <boost\graph\graph_traits.hpp> #include <boost\graph\filtered_graph.hpp> #include <boost\graph\reverse_graph.hpp>

struct Filter {

template <typename Edge> bool operator()(const Edge& cr) const {

return true;

}

};

int main() {

typedef boost::adjacency_list<

boost::listS, boost::listS, boost::bidirectionalS, int

Graph;

typedef boost::filtered_graph<Graph, Filter> FilteredGraph?;

Graph graph;

const Filter filter; const FilteredGraph? fgraph(graph, filter);

boost::make_reverse_graph(fgraph);

return 0;

}

Error:

1>c:\work sdk\boost_1_45_0\boost\graph\graph_traits.hpp(222) : error C2039: 'graph_property_type' : is not a member of 'boost::filtered_graph<Graph,EdgePredicate?>' 1> with 1> [ 1> Graph=Graph, 1> EdgePredicate?=Filter 1> ] 1> c:\work sdk\boost_1_45_0\boost\graph\reverse_graph.hpp(83) : see reference to class template instantiation 'boost::graph_property_type<G>' being compiled 1> with 1> [ 1> G=boost::filtered_graph<Graph,Filter> 1> ] 1> c:\work\temp\graph\graph.cpp(33) : see reference to class template instantiation 'boost::reverse_graph<BidirectionalGraph?,GraphRef?>' being compiled 1> with 1> [ 1> BidirectionalGraph?=FilteredGraph?, 1> GraphRef?=const FilteredGraph? & 1> ] 1>c:\work sdk\boost_1_45_0\boost\graph\graph_traits.hpp(240) : error C2039: 'graph_bundled' : is not a member of 'boost::filtered_graph<Graph,EdgePredicate?>' 1> with 1> [ 1> Graph=Graph, 1> EdgePredicate?=Filter 1> ] 1> c:\work sdk\boost_1_45_0\boost\graph\reverse_graph.hpp(84) : see reference to class template instantiation 'boost::graph_bundle_type<G>' being compiled 1> with 1> [ 1> G=boost::filtered_graph<Graph,Filter> 1> ] 1>c:\work sdk\boost_1_45_0\boost\graph\graph_traits.hpp(240) : error C2146: syntax error : missing ';' before identifier 'type' 1>c:\work sdk\boost_1_45_0\boost\graph\graph_traits.hpp(240) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\work sdk\boost_1_45_0\boost\graph\graph_traits.hpp(240) : error C2208: 'boost::type' : no members defined using this type 1>c:\work sdk\boost_1_45_0\boost\graph\graph_traits.hpp(240) : fatal error C1903: unable to recover from previous error(s); stopping compilation

ref:  http://article.gmane.org/gmane.comp.lib.boost.user/64165

Attachments

Change History

comment:1 Changed 3 years ago by anonymous

Somehow my whole nice formatting is eaten by SVN.

comment:2 Changed 3 years ago by jewillco

To get the formatting, use {{{ and }}} (see  https://svn.boost.org/trac/boost/wiki/WikiFormatting). Note that your code uses backslashes in the #include file paths and does not initialize filter (an error in GCC). A fix for the actual problem is coming soon.

comment:3 Changed 3 years ago by jewillco

  • Status changed from new to closed
  • Resolution set to fixed

(In [66900]) Fixed bundled graph properties in filtered_graph; fixes #4914

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.