Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/named req/ContiguousContainer"

From cppreference.com
< cpp‎ | named req
m (+inplace_vector.)
 
(12 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{cpp/concept/title|ContiguousContainer}}
+
{{cpp/named req/title|ContiguousContainer|notes={{mark since c++17}}}}
{{cpp/concept/navbar}}
+
{{cpp/named req/navbar}}
  
A {{ttb|ContiguousContainer}} is a {{concept|Container}} that stores objects in contiguous memory locations.
+
A {{named req|ContiguousContainer}} is a {{named req|Container}} that stores objects in contiguous memory locations.
  
 
===Requirements===
 
===Requirements===
 +
The type {{tt|X}} satisfies {{named req/core|ContiguousContainer}} if
 +
* The type {{tt|X}} satisfies {{named req|Container}}
 +
* The type {{tt|X}} supports {{named req|RandomAccessIterator}}s
 +
* The member types {{c|X::iterator}} and {{c|X::const_iterator}} are {{rev inl|until=c++20|{{named req|ContiguousIterator}}s}}{{rev inl|since=c++20|{{lconcept|contiguous_iterator}}s}}
  
The type {{tt|X}} satisfies {{tt|ContiguousContainer}} if
+
===Contiguous containers in the standard library===
 
+
* The type {{tt|X}} satisfies {{concept|Container}}
+
* The type {{tt|X}} supports {{concept|RandomAccessIterator}}s
+
* The member types {{c|X::iterator}} and {{c|X::const_iterator}} are {{concept|ContiguousIterator}}s
+
 
+
===ContiguousContainers in the standard library===
+
 
{{dsc begin}}
 
{{dsc begin}}
{{dsc inc | cpp/string/dsc basic_string}}
+
{{dsc inc|cpp/string/dsc basic_string}}
{{dsc inc | cpp/container/dsc array}}
+
{{dsc inc|cpp/container/dsc vector}}
{{dsc inc | cpp/numeric/dsc valarray}}
+
{{dsc inc|cpp/container/dsc array}}
{{dsc inc | cpp/container/dsc vector}}
+
{{dsc inc|cpp/container/dsc inplace_vector}}
 
{{dsc end}}
 
{{dsc end}}
 +
 +
{{langlinks|de|es|fr|it|ja|pl|pt|ru|zh}}

Latest revision as of 03:19, 5 September 2024

 
 
C++ named requirements
 

A ContiguousContainer is a Container that stores objects in contiguous memory locations.

[edit] Requirements

The type X satisfies ContiguousContainer if

[edit] Contiguous containers in the standard library

stores and manipulates sequences of characters
(class template) [edit]
dynamic contiguous array
(class template) [edit]
(C++11)
fixed-sized inplace contiguous array
(class template) [edit]
dynamically-resizable, fixed capacity, inplace contiguous array
(class template) [edit]