diff --git a/spec/traits.dd b/spec/traits.dd index dbd2c6d7b9..bd9696f072 100644 --- a/spec/traits.dd +++ b/spec/traits.dd @@ -79,8 +79,8 @@ $(GNAME TraitsArgument): $(H2 $(GNAME isArithmetic)) - $(P If the arguments are all either types that are arithmetic types, - or expressions that are typed as arithmetic types, then $(D true) + $(P If the arguments are all either types that are $(DDSUBLINK type, Arithmetic Type, $(I Arithmetic Type)), or + expressions that are typed as arithmetic types, then $(D true) is returned. Otherwise, $(D false) is returned. If there are no arguments, $(D false) is returned.) @@ -111,8 +111,7 @@ false $(H2 $(GNAME isFloating)) - $(P Works like $(D isArithmetic), except it's for floating - point types (including imaginary and complex types).) + $(P Works like $(GLINK isArithmetic), except it's for $(DDSUBLINK type, Floating Type, $(I Floating Type)).) $(SPEC_RUNNABLE_EXAMPLE_COMPILE --- @@ -132,8 +131,7 @@ static assert(!__traits(isFloating, float[4])); $(H2 $(GNAME isIntegral)) - $(P Works like $(D isArithmetic), except it's for integral - types (including character types).) + $(P Works like $(GLINK isArithmetic), except it's for $(DDSUBLINK type, Integral Type, $(I Integral Type)).) $(SPEC_RUNNABLE_EXAMPLE_COMPILE --- @@ -155,8 +153,7 @@ static assert(!__traits(isIntegral, void*)); $(H2 $(GNAME isScalar)) - $(P Works like $(D isArithmetic), except it's for scalar - types.) + $(P Works like $(GLINK isArithmetic), except it's for $(DDSUBLINK type, Scalar Type, $(I Scalar Type)).) $(SPEC_RUNNABLE_EXAMPLE_COMPILE --- @@ -182,8 +179,7 @@ static assert(!__traits(isScalar, Object)); $(H2 $(GNAME isUnsigned)) - $(P Works like $(D isArithmetic), except it's for unsigned - types.) + $(P Works like $(GLINK isArithmetic), except it's for $(DDSUBLINK type, Unsigned Type, $(I Unsigned Type)).) $(SPEC_RUNNABLE_EXAMPLE_COMPILE --- @@ -208,7 +204,7 @@ static assert(!__traits(isUnsigned, void*)); $(H2 $(GNAME isStaticArray)) - $(P Works like $(D isArithmetic), except it's for static array + $(P Works like $(GLINK isArithmetic), except it's for static array types.) $(SPEC_RUNNABLE_EXAMPLE_COMPILE @@ -228,7 +224,7 @@ static assert(!__traits(isStaticArray, array)); $(H2 $(GNAME isAssociativeArray)) - $(P Works like $(D isArithmetic), except it's for associative array + $(P Works like $(GLINK isArithmetic), except it's for associative array types.) $(H2 $(GNAME isAbstractClass)) @@ -810,7 +806,6 @@ $(CONSOLE tuple("pure", "nothrow", "@nogc", "@trusted") ) ) -) $(H2 $(GNAME getLinkage)) diff --git a/spec/type.dd b/spec/type.dd index 3c51b372a6..89142aa3fc 100644 --- a/spec/type.dd +++ b/spec/type.dd @@ -47,10 +47,12 @@ $(H2 $(LEGACY_LNAME2 Derived Data Types, derived-data-types, Derived Data Types) $(UL $(LI pointer) - $(LI array) + $(LI static array) + $(LI dynamic array) $(LI associative array) $(LI function) $(LI delegate) + $(LI vector) ) $(P $(DDSUBLINK spec/arrays, strings, $(I Strings)) are a special case of arrays.) @@ -62,7 +64,7 @@ $(H2 $(LEGACY_LNAME2 User Defined Types, user-defined-types, User-Defined Types) $(LI struct) $(LI union) $(LI class) - + $(LI interface) ) $(H2 $(LEGACY_LNAME2 Base Types, base-types, Base Types)) @@ -73,6 +75,71 @@ $(H2 $(LEGACY_LNAME2 Base Types, base-types, Base Types)) enum E : T { ... } // T is the base type of E --- +$(H2 $(LNAME2 Unsigned Type, Unsigned Type)) + + $(P The following are $(I Unsigned Type):) + + $(UL + $(LI bool) + $(LI ubyte) $(LI ushort) $(LI uint) $(LI ulong) $(LI ucent) + $(LI char) $(LI wchar) $(LI dchar) + ) + + $(P If the $(GLINK2 enum, EnumBaseType) of an enum is an $(I Unsigned Type), the enum + is an $(I Unsigned Type).) + + $(P If the element type of a vector is an $(I Unsigned Type), the vector + is an $(I Unsigned Type).) + +$(H2 $(LNAME2 Integral Type, Integral Type)) + + $(P The following are $(I Integral Type):) + + $(UL + $(LI $(DDSUBLINK type, Unsigned Type, $(I Unsigned Type))) + $(LI byte) $(LI short) $(LI int) $(LI long) $(LI cent) + ) + + $(P If the $(GLINK2 enum, EnumBaseType) of an enum is an $(I Integral Type), the enum + is an $(I Integral Type).) + + $(P If the element type of a vector is an $(I Integral Type), the vector + is an $(I Integral Type).) + +$(H2 $(LNAME2 Floating Type, Floating Type)) + + $(P The following are $(I Floating Type):) + + $(UL + $(LI float) $(LI double) $(LI real) + $(LI ifloat) $(LI idouble) $(LI ireal) + $(LI cfloat) $(LI cdouble) $(LI creal) + ) + + $(P If the $(GLINK2 enum, EnumBaseType) of an enum is a $(I Floating Type), the enum + is a $(I Floating Type).) + + $(P If the element type of a vector is a $(I Floating Type), the vector + is a $(I Floating Type).) + +$(H2 $(LNAME2 Arithmetic Type, Arithmetic Type)) + + $(P The following are $(I Arithmetic Type):) + + $(UL + $(LI $(DDSUBLINK type, Integral Type, $(I Integral Type))) + $(LI $(DDSUBLINK type, Floating Type, $(I Floating Type))) + ) + +$(H2 $(LNAME2 Scalar Type, Scalar Type)) + + $(P The following are $(I Scalar Type):) + + $(UL + $(LI $(DDSUBLINK type, Arithmetic Type, $(I Arithmetic Type))) + $(LI $(I Pointer)) + ) + $(H2 $(LEGACY_LNAME2 Pointer Conversions, pointer-conversions, Pointer Conversions)) $(P Casting pointers to non-pointers and vice versa is allowed.)