diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-01-08 20:35:41 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-01-08 20:36:39 +0300 |
commit | 820e6f06f3fcd70f4c4ba94112d678188f1f59fe (patch) | |
tree | c87b43c461b807857bcfee4812aebc639af4e93d | |
parent | a5de84acfcaaf9493bf7fd4976188644e95f89d2 (diff) |
Get rid of GCC's 'cast between incompatible function types' warning
-rw-r--r-- | odb/details/function-wrapper.txx | 5 |
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)); } |