
On Wed, Feb 20, 2013 at 9:02 PM, Jeffrey Lee Hellrung, Jr. < jeffrey.hellrung@gmail.com> wrote:
On Wed, Feb 20, 2013 at 12:55 PM, Neil Groves <neil@grovescomputing.com
wrote: [...]
I agree. My suggestion didn't have a new base class. I think by making boost::size(rng) call range_size(rng) we can provide an extension method similar to that already provided for boost::begin(rng) and boost::end(rng).
You mean like range_calculate_size [1] ?
Exactly I thought that when I introduced this it has been quite successful, and that we could build upon this by adding the optimal implementations for standard library components. I have been using this as an extension mechanism privately in this manner for a while and it has worked well for me. I wanted to get other peoples views on this solution before making the extension mechanism more widely used and optimised by default for the standard library containers.
[1]
http://www.boost.org/doc/libs/1_53_0/libs/range/doc/html/range/reference/con...
- Jeff
Thanks, Neil Groves