You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: parameter_pack/README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
*`template <size_t index, typename... Args> constexpr auto value_by_index(Args&&... args) noexcept` returns the *value* at position `index` from `args`.
10
10
11
11
*`template <typename Functor, class... Args> void apply(Functor&& f, Args&&... args)` iterates the pack `args` and calls functor `f` with each *value* in the pack.
12
-
<br>Example: `apply([](auto&& item){std::cout << value << std::endl;}, 0, -1.0f, "text");`
12
+
<br>Example: `apply([](auto&& value){std::cout << value << std::endl;}, 0, -1.0f, "text");`
13
13
14
14
*`template <typename... Args, typename Functor> void for_type(Functor&& f)` calls functor `f` for each *type* in the argument pack. The type is passed using `type_wrapper` helper template defined in `utils/template_magic.hpp`.
15
15
<br>Example: `for_type<int, float, std::string> ([](auto&& t){ using Type = typename decltype(t)::type; });`
0 commit comments