strange behavior of by-value function arguments in postcondition
Mike Parker
aldacron at gmail.com
Tue Aug 31 11:40:42 UTC 2021
On Tuesday, 31 August 2021 at 10:43:41 UTC, Andrzej K. wrote:
> I would intuitively assume that the contract of such a function
> is: "I will not modify your objects, and I will select a number
> from the range that your objects indicate."
For the first half of that assumption to be valid, you would need
this function signature:
```d
int select(const int lo, const int hi) {}
```
More information about the Digitalmars-d
mailing list