PR libstdc++/88113 use size_type consistently instead of size_t
commit0bea60b4686f6b03817b8de77ce042f2861df91a
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Nov 2018 18:40:37 +0000 (21 18:40 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Nov 2018 18:40:37 +0000 (21 18:40 +0000)
treedb39b72dbf03665f8a60d374f1be08578b689aa0
parent86076a1b5a5f8972b3d5294628dd76b56ba02aa8
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).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266352 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/src/c++17/memory_resource.cc