r/cpp • Meeting C++ | C++ Evangelist • May 21 '26

Exploring ref qualifiers in C++

https://meetingcpp.com/blog/items/Exploring-ref-qualifiers-in-Cpp.html
41 Upvotes

8 comments sorted by

View all comments

Show parent comment

1

u/BeigeAlert1 May 23 '26

I think its silly that "this" is a pointer at all instead of a reference.

2

u/fdwr fdwr@github 🔍 May 24 '26

Yeah, alas historical artifact. "Why is "this" not a reference? Because "this" was introduced into C++ (really into C with Classes) before references were added." -Bjarne