Tag

C++20

1 views collected around this technical thread.

IT Services Circle
IT Services Circle
Mar 11, 2025 · Fundamentals

Ten Modern C++ Features to Boost Readability, Maintainability, and Performance

This article introduces ten widely used modern C++ features—including range‑based for loops with initializers, structured bindings, inline variables, std::optional, std::variant, std::visit, constexpr if, default/delete functions, [[nodiscard]] and std::string_view—explaining their benefits and providing concise code examples.

CC++17C++20
0 likes · 14 min read
Ten Modern C++ Features to Boost Readability, Maintainability, and Performance
Deepin Linux
Deepin Linux
Jan 8, 2025 · Fundamentals

Deep Dive into C++20 Coroutines: Principles, Components, and Practical Applications

This article explains the fundamentals of C++20 coroutines, describing their lightweight asynchronous execution model, key language constructs such as co_await, co_yield, and co_return, the underlying components like promise objects and coroutine handles, and demonstrates real‑world usage through comprehensive code examples for networking, file I/O, generators, and task scheduling.

Asynchronous ProgrammingC++20Example
0 likes · 32 min read
Deep Dive into C++20 Coroutines: Principles, Components, and Practical Applications
Deepin Linux
Deepin Linux
Nov 8, 2023 · Fundamentals

Overview of C++20 New Features and Frequently Tested Topics

This article provides a comprehensive overview of C++20's major new features—including concepts, modules, coroutines, ranges, three‑way comparison, constexpr enhancements, and the updated standard library—along with practical code examples, explanations of their significance, and frequently examined interview topics.

C++20ModulesTemplates
0 likes · 35 min read
Overview of C++20 New Features and Frequently Tested Topics
Tencent Cloud Developer
Tencent Cloud Developer
Sep 28, 2022 · Fundamentals

Understanding C++20 Coroutines: Promise, Await, and Practical Examples

C++20 coroutines turn functions containing co_await, co_yield, or co_return into suspendable tasks, requiring a promise_type that defines get_return_object, initial_suspend, final_suspend, yield_value, return handling, and exception management, while handles manage resumption, and custom awaiters enable asynchronous I/O such as non‑blocking TCP connections.

AsyncC++20Promise
0 likes · 13 min read
Understanding C++20 Coroutines: Promise, Await, and Practical Examples
Tencent Cloud Developer
Tencent Cloud Developer
Aug 23, 2022 · Backend Development

Understanding Asio Coroutine Implementation in C++20

The article explains how Asio implements C++20 coroutine support by converting callback‑based async operations into awaitables with use_awaitable, launching them via co_spawn and co_spawn_entry_point, handling result propagation and thread dispatch, and providing parallel composition operators (&&, ||) for concurrent awaiting.

AsyncCC++20
0 likes · 26 min read
Understanding Asio Coroutine Implementation in C++20
Tencent Cloud Developer
Tencent Cloud Developer
Jun 16, 2022 · Game Development

C++20 Coroutines and Execution: Building an Asynchronous Game Server Framework

The article explains how C++20 coroutines and the emerging execution framework are used to redesign a single‑threaded game‑server architecture, detailing custom async wrappers, integration with asio and libunifex, job‑type scheduling, example coroutine code, current limitations, and a roadmap toward a simpler, sender/receiver‑based async library.

AsynchronousC++20Game development
0 likes · 19 min read
C++20 Coroutines and Execution: Building an Asynchronous Game Server Framework
Tencent Cloud Developer
Tencent Cloud Developer
Sep 23, 2021 · Game Development

Understanding C++20 Coroutines and Their Application in a Game Scheduler

The article walks through C++20 coroutines—from basic suspension mechanics and the roles of coroutine_handle, promise_type, and awaitable methods—to constructing a lightweight game scheduler that manages task lifetimes, await modes, and RPC integration, and demonstrates how this approach mirrors Python’s yield‑based skill system while offering clearer, high‑performance native code.

AsynchronousC++20Game development
0 likes · 29 min read
Understanding C++20 Coroutines and Their Application in a Game Scheduler