diff options
Diffstat (limited to 'odb/details/function-wrapper.ixx')
-rw-r--r-- | odb/details/function-wrapper.ixx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/odb/details/function-wrapper.ixx b/odb/details/function-wrapper.ixx index d73d578..9ec19ec 100644 --- a/odb/details/function-wrapper.ixx +++ b/odb/details/function-wrapper.ixx @@ -36,5 +36,15 @@ namespace odb swap (const_cast<function_wrapper<F>&> (x)); return *this; } + + template <typename F> + template <typename R> + inline R function_wrapper<F>:: + cast () const + { + union { F* f; R r; } r; + r.f = function; + return r.r; + } } } |