Date: Sat, 11 Apr 2015 00:27:34 +0000
> The library examples look good to me, I couldn't find anything to
> laugh at :-)
Wow. Miracles happen sometimes.
> For "N4295: Folding expressions" the motivating example from N4191
> might be good:
>
> #if __cpp_fold_expressions
> template<typename... T>
> auto sum(T... args) { return (args + ...); }
> #else
> auto sum() { return 0; }
> template<typename T>
> auto sum(T t) { return t; }
> template(typename T, typename... Ts)
> auto sum(T t, Ts... ts) { return t + sum(ts...); }
> #endif
>
> In this example, the version using a fold expression performs
> fewer
> copies and fewer function calls.
Thanks for pointing that out.
Unfortunately I don't have time to edit that in today, so it won't be in what I'm about to send to John. But I'll get to it eventually.
Clark
> laugh at :-)
Wow. Miracles happen sometimes.
> For "N4295: Folding expressions" the motivating example from N4191
> might be good:
>
> #if __cpp_fold_expressions
> template<typename... T>
> auto sum(T... args) { return (args + ...); }
> #else
> auto sum() { return 0; }
> template<typename T>
> auto sum(T t) { return t; }
> template(typename T, typename... Ts)
> auto sum(T t, Ts... ts) { return t + sum(ts...); }
> #endif
>
> In this example, the version using a fold expression performs
> fewer
> copies and fewer function calls.
Thanks for pointing that out.
Unfortunately I don't have time to edit that in today, so it won't be in what I'm about to send to John. But I'll get to it eventually.
Clark
Received on 2015-04-11 02:27:42