Open
Description
In the file libraries/eosilib/core/eosio/binary_extenstion.hpp
There are two value_or
functions one with const restriction and one without. Clearly the object state is modified, and the second function will never work, removing the restrictive, const only function from the code and keeping the first value_or
impl.
constexpr T&& value_or()&& {
if (!_has_value)
return std::move(T());
_has_value = false;
return std::move(_get());
}
constexpr const T&& value_or()const&& {
if (!_has_value)
return std::move(T());
_has_value = false;
return std::move(_get());
}
Metadata
Metadata
Assignees
Labels
No labels