Skip to content

Commit

Permalink
Merge pull request #3323 from burner/algo_comp_alias_update
Browse files Browse the repository at this point in the history
std.algo_comp: updates alias syntax inside
  • Loading branch information
yebblies committed May 29, 2015
2 parents 2b91b16 + c49a81e commit 0fa8606
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions std/algorithm/comparison.d
Expand Up @@ -1225,17 +1225,17 @@ MaxType!T max(T...)(T args)
{
//Get "a"
static if (T.length <= 2)
alias args[0] a;
alias a = args[0];
else
auto a = max(args[0 .. ($+1)/2]);
alias typeof(a) T0;
alias T0 = typeof(a);

//Get "b"
static if (T.length <= 3)
alias args[$-1] b;
alias b = args[$-1];
else
auto b = max(args[($+1)/2 .. $]);
alias typeof(b) T1;
alias T1 = typeof(b);

import std.algorithm.internal : algoFormat;
static assert (is(typeof(a < b)),
Expand Down Expand Up @@ -1333,17 +1333,17 @@ MinType!T min(T...)(T args)
{
//Get "a"
static if (T.length <= 2)
alias args[0] a;
alias a = args[0];
else
auto a = min(args[0 .. ($+1)/2]);
alias typeof(a) T0;
alias T0 = typeof(a);

//Get "b"
static if (T.length <= 3)
alias args[$-1] b;
alias b = args[$-1];
else
auto b = min(args[($+1)/2 .. $]);
alias typeof(b) T1;
alias T1 = typeof(b);

import std.algorithm.internal : algoFormat;
static assert (is(typeof(a < b)),
Expand Down

0 comments on commit 0fa8606

Please sign in to comment.