Yes, exactly. Some people even use static if it is not needed because it is
harmless. And remove it only when enclosing context is demand.
Dne 9. 12. 2015 22:40 napsal uživatel "Jon D via Digitalmars-d-learn" <
digitalmars-d-learn@puremagic.com>:
> On Wednesday, 9 December 2015 at 21:23:03 UTC,
On Wednesday, 9 December 2015 at 21:23:03 UTC, Daniel Kozák wrote:
V Wed, 09 Dec 2015 21:10:43 +
Jon D via Digitalmars-d-learn
napsáno:
There is a fair bit of range related code in the standard
library structured like:
auto MyRange(Range)(Range
There is a fair bit of range related code in the standard library
structured like:
auto MyRange(Range)(Range r)
if (isInputRange!Range)
{
static struct Result
{
private Range source;
// define empty, front, popFront, etc
}
V Wed, 09 Dec 2015 21:10:43 +
Jon D via Digitalmars-d-learn
napsáno:
> There is a fair bit of range related code in the standard library
> structured like:
>
> auto MyRange(Range)(Range r)
> if (isInputRange!Range)
> {
>