uTL
micro Template library
utl::common_impl Namespace Reference

Classes

struct  __common_ref_
 
struct  __common_ref_< T &&, U &&, meta::void_t< __common_ref< T &, U & >, meta::when< ConvertibleTo< T &&, __rref_res< T, U > > >, meta::when< ConvertibleTo< U &&, __rref_res< T, U > > > > >
 
struct  __common_ref_< T &&, U &, meta::void_t< __common_ref< const T &, U & >, meta::when< ConvertibleTo< T &&, __common_ref< const T &, U & > > > > >
 
struct  __common_ref_< T &, U &&, meta::void_t< __common_ref< T &, const U & >, meta::when< ConvertibleTo< U &&, __common_ref< T &, const U & > > > > >
 
struct  __common_ref_< T &, U &, meta::void_t< __lref_res< T, U >, meta::when< std::is_reference< __lref_res< T, U > >::value > > >
 
struct  __common_reference
 
struct  __common_reference2
 
struct  __common_reference2< T, U, meta::void_t< __basic_common_reference_t< T, U > > >
 
struct  __common_reference3
 
struct  __common_reference3< T, U, meta::void_t< __cond_res< T, U > > >
 
struct  __common_reference< T, U, meta::when< std::is_reference< T >::value &&std::is_reference< U >::value > >
 
struct  __copy_cv_
 
struct  __copy_cv_< const From >
 
struct  __copy_cv_< const volatile From >
 
struct  __copy_cv_< volatile From >
 
struct  __xref
 
struct  __xref< const T >
 
struct  __xref< const volatile T >
 
struct  __xref< T & >
 
struct  __xref< T && >
 
struct  __xref< volatile T >
 
struct  basic_common_reference
 
struct  common_reference
 
struct  common_reference< T >
 
struct  common_reference< T, U >
 
struct  common_reference< T, U, V, W... >
 

Typedefs

template<class T , class U >
using __cond_res = decltype(false ? std::declval< T(&)()>()() :std::declval< U(&)()>()())
 
template<class From , class To >
using __copy_cv = meta::invoke< __copy_cv_< From >, To >
 
template<class T >
using __cref = std::add_lvalue_reference_t< const std::remove_reference_t< T > >
 
template<class T , class U >
using __common_ref = meta::eval< __common_ref_< T, U > >
 
template<class T , class U >
using __lref_res = __cond_res< __copy_cv< T, U > &, __copy_cv< U, T > &>
 
template<class T , class U , class R = __common_ref<T&, U&>>
using __rref_res = std::remove_reference_t< R > &&
 
template<class T , class U >
using __basic_common_reference_t = meta::eval< basic_common_reference< remove_cvref_t< T >, remove_cvref_t< U >, __xref< T >::template apply, __xref< U >::template apply > >
 
template<class... Ts>
using common_reference_t = meta::eval< common_reference< Ts... > >
 

Detailed Description

Common Reference

Typedef Documentation

◆ __basic_common_reference_t

template<class T , class U >
using utl::common_impl::__basic_common_reference_t = typedef meta::eval< basic_common_reference< remove_cvref_t<T>, remove_cvref_t<U>, __xref<T>::template apply, __xref<U>::template apply > >

Definition at line 219 of file stl.h.

◆ __common_ref

template<class T , class U >
using utl::common_impl::__common_ref = typedef meta::eval<__common_ref_<T, U> >

Definition at line 133 of file stl.h.

◆ __cond_res

template<class T , class U >
using utl::common_impl::__cond_res = typedef decltype(false ? std::declval<T(&)()>()() : std::declval<U(&)()>()())
See also
https://ericniebler.github.io/std/wg21/D0022.html

Definition at line 99 of file stl.h.

◆ __copy_cv

template<class From , class To >
using utl::common_impl::__copy_cv = typedef meta::invoke<__copy_cv_<From>, To>

Definition at line 119 of file stl.h.

◆ __cref

template<class T >
using utl::common_impl::__cref = typedef std::add_lvalue_reference_t<const std::remove_reference_t<T> >

Definition at line 123 of file stl.h.

◆ __lref_res

template<class T , class U >
using utl::common_impl::__lref_res = typedef __cond_res< __copy_cv<T, U> &, __copy_cv<U, T> & >

Definition at line 140 of file stl.h.

◆ __rref_res

template<class T , class U , class R = __common_ref<T&, U&>>
using utl::common_impl::__rref_res = typedef std::remove_reference_t<R>&&

Definition at line 144 of file stl.h.

◆ common_reference_t

template<class... Ts>
using utl::common_impl::common_reference_t = typedef meta::eval< common_reference<Ts...> >

Definition at line 227 of file stl.h.