Lines Matching refs:assert

256             else assert(0);
305 static assert(is( MutableOf!int == int));
306 static assert(is( InoutOf!int == inout int));
307 static assert(is( ConstOf!int == const int));
308 static assert(is( SharedOf!int == shared int));
309 static assert(is(SharedInoutOf!int == shared inout int));
310 static assert(is(SharedConstOf!int == shared const int));
311 static assert(is( ImmutableOf!int == immutable int));
328 …alias Qual1 = QualifierOf!( int); static assert(is(Qual1!long == long));
329 …alias Qual2 = QualifierOf!( inout int); static assert(is(Qual2!long == inout long));
330 …alias Qual3 = QualifierOf!( const int); static assert(is(Qual3!long == const long));
331 …alias Qual4 = QualifierOf!(shared int); static assert(is(Qual4!long == shared long));
332 …alias Qual5 = QualifierOf!(shared inout int); static assert(is(Qual5!long == shared inout long));
333 …alias Qual6 = QualifierOf!(shared const int); static assert(is(Qual6!long == shared const long));
334 …alias Qual7 = QualifierOf!( immutable int); static assert(is(Qual7!long == immutable long));
368 static assert(false, T.stringof ~ " has no parent"); in packageName()
375 static assert(packageName!packageName == "std");
384 static assert(packageName!(std.traits) == "std"); // this module
385 static assert(packageName!packageName == "std"); // symbol in this module
386 static assert(packageName!(std.array) == "std"); // other module from same package
389 static assert(packageName!core == "core");
390 static assert(packageName!(core.sync) == "core.sync");
391 static assert(packageName!Barrier == "core.sync");
394 static assert(packageName!(X12287!int.i) == "std");
400 static assert(packageName!core == "core"); in version()
401 static assert(packageName!(core.sync) == "core.sync"); in version()
402 static assert(packageName!Barrier == "core.sync"); in version()
412 static assert(!T.stringof.startsWith("package "), "cannot get the module name for a package"); in moduleName()
431 static assert(moduleName!moduleName == "std.traits");
438 static assert(!__traits(compiles, moduleName!std));
439 static assert(moduleName!(std.traits) == "std.traits"); // this module
440 static assert(moduleName!moduleName == "std.traits"); // symbol in this module
441 static assert(moduleName!(std.array) == "std.array"); // other module
442 static assert(moduleName!(std.array.array) == "std.array"); // symbol in other module
445 static assert(!__traits(compiles, moduleName!(core.sync)));
446 static assert(moduleName!(core.sync.barrier) == "core.sync.barrier");
447 static assert(moduleName!Barrier == "core.sync.barrier");
450 static assert(moduleName!(X12287!int.i) == "std.traits");
456 static assert(!__traits(compiles, moduleName!(core.sync))); in version()
457 static assert(moduleName!(core.sync.barrier) == "core.sync.barrier"); in version()
458 static assert(moduleName!Barrier == "core.sync.barrier"); in version()
484 static assert(fullyQualifiedName!fullyQualifiedName == "std.traits.fullyQualifiedName");
576 static assert(fqnSym!fqn == fqn!fqn);
578 static assert(fqn!fqn == "std.traits.fullyQualifiedName");
582 static assert(fqn!(qnTests.Inner) == prefix ~ "Inner");
583 static assert(fqn!(qnTests.func) == prefix ~ "func");
584 static assert(fqn!(qnTests.Data!int) == prefix ~ "Data!(int)");
585 static assert(fqn!(qnTests.Data!int.x) == prefix ~ "Data!(int).x");
586 static assert(fqn!(qnTests.tfunc!(int[])) == prefix ~ "tfunc!(int[])");
587 static assert(fqn!(qnTests.Inst!(Object)) == prefix ~ "Inst!(object.Object)");
588 static assert(fqn!(qnTests.Inst!(Object).x) == prefix ~ "Inst!(object.Object).x");
590 static assert(fqn!(qnTests.Test12309!(int, 10, "str"))
594 static assert(fqn!Barrier == "core.sync.barrier.Barrier");
604 assert("TemplatedStruct.foo" == fullyQualifiedName!(TemplatedStructAlias!().foo));
651 …static assert(0, "New variadic style has been added, please update fullyQualifiedName implementati… in fqnType()
814 … static assert(0, "Unrecognized type " ~ T.stringof ~ ", can't convert to fully qualified string"); in fqnType()
824 static assert(fqn!Ambiguous == fqnType!(Ambiguous, false, false, false, false));
831 static assert(fqn!(string) == "string"); in with()
832 static assert(fqn!(wstring) == "wstring"); in with()
833 static assert(fqn!(dstring) == "dstring"); in with()
834 static assert(fqn!(void) == "void"); in with()
835 static assert(fqn!(const(void)) == "const(void)"); in with()
836 static assert(fqn!(shared(void)) == "shared(void)"); in with()
837 static assert(fqn!(shared const(void)) == "const(shared(void))"); in with()
838 static assert(fqn!(shared inout(void)) == "inout(shared(void))"); in with()
839 static assert(fqn!(shared inout const(void)) == "const(shared(void))"); in with()
840 static assert(fqn!(inout(void)) == "inout(void)"); in with()
841 static assert(fqn!(inout const(void)) == "const(void)"); in with()
842 static assert(fqn!(immutable(void)) == "immutable(void)"); in with()
845 static assert(fqn!(Inner) == inner_name); in with()
846 static assert(fqn!(QualifiedEnum) == "std.traits.QualifiedEnum"); // type in with()
847 static assert(fqn!(QualifiedEnum.a) == "std.traits.QualifiedEnum.a"); // symbol in with()
850 static assert(fqn!(typeof(array)) == format("%s[]", inner_name)); in with()
851 static assert(fqn!(typeof(sarray)) == format("%s[16]", inner_name)); in with()
852 static assert(fqn!(typeof(aarray)) == format("%s[%s]", inner_name, inner_name)); in with()
855 … static assert(fqn!(typeof(qualAarray)) == format("const(%s[const(%s)])", inner_name, inner_name)); in with()
858 static assert(fqn!(typeof(data)) == format("shared(const(%s[string])[])", inner_name)); in with()
861 … static assert(fqn!(typeof(func)) == format("const(%s[string])(ref %s, scope lazy string) ref", in with()
863 …static assert(fqn!(typeof(retfunc)) == format("const(%s[string])(return %s) ref", inner_name, inne… in with()
864 … static assert(fqn!(typeof(inoutFunc)) == format("inout(%s(inout(%s)))", inner_name, inner_name)); in with()
865 …static assert(fqn!(typeof(deleg)) == format("const(%s delegate(double, string) nothrow @safe)", in… in with()
866 static assert(fqn!(typeof(inoutDeleg)) == "inout(int) delegate(inout(int)) inout"); in with()
867 … static assert(fqn!(typeof(funcPtr)) == format("%s function(out double, string)", inner_name)); in with()
868 …static assert(fqn!(typeof(cFuncPtr)) == format("extern(C) %s function(double, string)", inner_name… in with()
871 static assert(fqn!(typeof(attrDeleg)) == format("shared(immutable(%s) "~ in with()
875 static assert(fqn!(typeof(cVarArg)) == "extern(C) void(int, ...)"); in with()
876 static assert(fqn!(typeof(dVarArg)) == "void(...)"); in with()
877 static assert(fqn!(typeof(dVarArg2)) == "void(int, ...)"); in with()
878 static assert(fqn!(typeof(typesafeVarArg)) == "void(int[] ...)"); in with()
883 static assert(fqn!(__vector(float[4])) == "__vector(float[4])"); in with()
902 static assert(0, "argument has no return type");
920 static assert(is(ShouldBeInt == int));
923 static assert(is(ReturnType!g == int));
927 static assert(is(pg == int));
934 static assert(is(ReturnType!C == int));
937 static assert(is(ReturnType!c == int));
944 static assert(is(R_Test_prop == int));
947 static assert(is(R_dglit == int));
961 static assert(0, "argument has no parameters");
980 static assert(is(ParameterTypeTuple!foo == AliasSeq!(int, bool)));
981 static assert(is(ParameterTypeTuple!(typeof(&foo)) == AliasSeq!(int, bool)));
985 static assert(is(ParameterTypeTuple!S == AliasSeq!(real, int)));
986 static assert(is(ParameterTypeTuple!(S*) == AliasSeq!(real, int)));
987 static assert(is(ParameterTypeTuple!s == AliasSeq!(real, int)));
994 static assert(P_Test_prop.length == 0);
997 static assert(P_dglit.length == 1);
998 static assert(is(P_dglit[0] == int));
1015 static assert(arity!foo == 0);
1017 static assert(arity!bar == 1);
1019 static assert(!__traits(compiles, arity!variadicFoo));
1066 static assert(0, func[0].stringof ~ " is not a function"); in ParameterStorageClassTuple()
1080 static assert(pstc.length == 3); // three parameters
1081 static assert(pstc[0] == STC.ref_);
1082 static assert(pstc[1] == STC.out_);
1083 static assert(pstc[2] == STC.none);
1126 static assert(ParameterStorageClassTuple!noparam.length == 0);
1130 static assert(test_pstc.length == 6);
1131 static assert(test_pstc[0] == STC.scope_);
1132 static assert(test_pstc[1] == STC.ref_);
1133 static assert(test_pstc[2] == STC.out_);
1134 static assert(test_pstc[3] == STC.lazy_);
1135 static assert(test_pstc[4] == STC.none);
1136 static assert(test_pstc[5] == STC.return_);
1146 static assert(test_const_pstc.length == 1);
1147 static assert(test_const_pstc[0] == STC.none);
1150 static assert(test_sharedconst_pstc.length == 1);
1151 static assert(test_sharedconst_pstc[0] == STC.none);
1154 static assert(dglit_pstc.length == 1);
1155 static assert(dglit_pstc[0] == STC.ref_);
1159 static assert(ParameterStorageClassTuple!(typeof(func))[0] == STC.none);
1197 static assert(0, func[0].stringof ~ "is not a function");
1219 static assert([ParameterIdentifierTuple!foo] == ["num", "name", ""]);
1227 static assert([PIT!bar] == ["num", "name", "array"]);
1231 static assert([PIT!fp] == ["", ""]);
1235 static assert([PIT!dg] == ["", "", ""]);
1243 static assert([PIT!(Test.getter)] == []);
1244 static assert([PIT!(Test.setter)] == ["a"]);
1245 static assert([PIT!(Test.method)] == ["a", "b", "c"]);
1250 static assert([PIT!baw] == ["_param_0", "_param_1", "_param_2"]);
1254 static assert([PIT!baz] == ["_param_0", "_param_1", "_param_2"]);
1301 static assert(0, func[0].stringof ~ "is not a function");
1323 static assert(is(ParameterDefaults!foo[0] == void));
1324 static assert( ParameterDefaults!foo[1] == "hello");
1325 static assert( ParameterDefaults!foo[2] == [1,2,3]);
1326 static assert( ParameterDefaults!foo[3] == 0);
1336 static assert(Voids.length == 12);
1337 foreach (V; Voids) static assert(is(V == void));
1350 static assert(PDVT!bar.length == 2);
1351 static assert(PDVT!bar[0] == 1);
1352 static assert(PDVT!bar[1] == "hello");
1353 static assert(is(typeof(PDVT!bar) == typeof(AliasSeq!(1, "hello"))));
1356 static assert(PDVT!baz.length == 3);
1357 static assert(is(PDVT!baz[0] == void));
1358 static assert( PDVT!baz[1] == 1);
1359 static assert( PDVT!baz[2] == "hello");
1360 static assert(is(typeof(PDVT!baz) == typeof(AliasSeq!(void, 1, "hello"))));
1364 static assert(PDVT!foo.length == 1);
1365 static assert(PDVT!foo[0] == 3);
1366 static assert(is(typeof(PDVT!foo) == typeof(AliasSeq!(3))));
1376 static assert(PDVT!bug8106[0] == Colour.white);
1378 static assert(PDVT!bug16582[0] is null);
1433 static assert(functionAttributes!func & FA.pure_);
1434 static assert(functionAttributes!func & FA.safe);
1435 static assert(!(functionAttributes!func & FA.trusted)); // not @trusted
1463 static assert(functionAttributes!(S.noF) == FA.system);
1464 static assert(functionAttributes!(typeof(S.noF)) == FA.system);
1466 static assert(functionAttributes!(S.constF) == (FA.const_ | FA.system));
1467 static assert(functionAttributes!(typeof(S.constF)) == (FA.const_ | FA.system));
1469 static assert(functionAttributes!(S.immutableF) == (FA.immutable_ | FA.system));
1470 static assert(functionAttributes!(typeof(S.immutableF)) == (FA.immutable_ | FA.system));
1472 static assert(functionAttributes!(S.inoutF) == (FA.inout_ | FA.system));
1473 static assert(functionAttributes!(typeof(S.inoutF)) == (FA.inout_ | FA.system));
1475 static assert(functionAttributes!(S.sharedF) == (FA.shared_ | FA.system));
1476 static assert(functionAttributes!(typeof(S.sharedF)) == (FA.shared_ | FA.system));
1478 static assert(functionAttributes!(S.refF) == (FA.ref_ | FA.system | FA.return_));
1479 static assert(functionAttributes!(typeof(S.refF)) == (FA.ref_ | FA.system | FA.return_));
1481 static assert(functionAttributes!(S.propertyF) == (FA.property | FA.system));
1482 static assert(functionAttributes!(typeof(&S.propertyF)) == (FA.property | FA.system));
1484 static assert(functionAttributes!(S.nothrowF) == (FA.nothrow_ | FA.system));
1485 static assert(functionAttributes!(typeof(S.nothrowF)) == (FA.nothrow_ | FA.system));
1487 static assert(functionAttributes!(S.nogcF) == (FA.nogc | FA.system));
1488 static assert(functionAttributes!(typeof(S.nogcF)) == (FA.nogc | FA.system));
1490 static assert(functionAttributes!(S.systemF) == FA.system);
1491 static assert(functionAttributes!(typeof(S.systemF)) == FA.system);
1493 static assert(functionAttributes!(S.trustedF) == FA.trusted);
1494 static assert(functionAttributes!(typeof(S.trustedF)) == FA.trusted);
1496 static assert(functionAttributes!(S.safeF) == FA.safe);
1497 static assert(functionAttributes!(typeof(S.safeF)) == FA.safe);
1499 static assert(functionAttributes!(S.pureF) == (FA.pure_ | FA.system));
1500 static assert(functionAttributes!(typeof(S.pureF)) == (FA.pure_ | FA.system));
1507 static assert(functionAttributes!(pure_nothrow) == (FA.pure_ | FA.nothrow_ | FA.system));
1508 … static assert(functionAttributes!(typeof(pure_nothrow)) == (FA.pure_ | FA.nothrow_ | FA.system));
1510 static assert(functionAttributes!(safe_nothrow) == (FA.safe | FA.nothrow_));
1511 static assert(functionAttributes!(typeof(safe_nothrow)) == (FA.safe | FA.nothrow_));
1513 static assert(functionAttributes!(static_ref_property) == (FA.property | FA.ref_ | FA.system));
1514 …static assert(functionAttributes!(typeof(&static_ref_property)) == (FA.property | FA.ref_ | FA.sys…
1516 static assert(functionAttributes!(ref_property) == (FA.property | FA.ref_ | FA.system));
1517 … static assert(functionAttributes!(typeof(&ref_property)) == (FA.property | FA.ref_ | FA.system));
1525 static assert(functionAttributes!(S2.pure_const) == (FA.const_ | FA.pure_ | FA.system));
1526 static assert(functionAttributes!(typeof(S2.pure_const)) == (FA.const_ | FA.pure_ | FA.system));
1528 …static assert(functionAttributes!(S2.pure_sharedconst) == (FA.const_ | FA.shared_ | FA.pure_ | FA.…
1529 …static assert(functionAttributes!(typeof(S2.pure_sharedconst)) == (FA.const_ | FA.shared_ | FA.pur…
1531 static assert(functionAttributes!((int a) { }) == (FA.pure_ | FA.nothrow_ | FA.nogc | FA.safe));
1532 …static assert(functionAttributes!(typeof((int a) { })) == (FA.pure_ | FA.nothrow_ | FA.nogc | FA.s…
1535 static assert(functionAttributes!(safeDel) == (FA.pure_ | FA.nothrow_ | FA.nogc | FA.safe));
1536 …static assert(functionAttributes!(typeof(safeDel)) == (FA.pure_ | FA.nothrow_ | FA.nogc | FA.safe)…
1539 … static assert(functionAttributes!(trustedDel) == (FA.pure_ | FA.nothrow_ | FA.nogc | FA.trusted));
1540 …static assert(functionAttributes!(typeof(trustedDel)) == (FA.pure_ | FA.nothrow_ | FA.nogc | FA.tr…
1543 static assert(functionAttributes!(systemDel) == (FA.pure_ | FA.nothrow_ | FA.nogc | FA.system));
1544 …static assert(functionAttributes!(typeof(systemDel)) == (FA.pure_ | FA.nothrow_ | FA.nogc | FA.sys…
1569 default: assert(0, attrib);
1610 static assert(hasFunctionAttributes!(func, "@safe", "pure"));
1611 static assert(!hasFunctionAttributes!(func, "@trusted"));
1618 static assert(hasFunctionAttributes!(myFunc!bool, "@safe", "pure", "@nogc", "nothrow"));
1619 static assert(!hasFunctionAttributes!(myFunc!bool, "shared"));
1645 static assert(hasFunctionAttributes!(S.noF));
1647 static assert(hasFunctionAttributes!(S.noF, "@system"));
1648 static assert(hasFunctionAttributes!(typeof(S.noF), "@system"));
1649 static assert(!hasFunctionAttributes!(S.noF, "@system", "pure"));
1651 static assert(hasFunctionAttributes!(S.constF, "const", "@system"));
1652 static assert(hasFunctionAttributes!(typeof(S.constF), "const", "@system"));
1653 static assert(!hasFunctionAttributes!(S.constF, "const", "@system", "@nogc"));
1655 static assert(hasFunctionAttributes!(S.immutableF, "immutable", "@system"));
1656 static assert(hasFunctionAttributes!(typeof(S.immutableF), "immutable", "@system"));
1657 static assert(!hasFunctionAttributes!(S.immutableF, "immutable", "@system", "pure"));
1659 static assert(hasFunctionAttributes!(S.inoutF, "inout", "@system"));
1660 static assert(hasFunctionAttributes!(typeof(S.inoutF), "inout", "@system"));
1661 static assert(!hasFunctionAttributes!(S.inoutF, "inout", "@system", "pure"));
1663 static assert(hasFunctionAttributes!(S.sharedF, "shared", "@system"));
1664 static assert(hasFunctionAttributes!(typeof(S.sharedF), "shared", "@system"));
1665 static assert(!hasFunctionAttributes!(S.sharedF, "shared", "@system", "@trusted"));
1667 static assert(hasFunctionAttributes!(S.refF, "ref", "@system", "return"));
1668 static assert(hasFunctionAttributes!(typeof(S.refF), "ref", "@system", "return"));
1669 static assert(!hasFunctionAttributes!(S.refF, "ref", "@system", "return", "pure"));
1671 static assert(hasFunctionAttributes!(S.propertyF, "@property", "@system"));
1672 static assert(hasFunctionAttributes!(typeof(&S.propertyF), "@property", "@system"));
1673 static assert(!hasFunctionAttributes!(S.propertyF, "@property", "@system", "ref"));
1675 static assert(hasFunctionAttributes!(S.nothrowF, "nothrow", "@system"));
1676 static assert(hasFunctionAttributes!(typeof(S.nothrowF), "nothrow", "@system"));
1677 static assert(!hasFunctionAttributes!(S.nothrowF, "nothrow", "@system", "@trusted"));
1679 static assert(hasFunctionAttributes!(S.nogcF, "@nogc", "@system"));
1680 static assert(hasFunctionAttributes!(typeof(S.nogcF), "@nogc", "@system"));
1681 static assert(!hasFunctionAttributes!(S.nogcF, "@nogc", "@system", "ref"));
1683 static assert(hasFunctionAttributes!(S.systemF, "@system"));
1684 static assert(hasFunctionAttributes!(typeof(S.systemF), "@system"));
1685 static assert(!hasFunctionAttributes!(S.systemF, "@system", "ref"));
1687 static assert(hasFunctionAttributes!(S.trustedF, "@trusted"));
1688 static assert(hasFunctionAttributes!(typeof(S.trustedF), "@trusted"));
1689 static assert(!hasFunctionAttributes!(S.trustedF, "@trusted", "@safe"));
1691 static assert(hasFunctionAttributes!(S.safeF, "@safe"));
1692 static assert(hasFunctionAttributes!(typeof(S.safeF), "@safe"));
1693 static assert(!hasFunctionAttributes!(S.safeF, "@safe", "nothrow"));
1695 static assert(hasFunctionAttributes!(S.pureF, "pure", "@system"));
1696 static assert(hasFunctionAttributes!(typeof(S.pureF), "pure", "@system"));
1697 static assert(!hasFunctionAttributes!(S.pureF, "pure", "@system", "ref"));
1704 static assert(hasFunctionAttributes!(pure_nothrow, "pure", "nothrow", "@safe"));
1705 static assert(hasFunctionAttributes!(typeof(pure_nothrow), "pure", "nothrow", "@safe"));
1706 static assert(!hasFunctionAttributes!(pure_nothrow, "pure", "nothrow", "@safe", "@trusted"));
1708 static assert(hasFunctionAttributes!(safe_nothrow, "@safe", "nothrow"));
1709 static assert(hasFunctionAttributes!(typeof(safe_nothrow), "@safe", "nothrow"));
1710 static assert(hasFunctionAttributes!(safe_nothrow, "@safe", "nothrow", "pure"));
1711 static assert(!hasFunctionAttributes!(safe_nothrow, "@safe", "nothrow", "pure", "@trusted"));
1713 static assert(hasFunctionAttributes!(static_ref_property, "@property", "ref", "@safe"));
1714 … static assert(hasFunctionAttributes!(typeof(&static_ref_property), "@property", "ref", "@safe"));
1715 …static assert(hasFunctionAttributes!(static_ref_property, "@property", "ref", "@safe", "nothrow"));
1716 …static assert(!hasFunctionAttributes!(static_ref_property, "@property", "ref", "@safe", "nothrow",…
1718 static assert(hasFunctionAttributes!(ref_property, "@property", "ref", "@safe"));
1719 static assert(hasFunctionAttributes!(typeof(&ref_property), "@property", "ref", "@safe"));
1720 static assert(!hasFunctionAttributes!(ref_property, "@property", "ref", "@safe", "@nogc"));
1728 static assert(hasFunctionAttributes!(S2.pure_const, "const", "pure", "@system"));
1729 static assert(hasFunctionAttributes!(typeof(S2.pure_const), "const", "pure", "@system"));
1730 static assert(!hasFunctionAttributes!(S2.pure_const, "const", "pure", "@system", "ref"));
1732 … static assert(hasFunctionAttributes!(S2.pure_sharedconst, "const", "shared", "pure", "@system"));
1733 …static assert(hasFunctionAttributes!(typeof(S2.pure_sharedconst), "const", "shared", "pure", "@sys…
1734 …static assert(!hasFunctionAttributes!(S2.pure_sharedconst, "const", "shared", "pure", "@system", "…
1736 static assert(hasFunctionAttributes!((int a) { }, "pure", "nothrow", "@nogc", "@safe"));
1737 static assert(hasFunctionAttributes!(typeof((int a) { }), "pure", "nothrow", "@nogc", "@safe"));
1738 static assert(!hasFunctionAttributes!((int a) { }, "pure", "nothrow", "@nogc", "@safe", "ref"));
1741 static assert(hasFunctionAttributes!(safeDel, "pure", "nothrow", "@nogc", "@safe"));
1742 static assert(hasFunctionAttributes!(typeof(safeDel), "pure", "nothrow", "@nogc", "@safe"));
1743 static assert(!hasFunctionAttributes!(safeDel, "pure", "nothrow", "@nogc", "@safe", "@system"));
1746 static assert(hasFunctionAttributes!(trustedDel, "pure", "nothrow", "@nogc", "@trusted"));
1747 … static assert(hasFunctionAttributes!(typeof(trustedDel), "pure", "nothrow", "@nogc", "@trusted"));
1748 … static assert(!hasFunctionAttributes!(trustedDel, "pure", "nothrow", "@nogc", "@trusted", "ref"));
1751 static assert(hasFunctionAttributes!(systemDel, "pure", "nothrow", "@nogc", "@system"));
1752 static assert(hasFunctionAttributes!(typeof(systemDel), "pure", "nothrow", "@nogc", "@system"));
1753 …static assert(!hasFunctionAttributes!(systemDel, "pure", "nothrow", "@nogc", "@system", "@property…
1758 assert(pure_nothrow == 0);
1760 assert(static_ref_property == 0);
1761 assert(ref_property == 0);
1762 assert(S2().pure_const == 0);
1763 assert((shared S2()).pure_sharedconst == 0);
1787 static assert( isSafe!add);
1788 static assert( isSafe!sub);
1789 static assert(!isSafe!mul);
1802 static assert( isSafe!(Set.safeF));
1803 static assert( isSafe!(Set.trustedF));
1804 static assert(!isSafe!(Set.systemF));
1811 static assert( isSafe!safeFunc);
1812 static assert( isSafe!trustedFunc);
1813 static assert(!isSafe!systemFunc);
1820 static assert( isSafe!safeDel);
1821 static assert( isSafe!trustedDel);
1822 static assert(!isSafe!systemDel);
1825 static assert( isSafe!({safeDel();}));
1826 static assert( isSafe!({trustedDel();}));
1827 static assert(!isSafe!({systemDel();}));
1834 static assert( isSafe!(SafeStatic()));
1835 static assert( isSafe!(TrustedStatic()));
1836 static assert(!isSafe!(SystemStatic()));
1843 static assert( isSafe!(Safe.init()));
1844 static assert( isSafe!(Trusted.init()));
1845 static assert(!isSafe!(System.init()));
1864 static assert(!isUnsafe!add);
1865 static assert(!isUnsafe!sub);
1866 static assert( isUnsafe!mul);
1878 static assert(!isUnsafe!(Set.safeF));
1879 static assert(!isUnsafe!(Set.trustedF));
1880 static assert( isUnsafe!(Set.systemF));
1887 static assert(!isUnsafe!safeFunc);
1888 static assert(!isUnsafe!trustedFunc);
1889 static assert( isUnsafe!systemFunc);
1896 static assert(!isUnsafe!safeDel);
1897 static assert(!isUnsafe!trustedDel);
1898 static assert( isUnsafe!systemDel);
1901 static assert(!isUnsafe!({safeDel();}));
1902 static assert(!isUnsafe!({trustedDel();}));
1903 static assert( isUnsafe!({systemDel();}));
1910 static assert(!isUnsafe!(SafeStatic()));
1911 static assert(!isUnsafe!(TrustedStatic()));
1912 static assert( isUnsafe!(SystemStatic()));
1919 static assert(!isUnsafe!(Safe.init()));
1920 static assert(!isUnsafe!(Trusted.init()));
1921 static assert( isUnsafe!(System.init()));
1943 static assert(functionLinkage!Dfunc == "D");
1944 static assert(functionLinkage!Cfunc == "C");
1947 assert(a == "D");
1951 assert(b == "C");
1961 static assert(functionLinkage!(Test.const_func) == "D");
1962 static assert(functionLinkage!(Test.sharedconst_func) == "D");
1964 static assert(functionLinkage!((int a){}) == "D");
2001 static assert(variadicFunctionStyle!func == Variadic.no);
2004 static assert(variadicFunctionStyle!printf == Variadic.c);
2016 static assert(variadicFunctionStyle!novar == Variadic.no);
2017 static assert(variadicFunctionStyle!cstyle == Variadic.c);
2018 static assert(variadicFunctionStyle!dstyle == Variadic.d);
2019 static assert(variadicFunctionStyle!typesafe == Variadic.typesafe);
2021 static assert(variadicFunctionStyle!((int[] a...) {}) == Variadic.typesafe);
2060 static assert(0);
2063 static assert(0);
2073 static assert(is( typeof(C.value) == int ));
2074 static assert(is( FunctionTypeOf!(C.value) == function ));
2084 static assert(is( typeof(test) == FunctionTypeOf!(typeof(test)) ));
2085 static assert(is( typeof(test) == FunctionTypeOf!test ));
2086 static assert(is( typeof(test) == FunctionTypeOf!test_fp ));
2087 static assert(is( typeof(test) == FunctionTypeOf!test_dg ));
2090 static assert(is( FunctionTypeOf!propGet == GetterType ));
2091 static assert(is( FunctionTypeOf!propSet == SetterType ));
2095 static assert(is( FunctionTypeOf!(Prop.prop) == GetterType ));
2096 static assert(is( FunctionTypeOf!(prop.prop) == GetterType ));
2100 static assert(is( FunctionTypeOf!call == typeof(test) ));
2105 static assert(is( FunctionTypeOf!stcall_val == typeof(test) ));
2106 static assert(is( FunctionTypeOf!stcall_ptr == typeof(test) ));
2120 static assert(is(F_ov0* == void function(string)));
2121 static assert(is(F_ov1* == real function(real)));
2122 static assert(is(F_ov2* == int function(int)));
2123 static assert(is(F_ov3* == int function() @property));
2126 static assert(is(F_dglit* : int function(int)));
2147 static assert(!(attrs & FunctionAttribute.trusted) ||
2152 static assert(canFind(linkages, linkage), "Invalid linkage '" ~
2260 static assert(is(SetFunctionAttributes!(T, linkage, attrs) == T),
2269 static assert(functionLinkage!New == newLinkage,
2277 static assert(functionAttributes!T1 == FA.safe);
2285 static assert(functionAttributes!T2 == allAttrs);
2289 static assert(is(T3 == T));
2330 static assert(!isInnerClass!C);
2340 static assert(isInnerClass!(Outer1.Inner1));
2341 static assert(!isInnerClass!(Outer1.Inner2));
2350 static assert(!isInnerClass!(Outer2.Inner));
2367 static assert(!isNested!S);
2371 static assert(isNested!NestedStruct);
2403 static assert(!hasNested!(S[2]));
2404 static assert(hasNested!(NS[2]));
2409 static assert(!__traits(compiles, isNested!int));
2410 static assert(!hasNested!int);
2413 static assert(!isNested!StaticStruct);
2414 static assert(!hasNested!StaticStruct);
2418 static assert( isNested!NestedStruct);
2419 static assert( hasNested!NestedStruct);
2420 static assert( isNested!(immutable NestedStruct));
2421 static assert( hasNested!(immutable NestedStruct));
2423 static assert(!__traits(compiles, isNested!(NestedStruct[1])));
2424 static assert( hasNested!(NestedStruct[1]));
2425 static assert(!hasNested!(NestedStruct[0]));
2428 static assert(!isNested!S1);
2429 static assert( hasNested!S1);
2432 static assert(!isNested!S2);
2433 static assert( hasNested!S2);
2436 static assert(!isNested!S3);
2437 static assert(!hasNested!S3);
2440 static assert(!isNested!U);
2441 static assert( hasNested!U);
2444 static assert(!isNested!StaticClass);
2445 static assert(!hasNested!StaticClass);
2448 static assert( isNested!NestedClass);
2449 static assert( hasNested!NestedClass);
2450 static assert( isNested!(immutable NestedClass));
2451 static assert( hasNested!(immutable NestedClass));
2453 static assert(!__traits(compiles, isNested!(NestedClass[1])));
2454 static assert( hasNested!(NestedClass[1]));
2455 static assert(!hasNested!(NestedClass[0]));
2461 static assert(!hasNested!A);
2487 static assert(is(Fields!S == AliasSeq!(int, float)));
2497 static assert(is(FieldTypeTuple!int == AliasSeq!int));
2500 static assert(is(FieldTypeTuple!StaticStruct1 == AliasSeq!()));
2503 static assert(is(FieldTypeTuple!StaticStruct2 == AliasSeq!(int, int)));
2508 static assert(is(FieldTypeTuple!NestedStruct1 == AliasSeq!()));
2511 static assert(is(FieldTypeTuple!NestedStruct2 == AliasSeq!int));
2514 static assert(is(FieldTypeTuple!NestedClass == AliasSeq!int));
2543 static assert(FieldNameTuple!S == AliasSeq!("x", "y"));
2544 static assert(FieldNameTuple!int == AliasSeq!"");
2549 static assert(FieldNameTuple!int == AliasSeq!"");
2552 static assert(is(FieldNameTuple!StaticStruct1 == AliasSeq!()));
2555 static assert(FieldNameTuple!StaticStruct2 == AliasSeq!("a", "b"));
2560 static assert(is(FieldNameTuple!NestedStruct1 == AliasSeq!()));
2563 static assert(FieldNameTuple!NestedStruct2 == AliasSeq!"a");
2566 static assert(FieldNameTuple!NestedClass == AliasSeq!"a");
2620 assert(R.length == 4
2628 static assert(is(S1 == AliasSeq!int));
2633 static assert(is(RepresentationTypeTuple!S2 == AliasSeq!int));
2634 static assert(is(RepresentationTypeTuple!S3 == AliasSeq!(int, char)));
2635 static assert(is(RepresentationTypeTuple!S4 == AliasSeq!(int, int, int, char)));
2640 assert(R.length == 4
2646 static assert(R1.length == 2 && is(R1[0] == int) && is(R1[1] == float));
2653 static assert(R2.length == 2 && is(R2[0] == int) && is(R2[1] == immutable(Object)));
2692 static assert(!hasRawAliasing!int);
2693 static assert( hasRawAliasing!(char*));
2695 static assert(!hasRawAliasing!Object);
2697 static assert( hasRawAliasing!(int[]));
2700 static assert(!hasRawAliasing!S1);
2703 static assert(!hasRawAliasing!S2);
2710 static assert( hasRawAliasing!S3);
2713 static assert( hasRawAliasing!S4);
2715 static assert( hasRawAliasing!S3);
2716 static assert( hasRawAliasing!S4);
2717 static assert(!hasRawAliasing!S5);
2721 static assert(!hasRawAliasing!S6);
2722 static assert( hasRawAliasing!S7);
2724 static assert(!hasRawAliasing!(void delegate()));
2725 static assert(!hasRawAliasing!(void delegate() const));
2726 static assert(!hasRawAliasing!(void delegate() immutable));
2727 static assert(!hasRawAliasing!(void delegate() shared));
2728 static assert(!hasRawAliasing!(void delegate() shared const));
2729 static assert(!hasRawAliasing!(const(void delegate())));
2730 static assert(!hasRawAliasing!(immutable(void delegate())));
2735 static assert(!hasRawAliasing!S8);
2736 static assert(!hasRawAliasing!S12);
2737 static assert( hasRawAliasing!S13);
2740 static assert(!hasRawAliasing!S9);
2745 static assert( hasRawAliasing!S10);
2746 static assert(!hasRawAliasing!S11);
2748 static assert( hasRawAliasing!(int[string]));
2749 static assert(!hasRawAliasing!(immutable(int[string])));
2788 static assert(!hasRawUnsharedAliasing!int);
2789 static assert( hasRawUnsharedAliasing!(char*));
2790 static assert(!hasRawUnsharedAliasing!(shared char*));
2792 static assert(!hasRawUnsharedAliasing!Object);
2794 static assert( hasRawUnsharedAliasing!(int[]));
2795 static assert(!hasRawUnsharedAliasing!(shared int[]));
2798 static assert(!hasRawUnsharedAliasing!S1);
2801 static assert(!hasRawUnsharedAliasing!S2);
2804 static assert( hasRawUnsharedAliasing!S3);
2806 static assert(!hasRawUnsharedAliasing!S4);
2813 static assert( hasRawUnsharedAliasing!S3);
2815 static assert(!hasRawUnsharedAliasing!S4);
2818 static assert( hasRawUnsharedAliasing!S5);
2820 static assert(!hasRawUnsharedAliasing!S6);
2822 static assert( hasRawUnsharedAliasing!S5);
2823 static assert(!hasRawUnsharedAliasing!S6);
2824 static assert(!hasRawUnsharedAliasing!S7);
2829 static assert(!hasRawUnsharedAliasing!S8);
2830 static assert( hasRawUnsharedAliasing!S9);
2831 static assert(!hasRawUnsharedAliasing!S10);
2833 static assert(!hasRawUnsharedAliasing!(void delegate()));
2834 static assert(!hasRawUnsharedAliasing!(void delegate() const));
2835 static assert(!hasRawUnsharedAliasing!(void delegate() immutable));
2836 static assert(!hasRawUnsharedAliasing!(void delegate() shared));
2837 static assert(!hasRawUnsharedAliasing!(void delegate() shared const));
2838 static assert(!hasRawUnsharedAliasing!(const(void delegate())));
2839 static assert(!hasRawUnsharedAliasing!(const(void delegate() const)));
2840 static assert(!hasRawUnsharedAliasing!(const(void delegate() immutable)));
2841 static assert(!hasRawUnsharedAliasing!(const(void delegate() shared)));
2842 static assert(!hasRawUnsharedAliasing!(const(void delegate() shared const)));
2843 static assert(!hasRawUnsharedAliasing!(immutable(void delegate())));
2844 static assert(!hasRawUnsharedAliasing!(immutable(void delegate() const)));
2845 static assert(!hasRawUnsharedAliasing!(immutable(void delegate() immutable)));
2846 static assert(!hasRawUnsharedAliasing!(immutable(void delegate() shared)));
2847 static assert(!hasRawUnsharedAliasing!(immutable(void delegate() shared const)));
2848 static assert(!hasRawUnsharedAliasing!(shared(void delegate())));
2849 static assert(!hasRawUnsharedAliasing!(shared(void delegate() const)));
2850 static assert(!hasRawUnsharedAliasing!(shared(void delegate() immutable)));
2851 static assert(!hasRawUnsharedAliasing!(shared(void delegate() shared)));
2852 static assert(!hasRawUnsharedAliasing!(shared(void delegate() shared const)));
2853 static assert(!hasRawUnsharedAliasing!(shared(const(void delegate()))));
2854 static assert(!hasRawUnsharedAliasing!(shared(const(void delegate() const))));
2855 static assert(!hasRawUnsharedAliasing!(shared(const(void delegate() immutable))));
2856 static assert(!hasRawUnsharedAliasing!(shared(const(void delegate() shared))));
2857 static assert(!hasRawUnsharedAliasing!(shared(const(void delegate() shared const))));
2858 static assert(!hasRawUnsharedAliasing!(void function()));
2861 static assert(!hasRawUnsharedAliasing!S13);
2867 static assert( hasRawUnsharedAliasing!S14);
2868 static assert(!hasRawUnsharedAliasing!S15);
2869 static assert(!hasRawUnsharedAliasing!S16);
2871 static assert( hasRawUnsharedAliasing!(int[string]));
2872 static assert(!hasRawUnsharedAliasing!(shared(int[string])));
2873 static assert(!hasRawUnsharedAliasing!(immutable(int[string])));
2900 static assert(!hasRawUnsharedAliasing!S17);
2901 static assert(!hasRawUnsharedAliasing!(immutable(S17)));
2902 static assert(!hasRawUnsharedAliasing!(shared(S17)));
2903 static assert(!hasRawUnsharedAliasing!S18);
2904 static assert(!hasRawUnsharedAliasing!(immutable(S18)));
2905 static assert(!hasRawUnsharedAliasing!(shared(S18)));
2906 static assert(!hasRawUnsharedAliasing!S19);
2907 static assert(!hasRawUnsharedAliasing!(immutable(S19)));
2908 static assert(!hasRawUnsharedAliasing!(shared(S19)));
2909 static assert( hasRawUnsharedAliasing!S20);
2910 static assert(!hasRawUnsharedAliasing!(immutable(S20)));
2911 static assert(!hasRawUnsharedAliasing!(shared(S20)));
2912 static assert(!hasRawUnsharedAliasing!S21);
2913 static assert(!hasRawUnsharedAliasing!(immutable(S21)));
2914 static assert(!hasRawUnsharedAliasing!(shared(S21)));
2915 static assert(!hasRawUnsharedAliasing!S22);
2916 static assert(!hasRawUnsharedAliasing!(immutable(S22)));
2917 static assert(!hasRawUnsharedAliasing!(shared(S22)));
2918 static assert(!hasRawUnsharedAliasing!S23);
2919 static assert(!hasRawUnsharedAliasing!(immutable(S23)));
2920 static assert(!hasRawUnsharedAliasing!(shared(S23)));
2921 static assert( hasRawUnsharedAliasing!S24);
2922 static assert(!hasRawUnsharedAliasing!(immutable(S24)));
2923 static assert(!hasRawUnsharedAliasing!(shared(S24)));
2928 static assert(!hasRawUnsharedAliasing!S25);
2929 static assert(!hasRawUnsharedAliasing!S26);
2930 static assert(!hasRawUnsharedAliasing!S27);
2931 static assert(!hasRawUnsharedAliasing!S28);
3018 static assert( hasAliasing!S1);
3019 static assert(!hasAliasing!S2);
3020 static assert(!hasAliasing!S3);
3021 static assert(!hasAliasing!S4);
3026 static assert( hasAliasing!(uint[uint]));
3027 static assert(!hasAliasing!(immutable(uint[uint])));
3028 static assert( hasAliasing!(void delegate()));
3029 static assert( hasAliasing!(void delegate() const));
3030 static assert(!hasAliasing!(void delegate() immutable));
3031 static assert( hasAliasing!(void delegate() shared));
3032 static assert( hasAliasing!(void delegate() shared const));
3033 static assert( hasAliasing!(const(void delegate())));
3034 static assert( hasAliasing!(const(void delegate() const)));
3035 static assert(!hasAliasing!(const(void delegate() immutable)));
3036 static assert( hasAliasing!(const(void delegate() shared)));
3037 static assert( hasAliasing!(const(void delegate() shared const)));
3038 static assert(!hasAliasing!(immutable(void delegate())));
3039 static assert(!hasAliasing!(immutable(void delegate() const)));
3040 static assert(!hasAliasing!(immutable(void delegate() immutable)));
3041 static assert(!hasAliasing!(immutable(void delegate() shared)));
3042 static assert(!hasAliasing!(immutable(void delegate() shared const)));
3043 static assert( hasAliasing!(shared(const(void delegate()))));
3044 static assert( hasAliasing!(shared(const(void delegate() const))));
3045 static assert(!hasAliasing!(shared(const(void delegate() immutable))));
3046 static assert( hasAliasing!(shared(const(void delegate() shared))));
3047 static assert( hasAliasing!(shared(const(void delegate() shared const))));
3048 static assert(!hasAliasing!(void function()));
3051 static assert( hasAliasing!I);
3054 static assert( hasAliasing!(Rebindable!(const Object)));
3055 static assert(!hasAliasing!(Rebindable!(immutable Object)));
3056 static assert( hasAliasing!(Rebindable!(shared Object)));
3057 static assert( hasAliasing!(Rebindable!Object));
3067 static assert(!hasAliasing!S5);
3068 static assert( hasAliasing!S6);
3074 static assert( hasAliasing!S7);
3075 static assert( hasAliasing!S8);
3076 static assert( hasAliasing!S9);
3077 static assert( hasAliasing!S10);
3082 static assert(!hasAliasing!S11);
3083 static assert( hasAliasing!S12);
3084 static assert( hasAliasing!S13);
3085 static assert(!hasAliasing!S14);
3110 static assert( hasIndirections!(int[string]));
3111 static assert( hasIndirections!(void delegate()));
3112 static assert( hasIndirections!(void delegate() immutable));
3113 static assert( hasIndirections!(immutable(void delegate())));
3114 static assert( hasIndirections!(immutable(void delegate() immutable)));
3116 static assert(!hasIndirections!(void function()));
3117 static assert( hasIndirections!(void*[1]));
3118 static assert(!hasIndirections!(byte[1]));
3124 static assert( hasIndirections!(void[1]));
3152 static assert( hasIndirections!I);
3153 static assert(!hasIndirections!S1);
3154 static assert(!hasIndirections!S2);
3155 static assert(!hasIndirections!S3);
3156 static assert( hasIndirections!S4);
3157 static assert( hasIndirections!S5);
3158 static assert( hasIndirections!S6);
3159 static assert( hasIndirections!S7);
3160 static assert( hasIndirections!S8);
3161 static assert( hasIndirections!S9);
3162 static assert( hasIndirections!S10);
3163 static assert( hasIndirections!S12);
3164 static assert( hasIndirections!S13);
3165 static assert( hasIndirections!S14);
3166 static assert( hasIndirections!S15);
3167 static assert( hasIndirections!S16);
3168 static assert( hasIndirections!S17);
3169 static assert( hasIndirections!S18);
3170 static assert( hasIndirections!S19);
3171 static assert(!hasIndirections!S20);
3172 static assert(!hasIndirections!S21);
3173 static assert(!hasIndirections!S22);
3174 static assert( hasIndirections!S23);
3175 static assert( hasIndirections!S24);
3176 static assert( hasIndirections!S25);
3177 static assert( hasIndirections!S26);
3184 static assert(hasIndirections!T);
3243 static assert( hasUnsharedAliasing!S1);
3244 static assert(!hasUnsharedAliasing!S2);
3245 static assert(!hasUnsharedAliasing!S3);
3251 static assert(!hasUnsharedAliasing!S4);
3252 static assert( hasUnsharedAliasing!S5);
3253 static assert(!hasUnsharedAliasing!S6);
3254 static assert(!hasUnsharedAliasing!S7);
3262 static assert(!hasUnsharedAliasing!S8);
3264 static assert( hasUnsharedAliasing!(uint[uint]));
3266 static assert( hasUnsharedAliasing!(void delegate()));
3267 static assert( hasUnsharedAliasing!(void delegate() const));
3268 static assert(!hasUnsharedAliasing!(void delegate() immutable));
3269 static assert(!hasUnsharedAliasing!(void delegate() shared));
3270 static assert(!hasUnsharedAliasing!(void delegate() shared const));
3276 static assert( hasUnsharedAliasing!(const(void delegate())));
3277 static assert( hasUnsharedAliasing!(const(void delegate() const)));
3278 static assert(!hasUnsharedAliasing!(const(void delegate() immutable)));
3279 static assert(!hasUnsharedAliasing!(const(void delegate() shared)));
3280 static assert(!hasUnsharedAliasing!(const(void delegate() shared const)));
3281 static assert(!hasUnsharedAliasing!(immutable(void delegate())));
3282 static assert(!hasUnsharedAliasing!(immutable(void delegate() const)));
3283 static assert(!hasUnsharedAliasing!(immutable(void delegate() immutable)));
3284 static assert(!hasUnsharedAliasing!(immutable(void delegate() shared)));
3285 static assert(!hasUnsharedAliasing!(immutable(void delegate() shared const)));
3286 static assert(!hasUnsharedAliasing!(shared(void delegate())));
3287 static assert(!hasUnsharedAliasing!(shared(void delegate() const)));
3288 static assert(!hasUnsharedAliasing!(shared(void delegate() immutable)));
3289 static assert(!hasUnsharedAliasing!(shared(void delegate() shared)));
3290 static assert(!hasUnsharedAliasing!(shared(void delegate() shared const)));
3291 static assert(!hasUnsharedAliasing!(shared(const(void delegate()))));
3292 static assert(!hasUnsharedAliasing!(shared(const(void delegate() const))));
3293 static assert(!hasUnsharedAliasing!(shared(const(void delegate() immutable))));
3294 static assert(!hasUnsharedAliasing!(shared(const(void delegate() shared))));
3295 static assert(!hasUnsharedAliasing!(shared(const(void delegate() shared const))));
3296 static assert(!hasUnsharedAliasing!(void function()));
3299 static assert(hasUnsharedAliasing!I);
3301 static assert( hasUnsharedAliasing!(Rebindable!(const Object)));
3302 static assert(!hasUnsharedAliasing!(Rebindable!(immutable Object)));
3303 static assert(!hasUnsharedAliasing!(Rebindable!(shared Object)));
3304 static assert( hasUnsharedAliasing!(Rebindable!Object));
3307 static assert(!hasUnsharedAliasing!(int, shared(int)*));
3308 static assert( hasUnsharedAliasing!(int, int*));
3309 static assert( hasUnsharedAliasing!(int, const(int)[]));
3310 static assert( hasUnsharedAliasing!(int, shared(int)*, Rebindable!Object));
3311 static assert(!hasUnsharedAliasing!(shared(int)*, Rebindable!(shared Object)));
3312 static assert(!hasUnsharedAliasing!());
3339 static assert(!hasUnsharedAliasing!S9);
3340 static assert(!hasUnsharedAliasing!(immutable(S9)));
3341 static assert(!hasUnsharedAliasing!(shared(S9)));
3342 static assert( hasUnsharedAliasing!S10);
3343 static assert(!hasUnsharedAliasing!(immutable(S10)));
3344 static assert(!hasUnsharedAliasing!(shared(S10)));
3345 static assert( hasUnsharedAliasing!S11);
3346 static assert(!hasUnsharedAliasing!(immutable(S11)));
3347 static assert(!hasUnsharedAliasing!(shared(S11)));
3348 static assert( hasUnsharedAliasing!S12);
3349 static assert(!hasUnsharedAliasing!(immutable(S12)));
3350 static assert(!hasUnsharedAliasing!(shared(S12)));
3351 static assert( hasUnsharedAliasing!S13);
3352 static assert(!hasUnsharedAliasing!(immutable(S13)));
3353 static assert(!hasUnsharedAliasing!(shared(S13)));
3354 static assert( hasUnsharedAliasing!S14);
3355 static assert(!hasUnsharedAliasing!(immutable(S14)));
3356 static assert(!hasUnsharedAliasing!(shared(S14)));
3357 static assert( hasUnsharedAliasing!S15);
3358 static assert(!hasUnsharedAliasing!(immutable(S15)));
3359 static assert(!hasUnsharedAliasing!(shared(S15)));
3360 static assert( hasUnsharedAliasing!S16);
3361 static assert(!hasUnsharedAliasing!(immutable(S16)));
3362 static assert(!hasUnsharedAliasing!(shared(S16)));
3367 static assert(!hasUnsharedAliasing!S17);
3368 static assert( hasUnsharedAliasing!S18);
3369 static assert( hasUnsharedAliasing!S19);
3370 static assert(!hasUnsharedAliasing!S20);
3401 static assert(!hasElaborateCopyConstructor!int);
3410 static assert(!hasElaborateCopyConstructor!S1);
3411 static assert( hasElaborateCopyConstructor!S2);
3412 static assert( hasElaborateCopyConstructor!(immutable S2));
3413 static assert( hasElaborateCopyConstructor!S3);
3414 static assert( hasElaborateCopyConstructor!(S3[1]));
3415 static assert(!hasElaborateCopyConstructor!(S3[0]));
3416 static assert( hasElaborateCopyConstructor!S4);
3417 static assert(!hasElaborateCopyConstructor!S5);
3418 static assert(!hasElaborateCopyConstructor!S6);
3419 static assert( hasElaborateCopyConstructor!S7);
3459 static assert(!hasElaborateAssign!int);
3462 static assert( hasElaborateAssign!S);
3463 static assert(!hasElaborateAssign!(const(S)));
3468 static assert( hasElaborateAssign!S1);
3469 static assert(!hasElaborateAssign!S2);
3470 static assert( hasElaborateAssign!S3);
3471 static assert( hasElaborateAssign!(S3[1]));
3472 static assert(!hasElaborateAssign!(S3[0]));
3483 static assert( hasElaborateAssign!S4);
3490 static assert( hasElaborateAssign!S41);
3493 static assert( hasElaborateAssign!S5);
3500 static assert( hasElaborateAssign!S6);
3501 static assert(!hasElaborateAssign!S7);
3502 static assert(!hasElaborateAssign!S8);
3503 static assert( hasElaborateAssign!S9);
3504 static assert( hasElaborateAssign!S10);
3509 static assert( hasElaborateAssign!SS6);
3510 static assert(!hasElaborateAssign!SS7);
3511 static assert(!hasElaborateAssign!SS8);
3512 static assert( hasElaborateAssign!SS9);
3545 static assert(!hasElaborateDestructor!int);
3554 static assert(!hasElaborateDestructor!S1);
3555 static assert( hasElaborateDestructor!S2);
3556 static assert( hasElaborateDestructor!(immutable S2));
3557 static assert( hasElaborateDestructor!S3);
3558 static assert( hasElaborateDestructor!(S3[1]));
3559 static assert(!hasElaborateDestructor!(S3[0]));
3560 static assert( hasElaborateDestructor!S4);
3561 static assert(!hasElaborateDestructor!S5);
3562 static assert(!hasElaborateDestructor!S6);
3563 static assert( hasElaborateDestructor!S7);
3577 static assert(!hasMember!(int, "blah"));
3582 static assert(hasMember!(S1, "blah"));
3583 static assert(hasMember!(S2, "blah"));
3584 static assert(hasMember!(C1, "blah"));
3585 static assert(hasMember!(C2, "blah"));
3606 static assert(hasMember!(S, "x"));
3607 static assert(hasMember!(S, "f"));
3608 static assert(hasMember!(S, "t"));
3609 static assert(hasMember!(S, "T"));
3610 static assert(hasMember!(R1!S, "x"));
3611 static assert(hasMember!(R1!S, "f"));
3612 static assert(hasMember!(R1!S, "t"));
3613 static assert(hasMember!(R1!S, "T"));
3614 static assert(hasMember!(R2!S, "x"));
3615 static assert(hasMember!(R2!S, "f"));
3616 static assert(hasMember!(R2!S, "t"));
3617 static assert(hasMember!(R2!S, "T"));
3626 static assert(hasMember!(S, "foo"));
3669 static assert( hasStaticMember!(S, "sf"));
3670 static assert(!hasStaticMember!(S, "f"));
3672 static assert( hasStaticMember!(S, "si"));
3673 static assert(!hasStaticMember!(S, "i"));
3675 static assert(!hasStaticMember!(S, "hello"));
3756 static assert(!hasStaticMember!(S, "X"));
3757 static assert(!hasStaticMember!(S, "Y"));
3758 static assert(!hasStaticMember!(S, "Y.i"));
3759 static assert(!hasStaticMember!(S, "S"));
3760 static assert(!hasStaticMember!(S, "C"));
3761 static assert( hasStaticMember!(S, "sx"));
3762 static assert( hasStaticMember!(S, "gx"));
3763 static assert(!hasStaticMember!(S, "y"));
3764 static assert( hasStaticMember!(S, "sy"));
3765 static assert( hasStaticMember!(S, "f"));
3766 static assert( hasStaticMember!(S, "f2"));
3767 static assert(!hasStaticMember!(S, "dm"));
3768 static assert( hasStaticMember!(S, "sd"));
3769 static assert(!hasStaticMember!(S, "g"));
3770 static assert( hasStaticMember!(S, "fp"));
3771 static assert( hasStaticMember!(S, "gfp"));
3772 static assert(!hasStaticMember!(S, "fpm"));
3773 static assert(!hasStaticMember!(S, "m"));
3774 static assert(!hasStaticMember!(S, "m2"));
3775 static assert(!hasStaticMember!(S, "iom"));
3776 static assert( hasStaticMember!(S, "iosf"));
3777 static assert(!hasStaticMember!(S, "p"));
3778 static assert( hasStaticMember!(S, "sp"));
3780 static assert(!hasStaticMember!(C, "X"));
3781 static assert(!hasStaticMember!(C, "Y"));
3782 static assert(!hasStaticMember!(C, "Y.i"));
3783 static assert(!hasStaticMember!(C, "S"));
3784 static assert(!hasStaticMember!(C, "C"));
3785 static assert( hasStaticMember!(C, "sx"));
3786 static assert( hasStaticMember!(C, "gx"));
3787 static assert(!hasStaticMember!(C, "y"));
3788 static assert( hasStaticMember!(C, "sy"));
3789 static assert( hasStaticMember!(C, "f"));
3790 static assert( hasStaticMember!(C, "f2"));
3791 static assert(!hasStaticMember!(S, "dm"));
3792 static assert( hasStaticMember!(S, "sd"));
3793 static assert(!hasStaticMember!(C, "g"));
3794 static assert( hasStaticMember!(C, "fp"));
3795 static assert( hasStaticMember!(C, "gfp"));
3796 static assert(!hasStaticMember!(C, "fpm"));
3797 static assert(!hasStaticMember!(C, "m"));
3798 static assert(!hasStaticMember!(C, "m2"));
3799 static assert(!hasStaticMember!(C, "iom"));
3800 static assert( hasStaticMember!(C, "iosf"));
3801 static assert(!hasStaticMember!(C, "p"));
3802 static assert( hasStaticMember!(C, "sp"));
3922 static assert([ EnumMembers!A ] == [ A.a ]);
3924 static assert([ EnumMembers!B ] == [ B.a, B.b, B.c, B.d, B.e ]);
3930 static assert([ EnumMembers!A ] == [ A.a, A.b ]);
3938 static assert([ EnumMembers!B ] == [ B.a, B.b, B.c ]);
3948 static assert([ EnumMembers!A ] == [ A.a, A.b, A.c, A.d, A.e ]);
3972 static assert(EnumMembers!TLAs[0] == TLAs._0000);
3973 static assert(EnumMembers!TLAs[$-1] == TLAs._2999);
3979 static assert(__traits(identifier, EnumMembers!E[0]) == "member");
3980 static assert(__traits(identifier, EnumMembers!E[1]) == "a");
3981 static assert(__traits(identifier, EnumMembers!E[2]) == "b");
3999 static assert(0, "argument is not a class or interface");
4008 static assert(is(BaseTypeTuple!I12 == AliasSeq!(I1, I2)));
4012 static assert(is(BaseTypeTuple!I123 == AliasSeq!(I1, I2, I3)));
4023 assert(TL.length == 3);
4024 assert(is (TL[0] == A));
4025 assert(is (TL[1] == I1));
4026 assert(is (TL[2] == I2));
4028 assert(BaseTypeTuple!Object.length == 0);
4061 static assert(!BaseClassesTuple!Object.length);
4062 static assert(is(BaseClassesTuple!C1 == AliasSeq!(Object)));
4063 static assert(is(BaseClassesTuple!C2 == AliasSeq!(C1, Object)));
4064 static assert(is(BaseClassesTuple!C3 == AliasSeq!(C2, C1, Object)));
4070 static assert(!__traits(compiles, BaseClassesTuple!S));
4072 static assert(!__traits(compiles, BaseClassesTuple!I));
4075 static assert(is(BaseClassesTuple!C5 == AliasSeq!(C4, Object)));
4117 static assert(is(TL[0] == I1) && is(TL[1] == I2));
4132 static assert(is(InterfacesTuple!I ==
4134 static assert(is(InterfacesTuple!C2 ==
4163 assert(TL.length == 5);
4164 assert(is (TL[0] == B2));
4165 assert(is (TL[1] == B1));
4166 assert(is (TL[2] == Object));
4167 assert(is (TL[3] == J1));
4168 assert(is (TL[4] == J2));
4170 assert(TransitiveBaseTypeTuple!Object.length == 0);
4291 static assert(foos.length == 2);
4292 static assert(__traits(isSame, foos[0], C.foo));
4293 static assert(__traits(isSame, foos[1], B.foo));
4311 assert(__traits(isSame, fs[0], bfs[0]) || __traits(isSame, fs[0], bfs[1]));
4312 assert(__traits(isSame, fs[1], bfs[0]) || __traits(isSame, fs[1], bfs[1]));
4331 static assert(test.length == 2);
4332 static assert(is(FunctionTypeOf!(test[0]) == FunctionTypeOf!(C.test)));
4333 static assert(is(FunctionTypeOf!(test[1]) == FunctionTypeOf!(K.test)));
4335 static assert(noexist.length == 0);
4339 static assert(prop.length == 1);
4349 static assert(Test_foo.length == 3);
4350 static assert(is(typeof(&Test_foo[0]) == void function()));
4351 static assert(is(typeof(&Test_foo[2]) == void function(int)));
4352 static assert(is(typeof(&Test_foo[1]) == void function(int, int)));
4374 static assert(__traits(isSame, TemplateOf!(Foo!(int, real)), Foo));
4389 static assert(__traits(isSame, TemplateOf!(Foo1!(int)), Foo1));
4390 static assert(__traits(isSame, TemplateOf!(Foo2!(int, int)), Foo2));
4391 static assert(__traits(isSame, TemplateOf!(Foo3!(123)), Foo3));
4392 static assert(__traits(isSame, TemplateOf!(Foo4!("123")), Foo4));
4393 static assert(__traits(isSame, TemplateOf!(Foo5!(int)), Foo5));
4394 static assert(__traits(isSame, TemplateOf!(Foo6!(int, int)), Foo6));
4395 static assert(__traits(isSame, TemplateOf!(Foo7!(123)), Foo7));
4396 static assert(__traits(isSame, TemplateOf!(Foo8!(int).Foo9!(real)), Foo8!(int).Foo9));
4397 static assert(__traits(isSame, TemplateOf!(Foo10!()), Foo10));
4419 static assert(is(TemplateArgsOf!(Foo!(int, real)) == AliasSeq!(int, real)));
4436 static assert(is(TemplateArgsOf!(Foo1!(int)) == AliasSeq!(int)));
4437 static assert(is(TemplateArgsOf!(Foo2!(int, int)) == AliasSeq!(int, int)));
4438 static assert(__traits(isSame, TemplateArgsOf!(Foo3!(x)), AliasSeq!(x)));
4439 static assert(TemplateArgsOf!(Foo4!(y)) == AliasSeq!(y));
4440 static assert(is(TemplateArgsOf!(Foo5!(int)) == AliasSeq!(int)));
4441 static assert(is(TemplateArgsOf!(Foo6!(int, int)) == AliasSeq!(int, int)));
4442 static assert(__traits(isSame, TemplateArgsOf!(Foo7!(x)), AliasSeq!(x)));
4443 static assert(is(TemplateArgsOf!(Foo8!(int).Foo9!(real)) == AliasSeq!(real)));
4444 static assert(is(TemplateArgsOf!(Foo10!()) == AliasSeq!()));
4452 static assert(0);
4478 static assert(classInstanceAlignment!A == (void*).alignof);
4479 static assert(classInstanceAlignment!B == long.alignof);
4522 assert(is(X == long));
4524 assert(is(Y == void));
4528 static assert(is(CommonType!(3) == int));
4529 static assert(is(CommonType!(double, 4, float) == double));
4530 static assert(is(CommonType!(string, char[]) == const(char)[]));
4531 static assert(is(CommonType!(3, 3U) == uint));
4610 static assert(is(ImplicitConversionTargets!(double)[0] == real));
4611 static assert(is(ImplicitConversionTargets!(string)[0] == const(char)[]));
4631 static assert( isImplicitlyConvertible!(immutable(char), char));
4632 static assert( isImplicitlyConvertible!(const(char), char));
4633 static assert( isImplicitlyConvertible!(char, wchar));
4634 static assert(!isImplicitlyConvertible!(wchar, char));
4636 static assert(!isImplicitlyConvertible!(const(ushort), ubyte));
4637 static assert(!isImplicitlyConvertible!(const(uint), ubyte));
4638 static assert(!isImplicitlyConvertible!(const(ulong), ubyte));
4640 static assert(!isImplicitlyConvertible!(const(char)[], string));
4641 static assert( isImplicitlyConvertible!(string, const(char)[]));
4657 static assert( isAssignable!(long, int));
4658 static assert(!isAssignable!(int, long));
4659 static assert( isAssignable!(const(char)[], string));
4660 static assert(!isAssignable!(string, char[]));
4663 static assert( isAssignable!int);
4666 static assert(!isAssignable!(immutable int));
4677 static assert(!isAssignable!(immutable int, int));
4678 static assert( isAssignable!(int, immutable int));
4680 static assert(!isAssignable!(inout int, int));
4681 static assert( isAssignable!(int, inout int));
4682 static assert(!isAssignable!(inout int));
4684 static assert( isAssignable!(shared int, int));
4685 static assert( isAssignable!(int, shared int));
4686 static assert( isAssignable!(shared int));
4688 static assert( isAssignable!(void[1], void[1]));
4691 static assert( isAssignable!(S, S));
4694 static assert( isAssignable!(S2, S2));
4695 static assert(!isAssignable!(S2, int));
4698 static assert( isAssignable!(S3, S3));
4701 static assert(!isAssignable!(S3X, S3X));
4704 static assert( isAssignable!(S4, S4));
4705 static assert( isAssignable!(S4, int));
4706 static assert( isAssignable!(S4, immutable int));
4710 static assert(!isAssignable!(S6, S5));
4711 static assert(!isRvalueAssignable!(S6, S5));
4712 static assert( isLvalueAssignable!(S6, S5));
4713 static assert( isLvalueAssignable!(S6, immutable S5));
4765 static assert( isBlitAssignable!int);
4766 static assert(!isBlitAssignable!(const int));
4769 static assert( isBlitAssignable!C);
4773 static assert( isBlitAssignable!S1);
4774 static assert(!isBlitAssignable!S2);
4779 static assert( isBlitAssignable!(S3X));
4780 static assert( isBlitAssignable!(S3Y));
4781 static assert(!isBlitAssignable!(S3Z));
4782 static assert(!isBlitAssignable!(const S3X));
4783 static assert(!isBlitAssignable!(inout S3Y));
4784 static assert(!isBlitAssignable!(immutable S3Z));
4785 static assert( isBlitAssignable!(S3X[3]));
4786 static assert( isBlitAssignable!(S3Y[3]));
4787 static assert(!isBlitAssignable!(S3Z[3]));
4791 static assert( isBlitAssignable!(ES3X));
4792 static assert( isBlitAssignable!(ES3Y));
4793 static assert(!isBlitAssignable!(ES3Z));
4794 static assert(!isBlitAssignable!(const ES3X));
4795 static assert(!isBlitAssignable!(inout ES3Y));
4796 static assert(!isBlitAssignable!(immutable ES3Z));
4797 static assert( isBlitAssignable!(ES3X[3]));
4798 static assert( isBlitAssignable!(ES3Y[3]));
4799 static assert(!isBlitAssignable!(ES3Z[3]));
4804 static assert( isBlitAssignable!(U1X));
4805 static assert( isBlitAssignable!(U1Y));
4806 static assert(!isBlitAssignable!(U1Z));
4807 static assert(!isBlitAssignable!(const U1X));
4808 static assert(!isBlitAssignable!(inout U1Y));
4809 static assert(!isBlitAssignable!(immutable U1Z));
4810 static assert( isBlitAssignable!(U1X[3]));
4811 static assert( isBlitAssignable!(U1Y[3]));
4812 static assert(!isBlitAssignable!(U1Z[3]));
4816 static assert( isBlitAssignable!(EU1X));
4817 static assert( isBlitAssignable!(EU1Y));
4818 static assert(!isBlitAssignable!(EU1Z));
4819 static assert(!isBlitAssignable!(const EU1X));
4820 static assert(!isBlitAssignable!(inout EU1Y));
4821 static assert(!isBlitAssignable!(immutable EU1Z));
4822 static assert( isBlitAssignable!(EU1X[3]));
4823 static assert( isBlitAssignable!(EU1Y[3]));
4824 static assert(!isBlitAssignable!(EU1Z[3]));
4832 static assert(!isStaticArray!SA);
4833 static assert(!isBlitAssignable!(SA[3]));
4852 static assert( isStorageClassImplicitlyConvertible!( int, const int));
4853 static assert( isStorageClassImplicitlyConvertible!(immutable int, const int));
4855 static assert(!isStorageClassImplicitlyConvertible!(const int, int));
4856 static assert(!isStorageClassImplicitlyConvertible!(const int, immutable int));
4857 static assert(!isStorageClassImplicitlyConvertible!(int, shared int));
4858 static assert(!isStorageClassImplicitlyConvertible!(shared int, int));
4988 static assert(isCovariantWith!(typeof(C.clone), typeof(I.clone)));
4992 static assert(!isCovariantWith!(typeof(C.clone), typeof(J.clone)));
5005 static assert( isCovariantWith!(DerivA_1.test, BaseA.test));
5006 static assert( isCovariantWith!(DerivA_2.test, BaseA.test));
5007 static assert(!isCovariantWith!(BaseA.test, DerivA_1.test));
5008 static assert(!isCovariantWith!(BaseA.test, DerivA_2.test));
5009 static assert( isCovariantWith!(BaseA.test, BaseA.test));
5010 static assert( isCovariantWith!(DerivA_1.test, DerivA_1.test));
5011 static assert( isCovariantWith!(DerivA_2.test, DerivA_2.test));
5018 static assert( isCovariantWith!(DerivB_1.test, BaseB.test));
5019 static assert( isCovariantWith!(DerivB_2.test, BaseB.test));
5020 static assert( isCovariantWith!(DerivB_3.test, BaseB.test));
5021 static assert(!isCovariantWith!(BaseB.test, DerivB_1.test));
5022 static assert(!isCovariantWith!(BaseB.test, DerivB_2.test));
5023 static assert(!isCovariantWith!(BaseB.test, DerivB_3.test));
5028 static assert( isCovariantWith!(DerivC_1.test, BaseC.test));
5029 static assert(!isCovariantWith!(BaseC.test, DerivC_1.test));
5035 static assert( isCovariantWith!(DerivE_1.test, BaseE.test));
5036 static assert( isCovariantWith!(DerivE_2.test, BaseE.test));
5037 static assert(!isCovariantWith!(BaseE.test, DerivE_1.test));
5038 static assert(!isCovariantWith!(BaseE.test, DerivE_2.test));
5051 static assert( isCovariantWith!(DerivF.test1, BaseF.test1));
5052 static assert( isCovariantWith!(DerivF.test2, BaseF.test2));
5095 static assert(!__traits(compiles, needLvalue(rvalueOf!T)));
5096 static assert( __traits(compiles, needLvalue(lvalueOf!T)));
5097 static assert(is(typeof(rvalueOf!T) == T));
5098 static assert(is(typeof(lvalueOf!T) == T));
5101 static assert(!__traits(compiles, rvalueOf!int = 1));
5102 static assert( __traits(compiles, lvalueOf!byte = 127));
5103 static assert(!__traits(compiles, lvalueOf!byte = 128));
5120 static assert(0, T.stringof~" does not have alias this type");
5137 static assert(0, T.stringof~" is not boolean type");
5146 static assert( is(Q!T == BooleanTypeOf!( Q!T )));
5147 static assert( is(Q!T == BooleanTypeOf!( SubTypeOf!(Q!T) )));
5153 static assert(!is(BooleanTypeOf!( Q!T )), Q!T.stringof);
5154 static assert(!is(BooleanTypeOf!( SubTypeOf!(Q!T) )));
5170 static assert(is(BooleanTypeOf!B == bool));
5171 static assert(is(BooleanTypeOf!S == bool));
5189 static assert(0, T.stringof~" is not an integral type");
5197 static assert( is(Q!T == IntegralTypeOf!( Q!T )));
5198 static assert( is(Q!T == IntegralTypeOf!( SubTypeOf!(Q!T) )));
5204 static assert(!is(IntegralTypeOf!( Q!T )));
5205 static assert(!is(IntegralTypeOf!( SubTypeOf!(Q!T) )));
5224 static assert(0, T.stringof~" is not a floating point type");
5232 static assert( is(Q!T == FloatingPointTypeOf!( Q!T )));
5233 static assert( is(Q!T == FloatingPointTypeOf!( SubTypeOf!(Q!T) )));
5239 static assert(!is(FloatingPointTypeOf!( Q!T )));
5240 static assert(!is(FloatingPointTypeOf!( SubTypeOf!(Q!T) )));
5253 static assert(0, T.stringof~" is not a numeric type");
5261 static assert( is(Q!T == NumericTypeOf!( Q!T )));
5262 static assert( is(Q!T == NumericTypeOf!( SubTypeOf!(Q!T) )));
5268 static assert(!is(NumericTypeOf!( Q!T )));
5269 static assert(!is(NumericTypeOf!( SubTypeOf!(Q!T) )));
5282 static assert(0, T.stringof~" is not an unsigned type.");
5296 static assert(0, T.stringof~" is not an signed type.");
5314 static assert(0, T.stringof~" is not a character type");
5322 static assert( is(CharTypeOf!( Q!T )));
5323 static assert( is(CharTypeOf!( SubTypeOf!(Q!T) )));
5329 static assert(!is(CharTypeOf!( Q!T )));
5330 static assert(!is(CharTypeOf!( SubTypeOf!(Q!T) )));
5336 static assert(!is(CharTypeOf!( Q!T )));
5337 static assert(!is(CharTypeOf!( SubTypeOf!(Q!T) )));
5353 static assert(0, T.stringof~" is not a static array type");
5361 static assert(is( Q!( T[1] ) == StaticArrayTypeOf!( Q!( T[1] ) ) ));
5365 static assert(is( Q!(P!(T[1])) == StaticArrayTypeOf!( Q!(SubTypeOf!(P!(T[1]))) ) ));
5372 static assert(is( StaticArrayTypeOf!( Q!(void[1]) ) == Q!(void[1]) ));
5390 static assert(0, T.stringof~" is not a dynamic array");
5398 static assert(is( Q!T[] == DynamicArrayTypeOf!( Q!T[] ) ));
5399 static assert(is( Q!(T[]) == DynamicArrayTypeOf!( Q!(T[]) ) ));
5403 static assert(is( Q!(P!T[]) == DynamicArrayTypeOf!( Q!(SubTypeOf!(P!T[])) ) ));
5404 static assert(is( Q!(P!(T[])) == DynamicArrayTypeOf!( Q!(SubTypeOf!(P!(T[]))) ) ));
5408 static assert(!is(DynamicArrayTypeOf!(int[3])));
5409 static assert(!is(DynamicArrayTypeOf!(void[3])));
5410 static assert(!is(DynamicArrayTypeOf!(typeof(null))));
5422 static assert(0, T.stringof~" is not an array type");
5435 static assert(0, T.stringof~" is not a string type");
5442 static assert(0);
5445 static assert(0, T.stringof~" is not a string type");
5453 static assert(is(Q!T[] == StringTypeOf!( Q!T[] )));
5457 static assert(is(Q!T[] == StringTypeOf!( SubTypeOf!(Q!T[]) )));
5461 static assert(is(StringTypeOf!(C!Str) == Str));
5468 static assert(!is(StringTypeOf!( Q!T[] )));
5474 static assert(is(StringTypeOf!(char[4]) == char[]));
5491 static assert(0, T.stringof~" is not an associative array type");
5501 … static assert(is( P!(Q!T[R!T]) == AssocArrayTypeOf!( P!(Q!T[R!T]) ) ));
5510 … static assert(is( O!(P!(Q!T[R!T])) == AssocArrayTypeOf!( O!(SubTypeOf!(P!(Q!T[R!T]))) ) ));
5527 else static assert(0);
5542 static assert( isBoolean!bool);
5544 static assert( isBoolean!EB);
5545 static assert(!isBoolean!(SubTypeOf!bool));
5555 static assert(!isIntegral!(S!bool));
5567 static assert(
5576 static assert(
5589 static assert(!isIntegral!S);
5598 static assert( isIntegral!(Q!T));
5599 static assert(!isIntegral!(SubTypeOf!(Q!T)));
5603 static assert(!isIntegral!float);
5607 static assert(isIntegral!EU && isUnsigned!EU && !isSigned!EU);
5608 static assert(isIntegral!EI && !isUnsigned!EI && isSigned!EI);
5624 static assert(
5632 static assert(!isFloatingPoint!int);
5635 static assert(
5647 static assert(!isFloatingPoint!S);
5658 static assert( isFloatingPoint!(Q!T));
5659 static assert(!isFloatingPoint!(SubTypeOf!(Q!T)));
5666 static assert(!isFloatingPoint!(Q!T));
5674 static assert(!isFloatingPoint!cfloat);
5675 static assert(!isFloatingPoint!cdouble);
5676 static assert(!isFloatingPoint!creal);
5678 static assert(!isFloatingPoint!ifloat);
5679 static assert(!isFloatingPoint!idouble);
5680 static assert(!isFloatingPoint!ireal);
5695 static assert(
5707 static assert(
5722 static assert(!isIntegral!S);
5731 static assert( isNumeric!(Q!T));
5732 static assert(!isNumeric!(SubTypeOf!(Q!T)));
5741 static assert(!isNumeric!(S!int));
5753 static assert(!isScalarType!void);
5754 static assert( isScalarType!(immutable(byte)));
5755 static assert( isScalarType!(immutable(ushort)));
5756 static assert( isScalarType!(immutable(int)));
5757 static assert( isScalarType!(ulong));
5758 static assert( isScalarType!(shared(float)));
5759 static assert( isScalarType!(shared(const bool)));
5760 static assert( isScalarType!(const(char)));
5761 static assert( isScalarType!(wchar));
5762 static assert( isScalarType!(const(dchar)));
5763 static assert( isScalarType!(const(double)));
5764 static assert( isScalarType!(const(real)));
5774 static assert(!isScalarType!(S!int));
5785 static assert(isBasicType!void);
5786 static assert(isBasicType!(const(void)));
5787 static assert(isBasicType!(shared(void)));
5788 static assert(isBasicType!(immutable(void)));
5789 static assert(isBasicType!(shared const(void)));
5790 static assert(isBasicType!(shared inout(void)));
5791 static assert(isBasicType!(shared inout const(void)));
5792 static assert(isBasicType!(inout(void)));
5793 static assert(isBasicType!(inout const(void)));
5794 static assert(isBasicType!(immutable(int)));
5795 static assert(isBasicType!(shared(float)));
5796 static assert(isBasicType!(shared(const bool)));
5797 static assert(isBasicType!(const(dchar)));
5811 static assert(
5816 static assert(
5832 static assert( isUnsigned!(Q!T));
5833 static assert(!isUnsigned!(SubTypeOf!(Q!T)));
5842 static assert(!isUnsigned!(S!uint));
5853 static assert(
5858 static assert(
5867 static assert(isSigned!E);
5870 static assert(!isSigned!Eubyte);
5876 static assert( isSigned!(Q!T));
5877 static assert(!isSigned!(SubTypeOf!(Q!T)));
5886 static assert(!isSigned!(S!uint));
5892 static assert(isUnsigned!bool == false);
5893 static assert(isSigned!bool == false);
5908 static assert( isSomeChar!char);
5909 static assert( isSomeChar!wchar);
5910 static assert( isSomeChar!dchar);
5911 static assert( isSomeChar!(typeof('c')));
5912 static assert( isSomeChar!(immutable char));
5913 static assert( isSomeChar!(const dchar));
5916 static assert(!isSomeChar!int);
5917 static assert(!isSomeChar!byte);
5918 static assert(!isSomeChar!string);
5919 static assert(!isSomeChar!wstring);
5920 static assert(!isSomeChar!dstring);
5921 static assert(!isSomeChar!(char[4]));
5932 static assert( isSomeChar!( Q!T ));
5933 static assert(!isSomeChar!( SubTypeOf!(Q!T) ));
5943 static assert(!isSomeChar!(S!char));
5961 static assert( isSomeString!string);
5962 static assert( isSomeString!(wchar[]));
5963 static assert( isSomeString!(dchar[]));
5964 static assert( isSomeString!(typeof("aaa")));
5965 static assert( isSomeString!(const(char)[]));
5968 static assert( isSomeString!ES);
5971 static assert(!isSomeString!int);
5972 static assert(!isSomeString!(int[]));
5973 static assert(!isSomeString!(byte[]));
5974 static assert(!isSomeString!(typeof(null)));
5975 static assert(!isSomeString!(char[4]));
5982 static assert( isSomeString!( T ));
5983 static assert(!isSomeString!(SubTypeOf!(T)));
5998 static assert(isNarrowString!string);
5999 static assert(isNarrowString!wstring);
6000 static assert(isNarrowString!(char[]));
6001 static assert(isNarrowString!(wchar[]));
6003 static assert(!isNarrowString!dstring);
6004 static assert(!isNarrowString!(dchar[]));
6013 static assert( isNarrowString!( Q!T ));
6014 static assert(!isNarrowString!( SubTypeOf!(Q!T) ));
6022 static assert(!isNarrowString!( Q!T ));
6023 static assert(!isNarrowString!( SubTypeOf!(Q!T) ));
6037 static assert(isOrderingComparable!int);
6038 static assert(isOrderingComparable!string);
6039 static assert(!isOrderingComparable!creal);
6042 static assert(!isOrderingComparable!Foo);
6052 assert(isOrderingComparable!Bar && b2 > b1);
6060 static assert(isEqualityComparable!int);
6061 static assert(isEqualityComparable!string);
6062 static assert(isEqualityComparable!creal);
6063 static assert(!isEqualityComparable!void);
6066 static assert(isEqualityComparable!Foo);
6077 static assert(isEqualityComparable!Bar);
6078 assert(b1 == b2);
6079 assert(b1 != b3);
6104 assert(!isConvertibleToString!string);
6105 assert(isConvertibleToString!AliasedString);
6106 assert(isConvertibleToString!StringEnum);
6107 assert(isConvertibleToString!(char[25]));
6108 assert(!isConvertibleToString!(char[]));
6115 assert(!isConvertibleToString!I);
6116 assert(isConvertibleToString!S);
6153 assert(isAutodecodableString!wstring);
6154 assert(isAutodecodableString!Stringish);
6155 assert(!isAutodecodableString!dstring);
6166 static assert( isStaticArray!(int[3]));
6167 static assert( isStaticArray!(const(int)[5]));
6168 static assert( isStaticArray!(const(int)[][5]));
6170 static assert(!isStaticArray!(const(int)[]));
6171 static assert(!isStaticArray!(immutable(int)[]));
6172 static assert(!isStaticArray!(const(int)[4][]));
6173 static assert(!isStaticArray!(int[]));
6174 static assert(!isStaticArray!(int[char]));
6175 static assert(!isStaticArray!(int[1][]));
6176 static assert(!isStaticArray!(int[int]));
6177 static assert(!isStaticArray!int);
6188 static assert( isStaticArray!( Q!T ));
6189 static assert(!isStaticArray!( SubTypeOf!(Q!T) ));
6205 static assert( isDynamicArray!(int[]));
6206 static assert( isDynamicArray!(string));
6207 static assert( isDynamicArray!(long[3][]));
6209 static assert(!isDynamicArray!(int[5]));
6210 static assert(!isDynamicArray!(typeof(null)));
6220 static assert( isDynamicArray!( Q!T ));
6221 static assert(!isDynamicArray!( SubTypeOf!(Q!T) ));
6235 static assert( isArray!(int[]));
6236 static assert( isArray!(int[5]));
6237 static assert( isArray!(string));
6239 static assert(!isArray!uint);
6240 static assert(!isArray!(uint[uint]));
6241 static assert(!isArray!(typeof(null)));
6251 static assert( isArray!(Q!T));
6252 static assert(!isArray!(SubTypeOf!(Q!T)));
6274 static assert( isAssociativeArray!(Q!T));
6275 static assert(!isAssociativeArray!(SubTypeOf!(Q!T)));
6279 static assert(!isAssociativeArray!Foo);
6280 static assert(!isAssociativeArray!int);
6281 static assert(!isAssociativeArray!(int[]));
6282 static assert(!isAssociativeArray!(typeof(null)));
6301 static assert( isBuiltinType!void);
6302 static assert( isBuiltinType!string);
6303 static assert( isBuiltinType!(int[]));
6304 static assert( isBuiltinType!(C[string]));
6305 static assert(!isBuiltinType!C);
6306 static assert(!isBuiltinType!U);
6307 static assert(!isBuiltinType!S);
6308 static assert(!isBuiltinType!I);
6309 static assert(!isBuiltinType!(void delegate(int)));
6322 static assert(isSIMDVector!(__vector(float[4])));
6323 static assert(isSIMDVector!SimdVec);
6325 static assert(!isSIMDVector!uint);
6326 static assert(!isSIMDVector!(float[4]));
6340 static assert( isPointer!(Q!T));
6341 static assert(!isPointer!(SubTypeOf!(Q!T)));
6345 static assert(!isPointer!uint);
6346 static assert(!isPointer!(uint[uint]));
6347 static assert(!isPointer!(char[]));
6348 static assert(!isPointer!(typeof(null)));
6359 static assert(is(PointerTarget!(int*) == int));
6360 static assert(is(PointerTarget!(void*) == void));
6377 static assert( isAggregateType!C);
6378 static assert( isAggregateType!U);
6379 static assert( isAggregateType!S);
6380 static assert( isAggregateType!I);
6381 static assert(!isAggregateType!void);
6382 static assert(!isAggregateType!string);
6383 static assert(!isAggregateType!(int[]));
6384 static assert(!isAggregateType!(C[string]));
6385 static assert(!isAggregateType!(void delegate(int)));
6402 int opApply(scope int delegate(ref uint) dg) { assert(0); }
6407 @property uint front() { assert(0); }
6408 void popFront() { assert(0); }
6412 static assert( isIterable!(uint[]));
6413 static assert( isIterable!OpApply);
6414 static assert( isIterable!(uint[string]));
6415 static assert( isIterable!Range);
6417 static assert(!isIterable!uint);
6429 static assert( isMutable!int);
6430 static assert( isMutable!string);
6431 static assert( isMutable!(shared int));
6432 static assert( isMutable!(shared const(int)[]));
6434 static assert(!isMutable!(const int));
6435 static assert(!isMutable!(inout int));
6436 static assert(!isMutable!(shared(const int)));
6437 static assert(!isMutable!(shared(inout int)));
6438 static assert(!isMutable!(immutable string));
6463 static assert(isInstanceOf!(Foo, Foo!int));
6464 static assert(!isInstanceOf!(Foo, Bar!int));
6465 static assert(!isInstanceOf!(Foo, int));
6466 static assert(isInstanceOf!(Doo, Doo!int));
6467 static assert(isInstanceOf!(ABC, ABC!1));
6468 static assert(!isInstanceOf!(Foo, Foo));
6469 static assert(isInstanceOf!(fun, fun!int));
6470 static assert(isInstanceOf!(templ, templ!int));
6480 static assert(!isInstanceOf!(fun1, fun2!int));
6481 static assert(!isInstanceOf!(templ1, templ2!int));
6506 static assert(isExpressions!(1, 2.0, "a"));
6507 static assert(!isExpressions!(int, double, string));
6508 static assert(!isExpressions!(int, 2.0, "a"));
6524 static assert( isExpressionTuple!(42));
6525 static assert( isExpressionTuple!aa);
6526 static assert( isExpressionTuple!("cattywampus", 2.7, aa));
6527 static assert( isExpressionTuple!(bar()));
6529 static assert(!isExpressionTuple!isExpressionTuple);
6530 static assert(!isExpressionTuple!foo);
6531 static assert(!isExpressionTuple!( (a) { } ));
6532 static assert(!isExpressionTuple!int);
6533 static assert(!isExpressionTuple!myint);
6556 static assert(isTypeTuple!(int, float, string));
6557 static assert(!isTypeTuple!(1, 2.0, "a"));
6558 static assert(!isTypeTuple!(1, double, string));
6568 static assert( isTypeTuple!int);
6569 static assert( isTypeTuple!string);
6570 static assert( isTypeTuple!C);
6571 static assert( isTypeTuple!(typeof(func)));
6572 static assert( isTypeTuple!(int, char, double));
6574 static assert(!isTypeTuple!c);
6575 static assert(!isTypeTuple!isTypeTuple);
6576 static assert(!isTypeTuple!CONST);
6604 static assert( isFunctionPointer!fpfoo);
6605 static assert( isFunctionPointer!(void function()));
6608 static assert(!isFunctionPointer!dgbar);
6609 static assert(!isFunctionPointer!(void delegate()));
6610 static assert(!isFunctionPointer!foo);
6611 static assert(!isFunctionPointer!bar);
6613 static assert( isFunctionPointer!((int a) {}));
6644 assert(isDelegate!dg);
6645 assert(isDelegate!(int delegate()));
6646 assert(isDelegate!(typeof(&func)));
6649 assert(!isDelegate!fp);
6650 assert(!isDelegate!(int function()));
6651 assert(!isDelegate!(typeof(&sfunc)));
6693 static assert( isSomeFunction!func);
6694 static assert( isSomeFunction!prop);
6695 static assert( isSomeFunction!nestedFunc);
6696 static assert( isSomeFunction!nestedProp);
6697 static assert( isSomeFunction!(C.method));
6698 static assert( isSomeFunction!(C.prop));
6699 static assert( isSomeFunction!(c.prop));
6700 static assert( isSomeFunction!(c.prop));
6701 static assert( isSomeFunction!fp);
6702 static assert( isSomeFunction!dg);
6703 static assert( isSomeFunction!(typeof(func)));
6704 static assert( isSomeFunction!(real function(ref int)));
6705 static assert( isSomeFunction!(real delegate(ref int)));
6706 static assert( isSomeFunction!((int a) { return a; }));
6708 static assert(!isSomeFunction!int);
6709 static assert(!isSomeFunction!val);
6710 static assert(!isSomeFunction!isSomeFunction);
6739 static assert( isCallable!c);
6740 static assert( isCallable!S);
6741 static assert( isCallable!(c.opCall));
6742 static assert( isCallable!(I.value));
6743 static assert( isCallable!((int a) { return a; }));
6745 static assert(!isCallable!I);
6763 static assert(!isAbstractFunction!(int));
6764 static assert(!isAbstractFunction!(S.foo));
6765 static assert(!isAbstractFunction!(C.foo));
6766 static assert( isAbstractFunction!(AC.foo));
6788 static assert(!isFinalFunction!(int));
6789 static assert(!isFinalFunction!(S.bar));
6790 static assert( isFinalFunction!(FC.foo));
6791 static assert(!isFinalFunction!(C.bar));
6792 static assert( isFinalFunction!(C.foo));
6807 static assert(!isNestedFunction!f);
6808 static assert( isNestedFunction!g);
6826 static assert(!isAbstractClass!S);
6827 static assert(!isAbstractClass!C);
6828 static assert( isAbstractClass!AC);
6830 static assert(!isAbstractClass!c);
6832 static assert( isAbstractClass!ac);
6851 static assert(!isFinalClass!C);
6852 static assert(!isFinalClass!AC);
6853 static assert( isFinalClass!FC1);
6854 static assert( isFinalClass!FC2);
6856 static assert(!isFinalClass!c);
6858 static assert( isFinalClass!fc1);
6895 static assert(is(Unqual!int == int));
6896 static assert(is(Unqual!(const int) == int));
6897 static assert(is(Unqual!(immutable int) == int));
6898 static assert(is(Unqual!(shared int) == int));
6899 static assert(is(Unqual!(shared(const int)) == int));
6904 static assert(is(Unqual!( int) == int));
6905 static assert(is(Unqual!( const int) == int));
6906 static assert(is(Unqual!( inout int) == int));
6907 static assert(is(Unqual!( inout const int) == int));
6908 static assert(is(Unqual!(shared int) == int));
6909 static assert(is(Unqual!(shared const int) == int));
6910 static assert(is(Unqual!(shared inout int) == int));
6911 static assert(is(Unqual!(shared inout const int) == int));
6912 static assert(is(Unqual!( immutable int) == int));
6915 static assert(is(Unqual!ImmIntArr == immutable(int)[]));
6935 …static assert(is(ModifyTypePreservingTQ!(Intify, real) == in…
6936 …static assert(is(ModifyTypePreservingTQ!(Intify, const real) == const in…
6937 …static assert(is(ModifyTypePreservingTQ!(Intify, inout real) == inout in…
6938 …static assert(is(ModifyTypePreservingTQ!(Intify, inout const real) == inout const in…
6939 …static assert(is(ModifyTypePreservingTQ!(Intify, shared real) == shared in…
6940 …static assert(is(ModifyTypePreservingTQ!(Intify, shared const real) == shared const in…
6941 …static assert(is(ModifyTypePreservingTQ!(Intify, shared inout real) == shared inout in…
6942 …static assert(is(ModifyTypePreservingTQ!(Intify, shared inout const real) == shared inout const in…
6943 …static assert(is(ModifyTypePreservingTQ!(Intify, immutable real) == immutable in…
6966 static assert(is(CopyTypeQualifiers!(inout const real, int) == inout const int));
6971 static assert(is(CopyTypeQualifiers!( real, int) == int));
6972 static assert(is(CopyTypeQualifiers!( const real, int) == const int));
6973 static assert(is(CopyTypeQualifiers!( inout real, int) == inout int));
6974 static assert(is(CopyTypeQualifiers!( inout const real, int) == inout const int));
6975 static assert(is(CopyTypeQualifiers!(shared real, int) == shared int));
6976 static assert(is(CopyTypeQualifiers!(shared const real, int) == shared const int));
6977 static assert(is(CopyTypeQualifiers!(shared inout real, int) == shared inout int));
6978 static assert(is(CopyTypeQualifiers!(shared inout const real, int) == shared inout const int));
6979 static assert(is(CopyTypeQualifiers!( immutable real, int) == immutable int));
7000 assert( is(typeof(f) == const float));
7003 assert( is(typeof(u) == uint));
7006 assert(!is(CopyConstness!(shared bool, int) == shared int));
7009 assert( is(CopyConstness!(shared const real, double) == const double));
7013 assert(!is(MutT == const(int)));
7017 assert( is(CstT == const(int)));
7029 assert(is(CopyConstness!(typeof(Test.method1), real) == real));
7031 assert(is(CopyConstness!(typeof(Test.method2), byte) == const(byte)));
7033 assert(is(CopyConstness!(typeof(Test.method3), string) == immutable(string)));
7038 assert(is(CopyConstness!(inout(int)[], int[]) == int[]));
7039 assert(is(CopyConstness!(inout(int[]), int[]) == inout(int[])));
7044 static assert(is(CopyConstness!( int, real) == real));
7045 static assert(is(CopyConstness!(const int, real) == const real));
7046 static assert(is(CopyConstness!(inout int, real) == inout real));
7047 static assert(is(CopyConstness!(inout const int, real) == inout const real));
7048 static assert(is(CopyConstness!(shared int, real) == real));
7049 static assert(is(CopyConstness!(shared const int, real) == const real));
7050 static assert(is(CopyConstness!(shared inout int, real) == inout real));
7051 static assert(is(CopyConstness!(shared inout const int, real) == inout const real));
7052 static assert(is(CopyConstness!(immutable int, real) == immutable real));
7071 assert(0);
7078 static assert(is(ForeachType!(uint[]) == uint));
7079 static assert(is(ForeachType!string == immutable(char)));
7080 static assert(is(ForeachType!(string[string]) == string));
7081 static assert(is(ForeachType!(inout(int)[]) == inout(int)));
7105 static assert(is(OriginalType!E == real));
7106 static assert(is(OriginalType!F == real));
7107 static assert(is(OriginalType!G == const real));
7120 static assert(is(KeyType!Hash == string));
7121 static assert(is(ValueType!Hash == int));
7136 static assert(is(KeyType!Hash == string));
7137 static assert(is(ValueType!Hash == int));
7163 static assert(false, "Type " ~ T.stringof ~
7175 static assert(is(U1 == uint));
7176 static assert(is(U2 == const(uint)));
7177 static assert(is(U3 == immutable(uint)));
7182 static assert(is(UV1 == __vector(uint[4])));
7183 static assert(is(UV2 == const(__vector(uint[4]))));
7193 static assert(is(U4 == ucent));
7194 static assert(is(U5 == const(ucent)));
7195 static assert(is(U6 == immutable(ucent)));
7230 static assert(is(Largest!(uint, ubyte, ushort, real) == real));
7231 static assert(is(Largest!(ulong, double) == ulong));
7232 static assert(is(Largest!(double, ulong) == double));
7233 static assert(is(Largest!(uint, byte, double, short) == double));
7235 static assert(is(Largest!(uint, ubyte, ucent, ushort) == ucent));
7259 static assert(false, "Type " ~ T.stringof ~
7270 static assert(is(S1 == int));
7272 static assert(is(S2 == const(int)));
7274 static assert(is(S3 == immutable(int)));
7278 static assert(is(S4 == cent));
7284 static assert(is(Signed!float == float));
7289 static assert(is(SV1 == __vector(int[4])));
7290 static assert(is(SV2 == const(__vector(int[4]))));
7312 static assert(mostNegative!float == -float.max);
7313 static assert(mostNegative!double == -double.max);
7314 static assert(mostNegative!real == -real.max);
7315 static assert(mostNegative!bool == false);
7322 static assert(mostNegative!T == T.min);
7325 static assert(mostNegative!T == 0);
7342 static assert(is(typeof(a * b) == Promoted!ubyte));
7343 static assert(is(Promoted!ubyte == int));
7345 static assert(is(Promoted!(shared(bool)) == shared(int)));
7346 static assert(is(Promoted!(const(int)) == const(int)));
7347 static assert(is(Promoted!double == double));
7355 static assert(is(Promoted!T == int));
7356 static assert(is(Promoted!(shared(const T)) == shared(const int)));
7362 static assert(is(Promoted!T == T));
7363 static assert(is(Promoted!(immutable(T)) == immutable(T)));
7388 static assert(TL == AliasSeq!("i", "xi", "yi"));
7396 static assert(mangledName!int == int.mangleof);
7397 static assert(mangledName!C == C.mangleof);
7398 static assert(mangledName!(C.value) == C.value.mangleof);
7399 static assert(mangledName!(C.value)[$ - 12 .. $] == "5valueMFNdZi");
7400 static assert(mangledName!mangledName == "3std6traits11mangledName");
7401 static assert(mangledName!freeFunc == "_D3std6traits8freeFuncFAyaZv");
7404 …static assert(mangledName!((int a) { return a+x; }) == "DFNaNbNiNfiZi"); // pure nothrow @safe @n…
7406 static assert(mangledName!((int a) { return a+x; }) == "DFNbNiNfiZi"); // nothrow @safe @nnogc
7416 assert(foo_demangled[0 .. 4] == "int " && foo_demangled[$-3 .. $] == "foo",
7421 assert(bar_demangled[0 .. 5] == "void " && bar_demangled[$-5 .. $] == "bar()");
7442 static assert(is(Select!(true, int, long) == int));
7443 static assert(is(Select!(false, int, long) == long));
7445 static assert(is(Select!(false, const(int), const(Foo)) == const(Foo)));
7452 assert(selA == 1);
7453 assert(selB == 2);
7457 static assert(val == 3);
7471 int dontcallme() { assert(0); }
7474 static assert(is(typeof(a) == real));
7475 static assert(is(typeof(b) == real));
7497 static assert(hasUDA!(a, "alpha"));
7498 static assert(!hasUDA!(a, S));
7499 static assert(!hasUDA!(a, E));
7502 static assert(!hasUDA!(b, "alpha"));
7503 static assert(!hasUDA!(b, S));
7504 static assert(hasUDA!(b, E));
7507 static assert(!hasUDA!(c, "alpha"));
7508 static assert(!hasUDA!(c, S));
7509 static assert(hasUDA!(c, E));
7512 static assert(!hasUDA!(d, "alpha"));
7513 static assert(hasUDA!(d, S));
7514 static assert(hasUDA!(d, E));
7517 static assert(!hasUDA!(e, "alpha"));
7518 static assert(hasUDA!(e, S));
7519 static assert(!hasUDA!(e, S()));
7520 static assert(!hasUDA!(e, E));
7523 static assert(!hasUDA!(f, "alpha"));
7524 static assert(hasUDA!(f, S));
7525 static assert(hasUDA!(f, S()));
7526 static assert(!hasUDA!(f, E));
7529 static assert(hasUDA!(g, "alpha"));
7530 static assert(hasUDA!(g, S));
7531 static assert(hasUDA!(g, E));
7534 static assert(hasUDA!(h, 100));
7539 static assert(hasUDA!(i, Named));
7540 static assert(hasUDA!(i, Named("abc")));
7541 static assert(!hasUDA!(i, Named("def")));
7550 static assert(hasUDA!(j, AttrT));
7551 static assert(hasUDA!(j, AttrT!int));
7552 static assert(!hasUDA!(j, AttrT!string));
7555 static assert(hasUDA!(k, AttrT));
7556 static assert(!hasUDA!(k, AttrT!int));
7557 static assert(hasUDA!(k, AttrT!string));
7564 static assert(hasUDA!(l, FuncAttr));
7565 static assert(!hasUDA!(l, FuncAttr!fourtyTwo));
7566 static assert(hasUDA!(l, FuncAttr!getLen));
7567 static assert(!hasUDA!(l, FuncAttr!fourtyTwo()));
7568 static assert(!hasUDA!(l, FuncAttr!getLen()));
7571 static assert(hasUDA!(m, FuncAttr));
7572 static assert(!hasUDA!(m, FuncAttr!fourtyTwo));
7573 static assert(hasUDA!(m, FuncAttr!getLen));
7574 static assert(!hasUDA!(m, FuncAttr!fourtyTwo()));
7575 static assert(hasUDA!(m, FuncAttr!getLen()));
7628 static assert(getUDAs!(a, Attr).length == 1);
7629 static assert(getUDAs!(a, Attr)[0].name == "Answer");
7630 static assert(getUDAs!(a, Attr)[0].value == 42);
7633 static assert(getUDAs!(b, Attr).length == 1);
7634 static assert(getUDAs!(b, Attr)[0].name == "Answer");
7635 static assert(getUDAs!(b, Attr)[0].value == 42);
7638 static assert(getUDAs!(c, Attr).length == 2);
7639 static assert(getUDAs!(c, Attr)[0].name == "Answer");
7640 static assert(getUDAs!(c, Attr)[0].value == 42);
7641 static assert(getUDAs!(c, Attr)[1].name == "Pi");
7642 static assert(getUDAs!(c, Attr)[1].value == 3);
7644 static assert(getUDAs!(c, Attr("Answer", 42)).length == 1);
7645 static assert(getUDAs!(c, Attr("Answer", 42))[0].name == "Answer");
7646 static assert(getUDAs!(c, Attr("Answer", 42))[0].value == 42);
7648 static assert(getUDAs!(c, Attr("Answer", 99)).length == 0);
7657 static assert(getUDAs!(d, AttrT).length == 2);
7658 static assert(getUDAs!(d, AttrT)[0].name == "Answer");
7659 static assert(getUDAs!(d, AttrT)[0].value == 42);
7660 static assert(getUDAs!(d, AttrT)[1].name == "Pi");
7661 static assert(getUDAs!(d, AttrT)[1].value == 3);
7663 static assert(getUDAs!(d, AttrT!uint).length == 1);
7664 static assert(getUDAs!(d, AttrT!uint)[0].name == "Answer");
7665 static assert(getUDAs!(d, AttrT!uint)[0].value == 42);
7667 static assert(getUDAs!(d, AttrT!int).length == 1);
7668 static assert(getUDAs!(d, AttrT!int)[0].name == "Pi");
7669 static assert(getUDAs!(d, AttrT!int)[0].value == 3);
7674 static assert(getUDAs!(e, SimpleAttr).length == 1);
7675 static assert(is(getUDAs!(e, SimpleAttr)[0] == SimpleAttr));
7678 static assert(getUDAs!(f, SimpleAttr).length == 1);
7679 static assert(is(typeof(getUDAs!(f, SimpleAttr)[0]) == SimpleAttr));
7686 static assert(getUDAs!(g, FuncAttr).length == 1);
7687 static assert(getUDAs!(g, FuncAttr)[0].func(5) == 47);
7689 static assert(getUDAs!(g, FuncAttr!add42).length == 1);
7690 static assert(getUDAs!(g, FuncAttr!add42)[0].func(5) == 47);
7692 static assert(getUDAs!(g, FuncAttr!add42()).length == 0);
7694 static assert(getUDAs!(g, FuncAttr!concat).length == 0);
7695 static assert(getUDAs!(g, FuncAttr!concat()).length == 0);
7698 static assert(getUDAs!(h, FuncAttr).length == 1);
7699 static assert(getUDAs!(h, FuncAttr)[0].func(5) == 47);
7701 static assert(getUDAs!(h, FuncAttr!add42).length == 1);
7702 static assert(getUDAs!(h, FuncAttr!add42)[0].func(5) == 47);
7704 static assert(getUDAs!(h, FuncAttr!add42()).length == 1);
7705 static assert(getUDAs!(h, FuncAttr!add42())[0].func(5) == 47);
7707 static assert(getUDAs!(h, FuncAttr!concat).length == 0);
7708 static assert(getUDAs!(h, FuncAttr!concat()).length == 0);
7711 static assert(getUDAs!(i, "alpha").length == 1);
7712 static assert(getUDAs!(i, "alpha")[0] == "alpha");
7714 static assert(getUDAs!(i, 42).length == 1);
7715 static assert(getUDAs!(i, 42)[0] == 42);
7717 static assert(getUDAs!(i, 'c').length == 0);
7779 static assert(getSymbolsByUDA!(A, Attr).length == 2);
7781 static assert(hasUDA!(getSymbolsByUDA!(A, Attr)[0], Attr));
7782 static assert(hasUDA!(getSymbolsByUDA!(A, Attr)[1], Attr));
7797 static assert(getSymbolsByUDA!(B, UDA).length == 2);
7799 static assert(getSymbolsByUDA!(B, 100).length == 1);
7801 static assert(getUDAs!(getSymbolsByUDA!(B, UDA)[0], UDA)[0].name == "X");
7811 static assert(getSymbolsByUDA!(C, UDA).length == 2);
7812 static assert(getSymbolsByUDA!(C, UDA)[0].stringof == "C");
7813 static assert(getSymbolsByUDA!(C, UDA)[1].stringof == "d");
7821 static assert(getSymbolsByUDA!(D,UDA).length == 0);
7831 static assert(getSymbolsByUDA!(HasPrivateMembers, Attr).length == 1);
7832 static assert(hasUDA!(getSymbolsByUDA!(HasPrivateMembers, Attr)[0], Attr));
7850 static assert(getSymbolsByUDA!(A, Attr).length == 2);
7851 static assert(hasUDA!(getSymbolsByUDA!(A, Attr)[0], Attr));
7852 static assert(hasUDA!(getSymbolsByUDA!(A, Attr)[1], Attr));
7865 static assert(res.length == 1);
7866 static assert(res[0].stringof == "a");
7887 static assert(allSameType!(int, int));
7888 static assert(allSameType!(int, int, int));
7889 static assert(allSameType!(float, float, float));
7890 static assert(!allSameType!(int, double));
7891 static assert(!allSameType!(int, float, double));
7892 static assert(!allSameType!(int, float, double, real));
7893 static assert(!allSameType!(short, int, float, double, real));
7905 static assert(allSatisfy!(ifTestable, AliasSeq!(bool, int, float, double, string)));
7907 static assert(!ifTestable!(bool, a => BoolWrapper(a)));
7931 static assert(isType!int);
7932 static assert(isType!string);
7933 static assert(isType!(int[int]));
7934 static assert(isType!S);
7935 static assert(isType!C);
7936 static assert(isType!I);
7937 static assert(isType!U);
7941 static assert(!isType!n);
7942 static assert(!isType!func);
7943 static assert(!isType!(S.Test));
7944 static assert(!isType!(S.Test!()));
7981 static assert(isFunction!func);
7987 static assert(isFunction!(S.func));
8017 static assert(!isFinal!(C));
8018 static assert( isFinal!(FC));
8020 static assert(!isFinal!(C.nf));
8021 static assert(!isFinal!(C.sf));
8022 static assert( isFinal!(C.ff));
8050 static assert( isCopyable!S1);
8051 static assert( isCopyable!S2);
8052 static assert(!isCopyable!S3);
8053 static assert(!isCopyable!S4);
8055 static assert(isCopyable!C1);
8056 static assert(isCopyable!int);
8057 static assert(isCopyable!(int[]));