Libosmium  2.1.0
Fast and flexible C++ library for working with OpenStreetMap data
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Member Functions | Private Attributes | List of all members
osmium::thread::function_wrapper Class Reference

#include <function_wrapper.hpp>

Classes

struct  impl_base
 
struct  impl_type
 

Public Member Functions

template<typename F >
 function_wrapper (F &&f)
 
void operator() ()
 
 function_wrapper ()=default
 
 function_wrapper (function_wrapper &&other)
 
function_wrapperoperator= (function_wrapper &&other)
 
 function_wrapper (const function_wrapper &)=delete
 
function_wrapperoperator= (const function_wrapper &)=delete
 
 ~function_wrapper ()=default
 
 operator bool () const
 

Private Attributes

std::unique_ptr< impl_baseimpl
 

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 F >
osmium::thread::function_wrapper::function_wrapper ( F &&  f)
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
inlineexplicit
void 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: