v8toolkit  0.0.1
Utility library for embedding V8 Javascript engine in a c++ program
Classes | Namespaces | Macros | Typedefs | Functions
stdfunctionreplacement.h File Reference
#include <utility>
#include <type_traits>
#include <functional>
#include <exception>
#include <typeinfo>
#include <memory>
Include dependency graph for stdfunctionreplacement.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  func::bad_function_call
 
struct  func::force_function_heap_allocation< typename >
 
class  func::function< typename >
 
struct  func::detail::functor_padding
 
struct  func::detail::empty_struct
 
struct  func::detail::is_inplace_allocated< T, Allocator >
 
struct  func::detail::functor_type< T >
 
struct  func::detail::is_valid_function_argument< typename, typename >
 
struct  func::detail::is_valid_function_argument< function< Result(Arguments...)>, Result(Arguments...)>
 
struct  func::detail::is_valid_function_argument< T, Result(Arguments...)>
 
struct  func::detail::manager_storage_type
 
struct  func::detail::function_manager_inplace_specialization< T, Allocator, Enable >
 
struct  func::detail::function_manager_inplace_specialization< T, Allocator, typename std::enable_if<!is_inplace_allocated< T, Allocator >::value >::type >
 
struct  func::detail::function_manager
 
struct  func::detail::typedeffer< Result,... >
 
struct  func::detail::typedeffer< Result, Argument >
 
struct  func::detail::typedeffer< Result, First_Argument, Second_Argument >
 
class  func::function< Result(Arguments...)>
 
struct  std::uses_allocator< func::function< Result(Arguments...)>, Allocator >
 

Namespaces

 func
 
 func::detail
 

Macros

#define FUNC_NOEXCEPT   noexcept
 
#define FUNC_TEMPLATE_NOEXCEPT(FUNCTOR, ALLOCATOR)   noexcept(detail::is_inplace_allocated<FUNCTOR, ALLOCATOR>::value)
 
#define FUNC_CONSTEXPR   constexpr
 
#define FUNC_MOVE(value)   static_cast<typename std::remove_reference<decltype(value)>::type &&>(value)
 
#define FUNC_FORWARD(type, value)   static_cast<type &&>(value)
 

Typedefs

typedef const function_manager * func::detail::manager_type
 

Functions

template<typename Result , typename... Arguments>
Result func::detail::empty_call (const functor_padding &, Arguments...)
 
template<typename T >
func::detail::to_functor (T &&func)
 
template<typename Result , typename Class , typename... Arguments>
auto func::detail::to_functor (Result(Class::*func)(Arguments...)) -> decltype(std::mem_fn(func))
 
template<typename T >
bool func::detail::is_null (const T &)
 
template<typename Result , typename... Arguments>
bool func::detail::is_null (Result(*const &function_pointer)(Arguments...))
 
template<typename Result , typename Class , typename... Arguments>
bool func::detail::is_null (Result(Class::*const &function_pointer)(Arguments...))
 
template<typename T , typename Allocator >
static const function_manager & func::detail::get_default_manager ()
 
template<typename T , typename Allocator >
static void func::detail::create_manager (manager_storage_type &storage, Allocator &&allocator)
 
template<typename T >
bool func::operator== (std::nullptr_t, const function< T > &rhs) FUNC_NOEXCEPT
 
template<typename T >
bool func::operator== (const function< T > &lhs, std::nullptr_t) FUNC_NOEXCEPT
 
template<typename T >
bool func::operator!= (std::nullptr_t, const function< T > &rhs) FUNC_NOEXCEPT
 
template<typename T >
bool func::operator!= (const function< T > &lhs, std::nullptr_t) FUNC_NOEXCEPT
 
template<typename T >
void func::swap (function< T > &lhs, function< T > &rhs)
 

Class Documentation

class func::function

template<typename>
class func::function< typename >

Definition at line 48 of file stdfunctionreplacement.h.

struct func::detail::empty_struct

Definition at line 61 of file stdfunctionreplacement.h.

struct func::detail::functor_type

template<typename T>
struct func::detail::functor_type< T >

Definition at line 104 of file stdfunctionreplacement.h.

Collaboration diagram for func::detail::functor_type< T >:
Class Members
decltype(to_functor(declval< T >
())) typedef
type
struct func::detail::typedeffer

template<typename Result, typename...>
struct func::detail::typedeffer< Result,... >

Definition at line 351 of file stdfunctionreplacement.h.

Class Members
typedef Result result_type
struct func::detail::typedeffer< Result, Argument >

template<typename Result, typename Argument>
struct func::detail::typedeffer< Result, Argument >

Definition at line 356 of file stdfunctionreplacement.h.

Class Members
typedef Result result_type
typedef Argument argument_type
struct func::detail::typedeffer< Result, First_Argument, Second_Argument >

template<typename Result, typename First_Argument, typename Second_Argument>
struct func::detail::typedeffer< Result, First_Argument, Second_Argument >

Definition at line 362 of file stdfunctionreplacement.h.

Class Members
typedef Result result_type
typedef First_Argument first_argument_type
typedef Second_Argument second_argument_type

Macro Definition Documentation

#define FUNC_NOEXCEPT   noexcept
#define FUNC_TEMPLATE_NOEXCEPT (   FUNCTOR,
  ALLOCATOR 
)    noexcept(detail::is_inplace_allocated<FUNCTOR, ALLOCATOR>::value)
#define FUNC_CONSTEXPR   constexpr

Definition at line 19 of file stdfunctionreplacement.h.

Referenced by func::detail::get_default_manager().

#define FUNC_MOVE (   value)    static_cast<typename std::remove_reference<decltype(value)>::type &&>(value)
#define FUNC_FORWARD (   type,
  value 
)    static_cast<type &&>(value)