3 Terms and definitions [intro.defs]

For the purposes of this document, the terms and definitions given in ISO/IEC 14882:2014, ISO/IEC TS 19217:2015, and the following apply.

ISO and IEC maintain terminological databases for use in standardization at the following addresses:

3.1 constant subexpression [defns.const.subexpr]

expression whose evaluation as subexpression of a conditional-expression CE ( ISO/IEC 14882:2014 §[expr.cond]) would not prevent CE from being a core constant expression ( ISO/IEC 14882:2014 §[expr.const])

3.2 expression-equivalent [defns.expr.equiv]

relationship that exists between two expressions E1 and E2 such that

  • E1 and E2 have the same effects,

  • noexcept(E1) == noexcept(E2), and

  • E1 is a constant subexpression if and only if E2 is a constant subexpression

3.3 projection [defns.projection]

⟨function object argument⟩ transformation which an algorithm applies before inspecting the values of elements

Example:

std::pair<int, const char*> pairs[] = {{2, "foo"}, {1, "bar"}, {0, "baz"}};
ranges::sort(pairs, std::less<>{}, [](auto const& p) { return p.first; });

sorts the pairs in increasing order of their first members:

{{0, "baz"}, {1, "bar"}, {2, "foo"}}

 — end example ]