21 template<
long a,
long b,
bool bo>
26 template<
long a,
long b>
27 struct GcdHelper<a,b,true>
32 static void conceptCheck()
34 static_assert(b<a,
"b<a must hold!");
35 static_assert(0<b,
"b must be positive");
42 const static long gcd = GcdHelper<b,a%b,true>::gcd;
45 template<
long a,
long b>
46 struct GcdHelper<a,b,false>
51 const static long gcd = GcdHelper<b,a,true>::gcd;
54 struct GcdHelper<a,0,true>
56 const static long gcd=a;
64 template<
long a,
long b>
69 const static long value = GcdHelper<a,b,(a>b)>::gcd;
Dune namespace.
Definition: alignment.hh:10
Calculator of the greatest common divisor.
Definition: gcd.hh:66
static const long value
The greatest common divisior of a and b.
Definition: gcd.hh:69