Learn contemporary C++ with code examples, concise explanations, cheat sheets and infographics. #cpp #cplusplus #programming #learning #education

Germany
Joined March 2020
Unfortunately. If the rank is less than the rank of int, there’s a promotion to either int or unsigned int. It’s a real mess.
1
23
Replying to @vzverovich
Yo mama is so big they call her “local_params”
6
403
Replying to @thisPtr
For runnable examples see also: hackingcpp.com/cpp/std/algor…
10
772
Replying to @basit_ayantunde
Made that a while back: #cpp20 #cpp23 std::string interface novelties
1
5
1,131
Replying to @fenbf
I’ll definitely plan to use range views more often, but for now C++23 is (unfortunately?) not an option. For those who are interested, I made an overview of all range views with runnable examples: hackingcpp.com/cpp/std/range…
1
2
9
1,028
New cheat sheet and overview article of the “range views” in the C++20 and C++23 standard library. Article: hackingcpp.com/cpp/std/range… More cheat sheets: hackingcpp.com/cpp/cheat_she… #cpp #cplusplus #cpp20 #cpp23 #programming #coding #CheatSheet
2
39
2
205
22,073
Replying to @EricLengyel
They might also appreciate this cheat sheet that I made a while ago.
3
33
1,507
Algorithms for finding a single element in a range using C++20 and C++23. For an overview with runnable examples, see hackingcpp.com/cpp/std/algor…. For more cheat sheets see hackingcpp.com/cpp/cheat_she…. #cpp #cpp20 #cpp23 #cplusplus #algorithms #CheatSheet
28
96
1
same behavior if the first parameter is a string literal (const char*):
1
I would interpret the relevant section of the standard to mean that the above behavior must be a bug.
2
Can someone tell me if this highly intuitive behavior is intentional or a quirk of libstdc++'s ranges implementation? Why on earth would you treat a const char* differently from a string_view here? #cpp #cplusplus #cpp20 godbolt.org/z/Kn6ooPzTz
3
2
25
Four new std::string member functions introduced with C++20 and C++23. #cpp #cplusplus #programming #cheatsheet Check out more C++ cheat sheets at: hackingcpp.com/cpp/cheat_she…
5
17
118
I just found out that newer builds of Vim 8.2 as well as the brand-new Vim 9 has a field called 'leadmultispace' for option 'listchars'. vimhelp.org/options.txt.html… See the image below for a quickly thrown-together demo of the effect of the various listchars fields. #VIM #Editor
1
12
Replying to @italiancpp
Readers might also find the overview graphic below useful. This overview article contains some runnable examples of the heap algorithms: hackingcpp.com/cpp/std/algor… And this page has graphic visualizations for all standard algorithms: hackingcpp.com/cpp/std/algor…
1
8