aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/details/function-wrapper.txx5
1 files changed, 4 insertions, 1 deletions
diff --git a/odb/details/function-wrapper.txx b/odb/details/function-wrapper.txx
index 19e4cbc..db73e8d 100644
--- a/odb/details/function-wrapper.txx
+++ b/odb/details/function-wrapper.txx
@@ -67,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));
}