mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
patch
This commit is contained in:
@@ -33,7 +33,7 @@ namespace omath::rev_eng
|
|||||||
#endif
|
#endif
|
||||||
return (*reinterpret_cast<VirtualMethodType**>(this))[id](this, std::forward<Args>(arg_list)...);
|
return (*reinterpret_cast<VirtualMethodType**>(this))[id](this, std::forward<Args>(arg_list)...);
|
||||||
}
|
}
|
||||||
template<std::size_t id, class ReturnType,class... Args>
|
template<std::size_t id, class ReturnType, class... Args>
|
||||||
ReturnType call_virtual_method(Args&&... arg_list) const
|
ReturnType call_virtual_method(Args&&... arg_list) const
|
||||||
{
|
{
|
||||||
using This = std::remove_cv_t<std::remove_pointer_t<decltype(this)>>;
|
using This = std::remove_cv_t<std::remove_pointer_t<decltype(this)>>;
|
||||||
@@ -43,7 +43,7 @@ namespace omath::rev_eng
|
|||||||
using VirtualMethodType = ReturnType (*)(void*, decltype(arg_list)...);
|
using VirtualMethodType = ReturnType (*)(void*, decltype(arg_list)...);
|
||||||
#endif
|
#endif
|
||||||
return (*reinterpret_cast<VirtualMethodType**>(const_cast<This*>(this)))[id](
|
return (*reinterpret_cast<VirtualMethodType**>(const_cast<This*>(this)))[id](
|
||||||
this, std::forward<Args>(arg_list)...);
|
const_cast<void*>(static_cast<const void*>(this)), std::forward<Args>(arg_list)...);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // namespace omath::rev_eng
|
} // namespace omath::rev_eng
|
||||||
|
|||||||
Reference in New Issue
Block a user