On Monday, 23 September 2013 at 19:11:53 UTC, Namespace wrote:
On Monday, 23 September 2013 at 19:06:48 UTC, Namespace wrote:
Code:
----
import std.stdio;
struct A {
public:
int[4] val;
alias val this;
}
void main()
{
A a;
a.destroy();
}
----
/d824/f630.d(13): 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)
Nice. What should I do?
As always. As soon as you wrote it, you've got the solution.
----
destroy!A(a);
----
Because this solution does not work anymore with dmd 2.064 beta:
Are there any other tips and tricks?