This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: operands to min and max must have the same type...
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Tue, 4 Mar 2003 16:11:38 -0600
- Subject: Re: operands to min and max must have the same type...
- References: <oradggyqun.fsf@free.redhat.lsd.ic.unicamp.br>
- ptrdiff_t new_size = std::max(2 * old_size, ptrdiff_t(1));
+ ptrdiff_t new_size = std::max(ptrdiff_t (2 * old_size), ptrdiff_t (1));
Should be:
ptrdiff_t new_size = std::max(static_cast<ptrdiff_t>(2 * old_size), ptrdiff_t (1));