Boost logo

Boost Users :

Subject: Re: [Boost-users] trying to build custom property_map
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-04-01 15:41:31


On Thu, 1 Apr 2010, Sandeep Gupta wrote:

> It seems that the error occurs when I don't define   "typedef int& reference" for the property map
> class.  The confusing part is that when I compile with boost_1_42 I get the error
>
> boost_1_42_0/boost/property_map/property_map.hpp:33: error: no type named 'reference' in 'struct
> VecMap'
>
> Which is expected. However, If I compile against the trunk I get undefined value_type error instead of
> undefined reference error.
>
> boost-trunk/boost/pending/disjoint_sets.hpp:65: error: no type named 'value_type' in 'struct
> boost::property_traits<VecMap>'
>
> Something surely is amiss here. Most likely in the disjoint_sets.hpp, I believe.
>
> Thanks
> -Sandeep

The behavior of property_traits changed in newer versions of Boost. Now,
nothing in property_traits is defined for a property map unless it has all
four required members (key_type, value_type, category, and reference).
Previously you would only get an error for those that were missing. This
change was necessary so including Boost.Graph and Boost.Variant in the
same program would work.

-- Jeremiah Willcock


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