Boost C++ Libraries

...one 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.
PrevUpHomeNext

Class template stack

boost::compute::stack

Synopsis

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

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

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

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

Description

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();

PrevUpHomeNext