c_plus_plus_algorithm

Table of Contents

C++ Algorithms library

https://en.cppreference.com/w/cpp/algorithm

The algorithms library defines functions for a variety of purposes (e.g. searching, sorting, counting, manipulating) that operate on ranges of elements. Note that a range is defined as

where

refers to the element past the last element to inspect or modify.

C++20 provides constrained versions of most algorithms in the namespace

. In these algorithms, a range can be specified as either an iterator-sentinel pair or as a single

argument, and projections and pointer-to-member callables are supported. Additionally, the return types of most algorithms have been changed to return all potentially useful information computed during the execution of the algorithm.

}}

and

) are allowed to make arbitrary copies of elements from ranges, as long as both

and

are

, where

is the type of elements.

(for parallel version of algorithms).

(for execution policies). }}

See also

c_plus_plus_algorithm.txt · Last modified: 2024/04/28 03:32 (external edit)