Rename isPolymorphic into isPolymorphicType
This commit is contained in:
parent
211f590caa
commit
85ad88bc4d
@ -164,7 +164,7 @@ body
|
|||||||
*/
|
*/
|
||||||
template stateSize(T)
|
template stateSize(T)
|
||||||
{
|
{
|
||||||
static if (isPolymorphic!T)
|
static if (isPolymorphicType!T)
|
||||||
{
|
{
|
||||||
enum size_t stateSize = __traits(classInstanceSize, T);
|
enum size_t stateSize = __traits(classInstanceSize, T);
|
||||||
}
|
}
|
||||||
|
@ -294,7 +294,7 @@ enum bool isStruct(T) = is(T == struct);
|
|||||||
* Returns: $(D_KEYWORD true) if $(D_PARAM T) is a $(D_KEYWORD class) or an
|
* Returns: $(D_KEYWORD true) if $(D_PARAM T) is a $(D_KEYWORD class) or an
|
||||||
* $(D_KEYWORD interface), $(D_KEYWORD false) otherwise.
|
* $(D_KEYWORD interface), $(D_KEYWORD false) otherwise.
|
||||||
*/
|
*/
|
||||||
enum bool isPolymorphic(T) = is(T == class) || is(T == interface);
|
enum bool isPolymorphicType(T) = is(T == class) || is(T == interface);
|
||||||
|
|
||||||
///
|
///
|
||||||
@nogc nothrow pure @safe unittest
|
@nogc nothrow pure @safe unittest
|
||||||
@ -302,9 +302,9 @@ enum bool isPolymorphic(T) = is(T == class) || is(T == interface);
|
|||||||
interface I
|
interface I
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
static assert(isPolymorphic!Object);
|
static assert(isPolymorphicType!Object);
|
||||||
static assert(isPolymorphic!I);
|
static assert(isPolymorphicType!I);
|
||||||
static assert(!isPolymorphic!short);
|
static assert(!isPolymorphicType!short);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user