PStack  2.0
Stack trace printer for MSVC and GCC binaries
psystem::shared_library::loaded_function< T, std::true_type > Struct Template Reference

Provide a specialization for loaded_function to handle a void return type. More...

#include <shared_library.hpp>

Inheritance diagram for psystem::shared_library::loaded_function< T, std::true_type >:
Collaboration diagram for psystem::shared_library::loaded_function< T, std::true_type >:

Public Member Functions

 loaded_function (FARPROC proc)
 Construct a loaded_function from a function pointer. More...
 
template<typename... Args>
void operator() (Args &&...args)
 Invoke the library function. More...
 
- Public Member Functions inherited from psystem::shared_library::loaded_function_base< T >
 loaded_function_base (FARPROC proc)
 Construct a loaded_function from a function pointer. More...
 
void retarget (FARPROC proc) noexcept
 Re-assign a function pointer to this functor instance. More...
 
T * get_ptr () const noexcept
 Access the function pointer contained here directly. More...
 

Additional Inherited Members

- Protected Attributes inherited from psystem::shared_library::loaded_function_base< T >
T * m_function
 The function pointer that may be invoked.
 

Detailed Description

template<typename T>
struct psystem::shared_library::loaded_function< T, std::true_type >

Provide a specialization for loaded_function to handle a void return type.

Template Parameters
TThe function signature that will be used to store the wrapped function.
Author
Matt Bisson
Date
19 November, 2015
Since
PSystem 2.0
Version
PSystem 2.0

Constructor & Destructor Documentation

template<typename T >
psystem::shared_library::loaded_function< T, std::true_type >::loaded_function ( FARPROC  proc)
inline

Construct a loaded_function from a function pointer.

Parameters
[in]procThe proceedure's address. Type safety is out the window; we must trust you. This may be nullptr.
Todo:
I would rather inherit the CTOR with "using base::base", but MSVC apparently does not support this.

Member Function Documentation

template<typename T >
template<typename... Args>
void psystem::shared_library::loaded_function< T, std::true_type >::operator() ( Args &&...  args)
inline

Invoke the library function.

Template Parameters
ArgsThe argument pack should match the declared function signature.
Parameters
[in]argsZero or more arguments to be forwarded to the underlying function. Check the actual function signature and documentation for details.
Exceptions
Whateverthe underlying function throws.
Todo:
Determine the noexcept value when MSVC supports it.

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