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

2022-02-25 Thread Paul Backus via Digitalmars-d-learn
On Friday, 25 February 2022 at 19:06:25 UTC, Ali Çehreli wrote: On 2/25/22 08:24, Paul Backus wrote: > I've seen `.stringof` give inconsistent results. (E.g., > https://issues.dlang.org/show_bug.cgi?id=18269) That must be a part of the reasons why Adam D Ruppe repeats that .stringof should

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

2022-02-25 Thread Ali Çehreli via Digitalmars-d-learn
On 2/25/22 08:24, Paul Backus wrote: > I've seen `.stringof` give inconsistent results. (E.g., > https://issues.dlang.org/show_bug.cgi?id=18269) That must be a part of the reasons why Adam D Ruppe repeats that .stringof should not be used for such programmatic purposes e.g. if I remember

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

2022-02-25 Thread Andrey Zherikov via Digitalmars-d-learn
On Friday, 25 February 2022 at 16:24:46 UTC, Paul Backus wrote: On Friday, 25 February 2022 at 14:25:22 UTC, Andrey Zherikov wrote: Another interesting observation - is there any explanation why `typeof` returns different results for generated `opAssign`? [...] If I move `foreach` loop

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

2022-02-25 Thread Paul Backus via Digitalmars-d-learn
On Friday, 25 February 2022 at 14:25:22 UTC, Andrey Zherikov wrote: Another interesting observation - is there any explanation why `typeof` returns different results for generated `opAssign`? [...] If I move `foreach` loop into a function (e.g. `main`) then the first pragma prints the same

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

2022-02-25 Thread Andrey Zherikov via Digitalmars-d-learn
On Friday, 25 February 2022 at 05:25:14 UTC, Ali Çehreli wrote: On 2/24/22 20:44, Andrey Zherikov wrote: How can I check that `opAssign` is generated by compiler and doesn't exist in the original code? I think this one: https://dlang.org/phobos/std_traits.html#hasElaborateAssign Ali

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

2022-02-24 Thread Ali Çehreli via Digitalmars-d-learn
On 2/24/22 20:44, Andrey Zherikov wrote: How can I check that `opAssign` is generated by compiler and doesn't exist in the original code? I think this one: https://dlang.org/phobos/std_traits.html#hasElaborateAssign Ali