https://issues.dlang.org/show_bug.cgi?id=16744
Issue ID: 16744
Summary: We should have a TypeOf template so that typeof can be
used with templates like staticMap
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
Unfortunately, there is no way to do the compile-time equivalent of a lambda
when dealing with templates. So, you can't use do something like
staticMap!(a => typeof(a), args)
or whatever the syntax would be if we had it. So, we need a helper template to
do the same thing if we want to use typeof with something like staticMap. e.g.
staticMap!(TypeOf, args)
It seems to me that it makes sense to add such a helper to Phobos rather than
requiring that everyone do it themselves when they need it.
--