From 820e6f06f3fcd70f4c4ba94112d678188f1f59fe Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 8 Jan 2024 20:35:41 +0300 Subject: Get rid of GCC's 'cast between incompatible function types' warning --- odb/details/function-wrapper.txx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 (&caller_impl::function); + function_wrapper::function)> fw ( + &caller_impl::function); + + function = fw.template cast (); deleter = &deleter_impl; std_function = new std_function_type (std::move (sf)); } -- cgit v1.1