Files
cppdraft_translate/cppdraft/array/cons.md
2025-10-25 03:02:53 +03:00

34 lines
1.3 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[array.cons]
# 23 Containers library [[containers]](./#containers)
## 23.3 Sequence containers [[sequences]](sequences#array.cons)
### 23.3.3 Class template array [[array]](array#cons)
#### 23.3.3.2 Constructors, copy, and assignment [array.cons]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6218)
An array relies on the implicitly-declared special
member functions ([[class.default.ctor]](class.default.ctor "11.4.5.2Default constructors"), [[class.dtor]](class.dtor "11.4.7Destructors"), [[class.copy.ctor]](class.copy.ctor "11.4.5.3Copy/move constructors")) to
conform to the container requirements table in [[container.requirements]](container.requirements "23.2Requirements")[.](#1.sentence-1)
In addition to the requirements specified in the container requirements table,
the implicitly-declared move constructor and move assignment operator for array require that T be *Cpp17MoveConstructible* or *Cpp17MoveAssignable*,
respectively[.](#1.sentence-2)
[🔗](#itemdecl:1)
`template<class T, class... U>
array(T, U...) -> array<T, 1 + sizeof...(U)>;
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L6234)
*Mandates*: (is_same_v<T, U> && ...) is true[.](#2.sentence-1)