Do not use flat_set anymore gives compilation issues.

Not worth the time solving the issue without having prove of a clear benefit of
using flat_set over unordered_set.
This commit is contained in:
eelke 2018-12-23 08:39:38 +01:00
parent 1854a4bdaa
commit 6a2c8ec5e0
5 changed files with 13 additions and 11 deletions

View file

@ -1,12 +1,13 @@
#include "PgKeywordList.h"
#include <boost/container/flat_set.hpp>
#include <unordered_set>
namespace {
using KeywordHT = boost::container::flat_set<Keyword>;
using KeywordHT = std::unordered_set<Keyword>;
#define PG_KEYWORD(a,b,c) {a,c},
const KeywordHT _ScanKeywords = {
#define PG_KEYWORD(a,b,c) Keyword{a,c},
const KeywordHT _ScanKeywords {
//const Keyword _ScanKeywords[] = {
#include <server/parser/kwlist.h>
};

View file

@ -27,6 +27,7 @@ public:
//bool operator<(const QString &s) const { return m_keyword < s; }
bool operator<(const Keyword &kw) const { return m_keyword < kw.m_keyword; }
bool operator==(const Keyword &kw) const { return m_keyword == kw.m_keyword; }
private:
QString m_keyword;
int16_t m_category;