diff options
author | thegeorg <thegeorg@yandex-team.com> | 2024-08-10 10:33:06 +0300 |
---|---|---|
committer | thegeorg <thegeorg@yandex-team.com> | 2024-08-10 10:42:26 +0300 |
commit | f606bdbedff44a60218a7007de93ee20833c7b17 (patch) | |
tree | 0fd57c06f31dff131521686b3d9eb7def12769ec /contrib/tools/bison/data/skeletons/stack.hh | |
parent | 57386fad9537813e2135b5b19949e5597d7b5b50 (diff) | |
download | ydb-f606bdbedff44a60218a7007de93ee20833c7b17.tar.gz |
Update contrib/tools/bison to 3.6.4
9febd1b3a041f2e2083c076fbde9680a7cdc9b9e
Diffstat (limited to 'contrib/tools/bison/data/skeletons/stack.hh')
-rw-r--r-- | contrib/tools/bison/data/skeletons/stack.hh | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/contrib/tools/bison/data/skeletons/stack.hh b/contrib/tools/bison/data/skeletons/stack.hh index 5eb485696a..0fd3625836 100644 --- a/contrib/tools/bison/data/skeletons/stack.hh +++ b/contrib/tools/bison/data/skeletons/stack.hh @@ -32,8 +32,8 @@ m4_define([b4_stack_define], { public: // Hide our reversed order. - typedef typename S::reverse_iterator iterator; - typedef typename S::const_reverse_iterator const_iterator; + typedef typename S::iterator iterator; + typedef typename S::const_iterator const_iterator; typedef typename S::size_type size_type; typedef typename std::ptrdiff_t index_type; @@ -41,6 +41,13 @@ m4_define([b4_stack_define], : seq_ (n) {} +#if 201103L <= YY_CPLUSPLUS + /// Non copyable. + stack (const stack&) = delete; + /// Non copyable. + stack& operator= (const stack&) = delete; +#endif + /// Random access. /// /// Index 0 returns the topmost element. @@ -91,24 +98,18 @@ m4_define([b4_stack_define], return index_type (seq_.size ()); } - std::ptrdiff_t - ssize () const YY_NOEXCEPT - { - return std::ptrdiff_t (size ()); - } - /// Iterator on top of the stack (going downwards). const_iterator begin () const YY_NOEXCEPT { - return seq_.rbegin (); + return seq_.begin (); } /// Bottom of the stack. const_iterator end () const YY_NOEXCEPT { - return seq_.rend (); + return seq_.end (); } /// Present a slice of the top of a stack. @@ -132,8 +133,12 @@ m4_define([b4_stack_define], }; private: +#if YY_CPLUSPLUS < 201103L + /// Non copyable. stack (const stack&); + /// Non copyable. stack& operator= (const stack&); +#endif /// The wrapped container. S seq_; }; |