Index: benchmarks/CartesianBenchmarks.hpp =================================================================== --- /dev/null +++ benchmarks/CartesianBenchmarks.hpp @@ -0,0 +1,86 @@ + +#include +#include +#include + +#include "benchmark/benchmark.h" + +namespace internal { + +template +struct EnumValue : std::integral_constant(I)> { + static std::string name() { return std::string("_") + D::Names[I]; } +}; + +template +struct MakeEnumValueTuple : MakeEnumValueTuple {}; + +template +struct MakeEnumValueTuple { + using type = std::tuple...>; +}; + +template +static auto skip(int) -> decltype(T::skip()) { + return T::skip(); +} +template +static bool skip(char) { + return false; +} + +template