head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC5:1.1.1.12
	netbsd-11-0-RC4:1.1.1.12
	netbsd-11-0-RC3:1.1.1.12
	netbsd-11-0-RC2:1.1.1.12
	netbsd-11-0-RC1:1.1.1.12
	gcc-14-3-0:1.1.1.13
	perseant-exfatfs-base-20250801:1.1.1.12
	netbsd-11:1.1.1.12.0.4
	netbsd-11-base:1.1.1.12
	gcc-12-5-0:1.1.1.12
	netbsd-10-1-RELEASE:1.1.1.11
	perseant-exfatfs-base-20240630:1.1.1.12
	gcc-12-4-0:1.1.1.12
	perseant-exfatfs:1.1.1.12.0.2
	perseant-exfatfs-base:1.1.1.12
	netbsd-8-3-RELEASE:1.1.1.4
	netbsd-9-4-RELEASE:1.1.1.6
	netbsd-10-0-RELEASE:1.1.1.11
	netbsd-10-0-RC6:1.1.1.11
	netbsd-10-0-RC5:1.1.1.11
	netbsd-10-0-RC4:1.1.1.11
	netbsd-10-0-RC3:1.1.1.11
	netbsd-10-0-RC2:1.1.1.11
	netbsd-10-0-RC1:1.1.1.11
	gcc-12-3-0:1.1.1.12
	gcc-10-5-0:1.1.1.11
	netbsd-10:1.1.1.11.0.6
	netbsd-10-base:1.1.1.11
	netbsd-9-3-RELEASE:1.1.1.6
	gcc-10-4-0:1.1.1.11
	cjep_sun2x-base1:1.1.1.11
	cjep_sun2x:1.1.1.11.0.4
	cjep_sun2x-base:1.1.1.11
	cjep_staticlib_x-base1:1.1.1.11
	netbsd-9-2-RELEASE:1.1.1.6
	cjep_staticlib_x:1.1.1.11.0.2
	cjep_staticlib_x-base:1.1.1.11
	gcc-10-3-0:1.1.1.11
	netbsd-9-1-RELEASE:1.1.1.6
	gcc-9-3-0:1.1.1.10
	gcc-7-5-0:1.1.1.8
	phil-wifi-20200421:1.1.1.7
	phil-wifi-20200411:1.1.1.7
	is-mlppp:1.1.1.7.0.2
	is-mlppp-base:1.1.1.7
	phil-wifi-20200406:1.1.1.7
	netbsd-8-2-RELEASE:1.1.1.4
	gcc-8-4-0:1.1.1.9
	netbsd-9-0-RELEASE:1.1.1.6
	netbsd-9-0-RC2:1.1.1.6
	netbsd-9-0-RC1:1.1.1.6
	phil-wifi-20191119:1.1.1.7
	gcc-8-3-0:1.1.1.7
	netbsd-9:1.1.1.6.0.2
	netbsd-9-base:1.1.1.6
	phil-wifi-20190609:1.1.1.6
	netbsd-8-1-RELEASE:1.1.1.4
	netbsd-8-1-RC1:1.1.1.4
	pgoyette-compat-merge-20190127:1.1.1.5.2.1
	pgoyette-compat-20190127:1.1.1.6
	gcc-7-4-0:1.1.1.6
	pgoyette-compat-20190118:1.1.1.5
	pgoyette-compat-1226:1.1.1.5
	pgoyette-compat-1126:1.1.1.5
	gcc-6-5-0:1.1.1.5
	pgoyette-compat-1020:1.1.1.5
	pgoyette-compat-0930:1.1.1.5
	pgoyette-compat-0906:1.1.1.5
	netbsd-7-2-RELEASE:1.1.1.2
	pgoyette-compat-0728:1.1.1.5
	netbsd-8-0-RELEASE:1.1.1.4
	phil-wifi:1.1.1.5.0.4
	phil-wifi-base:1.1.1.5
	pgoyette-compat-0625:1.1.1.5
	netbsd-8-0-RC2:1.1.1.4
	pgoyette-compat-0521:1.1.1.5
	pgoyette-compat-0502:1.1.1.5
	pgoyette-compat-0422:1.1.1.5
	netbsd-8-0-RC1:1.1.1.4
	pgoyette-compat-0415:1.1.1.5
	pgoyette-compat-0407:1.1.1.5
	pgoyette-compat-0330:1.1.1.5
	pgoyette-compat-0322:1.1.1.5
	pgoyette-compat-0315:1.1.1.5
	netbsd-7-1-2-RELEASE:1.1.1.2
	pgoyette-compat:1.1.1.5.0.2
	pgoyette-compat-base:1.1.1.5
	gcc-6-4-0:1.1.1.5
	netbsd-7-1-1-RELEASE:1.1.1.2
	gcc-5-5-0:1.1.1.4
	matt-nb8-mediatek:1.1.1.4.0.12
	matt-nb8-mediatek-base:1.1.1.4
	perseant-stdc-iso10646:1.1.1.4.0.10
	perseant-stdc-iso10646-base:1.1.1.4
	netbsd-8:1.1.1.4.0.8
	netbsd-8-base:1.1.1.4
	prg-localcount2-base3:1.1.1.4
	prg-localcount2-base2:1.1.1.4
	prg-localcount2-base1:1.1.1.4
	prg-localcount2:1.1.1.4.0.6
	prg-localcount2-base:1.1.1.4
	pgoyette-localcount-20170426:1.1.1.4
	bouyer-socketcan-base1:1.1.1.4
	pgoyette-localcount-20170320:1.1.1.4
	netbsd-7-1:1.1.1.2.0.10
	netbsd-7-1-RELEASE:1.1.1.2
	netbsd-7-1-RC2:1.1.1.2
	netbsd-7-nhusb-base-20170116:1.1.1.2
	bouyer-socketcan:1.1.1.4.0.4
	bouyer-socketcan-base:1.1.1.4
	pgoyette-localcount-20170107:1.1.1.4
	netbsd-7-1-RC1:1.1.1.2
	pgoyette-localcount-20161104:1.1.1.4
	netbsd-7-0-2-RELEASE:1.1.1.2
	localcount-20160914:1.1.1.4
	netbsd-7-nhusb:1.1.1.2.0.8
	netbsd-7-nhusb-base:1.1.1.2
	pgoyette-localcount-20160806:1.1.1.4
	pgoyette-localcount-20160726:1.1.1.4
	pgoyette-localcount:1.1.1.4.0.2
	pgoyette-localcount-base:1.1.1.4
	gcc-5-4-0:1.1.1.4
	netbsd-7-0-1-RELEASE:1.1.1.2
	gcc-5-3-0:1.1.1.3
	netbsd-7-0:1.1.1.2.0.6
	netbsd-7-0-RELEASE:1.1.1.2
	gcc-4-8-5-pre-gcc-old-import:1.1.1.2
	netbsd-7-0-RC3:1.1.1.2
	netbsd-7-0-RC2:1.1.1.2
	post-gcc-4-8-5-merge:1.1.1.2
	gcc-4-8-5:1.1.1.2
	netbsd-7-0-RC1:1.1.1.2
	gcc-4-8-4:1.1.1.2
	gcc-4-8-20141009:1.1.1.2
	netbsd-6-0-6-RELEASE:1.1.1.1
	netbsd-6-1-5-RELEASE:1.1.1.1
	netbsd-7:1.1.1.2.0.4
	netbsd-7-base:1.1.1.2
	gcc-4-8-3:1.1.1.2
	yamt-pagecache-base9:1.1.1.2
	yamt-pagecache-tag8:1.1.1.1
	netbsd-6-1-4-RELEASE:1.1.1.1
	netbsd-6-0-5-RELEASE:1.1.1.1
	tls-earlyentropy:1.1.1.2.0.2
	tls-earlyentropy-base:1.1.1.2
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.2
	riastradh-drm2-base3:1.1.1.2
	gcc-4-8-3-pre-r208254:1.1.1.2
	gcc-4-8-3-pre-r206687:1.1.1.2
	imported-to-gcc-old-20140227-0107:1.1.1.1
	netbsd-6-1-3-RELEASE:1.1.1.1
	netbsd-6-0-4-RELEASE:1.1.1.1
	netbsd-6-1-2-RELEASE:1.1.1.1
	netbsd-6-0-3-RELEASE:1.1.1.1
	netbsd-6-1-1-RELEASE:1.1.1.1
	riastradh-drm2-base2:1.1.1.1
	riastradh-drm2-base1:1.1.1.1
	riastradh-drm2:1.1.1.1.0.12
	riastradh-drm2-base:1.1.1.1
	netbsd-6-1:1.1.1.1.0.16
	netbsd-6-0-2-RELEASE:1.1.1.1
	netbsd-6-1-RELEASE:1.1.1.1
	netbsd-6-1-RC4:1.1.1.1
	netbsd-6-1-RC3:1.1.1.1
	agc-symver:1.1.1.1.0.14
	agc-symver-base:1.1.1.1
	netbsd-6-1-RC2:1.1.1.1
	netbsd-6-1-RC1:1.1.1.1
	yamt-pagecache-base8:1.1.1.1
	netbsd-6-0-1-RELEASE:1.1.1.1
	yamt-pagecache-base7:1.1.1.1
	matt-nb6-plus-nbase:1.1.1.1
	yamt-pagecache-base6:1.1.1.1
	netbsd-6-0:1.1.1.1.0.10
	netbsd-6-0-RELEASE:1.1.1.1
	gcc-4-5-4:1.1.1.1
	netbsd-6-0-RC2:1.1.1.1
	tls-maxphys:1.1.1.1.0.8
	tls-maxphys-base:1.1.1.2
	matt-nb6-plus:1.1.1.1.0.6
	matt-nb6-plus-base:1.1.1.1
	netbsd-6-0-RC1:1.1.1.1
	yamt-pagecache-base5:1.1.1.1
	yamt-pagecache-base4:1.1.1.1
	netbsd-6:1.1.1.1.0.4
	netbsd-6-base:1.1.1.1
	yamt-pagecache-base3:1.1.1.1
	yamt-pagecache-base2:1.1.1.1
	yamt-pagecache:1.1.1.1.0.2
	yamt-pagecache-base:1.1.1.1
	gcc-4-5-3:1.1.1.1
	FSF:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2011.06.21.01.24.47;	author mrg;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2011.06.21.01.24.47;	author mrg;	state Exp;
branches
	1.1.1.1.2.1
	1.1.1.1.8.1;
next	1.1.1.2;

1.1.1.2
date	2014.03.01.08.41.31;	author mrg;	state Exp;
branches;
next	1.1.1.3;
commitid	TtaB91QNTknAoYqx;

1.1.1.3
date	2016.01.24.06.05.53;	author mrg;	state Exp;
branches;
next	1.1.1.4;
commitid	uWWfbLp08zOK79Sy;

1.1.1.4
date	2016.06.07.05.57.53;	author mrg;	state Exp;
branches;
next	1.1.1.5;
commitid	KKgo7HPiSHWAPu9z;

1.1.1.5
date	2018.02.02.01.59.03;	author mrg;	state Exp;
branches
	1.1.1.5.2.1
	1.1.1.5.4.1;
next	1.1.1.6;
commitid	XNKaycqpfhzd5epA;

1.1.1.6
date	2019.01.19.10.14.11;	author mrg;	state Exp;
branches;
next	1.1.1.7;
commitid	VQ8OwWIg5RS9kn8B;

1.1.1.7
date	2019.10.01.09.36.06;	author mrg;	state Exp;
branches;
next	1.1.1.8;
commitid	smvgr2IPAQDr89FB;

1.1.1.8
date	2020.08.11.05.10.39;	author mrg;	state Exp;
branches;
next	1.1.1.9;
commitid	5dBRDT7i6e65xBjC;

1.1.1.9
date	2020.08.11.05.30.09;	author mrg;	state Exp;
branches;
next	1.1.1.10;
commitid	7AI4OfpLi4eqEBjC;

1.1.1.10
date	2020.09.05.07.52.09;	author mrg;	state Exp;
branches;
next	1.1.1.11;
commitid	ZRYA7IOuwfMjAPmC;

1.1.1.11
date	2021.04.10.22.10.03;	author mrg;	state Exp;
branches;
next	1.1.1.12;
commitid	eC4g0MRpqTvEkNOC;

1.1.1.12
date	2023.07.30.05.21.20;	author mrg;	state Exp;
branches;
next	1.1.1.13;
commitid	tk6nV4mbc9nVEMyE;

1.1.1.13
date	2025.09.13.23.45.48;	author mrg;	state Exp;
branches;
next	;
commitid	KwhwN4krNWa6XBaG;

