Skip to content

Instantly share code, notes, and snippets.

View kalven's full-sized avatar

Daniel Andersson kalven

  • Mountain View, California
View GitHub Profile
#include <iostream>
#include <type_traits>
#include <string>
// primality test
template<int N, int M>
struct divides
{
enum { value = ((N%M) == 0) || divides<N, M-1>::value };