July 05, 2013 Problem with destroy | ||||
---|---|---|---|---|
| ||||
---- import std.stdio; struct vec2f { public: float[2] data; alias data this; } void main() { vec2f[] vs; foreach (ref vec2f v; vs) { .destroy(v); } } ---- /d488/f18.d(14): Error: template object.destroy matches more than one template declaration, /opt/compilers/dmd2/include/object.di(593):destroy(T)(ref T obj) if (is(T == struct)) and /opt/compilers/dmd2/include/object.di(604):destroy(T : U[n], U, ulong n)(ref T obj) What is the smartest way for this? |
Copyright © 1999-2021 by the D Language Foundation