Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
tuplet.hpp File Reference
#include <cstddef>
#include <type_traits>
#include <utility>

Go to the source code of this file.

Classes

struct  tuplet::type_list< T >
 Represents a list of types. More...
 
struct  tuplet::detail::_forward_as< Tup, B >
 
struct  tuplet::detail::_forward_as< Tup &, B >
 
struct  tuplet::detail::_forward_as< Tup &&, B >
 
struct  tuplet::detail::_forward_as< Tup const &, B >
 
struct  tuplet::detail::_forward_as< Tup const &&, B >
 
struct  tuplet::unwrap_reference< T >
 
struct  tuplet::unwrap_reference< std::reference_wrapper< U > >
 
struct  tuplet::unwrap_ref_decay< T >
 
struct  tuplet::type_map< Bases >
 
struct  tuplet::tuple_elem< I, T >
 
struct  tuplet::detail::_get_tuple_base< std::index_sequence< I... >, T... >
 
struct  tuplet::tuple< T >
 
struct  tuplet::tuple<>
 
struct  tuplet::pair< First, Second >
 
struct  tuplet::convert< Tuple >
 
struct  std::tuple_size< tuplet::tuple< T... > >
 
struct  std::tuple_element< I, tuplet::tuple< T... > >
 
struct  std::tuple_size< tuplet::pair< A, B > >
 
struct  std::tuple_element< I, tuplet::pair< A, B > >
 

Namespaces

namespace  tuplet
 
namespace  tuplet::sfinae
 
namespace  tuplet::sfinae::detail
 
namespace  tuplet::detail
 
namespace  tuplet::literals
 
namespace  tuplet::literals::detail
 
namespace  std
 STL namespace.
 

Macros

#define TUPLET_INLINE
 
#define _TUPLET_COMPARISON_OPERATOR_1(type, member, op)
 
#define TUPLET_FWD_M(TupleType, BaseType, tup, value)   static_cast<TupleType&&>(tup).BaseType::value
 Looks up a member in a tuple via the base class, and forwards it.
 
#define TUPLET_GET_M(BaseType, tup, value)   tup.BaseType::value
 
#define TUPLET_DEFAULTED_COMPARISON   0
 
#define TUPLET_OTHER_THAN(Self, Other)   class Other, class = ::tuplet::sfinae::other_than<Self, Other>
 
#define TUPLET_WEAK_CONCEPT(...)   class
 
#define TUPLET_WEAK_REQUIRES(...)
 
#define _TUPLET_TYPES_EQ_WITH(T, U)    ::std::enable_if_t<::tuplet::sfinae::detail::_all_true<::tuplet::sfinae::detail::_has_eq<T, U>...>(), bool>
 
#define _TUPLET_TYPES_CMP_WITH(T, U)    ::std::enable_if_t<::tuplet::sfinae::detail::_all_true<::tuplet::sfinae::detail::_has_cmp<T, U>...>(), bool>
 
#define TUPLET_HAS_NO_UNIQUE_ADDRESS   0
 
#define TUPLET_NO_UNIQUE_ADDRESS
 
#define TUPLET_CAT_BY_FORWARDING_TUPLE   1
 

Typedefs

template<class A , class B >
using tuplet::sfinae::other_than = std::enable_if_t<!std::is_same_v< std::decay_t< A >, std::decay_t< B > > >
 Implement assignment but preserve default assignment.
 
template<class T >
using tuplet::unwrap_ref_decay_t = typename unwrap_ref_decay< T >::type
 
template<class T >
using tuplet::identity_t = T
 
template<class Tup , class B >
using tuplet::forward_as_t = typename ::tuplet::detail::_forward_as< Tup, B >::type
 
template<class First , class... >
using tuplet::first_t = First
 
template<class T >
using tuplet::type_t = typename T::type
 
template<size_t I>
using tuplet::tag = std::integral_constant< size_t, I >
 
template<size_t N>
using tuplet::tag_range = std::make_index_sequence< N >
 
template<class Tup >
using tuplet::base_list_t = typename std::decay_t< Tup >::base_list
 
template<class Tup >
using tuplet::element_list_t = typename std::decay_t< Tup >::element_list
 
template<class... T>
using tuplet::tuple_base_t = typename detail::_get_tuple_base< tag_range< sizeof...(T)>, T... >::type
 

Functions

template<class... Ls, class... Rs>
TUPLET_INLINE constexpr auto tuplet::operator+ (type_list< Ls... >, type_list< Rs... >)
 Convinience + operator for catenating type lists.
 
template<class T , class U , class = decltype(std::declval<T>() == std::declval<U>())>
constexpr bool tuplet::sfinae::detail::_test_eq (int)
 
template<class T , class U >
constexpr bool tuplet::sfinae::detail::_test_eq (long long)
 
template<class T , class U , class = decltype(std::declval<T>() < std::declval<U>())>
constexpr bool tuplet::sfinae::detail::_test_less (int)
 
template<class T , class U >
constexpr bool tuplet::sfinae::detail::_test_less (long long)
 
template<class Tup , class = typename Tup::base_list>
constexpr bool tuplet::sfinae::detail::_has_base_list (int)
 
