mpc
Haskell-like feature supports in C++
tagged_union.hpp File Reference
#include <variant>
#include <mpc/utility/single.hpp>

Go to the source code of this file.

Classes

struct  mpc::detail::tagged_union_impl< std::index_sequence< Idx... >, Args... >
 

Namespaces

namespace  mpc::detail
 Implementation details are here.
 

Typedefs

template<class T , std::size_t Idx>
using mpc::nth_element_t = single< T, index_constant< Idx > >
 
template<class... Args>
using mpc::tagged_union = typename detail::tagged_union_impl< std::index_sequence_for< Args... >, Args... >::type
 

Functions

template<std::size_t Idx, class T >
constexpr nth_element_t< T, Idx > mpc::make_nth_element (T &&t)