22 #include <glog/logging.h> 31 auto t1 = tupleRange<1>(
t);
34 auto t2 = tupleRange<1, 1>(
t);
37 EXPECT_EQ(30, std::get<0>(tupleRange<1>(tupleRange<1>(
t))));
68 auto t2cdr = tupleRange<1>(
std::move(t2));
79 template <
class U,
class T>
82 template <
class U,
class T>
88 static std::tuple<>
convert(
const std::tuple<>& ) {
95 template <
class U,
class... Us,
class T>
97 static std::tuple<U, Us...>
convert(
const T& input) {
99 folly::to<U>(std::get<0>(input)),
100 tupleTo<std::tuple<Us...>>(tupleRange<1>(input)));
104 template <
class U,
class T>
115 template <std::size_t... Ns>
117 template <
class U,
class T>
120 std::get<Ns>(input))...);
128 class Enable =
typename std::enable_if<
134 #define CHECK_TUPLE_TO(converter) \ 136 auto src = std::make_tuple(42, "50", 10); \ 137 auto dest = converter<std::tuple<std::string, int, int>>(src); \ 138 EXPECT_EQ("42", std::get<0>(dest)); \ 139 EXPECT_EQ(50, std::get<1>(dest)); \ 140 EXPECT_EQ(10, std::get<2>(dest)); \ 151 #undef CHECK_TUPLE_TO U tupleTo2(const T &input)
static U convert(const T &input)
#define EXPECT_EQ(val1, val2)
static std::tuple convert(const std::tuple<> &)
constexpr detail::Map< Move > move
#define CHECK_TUPLE_TO(converter)
—— Concurrent Priority Queue Implementation ——
static std::tuple< U, Us... > convert(const T &input)
std::enable_if< detail::is_chrono_conversion< Tgt, Src >::value, Tgt >::type to(const Src &value)
U tupleTo(const T &input)
static const char *const value
bool operator==(const MovableInt &a, const MovableInt &b)
auto tuplePrepend(T &&car, U &&cdr) -> decltype(std::tuple_cat(std::make_tuple(std::forward< T >(car)), std::forward< U >(cdr)))
TEST(ProgramOptionsTest, Errors)
#define EXPECT_TRUE(condition)
MovableInt & operator=(MovableInt &&)=default
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
typename TemplateRange< std::size_t, start,(n<=size-start?n:size-start)>::type type