mirror of
https://github.com/dlang/phobos.git
synced 2025-05-11 23:05:34 +03:00
Add static assert
This commit is contained in:
parent
cf7b014651
commit
01a8d9ab54
1 changed files with 1 additions and 0 deletions
|
@ -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)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue