/* -*- C++ -*- */
/*************************************************************************
 * Copyright(c) 1995~2005  Masaharu Goto (cint@pcroot.cern.ch)
 *
 * For the licensing terms see the file COPYING
 *
 ************************************************************************/
// lib/prec_stl/stack

#pragma ifndef PREC_STL_STACK
#pragma define PREC_STL_STACK
#pragma link off global PREC_STL_STACK;
#pragma link C++ nestedtypedef;
#pragma link C++ nestedclass;
#if defined(G__HP_aCC) || defined(G__SUNPRO_CC)
#pragma mask_newdelete 0x1c;
#else
#pragma mask_newdelete 0x10;
#endif

// Imported from ANSI/ISO C++ 1997/Nov draft 
// Got some ideas from Scott Snyder, Fermi-lab
// Modified by Masaharu Goto

#include <_deque>

template <class T, class Container = deque<T> >
class stack { 
  public:
  typedef typename Container::value_type            value_type;
  typedef typename Container::size_type             size_type;
  typedef          Container                        container_type;
  protected:         Container c;       public:
#ifdef __CINT__
  stack();
  //stack(const Container&);
#else
  explicit stack(const Container& = Container());
#endif
  bool      empty() const;
  size_type size()  const;
  value_type&       top();
  //const value_type& top() const;
#ifdef __CINT__
  void push(const T& x);
#else
  void push(const value_type& x); // cint bug, need to fix sometime
#endif
  void pop();

#ifndef G__VISUAL
  friend bool operator==(const stack& x ,const stack& y);
  friend bool operator< (const stack& x ,const stack& y);
  friend bool operator!=(const stack& x ,const stack& y);
  friend bool operator> (const stack& x ,const stack& y);
  friend bool operator>=(const stack& x ,const stack& y);
  friend bool operator<=(const stack& x ,const stack& y);
#endif
};

#pragma endif



