Loading...
Searching...
No Matches
osmium::thread::function_wrapper Class Reference

`#include <function_wrapper.hpp>`

## Classes

struct | impl_base
struct | impl_type

## Public Member Functions

template<typename TFunction, typename X = std::enable_if_t< !std::is_same<TFunction, function_wrapper>::value, void>>
| function_wrapper (TFunction &&f)
| function_wrapper (int)
bool | operator() ()
| function_wrapper ()=default
| function_wrapper (const function_wrapper &)=delete
function_wrapper & | operator= (const function_wrapper &)=delete
| function_wrapper (function_wrapper &&other) noexcept
function_wrapper & | operator= (function_wrapper &&other) noexcept
| ~function_wrapper ()=default
| operator bool () const

## Private Attributes

std::unique_ptr< impl_base > | impl

## Detailed Description

This function wrapper can collect move-only functions unlike std::function which needs copyable functions. Taken from the book "C++ Concurrency in Action".

## Constructor & Destructor Documentation

## function_wrapper() [1/5]

template<typename TFunction, typename X = std::enable_if_t< !std::is_same<TFunction, function_wrapper>::value, void>>

osmium::thread::function_wrapper::function_wrapper | ( | TFunction && | f | ) |

inline

## function_wrapper() [2/5]

osmium::thread::function_wrapper::function_wrapper | ( | int |  | ) |

inlineexplicit

## function_wrapper() [3/5]

osmium::thread::function_wrapper::function_wrapper | ( |  | ) |

default

## function_wrapper() [4/5]

osmium::thread::function_wrapper::function_wrapper | ( | const function_wrapper & |  | ) |

delete

## function_wrapper() [5/5]

osmium::thread::function_wrapper::function_wrapper | ( | function_wrapper && | other | ) |

inlinenoexcept

## ~function_wrapper()

osmium::thread::function_wrapper::~function_wrapper | ( |  | ) |

default

## Member Function Documentation

## operator bool()

osmium::thread::function_wrapper::operator bool | ( |  | ) | const

inlineexplicit

## operator()()

bool osmium::thread::function_wrapper::operator() | ( |  | ) |

inline

## operator=() [1/2]

function_wrapper & osmium::thread::function_wrapper::operator= | ( | const function_wrapper & |  | ) |

delete

## operator=() [2/2]

function_wrapper & osmium::thread::function_wrapper::operator= | ( | function_wrapper && | other | ) |

inlinenoexcept

## Member Data Documentation

## impl

std::unique_ptr<impl_base> osmium::thread::function_wrapper::impl

private

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

- include/osmium/thread/function_wrapper.hpp