Skip to content

Commit 1345a86

Browse files
committed
Update all-in-one header
1 parent 16a810c commit 1345a86

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include_all_in_one/include/fplus/fplus.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4733,7 +4733,8 @@ Container intersperse(const X& value, const Container& xs)
47334733
if (xs.empty())
47344734
return Container();
47354735
if (size_of_cont(xs) == 1)
4736-
return xs;
4736+
// workaround for array-bounds false positive in GCC 14, see https://github.com/Dobiasd/FunctionalPlus/issues/301
4737+
return Container({ xs.front() });
47374738
Container result;
47384739
internal::prepare_container(result, std::max<std::size_t>(0, size_of_cont(xs) * 2 - 1));
47394740
auto it = internal::get_back_inserter(result);

0 commit comments

Comments
 (0)