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

Go to the source code of this file.

Typedefs

template<class T , class U >
using mpc::__override_ref_t = std::conditional_t< std::is_rvalue_reference_v< T >, std::remove_reference_t< U > &&, U & >
 
template<class T , class U >
using mpc::__copy_const_t = std::conditional_t< std::is_const_v< std::remove_reference_t< T > >, U const, U >
 
template<class T , class U >
using mpc::forward_like_t = __override_ref_t< T &&, __copy_const_t< T, std::remove_reference_t< U > > >
 

Functions

template<typename T >
constexpr auto mpc::forward_like (auto &&x) noexcept -> forward_like_t< T, decltype(x)>