PR libstdc++/88113 use size_type consistently instead of size_t
authorJonathan Wakely <jwakely@redhat.com>
Wed, 21 Nov 2018 18:40:37 +0000 (18:40 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 21 Nov 2018 18:40:37 +0000 (18:40 +0000)
commitafd02e4c676dec5b06088a27c2152d772902e0be
treedb39b72dbf03665f8a60d374f1be08578b689aa0
parent4cd5da011d6174e7cb152913acac760fb4a84c11
PR libstdc++/88113 use size_type consistently instead of size_t

On 16-bit msp430-elf size_t is either 16 bits or 20 bits, and so can't
represent all values of the uint32_t type used for bitset::size_type.
Using the smaller of size_t and uint32_t for size_type ensures it fits
in size_t.

PR libstdc++/88113
* src/c++17/memory_resource.cc (bitset::size_type): Use the smaller
of uint32_t and size_t.
(bitset::size(), bitset::free(), bitset::update_next_word())
(bitset::max_blocks_per_chunk(), bitset::max_word_index()): Use
size_type consistently instead of size_t.
(chunk): Adjust static_assert checking sizeof(chunk).

From-SVN: r266352
libstdc++-v3/ChangeLog
libstdc++-v3/src/c++17/memory_resource.cc