Index: libcxx/trunk/benchmarks/CartesianBenchmarks.hpp =================================================================== --- libcxx/trunk/benchmarks/CartesianBenchmarks.hpp +++ libcxx/trunk/benchmarks/CartesianBenchmarks.hpp @@ -0,0 +1,92 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + + +#include +#include +#include + +#include "benchmark/benchmark.h" +#include "test_macros.h" + +namespace internal { + +template +struct EnumValue : std::integral_constant(I)> { + static std::string name() { return std::string("_") + D::Names[I]; } +}; + +template +constexpr auto makeEnumValueTuple(std::index_sequence) { + return std::make_tuple(EnumValue{}...); +} + +template +static auto skip(int) -> decltype(T::skip()) { + return T::skip(); +} +template +static bool skip(char) { + return false; +} + +template