1.1.1.1.2.1
date	2014.05.22.16.37.49;	author yamt;	state Exp;
branches;
next	;
commitid	DX8bafDLmqEbpyBx;

1.1.1.1.8.1
date	2014.08.19.23.54.50;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.1.1.5.2.1
date	2019.01.26.21.59.34;	author pgoyette;	state Exp;
branches;
next	;
commitid	JKpcmvSjdT25dl9B;

1.1.1.5.4.1
date	2019.06.10.21.54.51;	author christos;	state Exp;
branches;
next	1.1.1.5.4.2;
commitid	jtc8rnCzWiEEHGqB;

1.1.1.5.4.2
date	2020.04.13.07.58.37;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;


desc
@@


1.1
log
@Initial revision
@
text
@// Debugging vector implementation -*- C++ -*-

// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.

// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

/** @@file debug/vector
 *  This file is a GNU debug extension to the Standard C++ Library.
 */

#ifndef _GLIBCXX_DEBUG_VECTOR
#define _GLIBCXX_DEBUG_VECTOR 1

#include <vector>
#include <utility>
#include <debug/safe_sequence.h>
#include <debug/safe_iterator.h>

namespace std
{
namespace __debug
{
  /// Class std::vector with safety/checking/debug instrumentation.
  template<typename _Tp,
	   typename _Allocator = std::allocator<_Tp> >
    class vector
    : public _GLIBCXX_STD_D::vector<_Tp, _Allocator>,
      public __gnu_debug::_Safe_sequence<vector<_Tp, _Allocator> >
    {
      typedef _GLIBCXX_STD_D::vector<_Tp, _Allocator> _Base;
      typedef __gnu_debug::_Safe_sequence<vector>              _Safe_base;

      typedef typename _Base::const_iterator _Base_const_iterator;
      typedef __gnu_debug::_After_nth_from<_Base_const_iterator> _After_nth;

    public:
      typedef typename _Base::reference             reference;
      typedef typename _Base::const_reference       const_reference;

      typedef __gnu_debug::_Safe_iterator<typename _Base::iterator,vector>
      iterator;
      typedef __gnu_debug::_Safe_iterator<typename _Base::const_iterator,vector>
      const_iterator;

      typedef typename _Base::size_type             size_type;
      typedef typename _Base::difference_type       difference_type;

      typedef _Tp				    value_type;
      typedef _Allocator			    allocator_type;
      typedef typename _Base::pointer               pointer;
      typedef typename _Base::const_pointer         const_pointer;
      typedef std::reverse_iterator<iterator>       reverse_iterator;
      typedef std::reverse_iterator<const_iterator> const_reverse_iterator;

      // 23.2.4.1 construct/copy/destroy:
      explicit vector(const _Allocator& __a = _Allocator())
      : _Base(__a), _M_guaranteed_capacity(0) { }

      explicit vector(size_type __n, const _Tp& __value = _Tp(),
		      const _Allocator& __a = _Allocator())
      : _Base(__n, __value, __a), _M_guaranteed_capacity(__n) { }

      template<class _InputIterator>
        vector(_InputIterator __first, _InputIterator __last,
	       const _Allocator& __a = _Allocator())
	: _Base(__gnu_debug::__check_valid_range(__first, __last),
		__last, __a),
	  _M_guaranteed_capacity(0)
        { _M_update_guaranteed_capacity(); }

      vector(const vector& __x)
      : _Base(__x), _Safe_base(), _M_guaranteed_capacity(__x.size()) { }

      /// Construction from a release-mode vector
      vector(const _Base& __x)
      : _Base(__x), _Safe_base(), _M_guaranteed_capacity(__x.size()) { }

#ifdef __GXX_EXPERIMENTAL_CXX0X__
      vector(vector&& __x)
      : _Base(std::forward<vector>(__x)), _Safe_base(),
	_M_guaranteed_capacity(this->size())
      {
	this->_M_swap(__x);
	__x._M_guaranteed_capacity = 0;
      }

      vector(initializer_list<value_type> __l,
	     const allocator_type& __a = allocator_type())
      : _Base(__l, __a), _Safe_base(),
	_M_guaranteed_capacity(__l.size()) { }
#endif

      ~vector() { }

      vector&
      operator=(const vector& __x)
      {
	static_cast<_Base&>(*this) = __x;
	this->_M_invalidate_all();
	_M_update_guaranteed_capacity();
	return *this;
      }

#ifdef __GXX_EXPERIMENTAL_CXX0X__
      vector&
      operator=(vector&& __x)
      {
	// NB: DR 1204.
	// NB: DR 675.
	clear();
	swap(__x);
	return *this;
      }

      vector&
      operator=(initializer_list<value_type> __l)
      {
	static_cast<_Base&>(*this) = __l;
	this->_M_invalidate_all();
	_M_update_guaranteed_capacity();
	return *this;
      }
#endif

      template<typename _InputIterator>
        void
        assign(_InputIterator __first, _InputIterator __last)
        {
	  __glibcxx_check_valid_range(__first, __last);
	  _Base::assign(__first, __last);
	  this->_M_invalidate_all();
	  _M_update_guaranteed_capacity();
	}

      void
      assign(size_type __n, const _Tp& __u)
      {
	_Base::assign(__n, __u);
	this->_M_invalidate_all();
	_M_update_guaranteed_capacity();
      }

#ifdef __GXX_EXPERIMENTAL_CXX0X__
      void
      assign(initializer_list<value_type> __l)
      {
	_Base::assign(__l);
	this->_M_invalidate_all();
	_M_update_guaranteed_capacity();
      }
#endif

      using _Base::get_allocator;

      // iterators:
      iterator
      begin()
      { return iterator(_Base::begin(), this); }

      const_iterator
      begin() const
      { return const_iterator(_Base::begin(), this); }

      iterator
      end()
      { return iterator(_Base::end(), this); }

      const_iterator
      end() const
      { return const_iterator(_Base::end(), this); }

      reverse_iterator
      rbegin()
      { return reverse_iterator(end()); }

      const_reverse_iterator
      rbegin() const
      { return const_reverse_iterator(end()); }

      reverse_iterator
      rend()
      { return reverse_iterator(begin()); }

      const_reverse_iterator
      rend() const
      { return const_reverse_iterator(begin()); }

#ifdef __GXX_EXPERIMENTAL_CXX0X__
      const_iterator
      cbegin() const
      { return const_iterator(_Base::begin(), this); }

      const_iterator
      cend() const
      { return const_iterator(_Base::end(), this); }

      const_reverse_iterator
      crbegin() const
      { return const_reverse_iterator(end()); }

      const_reverse_iterator
      crend() const
      { return const_reverse_iterator(begin()); }
#endif

      // 23.2.4.2 capacity:
      using _Base::size;
      using _Base::max_size;

      void
      resize(size_type __sz, _Tp __c = _Tp())
      {
	bool __realloc = _M_requires_reallocation(__sz);
	if (__sz < this->size())
	  this->_M_invalidate_if(_After_nth(__sz, _M_base().begin()));
	_Base::resize(__sz, __c);
	if (__realloc)
	  this->_M_invalidate_all();
	_M_update_guaranteed_capacity();
      }

#ifdef __GXX_EXPERIMENTAL_CXX0X__
      using _Base::shrink_to_fit;
#endif

      size_type
      capacity() const
      {
#ifdef _GLIBCXX_DEBUG_PEDANTIC
	return _M_guaranteed_capacity;
#else
	return _Base::capacity();
#endif
      }

      using _Base::empty;

      void
      reserve(size_type __n)
      {
	bool __realloc = _M_requires_reallocation(__n);
	_Base::reserve(__n);
	if (__n > _M_guaranteed_capacity)
	  _M_guaranteed_capacity = __n;
	if (__realloc)
	  this->_M_invalidate_all();
      }

      // element access:
      reference
      operator[](size_type __n)
      {
	__glibcxx_check_subscript(__n);
	return _M_base()[__n];
      }

      const_reference
      operator[](size_type __n) const
      {
	__glibcxx_check_subscript(__n);
	return _M_base()[__n];
      }

      using _Base::at;

      reference
      front()
      {
	__glibcxx_check_nonempty();
	return _Base::front();
      }

      const_reference
      front() const
      {
	__glibcxx_check_nonempty();
	return _Base::front();
      }

      reference
      back()
      {
	__glibcxx_check_nonempty();
	return _Base::back();
      }

      const_reference
      back() const
      {
	__glibcxx_check_nonempty();
	return _Base::back();
      }

      // _GLIBCXX_RESOLVE_LIB_DEFECTS
      // DR 464. Suggestion for new member functions in standard containers.
      using _Base::data;

      // 23.2.4.3 modifiers:
      void
      push_back(const _Tp& __x)
      {
	bool __realloc = _M_requires_reallocation(this->size() + 1);
	_Base::push_back(__x);
	if (__realloc)
	  this->_M_invalidate_all();
	_M_update_guaranteed_capacity();
      }

#ifdef __GXX_EXPERIMENTAL_CXX0X__
      template<typename _Up = _Tp>
        typename __gnu_cxx::__enable_if<!std::__are_same<_Up, bool>::__value,
					void>::__type
        push_back(_Tp&& __x)
	{ emplace_back(std::move(__x)); }

      template<typename... _Args>
        void
        emplace_back(_Args&&... __args)
	{
	  bool __realloc = _M_requires_reallocation(this->size() + 1);
	  _Base::emplace_back(std::forward<_Args>(__args)...);
	  if (__realloc)
	    this->_M_invalidate_all();
	  _M_update_guaranteed_capacity();
	}
#endif

      void
      pop_back()
      {
	__glibcxx_check_nonempty();
	iterator __victim = end() - 1;
	__victim._M_invalidate();
	_Base::pop_back();
      }

#ifdef __GXX_EXPERIMENTAL_CXX0X__
      template<typename... _Args>
        iterator
        emplace(iterator __position, _Args&&... __args)
	{
	  __glibcxx_check_insert(__position);
	  bool __realloc = _M_requires_reallocation(this->size() + 1);
	  difference_type __offset = __position - begin();
	  typename _Base::iterator __res = _Base::emplace(__position.base(),
					    std::forward<_Args>(__args)...);
	  if (__realloc)
	    this->_M_invalidate_all();
	  else
	    this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
	  _M_update_guaranteed_capacity();
	  return iterator(__res, this);
	}
#endif

      iterator
      insert(iterator __position, const _Tp& __x)
      {
	__glibcxx_check_insert(__position);
	bool __realloc = _M_requires_reallocation(this->size() + 1);
	difference_type __offset = __position - begin();
	typename _Base::iterator __res = _Base::insert(__position.base(),__x);
	if (__realloc)
	  this->_M_invalidate_all();
	else
	  this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
	_M_update_guaranteed_capacity();
	return iterator(__res, this);
      }

#ifdef __GXX_EXPERIMENTAL_CXX0X__
      template<typename _Up = _Tp>
        typename __gnu_cxx::__enable_if<!std::__are_same<_Up, bool>::__value,
					iterator>::__type
        insert(iterator __position, _Tp&& __x)
        { return emplace(__position, std::move(__x)); }

      void
      insert(iterator __position, initializer_list<value_type> __l)
      { this->insert(__position, __l.begin(), __l.end()); }
#endif

      void
      insert(iterator __position, size_type __n, const _Tp& __x)
      {
	__glibcxx_check_insert(__position);
	bool __realloc = _M_requires_reallocation(this->size() + __n);
	difference_type __offset = __position - begin();
	_Base::insert(__position.base(), __n, __x);
	if (__realloc)
	  this->_M_invalidate_all();
	else
	  this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
	_M_update_guaranteed_capacity();
      }

      template<class _InputIterator>
        void
        insert(iterator __position,
	       _InputIterator __first, _InputIterator __last)
        {
	  __glibcxx_check_insert_range(__position, __first, __last);

	  /* Hard to guess if invalidation will occur, because __last
	     - __first can't be calculated in all cases, so we just
	     punt here by checking if it did occur. */
	  typename _Base::iterator __old_begin = _M_base().begin();
	  difference_type __offset = __position - begin();
	  _Base::insert(__position.base(), __first, __last);

	  if (_M_base().begin() != __old_begin)
	    this->_M_invalidate_all();
	  else
	    this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
	  _M_update_guaranteed_capacity();
	}

      iterator
      erase(iterator __position)
      {
	__glibcxx_check_erase(__position);
	difference_type __offset = __position - begin();
	typename _Base::iterator __res = _Base::erase(__position.base());
	this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
	return iterator(__res, this);
      }

      iterator
      erase(iterator __first, iterator __last)
      {
	// _GLIBCXX_RESOLVE_LIB_DEFECTS
	// 151. can't currently clear() empty container
	__glibcxx_check_erase_range(__first, __last);

	difference_type __offset = __first - begin();
	typename _Base::iterator __res = _Base::erase(__first.base(),
							 __last.base());
	this->_M_invalidate_if(_After_nth(__offset, _M_base().begin()));
	return iterator(__res, this);
      }

      void
      swap(vector& __x)
      {
	_Base::swap(__x);
	this->_M_swap(__x);
        std::swap(_M_guaranteed_capacity, __x._M_guaranteed_capacity);
      }

      void
      clear()
      {
	_Base::clear();
	this->_M_invalidate_all();
        _M_guaranteed_capacity = 0;
      }

      _Base&
      _M_base() { return *this; }

      const _Base&
      _M_base() const { return *this; }

    private:
      size_type _M_guaranteed_capacity;

      bool
      _M_requires_reallocation(size_type __elements)
      { return __elements > this->capacity(); }

      void
      _M_update_guaranteed_capacity()
      {
	if (this->size() > _M_guaranteed_capacity)
	  _M_guaranteed_capacity = this->size();
      }
    };

