To help LDC/GDC

Iain Buclaw ibuclaw at ubuntu.com
Mon Apr 8 06:02:47 PDT 2013


>
> Possibly strongly-pure functions could be marked as pure in the 'C' sense,
> but only if they are also nothrow, eg to add to the above example:
>
> ---
> pure nothrow int baz (Foo f)
> {
>   return f.bar(2) + f.bar(2);
> }
> ---
>
>
Or a better example that could also be pure in the 'C' sense.

int baz (Foo f) pure nothrow
{
  return f.bar(f.a) + f.bar(f.a);
}


-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130408/6346bc96/attachment.html>


More information about the Digitalmars-d mailing list