Proposal: Relax rules for 'pure'

klickverbot see at klickverbot.at
Wed Sep 22 12:21:57 PDT 2010


On 9/22/10 9:14 PM, Steven Schveighoffer wrote:
> Hypothetical counter-case
>
> struct S
> {
> version(stronglypure)
> string s;
> else
> char[] s;
> }
>
> pure foo(S s); // changes strength depending on S' contents
>
> -Steve

This is a change to the signature of foo – S with the stronglypure 
version defined and S without it are two completely distinct types.


More information about the Digitalmars-d mailing list