sfinae.h
Go to the documentation of this file.
#ifndef __utl_meta_sfinae_h__
#define __utl_meta_sfinae_h__
#include <utl/core/impl.h>
#include <type_traits>
namespace utl {
namespace meta {
namespace detail {
// template <typename... T>
// struct dev_null { using type = dev_null; }; //< Same as typelist
template <bool If> struct when_ { };
template <> struct when_<true> { using type = void; };
}
template <bool If>
using when = eval< detail::when_<If> >;
// //! Well formed only if all of \p Ifs are \c true
// template <bool ...Ifs>
// using when_all = detail::dev_null<
// when<Ifs>...
// >;
template <bool If, typename _Tp = void> using enable_if = std::enable_if<If, _Tp>;
template<bool If, typename _Tp = void> using enable_if_t = eval< enable_if<If, _Tp> >;
}}
#endif /* __utl_meta_sfinae_h__ */
utl::meta::detail::when_< true >::type
void type
Definition: sfinae.h:42
utl::meta::enable_if
std::enable_if< If, _Tp > enable_if
enable_if, imported from stl
Definition: sfinae.h:60
utl::meta::detail::when_
Definition: sfinae.h:41
utl::meta::eval
typename Tp::type eval
Type alias for Tp::type. Used to evaluate/extract return type of metafunctions.
Definition: integral.h:49
utl
STL&#39;s core language concepts.
Definition: _1wire.h:30
utl::meta::enable_if_t
eval< enable_if< If, _Tp > > enable_if_t
alias template for enable_if
Definition: sfinae.h:63
utl::meta::when
eval< detail::when_< If > > when
Well formed only if If is true.
Definition: sfinae.h:46
impl.h
Implementation detail main forward header.