template<class Tup >
constexpr bool tuplet::sfinae::detail::_has_base_list (long long)
 
template<bool... B>
constexpr bool tuplet::sfinae::detail::_all_true ()
 
template<class... T, class... U>
constexpr bool tuplet::sfinae::detail::_all_has_eq (type_list< T... >, type_list< U... >)
 
template<class... T, class... U>
constexpr bool tuplet::sfinae::detail::_all_has_cmp (type_list< T... >, type_list< U... >)
 
constexpr bool tuplet::sfinae::detail::_all_has_eq (type_list<>, type_list<>)
 
constexpr bool tuplet::sfinae::detail::_all_has_cmp (type_list<>, type_list<>)
 
template<class A , class B , class = decltype(std::declval<A>().compare(std::declval<B>()))>
constexpr bool tuplet::sfinae::detail::_test_m_compare (int)
 
template<class , class >
constexpr bool tuplet::sfinae::detail::_test_m_compare (long long)
 
template<class T , class U >
TUPLET_INLINE constexpr bool tuplet::detail::_partial_cmp (T const &a, U const &b, bool &less)
 
template<class Tup , class... B1>
TUPLET_INLINE constexpr bool tuplet::detail::_equals (Tup const &t1, Tup const &t2, type_list< B1... >)
 
template<class Tup , class... B1>
TUPLET_INLINE constexpr bool tuplet::detail::_less (Tup const &t1, Tup const &t2, type_list< B1... >)
 
template<class Tup , class... B1>
TUPLET_INLINE constexpr bool tuplet::detail::_less_eq (Tup const &t1, Tup const &t2, type_list< B1... >)
 
template<class Tup1 , class Tup2 , class... B1, class... B2>
TUPLET_INLINE constexpr bool tuplet::detail::_equals (Tup1 const &t1, Tup2 const &t2, type_list< B1... >, type_list< B2... >)
 
template<class Tup1 , class Tup2 , class... B1, class... B2>
TUPLET_INLINE constexpr bool tuplet::detail::_less (Tup1 const &t1, Tup2 const &t2, type_list< B1... >, type_list< B2... >)
 
template<class Tup1 , class Tup2 , class... B1, class... B2>
TUPLET_INLINE constexpr bool tuplet::detail::_less_eq (Tup1 const &t1, Tup2 const &t2, type_list< B1... >, type_list< B2... >)
 
template<class Tup , class F , class... B>
TUPLET_INLINE constexpr void tuplet::detail::_for_each (Tup &&tup, F &&func, type_list< B... >)
 
template<class Tup , class F , class... B>
TUPLET_INLINE constexpr bool tuplet::detail::_any (Tup &&tup, F &&func, type_list< B... >)
 
template<class Tup , class F , class... B>
TUPLET_INLINE constexpr bool tuplet::detail::_all (Tup &&tup, F &&func, type_list< B... >)
 
template<class Tup , class F , class... B>
TUPLET_INLINE constexpr auto tuplet::detail::_map (Tup &&tup, F &&func, type_list< B... >) -> tuple< decltype(func(TUPLET_FWD_M(Tup, B, tup, value)))... >
 
