Skip to main content

7 docs tagged with "cpp20"

View all tags

Chrono Library (Time)

The chrono library provides type-safe time utilities for durations, time points, and clocks. It's designed to prevent common time-related bugs through strong typing.

Concepts and Requires Expressions (C++20)

Concepts are named requirements for template arguments that replace SFINAE and enable_if with readable constraints. Requires expressions are the building blocks that check if code compiles at compile-time.

Contracts (C++20)

Contracts are a programming paradigm that formally specifies the obligations and guarantees of code. They consist of preconditions (what callers must ensure), postconditions (what functions guarantee), and invariants (what must always be true).

Coroutines (C++20)

A coroutine is a function that can suspend itself, hand control back to its caller, and later

Differences Between C++ Standards

C++ evolves through standardized versions released approximately every three years. Each standard adds features, fixes issues, and modernizes the language while maintaining backward compatibility.

Modules (C++20)

Modules are C++20's replacement for the textual #include model. Instead of the preprocessor

Ranges Library

Ranges (C++20) is a modern library that provides composable, lazy-evaluated operations on sequences. It replaces traditional iterator pairs with range objects and introduces views for efficient data transformation pipelines.