  template<typename _Tp, typename _Alloc>
    inline bool
    operator==(const vector<_Tp, _Alloc>& __lhs,
	       const vector<_Tp, _Alloc>& __rhs)
    { return __lhs._M_base() == __rhs._M_base(); }

  template<typename _Tp, typename _Alloc>
    inline bool
    operator!=(const vector<_Tp, _Alloc>& __lhs,
	       const vector<_Tp, _Alloc>& __rhs)
    { return __lhs._M_base() != __rhs._M_base(); }

  template<typename _Tp, typename _Alloc>
    inline bool
    operator<(const vector<_Tp, _Alloc>& __lhs,
	      const vector<_Tp, _Alloc>& __rhs)
    { return __lhs._M_base() < __rhs._M_base(); }

  template<typename _Tp, typename _Alloc>
    inline bool
    operator<=(const vector<_Tp, _Alloc>& __lhs,
	       const vector<_Tp, _Alloc>& __rhs)
    { return __lhs._M_base() <= __rhs._M_base(); }

  template<typename _Tp, typename _Alloc>
    inline bool
    operator>=(const vector<_Tp, _Alloc>& __lhs,
	       const vector<_Tp, _Alloc>& __rhs)
    { return __lhs._M_base() >= __rhs._M_base(); }

  template<typename _Tp, typename _Alloc>
    inline bool
    operator>(const vector<_Tp, _Alloc>& __lhs,
	      const vector<_Tp, _Alloc>& __rhs)
    { return __lhs._M_base() > __rhs._M_base(); }

  template<typename _Tp, typename _Alloc>
    inline void
    swap(vector<_Tp, _Alloc>& __lhs, vector<_Tp, _Alloc>& __rhs)
    { __lhs.swap(__rhs); }

} // namespace __debug

#ifdef __GXX_EXPERIMENTAL_CXX0X__
  // DR 1182.
  /// std::hash specialization for vector<bool>.
  template<typename _Alloc>
    struct hash<__debug::vector<bool, _Alloc>>
    : public std::unary_function<__debug::vector<bool, _Alloc>, size_t>
    {
      size_t
      operator()(const __debug::vector<bool, _Alloc>& __b) const
      { return std::hash<_GLIBCXX_STD_D::vector<bool, _Alloc>>()
	  (__b._M_base()); }
    };
#endif

} // namespace std

#endif
@


1.1.1.1
log
@initial import of GCC 4.5.3 sources.  changes since 4.1 are way too numerous
to review, please see http://gcc.gnu.org/gcc-4.5/changes.html (and the 4.2,
4.3 and 4.4 versions, too.)

this includes the core, c++, objc and the non java/ada/fortran parts of the
testsuite.
@
text
@@


1.1.1.1.8.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d3 2
a4 1
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
d38 1
a38 1
namespace std _GLIBCXX_VISIBILITY(default)
d46 1
a46 1
    : public _GLIBCXX_STD_C::vector<_Tp, _Allocator>,
d49 2
a50 1
      typedef _GLIBCXX_STD_C::vector<_Tp, _Allocator> _Base;
a51 1
      typedef typename _Base::iterator _Base_iterator;
d53 1
a53 5
      typedef __gnu_debug::_Equal_to<_Base_const_iterator> _Equal;

#if __cplusplus >= 201103L
      typedef __gnu_cxx::__alloc_traits<_Allocator>  _Alloc_traits;
#endif
d59 1
a59 1
      typedef __gnu_debug::_Safe_iterator<_Base_iterator,vector>
d61 1
a61 1
      typedef __gnu_debug::_Safe_iterator<_Base_const_iterator,vector>
d75 1
a75 2
      explicit
      vector(const _Allocator& __a = _Allocator())
d78 2
a79 7
#if __cplusplus >= 201103L
      explicit
      vector(size_type __n, const _Allocator& __a = _Allocator())
      : _Base(__n, __a), _M_guaranteed_capacity(__n) { }

      vector(size_type __n, const _Tp& __value,
	     const _Allocator& __a = _Allocator())
a80 6
#else
      explicit
      vector(size_type __n, const _Tp& __value = _Tp(),
	     const _Allocator& __a = _Allocator())
      : _Base(__n, __value, __a), _M_guaranteed_capacity(__n) { }
#endif
a81 4
#if __cplusplus >= 201103L
      template<class _InputIterator,
	       typename = std::_RequireInputIter<_InputIterator>>
#else
a82 1
#endif
d85 2
a86 3
        : _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
								     __last)),
		__gnu_debug::__base(__last), __a),
d91 1
a91 1
      : _Base(__x), _M_guaranteed_capacity(__x.size()) { }
d95 1
a95 1
      : _Base(__x), _M_guaranteed_capacity(__x.size()) { }
d97 3
a99 3
#if __cplusplus >= 201103L
      vector(vector&& __x) noexcept
      : _Base(std::move(__x)),
a105 11
      vector(const vector& __x, const allocator_type& __a)
      : _Base(__x, __a), _M_guaranteed_capacity(__x.size()) { }

      vector(vector&& __x, const allocator_type& __a)
      : _Base(std::move(__x), __a),
        _M_guaranteed_capacity(this->size())
      {
	__x._M_invalidate_all();
	__x._M_guaranteed_capacity = 0;
      }

d108 1
a108 1
      : _Base(__l, __a),
d112 1
a112 1
      ~vector() _GLIBCXX_NOEXCEPT { }
d123 1
a123 1
#if __cplusplus >= 201103L
d125 1
a125 1
      operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
d127 4
a130 6
	__glibcxx_check_self_move_assign(__x);
	_Base::operator=(std::move(__x));
	this->_M_invalidate_all();
	_M_update_guaranteed_capacity();
	__x._M_invalidate_all();
	__x._M_guaranteed_capacity = 0;
a143 4
#if __cplusplus >= 201103L
      template<typename _InputIterator,
	       typename = std::_RequireInputIter<_InputIterator>>
#else
a144 1
#endif
d149 1
a149 2
	  _Base::assign(__gnu_debug::__base(__first),
			__gnu_debug::__base(__last));
d162 1
a162 1
#if __cplusplus >= 201103L
d176 1
a176 1
      begin() _GLIBCXX_NOEXCEPT
d180 1
a180 1
      begin() const _GLIBCXX_NOEXCEPT
d184 1
a184 1
      end() _GLIBCXX_NOEXCEPT
d188 1
a188 1
      end() const _GLIBCXX_NOEXCEPT
d192 1
a192 1
      rbegin() _GLIBCXX_NOEXCEPT
d196 1
a196 1
      rbegin() const _GLIBCXX_NOEXCEPT
d200 1
a200 1
      rend() _GLIBCXX_NOEXCEPT
d204 1
a204 1
      rend() const _GLIBCXX_NOEXCEPT
d207 1
a207 1
#if __cplusplus >= 201103L
d209 1
a209 1
      cbegin() const noexcept
d213 1
a213 1
      cend() const noexcept
d217 1
a217 1
      crbegin() const noexcept
d221 1
a221 1
      crend() const noexcept
a228 25
#if __cplusplus >= 201103L
      void
      resize(size_type __sz)
      {
	bool __realloc = _M_requires_reallocation(__sz);
	if (__sz < this->size())
	  this->_M_invalidate_after_nth(__sz);
	_Base::resize(__sz);
	if (__realloc)
	  this->_M_invalidate_all();
	_M_update_guaranteed_capacity();
      }

      void
      resize(size_type __sz, const _Tp& __c)
      {
	bool __realloc = _M_requires_reallocation(__sz);
	if (__sz < this->size())
	  this->_M_invalidate_after_nth(__sz);
	_Base::resize(__sz, __c);
	if (__realloc)
	  this->_M_invalidate_all();
	_M_update_guaranteed_capacity();
      }
#else
d234 1
a234 1
	  this->_M_invalidate_after_nth(__sz);
a239 1
#endif
d241 2
a242 10
#if __cplusplus >= 201103L
      void
      shrink_to_fit()
      {
	if (_Base::_M_shrink_to_fit())
	  {
	    _M_guaranteed_capacity = _Base::capacity();
	    this->_M_invalidate_all();
	  }
      }
d246 1
a246 1
      capacity() const _GLIBCXX_NOEXCEPT
d328 1
a328 1
#if __cplusplus >= 201103L
d351 2
a352 1
	this->_M_invalidate_if(_Equal(--_Base::end()));
d356 1
a356 1
#if __cplusplus >= 201103L
d363 3
a365 3
	  difference_type __offset = __position.base() - _Base::begin();
	  _Base_iterator __res = _Base::emplace(__position.base(),
						std::forward<_Args>(__args)...);
d369 1
a369 1
	    this->_M_invalidate_after_nth(__offset);
d380 2
a381 2
	difference_type __offset = __position.base() - _Base::begin();
	_Base_iterator __res = _Base::insert(__position.base(), __x);
d385 1
a385 1
	  this->_M_invalidate_after_nth(__offset);
d390 1
a390 1
#if __cplusplus >= 201103L
d407 1
a407 1
	difference_type __offset = __position.base() - _Base::begin();
d412 1
a412 1
	  this->_M_invalidate_after_nth(__offset);
a415 4
#if __cplusplus >= 201103L
      template<class _InputIterator,
	       typename = std::_RequireInputIter<_InputIterator>>
#else
a416 1
#endif
d426 3
a428 4
	  _Base_iterator __old_begin = _M_base().begin();
	  difference_type __offset = __position.base() - _Base::begin();
	  _Base::insert(__position.base(), __gnu_debug::__base(__first),
					   __gnu_debug::__base(__last));
d433 1
a433 1
	    this->_M_invalidate_after_nth(__offset);
d441 3
a443 3
	difference_type __offset = __position.base() - _Base::begin();
	_Base_iterator __res = _Base::erase(__position.base());
	this->_M_invalidate_after_nth(__offset);
d454 5
a458 10
	if (__first.base() != __last.base())
	  {
	    difference_type __offset = __first.base() - _Base::begin();
	    _Base_iterator __res = _Base::erase(__first.base(),
						__last.base());
	    this->_M_invalidate_after_nth(__offset);
	    return iterator(__res, this);
	  }
	else
	  return __first;
a462 3
#if __cplusplus >= 201103L
			noexcept(_Alloc_traits::_S_nothrow_swap())
#endif
a463 4
#if __cplusplus >= 201103L
	if (!_Alloc_traits::_S_propagate_on_swap())
	  __glibcxx_check_equal_allocs(__x);
#endif
d470 1
a470 1
      clear() _GLIBCXX_NOEXCEPT
d478 1
a478 1
      _M_base() _GLIBCXX_NOEXCEPT { return *this; }
d481 1
a481 1
      _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
a495 7

      void
      _M_invalidate_after_nth(difference_type __n)
      {
	typedef __gnu_debug::_After_nth_from<_Base_const_iterator> _After_nth;
	this->_M_invalidate_if(_After_nth(__n, _Base::begin()));
      }
d541 1
a541 1
#if __cplusplus >= 201103L
d546 1
a546 1
    : public __hash_base<size_t, __debug::vector<bool, _Alloc>>
