Attribute inference for auto functions?

deadalnix deadalnix at gmail.com
Wed Apr 17 19:31:10 PDT 2013


On Thursday, 18 April 2013 at 01:52:10 UTC, Walter Bright wrote:
> To annotate the return type specifically with, say, const:
>
>     const(T) foo();
>
> And in fact const with parens works as a general type 
> constructor:
>
>     const(T)* foo();  // return mutable pointer to const T
>
> const without parens applies to the declaration.

This doesn't work with many attributes.


More information about the Digitalmars-d mailing list