@trusting generic functions
Era Scarecrow via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat May 28 06:20:17 PDT 2016
On Saturday, 28 May 2016 at 13:10:56 UTC, Lodovico Giaretta wrote:
> On Saturday, 28 May 2016 at 13:03:10 UTC, Adam D. Ruppe wrote:
>> What kind of pointer usage do you have? Remember that basic &
>> and * operations ARE @safe.
>>
>> If you have more internally, you might be able to wrap them up
>> in an @trusted function to again allow inference to work.
>
> Ouch! I was under the impression that any pointer usage was
> forbidden in @safe code.
Pointers by themselves are safe (as they have to point to
something valid to start with); It's manipulating pointers that's
usually unsafe (and the easiest source of bugs with pointers
involved).
More information about the Digitalmars-d-learn
mailing list