fix compilation by adding a controversial feature

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6845 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-04-24 15:52:01 +00:00
parent f69a5ed0d7
commit 5b4633d0d1
2 changed files with 17 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2003-02-21 André Pönitz <poenitz@gmx.net>
* limited_stack.h: change underlying container to deque to
make this re-usable in mathed
2003-04-08 John Levon <levon@movementarian.org>
* filetools.C: fix MakeDisplayPath() to not

View File

@ -12,7 +12,7 @@
#ifndef LIMITED_STACK_H
#define LIMITED_STACK_H
#include <list>
#include <deque>
/**
* limited_stack - a stack of limited size
@ -23,7 +23,7 @@
template <typename T>
class limited_stack {
public:
typedef std::list<T> container_type;
typedef std::deque<T> container_type;
typedef typename container_type::value_type value_type;
typedef typename container_type::size_type size_type;
@ -63,6 +63,15 @@ public:
}
}
/// direct read access to intermediate elements
T const & operator[](size_type pos) const {
return c_[pos];
}
/// read access to used size
size_type size() const {
return c_.size();
}
private:
/// internal contents
container_type c_;