diff --git a/include/omath/rev_eng/internal_rev_object.hpp b/include/omath/rev_eng/internal_rev_object.hpp index 0f05d41..71fda4a 100644 --- a/include/omath/rev_eng/internal_rev_object.hpp +++ b/include/omath/rev_eng/internal_rev_object.hpp @@ -33,7 +33,7 @@ namespace omath::rev_eng #endif return (*reinterpret_cast(this))[id](this, std::forward(arg_list)...); } - template + template ReturnType call_virtual_method(Args&&... arg_list) const { using This = std::remove_cv_t>; @@ -43,7 +43,7 @@ namespace omath::rev_eng using VirtualMethodType = ReturnType (*)(void*, decltype(arg_list)...); #endif return (*reinterpret_cast(const_cast(this)))[id]( - this, std::forward(arg_list)...); + const_cast(static_cast(this)), std::forward(arg_list)...); } }; } // namespace omath::rev_eng