Commit 7f703dc5 authored by Alvarez, Gonzalo's avatar Alvarez, Gonzalo
Browse files

PredicateSimple: compilation fix

parent 7a6ee8e7
......@@ -85,20 +85,16 @@ private:
if (op == ">=")
return (lv >= rv);
if (op == "%%")
return divisibleBy(lv, rv);
return divisibleBy<T>(lv, rv);
throw RuntimeError("Unknown operator " + op + "\n");
}
static bool divisibleBy(SizeType lv, SizeType rv)
template<typename T>
static bool divisibleBy(SizeType lv, SizeType rv, typename std::enable_if<Loki::TypeTraits<T>::isArith, int*>::type = 0)
{
return ((lv % rv) == 0);
}
static bool divisibleBy(double, double)
{
throw PsimagLite::RuntimeError("Called DivisibleBy (%%) but args are not integer types\n");
}
static SizeType operatorLength(String op)
{
const SizeType n = ops_.size();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment