summaryrefslogtreecommitdiffhomepage
path: root/compat/qhash.hpp
blob: b92e4e552a3b6a86e8b66255ca6291f585c649dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include <QtGlobal>
#include <QString>
#include <QHashFunctions>

#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)

#include <cstdlib>

namespace std {
template<> struct hash<QString>
{
    std::size_t operator()(const QString& value) const noexcept
    {
        return qHash(value);
    }
};
}

#endif