OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-dev/] [fsf-gcc-snapshot-1-mar-12/] [or1k-gcc/] [libstdc++-v3/] [include/] [profile/] [forward_list] - Diff between revs 742 and 783

Only display areas with differences | Details | Blame | View Log

Rev 742 Rev 783
//  -*- C++ -*-
//  -*- C++ -*-
// Copyright (C) 2010, 2011 Free Software Foundation, Inc.
// Copyright (C) 2010, 2011 Free Software Foundation, Inc.
//
//
// This file is part of the GNU ISO C++ Library.  This library is free
// 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
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// any later version.
// This library is distributed in the hope that it will be useful,
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// 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;
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// .
// .
/** @file profile/forward_list
/** @file profile/forward_list
 *  This file is a GNU debug extension to the Standard C++ Library.
 *  This file is a GNU debug extension to the Standard C++ Library.
 */
 */
#ifndef _GLIBCXX_PROFILE_FORWARD_LIST
#ifndef _GLIBCXX_PROFILE_FORWARD_LIST
#define _GLIBCXX_PROFILE_FORWARD_LIST 1
#define _GLIBCXX_PROFILE_FORWARD_LIST 1
#ifndef __GXX_EXPERIMENTAL_CXX0X__
#ifndef __GXX_EXPERIMENTAL_CXX0X__
# include 
# include 
#else
#else
#include 
#include 
namespace std _GLIBCXX_VISIBILITY(default)
namespace std _GLIBCXX_VISIBILITY(default)
{
{
namespace __profile
namespace __profile
{
{
  /// Class std::forward_list wrapper with performance instrumentation.
  /// Class std::forward_list wrapper with performance instrumentation.
  template >
  template >
    class forward_list
    class forward_list
    : public _GLIBCXX_STD_C::forward_list<_Tp, _Alloc>
    : public _GLIBCXX_STD_C::forward_list<_Tp, _Alloc>
    {
    {
      typedef _GLIBCXX_STD_C::forward_list<_Tp, _Alloc> _Base;
      typedef _GLIBCXX_STD_C::forward_list<_Tp, _Alloc> _Base;
    public:
    public:
      typedef typename _Base::size_type             size_type;
      typedef typename _Base::size_type             size_type;
    public:
    public:
      // 23.2.3.1 construct/copy/destroy:
      // 23.2.3.1 construct/copy/destroy:
      explicit
      explicit
      forward_list(const _Alloc& __al = _Alloc())
      forward_list(const _Alloc& __al = _Alloc())
      : _Base(__al) { }
      : _Base(__al) { }
      forward_list(const forward_list& __list, const _Alloc& __al)
      forward_list(const forward_list& __list, const _Alloc& __al)
      : _Base(__list, __al)
      : _Base(__list, __al)
      { }
      { }
      forward_list(forward_list&& __list, const _Alloc& __al)
      forward_list(forward_list&& __list, const _Alloc& __al)
      : _Base(std::move(__list), __al)
      : _Base(std::move(__list), __al)
      { }
      { }
      explicit
      explicit
      forward_list(size_type __n)
      forward_list(size_type __n)
      : _Base(__n)
      : _Base(__n)
      { }
      { }
      forward_list(size_type __n, const _Tp& __value,
      forward_list(size_type __n, const _Tp& __value,
                   const _Alloc& __al = _Alloc())
                   const _Alloc& __al = _Alloc())
      : _Base(__n, __value, __al)
      : _Base(__n, __value, __al)
      { }
      { }
      template
      template
        forward_list(_InputIterator __first, _InputIterator __last,
        forward_list(_InputIterator __first, _InputIterator __last,
                     const _Alloc& __al = _Alloc())
                     const _Alloc& __al = _Alloc())
        : _Base(__first, __last, __al)
        : _Base(__first, __last, __al)
        { }
        { }
      forward_list(const forward_list& __list)
      forward_list(const forward_list& __list)
      : _Base(__list)
      : _Base(__list)
      { }
      { }
      forward_list(forward_list&& __list) noexcept
      forward_list(forward_list&& __list) noexcept
      : _Base(std::move(__list)) { }
      : _Base(std::move(__list)) { }
      forward_list(std::initializer_list<_Tp> __il,
      forward_list(std::initializer_list<_Tp> __il,
                   const _Alloc& __al = _Alloc())
                   const _Alloc& __al = _Alloc())
      : _Base(__il, __al)
      : _Base(__il, __al)
      { }
      { }
      ~forward_list() noexcept
      ~forward_list() noexcept
      { }
      { }
      forward_list&
      forward_list&
      operator=(const forward_list& __list)
      operator=(const forward_list& __list)
      {
      {
        static_cast<_Base&>(*this) = __list;
        static_cast<_Base&>(*this) = __list;
        return *this;
        return *this;
      }
      }
      forward_list&
      forward_list&
      operator=(forward_list&& __list)
      operator=(forward_list&& __list)
      {
      {
        // NB: DR 1204.
        // NB: DR 1204.
        // NB: DR 675.
        // NB: DR 675.
        _Base::clear();
        _Base::clear();
        _Base::swap(__list);
        _Base::swap(__list);
        return *this;
        return *this;
      }
      }
      forward_list&
      forward_list&
      operator=(std::initializer_list<_Tp> __il)
      operator=(std::initializer_list<_Tp> __il)
      {
      {
        static_cast<_Base&>(*this) = __il;
        static_cast<_Base&>(*this) = __il;
        return *this;
        return *this;
      }
      }
      _Base&
      _Base&
      _M_base() noexcept       { return *this; }
      _M_base() noexcept       { return *this; }
      const _Base&
      const _Base&
      _M_base() const noexcept { return *this; }
      _M_base() const noexcept { return *this; }
    };
    };
  template
  template
    inline bool
    inline bool
    operator==(const forward_list<_Tp, _Alloc>& __lx,
    operator==(const forward_list<_Tp, _Alloc>& __lx,
               const forward_list<_Tp, _Alloc>& __ly)
               const forward_list<_Tp, _Alloc>& __ly)
    { return __lx._M_base() == __ly._M_base(); }
    { return __lx._M_base() == __ly._M_base(); }
  template
  template
    inline bool
    inline bool
    operator<(const forward_list<_Tp, _Alloc>& __lx,
    operator<(const forward_list<_Tp, _Alloc>& __lx,
              const forward_list<_Tp, _Alloc>& __ly)
              const forward_list<_Tp, _Alloc>& __ly)
    { return __lx._M_base() < __ly._M_base(); }
    { return __lx._M_base() < __ly._M_base(); }
  template
  template
    inline bool
    inline bool
    operator!=(const forward_list<_Tp, _Alloc>& __lx,
    operator!=(const forward_list<_Tp, _Alloc>& __lx,
               const forward_list<_Tp, _Alloc>& __ly)
               const forward_list<_Tp, _Alloc>& __ly)
    { return !(__lx == __ly); }
    { return !(__lx == __ly); }
  /// Based on operator<
  /// Based on operator<
  template
  template
    inline bool
    inline bool
    operator>(const forward_list<_Tp, _Alloc>& __lx,
    operator>(const forward_list<_Tp, _Alloc>& __lx,
              const forward_list<_Tp, _Alloc>& __ly)
              const forward_list<_Tp, _Alloc>& __ly)
    { return (__ly < __lx); }
    { return (__ly < __lx); }
  /// Based on operator<
  /// Based on operator<
  template
  template
    inline bool
    inline bool
    operator>=(const forward_list<_Tp, _Alloc>& __lx,
    operator>=(const forward_list<_Tp, _Alloc>& __lx,
               const forward_list<_Tp, _Alloc>& __ly)
               const forward_list<_Tp, _Alloc>& __ly)
    { return !(__lx < __ly); }
    { return !(__lx < __ly); }
  /// Based on operator<
  /// Based on operator<
  template
  template
    inline bool
    inline bool
    operator<=(const forward_list<_Tp, _Alloc>& __lx,
    operator<=(const forward_list<_Tp, _Alloc>& __lx,
               const forward_list<_Tp, _Alloc>& __ly)
               const forward_list<_Tp, _Alloc>& __ly)
    { return !(__ly < __lx); }
    { return !(__ly < __lx); }
  /// See std::forward_list::swap().
  /// See std::forward_list::swap().
  template
  template
    inline void
    inline void
    swap(forward_list<_Tp, _Alloc>& __lx,
    swap(forward_list<_Tp, _Alloc>& __lx,
         forward_list<_Tp, _Alloc>& __ly)
         forward_list<_Tp, _Alloc>& __ly)
    { __lx.swap(__ly); }
    { __lx.swap(__ly); }
} // namespace __profile
} // namespace __profile
} // namespace std
} // namespace std
#endif // __GXX_EXPERIMENTAL_CXX0X__
#endif // __GXX_EXPERIMENTAL_CXX0X__
#endif
#endif
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.