Classes | Namespaces | Typedefs | Functions | Variables
tuple_traits.hpp File Reference

Implementation of traits for tuple-like types. More...

#include <tuple>
#include <type_traits>
#include <utility>
Include dependency graph for tuple_traits.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  beluga::common_tuple_type< T, U, Is >
 Meta-function that computes a common tuple type given two tuple-like types T and U. More...
 
struct  beluga::common_tuple_type< T, U, std::index_sequence< I... > >
 common_tuple_type specialization for std::index_sequence. More...
 
struct  beluga::decay_tuple_like< T, class >
 Meta-function that decays a tuple like type and its members. More...
 
struct  beluga::decay_tuple_like< TupleLike< Args... >, std::enable_if_t< is_tuple_like_v< std::decay_t< TupleLike< Args... > > > > >
 decay_tuple_like specialization for tuples. More...
 
struct  beluga::has_common_tuple_type< typename, typename, typename >
 Meta-function that checks for the existence of a common tuple type. More...
 
struct  beluga::has_common_tuple_type< T, U, std::void_t< common_tuple_type_t< T, U > > >
 has_common_tuple_type specialization for tuple-like types T and U for which a common tuple type exists. More...
 
struct  beluga::has_single_element< T, TupleLike, class >
 Meta-function that returns true if there is a single element of type T in the tuple-like type. More...
 
struct  beluga::is_tuple_like< T >
 Meta-function that returns true if T is a tuple-like type. More...
 
struct  beluga::tuple_index< T, TupleLike, class >
 Meta-function that returns the tuple index of the element whose type is T. More...
 

Namespaces

 beluga
 The main Beluga namespace.
 
 beluga::detail
 

Typedefs

template<typename T , typename U >
using beluga::common_tuple_type_t = typename common_tuple_type< T, U >::type
 Convenience template type alias for common_tuple_type. More...
 
template<class T >
using beluga::decay_tuple_like_t = typename decay_tuple_like< T >::type
 Convenience template type alias for decay_tuple_like. More...
 
template<class T , class TupleLike >
using beluga::tuple_index_t = typename tuple_index< T, TupleLike >::type
 Convenience template type alias for tuple_index. More...
 

Functions

template<class T , class TupleLike >
constexpr decltype(auto) beluga::element (TupleLike &&tuple) noexcept
 Returns element of a tuple like object whose type is T (or a possibly const reference to T). More...
 
template<class T , class... Args>
constexpr bool beluga::detail::tuple_index_found () noexcept
 Help method that returns true if a tuple element index that matches an input type is found. More...
 
template<class T , class... Args>
constexpr std::size_t beluga::detail::tuple_index_helper () noexcept
 Help method that finds a tuple element index that matches an input type. More...
 

Variables

template<typename T , typename U >
constexpr bool beluga::has_common_tuple_type_v = has_common_tuple_type<T, U>::value
 Convenience template variable for has_common_tuple_type. More...
 
template<class T , class TupleLike >
constexpr bool beluga::has_single_element_v = has_single_element<T, TupleLike>::value
 Convenience template variable for has_single_element. More...
 
template<class T >
constexpr bool beluga::is_tuple_like_v = is_tuple_like<T>::value
 Convenience template variable for is_tuple_like. More...
 
static constexpr std::size_t beluga::detail::kTupleIndexAmbiguous = static_cast<std::size_t>(-2)
 Constant value to return when there are multiple indices that match the input type. More...
 
static constexpr std::size_t beluga::detail::kTupleIndexNotFound = static_cast<std::size_t>(-1)
 Constant value to return when the index was not found. More...
 
template<class T , class TupleLike >
constexpr std::size_t beluga::tuple_index_v = tuple_index<T, TupleLike>::value
 Convenience template variable for tuple_index. More...
 

Detailed Description

Implementation of traits for tuple-like types.

Definition in file tuple_traits.hpp.



beluga
Author(s):
autogenerated on Tue Jul 16 2024 02:59:53