Tag: C++20
26 posts
-
C++ Aggregate Initialization | Braces for Structs and Arrays
Aggregates are structs and arrays that meet standard rules; braces initialize members directly. C++20 designated initializers, contrasts with default/va...
-
C++ Barrier & Latch | Complete Guide to std::barrier and latch Synchronization
Implement thread synchronization with C++20 std::barrier and std::latch. Complete guide to one-time countdown, repeated synchronization, and completion ...
-
C++ Branch Prediction | Complete Guide to likely/unlikely Optimization
C++ branch prediction: CPU pipeline, misprediction penalty, [[likely]]/[[unlikely]], branch elimination, sorting effects, and PGO with practical examples.
-
C++ Calendar & Timezone | year_month_day·zoned_time Complete Guide
C++20 calendar and timezone: year_month_day, zoned_time, weekday for date arithmetic, timezone conversion, and weekday calculation with practical examples.
-
Modern C++ (C++11~C++20) Core Syntax Cheatsheet | auto·Lambda·Smart Pointers·Concepts at a Glance
Modern C++ C++11~C++20 core syntax cheatsheet. auto, range-for, lambda, smart pointers, optional, variant, Concepts, Ranges copy-paste ready summary for...
-
C++ Concepts and Constraints | Type Requirements in C++20
C++20 concepts and constraints: requires clauses, standard concepts, custom concepts, and how they replace verbose SFINAE for clearer template errors.
-
C++ Constant Initialization | `constexpr`, `constinit`, and Static Order
Constant initialization in C++: compile-time fixed values, `constexpr` vs `constinit`, static initialization order, and how to avoid the static initiali...
-
C++20 consteval Complete Guide | Immediate Functions and Compile-Time-Only Evaluation
Master C++20 consteval: immediate functions that must execute at compile time, constexpr vs consteval differences, compile-time validation, string hashi...
-
C++ Coroutines | Asynchronous Programming in C++20
C++20 coroutines: coroutine_handle, promise_type, co_await, generators, Task patterns, and compiler support for async-style control flow.
-
C++ date parsing and formatting | chrono, std::format, and time zones
Format and parse calendar dates with C++20 chrono, std::format, parse, zoned_time, locale-aware weekday names, and common pitfalls for wire formats vs d...
-
C++ Designated Initializers (C++20) | `.field = value` for Aggregates
C++20 designated initializers let you name struct members in brace initialization. Declaration order required; differs from C flexibility. Aggregate-only; compare with list and copy initialization.
-
[2026] C++ Generic Lambdas — auto Parameters and Template Lambdas (C++20)
Generic lambdas in C++14: auto makes operator() a template, C++20 template lambdas, STL patterns, deduction rules, performance, and common pitfalls.
-
C++ jthread | 'Auto-Join Threads' Guide
C++ jthread — automatic join threads and stop_token. Describes the basics of jthread with practical examples. Start now.
-
C++ Range Adaptors | Pipeline Composition in C++20
C++20 range adaptors: filter, transform, pipe syntax, lazy views, custom adaptors, and lifetime—how they relate to std::views.
-
C++ Custom Ranges | Building Types That Satisfy the Range Concept [#25-3]
C++ custom ranges: satisfy std::ranges::range with begin/end, iterators, adaptors, sentinels, view_interface, pitfalls, and production patterns.
-
C++ constexpr Functions and Variables: Compute at Compile Time [#26-1]
Master C++ constexpr: compile-time constants, constexpr functions, literal types, C++14/20 rules, if constexpr, consteval, lookup tables, and common err...
-
C++ [[nodiscard]] Guide: Ignore Return Values Safely | Errors, RAII & Reasons [#41-2]
Complete guide to C++ [[nodiscard]]: stop ignored return values, error codes, RAII guards, and C++20 reason strings. Compiler checks, examples, and CI patterns.
-
C++ std::span | Contiguous Memory View (C++20)
std::span for arrays and vectors: non-owning view, subspan, bounds, const correctness, lifetime pitfalls, and C API interop.
-
C++ Template Lambdas | Explicit Template Parameters in C++20 Lambdas
C++20 template lambdas: `[]<typename T>(T a, T b)`, concepts constraints, parameter packs, and when they beat generic `auto` lambdas.
-
C++ Three-Way Comparison | The Spaceship Operator `<=>` (C++20)
C++20 `operator<=>`: `default` memberwise comparison, `strong_ordering`, `weak_ordering`, `partial_ordering`, rewriting `==`, and migration from legacy ...
-
C++ Views | Lazy Range Views in C++20
C++20 std::views: lazy evaluation, filter, transform, take, drop, and pipeline composition with ranges—when views evaluate and common pitfalls.
-
C++ Constant Initialization | 'Guide to Constant Initialization'
Everything about C++ Constant Initialization : from basic concepts to practical applications. Master key content quickly with examples.
-
C++20 Modules | Escaping “Include Hell” and Speeding Up Builds with import
C++20 modules: export/import, partitions, global fragments, GCC/Clang/MSVC, CMake 3.28+—parse once, reuse BMIs, faster builds than plain headers.
-
C++20 Coroutines | Escaping Callback Hell with co_await and co_yield
C++20 coroutines from the ground up: co_yield generators, co_await async flow, promise_type, coroutine_handle, lifetimes, pitfalls, and production patterns.
-
C++20 Concepts | Making Template Error Messages Readable
C++20 Concepts: clearer errors than SFINAE/enable_if—standard concepts, requires clauses, overloads, and practical C++20 examples.
-
What Is C++? History, Standards (C++11–23), Use Cases, and How to Start
C++ overview for beginners: evolution from C, C++11/17/20/23, game/systems/finance use cases, pros and cons, myths, learning roadmap, and production pat...