On 11/17/2009 05:08 PM, Andre Poenitz wrote:
On Tue, Nov 17, 2009 at 04:52:58PM -0500, rgheck wrote:
On 11/17/2009 03:43 PM, Andre Poenitz wrote:
On Mon, Nov 16, 2009 at 05:46:03PM -0500, rgheck wrote:


@@ -172,6 +195,11 @@
        std::string current_float_;
        /// Are we in a subfloat?
        bool subfloat_;
+       /// Used to keep track of active counters when going through
+       /// updateLabels().
+       std::deque<docstring>   counter_stack_;
+       /// Same, but for last layout.
+       std::deque<Layout const *>   layout_stack_;
   };

Out of curiosity: Why a deque? Shouldn't a vector do just fine?


It was a stack, which is apparently based upon a deque, so when I got
frustrated with the stack, I switched to a deque. If vectors are
cheaper, I'm happy to use it.
Yes, access is simpler, and it saves the #include. The big advantage
('pop_front') is not used in case of a stack.

OK. I'll do that.

Why is std::stack based on std::deque?

rh

Reply via email to