// file : odb/details/function-wrapper.ixx // copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file namespace odb { namespace details { template inline function_wrapper:: ~function_wrapper () { if (deleter != 0) deleter (std_function); } template inline function_wrapper:: function_wrapper (F* f) : function (f), deleter (0), std_function (0) { } template inline function_wrapper:: function_wrapper (const function_wrapper& x) : function (0), deleter (0), std_function (0) { swap (const_cast&> (x)); } template inline function_wrapper& function_wrapper:: operator= (const function_wrapper& x) { swap (const_cast&> (x)); return *this; } template template inline R function_wrapper:: cast () const { union { F* f; R r; } r; r.f = function; return r.r; } } }