osmium::thread::function_wrapper Class Reference

`#include <function_wrapper.hpp>`

## Classes

struct | impl_base
struct | impl_type

## Public Member Functions

template<typename TFunction >
| function_wrapper (TFunction &&f)
| function_wrapper (int)
bool | operator() ()
| function_wrapper ()=default
| function_wrapper (function_wrapper &&other)
function_wrapper & | operator= (function_wrapper &&other)
| function_wrapper (const function_wrapper &)=delete
function_wrapper & | operator= (const function_wrapper &)=delete
| ~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

template<typename TFunction >

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

inline

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

inline

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

default

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

inline

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

delete

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

default

## Member Function Documentation

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

inline explicit

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

inline

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

inline

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

delete

## Member Data Documentation

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

private

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

- osmium/thread/function_wrapper.hpp