d549 2
a550 2
      operator()(const __debug::vector<bool, _Alloc>& __b) const noexcept
      { return std::hash<_GLIBCXX_STD_C::vector<bool, _Alloc>>()
@


1.1.1.1.2.1
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d3 2
a4 1
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
d38 1
a38 1
namespace std _GLIBCXX_VISIBILITY(default)
d46 1
a46 1
    : public _GLIBCXX_STD_C::vector<_Tp, _Allocator>,
d49 2
a50 1
      typedef _GLIBCXX_STD_C::vector<_Tp, _Allocator> _Base;
a51 1
      typedef typename _Base::iterator _Base_iterator;
d53 1
a53 5
      typedef __gnu_debug::_Equal_to<_Base_const_iterator> _Equal;

#if __cplusplus >= 201103L
      typedef __gnu_cxx::__alloc_traits<_Allocator>  _Alloc_traits;
#endif
d59 1
a59 1
      typedef __gnu_debug::_Safe_iterator<_Base_iterator,vector>
d61 1
a61 1
      typedef __gnu_debug::_Safe_iterator<_Base_const_iterator,vector>
d75 1
a75 2
      explicit
      vector(const _Allocator& __a = _Allocator())
d78 2
a79 7
#if __cplusplus >= 201103L
      explicit
      vector(size_type __n, const _Allocator& __a = _Allocator())
      : _Base(__n, __a), _M_guaranteed_capacity(__n) { }

      vector(size_type __n, const _Tp& __value,
	     const _Allocator& __a = _Allocator())
a80 6
#else
      explicit
      vector(size_type __n, const _Tp& __value = _Tp(),
	     const _Allocator& __a = _Allocator())
      : _Base(__n, __value, __a), _M_guaranteed_capacity(__n) { }
#endif
a81 4
#if __cplusplus >= 201103L
      template<class _InputIterator,
	       typename = std::_RequireInputIter<_InputIterator>>
#else
a82 1
#endif
d85 2
a86 3
        : _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
								     __last)),
		__gnu_debug::__base(__last), __a),
d91 1
a91 1
      : _Base(__x), _M_guaranteed_capacity(__x.size()) { }
d95 1
a95 1
      : _Base(__x), _M_guaranteed_capacity(__x.size()) { }
d97 3
a99 3
#if __cplusplus >= 201103L
      vector(vector&& __x) noexcept
      : _Base(std::move(__x)),
a105 11
      vector(const vector& __x, const allocator_type& __a)
      : _Base(__x, __a), _M_guaranteed_capacity(__x.size()) { }

      vector(vector&& __x, const allocator_type& __a)
      : _Base(std::move(__x), __a),
        _M_guaranteed_capacity(this->size())
      {
	__x._M_invalidate_all();
	__x._M_guaranteed_capacity = 0;
      }

d108 1
a108 1
      : _Base(__l, __a),
d112 1
a112 1
      ~vector() _GLIBCXX_NOEXCEPT { }
d123 1
a123 1
#if __cplusplus >= 201103L
d125 1
a125 1
      operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
d127 4
a130 6
	__glibcxx_check_self_move_assign(__x);
	_Base::operator=(std::move(__x));
	this->_M_invalidate_all();
	_M_update_guaranteed_capacity();
	__x._M_invalidate_all();
	__x._M_guaranteed_capacity = 0;
a143 4
#if __cplusplus >= 201103L
      template<typename _InputIterator,
	       typename = std::_RequireInputIter<_InputIterator>>
#else
a144 1
#endif
d149 1
a149 2
	  _Base::assign(__gnu_debug::__base(__first),
			__gnu_debug::__base(__last));
d162 1
a162 1
#if __cplusplus >= 201103L
d176 1
a176 1
      begin() _GLIBCXX_NOEXCEPT
d180 1
a180 1
      begin() const _GLIBCXX_NOEXCEPT
d184 1
a184 1
      end() _GLIBCXX_NOEXCEPT
d188 1
a188 1
      end() const _GLIBCXX_NOEXCEPT
d192 1
a192 1
      rbegin() _GLIBCXX_NOEXCEPT
d196 1
a196 1
      rbegin() const _GLIBCXX_NOEXCEPT
d200 1
a200 1
      rend() _GLIBCXX_NOEXCEPT
d204 1
a204 1
      rend() const _GLIBCXX_NOEXCEPT
d207 1
a207 1
#if __cplusplus >= 201103L
d209 1
a209 1
      cbegin() const noexcept
d213 1
a213 1
      cend() const noexcept
d217 1
a217 1
      crbegin() const noexcept
d221 1
a221 1
      crend() const noexcept
a228 25
#if __cplusplus >= 201103L
      void
      resize(size_type __sz)
      {
	bool __realloc = _M_requires_reallocation(__sz);
	if (__sz < this->size())
	  this->_M_invalidate_after_nth(__sz);
	_Base::resize(__sz);
	if (__realloc)
	  this->_M_invalidate_all();
	_M_update_guaranteed_capacity();
      }

      void
      resize(size_type __sz, const _Tp& __c)
      {
	bool __realloc = _M_requires_reallocation(__sz);
	if (__sz < this->size())
	  this->_M_invalidate_after_nth(__sz);
	_Base::resize(__sz, __c);
	if (__realloc)
	  this->_M_invalidate_all();
	_M_update_guaranteed_capacity();
      }
#else
d234 1
a234 1
	  this->_M_invalidate_after_nth(__sz);
a239 1
#endif
d241 2
a242 10
#if __cplusplus >= 201103L
      void
      shrink_to_fit()
      {
	if (_Base::_M_shrink_to_fit())
	  {
	    _M_guaranteed_capacity = _Base::capacity();
	    this->_M_invalidate_all();
	  }
      }
d246 1
a246 1
      capacity() const _GLIBCXX_NOEXCEPT
d328 1
a328 1
#if __cplusplus >= 201103L
d351 2
a352 1
	this->_M_invalidate_if(_Equal(--_Base::end()));
d356 1
a356 1
#if __cplusplus >= 201103L
d363 3
a365 3
	  difference_type __offset = __position.base() - _Base::begin();
	  _Base_iterator __res = _Base::emplace(__position.base(),
						std::forward<_Args>(__args)...);
d369 1
a369 1
	    this->_M_invalidate_after_nth(__offset);
d380 2
a381 2
	difference_type __offset = __position.base() - _Base::begin();
	_Base_iterator __res = _Base::insert(__position.base(), __x);
d385 1
a385 1
	  this->_M_invalidate_after_nth(__offset);
d390 1
a390 1
#if __cplusplus >= 201103L
d407 1
a407 1
	difference_type __offset = __position.base() - _Base::begin();
d412 1
a412 1
	  this->_M_invalidate_after_nth(__offset);
a415 4
#if __cplusplus >= 201103L
      template<class _InputIterator,
	       typename = std::_RequireInputIter<_InputIterator>>
#else
a416 1
#endif
d426 3
a428 4
	  _Base_iterator __old_begin = _M_base().begin();
	  difference_type __offset = __position.base() - _Base::begin();
	  _Base::insert(__position.base(), __gnu_debug::__base(__first),
					   __gnu_debug::__base(__last));
d433 1
a433 1
	    this->_M_invalidate_after_nth(__offset);
d441 3
a443 3
	difference_type __offset = __position.base() - _Base::begin();
	_Base_iterator __res = _Base::erase(__position.base());
	this->_M_invalidate_after_nth(__offset);
d454 5
a458 10
	if (__first.base() != __last.base())
	  {
	    difference_type __offset = __first.base() - _Base::begin();
	    _Base_iterator __res = _Base::erase(__first.base(),
						__last.base());
	    this->_M_invalidate_after_nth(__offset);
	    return iterator(__res, this);
	  }
	else
	  return __first;
a462 3
#if __cplusplus >= 201103L
			noexcept(_Alloc_traits::_S_nothrow_swap())
#endif
a463 4
#if __cplusplus >= 201103L
	if (!_Alloc_traits::_S_propagate_on_swap())
	  __glibcxx_check_equal_allocs(__x);
#endif
d470 1
a470 1
      clear() _GLIBCXX_NOEXCEPT
d478 1
a478 1
      _M_base() _GLIBCXX_NOEXCEPT { return *this; }
d481 1
a481 1
      _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
a495 7

      void
      _M_invalidate_after_nth(difference_type __n)
      {
	typedef __gnu_debug::_After_nth_from<_Base_const_iterator> _After_nth;
	this->_M_invalidate_if(_After_nth(__n, _Base::begin()));
      }
d541 1
a541 1
#if __cplusplus >= 201103L
d546 1
a546 1
    : public __hash_base<size_t, __debug::vector<bool, _Alloc>>
d549 2
a550 2
      operator()(const __debug::vector<bool, _Alloc>& __b) const noexcept
      { return std::hash<_GLIBCXX_STD_C::vector<bool, _Alloc>>()
@


1.1.1.2
log
@import GCC 4.8 branch at r206687.

highlights from: http://gcc.gnu.org/gcc-4.6/changes.html

   GCC now has stricter checks for invalid command-line options
   New -Wunused-but-set-variable and -Wunused-but-set-parameter
      warnings
   Many platforms have been obsoleted
   Link-time optimization improvements
   A new switch -fstack-usage has been added
   A new function attribute leaf was introduced
   A new warning, enabled by -Wdouble-promotion
   Support for selectively enabling and disabling warnings via
      #pragma GCC diagnostic has been added
   There is now experimental support for some features from the
      upcoming C1X revision of the ISO C standard
   Improved experimental support for the upcoming C++0x ISO C++
      standard
   G++ now issues clearer diagnostics in several cases
   Updates for ARM, x86, MIPS, PPC/PPC64, SPARC
   Darwin, FreeBSD, Solaris 2, MinGW and Cygwin now all support
      __float128 on 32-bit and 64-bit x86 targets. [*1]

highlights from: http://gcc.gnu.org/gcc-4.7/changes.html

   The -fconserve-space flag has been deprecated
   Support for a new parameter --param case-values-threshold=n
      was added
   Interprocedural and Link-time optimization improvements
   A new built-in, __builtin_assume_aligned, has been added
   A new warning option -Wunused-local-typedefs was added
   A new experimental command-line option -ftrack-macro-expansion
      was added
   Support for atomic operations specifying the C++11/C11 memory
      model has been added
   There is support for some more features from the C11 revision
      of the ISO C standard
   Improved experimental support for the new ISO C++ standard,
      C++11
   Updates for ARM, x86, MIPS, PPC/PPC64, SH, SPARC, TILE*
   A new option (-grecord-gcc-switches) was added

highlights from: http://gcc.gnu.org/gcc-4.8/changes.html

   GCC now uses C++ as its implementation language.  This means
      that to build GCC from sources, you will need a C++
      compiler that understands C++ 2003
   DWARF4 is now the default when generating DWARF debug
      information
   A new general optimization level, -Og, has been introduced
   A new option -ftree-partial-pre was added
   The option -fconserve-space has been removed
   The command-line options -fipa-struct-reorg and
      -fipa-matrix-reorg have been removed
   Interprocedural and Link-time optimization improvements
   AddressSanitizer, a fast memory error detector, has been
      added  [*2]
   A new -Wsizeof-pointer-memaccess warning has been added
   G++ now supports a -std=c++1y option for experimentation
      with features proposed for the next revision of the
      standard, expected around 2014
   Improved experimental support for the new ISO C++ standard,
      C++11
   A new port has been added to support AArch64
   Updates for ARM, x86, MIPS, PPC/PPC64, SH, SPARC, TILE*


[*1] we should support this too!
[*2] we should look into this.
     https://code.google.com/p/address-sanitizer/
@
text
@d3 2
a4 1
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
d38 1
a38 1
namespace std _GLIBCXX_VISIBILITY(default)
d46 1
a46 1
    : public _GLIBCXX_STD_C::vector<_Tp, _Allocator>,
d49 2
a50 1
      typedef _GLIBCXX_STD_C::vector<_Tp, _Allocator> _Base;
a51 1
      typedef typename _Base::iterator _Base_iterator;
d53 1
a53 5
      typedef __gnu_debug::_Equal_to<_Base_const_iterator> _Equal;

#if __cplusplus >= 201103L
      typedef __gnu_cxx::__alloc_traits<_Allocator>  _Alloc_traits;
#endif
d59 1
a59 1
      typedef __gnu_debug::_Safe_iterator<_Base_iterator,vector>
d61 1
a61 1
      typedef __gnu_debug::_Safe_iterator<_Base_const_iterator,vector>
d75 1
a75 2
      explicit
      vector(const _Allocator& __a = _Allocator())
d78 2
a79 7
#if __cplusplus >= 201103L
      explicit
      vector(size_type __n, const _Allocator& __a = _Allocator())
      : _Base(__n, __a), _M_guaranteed_capacity(__n) { }

      vector(size_type __n, const _Tp& __value,
	     const _Allocator& __a = _Allocator())
a80 6
#else
      explicit
      vector(size_type __n, const _Tp& __value = _Tp(),
	     const _Allocator& __a = _Allocator())
      : _Base(__n, __value, __a), _M_guaranteed_capacity(__n) { }
#endif
a81 4
#if __cplusplus >= 201103L
      template<class _InputIterator,
	       typename = std::_RequireInputIter<_InputIterator>>
#else
a82 1
#endif
d85 2
a86 3
        : _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
								     __last)),
		__gnu_debug::__base(__last), __a),
