std::vector<int> as{1,2},bs{1,2,3}; for(auto [index, a,b]: zip(as,bs)){ a++; } cout<
#pragma once
static_assert(__cplusplus >= 201703L,
" must be c++17 or greater");
#include <algorithm>
#include <cassert>
#include <functional>
#include <iostream>
#include <sstream>
#include <tuple>
#include <type_traits>
#include <vector>
template <class T>
public:
using tuple_indexes = std::make_index_sequence<std::tuple_size_v<std::remove_reference_t<T>>>;
{}
{
}
return *this;
}
{
}
private:
static auto ref(
const auto& t) {
return std::ref(t); }
static auto ref(
auto& t) {
return std::ref(t); }
static auto ref(
const auto&& t) {
return t; }
static auto ref(
auto&& t) {
return t; }
template <std::size_t... I>
auto get_refs(T t, std::index_sequence<I...>)
const
{
}
{
}
template <
class F,
class A>
auto apply2(F&& f, A&&
a, A&&
b)
{
}
{
}
{
}
{
}
};
public:
{
}
{
}
private:
{
}
{
}
{
}
{
}
{
}
};
#define BB_ASSERT_EQ(actual, expected,...)
static auto ref(const auto &t)
bool if_any_impl(const A &t, std::index_sequence< I... >) const
auto get_refs(T t, std::index_sequence< I... >) const
void for_each_in_tuple(F &&f, A &&t) const
auto apply2_impl(F &&f, A &&a, A &&b, std::index_sequence< I... >)
auto apply2(F &&f, A &&a, A &&b)
std::make_index_sequence< std::tuple_size_v< std::remove_reference_t< T > > > tuple_indexes
bool if_any_in(A &&t) const
bool operator!=(const zip_iterator &other) const
auto for_each_in_impl(F &&f, Tuple &&t, std::index_sequence< I... >) const
zip_iterator & operator++()
auto size_impl(std::index_sequence< I... >) const
std::make_index_sequence< sizeof...(S)> arg_indexes
auto max_size_impl(std::index_sequence< I... >) const
bool if_any_impl(const A &t, std::index_sequence< I... >) const
auto get_begins(std::index_sequence< I... >) const
auto get_ends(std::index_sequence< I... >) const
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept