On Mon, 7 Oct 2013, Maurizio Vitale wrote:
Hello boost,
I'm trying to move some large code base to use boost 1.54.
In some dark corner of it, the following was compiling fine:
class Instance;
typedef boost::setS OutEdgeList; typedef boost::listS VertexList;
struct InstancePropertyTag { typedef boost::vertex_property_tag kind; };
typedef boost::property
InstanceProperty; typedef boost::adjacency_list Graph; typedef boost::property_map ::type IndexGraph; under 1.54, I get 'attempt to form reference to void', but everything was fine under 1.46.
I traced it a bit through template expansion, and the problem seems to be that the type for vertex_index_t is not found. The following declaration for InstanceProperty fixes (or hides) the problem:
typedef boost::property
> InstanceProperty; Does somebody know if some properties were added by default to graphs before and need to be explicitly added now? I don't find anything in the documentation and all examples I've found seem to imply that one wouldn't need to explicitly add a property declaration of vertex_index_t.
The vertex_index property is not added to adjacency list graphs with listS as vertex container (and was not before). Did the code ever try to use IndexGraph previously? It is unlikely to have worked. The fix you made is the correct one; be sure to initialize that property if you are going to call algorithms that use it. -- Jeremiah Willcock