aboutsummaryrefslogtreecommitdiff
path: root/odb/details/function-wrapper.txx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/details/function-wrapper.txx')
-rw-r--r--odb/details/function-wrapper.txx6
1 files changed, 4 insertions, 2 deletions
diff --git a/odb/details/function-wrapper.txx b/odb/details/function-wrapper.txx
index 0ece244..db73e8d 100644
--- a/odb/details/function-wrapper.txx
+++ b/odb/details/function-wrapper.txx
@@ -1,5 +1,4 @@
// file : odb/details/function-wrapper.txx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#include <utility> // std::swap, std::move
@@ -68,7 +67,10 @@ namespace odb
}
else
{
- function = reinterpret_cast<F*> (&caller_impl<F>::function);
+ function_wrapper<decltype (caller_impl<F>::function)> fw (
+ &caller_impl<F>::function);
+
+ function = fw.template cast<F*> ();
deleter = &deleter_impl<F>;
std_function = new std_function_type (std::move (sf));
}