Difference between revisions of "cpp/named req/ContiguousContainer"
From cppreference.com
m (Text replace - "{{concept" to "{{named req") |
m (+inplace_vector.) |
||
(6 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
− | {{cpp/named req/title|ContiguousContainer}} | + | {{cpp/named req/title|ContiguousContainer|notes={{mark since c++17}}}} |
{{cpp/named req/navbar}} | {{cpp/named req/navbar}} | ||
− | A {{ | + | 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 {{ | + | |
− | + | ||
* The type {{tt|X}} satisfies {{named req|Container}} | * The type {{tt|X}} satisfies {{named req|Container}} | ||
* The type {{tt|X}} supports {{named req|RandomAccessIterator}}s | * The type {{tt|X}} supports {{named req|RandomAccessIterator}}s | ||
− | * The member types {{c|X::iterator}} and {{c|X::const_iterator}} are {{named req|ContiguousIterator}}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}} |
− | === | + | ===Contiguous containers 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/container/dsc | + | {{dsc inc|cpp/container/dsc array}} |
+ | {{dsc inc|cpp/container/dsc inplace_vector}} | ||
{{dsc end}} | {{dsc end}} | ||
− | {{langlinks|zh}} | + | {{langlinks|de|es|fr|it|ja|pl|pt|ru|zh}} |
Latest revision as of 03:19, 5 September 2024
A ContiguousContainer is a Container that stores objects in contiguous memory locations.
[edit] Requirements
The type X
satisfies ContiguousContainer if
- The type
X
satisfies Container - The type
X
supports LegacyRandomAccessIterators - The member types X::iterator and X::const_iterator are LegacyContiguousIterators(until C++20)
contiguous_iterator
s(since C++20)
[edit] Contiguous containers in the standard library
stores and manipulates sequences of characters (class template) | |
dynamic contiguous array (class template) | |
(C++11) |
fixed-sized inplace contiguous array (class template) |
(C++26) |
dynamically-resizable, fixed capacity, inplace contiguous array (class template) |