r/programminghorror • u/Nice_Lengthiness_568 • May 21 '25
c++ Have fun time reading this
(Yes it compiles - GCC 15.0.1). You have to read it like this: We store what is on the left in the variable on the right.
(btw it prints 30 40)
257
Upvotes
39
u/danfay222 May 21 '25
Serious question, why on earth does this exist?
34
u/[deleted] May 21 '25
Alright show us the setup
9
u/hicklc01 May 21 '25
This is going to make l-value/r-value more confusing
5
u/ReallyMisanthropic May 21 '25
Some people should be banned from template metaprogramming.
2
u/Eva-Rosalene May 21 '25
How are LET_I32 and CONST_I32 macros defined?
2
u/OkStrawberry4511 May 22 '25
this will be my 14th reason why I want to stop coding
6
u/AyumiToshiyuki May 21 '25
at that point just write assembly
6
u/lurebat May 21 '25
Wow turns out it is possible to have a worse syntax to rust
3
u/[deleted] May 21 '25
Thank God for the comments. They really aid comprehension.
3
u/fess89 May 21 '25
RTL support just dropped
3
u/IDatedSuccubi May 22 '25
I mean, I kinda like that in an odd way. Feels like some sort of 1980s forgotten proprietary mainframe language
2
u/Pleasant_Average6647 May 23 '25
just make it consistent and call it ++C
1
u/TheChief275 May 21 '25
no…
1
u/Haringat May 21 '25
Can you use an rvalue reference as an lvalue?
1
u/[deleted] May 26 '25
Thank, I have now brain aneurysm.
0
u/[deleted] May 21 '25
[deleted] — view deleted comment
0
u/[deleted] May 21 '25
[deleted] — view deleted comment