X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/5f87211cb40944a1f81631542404db93f869aa8f..97ae878ec376149ba49bd08c1bd6590dd5224671:/data/stack.hh diff --git a/data/stack.hh b/data/stack.hh index 7ed55606..037c212f 100644 --- a/data/stack.hh +++ b/data/stack.hh @@ -53,11 +53,15 @@ m4_define([b4_stack_define], return seq_[seq_.size () - 1 - i]; } + /// Steal the contents of \a t. + /// + /// Close to move-semantics. inline void - push (const T& t) + push (T& t) { - seq_.push_back (t); + seq_.push_back (T()); + operator[](0).move (t); } inline