diff options
author | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-10 20:32:47 +0000 |
---|---|---|
committer | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-10 20:32:47 +0000 |
commit | 91d963c4ed794fb70b0a85d6ffa5b85a979acd94 (patch) | |
tree | 0b15ce93e3c8d4a9c9b975358ae6487845e055c7 /libstdc++-v3 | |
parent | 91f0ab48bd9b2e18998a63c16f53e01d41afbc89 (diff) | |
download | gcc-91d963c4ed794fb70b0a85d6ffa5b85a979acd94.tar.gz |
* include/bits/random.tcc (seed_seq::generate): Cast max()
operands to size_t to ensure a template match.
* include/std/bitset (_M_copy_from_ptr): Cast min() operands to
size_t to ensure a template match.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187376 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/random.tcc | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/std/bitset | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c6b47faca05..ea30cc9e324 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2012-05-10 DJ Delorie <dj@redhat.com> + + * include/bits/random.tcc (seed_seq::generate): Cast max() + operands to size_t to ensure a template match. + * include/std/bitset (_M_copy_from_ptr): Cast min() operands to + size_t to ensure a template match. + 2012-05-03 Benjamin Kosnik <bkoz@redhat.com> * scripts/testsuite_flags.in (cxxflags): Remove diff --git a/libstdc++-v3/include/bits/random.tcc b/libstdc++-v3/include/bits/random.tcc index f7064c4e224..a3924bea681 100644 --- a/libstdc++-v3/include/bits/random.tcc +++ b/libstdc++-v3/include/bits/random.tcc @@ -2773,7 +2773,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : (__n - 1) / 2; const size_t __p = (__n - __t) / 2; const size_t __q = __p + __t; - const size_t __m = std::max(__s + 1, __n); + const size_t __m = std::max(size_t(__s + 1), __n); for (size_t __k = 0; __k < __m; ++__k) { diff --git a/libstdc++-v3/include/std/bitset b/libstdc++-v3/include/std/bitset index 792a05ace15..7f3cb4dec85 100644 --- a/libstdc++-v3/include/std/bitset +++ b/libstdc++-v3/include/std/bitset @@ -1377,7 +1377,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER size_t __pos, size_t __n, _CharT __zero, _CharT __one) { reset(); - const size_t __nbits = std::min(_Nb, std::min(__n, __len - __pos)); + const size_t __nbits = std::min(_Nb, std::min(__n, size_t(__len - __pos))); for (size_t __i = __nbits; __i > 0; --__i) { const _CharT __c = __s[__pos + __nbits - __i]; |