Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2006-04-10 12:53:46


Sebastian Weber <sebastian.weber_at_[hidden]> writes:

> /home/sebi/projects/diplom/src/boost_1_33_1/boost/graph/adjacency_list_io.hpp:151: error: 'boost::GraphParser<Graph_t, VertexProperty, EdgeProperty, VertexPropertySubset, EdgePropertySubset>::operator()(std::istream&) [with Graph_t = boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, VertexProperty = boost::no_property, EdgeProperty = boost::no_property, VertexPropertySubset = boost::no_property, EdgePropertySubset = boost::no_property]::State' uses local type 'boost::GraphParser<Graph_t, VertexProperty, EdgeProperty, VertexPropertySubset, EdgePropertySubset>::operator()(std::istream&) [with Graph_t = boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::no_property, boost::no_property, boost::listS>, VertexProperty = boost::no_property, EdgeProperty = boos
> t::no_property, VertexPropertySubset = boost::no_property, EdgePropertySubset = boost::no_
> property]::State'

This says that the GraphParser class -- which you apparently defined
in namespace boost; naughty, naughty! -- has an operator() with a
locally-defined type State, and you're trying to pass an instance of
that type off to a function template.

It's a rule of C++ that you can't instantiate templates on
function-local types.

Learning to read your compiler's error messages can be difficult, but
it is well worth the effort. STLFilt can help to make them more
approachable (http://www.bdsoft.com)

HTH,

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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