 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Alberto Ganesh Barbati Guest
|
Posted: Mon May 21, 2007 5:12 am Post subject: Question about 8.3/10 (function parameter pack) |
|
|
Hi,
in 8.3/10 of the latest draft (N2289) the example contains:
template<typename... T> void f(T (* ...T)(int, int);
int add(int, int);
float subtract(int, int);
void g() {
f(add, subtract);
}
what is the role of the third T in the first line?
template<typename... T> void f(T (* ...T)(int, int);
^
|
this one
If I understand the syntax correctly, after ... we should see the name
of the function parameter pack, so using T seems somehow wrong to me.
Am I missing something?
Ganesh
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
Douglas Gregor Guest
|
Posted: Mon May 21, 2007 6:06 pm Post subject: Re: Question about 8.3/10 (function parameter pack) |
|
|
On May 20, 8:12 pm, AlbertoBarb...@libero.it (Alberto Ganesh Barbati)
wrote:
| Quote: | in 8.3/10 of the latest draft (N2289) the example contains:
|
You mean 8.3.5/10 of N2284, I assume?
| Quote: | template<typename... T> void f(T (* ...T)(int, int);
int add(int, int);
float subtract(int, int);
void g() {
f(add, subtract);
}
what is the role of the third T in the first line?
|
Ah, looks like a typo. That was a lower-case 't' in the original
document. I've reported this problem to the project editor.
Thanks!
- Doug
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
Powered by phpBB © 2001, 2006 phpBB Group
|