Remove meta.transform duplicating Phobos
This commit is contained in:
@@ -89,84 +89,3 @@ import tanya.meta.trait;
|
||||
static assert(is(FunctionTypeOf!S2 == function));
|
||||
static assert(is(FunctionTypeOf!s2 == function));
|
||||
}
|
||||
|
||||
@nogc nothrow pure @safe unittest
|
||||
{
|
||||
static assert(!hasElaborateAssign!int);
|
||||
|
||||
static struct S1
|
||||
{
|
||||
void opAssign(S1)
|
||||
{
|
||||
}
|
||||
}
|
||||
static struct S2
|
||||
{
|
||||
void opAssign(int)
|
||||
{
|
||||
}
|
||||
}
|
||||
static struct S3
|
||||
{
|
||||
S1 s;
|
||||
alias s this;
|
||||
}
|
||||
static assert(hasElaborateAssign!S1);
|
||||
static assert(!hasElaborateAssign!(const S1));
|
||||
static assert(hasElaborateAssign!(S1[1]));
|
||||
static assert(!hasElaborateAssign!(S1[0]));
|
||||
static assert(!hasElaborateAssign!S2);
|
||||
static assert(hasElaborateAssign!S3);
|
||||
|
||||
static struct S4
|
||||
{
|
||||
void opAssign(S4)
|
||||
{
|
||||
}
|
||||
@disable this(this);
|
||||
}
|
||||
static assert(hasElaborateAssign!S4);
|
||||
}
|
||||
|
||||
// Produces a tuple for an enum with only one member
|
||||
@nogc nothrow pure @safe unittest
|
||||
{
|
||||
enum E : int
|
||||
{
|
||||
one = 0,
|
||||
}
|
||||
static assert(EnumMembers!E == AliasSeq!0);
|
||||
}
|
||||
|
||||
@nogc nothrow pure @safe unittest
|
||||
{
|
||||
class RefCountedStore(T)
|
||||
{
|
||||
}
|
||||
static assert(!isInnerClass!(RefCountedStore!int));
|
||||
}
|
||||
|
||||
@nogc nothrow pure @safe unittest
|
||||
{
|
||||
static struct DisabledOpEquals
|
||||
{
|
||||
@disable bool opEquals(typeof(this)) @nogc nothrow pure @safe;
|
||||
|
||||
int opCmp(typeof(this)) @nogc nothrow pure @safe
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
static assert(!isEqualityComparable!DisabledOpEquals);
|
||||
static assert(isOrderingComparable!DisabledOpEquals);
|
||||
|
||||
static struct OpEquals
|
||||
{
|
||||
bool opEquals(typeof(this)) @nogc nothrow pure @safe
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
static assert(isEqualityComparable!OpEquals);
|
||||
static assert(!isOrderingComparable!OpEquals);
|
||||
}
|
||||
|
Reference in New Issue
Block a user