Remove workarounds for fixed bugs

This commit is contained in:
Mat Sutcliffe
2021-04-16 22:32:01 +01:00
parent 093138972a
commit 7955d0a06e
15 changed files with 16 additions and 110 deletions

View File

@@ -39,21 +39,6 @@ namespace BlackMisc
// Alternative would be to qualify all our invokations of the global qHash as ::qHash.
using ::qHash;
namespace Private
{
//! \cond PRIVATE
// Work around MSVC2015 bug affecting generic lambda
template <typename T>
struct Hasher
{
template <typename U>
void operator()(const U &member) { m_hash ^= qHash(member.in(m_object)); }
const T &m_object;
uint &m_hash;
};
//! \endcond
}
namespace Mixin
{
/*!
@@ -76,7 +61,7 @@ namespace BlackMisc
{
uint hash = baseHash(static_cast<const TBaseOfT<Derived> *>(&value));
constexpr auto meta = introspect<Derived>().without(MetaFlags<DisabledForHashing>());
meta.forEachMember(Private::Hasher<Derived> { value, hash });
meta.forEachMember([ & ](const auto &member) { hash ^= qHash(member.in(value)); });
return hash;
}