Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Message-ID | <83ae9935-60ed-4ab2-a52f-c336d4b19b62@googlegroups.com> (permalink) |
|---|---|
| Newsgroups | comp.std.c++ |
| From | Piet <bremende55@googlemail.com> |
| Subject | Compile-time integer sequences C++14 |
| Organization | unknown |
| Date | 2014-05-13 13:52 -0600 |
hello,
20.5.1 of the C++14 draft reads
example:
template<class F, class Tuple, std::size_t... I>
decltype(auto) apply_impl(F&& f, Tuple&& t, index_sequence<I...>) {
return std::forward<F>(f)(std::get<I>(std::forward<Tuple>(t))...);
}
What I do not understand:
The I in get<I> is declared as parameter pack in the template
parameter list, but should be a number or a type of one of the tuple
elements. Am I wrong?
How f could be declared (see the ellipsis in the call)?
Best regards
Piet
--
[ comp.std.c++ is moderated. To submit articles, try posting with your ]
[ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Back to comp.std.c++ | Previous | Next — Next in thread | Find similar
Compile-time integer sequences C++14 Piet <bremende55@googlemail.com> - 2014-05-13 13:52 -0600 Re: Compile-time integer sequences C++14 Daniel Krügler <daniel.kruegler@googlemail.com> - 2014-05-14 21:19 -0600
csiph-web