In include/function2/function2.hpp, the following assignment operator overload appears to have an issue:
C++
template
constexpr erasure&
operator=(erasure<true, OtherConfig, property_t> right) noexcept {
invoke_table_ = right.invoke_table_;
view_ = right.view_;
return *this;
}
Problem:
This operator overload accepts an owning erasure (erasure<true, ...>) as the right-hand side, but assigns its internal pointer (view_ = right.view_) to the non-owning erasure (erasure<false, ...>).