Containers
Containers
namespace std {
template<class T, class A>
class Cont;
// TEMPLATE FUNCTIONS
template<class T, class A>
bool operator==(
const Cont<T, A>& lhs,
const Cont<T, A>& rhs);
template<class T, class A>
bool operator!=(
const Cont<T, A>& lhs,
const Cont<T, A>& rhs);
template<class T, class A>
bool operator<(
const Cont<T, A>& lhs,
const Cont<T, A>& rhs);
template<class T, class A>
bool operator>(
const Cont<T, A>& lhs,
const Cont<T, A>& rhs);
template<class T, class A>
bool operator<=(
const Cont<T, A>& lhs,
const Cont<T, A>& rhs);
template<class T, class A>
bool operator>=(
const Cont<T, A>& lhs,
const Cont<T, A>& rhs);
template<class T, class A>
void swap(
const Cont<T, A>& lhs,
const Cont<T, A>& rhs);
};
A container is an STL template class that manages a sequence of elements. Such elements can be of any object type that supplies a default constructor, a destructor, and an assignment operator. This document describes the properties required of all such containers, in terms of a generic template class Cont
. An actual container template class may have additional template parameters. It will certainly have additional member functions.
The STL template container classes are:
dequelistmapmultimapmultisetsetvector
(The Standard C++ library template class basic_string
also meets the requirements for a template container class.)