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

PredicateSimple: compilation fix

parent 7a6ee8e7
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -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();