@trusting generic functions

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat May 28 06:03:10 PDT 2016


On Saturday, 28 May 2016 at 11:50:33 UTC, Lodovico Giaretta wrote:
> Let's say I have a generic function that uses pointers. It will 
> be inferred @system by the compiler, but I know that the 
> pointer usage can be @trusted.

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.


More information about the Digitalmars-d-learn mailing list