From Jason Turner

[intseq.general]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpbgtnw6mf/{from.md → to.md} +3 -15
tmp/tmpbgtnw6mf/{from.md → to.md} RENAMED
@@ -2,21 +2,9 @@
2
 
3
  The library provides a class template that can represent an integer
4
  sequence. When used as an argument to a function template the parameter
5
  pack defining the sequence can be deduced and used in a pack expansion.
6
 
7
- ``` cpp
8
- template<class F, class Tuple, std::size_t... I>
9
- decltype(auto) apply_impl(F&& f, Tuple&& t, index_sequence<I...>) {
10
- return std::forward<F>(f)(std::get<I>(std::forward<Tuple>(t))...);
11
- }
12
-
13
- template<class F, class Tuple>
14
- decltype(auto) apply(F&& f, Tuple&& t) {
15
- using Indices = make_index_sequence<std::tuple_size<std::decay_t<Tuple>>::value>;
16
- return apply_impl(std::forward<F>(f), std::forward<Tuple>(t), Indices());
17
- }
18
- ```
19
-
20
- The `index_sequence` alias template is provided for the common case of
21
- an integer sequence of type `size_t`.
22
 
 
2
 
3
  The library provides a class template that can represent an integer
4
  sequence. When used as an argument to a function template the parameter
5
  pack defining the sequence can be deduced and used in a pack expansion.
6
 
7
+ [*Note 1*: The `index_sequence` alias template is provided for the
8
+ common case of an integer sequence of type `size_t`; see also
9
+ [[tuple.apply]]. — *end note*]
 
 
 
 
 
 
 
 
 
 
 
 
10