Mercury Currency Engine
Classes | Typedefs | Functions
function_utility.hpp File Reference
#include <type_traits>
#include <functional>
Include dependency graph for function_utility.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mce::detail::convert_void_< T >
 
struct  mce::detail::convert_void_< void >
 
struct  mce::detail::is_container< T, _ >
 
struct  mce::detail::is_container_helper< Ts >
 
struct  mce::detail::is_container< T, conditional_t< false, is_container_helper< typename T::value_type, typename T::iterator, decltype(std::declval< T >().begin()), decltype(std::declval< T >().end()) >, void > >
 

Typedefs

template<typename T >
using mce::detail::unqualified = typename std::decay< T >::type
 
template<typename F , typename... Ts>
using mce::detail::function_return_type = typename std::result_of< unqualified< F >(Ts...)>::type
 
template<typename F , typename... A>
using mce::detail::convert_void_return = typename convert_void_< function_return_type< F, A... > >::type
 
template<bool B, class T , class F >
using mce::detail::conditional_t = typename std::conditional< B, T, F >::type
 
using mce::thunk = std::function< void()>
 thunk type definition. Also known as a nullary function
 

Functions

template<typename F , typename... A>
std::function< detail::function_return_type< F, A... >)> mce::detail::wrap_args (F &&func, A &&... args)
 std::bind arguments to an std::function
 
thunk mce::detail::wrap_return (std::true_type, thunk th)
 
template<typename Callable >
thunk mce::detail::wrap_return (std::false_type, Callable &&cb)
 
template<typename Callable >
thunk mce::make_thunk (Callable &&cb)
 
template<typename Callable , typename A , typename... As>
thunk mce::make_thunk (Callable &&cb, A &&a, As &&... as)
 

Detailed Description

Utilities for dealing with functions.