Little-Known C++ Feature
Little-known C++ feature: a special kind of functions that uses {{ and }} lets you reuse the parameter names 👀 template<typename T> void foo(T&& lhs, T&& rhs) {{ auto lhs = std::to_string(lhs); auto rhs = std::to_string(rhs); /* ... */ }}
A dark-mode social media post jokingly presents invalid-looking C++ code as a “little-known feature” that supposedly allows function parameters to be redeclared inside double curly braces. The punchline is the absurd claim that the language has exactly the feature programmers want, but in a cursed and unusable form. EN: A dark-mode social media post jokingly presents invalid-looking C++ code as a “little-known feature” that supposedly allows function parameters to be redeclared inside double curly braces. The punchline is the absurd claim that the language has exactly the feature programmers want, but in a cursed and unusable form.
- @ithueti / 4701 2021-09-13
- Type
- image
- Size
- 785×800 · 84.6 KiB
- Mood
- саркастичный, абсурдный
- Language
- en
- Added