On Thu, Apr 1, 2010 at 12:41 PM, Jeremiah Willcock <jewillco@osl.iu.edu> wrote:
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.


I see. Although I would say this change introduces a non-friendly error message. It threw me out-of-the-loop to see the compiler complain about value_type when it was already defined. Would it be possible to emit error at the property_map level itself.


For now I am good. Thanks so much for looking.

-Sandeep