transporting qualifier from parameter to the return value

Kagamin spam at here.lot
Wed Dec 16 04:51:52 PST 2009


Andrei Alexandrescu Wrote:

> although it doesn't solve 100% of the potential cases

like what?

> My main concern is allowing shared to participate to the inout 
> transportation. I am tempted to allow it, but shared is constrained much 
> more severely than the other two.

Transportation of shared can be done only by duplication of function into shared and unshared variants, after which inout can be checked only for const-correctness, sharedness being processed by existing type checking code. If you want this typesaver...



More information about the Digitalmars-d mailing list