[property_map] constructor of vector_property_map

Hello, 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_m... __________________________________________________________________ not std::size_t, for the simple reason that the std::vector might be bigger. best regards, andreas -- Andreas Fabri, PhD Chief Officer, GeometryFactory Editor, The CGAL Project phone: +33.492.954.912 skype: andreas.fabri

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_m... __________________________________________________________________
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
participants (2)
-
Andreas Fabri
-
Michel Morin