function is not function
Jonathan M Davis
jmdavisProg at gmx.com
Fri Sep 21 17:31:00 PDT 2012
On Friday, September 21, 2012 12:59:31 Ellery Newcomer wrote:
> solution is to use std.traits, but can someone explain this to me?
>
> import std.stdio;
>
> void main() {
> auto a = {
> writeln("hi");
> };
> pragma(msg, typeof(a)); // void function()
> pragma(msg, is(typeof(a) == delegate)); // nope!
> pragma(msg, is(typeof(a) == function)); // nope!
> }
Sorry if this ends up being a double-post, but the post I made hours ago
doesn't seem to be showing up, so I'm posting it again:
http://stackoverflow.com/questions/11067972
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list