mirror of
https://github.com/boostorg/compat.git
synced 2026-01-19 04:02:16 +00:00
fix erroneous handling of const types in function_ref callable constructor
This commit is contained in:
@@ -62,7 +62,7 @@ public:
|
||||
template <class F>
|
||||
function_ref_base(obj_tag, F&& fn) noexcept
|
||||
: thunk_{}, invoke_(&invoke_object_holder<Const, NoEx, F, R, Args...>::invoke_object) {
|
||||
thunk_.pobj_ = static_cast<void*>(std::addressof(fn));
|
||||
thunk_.pobj_ = const_cast<void*>(static_cast<void const*>(std::addressof(fn)));
|
||||
}
|
||||
|
||||
function_ref_base(const function_ref_base&) noexcept = default;
|
||||
|
||||
Reference in New Issue
Block a user