d91 1
a91 1
      : _Base(__x), _M_guaranteed_capacity(__x.size()) { }
d95 1
a95 1
      : _Base(__x), _M_guaranteed_capacity(__x.size()) { }
d97 3
a99 3
#if __cplusplus >= 201103L
      vector(vector&& __x) noexcept
      : _Base(std::move(__x)),
a105 11
      vector(const vector& __x, const allocator_type& __a)
      : _Base(__x, __a), _M_guaranteed_capacity(__x.size()) { }

      vector(vector&& __x, const allocator_type& __a)
      : _Base(std::move(__x), __a),
        _M_guaranteed_capacity(this->size())
      {
	__x._M_invalidate_all();
	__x._M_guaranteed_capacity = 0;
      }

d108 1
a108 1
      : _Base(__l, __a),
d112 1
a112 1
      ~vector() _GLIBCXX_NOEXCEPT { }
d123 1
a123 1
#if __cplusplus >= 201103L
d125 1
a125 1
      operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
d127 4
a130 6
	__glibcxx_check_self_move_assign(__x);
	_Base::operator=(std::move(__x));
	this->_M_invalidate_all();
	_M_update_guaranteed_capacity();
	__x._M_invalidate_all();
	__x._M_guaranteed_capacity = 0;
a143 4
#if __cplusplus >= 201103L
      template<typename _InputIterator,
	       typename = std::_RequireInputIter<_InputIterator>>
#else
a144 1
#endif
d149 1
a149 2
	  _Base::assign(__gnu_debug::__base(__first),
			__gnu_debug::__base(__last));
d162 1
a162 1
#if __cplusplus >= 201103L
d176 1
a176 1
      begin() _GLIBCXX_NOEXCEPT
d180 1
a180 1
      begin() const _GLIBCXX_NOEXCEPT
d184 1
a184 1
      end() _GLIBCXX_NOEXCEPT
d188 1
a188 1
      end() const _GLIBCXX_NOEXCEPT
d192 1
a192 1
      rbegin() _GLIBCXX_NOEXCEPT
d196 1
a196 1
      rbegin() const _GLIBCXX_NOEXCEPT
d200 1
a200 1
      rend() _GLIBCXX_NOEXCEPT
d204 1
a204 1
      rend() const _GLIBCXX_NOEXCEPT
d207 1
a207 1
#if __cplusplus >= 201103L
d209 1
a209 1
      cbegin() const noexcept
d213 1
a213 1
      cend() const noexcept
d217 1
a217 1
      crbegin() const noexcept
d221 1
a221 1
      crend() const noexcept
a228 25
#if __cplusplus >= 201103L
      void
      resize(size_type __sz)
      {
	bool __realloc = _M_requires_reallocation(__sz);
	if (__sz < this->size())
	  this->_M_invalidate_after_nth(__sz);
	_Base::resize(__sz);
	if (__realloc)
	  this->_M_invalidate_all();
	_M_update_guaranteed_capacity();
      }

      void
      resize(size_type __sz, const _Tp& __c)
      {
	bool __realloc = _M_requires_reallocation(__sz);
	if (__sz < this->size())
	  this->_M_invalidate_after_nth(__sz);
	_Base::resize(__sz, __c);
	if (__realloc)
	  this->_M_invalidate_all();
	_M_update_guaranteed_capacity();
      }
#else
d234 1
a234 1
	  this->_M_invalidate_after_nth(__sz);
a239 1
#endif
d241 2
a242 10
#if __cplusplus >= 201103L
      void
      shrink_to_fit()
      {
	if (_Base::_M_shrink_to_fit())
	  {
	    _M_guaranteed_capacity = _Base::capacity();
	    this->_M_invalidate_all();
	  }
      }
d246 1
a246 1
      capacity() const _GLIBCXX_NOEXCEPT
d328 1
a328 1
#if __cplusplus >= 201103L
d351 2
a352 1
	this->_M_invalidate_if(_Equal(--_Base::end()));
d356 1
a356 1
#if __cplusplus >= 201103L
d363 3
a365 3
	  difference_type __offset = __position.base() - _Base::begin();
	  _Base_iterator __res = _Base::emplace(__position.base(),
						std::forward<_Args>(__args)...);
d369 1
a369 1
	    this->_M_invalidate_after_nth(__offset);
d380 2
a381 2
	difference_type __offset = __position.base() - _Base::begin();
	_Base_iterator __res = _Base::insert(__position.base(), __x);
d385 1
a385 1
	  this->_M_invalidate_after_nth(__offset);
d390 1
a390 1
#if __cplusplus >= 201103L
d407 1
a407 1
	difference_type __offset = __position.base() - _Base::begin();
d412 1
a412 1
	  this->_M_invalidate_after_nth(__offset);
a415 4
#if __cplusplus >= 201103L
      template<class _InputIterator,
	       typename = std::_RequireInputIter<_InputIterator>>
#else
a416 1
#endif
d426 3
a428 4
	  _Base_iterator __old_begin = _M_base().begin();
	  difference_type __offset = __position.base() - _Base::begin();
	  _Base::insert(__position.base(), __gnu_debug::__base(__first),
					   __gnu_debug::__base(__last));
d433 1
a433 1
	    this->_M_invalidate_after_nth(__offset);
d441 3
a443 3
	difference_type __offset = __position.base() - _Base::begin();
	_Base_iterator __res = _Base::erase(__position.base());
	this->_M_invalidate_after_nth(__offset);
d454 5
a458 10
	if (__first.base() != __last.base())
	  {
	    difference_type __offset = __first.base() - _Base::begin();
	    _Base_iterator __res = _Base::erase(__first.base(),
						__last.base());
	    this->_M_invalidate_after_nth(__offset);
	    return iterator(__res, this);
	  }
	else
	  return __first;
a462 3
#if __cplusplus >= 201103L
			noexcept(_Alloc_traits::_S_nothrow_swap())
#endif
a463 4
#if __cplusplus >= 201103L
	if (!_Alloc_traits::_S_propagate_on_swap())
	  __glibcxx_check_equal_allocs(__x);
#endif
d470 1
a470 1
      clear() _GLIBCXX_NOEXCEPT
d478 1
a478 1
      _M_base() _GLIBCXX_NOEXCEPT { return *this; }
d481 1
a481 1
      _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
a495 7

      void
      _M_invalidate_after_nth(difference_type __n)
      {
	typedef __gnu_debug::_After_nth_from<_Base_const_iterator> _After_nth;
	this->_M_invalidate_if(_After_nth(__n, _Base::begin()));
      }
d541 1
a541 1
#if __cplusplus >= 201103L
d546 1
a546 1
    : public __hash_base<size_t, __debug::vector<bool, _Alloc>>
