Commit 58651854 by DJ Delorie Committed by DJ Delorie

random.tcc (seed_seq::generate): Cast max() operands to size_t to ensure a template match.

* 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.

From-SVN: r187376
parent 04142cc3
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> 2012-05-03 Benjamin Kosnik <bkoz@redhat.com>
* scripts/testsuite_flags.in (cxxflags): Remove * scripts/testsuite_flags.in (cxxflags): Remove
......
...@@ -2773,7 +2773,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -2773,7 +2773,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: (__n - 1) / 2; : (__n - 1) / 2;
const size_t __p = (__n - __t) / 2; const size_t __p = (__n - __t) / 2;
const size_t __q = __p + __t; 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) for (size_t __k = 0; __k < __m; ++__k)
{ {
......
...@@ -1377,7 +1377,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER ...@@ -1377,7 +1377,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
size_t __pos, size_t __n, _CharT __zero, _CharT __one) size_t __pos, size_t __n, _CharT __zero, _CharT __one)
{ {
reset(); 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) for (size_t __i = __nbits; __i > 0; --__i)
{ {
const _CharT __c = __s[__pos + __nbits - __i]; const _CharT __c = __s[__pos + __nbits - __i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment