To help LDC/GDC
Simen Kjærås
simen.kjaras at gmail.com
Tue Apr 9 07:12:48 PDT 2013
On Tue, 09 Apr 2013 16:09:40 +0200, Jesse Phillips
<Jessekphillips+d at gmail.com> wrote:
> On Tuesday, 9 April 2013 at 13:49:12 UTC, Dicebot wrote:
>> struct Test
>> {
>> int a;
>> pure int foo1() // strong pure
>> {
>> return 42;
>> }
>>
>> pure int foo2() // weak pure
>> {
>> return a++;
>> }
>> }
>
> Isn't it
>
> pure int foo1() const // strong pure
const is not sufficient, as someone else might have a mutable
reference. immutable is needed.
--
Simen
More information about the Digitalmars-d
mailing list