4 General principles [intro]

4.2 Namespaces, headers, and modifications to standard classes [intro.namespaces]

Since the extensions described in this document are experimental and not part of the C++ standard library, they should not be declared directly within namespace std. Unless otherwise specified, all components described in this document either:

  • modify an existing interface in the C++ Standard Library in-place,

  • are declared in namespace std::experimental::ranges::v1.

The International Standard, ISO/IEC 14882, together with ISO/IEC TS 19217:2015 (the Concepts TS), provide important context and specification for this document. In places, this document suggests changes to be made to components in namespace std in-place. In other places, entire chapters and sections are copied from ISO/IEC 14882 and modified so as to define similar but different components in namespace std::experimental::ranges::v1.

Instructions to modify or add paragraphs are written as explicit instructions. Modifications made to existing text from the International Standard use underlining to represent added text and strikethrough to represent deleted text.

This document assumes that the contents of the std::experimental::ranges::v1 namespace will become a new constrained version of the C++ Standard Library that will be delivered alongside the existing unconstrained version.

Unless otherwise specified, references to other entities described in this document are assumed to be qualified with std::experimental::ranges::, and references to entities described in the International Standard are assumed to be qualified with std::.

New header names are prefixed with experimental/ranges/. Where the final element of a new header name is the same as an existing standard header name (e.g., <experimental/ranges/algorithm>), the new header shall include the standard header as if by

#include <algorithm>