CppCon 2021 has ended
Back To Schedule
Thursday, October 28 • 12:30pm - 1:30pm
"Deducing this" Patterns

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.
Delayed broadcast

How would our code change if a member function could deduce the type and value category of the object ("this") it worked on?

Potentially a lot, and this talk will highlight some of those changes. Because with C++23, member functions will be able to do just that using a feature described in P0847, "Deducing this". Many patterns in C++ today could change, and new patterns will arise. This talk will explore those patterns, explain how "deducing this" works, and show how it solves the problems that originally motivated the paper.

Some sample effects on our code: CRTP is simplified; decorators become much easier and terser; recursive lambda expressions become straightforward. There are also implications for safely and efficiently moving values through computations.

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

avatar for Ben Deane

Ben Deane

Ben has been programming in C++ for this whole millennium. He spent just over 20 years in the games industry working for companies like EA and Blizzard; many of the games he worked on used to be fondly remembered but now he’s accepted that they are probably mostly forgotten. After... Read More →

Thursday October 28, 2021 12:30pm - 1:30pm MDT
Online B
  • C++20/Future of C++, Online