WPILibC++ 2025.2.1
Loading...
Searching...
No Matches
wpi::unique_function< R(P...)> Class Template Reference

#include <wpi/FunctionExtras.h>

Inheritance diagram for wpi::unique_function< R(P...)>:
wpi::detail::UniqueFunctionBase< R, P... >

Public Member Functions

 unique_function ()=default
 
 unique_function (std::nullptr_t)
 
 unique_function (unique_function &&)=default
 
 unique_function (const unique_function &)=delete
 
unique_functionoperator= (unique_function &&)=default
 
unique_functionoperator= (const unique_function &)=delete
 
template<typename CallableT >
 unique_function (CallableT Callable, detail::EnableUnlessSameType< CallableT, unique_function > *=nullptr, detail::EnableIfCallable< CallableT, R, P... > *=nullptr)
 
operator() (P... Params)
 
- Public Member Functions inherited from wpi::detail::UniqueFunctionBase< R, P... >
 operator bool () const
 

Additional Inherited Members

- Protected Types inherited from wpi::detail::UniqueFunctionBase< R, P... >
using AdjustedParamT
 
using CallPtrT
 
using MovePtrT
 
using DestroyPtrT
 
using CallbackPointerUnionT
 
- Protected Member Functions inherited from wpi::detail::UniqueFunctionBase< R, P... >
bool isInlineStorage () const
 
bool isTrivialCallback () const
 
CallPtrT getTrivialCallback () const
 
NonTrivialCallbacks * getNonTrivialCallbacks () const
 
CallPtrT getCallPtr () const
 
void * getCalleePtr () const
 
void * getInlineStorage () const
 
void * getOutOfLineStorage () const
 
size_t getOutOfLineStorageSize () const
 
size_t getOutOfLineStorageAlignment () const
 
void setOutOfLineStorage (void *Ptr, size_t Size, size_t Alignment)
 
 UniqueFunctionBase (CallableT Callable, CalledAs< CalledAsT >)
 
 UniqueFunctionBase (UniqueFunctionBase &&RHS) noexcept
 
 UniqueFunctionBase ()=default
 
 ~UniqueFunctionBase ()
 
UniqueFunctionBaseoperator= (UniqueFunctionBase &&RHS) noexcept
 
- Static Protected Member Functions inherited from wpi::detail::UniqueFunctionBase< R, P... >
static R CallImpl (void *CallableAddr, AdjustedParamT< ParamTs >... Params)
 
static void MoveImpl (void *LHSCallableAddr, void *RHSCallableAddr) noexcept
 
static void DestroyImpl (void *CallableAddr) noexcept
 
- Protected Attributes inherited from wpi::detail::UniqueFunctionBase< R, P... >
union wpi::detail::UniqueFunctionBase::StorageUnionT StorageUnion
 
PointerIntPair< CallbackPointerUnionT, 1, bool > CallbackAndInlineFlag
 
- Static Protected Attributes inherited from wpi::detail::UniqueFunctionBase< R, P... >
static constexpr size_t InlineStorageSize
 

Constructor & Destructor Documentation

◆ unique_function() [1/5]

template<typename R , typename... P>
wpi::unique_function< R(P...)>::unique_function ( )
default

◆ unique_function() [2/5]

template<typename R , typename... P>
wpi::unique_function< R(P...)>::unique_function ( std::nullptr_t )
inline

◆ unique_function() [3/5]

template<typename R , typename... P>
wpi::unique_function< R(P...)>::unique_function ( unique_function< R(P...)> && )
default

◆ unique_function() [4/5]

template<typename R , typename... P>
wpi::unique_function< R(P...)>::unique_function ( const unique_function< R(P...)> & )
delete

◆ unique_function() [5/5]

template<typename R , typename... P>
template<typename CallableT >
wpi::unique_function< R(P...)>::unique_function ( CallableT Callable,
detail::EnableUnlessSameType< CallableT, unique_function< R(P...)> > * = nullptr,
detail::EnableIfCallable< CallableT, R, P... > * = nullptr )
inline

Member Function Documentation

◆ operator()()

template<typename R , typename... P>
R wpi::unique_function< R(P...)>::operator() ( P... Params)
inline

◆ operator=() [1/2]

template<typename R , typename... P>
unique_function & wpi::unique_function< R(P...)>::operator= ( const unique_function< R(P...)> & )
delete

◆ operator=() [2/2]

template<typename R , typename... P>
unique_function & wpi::unique_function< R(P...)>::operator= ( unique_function< R(P...)> && )
default

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