Skip to content

Commit ac8273f

Browse files
committed
Do not unnecessarily wrap a function in a lambda
1 parent ac119bc commit ac8273f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

source/containers/insert.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,11 @@ constexpr auto lazy_insert(
142142
iterator_t<Container const &> const position,
143143
bounded::construct_function_for<range_value_t<Container>> auto && constructor
144144
) -> iterator_t<Container &> {
145-
return ::containers::insert(container, position, generate_n(1_bi, [&] -> decltype(auto) { return OPERATORS_FORWARD(constructor)(); }));
145+
return ::containers::insert(
146+
container,
147+
position,
148+
generate_n(1_bi, OPERATORS_FORWARD(constructor))
149+
);
146150
}
147151

148152
// If `args` reference any element at or beyond `position` and `container` does

0 commit comments

Comments
 (0)