Šimon Tóth’s Post

View profile for Šimon Tóth

C++ Educational Content Creator | 20 years of Software Engineering experience distilled into digestible daily posts

C++23 explicit object parameter (a.k.a. deducing this) introduces the ability to name the previously implicit "this" argument explicitly. This allows for different spellings of method variants (lvalue, const lvalue, rvalue). Combined with type deduction, it finally allows spelling all three variants as one generic method (significantly reducing code duplication). Compiler Explorer link: https://lnkd.in/einiTRQw #cpp #cplusplus #coding #programming #dailybiteofcpp

  • text
Akshay Chavan

Doble Engineering1K followers

2y

Which IDE are your screenshots from?

Like
Reply

Such a great smal feature with huge impact, love it :) but so far only available for msvc right? Though clang 18 wanted to introduce it as well afaik...

Like
Reply
Vukasin Strbac, PhD

Siemens Digital Industries…1K followers

2y

These regular little nuggets are golden. It's very easy in C++ to simply not be aware that there's a prepackaged solution to some problem you're encountering. For example: std::address_of, or std::forward_like. C++ is loaded with these. These posts help, if nothing else, to trigger a lightbulb of 'I think I've seen this somewhere' and off you go to find and use it, instead of trying to solve the thing yourself. In this case, it would be writing 3 or 6 functions (that the compiler can comfortably do for you). Thanks for the posts, love it!

Sarvex Jatasra

Ethara AI20K followers

2y

#lol using #puts a C library function and calling it #C++23 😀 😁 😂 🤣 I won't even call it #C++99 #WTF happened to #print function in C++ 23?

Like
Reply
Tim Pavlov

WE AS WEB459 followers

2y

Looks like soon we may have duck typing concept in C++

Like
Reply
Sonia K.

Principal Systems Architect &…5K followers

2y

I love (this auto&& self) 👌

See more comments

To view or add a comment, sign in

Explore content categories