Thank you!
On Wednesday, 20 August 2014 at 07:18:12 UTC, Kagamin wrote:
http://dlang.org/phobos/std_traits.html#TemplateOf
Or isInstanceOf.
static if (__traits(isSame, TemplateOf!R, SortedRange))
static if (isInstanceOf!(SortedRange, R))
http://dlang.org/phobos/std_traits.html#TemplateOf
I need to ensure that range passed to function is SortedRange to use
binary search. I did something like:
static if(!__traits(compiles,
{
ElementType!(typeof(data)) element;
auto d = data.trisect(element);
}
)) assert(0, "DataRange shall be