November 28, 2007 [Issue 1547] Struct can't be given default value of null in param list | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=1547 walter@mail.math.uni-magdeburg.de changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |walter@mail.math.uni- | |magdeburg.de ------- Comment #1 from walter@mail.math.uni-magdeburg.de 2007-11-28 10:27 ------- This bug does not only apply to null as a default parameter, but in every case where a struct OR class should get initialized by another type. To point out the importance of this issue, I'd like to mention the application of a GMP wrapper library which wraps the GMP types (from the C library) in structs and expression templates. For GMP it is important that one can use these structs like native datatypes: void foo (mpz arg = 0) { ... } one may argue, that you can write "arg = T(0)" (via static opCall), but this does not work for int, so using mpz like int would not work! best regards Matthias Walter -- |
Copyright © 1999-2021 by the D Language Foundation