Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #685 from 9rnsr/fix_unqual
Browse files Browse the repository at this point in the history
Remove unused _Unqual from `object` module
  • Loading branch information
yebblies committed Dec 10, 2013
2 parents 2649883 + 3efbfd5 commit 8d49e9d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 39 deletions.
20 changes: 1 addition & 19 deletions src/core/time.d
Expand Up @@ -3254,25 +3254,7 @@ string numToString(long value) @safe pure nothrow
}


/+ A copy of std.traits.Unqual. +/
private template _Unqual(T)
{
version (none) // Error: recursive alias declaration @@@BUG1308@@@
{
static if (is(T U == const U)) alias _Unqual!U _Unqual;
else static if (is(T U == immutable U)) alias _Unqual!U _Unqual;
else static if (is(T U == shared U)) alias _Unqual!U _Unqual;
else alias T _Unqual;
}
else // workaround
{
static if (is(T U == shared(const U))) alias U _Unqual;
else static if (is(T U == const U )) alias U _Unqual;
else static if (is(T U == immutable U )) alias U _Unqual;
else static if (is(T U == shared U )) alias U _Unqual;
else alias T _Unqual;
}
}
private alias _Unqual(T) = typeof(cast()T.init);

unittest
{
Expand Down
10 changes: 0 additions & 10 deletions src/object.di
Expand Up @@ -375,16 +375,6 @@ extern (C)
void _aaRangePopFront(ref AARange r);
}

private template _Unqual(T)
{
static if (is(T U == shared(const U))) alias U _Unqual;
else static if (is(T U == const U )) alias U _Unqual;
else static if (is(T U == immutable U )) alias U _Unqual;
else static if (is(T U == inout U )) alias U _Unqual;
else static if (is(T U == shared U )) alias U _Unqual;
else alias T _Unqual;
}

struct AssociativeArray(Key, Value)
{
private:
Expand Down
10 changes: 0 additions & 10 deletions src/object_.d
Expand Up @@ -1944,16 +1944,6 @@ extern (C)
hash_t _aaGetHash(in void* aa, in TypeInfo tiRaw) nothrow;
}

private template _Unqual(T)
{
static if (is(T U == shared(const U))) alias U _Unqual;
else static if (is(T U == const U )) alias U _Unqual;
else static if (is(T U == immutable U )) alias U _Unqual;
else static if (is(T U == inout U )) alias U _Unqual;
else static if (is(T U == shared U )) alias U _Unqual;
else alias T _Unqual;
}

struct AssociativeArray(Key, Value)
{
private:
Expand Down

0 comments on commit 8d49e9d

Please sign in to comment.