Added std.traits.Promoted to get the result of scalar type promotion in multi-term arithmetic expressions std.traits.Promoted gets the type to which a scalar type will be promoted in multi-term arithmetic expressions import std.traits : Promoted; static assert ( is ( typeof ( ubyte (3) * ubyte (5)) == Promoted! ubyte )); static assert ( is (Promoted! ubyte == int )); See the D specification on scalar type promotions for more information.

Added std.algorithm.searching.maxIndex to get the index of the maximum element of a range. std.algorithm.searching.maxIndex gets the index of the maximum element of a range, according to a specified predicate. The default predicate is "a > b". import std.algorithm.searching : maxIndex; int [] a = [5, 4, 2, 1, 9, 10]; assert (a.maxIndex == 5); int [] a; assert (a.maxIndex == -1);

Added std.meta.staticIsSorted to check if an AliasSeq is sorted according to some template predicate. std.meta.staticIsSorted checks whether an AliasSeq is sorted according to some template predicate. enum Comp(T1, T2) = T1.sizeof < T2.sizeof; import std.meta : staticIsSorted; static assert ( staticIsSorted!(Comp, byte , uint , double )); static assert (!staticIsSorted!(Comp, bool , long , dchar )); Additionally, the compile-time performance of std.meta.staticSort has been greatly improved. Nevertheless, due to compiler limitations it is still an extraordinarily expensive operation to perform on longer sequences; strive to minimize such use.

Added std.algorithm.searching.minIndex to get the index of the minimum element of a range. std.algorithm.searching.minIndex gets the index of the minimum element of a range, according to a specified predicate. The default predicate is "a < b". import std.algorithm.searching : minIndex; int [] a = [5, 4, 2, 1, 9, 10]; assert (a.minIndex == 3); int [] a; assert (a.minIndex == -1);

std.traits.hasFunctionAttributes has been added It exposes a user-friendly way to query for function attributes: import std.traits : hasFunctionAttributes; real func( real x) pure nothrow @safe { return x; } static assert (hasFunctionAttributes!(func, "@safe" , "pure" )); static assert (!hasFunctionAttributes!(func, "@trusted" )); bool myFunc(T)(T b) { return !b; } static assert (hasFunctionAttributes!(myFunc! bool , "@safe" , "pure" , "@nogc" , "nothrow" )); static assert (!hasFunctionAttributes!(myFunc! bool , "shared" ));