mirror of https://github.com/status-im/evmc.git
cpp: Fix misuse of std::swap<evmc_result>
We should not use explicit template arguments, because this disabled SFINAE and forces instantiation of all overloads.
This commit is contained in:
parent
577340763c
commit
660f192722
|
@ -56,8 +56,8 @@ public:
|
|||
/// releases the ownership of the resources and invalidates this object.
|
||||
evmc_result raw() noexcept
|
||||
{
|
||||
auto out = evmc_result{};
|
||||
std::swap<evmc_result>(out, *this);
|
||||
const auto out = evmc_result{*this}; // Copy data.
|
||||
this->release = nullptr; // Disable releasing of this object.
|
||||
return out;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue