On 08/06/13 18:03, Dicebot wrote:
> On Tuesday, 6 August 2013 at 15:51:28 UTC, Jack Applegame wrote:
>> On Tuesday, 6 August 2013 at 14:44:18 UTC, bearophile wrote:
>>> Take a look at std.typetuple.staticMap
>> staticMap works with types, and I don't know how it can help.
>
> Not really. Anything
On Tuesday, 6 August 2013 at 16:03:07 UTC, Dicebot wrote:
On Tuesday, 6 August 2013 at 15:51:28 UTC, Jack Applegame wrote:
On Tuesday, 6 August 2013 at 14:44:18 UTC, bearophile wrote:
Take a look at std.typetuple.staticMap
staticMap works with types, and I don't know how it can help.
Not rea
On Tuesday, 6 August 2013 at 15:51:28 UTC, Jack Applegame wrote:
On Tuesday, 6 August 2013 at 14:44:18 UTC, bearophile wrote:
Take a look at std.typetuple.staticMap
staticMap works with types, and I don't know how it can help.
Not really. Anything that can be provided to template argument
li
On Tuesday, 6 August 2013 at 14:44:18 UTC, bearophile wrote:
Take a look at std.typetuple.staticMap
staticMap works with types, and I don't know how it can help.
Jack Applegame:
In other words, I need something like this:
foo(magicTemplate!(f, a1, a2, a3...)) === foo(f(a1), f(a2),
f(a3)...)
Sorry, your second post was not yet present and I misunderstood
your question.
Take a look at std.typetuple.staticMap
Bye,
bearophile
Jack Applegame:
Is there a simple way to do this in D?
somefunc(process(args));
Bye,
bearophile
In other words, I need something like this:
foo(magicTemplate!(f, a1, a2, a3...)) === foo(f(a1), f(a2),
f(a3)...)
In C++11 we can write:
template
void somefunc(Args... args {
...
}
template
T process(T p) {
...
}
template
void foo(Args... args) {
somefunc(process(args)...);
}
Is there a simple way to do this in D?