[Issue 15437] documentation for typeof(someTemplate) == void

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 5 23:31:56 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=15437

--- Comment #8 from Johannes Loher <johannes.loher at fg4f.de> ---
Realated comment in the corresponding section in dmd:

/* Today, 'typeof(func)' returns void if func is a
 * function template (TemplateExp), or
 * template lambda (FuncExp).
 * It's actually used in Phobos as an idiom, to branch code for
 * template functions.
 */

Does anybody know where this is actually used in phobos? Wouldn't it be better
to use isTemplate in this case?

--


More information about the Digitalmars-d-bugs mailing list