
30 Jun
2012
30 Jun
'12
11:18 p.m.
Le 30/06/12 18:47, Steven Watanabe a écrit :
AMDG
On 06/30/2012 09:24 AM, Vicente J. Botet Escriba wrote:
Le 30/06/12 06:07, Nathan Ridge a écrit :
int foo(int a, int b = 0);
I agree that it will be interesting to have a way to make this bar transformation using a class template unary
int main() { int A[5]; A | boost::adaptors::transformed(unary<foo>()); }
Not possible. There's no way to preserve default arguments when taking a pointer to a function.
Yes I know. Could a lambda help on this context? int main() { int A[5]; A | boost::adaptors::transformed([](int a){ return foo(a);}); } Vicente