diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 76985a8d..f0500fe3 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -10,17 +10,45 @@ jobs: runs-on: ${{ matrix.os }} strategy: - # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. - fail-fast: false + # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. + fail-fast: true matrix: os: [ubuntu-20.04, ubuntu-latest, macos-latest] + cpp_standard: [14, 20] mem_bound_debug: [off, on] include: - os: ubuntu-20.04 gcc_version: 7 + mem_bound_debug: on + - os: ubuntu-20.04 + gcc_version: 7 + cpp_standard: 17 + mem_bound_debug: off + - os: ubuntu-20.04 + gcc_version: 9 + cpp_standard: 20 + mem_bound_debug: on + - os: ubuntu-latest + gcc_version: 10 + cpp_standard: 20 + mem_bound_debug: off - os: ubuntu-latest gcc_version: 12 + cpp_standard: 20 + mem_bound_debug: off + exclude: + - os: ubuntu-20.04 + cpp_standard: 20 + - os: ubuntu-latest + cpp_standard: 14 + mem_bound_debug: on + - os: macos-latest + cpp_standard: 14 + mem_bound_debug: on + - os: macos-latest + cpp_standard: 20 + mem_bound_debug: off steps: - if: runner.os == 'Linux' @@ -39,6 +67,7 @@ jobs: run: > cmake -B ${{ github.workspace }}/build -D CMAKE_BUILD_TYPE=Release + -D CMAKE_CXX_STANDARD=${{ matrix.cpp_standard }} -D MEM_BOUND_DEBUG=${{ matrix.mem_bound_debug }} -S ${{ github.workspace }}/unit_test diff --git a/unit_test/view_gtest.cpp b/unit_test/view_gtest.cpp index 0ce32df1..8d7d092f 100644 --- a/unit_test/view_gtest.cpp +++ b/unit_test/view_gtest.cpp @@ -118,7 +118,7 @@ constexpr auto multBy2(StdArrInt2 a) StdArrInt2 res{}; struct { constexpr auto operator()(int i) const { return 2 * i; } - } mult2; + } mult2{}; auto v = view::transform(a, mult2); std::ptrdiff_t i{}; for (auto val : v) diff --git a/view/counted.h b/view/counted.h index 575d6872..9da5a94e 100644 --- a/view/counted.h +++ b/view/counted.h @@ -45,8 +45,8 @@ class counted_view constexpr bool empty() const noexcept { return 0 == _size; } - constexpr decltype(auto) operator[](difference_type index) const OEL_ALWAYS_INLINE - OEL_REQUIRES(iter_is_random_access) { return _begin[index]; } + constexpr decltype(auto) operator[](difference_type index) const + OEL_REQUIRES(iter_is_random_access) OEL_ALWAYS_INLINE { return _begin[index]; } protected: Iterator _begin; diff --git a/view/subrange.h b/view/subrange.h index 1a266e6d..72ecfa3a 100644 --- a/view/subrange.h +++ b/view/subrange.h @@ -39,8 +39,8 @@ class basic_view constexpr bool empty() const { return _begin == _end; } - constexpr decltype(auto) operator[](difference_type index) const OEL_ALWAYS_INLINE - OEL_REQUIRES(iter_is_random_access) { return _begin[index]; } + constexpr decltype(auto) operator[](difference_type index) const + OEL_REQUIRES(iter_is_random_access) OEL_ALWAYS_INLINE { return _begin[index]; } protected: Iterator _begin;