Skip to content

Commit 82c7555

Browse files
authored
Merge pull request #220 from tcbrindle/pr/drop-gcc11
Drop GCC 11
2 parents 5854e37 + ee9a8a8 commit 82c7555

File tree

7 files changed

+7
-45
lines changed

7 files changed

+7
-45
lines changed

.github/workflows/linux.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
compiler: [GCC-11, GCC-12, GCC-13, GCC-14, Clang-17, Clang-18, Clang-19]
14+
compiler: [GCC-12, GCC-13, GCC-14, Clang-17, Clang-18, Clang-19]
1515
test_with: [Headers, Module]
1616
build_type: [Debug, Release]
1717

1818
exclude:
19-
- compiler: GCC-11
20-
test_with: Module
2119
- compiler: GCC-12
2220
test_with: Module
2321
- compiler: GCC-13
@@ -26,11 +24,6 @@ jobs:
2624
test_with: Module
2725

2826
include:
29-
- compiler: GCC-11
30-
cxx: g++-11
31-
install: |
32-
brew install gcc@11 ninja binutils
33-
brew link --force binutils
3427
- compiler: GCC-12
3528
cxx: g++-12
3629
install: |

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ See the vcpkg documentation for more details.
7777

7878
Flux requires a recent compiler with good support for the C++20 standard. It is tested with:
7979

80-
* GCC 11.3 and newer
80+
* GCC 12 and newer
8181
* LLVM Clang 16 and newer
8282
* MSVC 2022
8383
* AppleClang/Xcode 16

docs/reference/algorithms.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Algorithms
109109
:language: cpp
110110
:linenos:
111111
:dedent:
112-
:lines: 21-52
112+
:lines: 16-44
113113

114114
:see also:
115115
* `std::lexicographical_compare_three_way() <https://en.cppreference.com/w/cpp/algorithm/lexicographical_compare_three_way>`_

example/docs/compare.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
#include <limits>
1111
#include <vector>
1212

13-
#ifdef _GLIBCXX_RELEASE
14-
#if _GLIBCXX_RELEASE < 12
15-
#define COMPILER_IS_GCC11
16-
#endif
17-
#endif
1813

1914
int main()
2015
{
@@ -43,11 +38,8 @@ int main()
4338

4439
// On most systems we can use std::strong_order as a custom comparator
4540
// to get a total order for IEEE floats
46-
// (Note that this is not supported with GCC 11)
47-
#ifndef COMPILER_IS_GCC11
4841
if constexpr (std::numeric_limits<double>::is_iec559) {
4942
assert(flux::compare(v5, v6, std::strong_order) ==
5043
std::strong_ordering::less);
5144
}
52-
#endif
5345
}

example/top10/07_max_gap_count.cpp

+1-24
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
1111

1212
#include <flux.hpp>
1313

14-
// GCC 11 doesn't support constexpr std::vector
15-
#if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE < 12
16-
#define COMPILER_IS_GCC11
17-
#endif
18-
1914
// std::abs is not constexpr in C++20
2015
auto const c_abs = [](std::signed_integral auto i) { return i < 0 ? -i : i; };
2116

@@ -31,11 +26,9 @@ auto const max_gap_count = [](std::vector<int> nums)
3126
return diffs.count_eq(diffs.max().value_or(0));
3227
};
3328

34-
#ifndef COMPILER_IS_GCC11
3529
static_assert(max_gap_count({2, 5, 8, 1}) == 2);
3630
static_assert(max_gap_count({3, 6, 9, 1}) == 2);
3731
static_assert(max_gap_count({10}) == 0);
38-
#endif
3932

4033
}
4134

@@ -63,27 +56,11 @@ auto const max_gap_count = [](std::vector<int> nums)
6356
.count;
6457
};
6558

66-
#ifndef COMPILER_IS_GCC11
6759
static_assert(max_gap_count({2, 5, 8, 1}) == 2);
6860
static_assert(max_gap_count({3, 6, 9, 1}) == 2);
6961
static_assert(max_gap_count({10}) == 0);
70-
#endif
7162

7263
}
7364

7465
int main()
75-
{
76-
{
77-
using namespace version1;
78-
FLUX_ASSERT(max_gap_count({2, 5, 8, 1}) == 2);
79-
FLUX_ASSERT(max_gap_count({3, 6, 9, 1}) == 2);
80-
FLUX_ASSERT(max_gap_count({10}) == 0);
81-
}
82-
83-
{
84-
using namespace version2;
85-
FLUX_ASSERT(max_gap_count({2, 5, 8, 1}) == 2);
86-
FLUX_ASSERT(max_gap_count({3, 6, 9, 1}) == 2);
87-
FLUX_ASSERT(max_gap_count({10}) == 0);
88-
}
89-
}
66+
{}

include/flux/core/concepts.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
// clang-format off
2020

21-
// Workaround GCC11/12 ICE in sequence concept definition below
21+
// Workaround GCC12 ICE in sequence concept definition below
2222
#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ < 13)
2323
#define FLUX_COMPILER_IS_GCC12
2424
#endif

test/test_optional.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
namespace {
1818

19-
// GCC11 std::string isn't usable in constexpr, so here's a quick and dirty
20-
// version instead
19+
// Constexpr use of std::string causes problems with some compiler/stdlib
20+
// combinations, so here's a quick-and-dirty constexpr string instead
2121
struct String {
2222
private:
2323
using Traits = std::char_traits<char>;

0 commit comments

Comments
 (0)