Boost logo

Boost Users :

Subject: Re: [Boost-users] [property_map] constructor of vector_property_map
From: Michel Morin (mimomorin_at_[hidden])
Date: 2013-02-19 17:02:30


Andreas Fabri wrote:
> Why is initial_size in the constructor
> __________________________________________________________________
> vector_property_map(unsigned initial_size, const IndexMap& index =
> IndexMap())
>
> This constructor version allows to specify maximum index of element that
> will be stored. Correct number will improve performance, but semantic is
> always the same.
>
> Source:
> http://www.boost.org/doc/libs/1_53_0/libs/property_map/doc/vector_property_map.html
> __________________________________________________________________
>
> not std::size_t, for the simple reason that the std::vector
> might be bigger.

My 2 cents to changing `unsigned` to vector's `size_type` (i.e. `std::size_t`).

Regards,
Michel


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