cpp_weekly icon indicating copy to clipboard operation
cpp_weekly copied to clipboard

Execute-around pointer and how does it work

Open kiradoski opened this issue 7 months ago • 0 comments

Channel

C++Weekly

Topics

  • What is the execute-around pointer idiom.
  • How/when/why should you use it.
  • How does it work under the hood (I'm genuinely curious about this one): -- Why a single use of operator ->() also calls it on the proxy object (effectively calling the operator twice) -- Which mechanism of the compiller allows that -- What else could be done with it

Length

Probably longer

kiradoski avatar Jun 01 '25 09:06 kiradoski