uTL
micro Template library
invoke.h File Reference

Go to the source code of this file.

Classes

struct  utl::meta::identity< _Tp >
 
struct  utl::meta::wrap< F >
 
struct  utl::meta::wrap_i< T, F >
 Wrap a template F taking literal constants of type T into an Invokable. More...
 
struct  utl::meta::detail::is_applicable_< F, T >
 
struct  utl::meta::detail::is_applicable_q_< F, T >
 
struct  utl::meta::detail::is_applicable_i_< T, F, Is >
 
struct  utl::meta::detail::defer_< F, Ts >
 
struct  utl::meta::detail::defer_i_< T, F, Is >
 
struct  utl::meta::quote< F >
 
struct  utl::meta::quote_i< T, F >
 Wrap a template F taking literal constants of type T into an Invokable. More...
 
struct  utl::meta::detail::compose_f_< Fns >
 
struct  utl::meta::detail::compose_f_< Fn0, Fns... >
 
struct  utl::meta::detail::compose_f_< Fn0 >
 
struct  utl::meta::detail::compose_< Fns >
 
struct  utl::meta::detail::compose_< Fn0, Fns... >
 
struct  utl::meta::detail::compose_< Fn0 >
 
struct  utl::meta::bind_front< Fn, Ts >
 
struct  utl::meta::bind_back< Fn, Ts >
 
struct  utl::meta::same_as< T1 >
 
struct  utl::meta::same_as< T1 >::apply< T2 >
 
struct  utl::meta::not_same_as< T1 >
 
struct  utl::meta::not_same_as< T1 >::apply< T2 >
 

Namespaces

 utl
 STL's core language concepts.
 
 utl::meta
 
 utl::meta::detail
 

Typedefs

meta::invoke

A meta-programming invoke() analogous. A meta::invocable shall contain a nested template type named apply which is bind to actual invocable meta-function.

  • We can use wrap<> or even better quote<> in order to wrap a metafunction to a type (metafunction class)
  • We can pass these wrapped types to other metafunctions
  • We can invoke<> the inner apply from a wrapped metafunction class.
template<typename _Tp >
using utl::meta::identity_t = eval< identity< _Tp > >
 identity type alias More...
 
template<typename Fn , typename... Args>
using utl::meta::invoke = typename Fn::template apply< Args... >
 
template<typename Fn , typename... Args>
using utl::meta::invoke_t = eval< invoke< Fn, Args... > >
 
template<template< typename... > class F, typename... T>
using utl::meta::is_applicable_t = eval< detail::is_applicable_< F, T... > >
 check if we can instantiate F with parameters T More...
 
template<typename Q , typename... T>
using utl::meta::is_applicable_qt = eval< detail::is_applicable_q_< Q, T... > >
 check if we can invoke Q with parameters T More...
 
template<typename T , template< T... > class F, T... Is>
using utl::meta::is_applicable_it = eval< detail::is_applicable_i_< T, F, Is... > >
 check if we can instantiate F with parameters Is of type T More...
 
template<template< class... > class F, class... Ts>
using utl::meta::defer = if_< detail::is_applicable_< F, Ts... >, detail::defer_< F, Ts... >, nil_ >
 defer alias template for F<Ts...> More...
 
template<typename T , template< T... > class F, T... Is>
using utl::meta::defer_i = if_< detail::is_applicable_i_< T, F, Is... >, detail::defer_i_< T, F, Is... >, nil_ >
 defer_i alias template for F<T, Is...> More...
 
template<typename... Fns>
using utl::meta::compose = detail::compose_< Fns... >
 
template<template< typename... > class... Fns>
using utl::meta::compose_f = detail::compose_f_< Fns... >