Permalink
Browse files

DMD issue 7898 fixed; Added version specifier to include fix for DMD …

…2.059 only
  • Loading branch information...
1 parent 590b14c commit 731d036a1b25a6fbeefb3108f2cd33db69c61487 unknown committed Jun 3, 2012
Showing with 4 additions and 1 deletion.
  1. +1 −1 README.md
  2. +1 −0 mergesort.d
  3. +1 −0 stablesort.d
  4. +1 −0 timsort.d
View
2 README.md
@@ -199,7 +199,7 @@ I've always favored shell sort for it's acceptable worst case performance, O(1)
**Implementation**
-A standard shell sort implementation. It begins with the gap sequence, `[1, 4, 10, 23, 57, 132, 301, 701, 1750]`, and uses the formula, `(9 ^ k - 4 ^ k) / (5 * 4 ^ (k - 1))`, to generate larger gaps.
+A standard shell sort implementation. It uses the gap sequence, `[1147718699, 510097199, 226709865, 100759939, 44782195, 19903197, 8845865, 3931495, 1747330, 776590, 345151, 153400, 68177, 30300, 13466, 5984, 2659, 1750, 701, 301, 132, 57, 23, 10, 4, 1]`. Gaps greater than 1750 were derived from the formula, `(9 ^ k - 4 ^ k) / (5 * 4 ^ (k - 1))`.
----------
View
1 mergesort.d
@@ -205,6 +205,7 @@ template MergeSortImpl(alias pred, bool half, R)
}
//@ Workaround for DMD issue 7898
+ static if(__VERSION__ == 2059)
void copy(R1, R2)(R1 src, R2 dst)
{
import std.traits;
View
1 stablesort.d
@@ -384,6 +384,7 @@ template StableSortImpl(alias pred, bool inPlace = false, R)
}
//@ Workaround for DMD issue 7898
+ static if(__VERSION__ == 2059)
void copy(R1, R2)(R1 src, R2 dst)
{
import std.traits;
View
1 timsort.d
@@ -515,6 +515,7 @@ template TimSortImpl(alias pred, R)
alias gallopSearch!(true, true) gallopReverseUpper;
//@ Workaround for DMD issue 7898
+ static if(__VERSION__ == 2059)
void copy(R1, R2)(R1 src, R2 dst)
{
import std.traits;

0 comments on commit 731d036

Please sign in to comment.