Skip to content

Commit

Permalink
Add GCC 14 CI build (#302)
Browse files Browse the repository at this point in the history
* Add GCC 14 CI build

* Work around array-bounds false positive in GCC 14

* fix formatting

* Add link to issue in the comment

---------

Co-authored-by: Dobiasd <[email protected]>
  • Loading branch information
offa and Dobiasd authored May 23, 2024
1 parent f44f0f8 commit ab8ea94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
strategy:
matrix:
build_config:
- { version: 14 }
- { version: 13 }
- { version: 12 }
- { version: 11 }
Expand Down
3 changes: 2 additions & 1 deletion include/fplus/container_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,8 @@ Container intersperse(const X& value, const Container& xs)
if (xs.empty())
return Container();
if (size_of_cont(xs) == 1)
return xs;
// workaround for array-bounds false positive in GCC 14, see https://github.com/Dobiasd/FunctionalPlus/issues/301
return Container({ xs.front() });
Container result;
internal::prepare_container(result, std::max<std::size_t>(0, size_of_cont(xs) * 2 - 1));
auto it = internal::get_back_inserter(result);
Expand Down

0 comments on commit ab8ea94

Please sign in to comment.