Returning references to const data from const methods

Deewiant deewiant.doesnotlike.spam at gmail.com
Tue Jun 19 05:35:36 PDT 2007


Christian Kamm wrote:
> This works for me:
> 
> alias const(uint)* returnType;
> const returnType gimme() {...}
> 
> But this fails to compile:
> 
> const const(uint)* gimme() {...}
> 
> Cheers,
> Christian

You might want to file a bug for that: an alias should behave the same way as
the base type. I'm not sure which behaviour is correct, but they should at least
be the same.

-- 
Remove ".doesnotlike.spam" from the mail address.


More information about the Digitalmars-d-learn mailing list