DMD1 function template broken or did I f.u.?
Simen kjaeraas
simen.kjaras at gmail.com
Tue Aug 24 08:38:13 PDT 2010
0ffh <frank at youknow.what.todo.internetz> wrote:
> So, my question is: Huh?
The answer to this should for symmetry be: Duh!
However, it is not quite that simple.
> void remove(T)(out T[] array,T element) {
This is the line that gives you problems. You are expecting 'out' to
work like 'ref', which it doesn't. From [1]: "out parameters are set to
the default initializer for the type of it."
Also, this newsgroup is for automated messages from D's Bugzilla. You
might want to ask this kind of questions in digitalmars.D.learn in the
future.
[1]: http://digitalmars.com/d/2.0/function.html#parameters
--
Simen
More information about the Digitalmars-d-bugs
mailing list