isSortedRange_alt

True if R is a SortedRange

SeeAlso: std.range.SortedRange

template isSortedRange_alt (
R
) {
enum isSortedRange;
}

Examples

import std.algorithm : sort;
import std.range : assumeSorted;
static assert(isSortedRange!(typeof([0, 1, 2])) == false);
static assert(isSortedRange!(typeof([0, 1, 2].sort)) == true);
static assert(isSortedRange!(typeof([0, 1, 2].assumeSorted)) == true);
static assert(isSortedRange!int == false);

Meta