Fix creation of initial value for computing the max (Fixes PR #805).

Bård spotet a bug after PR #805 was merged. Indead returning
-numeric_limits<type>::min() does not make sense for integral
values. This commit resorts to returning numeric_limits<type>::min().

Kudos to Bård for his attention.
This commit is contained in:
Markus Blatt 2015-05-27 14:50:58 +02:00
parent baf76dc1bf
commit 7f266458b5

View File

@ -481,7 +481,7 @@ private:
// for integral types.
if( std::is_integral<Result>::value )
{
return -std::numeric_limits<Result>::min();
return std::numeric_limits<Result>::min();
}
else
{