https://issues.dlang.org/show_bug.cgi?id=8471

--- Comment #11 from Andrei Alexandrescu <and...@erdani.com> ---
Oh, sorry. The idea is to leave readf unqualified and let the compiler infer
whether it's safe or not.

In this particular case I see there's a simple solution - just add a constraint
to it making sure all parameters are pointers. Something like:

uint readf(Data...)(in char[] format, Data data)
if (allSatisfy!(isPointer, Data);

Then the only way to call readf is with pointers, which eliminates the
possibility of shenanigans.

--

Reply via email to