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.
* https://en.cppreference.com/w/cpp/types/is_implicit_lifetime * https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p0593r6.html
**Channel** "C++Weekly" request. **Topics** 1. Floating point precision 2. `std::numeric_limits::digits`, `std::numeric_limits::digits10`, `std::numeric_limits::max_digits10` differences. 3. `std::numeric_limits::min`, `std::numeric_limits::lowest` differences. 4. `std::numeric_limits::min_exponent`, `std::numeric_limits::min_exponent10`, `std::numeric_limits::max_exponent`, `std::numeric_limits::max_exponent10` differences if time permits. **Length** Long form if...
The rule: if the type is not trivially destructible and is not default constructible, it should not be moveable. Examples: handle types, mostly.
https://compiler-explorer.com/z/csn88b6G9
* https://compiler-explorer.com * https://wg21.cmeerw.net/cppdraft/search * https://consteval.ca/ics/ * https://eel.is/c++draft/ * https://github.com/timsong-cpp/cppwp * https://search.cpp-lang.org/# * https://wg21.link/ * https://cppinsights.io/ * https://github.com/lefticus/cppstdmd/ * https://cppevo.dev/
Also watch these videos by Jorgen. https://www.youtube.com/watch?v=kkAsakZCCAY ```cpp void func(bool a, bool b) { int *ptr = nullptr; if (a) { ptr = new int(42); } if (b) { delete...
* what if I want to use parallel algorithms? * what if I want to use pmr? * start_lifetime_as? * what if I want to use function_ref?
Just as the title says. If it's an assert on a nullptr, that should be a reference!
This is a mocked-up fix to cpp-insight's version of what a lambda is. We need to talk about members for lambdas and how they are initialized. ```cpp auto make_lambda() {...
**Channel** C++Weekly **Topics** A new memory safe LLVM fork of C and C++ exists, called [Fil-C](https://github.com/pizlonator/fil-c). An episode dedicated to showing ways that it can find bugs that other tools...