On Tuesday, 23 March 2021 at 23:27:54 UTC, Paul Backus wrote:
On Tuesday, 23 March 2021 at 22:22:12 UTC, Q. Schroll wrote:
For a class object obj, one can use assert(obj) to get its
invariants checked. How to do this for structs?
https://dlang.org/spec/expression.html#assert_expressions
If th
On 3/23/21 4:14 PM, Imperatorn wrote:> On Tuesday, 23 March 2021 at
22:22:12 UTC, Q. Schroll wrote:
>> For a class object obj, one can use assert(obj) to get its invariants
>> checked. How to do this for structs?
>
> It's called after the constructor has run and before the destructor is
> called.
On Tuesday, 23 March 2021 at 22:22:12 UTC, Q. Schroll wrote:
For a class object obj, one can use assert(obj) to get its
invariants checked. How to do this for structs?
https://dlang.org/spec/expression.html#assert_expressions
If the first AssignExpression is a pointer to a struct instance
for
On Tuesday, 23 March 2021 at 22:22:12 UTC, Q. Schroll wrote:
For a class object obj, one can use assert(obj) to get its
invariants checked. How to do this for structs?
It's called after the constructor has run and before the
destructor is called.
It's called before entering a member function
For a class object obj, one can use assert(obj) to get its
invariants checked. How to do this for structs?