Espaços nominais
Variantes
Acções

<div class="t-tr-text">C + +: conceitos<div class="t-tr-dropdown"><div><div><div class="t-tr-dropdown-arrow-border"></div><div class="t-tr-dropdown-arrow"></div><div class="t-tr-dropdown-h">Original:</div><div class="t-tr-dropdown-orig">C++ concepts:</div><div class="t-tr-dropdown-notes">The text has been machine-translated via [http://translate.google.com Google Translate].<br/> You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.</div></div></div></div></div> SequenceContainer

Da cppreference.com
< cpp‎ | concept

 
 
C + + conceitos
Basic
Original:
Basic
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Biblioteca-Wide
Original:
Library-Wide
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Container
Original:
Container
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
SequenceContainer
Elementos de contêineres
Original:
Container Elements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Iterator
Original:
Iterator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Números aleatórios
Original:
Random Numbers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Simultaneidade
Original:
Concurrency
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
(C++11)
(C++11)
Outro
Original:
Other
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
A SequenceContainer é um Container que armazena objetos do mesmo tipo em um arranjo linear.
Original:
A SequenceContainer is a Container that stores objects of the same type in a linear arrangement.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Índice

[editar] Requisitos

Legend
Original:
Legend
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

X
Tipo de recipiente
Original:
Container type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
T
Tipo de elemento
Original:
Element type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
a, b
Objetos de X tipo
Original:
Objects of type X
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
t
Objeto de T tipo
Original:
Object of type T
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
n
Inteiro positivo
Original:
Positive integer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
i, j
InputIterators denotando um intervalo válido
Original:
InputIterators denoting a valid range
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
il std::initializer_list<T>
args
Pacote de parâmetro
Original:
Parameter pack
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
p, q
const_iterators em a
Original:
const_iterators in a
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


expression return type effects precondition postcondition
X(n,t) Constructs a SequenceContainer containing n copies of t T CopyInsertable std::distance(begin(),end()) == n
X(i,j) Constructs a SequenceContainer equivalent to the range [i,j) std::distance(begin(),end()) ==

std::distance(i,j)

X(il) X(il.begin(),il.end)
a = il X& Assigns the range represented by il into a T CopyInsertable and CopyAssignable Existing elements of a are destroyed or assigned to
a.emplace(p,args) iterator Insert an object constructed with std::forward<Args>(args) before p
a.emplace(p,t) iterator Inserts a copy of t before i
a.insert(p,n,t) iterator Inserts n copies of t before i T CopyInsertable and CopyAssignable
a.insert(p,i,j) iterator Inserts copies of elements in [i, j) before p Each iterator in [i,j) is dereferenced once
a.insert(p, il) iterator a.insert(p,il.begin(),il.end())
a.erase(q) iterator Erases the element pointed to by q (std :: deque, std :: vector) T MoveAssignable
a.erase(p,q) iterator Erases elements in [p,q) (std :: deque, std :: vector) T MoveAssignable
a.clear() void Destroys all elements in a
  • Todas as referências são invalidados
    Original:
    All references are invalidated
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • a.empty() == true
a.assign(i,j) void Replaces elements in a with a copy of [i, j) Each iterator in [i,j) is dereferenced once
a.assign(il) void a.assign(il.begin(),il.end())
a.assign(n,t) void Replaces elements in a with n copies of t T CopyInsertable and CopyAssignable

[editar] Operações opcionais

[editar] SequenceContainers na biblioteca padrão

(desde C++11)
matriz contígua estática
Original:
static contiguous array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de classe) [edit]
matriz contígua dinâmico
Original:
dynamic contiguous array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de classe) [edit]
dupla fila
Original:
double-ended queue
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de classe) [edit]
(desde C++11)
isoladamente ligada lista
Original:
singly-linked list
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de classe) [edit]
duplamente vinculada lista
Original:
doubly-linked list
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de classe) [edit]

[editar] Trade-offs / notas de uso

std::array
Acesso rápido, mas número fixo de elementos
Original:
Fast access but fixed number of elements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::vector
Acesso rápido, mas principalmente ineficiente inserções / exclusões
Original:
Fast access but mostly inefficient insertions/deletions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::list
std::forward_list
Inserção eficiente / deleção no meio da sequência
Original:
Efficient insertion/deletion in the middle of the sequence
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::deque
Inserção eficiente / deleção no início e no fim da sequência
Original:
Efficient insertion/deletion at the beginning and at the end of the sequence
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.