fix for VC++11

This commit is contained in:
bolero-MURAKAMI 2012-12-17 23:10:23 +09:00
parent 5597dcec9b
commit 8b80b159c8
148 changed files with 336 additions and 181 deletions

View file

@ -20,7 +20,7 @@ namespace sprout {
template<typename IntType, typename CStrIterator>
inline SPROUT_CONSTEXPR IntType
str_to_int_impl_1(CStrIterator str, int base, IntType val, IntType x, bool negative) {
return x == static_cast<IntType>(-1) ? (negative ? -val : val)
return x == static_cast<IntType>(-1) ? (negative ? -1 * val : val)
: val > (std::numeric_limits<IntType>::max() - x - (negative ? 1 : 0)) / base
? (negative ? std::numeric_limits<IntType>::min() : std::numeric_limits<IntType>::max())
: sprout::detail::str_to_int_impl_1<IntType>(