Add static assert

This commit is contained in:
k-hara 2012-03-24 12:51:57 +09:00
parent cf7b014651
commit 01a8d9ab54

View file

@ -2772,6 +2772,7 @@ mixin template Proxy(alias a)
{
auto ref opEquals(this X)(auto ref typeof(this) b)
{
static assert(a.stringof.startsWith("this."));
return a == mixin("b."~a.stringof[5..$]); // remove "this."
}
auto ref opEquals(this X, B)(auto ref B b) if (!is(B == typeof(this)))