Skip to content

Commit bbc2016

Browse files
committed
Expand doxygen on ranget.map
The new doxygen explains the extent and limitations of `ranget.map`'s support of move-only types.
1 parent 0b73746 commit bbc2016

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/util/range.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,11 @@ struct ranget final
327327
}
328328

329329
/// The type of elements contained in the resulting range is deduced from the
330-
/// return type of \p `f`.
330+
/// return type of `f`.
331+
/// Please note that the parameter to `f` must be a const reference. This is
332+
/// a limitation of the current implementation. This means that you can't move
333+
/// a value through `f`. `f` may take a move-only typed parameter by const
334+
/// reference. 'f' may also construct and return a move-only typed value.
331335
template <typename functiont>
332336
auto map(functiont &&f) -> ranget<map_iteratort<
333337
iteratort,

0 commit comments

Comments
 (0)