This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]