How to check that a member function is generated by compiler?

Andrey Zherikov andrey.zherikov at gmail.com
Fri Feb 25 04:44:29 UTC 2022


This code
```d
import std.sumtype: SumType;

struct A
{
     SumType!int b;
}

static foreach(sym; __traits(allMembers, A))
     pragma(msg,sym);
```
prints
```
b
opAssign
```

How can I check that `opAssign` is generated by compiler and 
doesn't exist in the original code?


More information about the Digitalmars-d-learn mailing list