Boost logo

Boost Users :

Subject: Re: [Boost-users] [Range] size and list, for example.
From: Neil Groves (neil_at_[hidden])
Date: 2013-04-17 17:55:42


On Fri, Apr 12, 2013 at 7:17 AM, Nathan Ridge <zeratul976_at_[hidden]>wrote:

> In C++11, however, the complexity of std::list::size() is guaranteed
> to be constant [1]. Therefore, I think it would be reasonable if in
> C++11, Boost.Range provided a specialized version of size() for
> std::list that forwarded to std::list::size(). This has not been
> implemented yet. If you would like to see it implemented, please file
> a Trac ticket. If no one objects to this addition, I will implement
> it when I get a chance.
>
>
I definitely want to add versions of boost::size that support all of the
standard containers and Boost.Containers where they the member size is
O(1). I'm convinced this will be an improvement despite the remaining
controversy. I believe that the inconvenience to container developers is
minor relative to the frequent inconvenience to algorithm developers. If
you get to implement this before me then great. The help is welcome.

> Regards,
> Nate
>
>
Thanks,
Neil Groves



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