Boost logo

Boost :

Subject: Re: [boost] [review] The review of Boost.DoubleEnded starts today: September 21 - September 30
From: Bjorn Reese (breese_at_[hidden])
Date: 2017-10-04 12:29:53


On 10/04/2017 01:30 AM, Ion Gaztañaga via Boost wrote:

> 2) Defaulting size_type to unsigned int is arbitrary and against
> existing practice. According to the usual STL rules, size_type shall
> come from the allocator, which knows what type can represent the number
> of elements that can be allocated. I find interesting the idea of
> expressing a different size_type to save space, but I am not sure if
> that should come from the allocator or from an option.

I cannot connect the dots between size_type and the allocator.

The Container requirements [1] only states that size_type should be an
unsigned integer type large enough to contain any non-negative value of
difference_type. And difference_type comes from the iterator.

The AllocatorAwareContainer requirements do not mention size_type.

[1] Section [container.requirements.general] in the C++ standard.


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