Vcsn  2.4
Be Rational
tuple.hh File Reference
#include <iostream>
#include <tuple>
#include <vcsn/misc/functional.hh>
#include <vcsn/misc/type_traits.hh>
Include dependency graph for tuple.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  vcsn::detail::index_sequence<... >
 
struct  vcsn::detail::concat< S1, S2 >
 
struct  vcsn::detail::concat< index_sequence< I1... >, index_sequence< I2... > >
 
struct  vcsn::detail::make_index_sequence< N >
 
struct  vcsn::detail::make_index_sequence< N >
 
struct  vcsn::detail::make_index_sequence< 0 >
 
struct  vcsn::detail::make_index_sequence< 1 >
 
struct  vcsn::detail::int_range< off, S2 >
 
struct  vcsn::detail::int_range< off, index_sequence< I... > >
 
struct  vcsn::detail::make_index_range_impl< S, L >
 A static range. More...
 
struct  vcsn::detail::make_index_range_impl< S, 0 >
 
struct  vcsn::detail::make_index_range_impl< S,-1U >
 
struct  vcsn::detail::make_index_range< S, E >
 A static range. More...
 
struct  vcsn::detail::concat_index_sequence< S1, S2 >
 
struct  vcsn::detail::concat_index_sequence< index_sequence< I1... >, index_sequence< I2... > >
 
struct  vcsn::detail::index_sequence_difference< S1, S2 >
 Get the list containing all the elements of I1 (contiguous sequence from 0 to N) not present in I2 (arbitrary sequence, sorted). More...
 
struct  vcsn::detail::index_sequence_difference< index_sequence< I1_1, I1... >, index_sequence< I1_1, I2... > >
 
struct  vcsn::detail::index_sequence_difference< index_sequence< I1_1, I1... >, index_sequence< I2_1, I2... > >
 
struct  vcsn::detail::index_sequence_difference< index_sequence< I1_1, I1... >, index_sequence<> >
 
struct  vcsn::detail::index_sequence_difference< index_sequence<>, index_sequence<> >
 
struct  vcsn::detail::tuple_printer< Tuple, N >
 
struct  vcsn::detail::tuple_printer< Tuple, 1 >
 
struct  vcsn::detail::if_c< c, T1, T2 >
 
struct  vcsn::detail::if_c< false, T1, T2 >
 
struct  vcsn::detail::if_< C, T1, T2 >
 
struct  vcsn::detail::eval_if_c< c, F1, F2 >
 Test if (c) then F1 else F2 and get the value. More...
 
struct  vcsn::detail::eval_if< C, F1, F2 >
 
struct  vcsn::detail::and_< F >
 And condition on several typenames. More...
 
struct  vcsn::detail::and_< F1, F... >
 
struct  vcsn::detail::and_< F1 >
 
struct  vcsn::detail::and_<>
 
struct  vcsn::detail::or_< F >
 Or condition on several typenames. More...
 
struct  vcsn::detail::or_< F1, F... >
 
struct  vcsn::detail::or_< F1 >
 
struct  vcsn::detail::or_<>
 
struct  vcsn::any
 Whether some of the values evaluate as true. More...
 
struct  std::hash< std::tuple< Elements... > >
 

Namespaces

 vcsn
 
 vcsn::detail
 

Typedefs

template<size_t I, typename T >
using vcsn::tuple_element_t = typename std::tuple_element< I, T >::type
 C++14. More...
 
template<typename S1 , typename S2 >
using vcsn::detail::Concat = typename concat< S1, S2 >::type
 
template<std::size_t N>
using vcsn::detail::GenSeq = typename make_index_sequence< N >::type
 
template<std::size_t S, std::size_t E>
using vcsn::detail::make_index_range_t = typename make_index_range< S, E >::type
 
template<typename S1 , typename S2 >
using vcsn::detail::concat_sequence = typename concat_index_sequence< S1, S2 >::type
 
template<typename S1 , typename S2 >
using vcsn::detail::sequence_difference = typename index_sequence_difference< typename S1::type, typename S2::type >::type
 

Functions

