Horizon
Loading...
Searching...
No Matches
Modules | Classes | Typedefs
Trait

Trait invocation/composition. More...

Modules

 Invocation
 Trait invocation.
 
 Composition
 Trait composition.
 
 lazy
 

Classes

struct  meta::id< T >
 A trait that always returns its argument T. More...
 

Typedefs

template<typename T >
using meta::id_t = _t< id< T > >
 An alias for type T.
 
template<typename... >
using meta::void_ = void
 An alias for void.
 
template<typename T >
using meta::is_callable = _t< detail::is_callable_< T > >
 An alias for std::true_type if T::invoke exists and names a class template or alias template; otherwise, it's an alias for std::false_type.
 
template<typename T >
using meta::sizeof_ = meta::size_t< sizeof(T)>
 An alias that computes the size of the type T.
 
template<typename T >
using meta::alignof_ = meta::size_t< alignof(T)>
 An alias that computes the alignment required for any instance of the type T.
 
template<typename T , template< typename... > class C>
using meta::is = _t< detail::is_< T, C > >
 is
 
template<META_TYPE_CONSTRAINT(invocable) Fn>
using meta::not_fn = compose< quote< not_ >, Fn >
 Logically negate the result of invocable Fn.
 
template<typename... Ts>
using meta::lambda = if_c<(sizeof...(Ts) > 0), detail::lambda_< list< Ts... > > >
 For creating anonymous Invocables.
 
template<typename T >
using meta::is_valid = detail::is_valid_< T >
 For testing whether a deferred computation will succeed in a let or a lambda.
 
template<typename... As>
using meta::let = _t< _t< detail::let_< As... > > >
 A lexically scoped expression with local variables.
 

Detailed Description

Trait invocation/composition.

Typedef Documentation

◆ alignof_

template<typename T >
using meta::alignof_ = typedef meta::size_t<alignof(T)>

An alias that computes the alignment required for any instance of the type T.

Complexity
O(1).

◆ id_t

template<typename T >
using meta::id_t = typedef _t<id<T> >

An alias for type T.

Useful in non-deduced contexts.

◆ is

template<typename T , template< typename... > class C>
using meta::is = typedef _t<detail::is_<T, C> >

is

Test whether a type T is an instantiation of class template C.

◆ lambda

template<typename... Ts>
using meta::lambda = typedef if_c<(sizeof...(Ts) > 0), detail::lambda_<list<Ts...> >>

For creating anonymous Invocables.

static_assert(std::is_same_v<P, std::pair<short, std::pair<int, int>>>, "");
typename Fn::template invoke< Args... > invoke
Evaluate the invocable Fn with the arguments Args.
Definition meta.hpp:541
if_c<(sizeof...(Ts) > 0), detail::lambda_< list< Ts... > > > lambda
For creating anonymous Invocables.
Definition meta.hpp:3594

◆ let

template<typename... As>
using meta::let = typedef _t<_t<detail::let_<As...> >>

A lexically scoped expression with local variables.

template <typename T, typename L>
using find_index_ = let<
std::is_same<_b, list<>>,
static_assert(find_index_<int, list<short, int, float>>{} == 1, "");
static_assert(find_index_<double, list<short, int, float>>{} == meta::npos{}, "");
meta::size_t< std::size_t(-1)> npos
A special value used to indicate no matches.
Definition meta.hpp:1676
_t< _t< detail::let_< As... > > > let
A lexically scoped expression with local variables.
Definition meta.hpp:3660
A wrapper that defers the instantiation of a template C with type parameters Ts in a lambda or let ex...
Definition meta.hpp:787
For use when defining local variables in meta::let expressions.
Definition meta.hpp:3622

◆ sizeof_

template<typename T >
using meta::sizeof_ = typedef meta::size_t<sizeof(T)>

An alias that computes the size of the type T.

Complexity
O(1).