Skip to content

Commit

Permalink
Templates/SimpleAlgorithms: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kachsheev committed Dec 14, 2024
1 parent ff0eb23 commit 59e777a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/FlameIDE/Templates/SimpleAlgorithms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void foreachChangable(InputContainer &container, FuncObject &&func);
template<typename InputIterator, typename FuncObject>
void foreachChangable(Range<InputIterator> &range, FuncObject &&func);

}}
}} // namespace flame_ide::templates

namespace flame_ide
{namespace templates
Expand Down Expand Up @@ -115,7 +115,7 @@ void foreach(IteratorInput start, IteratorInput end, FuncObject &&func)
}

template<typename InputContainer, typename FuncObject>
void foreach(const InputContainer& container, FuncObject func)
void foreach(const InputContainer& container, FuncObject &&func)
{
foreach(container.begin(), container.end(), func);
}
Expand All @@ -138,6 +138,6 @@ void foreachChangable(Range<InputIterator> &range, FuncObject &&func)
foreach(range.begin(), range.end(), func);
}

}}
}} // namespace flame_ide::templates

#endif // SIMPLEALGORITHMS_HPP

0 comments on commit 59e777a

Please sign in to comment.