mpc
Haskell-like feature supports in C++
single.hpp File Reference

Go to the source code of this file.

Classes

struct  mpc::single< T, Tag >
 A class that holds a single value. More...
 
struct  std::tuple_size< mpc::single< T, Tag > >
 A partial specialization of std::tuple_size for mpc::single. More...
 
struct  std::tuple_element< Idx, mpc::single< T, Tag > >
 A partial specialization of std::tuple_element for mpc::single. More...
 

Functions

template<class T , class Tag = void>
 mpc::single (T) -> single< T >
 A deduction guide for single.
 
template<std::swappable T, class Tag >
void mpc::swap (single< T, Tag > &lhs, single< T, Tag > &rhs) noexcept(std::is_nothrow_swappable_v< T >)
 swap for single
 
template<std::size_t Idx, class T , class Tag >
requires (Idx < 1)
constexpr decltype(auto) mpc::get (single< T, Tag > &s)
 get for single
 
template<std::size_t Idx, class T , class Tag >
requires (Idx < 1)
constexpr decltype(auto) mpc::get (const single< T, Tag > &s)
 Another overloaded function of get.
 
template<std::size_t Idx, class T , class Tag >
requires (Idx < 1)
constexpr decltype(auto) mpc::get (single< T, Tag > &&s)
 Another overloaded function of get.
 
template<std::size_t Idx, class T , class Tag >
requires (Idx < 1)
constexpr decltype(auto) mpc::get (const single< T, Tag > &&s)
 Another overloaded function of get.