Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Class template stack



// In header: <boost/compute/container/stack.hpp>

template<typename T> 
class stack {
  // types
  typedef vector< T >                container_type;
  typedef container_type::size_type  size_type;     
  typedef container_type::value_type value_type;    

  // construct/copy/destruct
  stack(const stack< T > &);
  stack< T > & operator=(const stack< T > &);

  // public member functions
  bool empty() const;
  size_type size() const;
  value_type top() const;
  void push(const T &);
  void pop();


stack public construct/copy/destruct

  1. stack();
  2. stack(const stack< T > & other);
  3. stack< T > & operator=(const stack< T > & other);
  4. ~stack();

stack public member functions

  1. bool empty() const;
  2. size_type size() const;
  3. value_type top() const;
  4. void push(const T & value);
  5. void pop();