Fix use of template parameter as a condition
parent
91020ce3ba
commit
933e63f162
4
test.cpp
4
test.cpp
|
|
@ -438,10 +438,8 @@ T StringToValue(const std::string& str) {
|
||||||
if (iss.fail())
|
if (iss.fail())
|
||||||
throw InvalidArgument("cryptest.exe: '" + str +"' is not a value");
|
throw InvalidArgument("cryptest.exe: '" + str +"' is not a value");
|
||||||
|
|
||||||
#if NON_NEGATIVE
|
if (NON_NEGATIVE && value < 0)
|
||||||
if (value < 0)
|
|
||||||
throw InvalidArgument("cryptest.exe: '" + str +"' is negative");
|
throw InvalidArgument("cryptest.exe: '" + str +"' is negative");
|
||||||
#endif
|
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue