Boost logo

Boost :

Subject: Re: [boost] [graph] porting code from 1.46 to 1.54
From: Maurizio Vitale (mrz.vtl_at_[hidden])
Date: 2013-10-08 10:53:08

Hi Jeremiah,
  thanks for the suggestion. The code was using IndexGraph. This is code
that was put in place way before I joined the company and the authors have
long gone.
Mikael's suggestion of rewriting the code using only the public interface
is probably a good one, but I'll see if I can get this to work by declaring
the property explicitly first.
Thanks again,


On Mon, Oct 7, 2013 at 10:39 PM, Jeremiah Willcock <jewillco_at_[hidden]>wrote:

> 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<**InstancePropertyTag, Instance*>
>> InstanceProperty;
>> typedef boost::adjacency_list<**OutEdgeList, VertexList,
>> boost::bidirectionalS, InstanceProperty> Graph;
>> typedef boost::property_map<Graph, boost::vertex_index_t>::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<**InstancePropertyTag, Instance*,
>> boost::property<boost::vertex_**index_t, int> > 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
> ______________________________**_________________
> Unsubscribe & other changes:**
> mailman/listinfo.cgi/boost<>

Boost list run by bdawes at, gregod at, cpdaniel at, john at