useif.h
Go to the documentation of this file.
#ifndef __utl_meta_useif_h__
#define __utl_meta_useif_h__
#include <utl/core/impl.h>
#include <utl/meta/operations.h>
#include <utl/meta/sfinae.h>
namespace utl {
namespace meta {
template <typename _T1, typename _T2, typename _Ret =_T1>
using use_if_same_t = enable_if_t<
same_<_T1, _T2>::value, _Ret
>;
template <typename _T1, typename _T2, typename _Ret =_T1>
using use_if_not_same_t = enable_if_t<
!same_<_T1, _T2>::value, _Ret
>;
template <typename T1, typename... Ts>
using use_if_any_t = enable_if_t<
or_<T1, Ts...>::value, T1
>;
template <typename T1, typename... Ts>
using use_if_all_t = enable_if_t<
and_<T1, Ts...>::value, T1
>;
}}
#endif /* __utl_meta_useif_h__ */
utl::meta::use_if_same_t
enable_if_t< same_< _T1, _T2 >::value, _Ret > use_if_same_t
If same type resolves to _Ret, else SFINAE.
Definition: useif.h:40
utl::meta::use_if_not_same_t
enable_if_t< !same_< _T1, _T2 >::value, _Ret > use_if_not_same_t
If not same type resolves to _Ret, else SFINAE.
Definition: useif.h:45
operations.h
Integral constant operations and logical operations.
utl::meta::use_if_all_t
enable_if_t< and_< T1, Ts... >::value, T1 > use_if_all_t
If both type (_T1 and _T2) type resolves to _Ret, else to SFINAE.
Definition: useif.h:56
utl
STL&#39;s core language concepts.
Definition: _1wire.h:30
utl::meta::same_
Definition: operations.h:102
sfinae.h
Template meta-programming SFINAE helpers.
utl::meta::enable_if_t
eval< enable_if< If, _Tp > > enable_if_t
alias template for enable_if
Definition: sfinae.h:63
utl::meta::or_
eval< detail::_or_< _Ts... > > or_
Definition: operations.h:70
utl::meta::and_
eval< detail::_and_< _Ts... > > and_
Definition: operations.h:96
utl::meta::use_if_any_t
enable_if_t< or_< T1, Ts... >::value, T1 > use_if_any_t
If any type (_T1 or _T2) type resolves to _Ret, else to SFINAE.
Definition: useif.h:50
impl.h
Implementation detail main forward header.