What is this strange alias syntax?

Steven Schveighoffer schveiguy at yahoo.com
Mon May 23 08:00:59 PDT 2011


On Mon, 23 May 2011 10:50:11 -0400, Andrej Mitrovic  
<andrej.mitrovich at gmail.com> wrote:

> Since &main can't be a template value argument, maybe he meant this use  
> case:
>
> alias int func();
>
> void foo(alias T)()
> {
       static assert(is(typeof(&T) == int function())); // fixed
> }
>
> int main()
> {
>     foo!main;
>     return 0;
> }


More information about the Digitalmars-d-learn mailing list