diff options
| author | Eugen Wissner <belka@caraus.de> | 2017-09-12 06:07:16 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2017-09-12 06:07:16 +0200 |
| commit | edc32960832425e0a96da5bdf72872fa2f9f7628 (patch) | |
| tree | 751ae5d94cd74fee7b59557cd2b36269cbda5ce7 /source | |
| parent | e8143bd0cc574f78cf80056c1316d44fb1f566b7 (diff) | |
| download | tanya-edc32960832425e0a96da5bdf72872fa2f9f7628.tar.gz | |
Drop support for dmd 2.073.2, remove deprecations
Diffstat (limited to 'source')
| -rw-r--r-- | source/tanya/meta/metafunction.d | 3 | ||||
| -rw-r--r-- | source/tanya/meta/trait.d | 55 |
2 files changed, 19 insertions, 39 deletions
diff --git a/source/tanya/meta/metafunction.d b/source/tanya/meta/metafunction.d index 0b7e4e0..a0a62ac 100644 --- a/source/tanya/meta/metafunction.d +++ b/source/tanya/meta/metafunction.d @@ -1094,9 +1094,6 @@ if (isTemplate!cmp) } } -deprecated("Use tanya.meta.metafunction.isSorted instead") -alias staticIsSorted = isSorted; - /// pure nothrow @safe @nogc unittest { diff --git a/source/tanya/meta/trait.d b/source/tanya/meta/trait.d index d428ddd..d9cd781 100644 --- a/source/tanya/meta/trait.d +++ b/source/tanya/meta/trait.d @@ -965,41 +965,6 @@ pure nothrow @safe @nogc unittest } /** - * Determines whether $(D_PARAM T) is some type. - * - * Params: - * T = A symbol. - * - * Returns: $(D_KEYWORD true) if $(D_PARAM T) is a type, - * $(D_KEYWORD false) otherwise. - */ -deprecated("Use isTypeTuple instead") -enum bool isType(alias T) = is(T); - -/// Ditto. -deprecated("Use isTypeTuple instead") -enum bool isType(T) = true; - -/// -pure nothrow @safe @nogc unittest -{ - class C; - enum E : bool; - union U; - struct T(); - - static assert(isType!C); - static assert(isType!E); - static assert(isType!U); - static assert(isType!void); - static assert(isType!int); - static assert(!isType!T); - static assert(isType!(T!())); - static assert(!isType!5); - static assert(!isType!(tanya.meta.trait)); -} - -/** * Determines whether $(D_PARAM T) is a narrow string, i.e. consists of * $(D_KEYWORD char) or $(D_KEYWORD wchar). * @@ -1282,6 +1247,9 @@ pure nothrow @safe @nogc unittest static assert(!isAbstractClass!E); } +private enum bool isType(alias T) = is(T); +private enum bool isType(T) = true; + /** * Determines whether $(D_PARAM Args) contains only types. * @@ -1300,6 +1268,21 @@ pure nothrow @safe @nogc unittest static assert(isTypeTuple!()); static assert(!isTypeTuple!(int, 8, Object)); static assert(!isTypeTuple!(5, 8, 2)); + + class C; + enum E : bool; + union U; + struct T(); + + static assert(isTypeTuple!C); + static assert(isTypeTuple!E); + static assert(isTypeTuple!U); + static assert(isTypeTuple!void); + static assert(isTypeTuple!int); + static assert(!isTypeTuple!T); + static assert(isTypeTuple!(T!())); + static assert(!isTypeTuple!5); + static assert(!isTypeTuple!(tanya.meta.trait)); } /** @@ -2982,7 +2965,7 @@ template getUDAs(alias symbol, alias attr) { alias FindUDA = AliasSeq!(); } - else static if ((isType!attr && is(TypeOf!(T[0]) == attr)) + else static if ((isTypeTuple!attr && is(TypeOf!(T[0]) == attr)) || (is(typeof(T[0] == attr)) && (T[0] == attr)) || isInstanceOf!(attr, TypeOf!(T[0]))) { |
