C++ Logo

std-discussion

Advanced search

Re: Why is size_type in std::array an alias for size_t?

From: Nevin Liber <nevin_at_[hidden]>
Date: Fri, 8 Nov 2019 11:37:19 +0000
On Fri, Nov 8, 2019 at 6:46 AM Wilhelm Meier via Std-Discussion <
std-discussion_at_[hidden]> wrote:

> Hello all,
>
> the member type size_type is an alias for size_t in std::array:
>
> https://en.cppreference.com/w/cpp/container/array
>
> The member type size_type in std::vector is an unspecified unsigned
> integer type:
>
> https://en.cppreference.com/w/cpp/container/vector


While I'm not sure we say it normatively, I believe that size_type for
vector comes from its allocator, which std::array does not have.


> Is this a documentation issue?
>

No. It is normative.
-- 
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden] <nevin_at_[hidden]>>
+1-847-691-1404

Received on 2019-11-08 05:40:15