We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16a810c commit 1345a86Copy full SHA for 1345a86
include_all_in_one/include/fplus/fplus.hpp
@@ -4733,7 +4733,8 @@ Container intersperse(const X& value, const Container& xs)
4733
if (xs.empty())
4734
return Container();
4735
if (size_of_cont(xs) == 1)
4736
- return xs;
+ // workaround for array-bounds false positive in GCC 14, see https://github.com/Dobiasd/FunctionalPlus/issues/301
4737
+ return Container({ xs.front() });
4738
Container result;
4739
internal::prepare_container(result, std::max<std::size_t>(0, size_of_cont(xs) * 2 - 1));
4740
auto it = internal::get_back_inserter(result);
0 commit comments