operands to min and max must have the same type...

Benjamin Kosnik bkoz@redhat.com
Tue Mar 4 22:13:00 GMT 2003


-	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));



More information about the Libstdc++ mailing list