Whats the proper way to write a Range next function
Dennis
dkorpel at gmail.com
Wed Jun 15 14:20:27 UTC 2022
On Wednesday, 15 June 2022 at 13:52:24 UTC, Christian Köstlin
wrote:
> looks like there should be tons of annotations/attributes on it.
Because you have a template function, most attributes will be
inferred based on the Range type. `const` is not inferred, but
`popFront` mutates so it doesn't apply in your case. `@property`
is not inferred either, but the spec says "Using property
functions is not recommended until the definition is more certain
and implementation more mature."
More information about the Digitalmars-d-learn
mailing list