proxygen
folly::detail::function::FunctionTraits< ReturnType(Args...) const > Struct Template Reference

#include <Function.h>

Classes

class  SharedProxy
 

Public Types

using Call = ReturnType(*)(Data &, Args &&...)
 
using IsConst = std::true_type
 
using ConstSignature = ReturnType(Args...) const
 
using NonConstSignature = ReturnType(Args...)
 
using OtherSignature = NonConstSignature
 
template<typename F >
using ResultOf = SafeResultOf< CallableResult< const _t< std::decay< F >> &, Args... >, ReturnType >
 

Public Member Functions

ReturnType operator() (Args...args) const
 

Static Public Member Functions

template<typename Fun >
static ReturnType callSmall (Data &p, Args &&...args)
 
template<typename Fun >
static ReturnType callBig (Data &p, Args &&...args)
 
static ReturnType uninitCall (Data &, Args &&...)
 

Detailed Description

template<typename ReturnType, typename... Args>
struct folly::detail::function::FunctionTraits< ReturnType(Args...) const >

Definition at line 344 of file Function.h.

Member Typedef Documentation

template<typename ReturnType , typename... Args>
using folly::detail::function::FunctionTraits< ReturnType(Args...) const >::Call = ReturnType (*)(Data&, Args&&...)

Definition at line 345 of file Function.h.

template<typename ReturnType , typename... Args>
using folly::detail::function::FunctionTraits< ReturnType(Args...) const >::ConstSignature = ReturnType(Args...) const

Definition at line 347 of file Function.h.

template<typename ReturnType , typename... Args>
using folly::detail::function::FunctionTraits< ReturnType(Args...) const >::IsConst = std::true_type

Definition at line 346 of file Function.h.

template<typename ReturnType , typename... Args>
using folly::detail::function::FunctionTraits< ReturnType(Args...) const >::NonConstSignature = ReturnType(Args...)

Definition at line 348 of file Function.h.

template<typename ReturnType , typename... Args>
using folly::detail::function::FunctionTraits< ReturnType(Args...) const >::OtherSignature = NonConstSignature

Definition at line 349 of file Function.h.

template<typename ReturnType , typename... Args>
template<typename F >
using folly::detail::function::FunctionTraits< ReturnType(Args...) const >::ResultOf = SafeResultOf< CallableResult<const _t<std::decay<F>>&, Args...>, ReturnType>

Definition at line 354 of file Function.h.

Member Function Documentation

template<typename ReturnType , typename... Args>
template<typename Fun >
static ReturnType folly::detail::function::FunctionTraits< ReturnType(Args...) const >::callBig ( Data p,
Args &&...  args 
)
inlinestatic

Definition at line 363 of file Function.h.

References testing::Args(), and folly::detail::function::Data::big.

363  {
364  return static_cast<ReturnType>(
365  (*static_cast<const Fun*>(p.big))(static_cast<Args&&>(args)...));
366  }
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
template<typename ReturnType , typename... Args>
template<typename Fun >
static ReturnType folly::detail::function::FunctionTraits< ReturnType(Args...) const >::callSmall ( Data p,
Args &&...  args 
)
inlinestatic

Definition at line 357 of file Function.h.

References folly::detail::function::Data::tiny.

357  {
358  return static_cast<ReturnType>((*static_cast<const Fun*>(
359  static_cast<void*>(&p.tiny)))(static_cast<Args&&>(args)...));
360  }
template<typename ReturnType , typename... Args>
ReturnType folly::detail::function::FunctionTraits< ReturnType(Args...) const >::operator() ( Args...  args) const
inline

Definition at line 372 of file Function.h.

References folly::Function< FunctionType >::call_.

372  {
373  auto& fn = *static_cast<const Function<ConstSignature>*>(this);
374  return fn.call_(fn.data_, static_cast<Args&&>(args)...);
375  }
A polymorphic function wrapper that is not copyable and does not require the wrapped function to be c...
template<typename ReturnType , typename... Args>
static ReturnType folly::detail::function::FunctionTraits< ReturnType(Args...) const >::uninitCall ( Data ,
Args &&  ... 
)
inlinestatic

Definition at line 368 of file Function.h.

368  {
369  throw std::bad_function_call();
370  }

The documentation for this struct was generated from the following file: