C++ Logo


Advanced search

Subject: Re: Why is size_type in std::array an alias for size_t?
From: Nevin Liber (nevin_at_[hidden])
Date: 2019-11-08 05:37:19

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]>>

STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups