To help LDC/GDC

Walter Bright newshound2 at digitalmars.com
Wed Apr 10 11:29:43 PDT 2013


On 4/9/2013 6:49 AM, Dicebot wrote:
> Not gonna argue latter but former is just wrong.
>
> struct Test
> {
>      int a;
>      pure int foo1() // strong pure
>      {
>          return 42;
>      }
>
>      pure int foo2() // weak pure
>      {
>          return a++;
>      }
> }
>
> Signature is the same for both functions.

foo1 is weakly pure. It would be strongly pure if it were declared:

     const pure int foo1();


More information about the Digitalmars-d mailing list