d549 2
a550 2
      operator()(const __debug::vector<bool, _Alloc>& __b) const noexcept
      { return std::hash<_GLIBCXX_STD_C::vector<bool, _Alloc>>()
@


1.1.1.3
log
@import GCC 5.3.0.  see these urls for details which are too large to
include here:

	http://gcc.gnu.org/gcc-4.9/changes.html
	http://gcc.gnu.org/gcc-5/changes.html

(note that GCC 5.x is a release stream like GCC 4.9.x, 4.8.x, etc.)


the main issues we will have are:

The default mode for C is now -std=gnu11 instead of -std=gnu89.

ARM:
The deprecated option -mwords-little-endian has been removed.
The options -mapcs, -mapcs-frame, -mtpcs-frame and -mtpcs-leaf-frame
 which are only applicable to the old ABI have been deprecated.

MIPS:
The o32 ABI has been modified and extended. The o32 64-bit
 floating-point register support is now obsolete and has been removed.
 It has been replaced by three ABI extensions FPXX, FP64A, and FP64.
 The meaning of the -mfp64 command-line option has changed. It is now
 used to enable the FP64A and FP64 ABI extensions.
@
text
@d3 1
a3 1
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
a34 1
#include <debug/safe_container.h>
a36 63
namespace __gnu_debug
{
  /// Special vector safe base class to add a guaranteed capacity information
  /// useful to detect code relying on the libstdc++ reallocation management
  /// implementation detail.
  template<typename _SafeSequence,
	   typename _BaseSequence>
    class _Safe_vector
    {
      typedef typename _BaseSequence::size_type size_type;

      const _SafeSequence&
      _M_seq() const { return *static_cast<const _SafeSequence*>(this); }

    protected:
      _Safe_vector() _GLIBCXX_NOEXCEPT
	: _M_guaranteed_capacity(0)
      { _M_update_guaranteed_capacity(); }

      _Safe_vector(const _Safe_vector&) _GLIBCXX_NOEXCEPT
	: _M_guaranteed_capacity(0)
      { _M_update_guaranteed_capacity(); }

      _Safe_vector(size_type __n) _GLIBCXX_NOEXCEPT
	: _M_guaranteed_capacity(__n)
      { }

#if __cplusplus >= 201103L
      _Safe_vector(_Safe_vector&& __x) noexcept
	: _Safe_vector()
      { __x._M_guaranteed_capacity = 0; }

      _Safe_vector&
      operator=(const _Safe_vector&) noexcept
      {
	_M_update_guaranteed_capacity();
	return *this;
      }

      _Safe_vector&
      operator=(_Safe_vector&& __x) noexcept
      {
	_M_update_guaranteed_capacity();
	__x._M_guaranteed_capacity = 0;
	return *this;
      }
#endif

      size_type _M_guaranteed_capacity;

      bool
      _M_requires_reallocation(size_type __elements) const _GLIBCXX_NOEXCEPT
      { return __elements > _M_seq().capacity(); }

      void
      _M_update_guaranteed_capacity() _GLIBCXX_NOEXCEPT
      {
	if (_M_seq().size() > _M_guaranteed_capacity)
	  _M_guaranteed_capacity = _M_seq().size();
      }
    };
}

d45 2
a46 6
    : public __gnu_debug::_Safe_container<
	vector<_Tp, _Allocator>, _Allocator, __gnu_debug::_Safe_sequence>,
      public _GLIBCXX_STD_C::vector<_Tp, _Allocator>,
      public __gnu_debug::_Safe_vector<
	vector<_Tp, _Allocator>,
	_GLIBCXX_STD_C::vector<_Tp, _Allocator> >
d48 1
a48 4
      typedef _GLIBCXX_STD_C::vector<_Tp, _Allocator>		_Base;
      typedef __gnu_debug::_Safe_container<
	vector, _Allocator, __gnu_debug::_Safe_sequence>	_Safe;
      typedef __gnu_debug::_Safe_vector<vector, _Base>		_Safe_vector;
d50 2
a51 2
      typedef typename _Base::iterator		_Base_iterator;
      typedef typename _Base::const_iterator	_Base_const_iterator;
d54 4
d59 2
a60 2
      typedef typename _Base::reference			reference;
      typedef typename _Base::const_reference		const_reference;
d62 14
a75 14
      typedef __gnu_debug::_Safe_iterator<
	_Base_iterator, vector>				iterator;
      typedef __gnu_debug::_Safe_iterator<
	_Base_const_iterator, vector>			const_iterator;

      typedef typename _Base::size_type			size_type;
      typedef typename _Base::difference_type		difference_type;

      typedef _Tp					value_type;
      typedef _Allocator				allocator_type;
      typedef typename _Base::pointer			pointer;
      typedef typename _Base::const_pointer		const_pointer;
      typedef std::reverse_iterator<iterator>		reverse_iterator;
      typedef std::reverse_iterator<const_iterator>	const_reverse_iterator;
a77 8

#if __cplusplus < 201103L
      vector() _GLIBCXX_NOEXCEPT
      : _Base() { }
#else
      vector() = default;
#endif

d79 2
a80 2
      vector(const _Allocator& __a) _GLIBCXX_NOEXCEPT
      : _Base(__a) { }
d85 1
a85 1
      : _Base(__n, __a), _Safe_vector(__n) { }
d89 1
a89 1
      : _Base(__n, __value, __a) { }
d94 1
a94 1
      : _Base(__n, __value, __a) { }
d103 1
a103 1
	vector(_InputIterator __first, _InputIterator __last,
d105 1
a105 1
	: _Base(__gnu_debug::__base(__gnu_debug::__check_valid_range(__first,
d107 3
a109 1
		__gnu_debug::__base(__last), __a) { }
a110 1
#if __cplusplus < 201103L
d112 1
a112 1
      : _Base(__x) { }
d114 12
a125 4
      ~vector() _GLIBCXX_NOEXCEPT { }
#else
      vector(const vector&) = default;
      vector(vector&&) = default;
d128 1
a128 1
      : _Base(__x, __a) { }
d131 6
a136 3
      : _Safe(std::move(__x._M_safe()), __a),
	_Base(std::move(__x._M_base()), __a),
	_Safe_vector(std::move(__x)) { }
d140 2
a141 3
      : _Base(__l, __a) { }

      ~vector() = default;
d144 1
a144 3
      /// Construction from a normal-mode vector
      vector(const _Base& __x)
      : _Base(__x) { }
a145 1
#if __cplusplus < 201103L
d149 3
a151 3
	this->_M_safe() = __x;
	_M_base() = __x;
	this->_M_update_guaranteed_capacity();
a153 3
#else
      vector&
      operator=(const vector&) = default;
d155 1
d157 10
a166 1
      operator=(vector&&) = default;
d171 1
a171 1
	_M_base() = __l;
d173 1
a173 1
	this->_M_update_guaranteed_capacity();
d184 3
a186 3
	void
	assign(_InputIterator __first, _InputIterator __last)
	{
d191 1
a191 1
	  this->_M_update_guaranteed_capacity();
d199 1
a199 1
	this->_M_update_guaranteed_capacity();
d208 1
a208 1
	this->_M_update_guaranteed_capacity();
d273 1
a273 1
	bool __realloc = this->_M_requires_reallocation(__sz);
d279 1
a279 1
	this->_M_update_guaranteed_capacity();
d285 1
a285 1
	bool __realloc = this->_M_requires_reallocation(__sz);
d291 1
a291 1
	this->_M_update_guaranteed_capacity();
d297 1
a297 1
	bool __realloc = this->_M_requires_reallocation(__sz);
d303 1
a303 1
	this->_M_update_guaranteed_capacity();
d313 1
a313 1
	    this->_M_guaranteed_capacity = _Base::capacity();
d323 1
a323 1
	return this->_M_guaranteed_capacity;
d334 1
a334 1
	bool __realloc = this->_M_requires_reallocation(__n);
d336 2
a337 2
	if (__n > this->_M_guaranteed_capacity)
	  this->_M_guaranteed_capacity = __n;
d344 1
a344 1
      operator[](size_type __n) _GLIBCXX_NOEXCEPT
d351 1
a351 1
      operator[](size_type __n) const _GLIBCXX_NOEXCEPT
d360 1
a360 1
      front() _GLIBCXX_NOEXCEPT
d367 1
a367 1
      front() const _GLIBCXX_NOEXCEPT
d374 1
a374 1
      back() _GLIBCXX_NOEXCEPT
d381 1
a381 1
      back() const _GLIBCXX_NOEXCEPT
d395 1
a395 1
	bool __realloc = this->_M_requires_reallocation(this->size() + 1);
d399 1
a399 1
	this->_M_update_guaranteed_capacity();
d404 1
a404 1
	typename __gnu_cxx::__enable_if<!std::__are_same<_Up, bool>::__value,
d406 1
a406 1
	push_back(_Tp&& __x)
d410 2
a411 2
	void
	emplace_back(_Args&&... __args)
d413 1
a413 1
	  bool __realloc = this->_M_requires_reallocation(this->size() + 1);
d417 1
a417 1
	  this->_M_update_guaranteed_capacity();
d422 1
a422 1
      pop_back() _GLIBCXX_NOEXCEPT
d431 2
a432 2
	iterator
	emplace(const_iterator __position, _Args&&... __args)
d435 1
a435 1
	  bool __realloc = this->_M_requires_reallocation(this->size() + 1);
d443 1
a443 1
	  this->_M_update_guaranteed_capacity();
a448 3
#if __cplusplus >= 201103L
      insert(const_iterator __position, const _Tp& __x)
#else
a449 1
#endif
d452 1
a452 1
	bool __realloc = this->_M_requires_reallocation(this->size() + 1);
d459 1
a459 1
	this->_M_update_guaranteed_capacity();
d465 1
a465 1
	typename __gnu_cxx::__enable_if<!std::__are_same<_Up, bool>::__value,
d467 2
a468 2
	insert(const_iterator __position, _Tp&& __x)
	{ return emplace(__position, std::move(__x)); }
d470 3
a472 3
      iterator
      insert(const_iterator __position, initializer_list<value_type> __l)
      { return this->insert(__position, __l.begin(), __l.end()); }
a474 16
#if __cplusplus >= 201103L
      iterator
      insert(const_iterator __position, size_type __n, const _Tp& __x)
      {
	__glibcxx_check_insert(__position);
	bool __realloc = this->_M_requires_reallocation(this->size() + __n);
	difference_type __offset = __position.base() - _Base::cbegin();
	_Base_iterator __res = _Base::insert(__position.base(), __n, __x);
	if (__realloc)
	  this->_M_invalidate_all();
	else
	  this->_M_invalidate_after_nth(__offset);
	this->_M_update_guaranteed_capacity();
	return iterator(__res, this);
      }
#else
d479 1
a479 1
	bool __realloc = this->_M_requires_reallocation(this->size() + __n);
d486 1
a486 1
	this->_M_update_guaranteed_capacity();
a487 1
#endif
a491 22
	iterator
	insert(const_iterator __position,
	       _InputIterator __first, _InputIterator __last)
	{
	  __glibcxx_check_insert_range(__position, __first, __last);

	  /* Hard to guess if invalidation will occur, because __last
	     - __first can't be calculated in all cases, so we just
	     punt here by checking if it did occur. */
	  _Base_iterator __old_begin = _M_base().begin();
	  difference_type __offset = __position.base() - _Base::cbegin();
	  _Base_iterator __res = _Base::insert(__position.base(),
					       __gnu_debug::__base(__first),
					       __gnu_debug::__base(__last));

	  if (_M_base().begin() != __old_begin)
	    this->_M_invalidate_all();
	  else
	    this->_M_invalidate_after_nth(__offset);
	  this->_M_update_guaranteed_capacity();
	  return iterator(__res, this);
	}
d494 3
a496 2
	void
	insert(iterator __position,
d498 1
a498 1
	{
d513 1
a513 1
	  this->_M_update_guaranteed_capacity();
a514 1
#endif
a516 3
#if __cplusplus >= 201103L
      erase(const_iterator __position)
#else
a517 1
#endif
a526 3
#if __cplusplus >= 201103L
      erase(const_iterator __first, const_iterator __last)
#else
a527 1
#endif
a541 3
#if __cplusplus >= 201103L
	  return begin() + (__first.base() - cbegin().base());
#else
a542 1
#endif
d548 1
a548 1
	noexcept( noexcept(declval<_Base>().swap(__x)) )
d551 4
a554 1
	_Safe::_M_swap(__x);
d556 2
a557 1
	std::swap(this->_M_guaranteed_capacity, __x._M_guaranteed_capacity);
d565 1
d575 13
d589 1
a589 1
      _M_invalidate_after_nth(difference_type __n) _GLIBCXX_NOEXCEPT
a654 13
namespace __gnu_debug
{
  template<typename _Tp, typename _Alloc>
    struct _Is_contiguous_sequence<std::__debug::vector<_Tp, _Alloc> >
    : std::__true_type
    { };

  template<typename _Alloc>
    struct _Is_contiguous_sequence<std::__debug::vector<bool, _Alloc> >
    : std::__false_type
    { };
}

@


1.1.1.4
log
@import GCC 5.4.0 release.  there's not a lot of new info though at
least these 135 (!) GCC PRs have been fixed by the update:

68730 69714 67550 70209 71254 70839 69737 70067 67355 67172 69239
65779 69546 70272 70421 65985 67339 67411 68309 68585 68679 68890
68949 69009 70139 70494 68162 69135 70306 68965 70297 70635 66786
69098 70347 69719 70526 70941 69400 69577 69447 65689 65886 65932
66655 68269 68789 69614 69648 69666 69764 69794 70044 70052 65726
68910 64289 68671 68835 69669 70329 71204 69355 67364 68049 68998
69323 69743 69995 69146 68651 67755 67484 68790 68907 69099 69496
69509 69516 70393 69222 69703 69939 70609 71004 71005 71036 71037
71038 68636 69013 69606 70115 70333 70430 60290 70356 69305 70024
67781 69414 69140 70510 60164 66635 67896 68106 68298 68449 68779
68921 68986 69037 69147 69194 69366 69399 69705 69917 69969 70613
71317 69268 70269 69032 65702 69219 69484 65996 66680 68283 69603
70350 67451 61397
@
text
@d40 3
a42 6
  /** @@brief Base class for Debug Mode vector.
   *
   * Adds information about the guaranteed capacity, which is useful for
   * detecting code which relies on non-portable implementation details of
   * the libstdc++ reallocation policy.
   */
@


1.1.1.5
log
@import GCC 6.4.0.  see this url for details which are too large to
include here:

   http://gcc.gnu.org/gcc-6/changes.html

the main visible changes appear to be:

- The default mode for C++ is now -std=gnu++14 instead of -std=gnu++98.
- The C and C++ compilers now support attributes on enumerators.
- Diagnostics can now contain "fix-it hints"
- more warnings (some added to -Wall)
@
text
@d3 1
a3 1
// Copyright (C) 2003-2016 Free Software Foundation, Inc.
d250 3
a252 9
	  typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist;
	  __glibcxx_check_valid_range2(__first, __last, __dist);

	  if (__dist.second >= __gnu_debug::__dp_sign)
	    _Base::assign(__gnu_debug::__unsafe(__first),
			  __gnu_debug::__unsafe(__last));
	  else
	    _Base::assign(__first, __last);

d580 1
a580 2
	  typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist;
	  __glibcxx_check_insert_range(__position, __first, __last, __dist);
d587 3
a589 7
	  _Base_iterator __res;
	  if (__dist.second >= __gnu_debug::__dp_sign)
	    __res = _Base::insert(__position.base(),
				  __gnu_debug::__unsafe(__first),
				  __gnu_debug::__unsafe(__last));
	  else
	    __res = _Base::insert(__position.base(), __first, __last);
d604 1
a604 2
	  typename __gnu_debug::_Distance_traits<_InputIterator>::__type __dist;
	  __glibcxx_check_insert_range(__position, __first, __last, __dist);
d611 2
a612 5
	  if (__dist.second >= __gnu_debug::__dp_sign)
	    _Base::insert(__position.base(), __gnu_debug::__unsafe(__first),
					     __gnu_debug::__unsafe(__last));
	  else
	    _Base::insert(__position.base(), __first, __last);
d665 3
a667 1
      _GLIBCXX_NOEXCEPT_IF( noexcept(declval<_Base&>().swap(__x)) )
a734 1
    _GLIBCXX_NOEXCEPT_IF(noexcept(__lhs.swap(__rhs)))
d748 2
a749 1
      { return std::hash<_GLIBCXX_STD_C::vector<bool, _Alloc>>()(__b); }
@


1.1.1.5.4.1
log
@Sync with HEAD
@
text
@d3 1
a3 1
// Copyright (C) 2003-2017 Free Software Foundation, Inc.
a31 2
#pragma GCC system_header

a478 3
#if __cplusplus > 201402L
	reference
#else
a479 1
#endif
a486 3
#if __cplusplus > 201402L
	  return back();
#endif
@


1.1.1.5.4.2
log
@Mostly merge changes from HEAD upto 20200411
@
text
@d3 1
a3 1
// Copyright (C) 2003-2018 Free Software Foundation, Inc.
a759 10
#if __cpp_deduction_guides >= 201606
  template<typename _InputIterator, typename _ValT
	     = typename iterator_traits<_InputIterator>::value_type,
	   typename _Allocator = allocator<_ValT>,
	   typename = _RequireInputIter<_InputIterator>,
	   typename = _RequireAllocator<_Allocator>>
    vector(_InputIterator, _InputIterator, _Allocator = _Allocator())
      -> vector<_ValT, _Allocator>;
#endif

a762 2
_GLIBCXX_BEGIN_NAMESPACE_VERSION

a772 2

_GLIBCXX_END_NAMESPACE_VERSION
@


1.1.1.5.2.1
log
@Sync with HEAD
@
text
@d3 1
a3 1
// Copyright (C) 2003-2017 Free Software Foundation, Inc.
a31 2
#pragma GCC system_header

a478 3
#if __cplusplus > 201402L
	reference
#else
a479 1
#endif
a486 3
#if __cplusplus > 201402L
	  return back();
#endif
@


1.1.1.6
log
@import GCC 7.4.0.  main changes include:

The non-standard C++0x type traits has_trivial_default_constructor,
has_trivial_copy_constructor and has_trivial_copy_assign have been
removed.

On ARM targets (arm*-*-*), a bug introduced in GCC 5 that affects
conformance to the procedure call standard (AAPCS) has been fixed.

Many optimiser improvements

DWARF-5 support.

Many new and enhanced warnings.

Warnings about format strings now underline the pertinent part of
the string, and can offer suggested fixes.

Several new warnings related to buffer overflows and buffer
truncation.

New __builtin_add_overflow_p, __builtin_sub_overflow_p,
__builtin_mul_overflow_p built-ins added that test for overflow.

The C++ front end has experimental support for all of the current
C++17 draft.

The -fverbose-asm option has been expanded to prints comments
showing the source lines that correspond to the assembly.

The gcc and g++ driver programs will now provide suggestions for
misspelled arguments to command-line options.


AArch64 specific:

GCC has been updated to the latest revision of the procedure call
standard (AAPCS64) to provide support for parameter passing when
data types have been over-aligned.

The ARMv8.2-A and ARMv8.3-A architecture are now supported.

ARM specific:

Support for the ARMv5 and ARMv5E architectures has been
deprecated (which have no known implementations).

A new command-line option -mpure-code has been added. It does not
allow constant data to be placed in code sections.

x86 specific:

Support for the AVX-512 4FMAPS, 4VNNIW, VPOPCNTDQ and Software
Guard Extensions (SGX) ISA extensions has been added.

PPC specific:

GCC now diagnoses inline assembly that clobbers register r2.

RISC-V specific:

Support for the RISC-V instruction set has been added.

SH specific:

Support for SH5/SH64 has been removed.

Support for SH2A has been enhanced.
@
text
@d3 1
a3 1
// Copyright (C) 2003-2017 Free Software Foundation, Inc.
a31 2
#pragma GCC system_header

a478 3
#if __cplusplus > 201402L
	reference
#else
a479 1
#endif
a486 3
#if __cplusplus > 201402L
	  return back();
#endif
@


1.1.1.7
log
@import GCC 8.3.  it includes these new features:
- many optimisations improved: inter-procedural, profile-directed,
  LTO, loops including user-controllable unroll support, and more.
- columns numbers added to line numbers in dwarf
- gcov extended significantly
- many sanitizer updates
- many new warning messages
- many better hints and more useful error messages
- minor ABI changes on x86-64 libstdc++, and some c++17 modes
- draft c++2a features
- better c++17 experimental support
- Armv8.4-A supported, better 8.2-A and 8.3-A support, including
  32 bit arm port.  cortex a-55, a-75 and a-55.a-75 combo support.
- in the GCC bugzilla, 8.1 shows 1149 bugs fixed, 8.2 shows 100, and
  8.3 shows 158.
@
text
@d3 1
a3 1
// Copyright (C) 2003-2018 Free Software Foundation, Inc.
a759 10
#if __cpp_deduction_guides >= 201606
  template<typename _InputIterator, typename _ValT
	     = typename iterator_traits<_InputIterator>::value_type,
	   typename _Allocator = allocator<_ValT>,
	   typename = _RequireInputIter<_InputIterator>,
	   typename = _RequireAllocator<_Allocator>>
    vector(_InputIterator, _InputIterator, _Allocator = _Allocator())
      -> vector<_ValT, _Allocator>;
#endif

a762 2
_GLIBCXX_BEGIN_NAMESPACE_VERSION

a772 2

_GLIBCXX_END_NAMESPACE_VERSION
@


1.1.1.8
log
@import GCC 7.5.0.  doing this here so that the vendor branch has
the code we'll merge into gcc.old and the netbsd-9 tree gcc tree.
GCC 8.4.0 will be imported immediately on top of this again,
restoring the current status.

these PRs in the GCC bugzilla are fixed with this update:

89869 80693 89795 84272 85593 86669 87148 87647 87895 88103 88107 88563
88870 88976 89002 89187 89195 89234 89303 89314 89354 89361 89403 89412
89512 89520 89590 89621 89663 89679 89704 89734 89872 89933 90090 90208
87075 85870 89009 89242 88167 80864 81933 85890 86608 87145 88857 89024
89119 89214 89511 89612 89705 89400 81740 82186 84552 86554 87609 88105
88149 88415 88739 88903 89135 89223 89296 89505 89572 89677 89698 89710
90006 90020 90071 90328 90474 91126 91162 91812 91887 90075 88998 89945
87047 87506 88074 88656 88740 91137 89008 84010 89349 91136 91347 91995
89397 87030 60702 78884 85594 87649 87725 88181 88470 88553 88568 88588
88620 88644 88906 88949 89246 89587 89726 89768 89796 89998 90108 90756
90950 91704 88825 88983 86538 51333 89446 90220 91308 92143 89392 90213
90278 91131 91200 91510 89037 91481 87673 88418 88938 88948 90547 27221
58321 61250 67183 67958 77583 83531 86215 88648 88720 88726 89091 89466
89629 90105 90329 90585 90760 90924 91087 89222 81956 71861 35031 69455
81849 82993 85798 88138 88155 88169 88205 88206 88228 88249 88269 88376
77703 80260 82077 86248 88393 90786 57048 66089 66695 67679 68009 71723
72714 84394 85544 87734 88298 90937 91557 63891 64132 65342 68649 68717
71066 71860 71935 77746 78421 78645 78865 78983 79485 79540 85953 88326
89651 90744
@
text
@d3 1
a3 1
// Copyright (C) 2003-2017 Free Software Foundation, Inc.
d760 10
d773 2
d785 2
@


1.1.1.9
log
@re-import GCC 8.4.0.
@
text
@d3 1
a3 1
// Copyright (C) 2003-2018 Free Software Foundation, Inc.
a759 10
#if __cpp_deduction_guides >= 201606
  template<typename _InputIterator, typename _ValT
	     = typename iterator_traits<_InputIterator>::value_type,
	   typename _Allocator = allocator<_ValT>,
	   typename = _RequireInputIter<_InputIterator>,
	   typename = _RequireAllocator<_Allocator>>
    vector(_InputIterator, _InputIterator, _Allocator = _Allocator())
      -> vector<_ValT, _Allocator>;
#endif

a762 2
_GLIBCXX_BEGIN_NAMESPACE_VERSION

a772 2

_GLIBCXX_END_NAMESPACE_VERSION
@


1.1.1.10
log
@initial import of GCC 9.3.0.  changes include:

- live patching support
- shell completion help
- generally better diagnostic output (less verbose/more useful)
- diagnostics and optimisation choices can be emitted in json
- asan memory usage reduction
- many general, and specific to switch, inter-procedure,
  profile and link-time optimisations.  from the release notes:
  "Overall compile time of Firefox 66 and LibreOffice 6.2.3 on
  an 8-core machine was reduced by about 5% compared to GCC 8.3"
- OpenMP 5.0 support
- better spell-guesser
- partial experimental support for c2x and c++2a
- c++17 is no longer experimental
- arm AAPCS GCC 6-8 structure passing bug fixed, may cause
  incompatibility (restored compat with GCC 5 and earlier.)
- openrisc support
@
text
@d3 1
a3 1
// Copyright (C) 2003-2019 Free Software Foundation, Inc.
a33 5
#include <bits/c++config.h>
namespace std _GLIBCXX_VISIBILITY(default) { namespace __debug {
  template<typename _Tp, typename _Allocator> class vector;
} } // namespace std::__debug

a129 3
      template<typename _ItT, typename _SeqT, typename _CatT>
	friend class ::__gnu_debug::_Safe_iterator;

d185 2
a186 2
	: _Base(__gnu_debug::__base(
		  __glibcxx_check_valid_constructor_range(__first, __last)),
a201 2
	noexcept( noexcept(
	  _Base(std::declval<_Base&&>()), std::declval<const allocator_type&>()) )
d514 1
a514 1
	  difference_type __offset = __position.base() - _Base::cbegin();
d522 1
a522 1
	  return { __res, this };
d570 1
a570 1
	return { __res, this };
d616 1
a616 1
	  return { __res, this };
d681 1
a681 1
	  return { _Base::begin() + (__first.base() - _Base::cbegin()), this };
d772 1
a774 1
#if __cplusplus >= 201103L
d785 2
a788 22
 template<typename _Iterator, typename _Container, typename _Sequence>
    _Iterator
    __niter_base(const __gnu_debug::_Safe_iterator<
		 __gnu_cxx::__normal_iterator<_Iterator, _Container>,
		 _Sequence, std::random_access_iterator_tag>& __it)
    { return std::__niter_base(__it.base()); }

#if __cplusplus >= 201703L
  namespace __detail::__variant
  {
    template<typename> struct _Never_valueless_alt; // see <variant>

    // Provide the strong exception-safety guarantee when emplacing a
    // vector into a variant, but only if move assignment cannot throw.
    template<typename _Tp, typename _Alloc>
      struct _Never_valueless_alt<__debug::vector<_Tp, _Alloc>>
      : std::is_nothrow_move_assignable<__debug::vector<_Tp, _Alloc>>
      { };
  }  // namespace __detail::__variant
#endif // C++17

_GLIBCXX_END_NAMESPACE_VERSION
@


1.1.1.11
log
@initial import of GCC 10.3.0.  main changes include:

caveats:
- ABI issue between c++14 and c++17 fixed
- profile mode is removed from libstdc++
- -fno-common is now the default

new features:
- new flags -fallocation-dce, -fprofile-partial-training,
  -fprofile-reproducible, -fprofile-prefix-path, and -fanalyzer
- many new compile and link time optimisations
- enhanced drive optimisations
- openacc 2.6 support
- openmp 5.0 features
- new warnings: -Wstring-compare and -Wzero-length-bounds
- extended warnings: -Warray-bounds, -Wformat-overflow,
  -Wrestrict, -Wreturn-local-addr, -Wstringop-overflow,
  -Warith-conversion, -Wmismatched-tags, and -Wredundant-tags
- some likely C2X features implemented
- more C++20 implemented
- many new arm & intel CPUs known

hundreds of reported bugs are fixed.  full list of changes
can be found at:

   https://gcc.gnu.org/gcc-10/changes.html
@
text
@d3 1
a3 1
// Copyright (C) 2003-2020 Free Software Foundation, Inc.
a733 6
#if __cpp_lib_three_way_comparison
  template<typename _Tp, typename _Alloc>
    constexpr __detail::__synth3way_t<_Tp>
    operator<=>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
    { return __x._M_base() <=> __y._M_base(); }
#else
a762 1
#endif // three-way comparison
d797 7
@


1.1.1.12
log
@initial import of GCC 12.3.0.

major changes in GCC 11 included:

- The default mode for C++ is now -std=gnu++17 instead of -std=gnu++14.
- When building GCC itself, the host compiler must now support C++11,
  rather than C++98.
- Some short options of the gcov tool have been renamed: -i to -j and
  -j to -H.
- ThreadSanitizer improvements.
- Introduce Hardware-assisted AddressSanitizer support.
- For targets that produce DWARF debugging information GCC now defaults
  to DWARF version 5. This can produce up to 25% more compact debug
  information compared to earlier versions.
- Many optimisations.
- The existing malloc attribute has been extended so that it can be
  used to identify allocator/deallocator API pairs. A pair of new
  -Wmismatched-dealloc and -Wmismatched-new-delete warnings are added.
- Other new warnings:
  -Wsizeof-array-div, enabled by -Wall, warns about divisions of two
    sizeof operators when the first one is applied to an array and the
    divisor does not equal the size of the array element.
  -Wstringop-overread, enabled by default, warns about calls to string
    functions reading past the end of the arrays passed to them as
    arguments.
  -Wtsan, enabled by default, warns about unsupported features in
    ThreadSanitizer (currently std::atomic_thread_fence).
- Enchanced warnings:
  -Wfree-nonheap-object detects many more instances of calls to
    deallocation functions with pointers not returned from a dynamic
    memory allocation function.
  -Wmaybe-uninitialized diagnoses passing pointers or references to
    uninitialized memory to functions taking const-qualified arguments.
  -Wuninitialized detects reads from uninitialized dynamically
    allocated memory.
  -Warray-parameter warns about functions with inconsistent array forms.
  -Wvla-parameter warns about functions with inconsistent VLA forms.
- Several new features from the upcoming C2X revision of the ISO C
  standard are supported with -std=c2x and -std=gnu2x.
- Several C++20 features have been implemented.
- The C++ front end has experimental support for some of the upcoming
  C++23 draft.
- Several new C++ warnings.
- Enhanced Arm, AArch64, x86, and RISC-V CPU support.
- The implementation of how program state is tracked within
  -fanalyzer has been completely rewritten with many enhancements.

see https://gcc.gnu.org/gcc-11/changes.html for a full list.

major changes in GCC 12 include:

- An ABI incompatibility between C and C++ when passing or returning
  by value certain aggregates containing zero width bit-fields has
  been discovered on various targets. x86-64, ARM and AArch64
  will always ignore them (so there is a C ABI incompatibility
  between GCC 11 and earlier with GCC 12 or later), PowerPC64 ELFv2
  always take them into account (so there is a C++ ABI
  incompatibility, GCC 4.4 and earlier compatible with GCC 12 or
  later, incompatible with GCC 4.5 through GCC 11). RISC-V has
  changed the handling of these already starting with GCC 10. As
  the ABI requires, MIPS takes them into account handling function
  return values so there is a C++ ABI incompatibility with GCC 4.5
  through 11.
- STABS: Support for emitting the STABS debugging format is
  deprecated and will be removed in the next release. All ports now
  default to emit DWARF (version 2 or later) debugging info or are
  obsoleted.
- Vectorization is enabled at -O2 which is now equivalent to the
  original -O2 -ftree-vectorize -fvect-cost-model=very-cheap.
- GCC now supports the ShadowCallStack sanitizer.
- Support for __builtin_shufflevector compatible with the clang
  language extension was added.
- Support for attribute unavailable was added.
- Support for __builtin_dynamic_object_size compatible with the
  clang language extension was added.
- New warnings:
  -Wbidi-chars warns about potentially misleading UTF-8
    bidirectional control characters.
  -Warray-compare warns about comparisons between two operands of
    array type.
- Some new features from the upcoming C2X revision of the ISO C
  standard are supported with -std=c2x and -std=gnu2x.
- Several C++23 features have been implemented.
- Many C++ enhancements across warnings and -f options.

see https://gcc.gnu.org/gcc-12/changes.html for a full list.
@
text
@d3 1
a3 1
// Copyright (C) 2003-2022 Free Software Foundation, Inc.
d40 1
d75 5
d81 1
a81 1
      operator=(const _Safe_vector&) _GLIBCXX_NOEXCEPT
a86 5
#if __cplusplus >= 201103L
      _Safe_vector(_Safe_vector&& __x) noexcept
	: _Safe_vector()
      { __x._M_guaranteed_capacity = 0; }

a137 10
      // Reference wrapper for base class. Disambiguates vector(const _Base&)
      // from copy constructor by requiring a user-defined conversion.
      // See PR libstdc++/90102.
      struct _Base_ref
      {
	_Base_ref(const _Base& __r) : _M_ref(__r) { }

	const _Base& _M_ref;
      };

d175 1
a175 1
      vector(size_type __n, const __type_identity_t<_Tp>& __value,
d206 1
a206 1
      vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
d209 5
a213 6
      vector(vector&& __x, const __type_identity_t<allocator_type>& __a)
      noexcept(
	std::is_nothrow_constructible<_Base,
	  _Base, const allocator_type&>::value )
      : _Safe(std::move(__x), __a),
	_Base(std::move(__x), __a),
d224 2
a225 2
      vector(_Base_ref __x)
      : _Base(__x._M_ref) { }
d227 10
a236 1
#if __cplusplus >= 201103L
d246 1
a246 1
	_Base::operator=(__l);
a295 1
      _GLIBCXX_NODISCARD
a299 1
      _GLIBCXX_NODISCARD
a303 1
      _GLIBCXX_NODISCARD
a307 1
      _GLIBCXX_NODISCARD
a311 1
      _GLIBCXX_NODISCARD
a315 1
      _GLIBCXX_NODISCARD
a319 1
      _GLIBCXX_NODISCARD
a323 1
      _GLIBCXX_NODISCARD
a328 1
      [[__nodiscard__]]
a332 1
      [[__nodiscard__]]
a336 1
      [[__nodiscard__]]
a340 1
      [[__nodiscard__]]
a399 1
      _GLIBCXX_NODISCARD
a423 1
      _GLIBCXX_NODISCARD
d428 1
a428 1
	return _Base::operator[](__n);
a430 1
      _GLIBCXX_NODISCARD
d435 1
a435 1
	return _Base::operator[](__n);
a439 1
      _GLIBCXX_NODISCARD
a446 1
      _GLIBCXX_NODISCARD
a453 1
      _GLIBCXX_NODISCARD
a460 1
      _GLIBCXX_NODISCARD
a784 5

  template<typename _Tp, typename _Allocator = allocator<_Tp>,
	   typename = _RequireAllocator<_Allocator>>
    vector(size_t, _Tp, _Allocator = _Allocator())
      -> vector<_Tp, _Allocator>;
@


1.1.1.13
log
@initial import of GCC 14.3.0.

major changes in GCC 13:
- improved sanitizer
- zstd debug info compression
- LTO improvements
- SARIF based diagnostic support
- new warnings: -Wxor-used-as-pow, -Wenum-int-mismatch, -Wself-move,
  -Wdangling-reference
- many new -Wanalyzer* specific warnings
- enhanced warnings: -Wpessimizing-move, -Wredundant-move
- new attributes to mark file descriptors, c++23 "assume"
- several C23 features added
- several C++23 features added
- many new features for Arm, x86, RISC-V

major changes in GCC 14:
- more strict C99 or newer support
- ia64* marked deprecated (but seemingly still in GCC 15.)
- several new hardening features
- support for "hardbool", which can have user supplied values of true/false
- explicit support for stack scrubbing upon function exit
- better auto-vectorisation support
- added clang-compatible __has_feature and __has_extension
- more C23, including -std=c23
- several C++26 features added
- better diagnostics in C++ templates
- new warnings: -Wnrvo, Welaborated-enum-base
- many new features for Arm, x86, RISC-V
- possible ABI breaking change for SPARC64 and small structures with arrays
  of floats.
@
text
@d3 1
a3 1
// Copyright (C) 2003-2024 Free Software Foundation, Inc.
a57 1
      _GLIBCXX20_CONSTEXPR
a61 1
      _GLIBCXX20_CONSTEXPR
a65 1
      _GLIBCXX20_CONSTEXPR
a69 1
      _GLIBCXX20_CONSTEXPR
a73 1
      _GLIBCXX20_CONSTEXPR
a81 1
      _GLIBCXX20_CONSTEXPR
a85 1
      _GLIBCXX20_CONSTEXPR
a100 1
      _GLIBCXX20_CONSTEXPR
a174 1
      _GLIBCXX20_CONSTEXPR
a179 1
      _GLIBCXX20_CONSTEXPR
a183 1
      _GLIBCXX20_CONSTEXPR
a199 1
	_GLIBCXX20_CONSTEXPR
d202 2
a203 2
	: _Base(__gnu_debug::__base(std::__is_constant_evaluated() ? __first
		  : __glibcxx_check_valid_constructor_range(__first, __last)),
a214 1
      _GLIBCXX20_CONSTEXPR
a217 1
      _GLIBCXX20_CONSTEXPR
a225 1
      _GLIBCXX20_CONSTEXPR
a233 1
      _GLIBCXX20_CONSTEXPR
a243 1
      _GLIBCXX20_CONSTEXPR
d248 2
a249 5
	if (!std::__is_constant_evaluated())
	  {
	    this->_M_invalidate_all();
	    this->_M_update_guaranteed_capacity();
	  }
a259 1
	_GLIBCXX20_CONSTEXPR
a262 4
	  if (std::__is_constant_evaluated())
	    return _Base::assign(__gnu_debug::__unsafe(__first),
				 __gnu_debug::__unsafe(__last));

a275 1
      _GLIBCXX20_CONSTEXPR
d280 2
a281 5
	if (!std::__is_constant_evaluated())
	  {
	    this->_M_invalidate_all();
	    this->_M_update_guaranteed_capacity();
	  }
a284 1
      _GLIBCXX20_CONSTEXPR
d289 2
a290 5
	if (!std::__is_constant_evaluated())
	  {
	    this->_M_invalidate_all();
	    this->_M_update_guaranteed_capacity();
	  }
a297 1
      _GLIBCXX20_CONSTEXPR
a302 1
      _GLIBCXX20_CONSTEXPR
a307 1
      _GLIBCXX20_CONSTEXPR
a312 1
      _GLIBCXX20_CONSTEXPR
a317 1
      _GLIBCXX20_CONSTEXPR
a322 1
      _GLIBCXX20_CONSTEXPR
a327 1
      _GLIBCXX20_CONSTEXPR
a332 1
      _GLIBCXX20_CONSTEXPR
a338 1
      _GLIBCXX20_CONSTEXPR
a343 1
      _GLIBCXX20_CONSTEXPR
a348 1
      _GLIBCXX20_CONSTEXPR
a353 1
      _GLIBCXX20_CONSTEXPR
a363 1
      _GLIBCXX20_CONSTEXPR
a366 3
	if (std::__is_constant_evaluated())
	  return _Base::resize(__sz);

a375 1
      _GLIBCXX20_CONSTEXPR
a378 3
	if (std::__is_constant_evaluated())
	  return _Base::resize(__sz, __c);

a401 1
      _GLIBCXX20_CONSTEXPR
a404 3
	if (std::__is_constant_evaluated())
	  return _Base::shrink_to_fit();

a413 1
      _GLIBCXX20_CONSTEXPR
a416 3
	if (std::__is_constant_evaluated())
	  return _Base::capacity();

a425 1
      _GLIBCXX20_CONSTEXPR
a428 3
	if (std::__is_constant_evaluated())
	  return _Base::reserve(__n);

a438 1
      _GLIBCXX20_CONSTEXPR
a446 1
      _GLIBCXX20_CONSTEXPR
a456 1
      _GLIBCXX20_CONSTEXPR
a464 1
      _GLIBCXX20_CONSTEXPR
a472 1
      _GLIBCXX20_CONSTEXPR
a480 1
      _GLIBCXX20_CONSTEXPR
a492 1
      _GLIBCXX20_CONSTEXPR
a495 3
	if (std::__is_constant_evaluated())
	  return _Base::push_back(__x);

a504 1
	_GLIBCXX20_CONSTEXPR
a510 1
	_GLIBCXX20_CONSTEXPR
a517 3
	  if (std::__is_constant_evaluated())
	    return _Base::emplace_back(std::forward<_Args>(__args)...);

a528 1
      _GLIBCXX20_CONSTEXPR
d532 2
a533 5
	if (!std::__is_constant_evaluated())
	  {
	    __glibcxx_check_nonempty();
	    this->_M_invalidate_if(_Equal(--_Base::end()));
	  }
a538 1
	_GLIBCXX20_CONSTEXPR
a541 5
	  if (std::__is_constant_evaluated())
	    return iterator(_Base::emplace(__position.base(),
					   std::forward<_Args>(__args)...),
			    this);

a555 1
      _GLIBCXX20_CONSTEXPR
a562 3
	if (std::__is_constant_evaluated())
	  return iterator(_Base::insert(__position.base(), __x), this);

a576 1
	_GLIBCXX20_CONSTEXPR
a581 1
      _GLIBCXX20_CONSTEXPR
a587 1
      _GLIBCXX20_CONSTEXPR
a590 3
	if (std::__is_constant_evaluated())
	  return iterator(_Base::insert(__position.base(), __n, __x), this);

a620 1
	_GLIBCXX20_CONSTEXPR
a624 5
	  if (std::__is_constant_evaluated())
	    return iterator(_Base::insert(__position.base(),
					  __gnu_debug::__unsafe(__first),
					  __gnu_debug::__unsafe(__last)), this);

a675 1
      _GLIBCXX20_CONSTEXPR
a682 3
	if (std::__is_constant_evaluated())
	  return iterator(_Base::erase(__position.base()), this);

a689 1
      _GLIBCXX20_CONSTEXPR
a696 3
	if (std::__is_constant_evaluated())
	  return iterator(_Base::erase(__first.base(), __last.base()), this);

a716 1
      _GLIBCXX20_CONSTEXPR
d721 1
a721 2
	if (!std::__is_constant_evaluated())
	  _Safe::_M_swap(__x);
a725 1
      _GLIBCXX20_CONSTEXPR
d730 1
a730 2
	if (!std::__is_constant_evaluated())
	  this->_M_invalidate_all();
a732 1
      _GLIBCXX20_CONSTEXPR
a735 1
      _GLIBCXX20_CONSTEXPR
a748 1
    _GLIBCXX_NODISCARD _GLIBCXX20_CONSTEXPR
a755 1
    [[nodiscard]]
a760 1
    _GLIBCXX_NODISCARD
a766 1
    _GLIBCXX_NODISCARD
a772 1
    _GLIBCXX_NODISCARD
a778 1
    _GLIBCXX_NODISCARD
a784 1
    _GLIBCXX_NODISCARD
a791 1
    _GLIBCXX20_CONSTEXPR
@


