From 68c412316b475aaabf81cbbd27244846f01a687f Mon Sep 17 00:00:00 2001 From: Paul Backus Date: Sat, 20 Jan 2024 10:22:42 -0500 Subject: [PATCH] Document element type parameter for isForwardRange --- std/range/primitives.d | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/std/range/primitives.d b/std/range/primitives.d index fec5c85cb..85b700e8c 100644 --- a/std/range/primitives.d +++ b/std/range/primitives.d @@ -1011,6 +1011,15 @@ have a `save` function. See_Also: The header of $(MREF std,range) for tutorials on ranges. + +Params: + R = type to be tested + E = if present, the elements of the range must be + $(DDSUBLINK spec/const3, implicit_qualifier_conversions, qualifier-convertible) + to this type + +Returns: + `true` if R is a forward range (possibly with element type `E`), `false` if not */ enum bool isForwardRange(R) = isInputRange!R && is(typeof((R r) { return r.save; } (R.init)) == R);