cpp_weekly
cpp_weekly copied to clipboard
The official C++ Weekly Repository. Code samples and notes of future / past episodes will land here at various times. PR's will be accepted in some cases.
Idea inspired on https://www.youtube.com/watch?v=cWSh4ZxAr7E
* cover normal algorithm adapters (ie find_if) * cover basics of using `|` for composing of range views * show string split utility * show constexpr
When defining template, what's difference between typename and class? Is there any difference on instantiated class definition when using typename instead of class? What is best practice?
`std::any`, `std::function` and `std::string` each have optimizations that avoid heap allocations for the case of "small" objects. How do these optimizations work?
This is a c++ weekly episode request. I recently had an argument with a colleague about marking explicit or not a constructor taking multiple parameters (of different types). I've read...
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rcoro-capture
Books to reference: * [Head First Design Patterns](https://amzn.to/3CQHKmS) (Java) * [Design Patterns](https://amzn.to/3QeoJhd) (Classic Gang-of-Four / Pre-ISO C++) * [Hands on Design Patterns with C++](https://amzn.to/3emBqcD) * [Design Patterns in Modern C++20](https://amzn.to/3RgBJ7n)...