On Sunday, 29 November 2015 at 23:53:41 UTC, Chris Wright wrote:

Duration is defined in core.time: https://dlang.org/phobos/ core_time.html#Duration

Unfortunately, ddoc doesn't automatically cross-reference these for you, which results in confusion. (As if it weren't confusing enough to have everything wrapped in templates with filters rather than simply using const(Duration).)

Yeah, there has to be a better way to document these functions. I guess I could have figured out that there is a Duration struct from this

opBinary(string op, D)(in D duration) if ((op == "+" || op == "-") && (is(Unqual!D == Duration) || is(Unqual!D == TickDuration)))

but (string op, D) -> (in D duration) -> is(Unqual!D == Duration) is something that would be rejected from Boost because it's too complicated for C++.

Reply via email to