From 933e63f16249920f67aa0bc935f1629f35e98eec Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Wed, 21 Sep 2016 23:04:43 -0400 Subject: [PATCH] Fix use of template parameter as a condition --- test.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test.cpp b/test.cpp index 682db2f8..fe6bc7a2 100644 --- a/test.cpp +++ b/test.cpp @@ -438,10 +438,8 @@ T StringToValue(const std::string& str) { if (iss.fail()) throw InvalidArgument("cryptest.exe: '" + str +"' is not a value"); -#if NON_NEGATIVE - if (value < 0) + if (NON_NEGATIVE && value < 0) throw InvalidArgument("cryptest.exe: '" + str +"' is negative"); -#endif return value; }