Forbid dynamic arrays in boolean evaluation contexts

Steven Schveighoffer schveiguy at yahoo.com
Tue Mar 26 21:06:20 PDT 2013


On Tue, 26 Mar 2013 23:31:03 -0400, deadalnix <deadalnix at gmail.com> wrote:

> On Wednesday, 27 March 2013 at 03:26:59 UTC, Steven Schveighoffer wrote:
>> No.  [] calls the hook for _d_arrayliteral, whose source is not known  
>> at compile time.  Runtime functions cannot be inlined, which will be  
>> set in stone once the runtime is a dynamic library.
>>
>
> The compiler know the result by advance, it don't need the source of the  
> _d_arrayliteral.

The value of the empty literal is an implementation detail, not defined by  
the compiler or spec as far as I know.

-Steve


More information about the Digitalmars-d mailing list