|
KiCad PCB EDA Suite
|
#include <inplace_function.h>
Public Member Functions | |
| INPLACE_FUNCTION ()=default | |
| template<typename F, typename = std::enable_if_t< !std::is_same_v<std::decay_t<F>, INPLACE_FUNCTION> && std::is_invocable_r_v<R, const std::decay_t<F>&, Args...>>> | |
| INPLACE_FUNCTION (F &&aCallable) | |
| INPLACE_FUNCTION (const INPLACE_FUNCTION &aOther) | |
| INPLACE_FUNCTION (INPLACE_FUNCTION &&aOther) noexcept | |
| INPLACE_FUNCTION & | operator= (const INPLACE_FUNCTION &aOther) |
| INPLACE_FUNCTION & | operator= (INPLACE_FUNCTION &&aOther) noexcept |
| template<typename F, typename = std::enable_if_t< !std::is_same_v<std::decay_t<F>, INPLACE_FUNCTION> && std::is_invocable_r_v<R, const std::decay_t<F>&, Args...>>> | |
| INPLACE_FUNCTION & | operator= (F &&aCallable) |
| ~INPLACE_FUNCTION () | |
| operator bool () const | |
| R | operator() (Args... aArgs) const |
Private Types | |
| enum class | OP { DESTROY , MOVE , COPY } |
| using | INVOKE_FN = R ( * )( const void*, Args&&... ) |
| using | MANAGE_FN = void ( * )( OP, void*, const void* ) |
Private Member Functions | |
| template<typename F> | |
| void | assign (F &&aCallable) |
| void | reset () |
| void | moveFrom (INPLACE_FUNCTION &aOther) |
| void | copyFrom (const INPLACE_FUNCTION &aOther) |
Private Attributes | |
| unsigned char | m_storage [Capacity] |
| INVOKE_FN | m_invoke = nullptr |
| MANAGE_FN | m_manage = nullptr |
Definition at line 45 of file inplace_function.h.
|
private |
Definition at line 114 of file inplace_function.h.
|
private |
Definition at line 115 of file inplace_function.h.
|
strongprivate |
| Enumerator | |
|---|---|
| DESTROY | |
| MOVE | |
| COPY | |
Definition at line 112 of file inplace_function.h.
|
default |
References F, and INPLACE_FUNCTION().
Referenced by copyFrom(), INPLACE_FUNCTION(), INPLACE_FUNCTION(), INPLACE_FUNCTION(), moveFrom(), operator=(), operator=(), and operator=().
|
inline |
Definition at line 54 of file inplace_function.h.
|
inline |
Definition at line 59 of file inplace_function.h.
References copyFrom(), and INPLACE_FUNCTION().
|
inlinenoexcept |
Definition at line 60 of file inplace_function.h.
References INPLACE_FUNCTION(), and moveFrom().
|
inline |
Definition at line 99 of file inplace_function.h.
References reset().
|
inlineprivate |
Definition at line 118 of file inplace_function.h.
References COPY, DESTROY, F, m_invoke, m_manage, m_storage, and MOVE.
Referenced by INPLACE_FUNCTION().
|
inlineprivate |
Definition at line 174 of file inplace_function.h.
References COPY, INPLACE_FUNCTION(), m_invoke, m_manage, and m_storage.
Referenced by INPLACE_FUNCTION().
|
inlineprivate |
Definition at line 161 of file inplace_function.h.
References INPLACE_FUNCTION(), m_invoke, m_manage, m_storage, and MOVE.
Referenced by INPLACE_FUNCTION(), operator=(), operator=(), and operator=().
|
inlineexplicit |
Definition at line 101 of file inplace_function.h.
References m_invoke.
|
inline |
Definition at line 103 of file inplace_function.h.
|
inline |
Definition at line 62 of file inplace_function.h.
References INPLACE_FUNCTION(), moveFrom(), and reset().
|
inline |
Definition at line 91 of file inplace_function.h.
References F, INPLACE_FUNCTION(), moveFrom(), and reset().
|
inlinenoexcept |
Definition at line 76 of file inplace_function.h.
References INPLACE_FUNCTION(), moveFrom(), and reset().
|
inlineprivate |
Definition at line 151 of file inplace_function.h.
References DESTROY, m_invoke, m_manage, and m_storage.
Referenced by operator=(), operator=(), operator=(), and ~INPLACE_FUNCTION().
|
private |
Definition at line 185 of file inplace_function.h.
Referenced by assign(), copyFrom(), moveFrom(), operator bool(), operator()(), and reset().
|
private |
Definition at line 186 of file inplace_function.h.
Referenced by assign(), copyFrom(), moveFrom(), and reset().
|
private |
Definition at line 184 of file inplace_function.h.
Referenced by assign(), copyFrom(), moveFrom(), operator()(), and reset().