0x0000000000000000
     ˆÆÊ„Ž´ß¿Ç ?÷     // Profiling list implementation -*- C++ -*-

// Copyright (C) 2009-2013 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 profile/list
 *  This file is a GNU profile extension to the Standard C++ Library.
 */

#ifndef _GLIBCXX_PROFILE_LIST
#define _GLIBCXX_PROFILE_LIST 1

#include <list>
#include <profile/base.h> 
#include <profile/iterator_tracker.h> 

namespace std _GLIBCXX_VISIBILITY(default)
{
namespace __profile
{
  /** @brief List wrapper with performance instrumentation.  */
template<typename _Tp, typename _Allocator = std::allocator<_Tp> >
    class list
    : public _GLIBCXX_STD_C::list<_Tp, _Allocator>
    {
      typedef _GLIBCXX_STD_C::list<_Tp, _Allocator> _Base;

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

      typedef __iterator_tracker<typename _Base::iterator, list>        
				                    iterator;
      typedef __iterator_tracker<typename _Base::const_iterator, list>  
                                                    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.2.1 construct/copy/destroy:
      explicit
      list(const _Allocator& __a = _Allocator())
      : _Base(__a) 
      {
        __profcxx_list_construct(this); 	// list2slist
        __profcxx_list_construct2(this); 	// list2vector
      }

#if __cplusplus >= 201103L
      explicit
      list(size_type __n)
      : _Base(__n) 
      {
        __profcxx_list_construct(this); 
        __profcxx_list_construct2(this); 
      }

      list(size_type __n, const _Tp& __value,
	   const _Allocator& __a = _Allocator())
      : _Base(__n, __value, __a) 
      {
        __profcxx_list_construct(this); 
        __profcxx_list_construct2(this); 
      }
#else
      explicit
      list(size_type __n, const _Tp& __value = _Tp(),
	   const _Allocator& __a = _Allocator())
      : _Base(__n, __value, __a) 
      {
        __profcxx_list_construct(this); 
        __profcxx_list_construct2(this); 
      }
#endif

#if __cplusplus >= 201103L
      template<typename _InputIterator,
	       typename = std::_RequireInputIter<_InputIterator>>
#else
      template<class _InputIterator>
#endif
      list(_InputIterator __first, _InputIterator __last,
	   const _Allocator& __a = _Allocator())
      : _Base(__first, __last, __a)
      {
        __profcxx_list_construct(this); 
        __profcxx_list_construct2(this); 
      }

      list(const list& __x)
      : _Base(__x) 
      {
        __profcxx_list_construct(this); 
        __profcxx_list_construct2(this); 
      }

      list(const _B