template<typename Fun , typename... Ts>
void vcsn::detail::for_ (const std::tuple< Ts... > &ts, Fun f)
 
template<typename Fun , typename... Ts, size_t... I>
void vcsn::detail::for_ (Fun f, const std::tuple< Ts... > &ts, index_sequence< I... >)
 
template<typename Fun , typename... Ts>
auto vcsn::detail::map (const std::tuple< Ts... > &ts, Fun f) -> decltype(map_tuple_(f, ts, make_index_sequence< sizeof...(Ts)>()))
 Map a function on a tuple, return tuple of the results. More...
 
template<typename Fun , typename... Ts, size_t... I>
auto vcsn::detail::map_impl_ (Fun f, const std::tuple< Ts... > &ts, index_sequence< I... >)
 
template<typename Fun , typename... Args>
auto vcsn::detail::apply (Fun f, const std::tuple< Args... > &args) -> decltype(apply_impl_(f, args, make_index_sequence< sizeof...(Args)>()))
 Unpack a tuple, and pass its content as argument to a funtion. More...
 
template<typename Fun , typename... Args, size_t... I>
auto vcsn::detail::apply_impl_ (Fun f, const std::tuple< Args... > &args, index_sequence< I... >) -> decltype(f(std::get< I >(args)...))
 
template<typename... Funs, typename... Args>
auto vcsn::detail::apply (const std::tuple< Funs... > &funs, const std::tuple< Args... > &args)
 Apply a tuple of functions on a tuple of arguments, return the tuple of results. More...
 
template<typename... Funs, typename... Args, size_t... I>
auto vcsn::detail::apply_impl_ (const std::tuple< Funs... > &funs, const std::tuple< Args... > &args, index_sequence< I... >)
 Apply a tuple of functions on a tuple of arguments, return the tuple of results. More...
 
template<typename Fun , typename... Objs, typename... Args>
auto vcsn::detail::apply (Fun fun, const std::tuple< Objs... > &objs, const std::tuple< Args... > &args)
 Apply a tuple of member functions on a tuple of arguments, return the tuple of results. More...
 
template<typename Fun , typename... Objs, typename... Args, size_t... I>
auto vcsn::detail::apply_impl_ (Fun fun, const std::tuple< Objs... > &objs, const std::tuple< Args... > &args, index_sequence< I... >)
 
template<typename Fun >
void vcsn::detail::cross (Fun f)
 Variadic Cartesian product of containers. More...
 
template<typename Fun , typename Cont , typename... Conts>
void vcsn::detail::cross (Fun f, const Cont &head, const Conts &...tails)
 
template<typename Fun , typename... Ts, size_t... I>
void vcsn::detail::cross_tuple_ (Fun f, const std::tuple< Ts... > &ts, index_sequence< I... >)
 
template<typename Fun , typename... Ts>
void vcsn::detail::cross_tuple (Fun f, const std::tuple< Ts... > &ts)
 
template<typename... Ts>
auto vcsn::detail::reverse_tuple (const std::tuple< Ts... > &t) -> decltype(reverse_tuple(t, make_index_sequence< sizeof...(Ts)>()))
 
template<typename... Ts, std::size_t... I>
auto vcsn::detail::reverse_tuple (const std::tuple< Ts... > &t, index_sequence< I... >) -> decltype(std::make_tuple(std::get< sizeof...(Ts)-1-I >(t)...))
 
template<typename... Ts>
auto vcsn::detail::make_gcc_tuple (Ts &&...ts) -> decltype(reverse_tuple(std::make_tuple(std::forward< Ts >(ts)...)))
 Same as make_tuple, unless the evaluation of arguments if right-to-left, in which case reverse the result. More...
 
template<typename... Args>
std::ostream & vcsn::detail::print (const std::tuple< Args... > &args, std::ostream &o)
 
template<bool... B>
constexpr bool vcsn::any_ ()
 Static evaluation of the 'or' of the template parameters. More...
 
template<bool... B>
constexpr bool vcsn::all_ ()
 
template<typename... Bool>
bool vcsn::all (Bool &&...values)
 Whether all the values evaluate as true. More...