GDBserver
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
gdb::function_view< Res(Args...)> Class Template Reference

#include "function-view.h"

Classes

struct  IsCompatibleCallable
 
struct  IsFunctionView
 

Public Member Functions

constexpr function_view () noexcept
 
 function_view (const function_view &)=default
 
function_viewoperator= (const function_view &)=default
 
template<typename Callable , typename = Requires<Not<IsFunctionView<Callable>>>, typename = Requires<IsCompatibleCallable<Callable>>>
 function_view (Callable &&callable) noexcept
 
constexpr function_view (std::nullptr_t) noexcept
 
function_viewoperator= (std::nullptr_t) noexcept
 
constexpr operator bool () const noexcept
 
Res operator() (Args... args) const
 

Private Types

template<typename From , typename To >
using CompatibleReturnType = Or< std::is_void< To >, std::is_same< From, To >, std::is_convertible< From, To > >
 

Private Member Functions

template<typename Callable >
void bind (Callable &callable) noexcept
 
template<class Res2 , typename... Args2>
void bind (Res2(*fn)(Args2...)) noexcept
 

Private Attributes

fv_detail::erased_callable m_erased_callable
 
Res(* m_invoker )(fv_detail::erased_callable, Args...)
 

Detailed Description

template<typename Res, typename... Args>
class gdb::function_view< Res(Args...)>

Definition at line 180 of file function-view.h.

Member Typedef Documentation

◆ CompatibleReturnType

template<typename Res , typename... Args>
template<typename From , typename To >
using gdb::function_view< Res(Args...)>::CompatibleReturnType = Or<std::is_void<To>, std::is_same<From, To>, std::is_convertible<From, To> >
private

Definition at line 186 of file function-view.h.

Constructor & Destructor Documentation

◆ function_view() [1/4]

template<typename Res , typename... Args>
constexpr gdb::function_view< Res(Args...)>::function_view ( )
inlinenoexcept

Definition at line 205 of file function-view.h.

◆ function_view() [2/4]

template<typename Res , typename... Args>
gdb::function_view< Res(Args...)>::function_view ( const function_view< Res(Args...)> &  )
default

◆ function_view() [3/4]

template<typename Res , typename... Args>
template<typename Callable , typename = Requires<Not<IsFunctionView<Callable>>>, typename = Requires<IsCompatibleCallable<Callable>>>
gdb::function_view< Res(Args...)>::function_view ( Callable &&  callable)
inlinenoexcept

Definition at line 221 of file function-view.h.

◆ function_view() [4/4]

template<typename Res , typename... Args>
constexpr gdb::function_view< Res(Args...)>::function_view ( std::nullptr_t  )
inlinenoexcept

Definition at line 227 of file function-view.h.

Member Function Documentation

◆ bind() [1/2]

template<typename Res , typename... Args>
template<typename Callable >
void gdb::function_view< Res(Args...)>::bind ( Callable &  callable)
inlineprivatenoexcept

Definition at line 254 of file function-view.h.

References gdb::fv_detail::erased_callable::data.

◆ bind() [2/2]

template<typename Res , typename... Args>
template<class Res2 , typename... Args2>
void gdb::function_view< Res(Args...)>::bind ( Res2(*)(Args2...)  fn)
inlineprivatenoexcept

Definition at line 275 of file function-view.h.

References gdb::fv_detail::erased_callable::fn.

◆ operator bool()

template<typename Res , typename... Args>
constexpr gdb::function_view< Res(Args...)>::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 242 of file function-view.h.

◆ operator()()

template<typename Res , typename... Args>
Res gdb::function_view< Res(Args...)>::operator() ( Args...  args) const
inline

Definition at line 246 of file function-view.h.

◆ operator=() [1/2]

template<typename Res , typename... Args>
function_view& gdb::function_view< Res(Args...)>::operator= ( const function_view< Res(Args...)> &  )
default

◆ operator=() [2/2]

template<typename Res , typename... Args>
function_view& gdb::function_view< Res(Args...)>::operator= ( std::nullptr_t  )
inlinenoexcept

Definition at line 233 of file function-view.h.

Member Data Documentation

◆ m_erased_callable

template<typename Res , typename... Args>
fv_detail::erased_callable gdb::function_view< Res(Args...)>::m_erased_callable
private

Definition at line 289 of file function-view.h.

◆ m_invoker

template<typename Res , typename... Args>
Res(* gdb::function_view< Res(Args...)>::m_invoker) (fv_detail::erased_callable, Args...)
private

Definition at line 295 of file function-view.h.


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