« first day (2764 days earlier)      last day (313 days later) » 

00:53
@KaruF Looks like it's explicitly calling out the this pointer that's passed to non-static member functions.
 
7 hours later…
07:37
@KaruF you can take a look at what a "calling convention" is and how the function members get called on your platform (or pretty much any platform I guess)
 
3 hours later…
10:08
I guess even without looking into calling conventions, looking at "deducing this" from C++23 also makes it explicit
I guess "Explicit object member functions" is the more clear name now
 
5 hours later…
15:06
Base::Base(...arbitrary params...)
: __vptr(&Base::__vtable[0]) ← supplied by the compiler, hidden from the programmer
{

}
__vptr(&Base::__vtable[0]) , it seem that line always assign vtable of base to vptr. How could it assign derived tables to vptr?
 
3 hours later…
17:40
That's just the start of the vtable from context. It will overwrite entries in derived classes or extend it, but the start will be the same as that base.

If you want to see a different value there try doing unnecessarily complicated stuff like multiple inheritance from multiple classes, each with their own vtables
@PeterT ı think vptr must point vtable of derived class when the function should be called from derived. How is this line accomplished that?
 
2 hours later…
19:26
okey ı got it. All class will set vptr to its vtable. Thats sensible for me. Source : isocpp.org/wiki/faq/…

« first day (2764 days earlier)      last day (313 days later) »