July 05, 2013
----
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?
July 05, 2013
Seems I'm a bit stupid today.
That solved my problem:
.destroy!vec2f(v);