On Sunday, 25 April 2021 at 03:45:13 UTC, Jack wrote:
that's better, thanks

Imporant to remember that any compile time thing will be the static type. If someone does:

Base a = new Derived();
a.something();

it will still show up as Base in the this template. The knowledge that it is actually a Derived thing is not there at compile time.

(well ok it kind of is, like the compiler's optimizer can still piece it together by following the flow, but it is no longer known to any template after that assignment.)

Reply via email to