STL Containers
This page is specific to:.NET Framework Version:1.12.03.54.0
Standard C++ Library Reference
STL Containers

A container is an STL template class that manages a sequence of elements. Such elements can be of any object type that supplies a copy constructor, a destructor, and an assignment operator. The destructor may not throw an exception. This document describes the properties required of all such containers, in terms of a generic template class container. An actual container template class may have additional template parameters. It will certainly have additional member functions.

The STL template container classes are:

The four hash containers are not required by the C++ Standard. The Standard C++ Library template class basic_string also meets the requirements for a template container class.

namespace std 
{
template<class Ty>
   class Container;

        // TEMPLATE FUNCTIONS
template<class Ty>
   bool operator==(
      const Container<Ty>& left,
      const Container<Ty>& right);
template<class Ty>
   bool operator!=(
      const Container<Ty>& left,
      const Container<Ty>& right);
template<class Ty>
   bool operator<(
      const Container<Ty>& left,
      const Container<Ty>& right);
template<class Ty>
   bool operator>(
      const Container<Ty>& left,
      const Container<Ty>& right);
template<class Ty>
   bool operator<=(
      const Container<Ty>& left,
      const Container<Ty>& right);
template<class Ty>
   bool operator>=(
      const Container<Ty>& left,
      const Container<Ty>& right);
template<class Ty>
   void swap(
      Container<Ty>& left,
      Container<Ty>& right);
};

For a sample container class, see <sample container>.

See Also

Standard Template Library Conventions

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View