#include </home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/llvm/include/wpi/FunctionExtras.h>
|
template<typename CalledAsT > |
static ReturnT | CallImpl (void *CallableAddr, AdjustedParamT< ParamTs >... Params) |
|
template<typename CallableT > |
static void | MoveImpl (void *LHSCallableAddr, void *RHSCallableAddr) noexcept |
|
template<typename CallableT > |
static void | DestroyImpl (void *CallableAddr) noexcept |
|
|
template<typename T > |
struct IsSizeLessThanThresholdT< T, std::enable_if_t< sizeof(T)<=2 *sizeof(void *)> > :std::true_type {};template< typename T > struct AdjustedParamTBase { static_assert(!std::is_reference< T >::value, "references should be handled by template specialization");using type=typename std::conditional< wpi::is_trivially_copy_constructible< T >::value &&wpi::is_trivially_move_constructible< T >::value &&IsSizeLessThanThresholdT< T >::value, T, T & >::type;};template< typename T > struct AdjustedParamTBase< T & > { using type=T &;};template< typename T > struct AdjustedParamTBase< T && > { using type=T &;};template< typename T > using AdjustedParamT=typename AdjustedParamTBase< T >::type;using CallPtrT=ReturnT(*)(void *CallableAddr, AdjustedParamT< ParamTs >... Params);using MovePtrT=void(*)(void *LHSCallableAddr, void *RHSCallableAddr);using DestroyPtrT=void(*)(void *CallableAddr);struct alignas(8) TrivialCallback { CallPtrT CallPtr;};struct alignas(8) NonTrivialCallbacks { CallPtrT CallPtr;MovePtrT MovePtr;DestroyPtrT DestroyPtr;};using CallbackPointerUnionT=PointerUnion< TrivialCallback *, NonTrivialCallbacks * >;union StorageUnionT { struct OutOfLineStorageT { void *StoragePtr;size_t Size;size_t Alignment;} OutOfLineStorage;static_assert(sizeof(OutOfLineStorageT)<=InlineStorageSize, "Should always use all of the out-of-line storage for inline storage!");mutable typename std::aligned_storage< InlineStorageSize, alignof(void *)>::type InlineStorage;} StorageUnion;PointerIntPair< CallbackPointerUnionT, 1, bool > CallbackAndInlineFlag;bool isInlineStorage() const { return CallbackAndInlineFlag.getInt();} bool isTrivialCallback() const { return CallbackAndInlineFlag.getPointer().template is< TrivialCallback * >();} CallPtrT getTrivialCallback() const { return CallbackAndInlineFlag.getPointer().template get< TrivialCallback * >() -> | CallPtr |
|
◆ UniqueFunctionBase() [1/3]
template<typename ReturnT , typename... ParamTs>
template<typename CallableT , typename CalledAsT >
◆ ~UniqueFunctionBase()
template<typename ReturnT , typename... ParamTs>
◆ UniqueFunctionBase() [2/3]
template<typename ReturnT , typename... ParamTs>
◆ UniqueFunctionBase() [3/3]
template<typename ReturnT , typename... ParamTs>
◆ CallImpl()
template<typename ReturnT , typename... ParamTs>
template<typename CalledAsT >
◆ DestroyImpl()
template<typename ReturnT , typename... ParamTs>
template<typename CallableT >
|
inlinestaticprotectednoexcept |
◆ getCalleePtr()
template<typename ReturnT , typename... ParamTs>
◆ getCallPtr()
template<typename ReturnT , typename... ParamTs>
◆ getInlineStorage()
template<typename ReturnT , typename... ParamTs>
◆ getNonTrivialCallbacks()
template<typename ReturnT , typename... ParamTs>
◆ getOutOfLineStorage()
template<typename ReturnT , typename... ParamTs>
◆ getOutOfLineStorageAlignment()
template<typename ReturnT , typename... ParamTs>
◆ getOutOfLineStorageSize()
template<typename ReturnT , typename... ParamTs>
◆ MoveImpl()
template<typename ReturnT , typename... ParamTs>
template<typename CallableT >
|
inlinestaticprotectednoexcept |
◆ operator bool()
template<typename ReturnT , typename... ParamTs>
◆ operator=()
template<typename ReturnT , typename... ParamTs>
◆ setOutOfLineStorage()
template<typename ReturnT , typename... ParamTs>
◆ CallPtr
template<typename ReturnT , typename... ParamTs>
template<typename T >
struct IsSizeLessThanThresholdT< T, std::enable_if_t< sizeof(T)<=2 *sizeof(void *)> > :std::true_type {}; template< typename T > struct AdjustedParamTBase { static_assert(!std::is_reference< T >::value, "references should be handled by template specialization"); using type=typename std::conditional< wpi::is_trivially_copy_constructible< T >::value && wpi::is_trivially_move_constructible< T >::value && IsSizeLessThanThresholdT< T >::value, T, T & >::type; }; template< typename T > struct AdjustedParamTBase< T & > { using type=T &;}; template< typename T > struct AdjustedParamTBase< T && > { using type=T &;}; template< typename T > using AdjustedParamT=typename AdjustedParamTBase< T >::type; using CallPtrT=ReturnT(*)(void *CallableAddr, AdjustedParamT< ParamTs >... Params); using MovePtrT=void(*)(void *LHSCallableAddr, void *RHSCallableAddr); using DestroyPtrT=void(*)(void *CallableAddr); struct alignas(8) TrivialCallback { CallPtrT CallPtr; }; struct alignas(8) NonTrivialCallbacks { CallPtrT CallPtr; MovePtrT MovePtr; DestroyPtrT DestroyPtr; }; using CallbackPointerUnionT= PointerUnion< TrivialCallback *, NonTrivialCallbacks * >; union StorageUnionT { struct OutOfLineStorageT { void *StoragePtr; size_t Size; size_t Alignment; } OutOfLineStorage; static_assert( sizeof(OutOfLineStorageT)<=InlineStorageSize, "Should always use all of the out-of-line storage for inline storage!"); mutable typename std::aligned_storage< InlineStorageSize, alignof(void *)>::type InlineStorage; } StorageUnion; PointerIntPair< CallbackPointerUnionT, 1, bool > CallbackAndInlineFlag; bool isInlineStorage() const { return CallbackAndInlineFlag.getInt();} bool isTrivialCallback() const { return CallbackAndInlineFlag.getPointer().template is< TrivialCallback * >(); } CallPtrT getTrivialCallback() const { return CallbackAndInlineFlag.getPointer().template get< TrivialCallback * >() -> wpi::detail::UniqueFunctionBase< ReturnT, ParamTs >::CallPtr |
|
protected |
◆ InlineStorageSize
template<typename ReturnT , typename... ParamTs>
The documentation for this class was generated from the following file:
- /home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/llvm/include/wpi/FunctionExtras.h