
Learn contemporary C++ with code examples, concise explanations, cheat sheets and infographics. #cpp #cplusplus #programming #learning #education
Germany
Joined March 2020
- Tweets785
- Following713
- Followers5.4K
- Likes16.4K
Replying to @SbastienLevy1 @ChShersh
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.
Replying to @thisPtr
For runnable examples see also: hackingcpp.com/cpp/std/algor…
Replying to @basit_ayantunde
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…
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
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
see also hackingcpp.com/cpp/std/algor…
I would interpret the relevant section of the standard to mean that the above behavior must be a bug.
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
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…
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
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…















