Do not support GCC 9 (#1978)

This will let us use C++20 features that GCC 9's experimental
C++20 support did not yet cover, such as "concepts".

This reverts some commits:
- 6bcd79b997
- d5ce5329ea
- 728d14879b
This commit is contained in:
Rangi
2026-05-22 16:46:46 -04:00
committed by GitHub
parent 48fcd9a0ca
commit 728bed39d5
11 changed files with 11 additions and 18 deletions
-1
View File
@@ -40,7 +40,6 @@ struct Rgba {
}
bool operator==(Rgba const &rhs) const { return toCSS() == rhs.toCSS(); }
bool operator!=(Rgba const &rhs) const { return !operator==(rhs); }
// CGB colors are RGB555, so we use bit 15 to signify that the color is transparent instead
// Since the rest of the bits don't matter then, we return 0x8000 exactly.
-2
View File
@@ -97,7 +97,6 @@ class EnumSeq {
EnumT operator*() const { return _value; }
bool operator==(Iterator const &rhs) const { return _value == rhs._value; }
bool operator!=(Iterator const &rhs) const { return !operator==(rhs); }
};
public:
@@ -132,7 +131,6 @@ public:
bool operator==(ZipIterator const &rhs) const {
return std::get<0>(_iters) == std::get<0>(rhs._iters);
}
bool operator!=(ZipIterator const &rhs) const { return !operator==(rhs); }
};
// Only needed inside `zip` below.
-1
View File
@@ -70,7 +70,6 @@ private:
SectionT &operator*() const { return *_piece; }
bool operator==(Iterator const &rhs) const { return _piece == rhs._piece; }
bool operator!=(Iterator const &rhs) const { return !operator==(rhs); }
};
public:
+2 -2
View File
@@ -74,14 +74,14 @@ char const *printChar(int c);
struct Uppercase {
// FNV-1a hash of an uppercased string
size_t operator()(std::string const &str) const {
constexpr size_t operator()(std::string const &str) const {
return std::accumulate(RANGE(str), size_t(0x811C9DC5), [](size_t hash, char c) {
return (hash ^ toUpper(c)) * 16777619;
});
}
// Compare two strings without case-sensitivity (by converting to uppercase)
bool operator()(std::string const &str1, std::string const &str2) const {
constexpr bool operator()(std::string const &str1, std::string const &str2) const {
return std::equal(RANGE(str1), RANGE(str2), [](char c1, char c2) {
return toUpper(c1) == toUpper(c2);
});