Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-06-07 16:56:27

dan marsden wrote:
>>> The problem is with distance<begin, end>::value. My distance_impl<>
>>> doesn't provide a nested value. It provides a nested type. If this were
>>> distance<begin, end>::type::value, it works. It also works if I change
>>> my distance_impl<> specialization, but I don't think I should have to. Bug?
>>From what I can see in the MPL docs, a numeric metafunction is only required to
>> return ::type, and ::value is just a convenience that I shouldn't count on. So
>> I agree, a bug. I'll patch up shortly, thanks for picking this up.
> The defect above should now be fixed on HEAD.

Great, thanks! If you haven't done so already, you may want to change
all of your own distance_impl<> implementations so that they do not have
a nested ::value. That way, your own tests will catch this problem if it
ever creeps back in. Ditto for size_impl<>.

Just a suggestion.

Eric Niebler
Boost Consulting

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