Libosmium  2.20.0
Fast and flexible C++ library for working with OpenStreetMap data
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 TFunction , typename X = typename std::enable_if< !std::is_same<TFunction, function_wrapper>::value, void>::type>
 function_wrapper (TFunction &&f)
 
 function_wrapper (int)
 
bool operator() ()
 
 function_wrapper ()=default
 
 function_wrapper (const function_wrapper &)=delete
 
function_wrapperoperator= (const function_wrapper &)=delete
 
 function_wrapper (function_wrapper &&other) noexcept
 
function_wrapperoperator= (function_wrapper &&other) noexcept
 
 ~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

◆ function_wrapper() [1/5]

template<typename TFunction , typename X = typename std::enable_if< !std::is_same<TFunction, function_wrapper>::value, void>::type>
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: