Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2005-08-31 06:22:12


Matt Calabrese writes:
> Forgive me for posting three times in a row, but I just realized
> that the reason why this conflict appears in the first place is
> because of the difference between <algorithm> count and count as a
> member of associative sequences in the STL.

Yep.

> Since there is currently no distinction between these two types of
> count in MPL, the conflict simply cannot be resolved (it is
> conceivable that in certain cases you may wish to count by
> value_type whereas sometimes you may wish to count by key_type, such
> as the STL allows, so both forms of count should be useable for
> associative sequences). It seems as though the only way to resolve
> this would be to have two differently named counts, such as count
> and count_by_key appropriately.

I'd go with 'key_count' for the latter, but otherwise I agree with the
analysis.

-- 
Aleksey Gurtovoy
MetaCommunications Engineering

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk