Error: constant false is not an lvalue
Ellery Newcomer
ellery-newcomer at utulsa.edu
Sun Aug 30 08:25:59 PDT 2009
Steven Schveighoffer wrote:
> On Sat, 29 Aug 2009 20:15:55 -0400, Ellery Newcomer
> <ellery-newcomer at utulsa.edu> wrote:
>
>> void blah(out bool a = false){
>> // blah blah blah
>> }
>>
>> compile time use of blah results in error.
>>
>> Am I doing anything wrong?
>
> out implies a reference. You can't have a reference to a manifest
> constant like that.
Are you saying a parameter like
out type a = b
implies the function assigns b's memory location to a?
More information about the Digitalmars-d-learn
mailing list