template<class Tup , class F , class... B>
TUPLET_INLINE constexpr decltype(autotuplet::detail::_apply (Tup &&t, F &&f, type_list< B... >)
 
template<class U , class Tup , class... B>
TUPLET_INLINE constexpr U tuplet::detail::_convert (Tup &&t, type_list< B... >)
 
template<class... Ts>
 tuplet::tuple (Ts...) -> tuple< unwrap_ref_decay_t< Ts >... >
 
template<class A , class B >
 tuplet::pair (A, B) -> pair< unwrap_ref_decay_t< A >, unwrap_ref_decay_t< B > >
 
template<class Tuple >
 tuplet::convert (Tuple &) -> convert< Tuple & >
 
template<class Tuple >
 tuplet::convert (Tuple const &) -> convert< Tuple const & >
 
template<class Tuple >
 tuplet::convert (Tuple &&) -> convert< Tuple >
 
template<size_t I, TUPLET_WEAK_CONCEPT(indexable) Tup>
TUPLET_INLINE constexpr decltype(auto) tuplet::get (Tup &&tup)
 
template<class... T>
TUPLET_INLINE constexpr tuple< T &... > tuplet::tie (T &... t)
 
template<class F , TUPLET_WEAK_CONCEPT(base_list_tuple) Tup>
TUPLET_INLINE constexpr decltype(autotuplet::apply (F &&func, Tup &&tup)
 
template<class F , class A , class B >
TUPLET_INLINE constexpr decltype(autotuplet::apply (F &&func, tuplet::pair< A, B > &pair)
 
template<class F , class A , class B >
TUPLET_INLINE constexpr decltype(autotuplet::apply (F &&func, tuplet::pair< A, B > const &pair)
 
template<class F , class A , class B >
TUPLET_INLINE constexpr decltype(autotuplet::apply (F &&func, tuplet::pair< A, B > &&pair)
 
template<class... T>
TUPLET_INLINE void tuplet::swap (tuple< T... > &a, tuple< T... > &b) noexcept(tuple< T... >::nothrow_swappable)
 
template<class A , class B >
TUPLET_INLINE void tuplet::swap (pair< A, B > &a, pair< A, B > &b) noexcept(pair< A, B >::nothrow_swappable)
 
template<typename... Ts>
TUPLET_INLINE constexpr auto tuplet::make_tuple (Ts &&... args)
 
template<typename... T>
TUPLET_INLINE constexpr auto tuplet::forward_as_tuple (T &&... a) noexcept
 
template<class T , class... Q>
TUPLET_INLINE constexpr auto tuplet::detail::_repeat_type (type_list< Q... >)
 
template<class... Outer>
TUPLET_INLINE constexpr auto tuplet::detail::_get_outer_bases (type_list< Outer... >)
 
template<class... Outer>
TUPLET_INLINE constexpr auto tuplet::detail::_get_inner_bases (type_list< Outer... >)
 
template<class T , class... Outer, class... Inner>
TUPLET_INLINE constexpr auto tuplet::detail::_tuple_cat (T tup, type_list< Outer... >, type_list< Inner... >) -> tuple< type_t< Inner >... >
 
template<TUPLET_WEAK_CONCEPT(base_list_tuple)... T>
constexpr auto tuplet::tuple_cat (T &&... ts)
 
template<char... D>
constexpr size_t tuplet::literals::detail::_size_t_from_digits ()
 
template<char... D>
constexpr auto tuplet::literals::operator""_tag () noexcept -> tag< detail::_size_t_from_digits< D... >()>
 

Variables

template<class T , class U >
constexpr bool tuplet::sfinae::detail::_has_eq = _test_eq<T, U>(0)
 
template<class T , class U = T>
constexpr bool tuplet::sfinae::detail::_has_cmp = _test_eq<T, U>(0) && _test_less<T, U>(0)
 
template<size_t I>
constexpr tag< Ituplet::tag_v {}
 
template<class T >
constexpr bool tuplet::stateless_v = std::is_empty_v<std::decay_t<T>>
 
template<class Tuple >
constexpr auto tuplet::base_list_tuple_v
 

Macro Definition Documentation

◆ _TUPLET_COMPARISON_OPERATOR_1

#define _TUPLET_COMPARISON_OPERATOR_1 (   type,
  member,
  op 
)
Value:
TUPLET_INLINE constexpr auto operator op(type const& other) const noexcept(noexcept(member op other.member)) \
{ \
return member op other.member; \
}
#define TUPLET_INLINE
Definition tuplet.hpp:24

Definition at line 28 of file tuplet.hpp.

◆ _TUPLET_TYPES_CMP_WITH

#define _TUPLET_TYPES_CMP_WITH (   T,
 
)     ::std::enable_if_t<::tuplet::sfinae::detail::_all_true<::tuplet::sfinae::detail::_has_cmp<T, U>...>(), bool>

Definition at line 75 of file tuplet.hpp.

◆ _TUPLET_TYPES_EQ_WITH

#define _TUPLET_TYPES_EQ_WITH (   T,
 
)     ::std::enable_if_t<::tuplet::sfinae::detail::_all_true<::tuplet::sfinae::detail::_has_eq<T, U>...>(), bool>

Definition at line 73 of file tuplet.hpp.

◆ TUPLET_CAT_BY_FORWARDING_TUPLE

#define TUPLET_CAT_BY_FORWARDING_TUPLE   1

◆ TUPLET_DEFAULTED_COMPARISON

#define TUPLET_DEFAULTED_COMPARISON   0

Definition at line 55 of file tuplet.hpp.

◆ TUPLET_FWD_M

#define TUPLET_FWD_M (   TupleType,
  BaseType,
  tup,
  value 
)    static_cast<TupleType&&>(tup).BaseType::value

Looks up a member in a tuple via the base class, and forwards it.

Definition at line 47 of file tuplet.hpp.

◆ TUPLET_GET_M

#define TUPLET_GET_M (   BaseType,
  tup,
  value 
)    tup.BaseType::value

Definition at line 48 of file tuplet.hpp.

◆ TUPLET_HAS_NO_UNIQUE_ADDRESS

#define TUPLET_HAS_NO_UNIQUE_ADDRESS   0

Definition at line 103 of file tuplet.hpp.

◆ TUPLET_INLINE

#define TUPLET_INLINE

Definition at line 24 of file tuplet.hpp.

◆ TUPLET_NO_UNIQUE_ADDRESS

#define TUPLET_NO_UNIQUE_ADDRESS

Definition at line 104 of file tuplet.hpp.

◆ TUPLET_OTHER_THAN

#define TUPLET_OTHER_THAN (   Self,
  Other 
)    class Other, class = ::tuplet::sfinae::other_than<Self, Other>

Definition at line 69 of file tuplet.hpp.

◆ TUPLET_WEAK_CONCEPT

#define TUPLET_WEAK_CONCEPT (   ...)    class

Definition at line 70 of file tuplet.hpp.

◆ TUPLET_WEAK_REQUIRES

#define TUPLET_WEAK_REQUIRES (   ...)

Definition at line 71 of file tuplet.hpp.