sstream.tcc (overflow): Make sure operands of min and max have the same type.
authorAlexandre Oliva <aoliva@redhat.com>
Tue, 8 Apr 2003 12:03:26 +0000 (12:03 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Tue, 8 Apr 2003 12:03:26 +0000 (12:03 +0000)
* include/bits/sstream.tcc (overflow): Make sure operands of min
and max have the same type.

From-SVN: r65368

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/sstream.tcc

index c4b62933d168e1b40821930477fc43e9e7f529b9..02ac8d954824668de2403a5cc05b6e1792804444 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-08  Alexandre Oliva  <aoliva@redhat.com>
+
+       * include/bits/sstream.tcc (overflow): Make sure operands of min
+       and max have the same type.
+
 2003-04-04  Jerry Quinn  <jlquinn@optonline.net>
 
        PR libstdc++/10276
index 991cb13ef98250a36fb83641a230f92836c486fd..04b6289de8b4af189c74f780b44dd22c211fe2f3 100644 (file)
@@ -1,6 +1,6 @@
 // String based streams -*- C++ -*-
 
-// Copyright (C) 1997, 1998, 1999, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -90,7 +90,7 @@ namespace std
       // In virtue of DR 169 (TC) we are allowed to grow more than
       // one char the first time and also...
       __size_type __len =
-       std::max(_M_string.capacity() + 1, this->_M_buf_size_opt);
+       std::max(__size_type(_M_string.capacity() + 1), this->_M_buf_size_opt);
 
       bool __testwrite = this->_M_out_cur < this->_M_out_end;
       if (__builtin_expect(!__testwrite && __len > _M_string.max_size(), false))