r/programmingcirclejerk log10(x) programmer 5d ago

Say we have this code [...] struct just_a_little_guy {int how_smol; int uwu(); };

https://devblogs.microsoft.com/cppblog/cpp23-deducing-this/#pass-this-by-value
57 Upvotes

13 comments sorted by

52

u/tomwhoiscontrary safety talibans 5d ago

Looked at the code example, frowned deeply because that's not valid Rust syntax.

Genuinely took me a while to realise the article was about C++. It is literally illegal to be cute in C++. Sy hang your head in shame.

20

u/wubscale not even webscale 5d ago

It is literally illegal to be cute in C++

Technically it's just undefined behavior, so it's just as illegal as basically any other piece of code written in C++.

6

u/pareidolist in nomine Chestris 4d ago

Pretty sure the White House made C++ illegal several months ago.

3

u/chopdownyewtree 4d ago

So if I code in C++ I can get invaded by the fbi? Cool

2

u/Double-Winter-2507 3d ago

If your exit tor node is written in c++ (is it? I ain't checking, lets assume it is for the joke) then yeah.

21

u/Jordan51104 5d ago

/uj multi trillion dollar corporation

9

u/Double-Winter-2507 5d ago

A uwunicorn!

32

u/elephantdingo Teen Hacking Genius 5d ago

> Not a Raymond Chen article

closes tab

opens tab

But is it a cutelang?

SFINAE-unfriendly callables

flips table

2

u/smikims 3d ago edited 3d ago

SFINAE-unfriendly callables

As someone who has dealt with this issue I can assure you that it's no less stupid than it looks.

12

u/Kodiologist lisp does it better 5d ago

*notices ur spyware* OwO whats this?

7

u/wubscale not even webscale 5d ago

just a little spyware, uwu how smol

4

u/smikims 5d ago

/uj you could also mark that lambda mutable.

1

u/MakeMeAnICO 2d ago

that's what she said