mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
23 lines
309 B
D
23 lines
309 B
D
struct Arr(T)
|
|
{
|
|
T[] dArr;
|
|
alias dArr this;
|
|
bool opEquals(Arr!T d)
|
|
{
|
|
foreach (idx, it; d)
|
|
{
|
|
if (this[idx] != it)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
|
|
class Bar
|
|
{
|
|
Arr!Foo fooQ;
|
|
}
|
|
|
|
class Foo {} // NG
|