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:
Paweł Bylica 2019-05-14 11:14:30 +02:00
parent 577340763c
commit 660f192722
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
};