head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC4:1.1.1.16
	netbsd-11-0-RC3:1.1.1.16
	netbsd-11-0-RC2:1.1.1.16
	netbsd-11-0-RC1:1.1.1.16
	gcc-14-3-0:1.1.1.17
	perseant-exfatfs-base-20250801:1.1.1.16
	netbsd-11:1.1.1.16.0.4
	netbsd-11-base:1.1.1.16
	gcc-12-5-0:1.1.1.16
	netbsd-10-1-RELEASE:1.1.1.15
	perseant-exfatfs-base-20240630:1.1.1.16
	gcc-12-4-0:1.1.1.16
	perseant-exfatfs:1.1.1.16.0.2
	perseant-exfatfs-base:1.1.1.16
	netbsd-8-3-RELEASE:1.1.1.6.8.1
	netbsd-9-4-RELEASE:1.1.1.10
	netbsd-10-0-RELEASE:1.1.1.15
	netbsd-10-0-RC6:1.1.1.15
	netbsd-10-0-RC5:1.1.1.15
	netbsd-10-0-RC4:1.1.1.15
	netbsd-10-0-RC3:1.1.1.15
	netbsd-10-0-RC2:1.1.1.15
	netbsd-10-0-RC1:1.1.1.15
	gcc-12-3-0:1.1.1.16
	gcc-10-5-0:1.1.1.15
	netbsd-10:1.1.1.15.0.6
	netbsd-10-base:1.1.1.15
	netbsd-9-3-RELEASE:1.1.1.10
	gcc-10-4-0:1.1.1.15
	cjep_sun2x-base1:1.1.1.15
	cjep_sun2x:1.1.1.15.0.4
	cjep_sun2x-base:1.1.1.15
	cjep_staticlib_x-base1:1.1.1.15
	netbsd-9-2-RELEASE:1.1.1.10
	cjep_staticlib_x:1.1.1.15.0.2
	cjep_staticlib_x-base:1.1.1.15
	gcc-10-3-0:1.1.1.15
	netbsd-9-1-RELEASE:1.1.1.10
	gcc-9-3-0:1.1.1.14
	gcc-7-5-0:1.1.1.12
	phil-wifi-20200421:1.1.1.11
	phil-wifi-20200411:1.1.1.11
	is-mlppp:1.1.1.11.0.2
	is-mlppp-base:1.1.1.11
	phil-wifi-20200406:1.1.1.11
	netbsd-8-2-RELEASE:1.1.1.6.8.1
	gcc-8-4-0:1.1.1.13
	netbsd-9-0-RELEASE:1.1.1.10
	netbsd-9-0-RC2:1.1.1.10
	netbsd-9-0-RC1:1.1.1.10
	phil-wifi-20191119:1.1.1.11
	gcc-8-3-0:1.1.1.11
	netbsd-9:1.1.1.10.0.2
	netbsd-9-base:1.1.1.10
	phil-wifi-20190609:1.1.1.10
	netbsd-8-1-RELEASE:1.1.1.6.8.1
	netbsd-8-1-RC1:1.1.1.6.8.1
	pgoyette-compat-merge-20190127:1.1.1.8.2.2
	pgoyette-compat-20190127:1.1.1.10
	gcc-7-4-0:1.1.1.10
	pgoyette-compat-20190118:1.1.1.9
	pgoyette-compat-1226:1.1.1.9
	pgoyette-compat-1126:1.1.1.9
	gcc-6-5-0:1.1.1.9
	pgoyette-compat-1020:1.1.1.8
	pgoyette-compat-0930:1.1.1.8
	pgoyette-compat-0906:1.1.1.8
	netbsd-7-2-RELEASE:1.1.1.3.2.1
	pgoyette-compat-0728:1.1.1.8
	netbsd-8-0-RELEASE:1.1.1.6.8.1
	phil-wifi:1.1.1.8.0.4
	phil-wifi-base:1.1.1.8
	pgoyette-compat-0625:1.1.1.8
	netbsd-8-0-RC2:1.1.1.6.8.1
	pgoyette-compat-0521:1.1.1.8
	pgoyette-compat-0502:1.1.1.8
	pgoyette-compat-0422:1.1.1.8
	netbsd-8-0-RC1:1.1.1.6.8.1
	pgoyette-compat-0415:1.1.1.8
	pgoyette-compat-0407:1.1.1.8
	pgoyette-compat-0330:1.1.1.8
	pgoyette-compat-0322:1.1.1.8
	pgoyette-compat-0315:1.1.1.8
	netbsd-7-1-2-RELEASE:1.1.1.3.2.1
	pgoyette-compat:1.1.1.8.0.2
	pgoyette-compat-base:1.1.1.8
	gcc-6-4-0:1.1.1.8
	netbsd-7-1-1-RELEASE:1.1.1.3.2.1
	gcc-5-5-0:1.1.1.7
	matt-nb8-mediatek:1.1.1.6.0.12
	matt-nb8-mediatek-base:1.1.1.6
	perseant-stdc-iso10646:1.1.1.6.0.10
	perseant-stdc-iso10646-base:1.1.1.6
	netbsd-8:1.1.1.6.0.8
	netbsd-8-base:1.1.1.6
	prg-localcount2-base3:1.1.1.6
	prg-localcount2-base2:1.1.1.6
	prg-localcount2-base1:1.1.1.6
	prg-localcount2:1.1.1.6.0.6
	prg-localcount2-base:1.1.1.6
	pgoyette-localcount-20170426:1.1.1.6
	bouyer-socketcan-base1:1.1.1.6
	pgoyette-localcount-20170320:1.1.1.6
	netbsd-7-1:1.1.1.3.2.1.0.6
	netbsd-7-1-RELEASE:1.1.1.3.2.1
	netbsd-7-1-RC2:1.1.1.3.2.1
	netbsd-7-nhusb-base-20170116:1.1.1.3.2.1
	bouyer-socketcan:1.1.1.6.0.4
	bouyer-socketcan-base:1.1.1.6
	pgoyette-localcount-20170107:1.1.1.6
	netbsd-7-1-RC1:1.1.1.3.2.1
	pgoyette-localcount-20161104:1.1.1.6
	netbsd-7-0-2-RELEASE:1.1.1.3.2.1
	localcount-20160914:1.1.1.6
	netbsd-7-nhusb:1.1.1.3.2.1.0.4
	netbsd-7-nhusb-base:1.1.1.3.2.1
	pgoyette-localcount-20160806:1.1.1.6
	pgoyette-localcount-20160726:1.1.1.6
	pgoyette-localcount:1.1.1.6.0.2
	pgoyette-localcount-base:1.1.1.6
	gcc-5-4-0:1.1.1.6
	netbsd-7-0-1-RELEASE:1.1.1.3.2.1
	gcc-5-3-0:1.1.1.5
	netbsd-7-0:1.1.1.3.2.1.0.2
	netbsd-7-0-RELEASE:1.1.1.3.2.1
	gcc-4-8-5-pre-gcc-old-import:1.1.1.4
	netbsd-7-0-RC3:1.1.1.3.2.1
	netbsd-7-0-RC2:1.1.1.3.2.1
	post-gcc-4-8-5-merge:1.1.1.4
	gcc-4-8-5:1.1.1.4
	netbsd-7-0-RC1:1.1.1.3.2.1
	gcc-4-8-4:1.1.1.4
	gcc-4-8-20141009:1.1.1.3
	netbsd-6-0-6-RELEASE:1.1.1.1
	netbsd-6-1-5-RELEASE:1.1.1.1
	netbsd-7:1.1.1.3.0.2
	netbsd-7-base:1.1.1.3
	gcc-4-8-3:1.1.1.3
	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.3
	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.3
	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.46;	author mrg;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2011.06.21.01.24.46;	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
	1.1.1.2.2.1;
next	1.1.1.3;
commitid	TtaB91QNTknAoYqx;

1.1.1.3
date	2014.05.27.08.38.14;	author skrll;	state Exp;
branches
	1.1.1.3.2.1;
next	1.1.1.4;
commitid	Esid9j2Tay8qt9Cx;

1.1.1.4
date	2015.01.10.00.47.11;	author mrg;	state Exp;
branches;
next	1.1.1.5;
commitid	E07JC7FpnM8mAp5y;

1.1.1.5
date	2016.01.24.06.05.53;	author mrg;	state Exp;
branches;
next	1.1.1.6;
commitid	uWWfbLp08zOK79Sy;

1.1.1.6
date	2016.06.07.05.57.53;	author mrg;	state Exp;
branches
	1.1.1.6.8.1;
next	1.1.1.7;
commitid	KKgo7HPiSHWAPu9z;

1.1.1.7
date	2017.11.11.23.49.29;	author mrg;	state Exp;
branches;
next	1.1.1.8;
commitid	KefS4gJN8ajyYFeA;

1.1.1.8
date	2018.02.02.01.59.03;	author mrg;	state Exp;
branches
	1.1.1.8.2.1
	1.1.1.8.4.1;
next	1.1.1.9;
commitid	XNKaycqpfhzd5epA;

1.1.1.9
date	2018.11.04.00.12.28;	author mrg;	state Exp;
branches;
next	1.1.1.10;
commitid	bulspy67pMB6EyYA;

1.1.1.10
date	2019.01.19.10.14.11;	author mrg;	state Exp;
branches;
next	1.1.1.11;
commitid	VQ8OwWIg5RS9kn8B;

1.1.1.11
date	2019.10.01.09.36.07;	author mrg;	state Exp;
branches;
next	1.1.1.12;
commitid	smvgr2IPAQDr89FB;

1.1.1.12
date	2020.08.11.05.10.39;	author mrg;	state Exp;
branches;
next	1.1.1.13;
commitid	5dBRDT7i6e65xBjC;

1.1.1.13
date	2020.08.11.05.30.09;	author mrg;	state Exp;
branches;
next	1.1.1.14;
commitid	7AI4OfpLi4eqEBjC;

1.1.1.14
date	2020.09.05.07.52.09;	author mrg;	state Exp;
branches;
next	1.1.1.15;
commitid	ZRYA7IOuwfMjAPmC;

1.1.1.15
date	2021.04.10.22.10.04;	author mrg;	state Exp;
branches;
next	1.1.1.16;
commitid	eC4g0MRpqTvEkNOC;

1.1.1.16
date	2023.07.30.05.21.20;	author mrg;	state Exp;
branches;
next	1.1.1.17;
commitid	tk6nV4mbc9nVEMyE;

1.1.1.17
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.52;	author yamt;	state Exp;
branches;
next	;
commitid	DX8bafDLmqEbpyBx;

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

1.1.1.2.2.1
date	2014.08.10.07.10.48;	author tls;	state Exp;
branches;
next	;
commitid	3hJZAsnr6L0lHMLx;

1.1.1.3.2.1
date	2015.01.25.00.19.32;	author martin;	state Exp;
branches;
next	;
commitid	Zd18dL7rpT5Z0l7y;

1.1.1.6.8.1
date	2017.11.23.11.02.02;	author martin;	state Exp;
branches;
next	;
commitid	lA6hq5q2Y1dXl9gA;

1.1.1.8.2.1
date	2018.11.26.01.50.58;	author pgoyette;	state Exp;
branches;
next	1.1.1.8.2.2;
commitid	Zj4q5SspGdKXto1B;

1.1.1.8.2.2
date	2019.01.26.21.59.38;	author pgoyette;	state Exp;
branches;
next	;
commitid	JKpcmvSjdT25dl9B;

1.1.1.8.4.1
date	2019.06.10.21.54.57;	author christos;	state Exp;
branches;
next	1.1.1.8.4.2;
commitid	jtc8rnCzWiEEHGqB;

1.1.1.8.4.2
date	2020.04.13.07.58.43;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;


desc
@@


1.1
log
@Initial revision
@
text
@// <functional> -*- C++ -*-

// Copyright (C) 2001, 2002, 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/>.

/*
 * Copyright (c) 1997
 * Silicon Graphics Computer Systems, Inc.
 *
 * Permission to use, copy, modify, distribute and sell this software
 * and its documentation for any purpose is hereby granted without fee,
 * provided that the above copyright notice appear in all copies and
 * that both that copyright notice and this permission notice appear
 * in supporting documentation.  Silicon Graphics makes no
 * representations about the suitability of this software for any
 * purpose.  It is provided "as is" without express or implied warranty.
 *
 */

/** @@file include/functional
 *  This is a Standard C++ Library header.
 */

#ifndef _GLIBCXX_FUNCTIONAL
#define _GLIBCXX_FUNCTIONAL 1

#pragma GCC system_header

#include <bits/c++config.h>
#include <bits/stl_function.h>

#ifdef __GXX_EXPERIMENTAL_CXX0X__

#include <typeinfo>
#include <new>
#include <tuple>
#include <type_traits>
#include <bits/functexcept.h>
#include <bits/functional_hash.h>

namespace std
{
  template<typename _MemberPointer>
    class _Mem_fn;

  /**
   *  Actual implementation of _Has_result_type, which uses SFINAE to
   *  determine if the type _Tp has a publicly-accessible member type
   *  result_type.
  */
  template<typename _Tp>
    class _Has_result_type_helper : __sfinae_types
    {
      template<typename _Up>
        struct _Wrap_type
	{ };

      template<typename _Up>
        static __one __test(_Wrap_type<typename _Up::result_type>*);

      template<typename _Up>
        static __two __test(...);

    public:
      static const bool value = sizeof(__test<_Tp>(0)) == 1;
    };

  template<typename _Tp>
    struct _Has_result_type
    : integral_constant<bool,
	      _Has_result_type_helper<typename remove_cv<_Tp>::type>::value>
    { };

  /// If we have found a result_type, extract it.
  template<bool _Has_result_type, typename _Functor>
    struct _Maybe_get_result_type
    { };

  template<typename _Functor>
    struct _Maybe_get_result_type<true, _Functor>
    {
      typedef typename _Functor::result_type result_type;
    };

  /**
   *  Base class for any function object that has a weak result type, as
   *  defined in 3.3/3 of TR1.
  */
  template<typename _Functor>
    struct _Weak_result_type_impl
    : _Maybe_get_result_type<_Has_result_type<_Functor>::value, _Functor>
    { };

  /// Retrieve the result type for a function type.
  template<typename _Res, typename... _ArgTypes> 
    struct _Weak_result_type_impl<_Res(_ArgTypes...)>
    {
      typedef _Res result_type;
    };

  /// Retrieve the result type for a function reference.
  template<typename _Res, typename... _ArgTypes> 
    struct _Weak_result_type_impl<_Res(&)(_ArgTypes...)>
    {
      typedef _Res result_type;
    };

  /// Retrieve the result type for a function pointer.
  template<typename _Res, typename... _ArgTypes> 
    struct _Weak_result_type_impl<_Res(*)(_ArgTypes...)>
    {
      typedef _Res result_type;
    };

  /// Retrieve result type for a member function pointer. 
  template<typename _Res, typename _Class, typename... _ArgTypes> 
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...)>
    {
      typedef _Res result_type;
    };

  /// Retrieve result type for a const member function pointer. 
  template<typename _Res, typename _Class, typename... _ArgTypes> 
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) const>
    {
      typedef _Res result_type;
    };

  /// Retrieve result type for a volatile member function pointer. 
  template<typename _Res, typename _Class, typename... _ArgTypes> 
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...) volatile>
    {
      typedef _Res result_type;
    };

  /// Retrieve result type for a const volatile member function pointer. 
  template<typename _Res, typename _Class, typename... _ArgTypes> 
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...)const volatile>
    {
      typedef _Res result_type;
    };

  /**
   *  Strip top-level cv-qualifiers from the function object and let
   *  _Weak_result_type_impl perform the real work.
  */
  template<typename _Functor>
    struct _Weak_result_type
    : _Weak_result_type_impl<typename remove_cv<_Functor>::type>
    { };

  template<typename _Signature>
    class result_of;

  template<typename _Functor, typename... _ArgTypes>
    struct result_of<_Functor(_ArgTypes...)>
    {
      typedef
        decltype( std::declval<_Functor>()(std::declval<_ArgTypes>()...) )
        type;
    };

  /// Determines if the type _Tp derives from unary_function.
  template<typename _Tp>
    struct _Derives_from_unary_function : __sfinae_types
    {
    private:
      template<typename _T1, typename _Res>
        static __one __test(const volatile unary_function<_T1, _Res>*);

      // It's tempting to change "..." to const volatile void*, but
      // that fails when _Tp is a function type.
      static __two __test(...);

    public:
      static const bool value = sizeof(__test((_Tp*)0)) == 1;
    };

  /// Determines if the type _Tp derives from binary_function.
  template<typename _Tp>
    struct _Derives_from_binary_function : __sfinae_types
    {
    private:
      template<typename _T1, typename _T2, typename _Res>
        static __one __test(const volatile binary_function<_T1, _T2, _Res>*);

      // It's tempting to change "..." to const volatile void*, but
      // that fails when _Tp is a function type.
      static __two __test(...);

    public:
      static const bool value = sizeof(__test((_Tp*)0)) == 1;
    };

  /// Turns a function type into a function pointer type
  template<typename _Tp, bool _IsFunctionType = is_function<_Tp>::value>
    struct _Function_to_function_pointer
    {
      typedef _Tp type;
    };

  template<typename _Tp>
    struct _Function_to_function_pointer<_Tp, true>
    {
      typedef _Tp* type;
    };

  /**
   * Invoke a function object, which may be either a member pointer or a
   * function object. The first parameter will tell which.
   */
  template<typename _Functor, typename... _Args>
    inline
    typename enable_if<
             (!is_member_pointer<_Functor>::value
              && !is_function<_Functor>::value
              && !is_function<typename remove_pointer<_Functor>::type>::value),
             typename result_of<_Functor(_Args...)>::type
           >::type
    __invoke(_Functor& __f, _Args&&... __args)
    {
      return __f(std::forward<_Args>(__args)...);
    }

  // To pick up function references (that will become function pointers)
  template<typename _Functor, typename... _Args>
    inline
    typename enable_if<
             (is_pointer<_Functor>::value
              && is_function<typename remove_pointer<_Functor>::type>::value),
             typename result_of<_Functor(_Args...)>::type
           >::type
    __invoke(_Functor __f, _Args&&... __args)
    {
      return __f(std::forward<_Args>(__args)...);
    }

  /**
   *  Knowing which of unary_function and binary_function _Tp derives
   *  from, derives from the same and ensures that reference_wrapper
   *  will have a weak result type. See cases below.
   */
  template<bool _Unary, bool _Binary, typename _Tp>
    struct _Reference_wrapper_base_impl;

  // Not a unary_function or binary_function, so try a weak result type.
  template<typename _Tp>
    struct _Reference_wrapper_base_impl<false, false, _Tp>
    : _Weak_result_type<_Tp>
    { };

  // unary_function but not binary_function
  template<typename _Tp>
    struct _Reference_wrapper_base_impl<true, false, _Tp>
    : unary_function<typename _Tp::argument_type,
		     typename _Tp::result_type>
    { };

  // binary_function but not unary_function
  template<typename _Tp>
    struct _Reference_wrapper_base_impl<false, true, _Tp>
    : binary_function<typename _Tp::first_argument_type,
		      typename _Tp::second_argument_type,
		      typename _Tp::result_type>
    { };

  // Both unary_function and binary_function. Import result_type to
  // avoid conflicts.
   template<typename _Tp>
    struct _Reference_wrapper_base_impl<true, true, _Tp>
    : unary_function<typename _Tp::argument_type,
		     typename _Tp::result_type>,
      binary_function<typename _Tp::first_argument_type,
		      typename _Tp::second_argument_type,
		      typename _Tp::result_type>
    {
      typedef typename _Tp::result_type result_type;
    };

  /**
   *  Derives from unary_function or binary_function when it
   *  can. Specializations handle all of the easy cases. The primary
   *  template determines what to do with a class type, which may
   *  derive from both unary_function and binary_function.
  */
  template<typename _Tp>
    struct _Reference_wrapper_base
    : _Reference_wrapper_base_impl<
      _Derives_from_unary_function<_Tp>::value,
      _Derives_from_binary_function<_Tp>::value,
      _Tp>
    { };

  // - a function type (unary)
  template<typename _Res, typename _T1>
    struct _Reference_wrapper_base<_Res(_T1)>
    : unary_function<_T1, _Res>
    { };

  // - a function type (binary)
  template<typename _Res, typename _T1, typename _T2>
    struct _Reference_wrapper_base<_Res(_T1, _T2)>
    : binary_function<_T1, _T2, _Res>
    { };

  // - a function pointer type (unary)
  template<typename _Res, typename _T1>
    struct _Reference_wrapper_base<_Res(*)(_T1)>
    : unary_function<_T1, _Res>
    { };

  // - a function pointer type (binary)
  template<typename _Res, typename _T1, typename _T2>
    struct _Reference_wrapper_base<_Res(*)(_T1, _T2)>
    : binary_function<_T1, _T2, _Res>
    { };

  // - a pointer to member function type (unary, no qualifiers)
  template<typename _Res, typename _T1>
    struct _Reference_wrapper_base<_Res (_T1::*)()>
    : unary_function<_T1*, _Res>
    { };

  // - a pointer to member function type (binary, no qualifiers)
  template<typename _Res, typename _T1, typename _T2>
    struct _Reference_wrapper_base<_Res (_T1::*)(_T2)>
    : binary_function<_T1*, _T2, _Res>
    { };

  // - a pointer to member function type (unary, const)
  template<typename _Res, typename _T1>
    struct _Reference_wrapper_base<_Res (_T1::*)() const>
    : unary_function<const _T1*, _Res>
    { };

  // - a pointer to member function type (binary, const)
  template<typename _Res, typename _T1, typename _T2>
    struct _Reference_wrapper_base<_Res (_T1::*)(_T2) const>
    : binary_function<const _T1*, _T2, _Res>
    { };

  // - a pointer to member function type (unary, volatile)
  template<typename _Res, typename _T1>
    struct _Reference_wrapper_base<_Res (_T1::*)() volatile>
    : unary_function<volatile _T1*, _Res>
    { };

  // - a pointer to member function type (binary, volatile)
  template<typename _Res, typename _T1, typename _T2>
    struct _Reference_wrapper_base<_Res (_T1::*)(_T2) volatile>
    : binary_function<volatile _T1*, _T2, _Res>
    { };

  // - a pointer to member function type (unary, const volatile)
  template<typename _Res, typename _T1>
    struct _Reference_wrapper_base<_Res (_T1::*)() const volatile>
    : unary_function<const volatile _T1*, _Res>
    { };

  // - a pointer to member function type (binary, const volatile)
  template<typename _Res, typename _T1, typename _T2>
    struct _Reference_wrapper_base<_Res (_T1::*)(_T2) const volatile>
    : binary_function<const volatile _T1*, _T2, _Res>
    { };

  /**
   *  @@brief Primary class template for reference_wrapper.
   *  @@ingroup functors
   *  @@{
   */
  template<typename _Tp>
    class reference_wrapper
    : public _Reference_wrapper_base<typename remove_cv<_Tp>::type>
    {
      // If _Tp is a function type, we can't form result_of<_Tp(...)>,
      // so turn it into a function pointer type.
      typedef typename _Function_to_function_pointer<_Tp>::type
        _M_func_type;

      _Tp* _M_data;
    public:
      typedef _Tp type;

      reference_wrapper(_Tp& __indata): _M_data(&__indata)
      { }

      reference_wrapper(_Tp&&) = delete;

      reference_wrapper(const reference_wrapper<_Tp>& __inref):
      _M_data(__inref._M_data)
      { }

      reference_wrapper&
      operator=(const reference_wrapper<_Tp>& __inref)
      {
        _M_data = __inref._M_data;
        return *this;
      }

      operator _Tp&() const
      { return this->get(); }

      _Tp&
      get() const
      { return *_M_data; }

      template<typename... _Args>
        typename result_of<_M_func_type(_Args...)>::type
        operator()(_Args&&... __args) const
        {
	  return __invoke(get(), std::forward<_Args>(__args)...);
	}
    };


  /// Denotes a reference should be taken to a variable.
  template<typename _Tp>
    inline reference_wrapper<_Tp>
    ref(_Tp& __t)
    { return reference_wrapper<_Tp>(__t); }

  /// Denotes a const reference should be taken to a variable.
  template<typename _Tp>
    inline reference_wrapper<const _Tp>
    cref(const _Tp& __t)
    { return reference_wrapper<const _Tp>(__t); }

  /// Partial specialization.
  template<typename _Tp>
    inline reference_wrapper<_Tp>
    ref(reference_wrapper<_Tp> __t)
    { return ref(__t.get()); }

  /// Partial specialization.
  template<typename _Tp>
    inline reference_wrapper<const _Tp>
    cref(reference_wrapper<_Tp> __t)
    { return cref(__t.get()); }

  // @@} group functors

  template<typename _Tp, bool>
    struct _Mem_fn_const_or_non
    {
      typedef const _Tp& type;
    };

  template<typename _Tp>
    struct _Mem_fn_const_or_non<_Tp, false>
    {
      typedef _Tp& type;
    };

  /**
   * Derives from @@c unary_function or @@c binary_function, or perhaps
   * nothing, depending on the number of arguments provided. The
   * primary template is the basis case, which derives nothing.
   */
  template<typename _Res, typename... _ArgTypes> 
    struct _Maybe_unary_or_binary_function { };

  /// Derives from @@c unary_function, as appropriate. 
  template<typename _Res, typename _T1> 
    struct _Maybe_unary_or_binary_function<_Res, _T1>
    : std::unary_function<_T1, _Res> { };

  /// Derives from @@c binary_function, as appropriate. 
  template<typename _Res, typename _T1, typename _T2> 
    struct _Maybe_unary_or_binary_function<_Res, _T1, _T2>
    : std::binary_function<_T1, _T2, _Res> { };

  /// Implementation of @@c mem_fn for member function pointers.
  template<typename _Res, typename _Class, typename... _ArgTypes>
    class _Mem_fn<_Res (_Class::*)(_ArgTypes...)>
    : public _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...>
    {
      typedef _Res (_Class::*_Functor)(_ArgTypes...);

      template<typename _Tp>
        _Res
        _M_call(_Tp& __object, const volatile _Class *, 
                _ArgTypes... __args) const
        { return (__object.*__pmf)(std::forward<_ArgTypes>(__args)...); }

      template<typename _Tp>
        _Res
        _M_call(_Tp& __ptr, const volatile void *, _ArgTypes... __args) const
        { return ((*__ptr).*__pmf)(std::forward<_ArgTypes>(__args)...); }

    public:
      typedef _Res result_type;

      explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { }

      // Handle objects
      _Res
      operator()(_Class& __object, _ArgTypes... __args) const
      { return (__object.*__pmf)(std::forward<_ArgTypes>(__args)...); }

      // Handle pointers
      _Res
      operator()(_Class* __object, _ArgTypes... __args) const
      { return (__object->*__pmf)(std::forward<_ArgTypes>(__args)...); }

      // Handle smart pointers, references and pointers to derived
      template<typename _Tp>
        _Res
	operator()(_Tp& __object, _ArgTypes... __args) const
        {
          return _M_call(__object, &__object,
              std::forward<_ArgTypes>(__args)...);
        }

    private:
      _Functor __pmf;
    };

  /// Implementation of @@c mem_fn for const member function pointers.
  template<typename _Res, typename _Class, typename... _ArgTypes>
    class _Mem_fn<_Res (_Class::*)(_ArgTypes...) const>
    : public _Maybe_unary_or_binary_function<_Res, const _Class*, 
					     _ArgTypes...>
    {
      typedef _Res (_Class::*_Functor)(_ArgTypes...) const;

      template<typename _Tp>
        _Res
        _M_call(_Tp& __object, const volatile _Class *, 
                _ArgTypes... __args) const
        { return (__object.*__pmf)(std::forward<_ArgTypes>(__args)...); }

      template<typename _Tp>
        _Res
        _M_call(_Tp& __ptr, const volatile void *, _ArgTypes... __args) const
        { return ((*__ptr).*__pmf)(std::forward<_ArgTypes>(__args)...); }

    public:
      typedef _Res result_type;

      explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { }

      // Handle objects
      _Res
      operator()(const _Class& __object, _ArgTypes... __args) const
      { return (__object.*__pmf)(std::forward<_ArgTypes>(__args)...); }

      // Handle pointers
      _Res
      operator()(const _Class* __object, _ArgTypes... __args) const
      { return (__object->*__pmf)(std::forward<_ArgTypes>(__args)...); }

      // Handle smart pointers, references and pointers to derived
      template<typename _Tp>
        _Res operator()(_Tp& __object, _ArgTypes... __args) const
        {
          return _M_call(__object, &__object,
              std::forward<_ArgTypes>(__args)...);
        }

    private:
      _Functor __pmf;
    };

  /// Implementation of @@c mem_fn for volatile member function pointers.
  template<typename _Res, typename _Class, typename... _ArgTypes>
    class _Mem_fn<_Res (_Class::*)(_ArgTypes...) volatile>
    : public _Maybe_unary_or_binary_function<_Res, volatile _Class*, 
					     _ArgTypes...>
    {
      typedef _Res (_Class::*_Functor)(_ArgTypes...) volatile;

      template<typename _Tp>
        _Res
        _M_call(_Tp& __object, const volatile _Class *, 
                _ArgTypes... __args) const
        { return (__object.*__pmf)(std::forward<_ArgTypes>(__args)...); }

      template<typename _Tp>
        _Res
        _M_call(_Tp& __ptr, const volatile void *, _ArgTypes... __args) const
        { return ((*__ptr).*__pmf)(std::forward<_ArgTypes>(__args)...); }

    public:
      typedef _Res result_type;

      explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { }

      // Handle objects
      _Res
      operator()(volatile _Class& __object, _ArgTypes... __args) const
      { return (__object.*__pmf)(std::forward<_ArgTypes>(__args)...); }

      // Handle pointers
      _Res
      operator()(volatile _Class* __object, _ArgTypes... __args) const
      { return (__object->*__pmf)(std::forward<_ArgTypes>(__args)...); }

      // Handle smart pointers, references and pointers to derived
      template<typename _Tp>
        _Res
	operator()(_Tp& __object, _ArgTypes... __args) const
        {
          return _M_call(__object, &__object,
              std::forward<_ArgTypes>(__args)...);
        }

    private:
      _Functor __pmf;
    };

  /// Implementation of @@c mem_fn for const volatile member function pointers.
  template<typename _Res, typename _Class, typename... _ArgTypes>
    class _Mem_fn<_Res (_Class::*)(_ArgTypes...) const volatile>
    : public _Maybe_unary_or_binary_function<_Res, const volatile _Class*, 
					     _ArgTypes...>
    {
      typedef _Res (_Class::*_Functor)(_ArgTypes...) const volatile;

      template<typename _Tp>
        _Res
        _M_call(_Tp& __object, const volatile _Class *, 
                _ArgTypes... __args) const
        { return (__object.*__pmf)(std::forward<_ArgTypes>(__args)...); }

      template<typename _Tp>
        _Res
        _M_call(_Tp& __ptr, const volatile void *, _ArgTypes... __args) const
        { return ((*__ptr).*__pmf)(std::forward<_ArgTypes>(__args)...); }

    public:
      typedef _Res result_type;

      explicit _Mem_fn(_Functor __pmf) : __pmf(__pmf) { }

      // Handle objects
      _Res 
      operator()(const volatile _Class& __object, _ArgTypes... __args) const
      { return (__object.*__pmf)(std::forward<_ArgTypes>(__args)...); }

      // Handle pointers
      _Res 
      operator()(const volatile _Class* __object, _ArgTypes... __args) const
      { return (__object->*__pmf)(std::forward<_ArgTypes>(__args)...); }

      // Handle smart pointers, references and pointers to derived
      template<typename _Tp>
        _Res operator()(_Tp& __object, _ArgTypes... __args) const
        {
          return _M_call(__object, &__object,
              std::forward<_ArgTypes>(__args)...);
        }

    private:
      _Functor __pmf;
    };


  template<typename _Res, typename _Class>
    class _Mem_fn<_Res _Class::*>
    {
      // This bit of genius is due to Peter Dimov, improved slightly by
      // Douglas Gregor.
      template<typename _Tp>
        _Res&
        _M_call(_Tp& __object, _Class *) const
        { return __object.*__pm; }

      template<typename _Tp, typename _Up>
        _Res&
        _M_call(_Tp& __object, _Up * const *) const
        { return (*__object).*__pm; }

      template<typename _Tp, typename _Up>
        const _Res&
        _M_call(_Tp& __object, const _Up * const *) const
        { return (*__object).*__pm; }

      template<typename _Tp>
        const _Res&
        _M_call(_Tp& __object, const _Class *) const
        { return __object.*__pm; }

      template<typename _Tp>
        const _Res&
        _M_call(_Tp& __ptr, const volatile void*) const
        { return (*__ptr).*__pm; }

      template<typename _Tp> static _Tp& __get_ref();

      template<typename _Tp>
        static __sfinae_types::__one __check_const(_Tp&, _Class*);
      template<typename _Tp, typename _Up>
        static __sfinae_types::__one __check_const(_Tp&, _Up * const *);
      template<typename _Tp, typename _Up>
        static __sfinae_types::__two __check_const(_Tp&, const _Up * const *);
      template<typename _Tp>
        static __sfinae_types::__two __check_const(_Tp&, const _Class*);
      template<typename _Tp>
        static __sfinae_types::__two __check_const(_Tp&, const volatile void*);

    public:
      template<typename _Tp>
        struct _Result_type
	: _Mem_fn_const_or_non<_Res,
	  (sizeof(__sfinae_types::__two)
	   == sizeof(__check_const<_Tp>(__get_ref<_Tp>(), (_Tp*)0)))>
        { };

      template<typename _Signature>
        struct result;

      template<typename _CVMem, typename _Tp>
        struct result<_CVMem(_Tp)>
	: public _Result_type<_Tp> { };

      template<typename _CVMem, typename _Tp>
        struct result<_CVMem(_Tp&)>
	: public _Result_type<_Tp> { };

      explicit
      _Mem_fn(_Res _Class::*__pm) : __pm(__pm) { }

      // Handle objects
      _Res&
      operator()(_Class& __object) const
      { return __object.*__pm; }

      const _Res&
      operator()(const _Class& __object) const
      { return __object.*__pm; }

      // Handle pointers
      _Res&
      operator()(_Class* __object) const
      { return __object->*__pm; }

      const _Res&
      operator()(const _Class* __object) const
      { return __object->*__pm; }

      // Handle smart pointers and derived
      template<typename _Tp>
        typename _Result_type<_Tp>::type
        operator()(_Tp& __unknown) const
        { return _M_call(__unknown, &__unknown); }

    private:
      _Res _Class::*__pm;
    };

  /**
   *  @@brief Returns a function object that forwards to the member
   *  pointer @@a pm.
   *  @@ingroup functors
   */
  template<typename _Tp, typename _Class>
    inline _Mem_fn<_Tp _Class::*>
    mem_fn(_Tp _Class::* __pm)
    {
      return _Mem_fn<_Tp _Class::*>(__pm);
    }

  /**
   *  @@brief Determines if the given type _Tp is a function object
   *  should be treated as a subexpression when evaluating calls to
   *  function objects returned by bind(). [TR1 3.6.1]
   *  @@ingroup binders
   */
  template<typename _Tp>
    struct is_bind_expression
    : public false_type { };

  /**
   *  @@brief Determines if the given type _Tp is a placeholder in a
   *  bind() expression and, if so, which placeholder it is. [TR1 3.6.2]
   *  @@ingroup binders
   */
  template<typename _Tp>
    struct is_placeholder
    : public integral_constant<int, 0>
    { };

  /// The type of placeholder objects defined by libstdc++.
  template<int _Num> struct _Placeholder { };

  /** @@namespace std::placeholders
   *  @@brief ISO C++ 0x entities sub namespace for functional.
   *  @@ingroup binders
   *
   *  Define a large number of placeholders. There is no way to
   *  simplify this with variadic templates, because we're introducing
   *  unique names for each.
   */
  namespace placeholders 
  { 
    namespace 
    {
      _Placeholder<1> _1;
      _Placeholder<2> _2;
      _Placeholder<3> _3;
      _Placeholder<4> _4;
      _Placeholder<5> _5;
      _Placeholder<6> _6;
      _Placeholder<7> _7;
      _Placeholder<8> _8;
      _Placeholder<9> _9;
      _Placeholder<10> _10;
      _Placeholder<11> _11;
      _Placeholder<12> _12;
      _Placeholder<13> _13;
      _Placeholder<14> _14;
      _Placeholder<15> _15;
      _Placeholder<16> _16;
      _Placeholder<17> _17;
      _Placeholder<18> _18;
      _Placeholder<19> _19;
      _Placeholder<20> _20;
      _Placeholder<21> _21;
      _Placeholder<22> _22;
      _Placeholder<23> _23;
      _Placeholder<24> _24;
      _Placeholder<25> _25;
      _Placeholder<26> _26;
      _Placeholder<27> _27;
      _Placeholder<28> _28;
      _Placeholder<29> _29;
    } 
  }

  /**
   *  Partial specialization of is_placeholder that provides the placeholder
   *  number for the placeholder objects defined by libstdc++.
   *  @@ingroup binders
   */
  template<int _Num>
    struct is_placeholder<_Placeholder<_Num> >
    : public integral_constant<int, _Num>
    { };

  /**
   * Stores a tuple of indices. Used by bind() to extract the elements
   * in a tuple. 
   */
  template<int... _Indexes>
    struct _Index_tuple
    {
      typedef _Index_tuple<_Indexes..., sizeof...(_Indexes)> __next;
    };

  /// Builds an _Index_tuple<0, 1, 2, ..., _Num-1>.
  template<std::size_t _Num>
    struct _Build_index_tuple
    {
      typedef typename _Build_index_tuple<_Num-1>::__type::__next __type;
    };

  template<>
    struct _Build_index_tuple<0>
    {
      typedef _Index_tuple<> __type;
    };

  /** 
   * Used by _Safe_tuple_element to indicate that there is no tuple
   * element at this position.
   */
  struct _No_tuple_element;

  /**
   * Implementation helper for _Safe_tuple_element. This primary
   * template handles the case where it is safe to use @@c
   * tuple_element.
   */
  template<int __i, typename _Tuple, bool _IsSafe>
    struct _Safe_tuple_element_impl
    : tuple_element<__i, _Tuple> { };

  /**
   * Implementation helper for _Safe_tuple_element. This partial
   * specialization handles the case where it is not safe to use @@c
   * tuple_element. We just return @@c _No_tuple_element.
   */
  template<int __i, typename _Tuple>
    struct _Safe_tuple_element_impl<__i, _Tuple, false>
    {
      typedef _No_tuple_element type;
    };

  /**
   * Like tuple_element, but returns @@c _No_tuple_element when
   * tuple_element would return an error.
   */
 template<int __i, typename _Tuple>
   struct _Safe_tuple_element
   : _Safe_tuple_element_impl<__i, _Tuple, 
                              (__i >= 0 && __i < tuple_size<_Tuple>::value)>
   { };

  /**
   *  Maps an argument to bind() into an actual argument to the bound
   *  function object [TR1 3.6.3/5]. Only the first parameter should
   *  be specified: the rest are used to determine among the various
   *  implementations. Note that, although this class is a function
   *  object, it isn't entirely normal because it takes only two
   *  parameters regardless of the number of parameters passed to the
   *  bind expression. The first parameter is the bound argument and
   *  the second parameter is a tuple containing references to the
   *  rest of the arguments.
   */
  template<typename _Arg,
           bool _IsBindExp = is_bind_expression<_Arg>::value,
           bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)>
    class _Mu;

  /**
   *  If the argument is reference_wrapper<_Tp>, returns the
   *  underlying reference. [TR1 3.6.3/5 bullet 1]
   */
  template<typename _Tp>
    class _Mu<reference_wrapper<_Tp>, false, false>
    {
    public:
      typedef _Tp& result_type;

      /* Note: This won't actually work for const volatile
       * reference_wrappers, because reference_wrapper::get() is const
       * but not volatile-qualified. This might be a defect in the TR.
       */
      template<typename _CVRef, typename _Tuple>
        result_type
        operator()(_CVRef& __arg, _Tuple&&) const volatile
        { return __arg.get(); }
    };

  /**
   *  If the argument is a bind expression, we invoke the underlying
   *  function object with the same cv-qualifiers as we are given and
   *  pass along all of our arguments (unwrapped). [TR1 3.6.3/5 bullet 2]
   */
  template<typename _Arg>
    class _Mu<_Arg, true, false>
    {
    public:
      template<typename _Signature> class result;

      // Determine the result type when we pass the arguments along. This
      // involves passing along the cv-qualifiers placed on _Mu and
      // unwrapping the argument bundle.
      template<typename _CVMu, typename _CVArg, typename... _Args>
        class result<_CVMu(_CVArg, tuple<_Args...>)>
	: public result_of<_CVArg(_Args...)> { };

      template<typename _CVArg, typename... _Args>
        typename result_of<_CVArg(_Args...)>::type
        operator()(_CVArg& __arg,
		   tuple<_Args...>&& __tuple) const volatile
        {
	  // Construct an index tuple and forward to __call
	  typedef typename _Build_index_tuple<sizeof...(_Args)>::__type
	    _Indexes;
	  return this->__call(__arg, std::move(__tuple), _Indexes());
	}

    private:
      // Invokes the underlying function object __arg by unpacking all
      // of the arguments in the tuple. 
      template<typename _CVArg, typename... _Args, int... _Indexes>
        typename result_of<_CVArg(_Args...)>::type
        __call(_CVArg& __arg, tuple<_Args...>&& __tuple,
	       const _Index_tuple<_Indexes...>&) const volatile
        {
	  return __arg(std::forward<_Args>(get<_Indexes>(__tuple))...);
	}
    };

  /**
   *  If the argument is a placeholder for the Nth argument, returns
   *  a reference to the Nth argument to the bind function object.
   *  [TR1 3.6.3/5 bullet 3]
   */
  template<typename _Arg>
    class _Mu<_Arg, false, true>
    {
    public:
      template<typename _Signature> class result;

      template<typename _CVMu, typename _CVArg, typename _Tuple>
        class result<_CVMu(_CVArg, _Tuple)>
        {
	  // Add a reference, if it hasn't already been done for us.
	  // This allows us to be a little bit sloppy in constructing
	  // the tuple that we pass to result_of<...>.
	  typedef typename _Safe_tuple_element<(is_placeholder<_Arg>::value
						- 1), _Tuple>::type
	    __base_type;

	public:
	  typedef typename add_rvalue_reference<__base_type>::type type;
	};

      template<typename _Tuple>
        typename result<_Mu(_Arg, _Tuple)>::type
        operator()(const volatile _Arg&, _Tuple&& __tuple) const volatile
        {
	  return std::forward<typename result<_Mu(_Arg, _Tuple)>::type>(
              ::std::get<(is_placeholder<_Arg>::value - 1)>(__tuple));
	}
    };

  /**
   *  If the argument is just a value, returns a reference to that
   *  value. The cv-qualifiers on the reference are the same as the
   *  cv-qualifiers on the _Mu object. [TR1 3.6.3/5 bullet 4]
   */
  template<typename _Arg>
    class _Mu<_Arg, false, false>
    {
    public:
      template<typename _Signature> struct result;

      template<typename _CVMu, typename _CVArg, typename _Tuple>
        struct result<_CVMu(_CVArg, _Tuple)>
        {
	  typedef typename add_lvalue_reference<_CVArg>::type type;
	};

      // Pick up the cv-qualifiers of the argument
      template<typename _CVArg, typename _Tuple>
        _CVArg&&
        operator()(_CVArg&& __arg, _Tuple&&) const volatile
        { return std::forward<_CVArg>(__arg); }
    };

  /**
   *  Maps member pointers into instances of _Mem_fn but leaves all
   *  other function objects untouched. Used by tr1::bind(). The
   *  primary template handles the non--member-pointer case.
   */
  template<typename _Tp>
    struct _Maybe_wrap_member_pointer
    {
      typedef _Tp type;
      
      static const _Tp&
      __do_wrap(const _Tp& __x)
      { return __x; }
    };

  /**
   *  Maps member pointers into instances of _Mem_fn but leaves all
   *  other function objects untouched. Used by tr1::bind(). This
   *  partial specialization handles the member pointer case.
   */
  template<typename _Tp, typename _Class>
    struct _Maybe_wrap_member_pointer<_Tp _Class::*>
    {
      typedef _Mem_fn<_Tp _Class::*> type;
      
      static type
      __do_wrap(_Tp _Class::* __pm)
      { return type(__pm); }
    };

  // Specialization needed to prevent "forming reference to void" errors when
  // bind<void>() is called, because argument deduction instantiates
  // _Maybe_wrap_member_pointer<void> outside the immediate context where
  // SFINAE applies.
  template<>
    struct _Maybe_wrap_member_pointer<void>
    {
      typedef void type;
    };

  /// Type of the function object returned from bind().
  template<typename _Signature>
    struct _Bind;

   template<typename _Functor, typename... _Bound_args>
    class _Bind<_Functor(_Bound_args...)>
    : public _Weak_result_type<_Functor>
    {
      typedef _Bind __self_type;
      typedef typename _Build_index_tuple<sizeof...(_Bound_args)>::__type 
        _Bound_indexes;

      _Functor _M_f;
      tuple<_Bound_args...> _M_bound_args;

      // Call unqualified
      template<typename _Result, typename... _Args, int... _Indexes>
        _Result
        __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>)
        {
          return _M_f(_Mu<_Bound_args>()
                      (get<_Indexes>(_M_bound_args), std::move(__args))...);
        }

      // Call as const
      template<typename _Result, typename... _Args, int... _Indexes>
        _Result
        __call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const
        {
          return _M_f(_Mu<_Bound_args>()
                      (get<_Indexes>(_M_bound_args), std::move(__args))...);
        }

#if 0
      // Call as volatile
      template<typename _Result, typename... _Args, int... _Indexes>
        _Result
        __call_v(tuple<_Args...>&& __args, 
		 _Index_tuple<_Indexes...>) volatile
        {
          return _M_f(_Mu<_Bound_args>()
                      (get<_Indexes>(_M_bound_args), std::move(__args))...);
        }

      // Call as const volatile
      template<typename _Result, typename... _Args, int... _Indexes>
        _Result
        __call_c_v(tuple<_Args...>&& __args, 
		   _Index_tuple<_Indexes...>) const volatile
        {
          return _M_f(_Mu<_Bound_args>()
                      (get<_Indexes>(_M_bound_args), std::move(__args))...);
        }
#endif

     public:
      explicit _Bind(_Functor __f, _Bound_args... __bound_args)
      : _M_f(std::forward<_Functor>(__f)),
	_M_bound_args(std::forward<_Bound_args>(__bound_args)...)
      { }

      // Call unqualified
      template<typename... _Args, typename _Result
        = decltype( std::declval<_Functor>()(
              _Mu<_Bound_args>()( std::declval<_Bound_args&>(),
				  std::declval<tuple<_Args...>&&>() )... ) )>
        _Result
        operator()(_Args&&... __args)
        {
          return this->__call<_Result>(tuple<_Args...>
				       (std::forward<_Args>(__args)...),
                                       _Bound_indexes());
        }

      // Call as const
      template<typename... _Args, typename _Result
        = decltype( std::declval<const _Functor>()(
	      _Mu<_Bound_args>()( std::declval<const _Bound_args&>(),
				  std::declval<tuple<_Args...>&&>() )... ) )>
        _Result
        operator()(_Args&&... __args) const
        {
          return this->__call_c<_Result>(tuple<_Args...>
                                         (std::forward<_Args>(__args)...),
                                         _Bound_indexes());
        }

#if 0
      // Call as volatile
      template<typename... _Args, typename _Result
        = decltype( std::declval<volatile _Functor>()(
              _Mu<_Bound_args>()( std::declval<volatile _Bound_args&>(),
                                  std::declval<tuple<_Args...>&&>() )... ) )>
        _Result
        operator()(_Args&&... __args) volatile
        {
          return this->__call_v<_Result>(tuple<_Args...>
                                         (std::forward<_Args>(__args)...),
                                         _Bound_indexes());
        }

      // Call as const volatile
      template<typename... _Args, typename _Result
        = decltype( std::declval<const volatile _Functor>()(
              _Mu<_Bound_args>()( std::declval<const volatile _Bound_args&>(),
                                  std::declval<tuple<_Args...>&&>() )... ) )>
        _Result
        operator()(_Args&&... __args) const volatile
        {
          return this->__call_c_v<_Result>(tuple<_Args...>
                                           (std::forward<_Args>(__args)...),
                                           _Bound_indexes());
        }
#endif
    };

  /// Type of the function object returned from bind<R>().
  template<typename _Result, typename _Signature>
    struct _Bind_result;

  template<typename _Result, typename _Functor, typename... _Bound_args>
    class _Bind_result<_Result, _Functor(_Bound_args...)>
    {
      typedef _Bind_result __self_type;
      typedef typename _Build_index_tuple<sizeof...(_Bound_args)>::__type 
        _Bound_indexes;

      _Functor _M_f;
      tuple<_Bound_args...> _M_bound_args;

      // sfinae types
      template<typename _Res>
        struct __enable_if_void : enable_if<is_void<_Res>::value, int> { };
      template<typename _Res>
        struct __disable_if_void : enable_if<!is_void<_Res>::value, int> { };

      // Call unqualified
      template<typename _Res, typename... _Args, int... _Indexes>
        _Result
        __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
            typename __disable_if_void<_Res>::type = 0)
        {
          return _M_f(_Mu<_Bound_args>()
                      (get<_Indexes>(_M_bound_args), std::move(__args))...);
        }

      // Call unqualified, return void
      template<typename _Res, typename... _Args, int... _Indexes>
        void
        __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
            typename __enable_if_void<_Res>::type = 0)
        {
          _M_f(_Mu<_Bound_args>()
	       (get<_Indexes>(_M_bound_args), std::move(__args))...);
        }

      // Call as const
      template<typename _Res, typename... _Args, int... _Indexes>
        _Result
        __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
            typename __disable_if_void<_Res>::type = 0) const
        {
          return _M_f(_Mu<_Bound_args>()
                      (get<_Indexes>(_M_bound_args), std::move(__args))...);
        }

      // Call as const, return void
      template<typename _Res, typename... _Args, int... _Indexes>
        void
        __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
            typename __enable_if_void<_Res>::type = 0) const
        {
          _M_f(_Mu<_Bound_args>()
	       (get<_Indexes>(_M_bound_args),  std::move(__args))...);
        }

      // Call as volatile
      template<typename _Res, typename... _Args, int... _Indexes>
        _Result
        __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
            typename __disable_if_void<_Res>::type = 0) volatile
        {
          return _M_f(_Mu<_Bound_args>()
                      (get<_Indexes>(_M_bound_args), std::move(__args))...);
        }

      // Call as volatile, return void
      template<typename _Res, typename... _Args, int... _Indexes>
        void
        __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
            typename __enable_if_void<_Res>::type = 0) volatile
        {
          _M_f(_Mu<_Bound_args>()
	       (get<_Indexes>(_M_bound_args), std::move(__args))...);
        }

      // Call as const volatile
      template<typename _Res, typename... _Args, int... _Indexes>
        _Result
        __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
            typename __disable_if_void<_Res>::type = 0) const volatile
        {
          return _M_f(_Mu<_Bound_args>()
                      (get<_Indexes>(_M_bound_args), std::move(__args))...);
        }

      // Call as const volatile, return void
      template<typename _Res, typename... _Args, int... _Indexes>
        void
        __call(tuple<_Args...>&& __args, 
               _Index_tuple<_Indexes...>,
            typename __enable_if_void<_Res>::type = 0) const volatile
        {
          _M_f(_Mu<_Bound_args>()
	       (get<_Indexes>(_M_bound_args), std::move(__args))...);
        }

    public:
      typedef _Result result_type;

      explicit
      _Bind_result(_Functor __f, _Bound_args... __bound_args)
      : _M_f(std::forward<_Functor>(__f)),
	_M_bound_args(std::forward<_Bound_args>(__bound_args)...)
      { }

      // Call unqualified
      template<typename... _Args>
        result_type
        operator()(_Args&&... __args)
        {
          return this->__call<_Result>(
              tuple<_Args...>(std::forward<_Args>(__args)...),
              _Bound_indexes());
        }

      // Call as const
      template<typename... _Args>
        result_type
        operator()(_Args&&... __args) const
        {
          return this->__call<_Result>(
              tuple<_Args...>(std::forward<_Args>(__args)...),
              _Bound_indexes());
        }

      // Call as volatile
      template<typename... _Args>
        result_type
        operator()(_Args&&... __args) volatile
        {
          return this->__call<_Result>(
              tuple<_Args...>(std::forward<_Args>(__args)...),
              _Bound_indexes());
        }

      // Call as const volatile
      template<typename... _Args>
        result_type
        operator()(_Args&&... __args) const volatile
        {
          return this->__call<_Result>(
              tuple<_Args...>(std::forward<_Args>(__args)...),
              _Bound_indexes());
        }
    };

  /**
   *  @@brief Class template _Bind is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Signature>
    struct is_bind_expression<_Bind<_Signature> >
    : public true_type { };

  /**
   *  @@brief Class template _Bind is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Result, typename _Signature>
    struct is_bind_expression<_Bind_result<_Result, _Signature> >
    : public true_type { };

  /**
   *  @@brief Function template for std::bind.
   *  @@ingroup binders
   */
  template<typename _Functor, typename... _ArgTypes>
    inline
    _Bind<typename _Maybe_wrap_member_pointer<_Functor>::type(_ArgTypes...)>
    bind(_Functor __f, _ArgTypes... __args)
    {
      typedef _Maybe_wrap_member_pointer<_Functor> __maybe_type;
      typedef typename __maybe_type::type __functor_type;
      typedef _Bind<__functor_type(_ArgTypes...)> __result_type;
      return __result_type(__maybe_type::__do_wrap(__f),
                           std::forward<_ArgTypes>(__args)...);
    } 

  /**
   *  @@brief Function template for std::bind.
   *  @@ingroup binders
   */
  template<typename _Result, typename _Functor, typename... _ArgTypes>
    inline
    _Bind_result<_Result,
		 typename _Maybe_wrap_member_pointer<_Functor>::type
                            (_ArgTypes...)>
    bind(_Functor __f, _ArgTypes... __args)
    {
      typedef _Maybe_wrap_member_pointer<_Functor> __maybe_type;
      typedef typename __maybe_type::type __functor_type;
      typedef _Bind_result<_Result, __functor_type(_ArgTypes...)>
	__result_type;
      return __result_type(__maybe_type::__do_wrap(__f),
                           std::forward<_ArgTypes>(__args)...);
    }

  /**
   *  @@brief Exception class thrown when class template function's
   *  operator() is called with an empty target.
   *  @@ingroup exceptions
   */
  class bad_function_call : public std::exception { };

  /**
   *  The integral constant expression 0 can be converted into a
   *  pointer to this type. It is used by the function template to
   *  accept NULL pointers.
   */
  struct _M_clear_type;

  /**
   *  Trait identifying "location-invariant" types, meaning that the
   *  address of the object (or any of its members) will not escape.
   *  Also implies a trivial copy constructor and assignment operator.
   */
  template<typename _Tp>
    struct __is_location_invariant
    : integral_constant<bool, (is_pointer<_Tp>::value
			       || is_member_pointer<_Tp>::value)>
    { };

  class _Undefined_class;

  union _Nocopy_types
  {
    void*       _M_object;
    const void* _M_const_object;
    void (*_M_function_pointer)();
    void (_Undefined_class::*_M_member_pointer)();
  };

  union _Any_data
  {
    void*       _M_access()       { return &_M_pod_data[0]; }
    const void* _M_access() const { return &_M_pod_data[0]; }

    template<typename _Tp>
      _Tp&
      _M_access()
      { return *static_cast<_Tp*>(_M_access()); }

    template<typename _Tp>
      const _Tp&
      _M_access() const
      { return *static_cast<const _Tp*>(_M_access()); }

    _Nocopy_types _M_unused;
    char _M_pod_data[sizeof(_Nocopy_types)];
  };

  enum _Manager_operation
  {
    __get_type_info,
    __get_functor_ptr,
    __clone_functor,
    __destroy_functor
  };

  // Simple type wrapper that helps avoid annoying const problems
  // when casting between void pointers and pointers-to-pointers.
  template<typename _Tp>
    struct _Simple_type_wrapper
    {
      _Simple_type_wrapper(_Tp __value) : __value(__value) { }

      _Tp __value;
    };

  template<typename _Tp>
    struct __is_location_invariant<_Simple_type_wrapper<_Tp> >
    : __is_location_invariant<_Tp>
    { };

  // Converts a reference to a function object into a callable
  // function object.
  template<typename _Functor>
    inline _Functor&
    __callable_functor(_Functor& __f)
    { return __f; }

  template<typename _Member, typename _Class>
    inline _Mem_fn<_Member _Class::*>
    __callable_functor(_Member _Class::* &__p)
    { return mem_fn(__p); }

  template<typename _Member, typename _Class>
    inline _Mem_fn<_Member _Class::*>
    __callable_functor(_Member _Class::* const &__p)
    { return mem_fn(__p); }

  template<typename _Signature>
    class function;

  /// Base class of all polymorphic function object wrappers.
  class _Function_base
  {
  public:
    static const std::size_t _M_max_size = sizeof(_Nocopy_types);
    static const std::size_t _M_max_align = __alignof__(_Nocopy_types);

    template<typename _Functor>
      class _Base_manager
      {
      protected:
	static const bool __stored_locally =
        (__is_location_invariant<_Functor>::value
         && sizeof(_Functor) <= _M_max_size
         && __alignof__(_Functor) <= _M_max_align
         && (_M_max_align % __alignof__(_Functor) == 0));
	
	typedef integral_constant<bool, __stored_locally> _Local_storage;

	// Retrieve a pointer to the function object
	static _Functor*
	_M_get_pointer(const _Any_data& __source)
	{
	  const _Functor* __ptr =
	    __stored_locally? &__source._M_access<_Functor>()
	    /* have stored a pointer */ : __source._M_access<_Functor*>();
	  return const_cast<_Functor*>(__ptr);
	}

	// Clone a location-invariant function object that fits within
	// an _Any_data structure.
	static void
	_M_clone(_Any_data& __dest, const _Any_data& __source, true_type)
	{
	  new (__dest._M_access()) _Functor(__source._M_access<_Functor>());
	}

	// Clone a function object that is not location-invariant or
	// that cannot fit into an _Any_data structure.
	static void
	_M_clone(_Any_data& __dest, const _Any_data& __source, false_type)
	{
	  __dest._M_access<_Functor*>() =
	    new _Functor(*__source._M_access<_Functor*>());
	}

	// Destroying a location-invariant object may still require
	// destruction.
	static void
	_M_destroy(_Any_data& __victim, true_type)
	{
	  __victim._M_access<_Functor>().~_Functor();
	}
	
	// Destroying an object located on the heap.
	static void
	_M_destroy(_Any_data& __victim, false_type)
	{
	  delete __victim._M_access<_Functor*>();
	}
	
      public:
	static bool
	_M_manager(_Any_data& __dest, const _Any_data& __source,
		   _Manager_operation __op)
	{
	  switch (__op)
	    {
#ifdef __GXX_RTTI
	    case __get_type_info:
	      __dest._M_access<const type_info*>() = &typeid(_Functor);
	      break;
#endif
	    case __get_functor_ptr:
	      __dest._M_access<_Functor*>() = _M_get_pointer(__source);
	      break;
	      
	    case __clone_functor:
	      _M_clone(__dest, __source, _Local_storage());
	      break;

	    case __destroy_functor:
	      _M_destroy(__dest, _Local_storage());
	      break;
	    }
	  return false;
	}

	static void
	_M_init_functor(_Any_data& __functor, _Functor&& __f)
	{ _M_init_functor(__functor, std::move(__f), _Local_storage()); }
	
	template<typename _Signature>
	  static bool
	  _M_not_empty_function(const function<_Signature>& __f)
          { return static_cast<bool>(__f); }

	template<typename _Tp>
	  static bool
	  _M_not_empty_function(const _Tp*& __fp)
	  { return __fp; }

	template<typename _Class, typename _Tp>
	  static bool
	  _M_not_empty_function(_Tp _Class::* const& __mp)
	  { return __mp; }

	template<typename _Tp>
	  static bool
	  _M_not_empty_function(const _Tp&)
	  { return true; }

      private:
        static void
	_M_init_functor(_Any_data& __functor, _Functor&& __f, true_type)
	{ new (__functor._M_access()) _Functor(std::move(__f)); }

	static void
	_M_init_functor(_Any_data& __functor, _Functor&& __f, false_type)
	{ __functor._M_access<_Functor*>() = new _Functor(std::move(__f)); }
      };

    template<typename _Functor>
      class _Ref_manager : public _Base_manager<_Functor*>
      {
	typedef _Function_base::_Base_manager<_Functor*> _Base;

    public:
	static bool
	_M_manager(_Any_data& __dest, const _Any_data& __source,
		   _Manager_operation __op)
	{
	  switch (__op)
	    {
#ifdef __GXX_RTTI
	    case __get_type_info:
	      __dest._M_access<const type_info*>() = &typeid(_Functor);
	      break;
#endif
	    case __get_functor_ptr:
	      __dest._M_access<_Functor*>() = *_Base::_M_get_pointer(__source);
	      return is_const<_Functor>::value;
	      break;
	      
	    default:
	      _Base::_M_manager(__dest, __source, __op);
	    }
	  return false;
	}

	static void
	_M_init_functor(_Any_data& __functor, reference_wrapper<_Functor> __f)
	{
	  // TBD: Use address_of function instead.
	  _Base::_M_init_functor(__functor, &__f.get());
	}
      };

    _Function_base() : _M_manager(0) { }
    
    ~_Function_base()
    {
      if (_M_manager)
	_M_manager(_M_functor, _M_functor, __destroy_functor);
    }


    bool _M_empty() const { return !_M_manager; }

    typedef bool (*_Manager_type)(_Any_data&, const _Any_data&,
                                  _Manager_operation);

    _Any_data     _M_functor;
    _Manager_type _M_manager;
  };

  template<typename _Signature, typename _Functor>
    class _Function_handler;

  template<typename _Res, typename _Functor, typename... _ArgTypes>
    class _Function_handler<_Res(_ArgTypes...), _Functor>
    : public _Function_base::_Base_manager<_Functor>
    {
      typedef _Function_base::_Base_manager<_Functor> _Base;

    public:
      static _Res
      _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
      {
        return (*_Base::_M_get_pointer(__functor))(
            std::forward<_ArgTypes>(__args)...);
      }
    };

  template<typename _Functor, typename... _ArgTypes>
    class _Function_handler<void(_ArgTypes...), _Functor>
    : public _Function_base::_Base_manager<_Functor>
    {
      typedef _Function_base::_Base_manager<_Functor> _Base;

     public:
      static void
      _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
      {
        (*_Base::_M_get_pointer(__functor))(
            std::forward<_ArgTypes>(__args)...);
      }
    };

  template<typename _Res, typename _Functor, typename... _ArgTypes>
    class _Function_handler<_Res(_ArgTypes...), reference_wrapper<_Functor> >
    : public _Function_base::_Ref_manager<_Functor>
    {
      typedef _Function_base::_Ref_manager<_Functor> _Base;

     public:
      static _Res
      _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
      {
        return __callable_functor(**_Base::_M_get_pointer(__functor))(
              std::forward<_ArgTypes>(__args)...);
      }
    };

  template<typename _Functor, typename... _ArgTypes>
    class _Function_handler<void(_ArgTypes...), reference_wrapper<_Functor> >
    : public _Function_base::_Ref_manager<_Functor>
    {
      typedef _Function_base::_Ref_manager<_Functor> _Base;

     public:
      static void
      _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
      {
        __callable_functor(**_Base::_M_get_pointer(__functor))(
            std::forward<_ArgTypes>(__args)...);
      }
    };

  template<typename _Class, typename _Member, typename _Res, 
           typename... _ArgTypes>
    class _Function_handler<_Res(_ArgTypes...), _Member _Class::*>
    : public _Function_handler<void(_ArgTypes...), _Member _Class::*>
    {
      typedef _Function_handler<void(_ArgTypes...), _Member _Class::*>
        _Base;

     public:
      static _Res
      _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
      {
        return mem_fn(_Base::_M_get_pointer(__functor)->__value)(
            std::forward<_ArgTypes>(__args)...);
      }
    };

  template<typename _Class, typename _Member, typename... _ArgTypes>
    class _Function_handler<void(_ArgTypes...), _Member _Class::*>
    : public _Function_base::_Base_manager<
                 _Simple_type_wrapper< _Member _Class::* > >
    {
      typedef _Member _Class::* _Functor;
      typedef _Simple_type_wrapper<_Functor> _Wrapper;
      typedef _Function_base::_Base_manager<_Wrapper> _Base;

     public:
      static bool
      _M_manager(_Any_data& __dest, const _Any_data& __source,
                 _Manager_operation __op)
      {
        switch (__op)
	  {
#ifdef __GXX_RTTI
	  case __get_type_info:
	    __dest._M_access<const type_info*>() = &typeid(_Functor);
	    break;
#endif	    
	  case __get_functor_ptr:
	    __dest._M_access<_Functor*>() =
	      &_Base::_M_get_pointer(__source)->__value;
	    break;
	    
	  default:
	    _Base::_M_manager(__dest, __source, __op);
	  }
        return false;
      }

      static void
      _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
      {
	mem_fn(_Base::_M_get_pointer(__functor)->__value)(
            std::forward<_ArgTypes>(__args)...);
      }
    };

  /**
   *  @@brief Primary class template for std::function.
   *  @@ingroup functors
   *
   *  Polymorphic function wrapper.
   */
  template<typename _Res, typename... _ArgTypes>
    class function<_Res(_ArgTypes...)>
    : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>,
      private _Function_base
    {
      typedef _Res _Signature_type(_ArgTypes...);
      
      struct _Useless { };
      
    public:
      typedef _Res result_type;
      
      // [3.7.2.1] construct/copy/destroy
      
      /**
       *  @@brief Default construct creates an empty function call wrapper.
       *  @@post @@c !(bool)*this
       */
      explicit
      function() : _Function_base() { }
      
      /**
       *  @@brief Default construct creates an empty function call wrapper.
       *  @@post @@c !(bool)*this
       */
      function(_M_clear_type*) : _Function_base() { }
      
      /**
       *  @@brief %Function copy constructor.
       *  @@param x A %function object with identical call signature.
       *  @@post @@c (bool)*this == (bool)x
       *
       *  The newly-created %function contains a copy of the target of @@a
       *  x (if it has one).
       */
      function(const function& __x);

      /**
       *  @@brief %Function move constructor.
       *  @@param x A %function object rvalue with identical call signature.
       *
       *  The newly-created %function contains the target of @@a x
       *  (if it has one).
       */
      function(function&& __x) : _Function_base()
      {
        __x.swap(*this);
      }

      // TODO: needs allocator_arg_t
      
      /**
       *  @@brief Builds a %function that targets a copy of the incoming
       *  function object.
       *  @@param f A %function object that is callable with parameters of
       *  type @@c T1, @@c T2, ..., @@c TN and returns a value convertible
       *  to @@c Res.
       *
       *  The newly-created %function object will target a copy of @@a
       *  f. If @@a f is @@c reference_wrapper<F>, then this function
       *  object will contain a reference to the function object @@c
       *  f.get(). If @@a f is a NULL function pointer or NULL
       *  pointer-to-member, the newly-created object will be empty.
       *
       *  If @@a f is a non-NULL function pointer or an object of type @@c
       *  reference_wrapper<F>, this function will not throw.
       */
      template<typename _Functor>
        function(_Functor __f,
                 typename enable_if<
                           !is_integral<_Functor>::value, _Useless>::type
                   = _Useless());

      /**
       *  @@brief %Function assignment operator.
       *  @@param x A %function with identical call signature.
       *  @@post @@c (bool)*this == (bool)x
       *  @@returns @@c *this
       *
       *  The target of @@a x is copied to @@c *this. If @@a x has no
       *  target, then @@c *this will be empty.
       *
       *  If @@a x targets a function pointer or a reference to a function
       *  object, then this operation will not throw an %exception.
       */
      function&
      operator=(const function& __x)
      {
        function(__x).swap(*this);
        return *this;
      }

      /**
       *  @@brief %Function move-assignment operator.
       *  @@param x A %function rvalue with identical call signature.
       *  @@returns @@c *this
       *
       *  The target of @@a x is moved to @@c *this. If @@a x has no
       *  target, then @@c *this will be empty.
       *
       *  If @@a x targets a function pointer or a reference to a function
       *  object, then this operation will not throw an %exception.
       */
      function&
      operator=(function&& __x)
      {
        function(std::move(__x)).swap(*this);
        return *this;
      }

      /**
       *  @@brief %Function assignment to zero.
       *  @@post @@c !(bool)*this
       *  @@returns @@c *this
       *
       *  The target of @@c *this is deallocated, leaving it empty.
       */
      function&
      operator=(_M_clear_type*)
      {
        if (_M_manager)
	  {
	    _M_manager(_M_functor, _M_functor, __destroy_functor);
	    _M_manager = 0;
	    _M_invoker = 0;
	  }
        return *this;
      }

      /**
       *  @@brief %Function assignment to a new target.
       *  @@param f A %function object that is callable with parameters of
       *  type @@c T1, @@c T2, ..., @@c TN and returns a value convertible
       *  to @@c Res.
       *  @@return @@c *this
       *
       *  This  %function object wrapper will target a copy of @@a
       *  f. If @@a f is @@c reference_wrapper<F>, then this function
       *  object will contain a reference to the function object @@c
       *  f.get(). If @@a f is a NULL function pointer or NULL
       *  pointer-to-member, @@c this object will be empty.
       *
       *  If @@a f is a non-NULL function pointer or an object of type @@c
       *  reference_wrapper<F>, this function will not throw.
       */
      template<typename _Functor>
        typename enable_if<!is_integral<_Functor>::value, function&>::type
	operator=(_Functor&& __f)
	{
	  function(std::forward<_Functor>(__f)).swap(*this);
	  return *this;
	}

      /// @@overload
      template<typename _Functor>
        typename enable_if<!is_integral<_Functor>::value, function&>::type
	operator=(reference_wrapper<_Functor> __f)
	{
	  function(__f).swap(*this);
	  return *this;
	}

      // [3.7.2.2] function modifiers
      
      /**
       *  @@brief Swap the targets of two %function objects.
       *  @@param f A %function with identical call signature.
       *
       *  Swap the targets of @@c this function object and @@a f. This
       *  function will not throw an %exception.
       */
      void swap(function& __x)
      {
	/* We cannot perform direct assignments of the _M_functor
	   parts as they are of type _Any_data and have a different
	   dynamic type.  Doing so would violate type-based aliasing
	   rules and lead to spurious miscompilations.
	   Instead perform a bytewise exchange of the memory of
	   both POD objects.
	   ???  A wordwise exchange honoring alignment of _M_functor
	   would be more efficient.  See PR42845.  */
	for (unsigned i = 0; i < sizeof (_M_functor._M_pod_data); ++i)
	  std::swap (_M_functor._M_pod_data[i], __x._M_functor._M_pod_data[i]);
	_Manager_type __old_manager = _M_manager;
	_M_manager = __x._M_manager;
	__x._M_manager = __old_manager;
	_Invoker_type __old_invoker = _M_invoker;
	_M_invoker = __x._M_invoker;
	__x._M_invoker = __old_invoker;
      }

      // TODO: needs allocator_arg_t
      /*
      template<typename _Functor, typename _Alloc>
        void
        assign(_Functor&& __f, const _Alloc& __a)
        {
          function(allocator_arg, __a,
                   std::forward<_Functor>(__f)).swap(*this);
        }
      */
      
      // [3.7.2.3] function capacity

      /**
       *  @@brief Determine if the %function wrapper has a target.
       *
       *  @@return @@c true when this %function object contains a target,
       *  or @@c false when it is empty.
       *
       *  This function will not throw an %exception.
       */
      explicit operator bool() const
      { return !_M_empty(); }

      // [3.7.2.4] function invocation

      /**
       *  @@brief Invokes the function targeted by @@c *this.
       *  @@returns the result of the target.
       *  @@throws bad_function_call when @@c !(bool)*this
       *
       *  The function call operator invokes the target function object
       *  stored by @@c this.
       */
      _Res operator()(_ArgTypes... __args) const;

#ifdef __GXX_RTTI
      // [3.7.2.5] function target access
      /**
       *  @@brief Determine the type of the target of this function object
       *  wrapper.
       *
       *  @@returns the type identifier of the target function object, or
       *  @@c typeid(void) if @@c !(bool)*this.
       *
       *  This function will not throw an %exception.
       */
      const type_info& target_type() const;
      
      /**
       *  @@brief Access the stored target function object.
       *
       *  @@return Returns a pointer to the stored target function object,
       *  if @@c typeid(Functor).equals(target_type()); otherwise, a NULL
       *  pointer.
       *
       * This function will not throw an %exception.
       */
      template<typename _Functor>       _Functor* target();
      
      /// @@overload
      template<typename _Functor> const _Functor* target() const;
#endif

      // deleted overloads
      template<typename _Res2, typename... _ArgTypes2>
	void operator==(const function<_Res2(_ArgTypes2...)>&) const = delete;
      template<typename _Res2, typename... _ArgTypes2>
	void operator!=(const function<_Res2(_ArgTypes2...)>&) const = delete;

    private:
      typedef _Res (*_Invoker_type)(const _Any_data&, _ArgTypes...);
      _Invoker_type _M_invoker;
  };

  // Out-of-line member definitions.
  template<typename _Res, typename... _ArgTypes>
    function<_Res(_ArgTypes...)>::
    function(const function& __x)
    : _Function_base()
    {
      if (static_cast<bool>(__x))
	{
	  _M_invoker = __x._M_invoker;
	  _M_manager = __x._M_manager;
	  __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
	}
    }

  template<typename _Res, typename... _ArgTypes>
    template<typename _Functor>
      function<_Res(_ArgTypes...)>::
      function(_Functor __f,
	       typename enable_if<
	                !is_integral<_Functor>::value, _Useless>::type)
      : _Function_base()
      {
	typedef _Function_handler<_Signature_type, _Functor> _My_handler;

	if (_My_handler::_M_not_empty_function(__f))
	  {
	    _M_invoker = &_My_handler::_M_invoke;
	    _M_manager = &_My_handler::_M_manager;
	    _My_handler::_M_init_functor(_M_functor, std::move(__f));
	  }
      }

  template<typename _Res, typename... _ArgTypes>
    _Res
    function<_Res(_ArgTypes...)>::
    operator()(_ArgTypes... __args) const
    {
      if (_M_empty())
        __throw_bad_function_call();
      return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...);
    }

#ifdef __GXX_RTTI
  template<typename _Res, typename... _ArgTypes>
    const type_info&
    function<_Res(_ArgTypes...)>::
    target_type() const
    {
      if (_M_manager)
        {
          _Any_data __typeinfo_result;
          _M_manager(__typeinfo_result, _M_functor, __get_type_info);
          return *__typeinfo_result._M_access<const type_info*>();
        }
      else
	return typeid(void);
    }

  template<typename _Res, typename... _ArgTypes>
    template<typename _Functor>
      _Functor*
      function<_Res(_ArgTypes...)>::
      target()
      {
	if (typeid(_Functor) == target_type() && _M_manager)
	  {
	    _Any_data __ptr;
	    if (_M_manager(__ptr, _M_functor, __get_functor_ptr)
		&& !is_const<_Functor>::value)
	      return 0;
	    else
	      return __ptr._M_access<_Functor*>();
	  }
	else
	  return 0;
      }

  template<typename _Res, typename... _ArgTypes>
    template<typename _Functor>
      const _Functor*
      function<_Res(_ArgTypes...)>::
      target() const
      {
	if (typeid(_Functor) == target_type() && _M_manager)
	  {
	    _Any_data __ptr;
	    _M_manager(__ptr, _M_functor, __get_functor_ptr);
	    return __ptr._M_access<const _Functor*>();
	  }
	else
	  return 0;
      }
#endif

  // [20.7.15.2.6] null pointer comparisons

  /**
   *  @@brief Compares a polymorphic function object wrapper against 0
   *  (the NULL pointer).
   *  @@returns @@c true if the wrapper has no target, @@c false otherwise
   *
   *  This function will not throw an %exception.
   */
  template<typename _Res, typename... _Args>
    inline bool
    operator==(const function<_Res(_Args...)>& __f, _M_clear_type*)
    { return !static_cast<bool>(__f); }

  /// @@overload
  template<typename _Res, typename... _Args>
    inline bool
    operator==(_M_clear_type*, const function<_Res(_Args...)>& __f)
    { return !static_cast<bool>(__f); }

  /**
   *  @@brief Compares a polymorphic function object wrapper against 0
   *  (the NULL pointer).
   *  @@returns @@c false if the wrapper has no target, @@c true otherwise
   *
   *  This function will not throw an %exception.
   */
  template<typename _Res, typename... _Args>
    inline bool
    operator!=(const function<_Res(_Args...)>& __f, _M_clear_type*)
    { return static_cast<bool>(__f); }

  /// @@overload
  template<typename _Res, typename... _Args>
    inline bool
    operator!=(_M_clear_type*, const function<_Res(_Args...)>& __f)
    { return static_cast<bool>(__f); }

  // [20.7.15.2.7] specialized algorithms

  /**
   *  @@brief Swap the targets of two polymorphic function object wrappers.
   *
   *  This function will not throw an %exception.
   */
  template<typename _Res, typename... _Args>
    inline void
    swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y)
    { __x.swap(__y); }
}

#endif // __GXX_EXPERIMENTAL_CXX0X__

#endif // _GLIBCXX_FUNCTIONAL
@


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) 2001-2013 Free Software Foundation, Inc.
d52 1
a52 1
#if __cplusplus >= 201103L
d61 1
a61 1
namespace std _GLIBCXX_VISIBILITY(default)
a62 2
_GLIBCXX_BEGIN_NAMESPACE_VERSION

a64 3
  template<typename _Tp, typename _Class>
    _Mem_fn<_Tp _Class::*>
    mem_fn(_Tp _Class::*) noexcept;
d66 27
a92 1
_GLIBCXX_HAS_NESTED_TYPE(result_type)
d101 3
a103 1
    { typedef typename _Functor::result_type result_type; };
d111 1
a111 1
    : _Maybe_get_result_type<__has_result_type<_Functor>::value, _Functor>
d115 1
a115 1
  template<typename _Res, typename... _ArgTypes>
d117 3
a119 29
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes......)>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes...) const>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes......) const>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes...) volatile>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes......) volatile>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes...) const volatile>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes......) const volatile>
    { typedef _Res result_type; };
d122 1
a122 1
  template<typename _Res, typename... _ArgTypes>
d124 3
a126 5
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(&)(_ArgTypes......)>
    { typedef _Res result_type; };
d129 1
a129 1
  template<typename _Res, typename... _ArgTypes>
d131 3
a133 1
    { typedef _Res result_type; };
d135 2
a136 6
  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(*)(_ArgTypes......)>
    { typedef _Res result_type; };

  /// Retrieve result type for a member function pointer.
  template<typename _Res, typename _Class, typename... _ArgTypes>
d138 3
a140 5
    { typedef _Res result_type; };

  template<typename _Res, typename _Class, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......)>
    { typedef _Res result_type; };
d142 2
a143 2
  /// Retrieve result type for a const member function pointer.
  template<typename _Res, typename _Class, typename... _ArgTypes>
d145 3
a147 1
    { typedef _Res result_type; };
d149 2
a150 6
  template<typename _Res, typename _Class, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) const>
    { typedef _Res result_type; };

  /// Retrieve result type for a volatile member function pointer.
  template<typename _Res, typename _Class, typename... _ArgTypes>
d152 3
a154 1
    { typedef _Res result_type; };
d156 6
a161 14
  template<typename _Res, typename _Class, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) volatile>
    { typedef _Res result_type; };

  /// Retrieve result type for a const volatile member function pointer.
  template<typename _Res, typename _Class, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...)
				  const volatile>
    { typedef _Res result_type; };

  template<typename _Res, typename _Class, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......)
				  const volatile>
    { typedef _Res result_type; };
d172 11
d189 1
a189 1
	static __one __test(const volatile unary_function<_T1, _Res>*);
d205 1
a205 1
	static __one __test(const volatile binary_function<_T1, _T2, _Res>*);
d215 13
d235 1
a235 14
	     (!is_member_pointer<_Functor>::value
	      && !is_function<_Functor>::value
	      && !is_function<typename remove_pointer<_Functor>::type>::value),
	     typename result_of<_Functor&(_Args&&...)>::type
	   >::type
    __invoke(_Functor& __f, _Args&&... __args)
    {
      return __f(std::forward<_Args>(__args)...);
    }

  template<typename _Functor, typename... _Args>
    inline
    typename enable_if<
             (is_member_pointer<_Functor>::value
d238 1
a238 1
             typename result_of<_Functor(_Args&&...)>::type
d242 1
a242 1
      return std::mem_fn(__f)(std::forward<_Args>(__args)...);
d249 4
a252 4
	     (is_pointer<_Functor>::value
	      && is_function<typename remove_pointer<_Functor>::type>::value),
	     typename result_of<_Functor(_Args&&...)>::type
	   >::type
d266 1
a266 1
  // None of the nested argument types.
d272 1
a272 1
  // Nested argument_type only.
d275 3
a277 4
    : _Weak_result_type<_Tp>
    {
      typedef typename _Tp::argument_type argument_type;
    };
d279 1
a279 1
  // Nested first_argument_type and second_argument_type only.
d282 4
a285 5
    : _Weak_result_type<_Tp>
    {
      typedef typename _Tp::first_argument_type first_argument_type;
      typedef typename _Tp::second_argument_type second_argument_type;
    };
d287 2
a288 1
  // All the nested argument types.
d291 5
a295 1
    : _Weak_result_type<_Tp>
d297 1
a297 3
      typedef typename _Tp::argument_type argument_type;
      typedef typename _Tp::first_argument_type first_argument_type;
      typedef typename _Tp::second_argument_type second_argument_type;
a299 4
  _GLIBCXX_HAS_NESTED_TYPE(argument_type)
  _GLIBCXX_HAS_NESTED_TYPE(first_argument_type)
  _GLIBCXX_HAS_NESTED_TYPE(second_argument_type)

d309 2
a310 3
      __has_argument_type<_Tp>::value,
      __has_first_argument_type<_Tp>::value
      && __has_second_argument_type<_Tp>::value,
a319 15
  template<typename _Res, typename _T1>
    struct _Reference_wrapper_base<_Res(_T1) const>
    : unary_function<_T1, _Res>
    { };

  template<typename _Res, typename _T1>
    struct _Reference_wrapper_base<_Res(_T1) volatile>
    : unary_function<_T1, _Res>
    { };

  template<typename _Res, typename _T1>
    struct _Reference_wrapper_base<_Res(_T1) const volatile>
    : unary_function<_T1, _Res>
    { };

a325 15
  template<typename _Res, typename _T1, typename _T2>
    struct _Reference_wrapper_base<_Res(_T1, _T2) const>
    : binary_function<_T1, _T2, _Res>
    { };

  template<typename _Res, typename _T1, typename _T2>
    struct _Reference_wrapper_base<_Res(_T1, _T2) volatile>
    : binary_function<_T1, _T2, _Res>
    { };

  template<typename _Res, typename _T1, typename _T2>
    struct _Reference_wrapper_base<_Res(_T1, _T2) const volatile>
    : binary_function<_T1, _T2, _Res>
    { };

d395 5
a400 1

d404 1
a404 2
      reference_wrapper(_Tp& __indata) noexcept
      : _M_data(std::__addressof(__indata))
d409 2
a410 2
      reference_wrapper(const reference_wrapper<_Tp>& __inref) noexcept
      : _M_data(__inref._M_data)
d414 1
a414 1
      operator=(const reference_wrapper<_Tp>& __inref) noexcept
d416 2
a417 2
	_M_data = __inref._M_data;
	return *this;
d420 1
a420 1
      operator _Tp&() const noexcept
d424 1
a424 1
      get() const noexcept
d428 3
a430 3
	typename result_of<_Tp&(_Args&&...)>::type
	operator()(_Args&&... __args) const
	{
d439 1
a439 1
    ref(_Tp& __t) noexcept
d445 1
a445 1
    cref(const _Tp& __t) noexcept
a447 6
  template<typename _Tp>
    void ref(const _Tp&&) = delete;

  template<typename _Tp>
    void cref(const _Tp&&) = delete;

d451 1
a451 1
    ref(reference_wrapper<_Tp> __t) noexcept
d457 1
a457 1
    cref(reference_wrapper<_Tp> __t) noexcept
d462 5
a466 3
  template<typename... _Types>
    struct _Pack : integral_constant<size_t, sizeof...(_Types)>
    { };
d468 5
a472 12
  template<typename _From, typename _To, bool = _From::value == _To::value>
    struct _AllConvertible : false_type
    { };

  template<typename... _From, typename... _To>
    struct _AllConvertible<_Pack<_From...>, _Pack<_To...>, true>
    : __and_<is_convertible<_From, _To>...>
    { };

  template<typename _Tp1, typename _Tp2>
    using _NotSame = __not_<is_same<typename std::decay<_Tp1>::type,
				    typename std::decay<_Tp2>::type>>;
d479 1
a479 1
  template<typename _Res, typename... _ArgTypes>
d482 2
a483 2
  /// Derives from @@c unary_function, as appropriate.
  template<typename _Res, typename _T1>
d487 2
a488 2
  /// Derives from @@c binary_function, as appropriate.
  template<typename _Res, typename _T1, typename _T2>
d499 5
a503 8
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __object, const volatile _Class *,
		_Args&&... __args) const
	{
	  return (std::forward<_Tp>(__object).*__pmf)
	    (std::forward<_Args>(__args)...);
	}
d505 4
a508 23
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const
	{ return ((*__ptr).*__pmf)(std::forward<_Args>(__args)...); }

      // Require each _Args to be convertible to corresponding _ArgTypes
      template<typename... _Args>
	using _RequireValidArgs
	  = _Require<_AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      // Require each _Args to be convertible to corresponding _ArgTypes
      // and require _Tp is not _Class, _Class& or _Class*
      template<typename _Tp, typename... _Args>
	using _RequireValidArgs2
	  = _Require<_NotSame<_Class, _Tp>, _NotSame<_Class*, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      // Require each _Args to be convertible to corresponding _ArgTypes
      // and require _Tp is _Class or derived from _Class
      template<typename _Tp, typename... _Args>
	using _RequireValidArgs3
	  = _Require<is_base_of<_Class, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;
d516 3
a518 11
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(_Class& __object, _Args&&... __args) const
	{ return (__object.*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(_Class&& __object, _Args&&... __args) const
	{
	  return (std::move(__object).*__pmf)(std::forward<_Args>(__args)...);
	}
d521 3
a523 4
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(_Class* __object, _Args&&... __args) const
	{ return (__object->*__pmf)(std::forward<_Args>(__args)...); }
d526 7
a532 14
      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs2<_Tp, _Args...>>
	_Res
	operator()(_Tp&& __object, _Args&&... __args) const
	{
	  return _M_call(std::forward<_Tp>(__object), &__object,
	      std::forward<_Args>(__args)...);
	}

      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs3<_Tp, _Args...>>
	_Res
	operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const
	{ return operator()(__ref.get(), std::forward<_Args>(__args)...); }
d541 1
a541 1
    : public _Maybe_unary_or_binary_function<_Res, const _Class*,
d546 5
a550 8
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __object, const volatile _Class *,
		_Args&&... __args) const
	{
	  return (std::forward<_Tp>(__object).*__pmf)
	    (std::forward<_Args>(__args)...);
	}
d552 4
a555 18
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const
	{ return ((*__ptr).*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args>
	using _RequireValidArgs
	  = _Require<_AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs2
	  = _Require<_NotSame<_Class, _Tp>, _NotSame<const _Class*, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs3
	  = _Require<is_base_of<_Class, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;
d563 3
a565 11
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const _Class& __object, _Args&&... __args) const
	{ return (__object.*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const _Class&& __object, _Args&&... __args) const
	{
	  return (std::move(__object).*__pmf)(std::forward<_Args>(__args)...);
	}
d568 3
a570 4
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const _Class* __object, _Args&&... __args) const
	{ return (__object->*__pmf)(std::forward<_Args>(__args)...); }
d573 6
a578 13
      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs2<_Tp, _Args...>>
	_Res operator()(_Tp&& __object, _Args&&... __args) const
	{
	  return _M_call(std::forward<_Tp>(__object), &__object,
	      std::forward<_Args>(__args)...);
	}

      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs3<_Tp, _Args...>>
	_Res
	operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const
	{ return operator()(__ref.get(), std::forward<_Args>(__args)...); }
d587 1
a587 1
    : public _Maybe_unary_or_binary_function<_Res, volatile _Class*,
d592 5
a596 8
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __object, const volatile _Class *,
		_Args&&... __args) const
	{
	  return (std::forward<_Tp>(__object).*__pmf)
	    (std::forward<_Args>(__args)...);
	}
d598 4
a601 18
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const
	{ return ((*__ptr).*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args>
	using _RequireValidArgs
	  = _Require<_AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs2
	  = _Require<_NotSame<_Class, _Tp>, _NotSame<volatile _Class*, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs3
	  = _Require<is_base_of<_Class, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;
d609 3
a611 11
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(volatile _Class& __object, _Args&&... __args) const
	{ return (__object.*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(volatile _Class&& __object, _Args&&... __args) const
	{
	  return (std::move(__object).*__pmf)(std::forward<_Args>(__args)...);
	}
d614 3
a616 4
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(volatile _Class* __object, _Args&&... __args) const
	{ return (__object->*__pmf)(std::forward<_Args>(__args)...); }
d619 7
a625 14
      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs2<_Tp, _Args...>>
	_Res
	operator()(_Tp&& __object, _Args&&... __args) const
	{
	  return _M_call(std::forward<_Tp>(__object), &__object,
	      std::forward<_Args>(__args)...);
	}

      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs3<_Tp, _Args...>>
	_Res
	operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const
	{ return operator()(__ref.get(), std::forward<_Args>(__args)...); }
d634 1
a634 1
    : public _Maybe_unary_or_binary_function<_Res, const volatile _Class*,
d639 5
a643 8
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __object, const volatile _Class *,
		_Args&&... __args) const
	{
	  return (std::forward<_Tp>(__object).*__pmf)
	    (std::forward<_Args>(__args)...);
	}
d645 4
a648 19
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const
	{ return ((*__ptr).*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args>
	using _RequireValidArgs
	  = _Require<_AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs2
	  = _Require<_NotSame<_Class, _Tp>,
		     _NotSame<const volatile _Class*, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs3
	  = _Require<is_base_of<_Class, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;
d656 3
a658 11
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const volatile _Class& __object, _Args&&... __args) const
	{ return (__object.*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const volatile _Class&& __object, _Args&&... __args) const
	{
	  return (std::move(__object).*__pmf)(std::forward<_Args>(__args)...);
	}
d661 3
a663 4
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const volatile _Class* __object, _Args&&... __args) const
	{ return (__object->*__pmf)(std::forward<_Args>(__args)...); }
d666 6
a671 13
      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs2<_Tp, _Args...>>
	_Res operator()(_Tp&& __object, _Args&&... __args) const
	{
	  return _M_call(std::forward<_Tp>(__object), &__object,
	      std::forward<_Args>(__args)...);
	}

      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs3<_Tp, _Args...>>
	_Res
	operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const
	{ return operator()(__ref.get(), std::forward<_Args>(__args)...); }
a677 12
  template<typename _Tp, bool>
    struct _Mem_fn_const_or_non
    {
      typedef const _Tp& type;
    };

  template<typename _Tp>
    struct _Mem_fn_const_or_non<_Tp, false>
    {
      typedef _Tp& type;
    };

a680 2
      using __pm_type = _Res _Class::*;

a682 1
      // Made less elegant to support perfect forwarding and noexcept.
d684 8
a691 4
	auto
	_M_call(_Tp&& __object, const _Class *) const noexcept
	-> decltype(std::forward<_Tp>(__object).*std::declval<__pm_type&>())
	{ return std::forward<_Tp>(__object).*__pm; }
d694 3
a696 4
	auto
	_M_call(_Tp&& __object, _Up * const *) const noexcept
	-> decltype((*std::forward<_Tp>(__object)).*std::declval<__pm_type&>())
	{ return (*std::forward<_Tp>(__object)).*__pm; }
d699 21
a719 5
	auto
	_M_call(_Tp&& __ptr, const volatile void*) const
	noexcept(noexcept((*__ptr).*std::declval<__pm_type&>()))
	-> decltype((*__ptr).*std::declval<__pm_type&>())
	{ return (*__ptr).*__pm; }
d722 18
d741 1
a741 1
      _Mem_fn(_Res _Class::*__pm) noexcept : __pm(__pm) { }
d745 1
a745 1
      operator()(_Class& __object) const noexcept
d749 1
a749 1
      operator()(const _Class& __object) const noexcept
a751 8
      _Res&&
      operator()(_Class&& __object) const noexcept
      { return std::forward<_Class>(__object).*__pm; }

      const _Res&&
      operator()(const _Class&& __object) const noexcept
      { return std::forward<const _Class>(__object).*__pm; }

d754 1
a754 1
      operator()(_Class* __object) const noexcept
d758 1
a758 1
      operator()(const _Class* __object) const noexcept
d762 4
a765 14
      template<typename _Tp, typename _Req = _Require<_NotSame<_Class*, _Tp>>>
	auto
	operator()(_Tp&& __unknown) const
	noexcept(noexcept(std::declval<_Mem_fn*>()->_M_call
			  (std::forward<_Tp>(__unknown), &__unknown)))
	-> decltype(this->_M_call(std::forward<_Tp>(__unknown), &__unknown))
	{ return _M_call(std::forward<_Tp>(__unknown), &__unknown); }

      template<typename _Tp, typename _Req = _Require<is_base_of<_Class, _Tp>>>
	auto
	operator()(reference_wrapper<_Tp> __ref) const
	noexcept(noexcept(std::declval<_Mem_fn&>()(__ref.get())))
	-> decltype((*this)(__ref.get()))
	{ return (*this)(__ref.get()); }
a770 2
  // _GLIBCXX_RESOLVE_LIB_DEFECTS
  // 2048.  Unnecessary mem_fn overloads
d778 1
a778 1
    mem_fn(_Tp _Class::* __pm) noexcept
d803 1
a803 3
  /** @@brief The type of placeholder objects defined by libstdc++.
   *  @@ingroup binders
   */
a805 2
  _GLIBCXX_END_NAMESPACE_VERSION

d807 1
a807 1
   *  @@brief ISO C++11 entities sub-namespace for functional.
d809 39
a847 38
   */
  namespace placeholders
  {
  _GLIBCXX_BEGIN_NAMESPACE_VERSION
  /* Define a large number of placeholders. There is no way to
   * simplify this with variadic templates, because we're introducing
   * unique names for each.
   */
    extern const _Placeholder<1> _1;
    extern const _Placeholder<2> _2;
    extern const _Placeholder<3> _3;
    extern const _Placeholder<4> _4;
    extern const _Placeholder<5> _5;
    extern const _Placeholder<6> _6;
    extern const _Placeholder<7> _7;
    extern const _Placeholder<8> _8;
    extern const _Placeholder<9> _9;
    extern const _Placeholder<10> _10;
    extern const _Placeholder<11> _11;
    extern const _Placeholder<12> _12;
    extern const _Placeholder<13> _13;
    extern const _Placeholder<14> _14;
    extern const _Placeholder<15> _15;
    extern const _Placeholder<16> _16;
    extern const _Placeholder<17> _17;
    extern const _Placeholder<18> _18;
    extern const _Placeholder<19> _19;
    extern const _Placeholder<20> _20;
    extern const _Placeholder<21> _21;
    extern const _Placeholder<22> _22;
    extern const _Placeholder<23> _23;
    extern const _Placeholder<24> _24;
    extern const _Placeholder<25> _25;
    extern const _Placeholder<26> _26;
    extern const _Placeholder<27> _27;
    extern const _Placeholder<28> _28;
    extern const _Placeholder<29> _29;
  _GLIBCXX_END_NAMESPACE_VERSION
a849 2
  _GLIBCXX_BEGIN_NAMESPACE_VERSION

d860 22
a881 4
  template<int _Num>
    struct is_placeholder<const _Placeholder<_Num> >
    : public integral_constant<int, _Num>
    { };
d883 1
a883 1
  /**
d894 1
a894 1
  template<std::size_t __i, typename _Tuple, bool _IsSafe>
d903 1
a903 1
  template<std::size_t __i, typename _Tuple>
d913 1
a913 1
 template<std::size_t __i, typename _Tuple>
d915 2
a916 2
   : _Safe_tuple_element_impl<__i, _Tuple,
			      (__i < tuple_size<_Tuple>::value)>
d931 2
a932 2
	   bool _IsBindExp = is_bind_expression<_Arg>::value,
	   bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)>
d950 3
a952 3
	result_type
	operator()(_CVRef& __arg, _Tuple&) const volatile
	{ return __arg.get(); }
d964 9
d974 4
a977 5
	auto
	operator()(_CVArg& __arg,
		   tuple<_Args...>& __tuple) const volatile
	-> decltype(__arg(declval<_Args>()...))
	{
d981 1
a981 1
	  return this->__call(__arg, __tuple, _Indexes());
d986 4
a989 4
      // of the arguments in the tuple.
      template<typename _CVArg, typename... _Args, std::size_t... _Indexes>
	auto
	__call(_CVArg& __arg, tuple<_Args...>& __tuple,
d991 1
a991 2
	-> decltype(__arg(declval<_Args>()...))
	{
d1008 2
a1009 2
	class result<_CVMu(_CVArg, _Tuple)>
	{
d1022 3
a1024 3
	typename result<_Mu(_Arg, _Tuple)>::type
	operator()(const volatile _Arg&, _Tuple& __tuple) const volatile
	{
d1026 1
a1026 1
	      ::std::get<(is_placeholder<_Arg>::value - 1)>(__tuple));
d1042 2
a1043 2
	struct result<_CVMu(_CVArg, _Tuple)>
	{
d1049 3
a1051 3
	_CVArg&&
	operator()(_CVArg&& __arg, _Tuple&) const volatile
	{ return std::forward<_CVArg>(__arg); }
d1063 1
a1063 1

a1066 4

      static _Tp&&
      __do_wrap(_Tp&& __x)
      { return static_cast<_Tp&&>(__x); }
d1078 1
a1078 1

a1093 14
  // std::get<I> for volatile-qualified tuples
  template<std::size_t _Ind, typename... _Tp>
    inline auto
    __volget(volatile tuple<_Tp...>& __tuple)
    -> typename tuple_element<_Ind, tuple<_Tp...>>::type volatile&
    { return std::get<_Ind>(const_cast<tuple<_Tp...>&>(__tuple)); }

  // std::get<I> for const-volatile-qualified tuples
  template<std::size_t _Ind, typename... _Tp>
    inline auto
    __volget(const volatile tuple<_Tp...>& __tuple)
    -> typename tuple_element<_Ind, tuple<_Tp...>>::type const volatile&
    { return std::get<_Ind>(const_cast<const tuple<_Tp...>&>(__tuple)); }

d1103 2
a1104 2
      typedef typename _Build_index_tuple<sizeof...(_Bound_args)>::__type
	_Bound_indexes;
d1110 7
a1116 7
      template<typename _Result, typename... _Args, std::size_t... _Indexes>
	_Result
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>)
	{
	  return _M_f(_Mu<_Bound_args>()
		      (get<_Indexes>(_M_bound_args), __args)...);
	}
d1119 7
a1125 7
      template<typename _Result, typename... _Args, std::size_t... _Indexes>
	_Result
	__call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const
	{
	  return _M_f(_Mu<_Bound_args>()
		      (get<_Indexes>(_M_bound_args), __args)...);
	}
d1127 1
d1129 3
a1131 3
      template<typename _Result, typename... _Args, std::size_t... _Indexes>
	_Result
	__call_v(tuple<_Args...>&& __args,
d1133 4
a1136 4
	{
	  return _M_f(_Mu<_Bound_args>()
		      (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1139 3
a1141 3
      template<typename _Result, typename... _Args, std::size_t... _Indexes>
	_Result
	__call_c_v(tuple<_Args...>&& __args,
d1143 5
a1147 4
	{
	  return _M_f(_Mu<_Bound_args>()
		      (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1150 3
a1152 14
      template<typename... _Args>
	explicit _Bind(const _Functor& __f, _Args&&... __args)
	: _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...)
	{ }

      template<typename... _Args>
	explicit _Bind(_Functor&& __f, _Args&&... __args)
	: _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...)
	{ }

      _Bind(const _Bind&) = default;

      _Bind(_Bind&& __b)
      : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args))
d1157 10
a1166 10
	= decltype( std::declval<_Functor>()(
	      _Mu<_Bound_args>()( std::declval<_Bound_args&>(),
				  std::declval<tuple<_Args...>&>() )... ) )>
	_Result
	operator()(_Args&&... __args)
	{
	  return this->__call<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1170 1
a1170 2
	= decltype( std::declval<typename enable_if<(sizeof...(_Args) >= 0),
		       typename add_const<_Functor>::type>::type>()(
d1172 8
a1179 8
				  std::declval<tuple<_Args...>&>() )... ) )>
	_Result
	operator()(_Args&&... __args) const
	{
	  return this->__call_c<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1181 1
d1184 10
a1193 11
	= decltype( std::declval<typename enable_if<(sizeof...(_Args) >= 0),
                       typename add_volatile<_Functor>::type>::type>()(
	      _Mu<_Bound_args>()( std::declval<volatile _Bound_args&>(),
				  std::declval<tuple<_Args...>&>() )... ) )>
	_Result
	operator()(_Args&&... __args) volatile
	{
	  return this->__call_v<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1197 11
a1207 11
	= decltype( std::declval<typename enable_if<(sizeof...(_Args) >= 0),
                       typename add_cv<_Functor>::type>::type>()(
	      _Mu<_Bound_args>()( std::declval<const volatile _Bound_args&>(),
				  std::declval<tuple<_Args...>&>() )... ) )>
	_Result
	operator()(_Args&&... __args) const volatile
	{
	  return this->__call_c_v<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1218 2
a1219 2
      typedef typename _Build_index_tuple<sizeof...(_Bound_args)>::__type
	_Bound_indexes;
d1226 1
a1226 1
	struct __enable_if_void : enable_if<is_void<_Res>::value, int> { };
d1228 1
a1228 1
	struct __disable_if_void : enable_if<!is_void<_Res>::value, int> { };
d1231 8
a1238 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	_Result
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __disable_if_void<_Res>::type = 0)
	{
	  return _M_f(_Mu<_Bound_args>()
		      (get<_Indexes>(_M_bound_args), __args)...);
	}
d1241 8
a1248 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	void
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __enable_if_void<_Res>::type = 0)
	{
	  _M_f(_Mu<_Bound_args>()
	       (get<_Indexes>(_M_bound_args), __args)...);
	}
d1251 8
a1258 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	_Result
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __disable_if_void<_Res>::type = 0) const
	{
	  return _M_f(_Mu<_Bound_args>()
		      (get<_Indexes>(_M_bound_args), __args)...);
	}
d1261 8
a1268 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	void
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __enable_if_void<_Res>::type = 0) const
	{
	  _M_f(_Mu<_Bound_args>()
	       (get<_Indexes>(_M_bound_args),  __args)...);
	}
d1271 8
a1278 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	_Result
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __disable_if_void<_Res>::type = 0) volatile
	{
	  return _M_f(_Mu<_Bound_args>()
		      (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1281 8
a1288 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	void
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __enable_if_void<_Res>::type = 0) volatile
	{
	  _M_f(_Mu<_Bound_args>()
	       (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1291 8
a1298 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	_Result
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __disable_if_void<_Res>::type = 0) const volatile
	{
	  return _M_f(_Mu<_Bound_args>()
		      (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1301 9
a1309 9
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	void
	__call(tuple<_Args...>&& __args,
	       _Index_tuple<_Indexes...>,
	    typename __enable_if_void<_Res>::type = 0) const volatile
	{
	  _M_f(_Mu<_Bound_args>()
	       (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1314 4
a1317 14
      template<typename... _Args>
	explicit _Bind_result(const _Functor& __f, _Args&&... __args)
	: _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...)
	{ }

      template<typename... _Args>
	explicit _Bind_result(_Functor&& __f, _Args&&... __args)
	: _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...)
	{ }

      _Bind_result(const _Bind_result&) = default;

      _Bind_result(_Bind_result&& __b)
      : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args))
d1322 7
a1328 7
	result_type
	operator()(_Args&&... __args)
	{
	  return this->__call<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1332 7
a1338 7
	result_type
	operator()(_Args&&... __args) const
	{
	  return this->__call<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1342 7
a1348 7
	result_type
	operator()(_Args&&... __args) volatile
	{
	  return this->__call<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1352 7
a1358 7
	result_type
	operator()(_Args&&... __args) const volatile
	{
	  return this->__call<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
a1372 24
  template<typename _Signature>
    struct is_bind_expression<const _Bind<_Signature> >
    : public true_type { };

  /**
   *  @@brief Class template _Bind is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Signature>
    struct is_bind_expression<volatile _Bind<_Signature> >
    : public true_type { };

  /**
   *  @@brief Class template _Bind is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Signature>
    struct is_bind_expression<const volatile _Bind<_Signature>>
    : public true_type { };

  /**
   *  @@brief Class template _Bind_result is always a bind expression.
   *  @@ingroup binders
   */
d1374 1
a1374 1
    struct is_bind_expression<_Bind_result<_Result, _Signature>>
a1377 46
   *  @@brief Class template _Bind_result is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Result, typename _Signature>
    struct is_bind_expression<const _Bind_result<_Result, _Signature>>
    : public true_type { };

  /**
   *  @@brief Class template _Bind_result is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Result, typename _Signature>
    struct is_bind_expression<volatile _Bind_result<_Result, _Signature>>
    : public true_type { };

  /**
   *  @@brief Class template _Bind_result is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Result, typename _Signature>
    struct is_bind_expression<const volatile _Bind_result<_Result, _Signature>>
    : public true_type { };

  // Trait type used to remove std::bind() from overload set via SFINAE
  // when first argument has integer type, so that std::bind() will
  // not be a better match than ::bind() from the BSD Sockets API.
  template<typename _Tp, typename _Tp2 = typename decay<_Tp>::type>
    using __is_socketlike = __or_<is_integral<_Tp2>, is_enum<_Tp2>>;

  template<bool _SocketLike, typename _Func, typename... _BoundArgs>
    struct _Bind_helper
    {
      typedef _Maybe_wrap_member_pointer<typename decay<_Func>::type>
	__maybe_type;
      typedef typename __maybe_type::type __func_type;
      typedef _Bind<__func_type(typename decay<_BoundArgs>::type...)> type;
    };

  // Partial specialization for is_socketlike == true, does not define
  // nested type so std::bind() will not participate in overload resolution
  // when the first argument might be a socket file descriptor.
  template<typename _Func, typename... _BoundArgs>
    struct _Bind_helper<true, _Func, _BoundArgs...>
    { };

  /**
d1381 4
a1384 14
  template<typename _Func, typename... _BoundArgs>
    inline typename
    _Bind_helper<__is_socketlike<_Func>::value, _Func, _BoundArgs...>::type
    bind(_Func&& __f, _BoundArgs&&... __args)
    {
      typedef _Bind_helper<false, _Func, _BoundArgs...> __helper_type;
      typedef typename __helper_type::__maybe_type __maybe_type;
      typedef typename __helper_type::type __result_type;
      return __result_type(__maybe_type::__do_wrap(std::forward<_Func>(__f)),
			   std::forward<_BoundArgs>(__args)...);
    }

  template<typename _Result, typename _Func, typename... _BoundArgs>
    struct _Bindres_helper
d1386 1
a1386 2
      typedef _Maybe_wrap_member_pointer<typename decay<_Func>::type>
	__maybe_type;
d1388 4
a1391 4
      typedef _Bind_result<_Result,
			   __functor_type(typename decay<_BoundArgs>::type...)>
	type;
    };
d1394 1
a1394 1
   *  @@brief Function template for std::bind<R>.
d1397 1
a1397 1
  template<typename _Result, typename _Func, typename... _BoundArgs>
d1399 4
a1402 2
    typename _Bindres_helper<_Result, _Func, _BoundArgs...>::type
    bind(_Func&& __f, _BoundArgs&&... __args)
d1404 6
a1409 76
      typedef _Bindres_helper<_Result, _Func, _BoundArgs...> __helper_type;
      typedef typename __helper_type::__maybe_type __maybe_type;
      typedef typename __helper_type::type __result_type;
      return __result_type(__maybe_type::__do_wrap(std::forward<_Func>(__f)),
			   std::forward<_BoundArgs>(__args)...);
    }

  template<typename _Signature>
    struct _Bind_simple;

  template<typename _Callable, typename... _Args>
    struct _Bind_simple<_Callable(_Args...)>
    {
      typedef typename result_of<_Callable(_Args...)>::type result_type;

      template<typename... _Args2, typename = typename
               enable_if< sizeof...(_Args) == sizeof...(_Args2)>::type>
        explicit
        _Bind_simple(const _Callable& __callable, _Args2&&... __args)
        : _M_bound(__callable, std::forward<_Args2>(__args)...)
        { }

      template<typename... _Args2, typename = typename
               enable_if< sizeof...(_Args) == sizeof...(_Args2)>::type>
        explicit
        _Bind_simple(_Callable&& __callable, _Args2&&... __args)
        : _M_bound(std::move(__callable), std::forward<_Args2>(__args)...)
        { }

      _Bind_simple(const _Bind_simple&) = default;
      _Bind_simple(_Bind_simple&&) = default;

      result_type
      operator()()
      {
        typedef typename _Build_index_tuple<sizeof...(_Args)>::__type _Indices;
        return _M_invoke(_Indices());
      }

    private:

      template<std::size_t... _Indices>
        typename result_of<_Callable(_Args...)>::type
        _M_invoke(_Index_tuple<_Indices...>)
        {
	  // std::bind always forwards bound arguments as lvalues,
	  // but this type can call functions which only accept rvalues.
          return std::forward<_Callable>(std::get<0>(_M_bound))(
              std::forward<_Args>(std::get<_Indices+1>(_M_bound))...);
        }

      std::tuple<_Callable, _Args...> _M_bound;
    };

  template<typename _Func, typename... _BoundArgs>
    struct _Bind_simple_helper
    {
      typedef _Maybe_wrap_member_pointer<typename decay<_Func>::type>
        __maybe_type;
      typedef typename __maybe_type::type __func_type;
      typedef _Bind_simple<__func_type(typename decay<_BoundArgs>::type...)>
       	__type;
    };

  // Simplified version of std::bind for internal use, without support for
  // unbound arguments, placeholders or nested bind expressions.
  template<typename _Callable, typename... _Args>
    typename _Bind_simple_helper<_Callable, _Args...>::__type
    __bind_simple(_Callable&& __callable, _Args&&... __args)
    {
      typedef _Bind_simple_helper<_Callable, _Args...> __helper_type;
      typedef typename __helper_type::__maybe_type __maybe_type;
      typedef typename __helper_type::__type __result_type;
      return __result_type(
          __maybe_type::__do_wrap( std::forward<_Callable>(__callable)),
          std::forward<_Args>(__args)...);
d1417 1
a1417 4
  class bad_function_call : public std::exception
  {
  public:
    virtual ~bad_function_call() noexcept;
d1419 6
a1424 2
    const char* what() const noexcept;
  };
d1499 1
a1499 1
    { return std::mem_fn(__p); }
d1504 1
a1504 11
    { return std::mem_fn(__p); }

  template<typename _Member, typename _Class>
    inline _Mem_fn<_Member _Class::*>
    __callable_functor(_Member _Class::* volatile &__p)
    { return std::mem_fn(__p); }

  template<typename _Member, typename _Class>
    inline _Mem_fn<_Member _Class::*>
    __callable_functor(_Member _Class::* const volatile &__p)
    { return std::mem_fn(__p); }
d1521 5
a1525 5
	(__is_location_invariant<_Functor>::value
	 && sizeof(_Functor) <= _M_max_size
	 && __alignof__(_Functor) <= _M_max_align
	 && (_M_max_align % __alignof__(_Functor) == 0));

d1533 1
a1533 1
	    __stored_locally? std::__addressof(__source._M_access<_Functor>())
d1562 1
a1562 1

d1569 1
a1569 1

d1585 1
a1585 1

d1600 1
a1600 1

d1604 1
a1604 1
	  { return static_cast<bool>(__f); }
d1608 1
a1608 1
	  _M_not_empty_function(_Tp* const& __fp)
d1622 1
a1622 1
	static void
d1636 1
a1636 1
      public:
d1652 1
a1652 1

d1662 2
a1663 1
	  _Base::_M_init_functor(__functor, std::__addressof(__f.get()));
d1668 1
a1668 1

d1679 1
a1679 1
				  _Manager_operation);
d1698 2
a1699 2
	return (*_Base::_M_get_pointer(__functor))(
	    std::forward<_ArgTypes>(__args)...);
d1713 2
a1714 2
	(*_Base::_M_get_pointer(__functor))(
	    std::forward<_ArgTypes>(__args)...);
d1728 2
a1729 2
	return __callable_functor(**_Base::_M_get_pointer(__functor))(
	      std::forward<_ArgTypes>(__args)...);
d1743 2
a1744 2
	__callable_functor(**_Base::_M_get_pointer(__functor))(
	    std::forward<_ArgTypes>(__args)...);
d1748 2
a1749 2
  template<typename _Class, typename _Member, typename _Res,
	   typename... _ArgTypes>
d1754 1
a1754 1
	_Base;
d1760 2
a1761 2
	return std::mem_fn(_Base::_M_get_pointer(__functor)->__value)(
	    std::forward<_ArgTypes>(__args)...);
d1768 1
a1768 1
		 _Simple_type_wrapper< _Member _Class::* > >
d1774 1
a1774 1
    public:
d1777 1
a1777 1
		 _Manager_operation __op)
d1779 1
a1779 1
	switch (__op)
d1785 1
a1785 1
#endif
d1790 1
a1790 1

d1794 1
a1794 1
	return false;
d1800 2
a1801 2
	std::mem_fn(_Base::_M_get_pointer(__functor)->__value)(
	    std::forward<_ArgTypes>(__args)...);
a1804 4
  template<typename _From, typename _To>
    using __check_func_return_type
      = __or_<is_void<_To>, is_convertible<_From, _To>>;

d1817 3
a1819 18

      template<typename _Functor>
	using _Invoke = decltype(__callable_functor(std::declval<_Functor&>())
				 (std::declval<_ArgTypes>()...) );

      // Used so the return type convertibility checks aren't done when
      // performing overload resolution for copy construction/assignment.
      template<typename _Tp>
	using _NotSelf = __not_<is_same<_Tp, function>>;

      template<typename _Functor>
	using _Callable
	  = __and_<_NotSelf<_Functor>,
		   __check_func_return_type<_Invoke<_Functor>, _Res>>;

      template<typename _Cond, typename _Tp>
	using _Requires = typename enable_if<_Cond::value, _Tp>::type;

d1822 1
a1822 1

d1824 1
a1824 1

d1829 3
a1831 3
      function() noexcept
      : _Function_base() { }

d1833 1
a1833 1
       *  @@brief Creates an empty function call wrapper.
d1836 2
a1837 3
      function(nullptr_t) noexcept
      : _Function_base() { }

d1840 2
a1841 2
       *  @@param __x A %function object with identical call signature.
       *  @@post @@c bool(*this) == bool(__x)
d1844 1
a1844 1
       *  __x (if it has one).
d1850 1
a1850 1
       *  @@param __x A %function object rvalue with identical call signature.
d1852 1
a1852 1
       *  The newly-created %function contains the target of @@a __x
d1857 1
a1857 1
	__x.swap(*this);
d1861 1
a1861 1

d1865 1
a1865 1
       *  @@param __f A %function object that is callable with parameters of
d1869 2
a1870 2
       *  The newly-created %function object will target a copy of 
       *  @@a __f. If @@a __f is @@c reference_wrapper<F>, then this function
d1872 1
a1872 1
       *  __f.get(). If @@a __f is a NULL function pointer or NULL
d1875 1
a1875 1
       *  If @@a __f is a non-NULL function pointer or an object of type @@c
d1878 5
a1882 3
      template<typename _Functor,
	       typename = _Requires<_Callable<_Functor>, void>>
	function(_Functor);
d1886 1
a1886 1
       *  @@param __x A %function with identical call signature.
d1890 1
a1890 1
       *  The target of @@a __x is copied to @@c *this. If @@a __x has no
d1893 1
a1893 1
       *  If @@a __x targets a function pointer or a reference to a function
d1899 2
a1900 2
	function(__x).swap(*this);
	return *this;
d1905 1
a1905 1
       *  @@param __x A %function rvalue with identical call signature.
d1908 1
a1908 1
       *  The target of @@a __x is moved to @@c *this. If @@a __x has no
d1911 1
a1911 1
       *  If @@a __x targets a function pointer or a reference to a function
d1917 2
a1918 2
	function(std::move(__x)).swap(*this);
	return *this;
d1929 1
a1929 1
      operator=(nullptr_t)
d1931 1
a1931 1
	if (_M_manager)
d1937 1
a1937 1
	return *this;
d1942 1
a1942 1
       *  @@param __f A %function object that is callable with parameters of
d1948 1
a1948 1
       *  __f. If @@a __f is @@c reference_wrapper<F>, then this function
d1950 1
a1950 1
       *  __f.get(). If @@a __f is a NULL function pointer or NULL
d1953 1
a1953 1
       *  If @@a __f is a non-NULL function pointer or an object of type @@c
d1957 1
a1957 1
	_Requires<_Callable<typename decay<_Functor>::type>, function&>
d1966 2
a1967 2
	function&
	operator=(reference_wrapper<_Functor> __f) noexcept
d1974 1
a1974 1

d1977 1
a1977 1
       *  @@param __x A %function with identical call signature.
d1979 1
a1979 1
       *  Swap the targets of @@c this function object and @@a __f. This
d1984 16
a1999 3
	std::swap(_M_functor, __x._M_functor);
	std::swap(_M_manager, __x._M_manager);
	std::swap(_M_invoker, __x._M_invoker);
d2005 6
a2010 6
	void
	assign(_Functor&& __f, const _Alloc& __a)
	{
	  function(allocator_arg, __a,
		   std::forward<_Functor>(__f)).swap(*this);
	}
d2012 1
a2012 1

d2023 1
a2023 1
      explicit operator bool() const noexcept
d2049 2
a2050 2
      const type_info& target_type() const noexcept;

d2060 2
a2061 2
      template<typename _Functor>       _Functor* target() noexcept;

d2063 1
a2063 1
      template<typename _Functor> const _Functor* target() const noexcept;
d2066 6
d2092 1
a2092 1
    template<typename _Functor, typename>
d2094 3
a2096 1
      function(_Functor __f)
a2102 1
	    _My_handler::_M_init_functor(_M_functor, std::move(__f));
d2105 1
d2115 1
a2115 1
	__throw_bad_function_call();
d2123 1
a2123 1
    target_type() const noexcept
d2126 5
a2130 5
	{
	  _Any_data __typeinfo_result;
	  _M_manager(__typeinfo_result, _M_functor, __get_type_info);
	  return *__typeinfo_result._M_access<const type_info*>();
	}
d2139 1
a2139 1
      target() noexcept
d2158 1
a2158 1
      target() const noexcept
d2182 1
a2182 1
    operator==(const function<_Res(_Args...)>& __f, nullptr_t) noexcept
d2188 1
a2188 1
    operator==(nullptr_t, const function<_Res(_Args...)>& __f) noexcept
d2200 1
a2200 1
    operator!=(const function<_Res(_Args...)>& __f, nullptr_t) noexcept
d2206 1
a2206 1
    operator!=(nullptr_t, const function<_Res(_Args...)>& __f) noexcept
d2220 1
d2222 1
a2222 4
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std

#endif // C++11
@


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) 2001-2013 Free Software Foundation, Inc.
d52 1
a52 1
#if __cplusplus >= 201103L
d61 1
a61 1
namespace std _GLIBCXX_VISIBILITY(default)
a62 2
_GLIBCXX_BEGIN_NAMESPACE_VERSION

a64 3
  template<typename _Tp, typename _Class>
    _Mem_fn<_Tp _Class::*>
    mem_fn(_Tp _Class::*) noexcept;
d66 27
a92 1
_GLIBCXX_HAS_NESTED_TYPE(result_type)
d101 3
a103 1
    { typedef typename _Functor::result_type result_type; };
d111 1
a111 1
    : _Maybe_get_result_type<__has_result_type<_Functor>::value, _Functor>
d115 1
a115 1
  template<typename _Res, typename... _ArgTypes>
d117 3
a119 29
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes......)>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes...) const>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes......) const>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes...) volatile>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes......) volatile>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes...) const volatile>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes......) const volatile>
    { typedef _Res result_type; };
d122 1
a122 1
  template<typename _Res, typename... _ArgTypes>
d124 3
a126 5
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(&)(_ArgTypes......)>
    { typedef _Res result_type; };
d129 1
a129 1
  template<typename _Res, typename... _ArgTypes>
d131 3
a133 1
    { typedef _Res result_type; };
d135 2
a136 6
  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(*)(_ArgTypes......)>
    { typedef _Res result_type; };

  /// Retrieve result type for a member function pointer.
  template<typename _Res, typename _Class, typename... _ArgTypes>
d138 3
a140 5
    { typedef _Res result_type; };

  template<typename _Res, typename _Class, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......)>
    { typedef _Res result_type; };
d142 2
a143 2
  /// Retrieve result type for a const member function pointer.
  template<typename _Res, typename _Class, typename... _ArgTypes>
d145 3
a147 1
    { typedef _Res result_type; };
d149 2
a150 6
  template<typename _Res, typename _Class, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) const>
    { typedef _Res result_type; };

  /// Retrieve result type for a volatile member function pointer.
  template<typename _Res, typename _Class, typename... _ArgTypes>
d152 3
a154 1
    { typedef _Res result_type; };
d156 6
a161 14
  template<typename _Res, typename _Class, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) volatile>
    { typedef _Res result_type; };

  /// Retrieve result type for a const volatile member function pointer.
  template<typename _Res, typename _Class, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...)
				  const volatile>
    { typedef _Res result_type; };

  template<typename _Res, typename _Class, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......)
				  const volatile>
    { typedef _Res result_type; };
d172 11
d189 1
a189 1
	static __one __test(const volatile unary_function<_T1, _Res>*);
d205 1
a205 1
	static __one __test(const volatile binary_function<_T1, _T2, _Res>*);
d215 13
d235 1
a235 14
	     (!is_member_pointer<_Functor>::value
	      && !is_function<_Functor>::value
	      && !is_function<typename remove_pointer<_Functor>::type>::value),
	     typename result_of<_Functor&(_Args&&...)>::type
	   >::type
    __invoke(_Functor& __f, _Args&&... __args)
    {
      return __f(std::forward<_Args>(__args)...);
    }

  template<typename _Functor, typename... _Args>
    inline
    typename enable_if<
             (is_member_pointer<_Functor>::value
d238 1
a238 1
             typename result_of<_Functor(_Args&&...)>::type
d242 1
a242 1
      return std::mem_fn(__f)(std::forward<_Args>(__args)...);
d249 4
a252 4
	     (is_pointer<_Functor>::value
	      && is_function<typename remove_pointer<_Functor>::type>::value),
	     typename result_of<_Functor(_Args&&...)>::type
	   >::type
d266 1
a266 1
  // None of the nested argument types.
d272 1
a272 1
  // Nested argument_type only.
d275 3
a277 4
    : _Weak_result_type<_Tp>
    {
      typedef typename _Tp::argument_type argument_type;
    };
d279 1
a279 1
  // Nested first_argument_type and second_argument_type only.
d282 4
a285 5
    : _Weak_result_type<_Tp>
    {
      typedef typename _Tp::first_argument_type first_argument_type;
      typedef typename _Tp::second_argument_type second_argument_type;
    };
d287 2
a288 1
  // All the nested argument types.
d291 5
a295 1
    : _Weak_result_type<_Tp>
d297 1
a297 3
      typedef typename _Tp::argument_type argument_type;
      typedef typename _Tp::first_argument_type first_argument_type;
      typedef typename _Tp::second_argument_type second_argument_type;
a299 4
  _GLIBCXX_HAS_NESTED_TYPE(argument_type)
  _GLIBCXX_HAS_NESTED_TYPE(first_argument_type)
  _GLIBCXX_HAS_NESTED_TYPE(second_argument_type)

d309 2
a310 3
      __has_argument_type<_Tp>::value,
      __has_first_argument_type<_Tp>::value
      && __has_second_argument_type<_Tp>::value,
a319 15
  template<typename _Res, typename _T1>
    struct _Reference_wrapper_base<_Res(_T1) const>
    : unary_function<_T1, _Res>
    { };

  template<typename _Res, typename _T1>
    struct _Reference_wrapper_base<_Res(_T1) volatile>
    : unary_function<_T1, _Res>
    { };

  template<typename _Res, typename _T1>
    struct _Reference_wrapper_base<_Res(_T1) const volatile>
    : unary_function<_T1, _Res>
    { };

a325 15
  template<typename _Res, typename _T1, typename _T2>
    struct _Reference_wrapper_base<_Res(_T1, _T2) const>
    : binary_function<_T1, _T2, _Res>
    { };

  template<typename _Res, typename _T1, typename _T2>
    struct _Reference_wrapper_base<_Res(_T1, _T2) volatile>
    : binary_function<_T1, _T2, _Res>
    { };

  template<typename _Res, typename _T1, typename _T2>
    struct _Reference_wrapper_base<_Res(_T1, _T2) const volatile>
    : binary_function<_T1, _T2, _Res>
    { };

d395 5
a400 1

d404 1
a404 2
      reference_wrapper(_Tp& __indata) noexcept
      : _M_data(std::__addressof(__indata))
d409 2
a410 2
      reference_wrapper(const reference_wrapper<_Tp>& __inref) noexcept
      : _M_data(__inref._M_data)
d414 1
a414 1
      operator=(const reference_wrapper<_Tp>& __inref) noexcept
d416 2
a417 2
	_M_data = __inref._M_data;
	return *this;
d420 1
a420 1
      operator _Tp&() const noexcept
d424 1
a424 1
      get() const noexcept
d428 3
a430 3
	typename result_of<_Tp&(_Args&&...)>::type
	operator()(_Args&&... __args) const
	{
d439 1
a439 1
    ref(_Tp& __t) noexcept
d445 1
a445 1
    cref(const _Tp& __t) noexcept
a447 6
  template<typename _Tp>
    void ref(const _Tp&&) = delete;

  template<typename _Tp>
    void cref(const _Tp&&) = delete;

d451 1
a451 1
    ref(reference_wrapper<_Tp> __t) noexcept
d457 1
a457 1
    cref(reference_wrapper<_Tp> __t) noexcept
d462 5
a466 3
  template<typename... _Types>
    struct _Pack : integral_constant<size_t, sizeof...(_Types)>
    { };
d468 5
a472 12
  template<typename _From, typename _To, bool = _From::value == _To::value>
    struct _AllConvertible : false_type
    { };

  template<typename... _From, typename... _To>
    struct _AllConvertible<_Pack<_From...>, _Pack<_To...>, true>
    : __and_<is_convertible<_From, _To>...>
    { };

  template<typename _Tp1, typename _Tp2>
    using _NotSame = __not_<is_same<typename std::decay<_Tp1>::type,
				    typename std::decay<_Tp2>::type>>;
d479 1
a479 1
  template<typename _Res, typename... _ArgTypes>
d482 2
a483 2
  /// Derives from @@c unary_function, as appropriate.
  template<typename _Res, typename _T1>
d487 2
a488 2
  /// Derives from @@c binary_function, as appropriate.
  template<typename _Res, typename _T1, typename _T2>
d499 5
a503 8
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __object, const volatile _Class *,
		_Args&&... __args) const
	{
	  return (std::forward<_Tp>(__object).*__pmf)
	    (std::forward<_Args>(__args)...);
	}
d505 4
a508 23
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const
	{ return ((*__ptr).*__pmf)(std::forward<_Args>(__args)...); }

      // Require each _Args to be convertible to corresponding _ArgTypes
      template<typename... _Args>
	using _RequireValidArgs
	  = _Require<_AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      // Require each _Args to be convertible to corresponding _ArgTypes
      // and require _Tp is not _Class, _Class& or _Class*
      template<typename _Tp, typename... _Args>
	using _RequireValidArgs2
	  = _Require<_NotSame<_Class, _Tp>, _NotSame<_Class*, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      // Require each _Args to be convertible to corresponding _ArgTypes
      // and require _Tp is _Class or derived from _Class
      template<typename _Tp, typename... _Args>
	using _RequireValidArgs3
	  = _Require<is_base_of<_Class, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;
d516 3
a518 11
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(_Class& __object, _Args&&... __args) const
	{ return (__object.*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(_Class&& __object, _Args&&... __args) const
	{
	  return (std::move(__object).*__pmf)(std::forward<_Args>(__args)...);
	}
d521 3
a523 4
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(_Class* __object, _Args&&... __args) const
	{ return (__object->*__pmf)(std::forward<_Args>(__args)...); }
d526 7
a532 14
      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs2<_Tp, _Args...>>
	_Res
	operator()(_Tp&& __object, _Args&&... __args) const
	{
	  return _M_call(std::forward<_Tp>(__object), &__object,
	      std::forward<_Args>(__args)...);
	}

      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs3<_Tp, _Args...>>
	_Res
	operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const
	{ return operator()(__ref.get(), std::forward<_Args>(__args)...); }
d541 1
a541 1
    : public _Maybe_unary_or_binary_function<_Res, const _Class*,
d546 5
a550 8
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __object, const volatile _Class *,
		_Args&&... __args) const
	{
	  return (std::forward<_Tp>(__object).*__pmf)
	    (std::forward<_Args>(__args)...);
	}
d552 4
a555 18
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const
	{ return ((*__ptr).*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args>
	using _RequireValidArgs
	  = _Require<_AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs2
	  = _Require<_NotSame<_Class, _Tp>, _NotSame<const _Class*, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs3
	  = _Require<is_base_of<_Class, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;
d563 3
a565 11
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const _Class& __object, _Args&&... __args) const
	{ return (__object.*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const _Class&& __object, _Args&&... __args) const
	{
	  return (std::move(__object).*__pmf)(std::forward<_Args>(__args)...);
	}
d568 3
a570 4
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const _Class* __object, _Args&&... __args) const
	{ return (__object->*__pmf)(std::forward<_Args>(__args)...); }
d573 6
a578 13
      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs2<_Tp, _Args...>>
	_Res operator()(_Tp&& __object, _Args&&... __args) const
	{
	  return _M_call(std::forward<_Tp>(__object), &__object,
	      std::forward<_Args>(__args)...);
	}

      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs3<_Tp, _Args...>>
	_Res
	operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const
	{ return operator()(__ref.get(), std::forward<_Args>(__args)...); }
d587 1
a587 1
    : public _Maybe_unary_or_binary_function<_Res, volatile _Class*,
d592 5
a596 8
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __object, const volatile _Class *,
		_Args&&... __args) const
	{
	  return (std::forward<_Tp>(__object).*__pmf)
	    (std::forward<_Args>(__args)...);
	}
d598 4
a601 18
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const
	{ return ((*__ptr).*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args>
	using _RequireValidArgs
	  = _Require<_AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs2
	  = _Require<_NotSame<_Class, _Tp>, _NotSame<volatile _Class*, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs3
	  = _Require<is_base_of<_Class, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;
d609 3
a611 11
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(volatile _Class& __object, _Args&&... __args) const
	{ return (__object.*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(volatile _Class&& __object, _Args&&... __args) const
	{
	  return (std::move(__object).*__pmf)(std::forward<_Args>(__args)...);
	}
d614 3
a616 4
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(volatile _Class* __object, _Args&&... __args) const
	{ return (__object->*__pmf)(std::forward<_Args>(__args)...); }
d619 7
a625 14
      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs2<_Tp, _Args...>>
	_Res
	operator()(_Tp&& __object, _Args&&... __args) const
	{
	  return _M_call(std::forward<_Tp>(__object), &__object,
	      std::forward<_Args>(__args)...);
	}

      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs3<_Tp, _Args...>>
	_Res
	operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const
	{ return operator()(__ref.get(), std::forward<_Args>(__args)...); }
d634 1
a634 1
    : public _Maybe_unary_or_binary_function<_Res, const volatile _Class*,
d639 5
a643 8
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __object, const volatile _Class *,
		_Args&&... __args) const
	{
	  return (std::forward<_Tp>(__object).*__pmf)
	    (std::forward<_Args>(__args)...);
	}
d645 4
a648 19
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const
	{ return ((*__ptr).*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args>
	using _RequireValidArgs
	  = _Require<_AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs2
	  = _Require<_NotSame<_Class, _Tp>,
		     _NotSame<const volatile _Class*, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs3
	  = _Require<is_base_of<_Class, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;
d656 3
a658 11
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const volatile _Class& __object, _Args&&... __args) const
	{ return (__object.*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const volatile _Class&& __object, _Args&&... __args) const
	{
	  return (std::move(__object).*__pmf)(std::forward<_Args>(__args)...);
	}
d661 3
a663 4
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const volatile _Class* __object, _Args&&... __args) const
	{ return (__object->*__pmf)(std::forward<_Args>(__args)...); }
d666 6
a671 13
      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs2<_Tp, _Args...>>
	_Res operator()(_Tp&& __object, _Args&&... __args) const
	{
	  return _M_call(std::forward<_Tp>(__object), &__object,
	      std::forward<_Args>(__args)...);
	}

      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs3<_Tp, _Args...>>
	_Res
	operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const
	{ return operator()(__ref.get(), std::forward<_Args>(__args)...); }
a677 12
  template<typename _Tp, bool>
    struct _Mem_fn_const_or_non
    {
      typedef const _Tp& type;
    };

  template<typename _Tp>
    struct _Mem_fn_const_or_non<_Tp, false>
    {
      typedef _Tp& type;
    };

a680 2
      using __pm_type = _Res _Class::*;

a682 1
      // Made less elegant to support perfect forwarding and noexcept.
d684 8
a691 4
	auto
	_M_call(_Tp&& __object, const _Class *) const noexcept
	-> decltype(std::forward<_Tp>(__object).*std::declval<__pm_type&>())
	{ return std::forward<_Tp>(__object).*__pm; }
d694 8
a701 4
	auto
	_M_call(_Tp&& __object, _Up * const *) const noexcept
	-> decltype((*std::forward<_Tp>(__object)).*std::declval<__pm_type&>())
	{ return (*std::forward<_Tp>(__object)).*__pm; }
d704 16
a719 5
	auto
	_M_call(_Tp&& __ptr, const volatile void*) const
	noexcept(noexcept((*__ptr).*std::declval<__pm_type&>()))
	-> decltype((*__ptr).*std::declval<__pm_type&>())
	{ return (*__ptr).*__pm; }
d722 18
d741 1
a741 1
      _Mem_fn(_Res _Class::*__pm) noexcept : __pm(__pm) { }
d745 1
a745 1
      operator()(_Class& __object) const noexcept
d749 1
a749 1
      operator()(const _Class& __object) const noexcept
a751 8
      _Res&&
      operator()(_Class&& __object) const noexcept
      { return std::forward<_Class>(__object).*__pm; }

      const _Res&&
      operator()(const _Class&& __object) const noexcept
      { return std::forward<const _Class>(__object).*__pm; }

d754 1
a754 1
      operator()(_Class* __object) const noexcept
d758 1
a758 1
      operator()(const _Class* __object) const noexcept
d762 4
a765 14
      template<typename _Tp, typename _Req = _Require<_NotSame<_Class*, _Tp>>>
	auto
	operator()(_Tp&& __unknown) const
	noexcept(noexcept(std::declval<_Mem_fn*>()->_M_call
			  (std::forward<_Tp>(__unknown), &__unknown)))
	-> decltype(this->_M_call(std::forward<_Tp>(__unknown), &__unknown))
	{ return _M_call(std::forward<_Tp>(__unknown), &__unknown); }

      template<typename _Tp, typename _Req = _Require<is_base_of<_Class, _Tp>>>
	auto
	operator()(reference_wrapper<_Tp> __ref) const
	noexcept(noexcept(std::declval<_Mem_fn&>()(__ref.get())))
	-> decltype((*this)(__ref.get()))
	{ return (*this)(__ref.get()); }
a770 2
  // _GLIBCXX_RESOLVE_LIB_DEFECTS
  // 2048.  Unnecessary mem_fn overloads
d778 1
a778 1
    mem_fn(_Tp _Class::* __pm) noexcept
d803 1
a803 3
  /** @@brief The type of placeholder objects defined by libstdc++.
   *  @@ingroup binders
   */
a805 2
  _GLIBCXX_END_NAMESPACE_VERSION

d807 1
a807 1
   *  @@brief ISO C++11 entities sub-namespace for functional.
d809 39
a847 38
   */
  namespace placeholders
  {
  _GLIBCXX_BEGIN_NAMESPACE_VERSION
  /* Define a large number of placeholders. There is no way to
   * simplify this with variadic templates, because we're introducing
   * unique names for each.
   */
    extern const _Placeholder<1> _1;
    extern const _Placeholder<2> _2;
    extern const _Placeholder<3> _3;
    extern const _Placeholder<4> _4;
    extern const _Placeholder<5> _5;
    extern const _Placeholder<6> _6;
    extern const _Placeholder<7> _7;
    extern const _Placeholder<8> _8;
    extern const _Placeholder<9> _9;
    extern const _Placeholder<10> _10;
    extern const _Placeholder<11> _11;
    extern const _Placeholder<12> _12;
    extern const _Placeholder<13> _13;
    extern const _Placeholder<14> _14;
    extern const _Placeholder<15> _15;
    extern const _Placeholder<16> _16;
    extern const _Placeholder<17> _17;
    extern const _Placeholder<18> _18;
    extern const _Placeholder<19> _19;
    extern const _Placeholder<20> _20;
    extern const _Placeholder<21> _21;
    extern const _Placeholder<22> _22;
    extern const _Placeholder<23> _23;
    extern const _Placeholder<24> _24;
    extern const _Placeholder<25> _25;
    extern const _Placeholder<26> _26;
    extern const _Placeholder<27> _27;
    extern const _Placeholder<28> _28;
    extern const _Placeholder<29> _29;
  _GLIBCXX_END_NAMESPACE_VERSION
a849 2
  _GLIBCXX_BEGIN_NAMESPACE_VERSION

d860 22
a881 4
  template<int _Num>
    struct is_placeholder<const _Placeholder<_Num> >
    : public integral_constant<int, _Num>
    { };
d883 1
a883 1
  /**
d894 1
a894 1
  template<std::size_t __i, typename _Tuple, bool _IsSafe>
d903 1
a903 1
  template<std::size_t __i, typename _Tuple>
d913 1
a913 1
 template<std::size_t __i, typename _Tuple>
d915 2
a916 2
   : _Safe_tuple_element_impl<__i, _Tuple,
			      (__i < tuple_size<_Tuple>::value)>
d931 2
a932 2
	   bool _IsBindExp = is_bind_expression<_Arg>::value,
	   bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)>
d950 3
a952 3
	result_type
	operator()(_CVRef& __arg, _Tuple&) const volatile
	{ return __arg.get(); }
d964 9
d974 4
a977 5
	auto
	operator()(_CVArg& __arg,
		   tuple<_Args...>& __tuple) const volatile
	-> decltype(__arg(declval<_Args>()...))
	{
d981 1
a981 1
	  return this->__call(__arg, __tuple, _Indexes());
d986 4
a989 4
      // of the arguments in the tuple.
      template<typename _CVArg, typename... _Args, std::size_t... _Indexes>
	auto
	__call(_CVArg& __arg, tuple<_Args...>& __tuple,
d991 1
a991 2
	-> decltype(__arg(declval<_Args>()...))
	{
d1008 2
a1009 2
	class result<_CVMu(_CVArg, _Tuple)>
	{
d1022 3
a1024 3
	typename result<_Mu(_Arg, _Tuple)>::type
	operator()(const volatile _Arg&, _Tuple& __tuple) const volatile
	{
d1026 1
a1026 1
	      ::std::get<(is_placeholder<_Arg>::value - 1)>(__tuple));
d1042 2
a1043 2
	struct result<_CVMu(_CVArg, _Tuple)>
	{
d1049 3
a1051 3
	_CVArg&&
	operator()(_CVArg&& __arg, _Tuple&) const volatile
	{ return std::forward<_CVArg>(__arg); }
d1063 1
a1063 1

a1066 4

      static _Tp&&
      __do_wrap(_Tp&& __x)
      { return static_cast<_Tp&&>(__x); }
d1078 1
a1078 1

a1093 14
  // std::get<I> for volatile-qualified tuples
  template<std::size_t _Ind, typename... _Tp>
    inline auto
    __volget(volatile tuple<_Tp...>& __tuple)
    -> typename tuple_element<_Ind, tuple<_Tp...>>::type volatile&
    { return std::get<_Ind>(const_cast<tuple<_Tp...>&>(__tuple)); }

  // std::get<I> for const-volatile-qualified tuples
  template<std::size_t _Ind, typename... _Tp>
    inline auto
    __volget(const volatile tuple<_Tp...>& __tuple)
    -> typename tuple_element<_Ind, tuple<_Tp...>>::type const volatile&
    { return std::get<_Ind>(const_cast<const tuple<_Tp...>&>(__tuple)); }

d1103 2
a1104 2
      typedef typename _Build_index_tuple<sizeof...(_Bound_args)>::__type
	_Bound_indexes;
d1110 7
a1116 7
      template<typename _Result, typename... _Args, std::size_t... _Indexes>
	_Result
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>)
	{
	  return _M_f(_Mu<_Bound_args>()
		      (get<_Indexes>(_M_bound_args), __args)...);
	}
d1119 7
a1125 7
      template<typename _Result, typename... _Args, std::size_t... _Indexes>
	_Result
	__call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const
	{
	  return _M_f(_Mu<_Bound_args>()
		      (get<_Indexes>(_M_bound_args), __args)...);
	}
d1127 1
d1129 3
a1131 3
      template<typename _Result, typename... _Args, std::size_t... _Indexes>
	_Result
	__call_v(tuple<_Args...>&& __args,
d1133 4
a1136 4
	{
	  return _M_f(_Mu<_Bound_args>()
		      (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1139 3
a1141 3
      template<typename _Result, typename... _Args, std::size_t... _Indexes>
	_Result
	__call_c_v(tuple<_Args...>&& __args,
d1143 5
a1147 4
	{
	  return _M_f(_Mu<_Bound_args>()
		      (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1150 3
a1152 14
      template<typename... _Args>
	explicit _Bind(const _Functor& __f, _Args&&... __args)
	: _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...)
	{ }

      template<typename... _Args>
	explicit _Bind(_Functor&& __f, _Args&&... __args)
	: _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...)
	{ }

      _Bind(const _Bind&) = default;

      _Bind(_Bind&& __b)
      : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args))
d1157 10
a1166 10
	= decltype( std::declval<_Functor>()(
	      _Mu<_Bound_args>()( std::declval<_Bound_args&>(),
				  std::declval<tuple<_Args...>&>() )... ) )>
	_Result
	operator()(_Args&&... __args)
	{
	  return this->__call<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1170 1
a1170 2
	= decltype( std::declval<typename enable_if<(sizeof...(_Args) >= 0),
		       typename add_const<_Functor>::type>::type>()(
d1172 8
a1179 8
				  std::declval<tuple<_Args...>&>() )... ) )>
	_Result
	operator()(_Args&&... __args) const
	{
	  return this->__call_c<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1181 1
d1184 10
a1193 11
	= decltype( std::declval<typename enable_if<(sizeof...(_Args) >= 0),
                       typename add_volatile<_Functor>::type>::type>()(
	      _Mu<_Bound_args>()( std::declval<volatile _Bound_args&>(),
				  std::declval<tuple<_Args...>&>() )... ) )>
	_Result
	operator()(_Args&&... __args) volatile
	{
	  return this->__call_v<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1197 11
a1207 11
	= decltype( std::declval<typename enable_if<(sizeof...(_Args) >= 0),
                       typename add_cv<_Functor>::type>::type>()(
	      _Mu<_Bound_args>()( std::declval<const volatile _Bound_args&>(),
				  std::declval<tuple<_Args...>&>() )... ) )>
	_Result
	operator()(_Args&&... __args) const volatile
	{
	  return this->__call_c_v<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1218 2
a1219 2
      typedef typename _Build_index_tuple<sizeof...(_Bound_args)>::__type
	_Bound_indexes;
d1226 1
a1226 1
	struct __enable_if_void : enable_if<is_void<_Res>::value, int> { };
d1228 1
a1228 1
	struct __disable_if_void : enable_if<!is_void<_Res>::value, int> { };
d1231 8
a1238 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	_Result
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __disable_if_void<_Res>::type = 0)
	{
	  return _M_f(_Mu<_Bound_args>()
		      (get<_Indexes>(_M_bound_args), __args)...);
	}
d1241 8
a1248 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	void
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __enable_if_void<_Res>::type = 0)
	{
	  _M_f(_Mu<_Bound_args>()
	       (get<_Indexes>(_M_bound_args), __args)...);
	}
d1251 8
a1258 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	_Result
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __disable_if_void<_Res>::type = 0) const
	{
	  return _M_f(_Mu<_Bound_args>()
		      (get<_Indexes>(_M_bound_args), __args)...);
	}
d1261 8
a1268 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	void
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __enable_if_void<_Res>::type = 0) const
	{
	  _M_f(_Mu<_Bound_args>()
	       (get<_Indexes>(_M_bound_args),  __args)...);
	}
d1271 8
a1278 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	_Result
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __disable_if_void<_Res>::type = 0) volatile
	{
	  return _M_f(_Mu<_Bound_args>()
		      (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1281 8
a1288 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	void
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __enable_if_void<_Res>::type = 0) volatile
	{
	  _M_f(_Mu<_Bound_args>()
	       (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1291 8
a1298 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	_Result
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __disable_if_void<_Res>::type = 0) const volatile
	{
	  return _M_f(_Mu<_Bound_args>()
		      (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1301 9
a1309 9
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	void
	__call(tuple<_Args...>&& __args,
	       _Index_tuple<_Indexes...>,
	    typename __enable_if_void<_Res>::type = 0) const volatile
	{
	  _M_f(_Mu<_Bound_args>()
	       (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1314 4
a1317 14
      template<typename... _Args>
	explicit _Bind_result(const _Functor& __f, _Args&&... __args)
	: _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...)
	{ }

      template<typename... _Args>
	explicit _Bind_result(_Functor&& __f, _Args&&... __args)
	: _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...)
	{ }

      _Bind_result(const _Bind_result&) = default;

      _Bind_result(_Bind_result&& __b)
      : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args))
d1322 7
a1328 7
	result_type
	operator()(_Args&&... __args)
	{
	  return this->__call<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1332 7
a1338 7
	result_type
	operator()(_Args&&... __args) const
	{
	  return this->__call<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1342 7
a1348 7
	result_type
	operator()(_Args&&... __args) volatile
	{
	  return this->__call<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1352 7
a1358 7
	result_type
	operator()(_Args&&... __args) const volatile
	{
	  return this->__call<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
a1372 32
  template<typename _Signature>
    struct is_bind_expression<const _Bind<_Signature> >
    : public true_type { };

  /**
   *  @@brief Class template _Bind is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Signature>
    struct is_bind_expression<volatile _Bind<_Signature> >
    : public true_type { };

  /**
   *  @@brief Class template _Bind is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Signature>
    struct is_bind_expression<const volatile _Bind<_Signature>>
    : public true_type { };

  /**
   *  @@brief Class template _Bind_result is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Result, typename _Signature>
    struct is_bind_expression<_Bind_result<_Result, _Signature>>
    : public true_type { };

  /**
   *  @@brief Class template _Bind_result is always a bind expression.
   *  @@ingroup binders
   */
d1374 1
a1374 1
    struct is_bind_expression<const _Bind_result<_Result, _Signature>>
a1377 38
   *  @@brief Class template _Bind_result is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Result, typename _Signature>
    struct is_bind_expression<volatile _Bind_result<_Result, _Signature>>
    : public true_type { };

  /**
   *  @@brief Class template _Bind_result is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Result, typename _Signature>
    struct is_bind_expression<const volatile _Bind_result<_Result, _Signature>>
    : public true_type { };

  // Trait type used to remove std::bind() from overload set via SFINAE
  // when first argument has integer type, so that std::bind() will
  // not be a better match than ::bind() from the BSD Sockets API.
  template<typename _Tp, typename _Tp2 = typename decay<_Tp>::type>
    using __is_socketlike = __or_<is_integral<_Tp2>, is_enum<_Tp2>>;

  template<bool _SocketLike, typename _Func, typename... _BoundArgs>
    struct _Bind_helper
    {
      typedef _Maybe_wrap_member_pointer<typename decay<_Func>::type>
	__maybe_type;
      typedef typename __maybe_type::type __func_type;
      typedef _Bind<__func_type(typename decay<_BoundArgs>::type...)> type;
    };

  // Partial specialization for is_socketlike == true, does not define
  // nested type so std::bind() will not participate in overload resolution
  // when the first argument might be a socket file descriptor.
  template<typename _Func, typename... _BoundArgs>
    struct _Bind_helper<true, _Func, _BoundArgs...>
    { };

  /**
d1381 4
a1384 14
  template<typename _Func, typename... _BoundArgs>
    inline typename
    _Bind_helper<__is_socketlike<_Func>::value, _Func, _BoundArgs...>::type
    bind(_Func&& __f, _BoundArgs&&... __args)
    {
      typedef _Bind_helper<false, _Func, _BoundArgs...> __helper_type;
      typedef typename __helper_type::__maybe_type __maybe_type;
      typedef typename __helper_type::type __result_type;
      return __result_type(__maybe_type::__do_wrap(std::forward<_Func>(__f)),
			   std::forward<_BoundArgs>(__args)...);
    }

  template<typename _Result, typename _Func, typename... _BoundArgs>
    struct _Bindres_helper
d1386 1
a1386 2
      typedef _Maybe_wrap_member_pointer<typename decay<_Func>::type>
	__maybe_type;
d1388 4
a1391 4
      typedef _Bind_result<_Result,
			   __functor_type(typename decay<_BoundArgs>::type...)>
	type;
    };
d1394 1
a1394 1
   *  @@brief Function template for std::bind<R>.
d1397 1
a1397 1
  template<typename _Result, typename _Func, typename... _BoundArgs>
d1399 4
a1402 2
    typename _Bindres_helper<_Result, _Func, _BoundArgs...>::type
    bind(_Func&& __f, _BoundArgs&&... __args)
d1404 6
a1409 76
      typedef _Bindres_helper<_Result, _Func, _BoundArgs...> __helper_type;
      typedef typename __helper_type::__maybe_type __maybe_type;
      typedef typename __helper_type::type __result_type;
      return __result_type(__maybe_type::__do_wrap(std::forward<_Func>(__f)),
			   std::forward<_BoundArgs>(__args)...);
    }

  template<typename _Signature>
    struct _Bind_simple;

  template<typename _Callable, typename... _Args>
    struct _Bind_simple<_Callable(_Args...)>
    {
      typedef typename result_of<_Callable(_Args...)>::type result_type;

      template<typename... _Args2, typename = typename
               enable_if< sizeof...(_Args) == sizeof...(_Args2)>::type>
        explicit
        _Bind_simple(const _Callable& __callable, _Args2&&... __args)
        : _M_bound(__callable, std::forward<_Args2>(__args)...)
        { }

      template<typename... _Args2, typename = typename
               enable_if< sizeof...(_Args) == sizeof...(_Args2)>::type>
        explicit
        _Bind_simple(_Callable&& __callable, _Args2&&... __args)
        : _M_bound(std::move(__callable), std::forward<_Args2>(__args)...)
        { }

      _Bind_simple(const _Bind_simple&) = default;
      _Bind_simple(_Bind_simple&&) = default;

      result_type
      operator()()
      {
        typedef typename _Build_index_tuple<sizeof...(_Args)>::__type _Indices;
        return _M_invoke(_Indices());
      }

    private:

      template<std::size_t... _Indices>
        typename result_of<_Callable(_Args...)>::type
        _M_invoke(_Index_tuple<_Indices...>)
        {
	  // std::bind always forwards bound arguments as lvalues,
	  // but this type can call functions which only accept rvalues.
          return std::forward<_Callable>(std::get<0>(_M_bound))(
              std::forward<_Args>(std::get<_Indices+1>(_M_bound))...);
        }

      std::tuple<_Callable, _Args...> _M_bound;
    };

  template<typename _Func, typename... _BoundArgs>
    struct _Bind_simple_helper
    {
      typedef _Maybe_wrap_member_pointer<typename decay<_Func>::type>
        __maybe_type;
      typedef typename __maybe_type::type __func_type;
      typedef _Bind_simple<__func_type(typename decay<_BoundArgs>::type...)>
       	__type;
    };

  // Simplified version of std::bind for internal use, without support for
  // unbound arguments, placeholders or nested bind expressions.
  template<typename _Callable, typename... _Args>
    typename _Bind_simple_helper<_Callable, _Args...>::__type
    __bind_simple(_Callable&& __callable, _Args&&... __args)
    {
      typedef _Bind_simple_helper<_Callable, _Args...> __helper_type;
      typedef typename __helper_type::__maybe_type __maybe_type;
      typedef typename __helper_type::__type __result_type;
      return __result_type(
          __maybe_type::__do_wrap( std::forward<_Callable>(__callable)),
          std::forward<_Args>(__args)...);
d1417 1
a1417 4
  class bad_function_call : public std::exception
  {
  public:
    virtual ~bad_function_call() noexcept;
d1419 6
a1424 2
    const char* what() const noexcept;
  };
d1499 1
a1499 1
    { return std::mem_fn(__p); }
d1504 1
a1504 11
    { return std::mem_fn(__p); }

  template<typename _Member, typename _Class>
    inline _Mem_fn<_Member _Class::*>
    __callable_functor(_Member _Class::* volatile &__p)
    { return std::mem_fn(__p); }

  template<typename _Member, typename _Class>
    inline _Mem_fn<_Member _Class::*>
    __callable_functor(_Member _Class::* const volatile &__p)
    { return std::mem_fn(__p); }
d1521 5
a1525 5
	(__is_location_invariant<_Functor>::value
	 && sizeof(_Functor) <= _M_max_size
	 && __alignof__(_Functor) <= _M_max_align
	 && (_M_max_align % __alignof__(_Functor) == 0));

d1533 1
a1533 1
	    __stored_locally? std::__addressof(__source._M_access<_Functor>())
d1562 1
a1562 1

d1569 1
a1569 1

d1585 1
a1585 1

d1600 1
a1600 1

d1604 1
a1604 1
	  { return static_cast<bool>(__f); }
d1608 1
a1608 1
	  _M_not_empty_function(_Tp* const& __fp)
d1622 1
a1622 1
	static void
d1636 1
a1636 1
      public:
d1652 1
a1652 1

d1662 2
a1663 1
	  _Base::_M_init_functor(__functor, std::__addressof(__f.get()));
d1668 1
a1668 1

d1679 1
a1679 1
				  _Manager_operation);
d1698 2
a1699 2
	return (*_Base::_M_get_pointer(__functor))(
	    std::forward<_ArgTypes>(__args)...);
d1713 2
a1714 2
	(*_Base::_M_get_pointer(__functor))(
	    std::forward<_ArgTypes>(__args)...);
d1728 2
a1729 2
	return __callable_functor(**_Base::_M_get_pointer(__functor))(
	      std::forward<_ArgTypes>(__args)...);
d1743 2
a1744 2
	__callable_functor(**_Base::_M_get_pointer(__functor))(
	    std::forward<_ArgTypes>(__args)...);
d1748 2
a1749 2
  template<typename _Class, typename _Member, typename _Res,
	   typename... _ArgTypes>
d1754 1
a1754 1
	_Base;
d1760 2
a1761 2
	return std::mem_fn(_Base::_M_get_pointer(__functor)->__value)(
	    std::forward<_ArgTypes>(__args)...);
d1768 1
a1768 1
		 _Simple_type_wrapper< _Member _Class::* > >
d1774 1
a1774 1
    public:
d1777 1
a1777 1
		 _Manager_operation __op)
d1779 1
a1779 1
	switch (__op)
d1785 1
a1785 1
#endif
d1790 1
a1790 1

d1794 1
a1794 1
	return false;
d1800 2
a1801 2
	std::mem_fn(_Base::_M_get_pointer(__functor)->__value)(
	    std::forward<_ArgTypes>(__args)...);
a1804 4
  template<typename _From, typename _To>
    using __check_func_return_type
      = __or_<is_void<_To>, is_convertible<_From, _To>>;

d1817 3
a1819 11

      template<typename _Functor>
	using _Invoke = decltype(__callable_functor(std::declval<_Functor&>())
				 (std::declval<_ArgTypes>()...) );

      template<typename _Functor>
	using _Callable = __check_func_return_type<_Invoke<_Functor>, _Res>;

      template<typename _Cond, typename _Tp>
	using _Requires = typename enable_if<_Cond::value, _Tp>::type;

d1822 1
a1822 1

d1824 1
a1824 1

d1829 3
a1831 3
      function() noexcept
      : _Function_base() { }

d1833 1
a1833 1
       *  @@brief Creates an empty function call wrapper.
d1836 2
a1837 3
      function(nullptr_t) noexcept
      : _Function_base() { }

d1840 2
a1841 2
       *  @@param __x A %function object with identical call signature.
       *  @@post @@c bool(*this) == bool(__x)
d1844 1
a1844 1
       *  __x (if it has one).
d1850 1
a1850 1
       *  @@param __x A %function object rvalue with identical call signature.
d1852 1
a1852 1
       *  The newly-created %function contains the target of @@a __x
d1857 1
a1857 1
	__x.swap(*this);
d1861 1
a1861 1

d1865 1
a1865 1
       *  @@param __f A %function object that is callable with parameters of
d1869 2
a1870 2
       *  The newly-created %function object will target a copy of 
       *  @@a __f. If @@a __f is @@c reference_wrapper<F>, then this function
d1872 1
a1872 1
       *  __f.get(). If @@a __f is a NULL function pointer or NULL
d1875 1
a1875 1
       *  If @@a __f is a non-NULL function pointer or an object of type @@c
d1878 5
a1882 3
      template<typename _Functor,
	       typename = _Requires<_Callable<_Functor>, void>>
	function(_Functor);
d1886 1
a1886 1
       *  @@param __x A %function with identical call signature.
d1890 1
a1890 1
       *  The target of @@a __x is copied to @@c *this. If @@a __x has no
d1893 1
a1893 1
       *  If @@a __x targets a function pointer or a reference to a function
d1899 2
a1900 2
	function(__x).swap(*this);
	return *this;
d1905 1
a1905 1
       *  @@param __x A %function rvalue with identical call signature.
d1908 1
a1908 1
       *  The target of @@a __x is moved to @@c *this. If @@a __x has no
d1911 1
a1911 1
       *  If @@a __x targets a function pointer or a reference to a function
d1917 2
a1918 2
	function(std::move(__x)).swap(*this);
	return *this;
d1929 1
a1929 1
      operator=(nullptr_t)
d1931 1
a1931 1
	if (_M_manager)
d1937 1
a1937 1
	return *this;
d1942 1
a1942 1
       *  @@param __f A %function object that is callable with parameters of
d1948 1
a1948 1
       *  __f. If @@a __f is @@c reference_wrapper<F>, then this function
d1950 1
a1950 1
       *  __f.get(). If @@a __f is a NULL function pointer or NULL
d1953 1
a1953 1
       *  If @@a __f is a non-NULL function pointer or an object of type @@c
d1957 1
a1957 1
	_Requires<_Callable<_Functor>, function&>
d1966 2
a1967 2
	function&
	operator=(reference_wrapper<_Functor> __f) noexcept
d1974 1
a1974 1

d1977 1
a1977 1
       *  @@param __x A %function with identical call signature.
d1979 1
a1979 1
       *  Swap the targets of @@c this function object and @@a __f. This
d1984 16
a1999 3
	std::swap(_M_functor, __x._M_functor);
	std::swap(_M_manager, __x._M_manager);
	std::swap(_M_invoker, __x._M_invoker);
d2005 6
a2010 6
	void
	assign(_Functor&& __f, const _Alloc& __a)
	{
	  function(allocator_arg, __a,
		   std::forward<_Functor>(__f)).swap(*this);
	}
d2012 1
a2012 1

d2023 1
a2023 1
      explicit operator bool() const noexcept
d2049 2
a2050 2
      const type_info& target_type() const noexcept;

d2060 2
a2061 2
      template<typename _Functor>       _Functor* target() noexcept;

d2063 1
a2063 1
      template<typename _Functor> const _Functor* target() const noexcept;
d2066 6
d2092 1
a2092 1
    template<typename _Functor, typename>
d2094 3
a2096 1
      function(_Functor __f)
a2102 1
	    _My_handler::_M_init_functor(_M_functor, std::move(__f));
d2105 1
d2115 1
a2115 1
	__throw_bad_function_call();
d2123 1
a2123 1
    target_type() const noexcept
d2126 5
a2130 5
	{
	  _Any_data __typeinfo_result;
	  _M_manager(__typeinfo_result, _M_functor, __get_type_info);
	  return *__typeinfo_result._M_access<const type_info*>();
	}
d2139 1
a2139 1
      target() noexcept
d2158 1
a2158 1
      target() const noexcept
d2182 1
a2182 1
    operator==(const function<_Res(_Args...)>& __f, nullptr_t) noexcept
d2188 1
a2188 1
    operator==(nullptr_t, const function<_Res(_Args...)>& __f) noexcept
d2200 1
a2200 1
    operator!=(const function<_Res(_Args...)>& __f, nullptr_t) noexcept
d2206 1
a2206 1
    operator!=(nullptr_t, const function<_Res(_Args...)>& __f) noexcept
d2220 1
d2222 1
a2222 4
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std

#endif // C++11
@


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) 2001-2013 Free Software Foundation, Inc.
d52 1
a52 1
#if __cplusplus >= 201103L
d61 1
a61 1
namespace std _GLIBCXX_VISIBILITY(default)
a62 2
_GLIBCXX_BEGIN_NAMESPACE_VERSION

a64 3
  template<typename _Tp, typename _Class>
    _Mem_fn<_Tp _Class::*>
    mem_fn(_Tp _Class::*) noexcept;
d66 27
a92 1
_GLIBCXX_HAS_NESTED_TYPE(result_type)
d101 3
a103 1
    { typedef typename _Functor::result_type result_type; };
d111 1
a111 1
    : _Maybe_get_result_type<__has_result_type<_Functor>::value, _Functor>
d115 1
a115 1
  template<typename _Res, typename... _ArgTypes>
d117 3
a119 29
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes......)>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes...) const>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes......) const>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes...) volatile>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes......) volatile>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes...) const volatile>
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(_ArgTypes......) const volatile>
    { typedef _Res result_type; };
d122 1
a122 1
  template<typename _Res, typename... _ArgTypes>
d124 3
a126 5
    { typedef _Res result_type; };

  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(&)(_ArgTypes......)>
    { typedef _Res result_type; };
d129 1
a129 1
  template<typename _Res, typename... _ArgTypes>
d131 3
a133 1
    { typedef _Res result_type; };
d135 2
a136 6
  template<typename _Res, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res(*)(_ArgTypes......)>
    { typedef _Res result_type; };

  /// Retrieve result type for a member function pointer.
  template<typename _Res, typename _Class, typename... _ArgTypes>
d138 3
a140 5
    { typedef _Res result_type; };

  template<typename _Res, typename _Class, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......)>
    { typedef _Res result_type; };
d142 2
a143 2
  /// Retrieve result type for a const member function pointer.
  template<typename _Res, typename _Class, typename... _ArgTypes>
d145 3
a147 1
    { typedef _Res result_type; };
d149 2
a150 6
  template<typename _Res, typename _Class, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) const>
    { typedef _Res result_type; };

  /// Retrieve result type for a volatile member function pointer.
  template<typename _Res, typename _Class, typename... _ArgTypes>
d152 3
a154 1
    { typedef _Res result_type; };
d156 6
a161 14
  template<typename _Res, typename _Class, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......) volatile>
    { typedef _Res result_type; };

  /// Retrieve result type for a const volatile member function pointer.
  template<typename _Res, typename _Class, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes...)
				  const volatile>
    { typedef _Res result_type; };

  template<typename _Res, typename _Class, typename... _ArgTypes>
    struct _Weak_result_type_impl<_Res (_Class::*)(_ArgTypes......)
				  const volatile>
    { typedef _Res result_type; };
d172 11
d189 1
a189 1
	static __one __test(const volatile unary_function<_T1, _Res>*);
d205 1
a205 1
	static __one __test(const volatile binary_function<_T1, _T2, _Res>*);
d215 13
d235 1
a235 14
	     (!is_member_pointer<_Functor>::value
	      && !is_function<_Functor>::value
	      && !is_function<typename remove_pointer<_Functor>::type>::value),
	     typename result_of<_Functor&(_Args&&...)>::type
	   >::type
    __invoke(_Functor& __f, _Args&&... __args)
    {
      return __f(std::forward<_Args>(__args)...);
    }

  template<typename _Functor, typename... _Args>
    inline
    typename enable_if<
             (is_member_pointer<_Functor>::value
d238 1
a238 1
             typename result_of<_Functor(_Args&&...)>::type
d242 1
a242 1
      return std::mem_fn(__f)(std::forward<_Args>(__args)...);
d249 4
a252 4
	     (is_pointer<_Functor>::value
	      && is_function<typename remove_pointer<_Functor>::type>::value),
	     typename result_of<_Functor(_Args&&...)>::type
	   >::type
d266 1
a266 1
  // None of the nested argument types.
d272 1
a272 1
  // Nested argument_type only.
d275 3
a277 4
    : _Weak_result_type<_Tp>
    {
      typedef typename _Tp::argument_type argument_type;
    };
d279 1
a279 1
  // Nested first_argument_type and second_argument_type only.
d282 4
a285 5
    : _Weak_result_type<_Tp>
    {
      typedef typename _Tp::first_argument_type first_argument_type;
      typedef typename _Tp::second_argument_type second_argument_type;
    };
d287 2
a288 1
  // All the nested argument types.
d291 5
a295 1
    : _Weak_result_type<_Tp>
d297 1
a297 3
      typedef typename _Tp::argument_type argument_type;
      typedef typename _Tp::first_argument_type first_argument_type;
      typedef typename _Tp::second_argument_type second_argument_type;
a299 4
  _GLIBCXX_HAS_NESTED_TYPE(argument_type)
  _GLIBCXX_HAS_NESTED_TYPE(first_argument_type)
  _GLIBCXX_HAS_NESTED_TYPE(second_argument_type)

d309 2
a310 3
      __has_argument_type<_Tp>::value,
      __has_first_argument_type<_Tp>::value
      && __has_second_argument_type<_Tp>::value,
a319 15
  template<typename _Res, typename _T1>
    struct _Reference_wrapper_base<_Res(_T1) const>
    : unary_function<_T1, _Res>
    { };

  template<typename _Res, typename _T1>
    struct _Reference_wrapper_base<_Res(_T1) volatile>
    : unary_function<_T1, _Res>
    { };

  template<typename _Res, typename _T1>
    struct _Reference_wrapper_base<_Res(_T1) const volatile>
    : unary_function<_T1, _Res>
    { };

a325 15
  template<typename _Res, typename _T1, typename _T2>
    struct _Reference_wrapper_base<_Res(_T1, _T2) const>
    : binary_function<_T1, _T2, _Res>
    { };

  template<typename _Res, typename _T1, typename _T2>
    struct _Reference_wrapper_base<_Res(_T1, _T2) volatile>
    : binary_function<_T1, _T2, _Res>
    { };

  template<typename _Res, typename _T1, typename _T2>
    struct _Reference_wrapper_base<_Res(_T1, _T2) const volatile>
    : binary_function<_T1, _T2, _Res>
    { };

d395 5
a400 1

d404 1
a404 2
      reference_wrapper(_Tp& __indata) noexcept
      : _M_data(std::__addressof(__indata))
d409 2
a410 2
      reference_wrapper(const reference_wrapper<_Tp>& __inref) noexcept
      : _M_data(__inref._M_data)
d414 1
a414 1
      operator=(const reference_wrapper<_Tp>& __inref) noexcept
d416 2
a417 2
	_M_data = __inref._M_data;
	return *this;
d420 1
a420 1
      operator _Tp&() const noexcept
d424 1
a424 1
      get() const noexcept
d428 3
a430 3
	typename result_of<_Tp&(_Args&&...)>::type
	operator()(_Args&&... __args) const
	{
d439 1
a439 1
    ref(_Tp& __t) noexcept
d445 1
a445 1
    cref(const _Tp& __t) noexcept
a447 6
  template<typename _Tp>
    void ref(const _Tp&&) = delete;

  template<typename _Tp>
    void cref(const _Tp&&) = delete;

d451 1
a451 1
    ref(reference_wrapper<_Tp> __t) noexcept
d457 1
a457 1
    cref(reference_wrapper<_Tp> __t) noexcept
d462 5
a466 3
  template<typename... _Types>
    struct _Pack : integral_constant<size_t, sizeof...(_Types)>
    { };
d468 5
a472 12
  template<typename _From, typename _To, bool = _From::value == _To::value>
    struct _AllConvertible : false_type
    { };

  template<typename... _From, typename... _To>
    struct _AllConvertible<_Pack<_From...>, _Pack<_To...>, true>
    : __and_<is_convertible<_From, _To>...>
    { };

  template<typename _Tp1, typename _Tp2>
    using _NotSame = __not_<is_same<typename std::decay<_Tp1>::type,
				    typename std::decay<_Tp2>::type>>;
d479 1
a479 1
  template<typename _Res, typename... _ArgTypes>
d482 2
a483 2
  /// Derives from @@c unary_function, as appropriate.
  template<typename _Res, typename _T1>
d487 2
a488 2
  /// Derives from @@c binary_function, as appropriate.
  template<typename _Res, typename _T1, typename _T2>
d499 5
a503 8
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __object, const volatile _Class *,
		_Args&&... __args) const
	{
	  return (std::forward<_Tp>(__object).*__pmf)
	    (std::forward<_Args>(__args)...);
	}
d505 4
a508 23
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const
	{ return ((*__ptr).*__pmf)(std::forward<_Args>(__args)...); }

      // Require each _Args to be convertible to corresponding _ArgTypes
      template<typename... _Args>
	using _RequireValidArgs
	  = _Require<_AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      // Require each _Args to be convertible to corresponding _ArgTypes
      // and require _Tp is not _Class, _Class& or _Class*
      template<typename _Tp, typename... _Args>
	using _RequireValidArgs2
	  = _Require<_NotSame<_Class, _Tp>, _NotSame<_Class*, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      // Require each _Args to be convertible to corresponding _ArgTypes
      // and require _Tp is _Class or derived from _Class
      template<typename _Tp, typename... _Args>
	using _RequireValidArgs3
	  = _Require<is_base_of<_Class, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;
d516 3
a518 11
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(_Class& __object, _Args&&... __args) const
	{ return (__object.*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(_Class&& __object, _Args&&... __args) const
	{
	  return (std::move(__object).*__pmf)(std::forward<_Args>(__args)...);
	}
d521 3
a523 4
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(_Class* __object, _Args&&... __args) const
	{ return (__object->*__pmf)(std::forward<_Args>(__args)...); }
d526 7
a532 14
      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs2<_Tp, _Args...>>
	_Res
	operator()(_Tp&& __object, _Args&&... __args) const
	{
	  return _M_call(std::forward<_Tp>(__object), &__object,
	      std::forward<_Args>(__args)...);
	}

      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs3<_Tp, _Args...>>
	_Res
	operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const
	{ return operator()(__ref.get(), std::forward<_Args>(__args)...); }
d541 1
a541 1
    : public _Maybe_unary_or_binary_function<_Res, const _Class*,
d546 5
a550 8
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __object, const volatile _Class *,
		_Args&&... __args) const
	{
	  return (std::forward<_Tp>(__object).*__pmf)
	    (std::forward<_Args>(__args)...);
	}
d552 4
a555 18
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const
	{ return ((*__ptr).*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args>
	using _RequireValidArgs
	  = _Require<_AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs2
	  = _Require<_NotSame<_Class, _Tp>, _NotSame<const _Class*, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs3
	  = _Require<is_base_of<_Class, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;
d563 3
a565 11
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const _Class& __object, _Args&&... __args) const
	{ return (__object.*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const _Class&& __object, _Args&&... __args) const
	{
	  return (std::move(__object).*__pmf)(std::forward<_Args>(__args)...);
	}
d568 3
a570 4
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const _Class* __object, _Args&&... __args) const
	{ return (__object->*__pmf)(std::forward<_Args>(__args)...); }
d573 6
a578 13
      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs2<_Tp, _Args...>>
	_Res operator()(_Tp&& __object, _Args&&... __args) const
	{
	  return _M_call(std::forward<_Tp>(__object), &__object,
	      std::forward<_Args>(__args)...);
	}

      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs3<_Tp, _Args...>>
	_Res
	operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const
	{ return operator()(__ref.get(), std::forward<_Args>(__args)...); }
d587 1
a587 1
    : public _Maybe_unary_or_binary_function<_Res, volatile _Class*,
d592 5
a596 8
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __object, const volatile _Class *,
		_Args&&... __args) const
	{
	  return (std::forward<_Tp>(__object).*__pmf)
	    (std::forward<_Args>(__args)...);
	}
d598 4
a601 18
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const
	{ return ((*__ptr).*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args>
	using _RequireValidArgs
	  = _Require<_AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs2
	  = _Require<_NotSame<_Class, _Tp>, _NotSame<volatile _Class*, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs3
	  = _Require<is_base_of<_Class, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;
d609 3
a611 11
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(volatile _Class& __object, _Args&&... __args) const
	{ return (__object.*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(volatile _Class&& __object, _Args&&... __args) const
	{
	  return (std::move(__object).*__pmf)(std::forward<_Args>(__args)...);
	}
d614 3
a616 4
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(volatile _Class* __object, _Args&&... __args) const
	{ return (__object->*__pmf)(std::forward<_Args>(__args)...); }
d619 7
a625 14
      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs2<_Tp, _Args...>>
	_Res
	operator()(_Tp&& __object, _Args&&... __args) const
	{
	  return _M_call(std::forward<_Tp>(__object), &__object,
	      std::forward<_Args>(__args)...);
	}

      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs3<_Tp, _Args...>>
	_Res
	operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const
	{ return operator()(__ref.get(), std::forward<_Args>(__args)...); }
d634 1
a634 1
    : public _Maybe_unary_or_binary_function<_Res, const volatile _Class*,
d639 5
a643 8
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __object, const volatile _Class *,
		_Args&&... __args) const
	{
	  return (std::forward<_Tp>(__object).*__pmf)
	    (std::forward<_Args>(__args)...);
	}
d645 4
a648 19
      template<typename _Tp, typename... _Args>
	_Res
	_M_call(_Tp&& __ptr, const volatile void *, _Args&&... __args) const
	{ return ((*__ptr).*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args>
	using _RequireValidArgs
	  = _Require<_AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs2
	  = _Require<_NotSame<_Class, _Tp>,
		     _NotSame<const volatile _Class*, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;

      template<typename _Tp, typename... _Args>
	using _RequireValidArgs3
	  = _Require<is_base_of<_Class, _Tp>,
		     _AllConvertible<_Pack<_Args...>, _Pack<_ArgTypes...>>>;
d656 3
a658 11
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const volatile _Class& __object, _Args&&... __args) const
	{ return (__object.*__pmf)(std::forward<_Args>(__args)...); }

      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const volatile _Class&& __object, _Args&&... __args) const
	{
	  return (std::move(__object).*__pmf)(std::forward<_Args>(__args)...);
	}
d661 3
a663 4
      template<typename... _Args, typename _Req = _RequireValidArgs<_Args...>>
	_Res
	operator()(const volatile _Class* __object, _Args&&... __args) const
	{ return (__object->*__pmf)(std::forward<_Args>(__args)...); }
d666 6
a671 13
      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs2<_Tp, _Args...>>
	_Res operator()(_Tp&& __object, _Args&&... __args) const
	{
	  return _M_call(std::forward<_Tp>(__object), &__object,
	      std::forward<_Args>(__args)...);
	}

      template<typename _Tp, typename... _Args,
	       typename _Req = _RequireValidArgs3<_Tp, _Args...>>
	_Res
	operator()(reference_wrapper<_Tp> __ref, _Args&&... __args) const
	{ return operator()(__ref.get(), std::forward<_Args>(__args)...); }
a677 12
  template<typename _Tp, bool>
    struct _Mem_fn_const_or_non
    {
      typedef const _Tp& type;
    };

  template<typename _Tp>
    struct _Mem_fn_const_or_non<_Tp, false>
    {
      typedef _Tp& type;
    };

a680 2
      using __pm_type = _Res _Class::*;

a682 1
      // Made less elegant to support perfect forwarding and noexcept.
d684 8
a691 4
	auto
	_M_call(_Tp&& __object, const _Class *) const noexcept
	-> decltype(std::forward<_Tp>(__object).*std::declval<__pm_type&>())
	{ return std::forward<_Tp>(__object).*__pm; }
d694 8
a701 4
	auto
	_M_call(_Tp&& __object, _Up * const *) const noexcept
	-> decltype((*std::forward<_Tp>(__object)).*std::declval<__pm_type&>())
	{ return (*std::forward<_Tp>(__object)).*__pm; }
d704 16
a719 5
	auto
	_M_call(_Tp&& __ptr, const volatile void*) const
	noexcept(noexcept((*__ptr).*std::declval<__pm_type&>()))
	-> decltype((*__ptr).*std::declval<__pm_type&>())
	{ return (*__ptr).*__pm; }
d722 18
d741 1
a741 1
      _Mem_fn(_Res _Class::*__pm) noexcept : __pm(__pm) { }
d745 1
a745 1
      operator()(_Class& __object) const noexcept
d749 1
a749 1
      operator()(const _Class& __object) const noexcept
a751 8
      _Res&&
      operator()(_Class&& __object) const noexcept
      { return std::forward<_Class>(__object).*__pm; }

      const _Res&&
      operator()(const _Class&& __object) const noexcept
      { return std::forward<const _Class>(__object).*__pm; }

d754 1
a754 1
      operator()(_Class* __object) const noexcept
d758 1
a758 1
      operator()(const _Class* __object) const noexcept
d762 4
a765 14
      template<typename _Tp, typename _Req = _Require<_NotSame<_Class*, _Tp>>>
	auto
	operator()(_Tp&& __unknown) const
	noexcept(noexcept(std::declval<_Mem_fn*>()->_M_call
			  (std::forward<_Tp>(__unknown), &__unknown)))
	-> decltype(this->_M_call(std::forward<_Tp>(__unknown), &__unknown))
	{ return _M_call(std::forward<_Tp>(__unknown), &__unknown); }

      template<typename _Tp, typename _Req = _Require<is_base_of<_Class, _Tp>>>
	auto
	operator()(reference_wrapper<_Tp> __ref) const
	noexcept(noexcept(std::declval<_Mem_fn&>()(__ref.get())))
	-> decltype((*this)(__ref.get()))
	{ return (*this)(__ref.get()); }
a770 2
  // _GLIBCXX_RESOLVE_LIB_DEFECTS
  // 2048.  Unnecessary mem_fn overloads
d778 1
a778 1
    mem_fn(_Tp _Class::* __pm) noexcept
d803 1
a803 3
  /** @@brief The type of placeholder objects defined by libstdc++.
   *  @@ingroup binders
   */
a805 2
  _GLIBCXX_END_NAMESPACE_VERSION

d807 1
a807 1
   *  @@brief ISO C++11 entities sub-namespace for functional.
d809 39
a847 38
   */
  namespace placeholders
  {
  _GLIBCXX_BEGIN_NAMESPACE_VERSION
  /* Define a large number of placeholders. There is no way to
   * simplify this with variadic templates, because we're introducing
   * unique names for each.
   */
    extern const _Placeholder<1> _1;
    extern const _Placeholder<2> _2;
    extern const _Placeholder<3> _3;
    extern const _Placeholder<4> _4;
    extern const _Placeholder<5> _5;
    extern const _Placeholder<6> _6;
    extern const _Placeholder<7> _7;
    extern const _Placeholder<8> _8;
    extern const _Placeholder<9> _9;
    extern const _Placeholder<10> _10;
    extern const _Placeholder<11> _11;
    extern const _Placeholder<12> _12;
    extern const _Placeholder<13> _13;
    extern const _Placeholder<14> _14;
    extern const _Placeholder<15> _15;
    extern const _Placeholder<16> _16;
    extern const _Placeholder<17> _17;
    extern const _Placeholder<18> _18;
    extern const _Placeholder<19> _19;
    extern const _Placeholder<20> _20;
    extern const _Placeholder<21> _21;
    extern const _Placeholder<22> _22;
    extern const _Placeholder<23> _23;
    extern const _Placeholder<24> _24;
    extern const _Placeholder<25> _25;
    extern const _Placeholder<26> _26;
    extern const _Placeholder<27> _27;
    extern const _Placeholder<28> _28;
    extern const _Placeholder<29> _29;
  _GLIBCXX_END_NAMESPACE_VERSION
a849 2
  _GLIBCXX_BEGIN_NAMESPACE_VERSION

d860 22
a881 4
  template<int _Num>
    struct is_placeholder<const _Placeholder<_Num> >
    : public integral_constant<int, _Num>
    { };
d883 1
a883 1
  /**
d894 1
a894 1
  template<std::size_t __i, typename _Tuple, bool _IsSafe>
d903 1
a903 1
  template<std::size_t __i, typename _Tuple>
d913 1
a913 1
 template<std::size_t __i, typename _Tuple>
d915 2
a916 2
   : _Safe_tuple_element_impl<__i, _Tuple,
			      (__i < tuple_size<_Tuple>::value)>
d931 2
a932 2
	   bool _IsBindExp = is_bind_expression<_Arg>::value,
	   bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)>
d950 3
a952 3
	result_type
	operator()(_CVRef& __arg, _Tuple&) const volatile
	{ return __arg.get(); }
d964 9
d974 4
a977 5
	auto
	operator()(_CVArg& __arg,
		   tuple<_Args...>& __tuple) const volatile
	-> decltype(__arg(declval<_Args>()...))
	{
d981 1
a981 1
	  return this->__call(__arg, __tuple, _Indexes());
d986 4
a989 4
      // of the arguments in the tuple.
      template<typename _CVArg, typename... _Args, std::size_t... _Indexes>
	auto
	__call(_CVArg& __arg, tuple<_Args...>& __tuple,
d991 1
a991 2
	-> decltype(__arg(declval<_Args>()...))
	{
d1008 2
a1009 2
	class result<_CVMu(_CVArg, _Tuple)>
	{
d1022 3
a1024 3
	typename result<_Mu(_Arg, _Tuple)>::type
	operator()(const volatile _Arg&, _Tuple& __tuple) const volatile
	{
d1026 1
a1026 1
	      ::std::get<(is_placeholder<_Arg>::value - 1)>(__tuple));
d1042 2
a1043 2
	struct result<_CVMu(_CVArg, _Tuple)>
	{
d1049 3
a1051 3
	_CVArg&&
	operator()(_CVArg&& __arg, _Tuple&) const volatile
	{ return std::forward<_CVArg>(__arg); }
d1063 1
a1063 1

a1066 4

      static _Tp&&
      __do_wrap(_Tp&& __x)
      { return static_cast<_Tp&&>(__x); }
d1078 1
a1078 1

a1093 14
  // std::get<I> for volatile-qualified tuples
  template<std::size_t _Ind, typename... _Tp>
    inline auto
    __volget(volatile tuple<_Tp...>& __tuple)
    -> typename tuple_element<_Ind, tuple<_Tp...>>::type volatile&
    { return std::get<_Ind>(const_cast<tuple<_Tp...>&>(__tuple)); }

  // std::get<I> for const-volatile-qualified tuples
  template<std::size_t _Ind, typename... _Tp>
    inline auto
    __volget(const volatile tuple<_Tp...>& __tuple)
    -> typename tuple_element<_Ind, tuple<_Tp...>>::type const volatile&
    { return std::get<_Ind>(const_cast<const tuple<_Tp...>&>(__tuple)); }

d1103 2
a1104 2
      typedef typename _Build_index_tuple<sizeof...(_Bound_args)>::__type
	_Bound_indexes;
d1110 7
a1116 7
      template<typename _Result, typename... _Args, std::size_t... _Indexes>
	_Result
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>)
	{
	  return _M_f(_Mu<_Bound_args>()
		      (get<_Indexes>(_M_bound_args), __args)...);
	}
d1119 7
a1125 7
      template<typename _Result, typename... _Args, std::size_t... _Indexes>
	_Result
	__call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const
	{
	  return _M_f(_Mu<_Bound_args>()
		      (get<_Indexes>(_M_bound_args), __args)...);
	}
d1127 1
d1129 3
a1131 3
      template<typename _Result, typename... _Args, std::size_t... _Indexes>
	_Result
	__call_v(tuple<_Args...>&& __args,
d1133 4
a1136 4
	{
	  return _M_f(_Mu<_Bound_args>()
		      (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1139 3
a1141 3
      template<typename _Result, typename... _Args, std::size_t... _Indexes>
	_Result
	__call_c_v(tuple<_Args...>&& __args,
d1143 5
a1147 4
	{
	  return _M_f(_Mu<_Bound_args>()
		      (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1150 3
a1152 14
      template<typename... _Args>
	explicit _Bind(const _Functor& __f, _Args&&... __args)
	: _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...)
	{ }

      template<typename... _Args>
	explicit _Bind(_Functor&& __f, _Args&&... __args)
	: _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...)
	{ }

      _Bind(const _Bind&) = default;

      _Bind(_Bind&& __b)
      : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args))
d1157 10
a1166 10
	= decltype( std::declval<_Functor>()(
	      _Mu<_Bound_args>()( std::declval<_Bound_args&>(),
				  std::declval<tuple<_Args...>&>() )... ) )>
	_Result
	operator()(_Args&&... __args)
	{
	  return this->__call<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1170 1
a1170 2
	= decltype( std::declval<typename enable_if<(sizeof...(_Args) >= 0),
		       typename add_const<_Functor>::type>::type>()(
d1172 8
a1179 8
				  std::declval<tuple<_Args...>&>() )... ) )>
	_Result
	operator()(_Args&&... __args) const
	{
	  return this->__call_c<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1181 1
d1184 10
a1193 11
	= decltype( std::declval<typename enable_if<(sizeof...(_Args) >= 0),
                       typename add_volatile<_Functor>::type>::type>()(
	      _Mu<_Bound_args>()( std::declval<volatile _Bound_args&>(),
				  std::declval<tuple<_Args...>&>() )... ) )>
	_Result
	operator()(_Args&&... __args) volatile
	{
	  return this->__call_v<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1197 11
a1207 11
	= decltype( std::declval<typename enable_if<(sizeof...(_Args) >= 0),
                       typename add_cv<_Functor>::type>::type>()(
	      _Mu<_Bound_args>()( std::declval<const volatile _Bound_args&>(),
				  std::declval<tuple<_Args...>&>() )... ) )>
	_Result
	operator()(_Args&&... __args) const volatile
	{
	  return this->__call_c_v<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1218 2
a1219 2
      typedef typename _Build_index_tuple<sizeof...(_Bound_args)>::__type
	_Bound_indexes;
d1226 1
a1226 1
	struct __enable_if_void : enable_if<is_void<_Res>::value, int> { };
d1228 1
a1228 1
	struct __disable_if_void : enable_if<!is_void<_Res>::value, int> { };
d1231 8
a1238 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	_Result
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __disable_if_void<_Res>::type = 0)
	{
	  return _M_f(_Mu<_Bound_args>()
		      (get<_Indexes>(_M_bound_args), __args)...);
	}
d1241 8
a1248 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	void
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __enable_if_void<_Res>::type = 0)
	{
	  _M_f(_Mu<_Bound_args>()
	       (get<_Indexes>(_M_bound_args), __args)...);
	}
d1251 8
a1258 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	_Result
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __disable_if_void<_Res>::type = 0) const
	{
	  return _M_f(_Mu<_Bound_args>()
		      (get<_Indexes>(_M_bound_args), __args)...);
	}
d1261 8
a1268 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	void
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __enable_if_void<_Res>::type = 0) const
	{
	  _M_f(_Mu<_Bound_args>()
	       (get<_Indexes>(_M_bound_args),  __args)...);
	}
d1271 8
a1278 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	_Result
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __disable_if_void<_Res>::type = 0) volatile
	{
	  return _M_f(_Mu<_Bound_args>()
		      (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1281 8
a1288 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	void
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __enable_if_void<_Res>::type = 0) volatile
	{
	  _M_f(_Mu<_Bound_args>()
	       (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1291 8
a1298 8
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	_Result
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>,
	    typename __disable_if_void<_Res>::type = 0) const volatile
	{
	  return _M_f(_Mu<_Bound_args>()
		      (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1301 9
a1309 9
      template<typename _Res, typename... _Args, std::size_t... _Indexes>
	void
	__call(tuple<_Args...>&& __args,
	       _Index_tuple<_Indexes...>,
	    typename __enable_if_void<_Res>::type = 0) const volatile
	{
	  _M_f(_Mu<_Bound_args>()
	       (__volget<_Indexes>(_M_bound_args), __args)...);
	}
d1314 4
a1317 14
      template<typename... _Args>
	explicit _Bind_result(const _Functor& __f, _Args&&... __args)
	: _M_f(__f), _M_bound_args(std::forward<_Args>(__args)...)
	{ }

      template<typename... _Args>
	explicit _Bind_result(_Functor&& __f, _Args&&... __args)
	: _M_f(std::move(__f)), _M_bound_args(std::forward<_Args>(__args)...)
	{ }

      _Bind_result(const _Bind_result&) = default;

      _Bind_result(_Bind_result&& __b)
      : _M_f(std::move(__b._M_f)), _M_bound_args(std::move(__b._M_bound_args))
d1322 7
a1328 7
	result_type
	operator()(_Args&&... __args)
	{
	  return this->__call<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1332 7
a1338 7
	result_type
	operator()(_Args&&... __args) const
	{
	  return this->__call<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1342 7
a1348 7
	result_type
	operator()(_Args&&... __args) volatile
	{
	  return this->__call<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
d1352 7
a1358 7
	result_type
	operator()(_Args&&... __args) const volatile
	{
	  return this->__call<_Result>(
	      std::forward_as_tuple(std::forward<_Args>(__args)...),
	      _Bound_indexes());
	}
a1372 32
  template<typename _Signature>
    struct is_bind_expression<const _Bind<_Signature> >
    : public true_type { };

  /**
   *  @@brief Class template _Bind is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Signature>
    struct is_bind_expression<volatile _Bind<_Signature> >
    : public true_type { };

  /**
   *  @@brief Class template _Bind is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Signature>
    struct is_bind_expression<const volatile _Bind<_Signature>>
    : public true_type { };

  /**
   *  @@brief Class template _Bind_result is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Result, typename _Signature>
    struct is_bind_expression<_Bind_result<_Result, _Signature>>
    : public true_type { };

  /**
   *  @@brief Class template _Bind_result is always a bind expression.
   *  @@ingroup binders
   */
d1374 1
a1374 1
    struct is_bind_expression<const _Bind_result<_Result, _Signature>>
a1377 38
   *  @@brief Class template _Bind_result is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Result, typename _Signature>
    struct is_bind_expression<volatile _Bind_result<_Result, _Signature>>
    : public true_type { };

  /**
   *  @@brief Class template _Bind_result is always a bind expression.
   *  @@ingroup binders
   */
  template<typename _Result, typename _Signature>
    struct is_bind_expression<const volatile _Bind_result<_Result, _Signature>>
    : public true_type { };

  // Trait type used to remove std::bind() from overload set via SFINAE
  // when first argument has integer type, so that std::bind() will
  // not be a better match than ::bind() from the BSD Sockets API.
  template<typename _Tp, typename _Tp2 = typename decay<_Tp>::type>
    using __is_socketlike = __or_<is_integral<_Tp2>, is_enum<_Tp2>>;

  template<bool _SocketLike, typename _Func, typename... _BoundArgs>
    struct _Bind_helper
    {
      typedef _Maybe_wrap_member_pointer<typename decay<_Func>::type>
	__maybe_type;
      typedef typename __maybe_type::type __func_type;
      typedef _Bind<__func_type(typename decay<_BoundArgs>::type...)> type;
    };

  // Partial specialization for is_socketlike == true, does not define
  // nested type so std::bind() will not participate in overload resolution
  // when the first argument might be a socket file descriptor.
  template<typename _Func, typename... _BoundArgs>
    struct _Bind_helper<true, _Func, _BoundArgs...>
    { };

  /**
d1381 4
a1384 14
  template<typename _Func, typename... _BoundArgs>
    inline typename
    _Bind_helper<__is_socketlike<_Func>::value, _Func, _BoundArgs...>::type
    bind(_Func&& __f, _BoundArgs&&... __args)
    {
      typedef _Bind_helper<false, _Func, _BoundArgs...> __helper_type;
      typedef typename __helper_type::__maybe_type __maybe_type;
      typedef typename __helper_type::type __result_type;
      return __result_type(__maybe_type::__do_wrap(std::forward<_Func>(__f)),
			   std::forward<_BoundArgs>(__args)...);
    }

  template<typename _Result, typename _Func, typename... _BoundArgs>
    struct _Bindres_helper
d1386 1
a1386 2
      typedef _Maybe_wrap_member_pointer<typename decay<_Func>::type>
	__maybe_type;
d1388 4
a1391 4
      typedef _Bind_result<_Result,
			   __functor_type(typename decay<_BoundArgs>::type...)>
	type;
    };
d1394 1
a1394 1
   *  @@brief Function template for std::bind<R>.
d1397 1
a1397 1
  template<typename _Result, typename _Func, typename... _BoundArgs>
d1399 4
a1402 2
    typename _Bindres_helper<_Result, _Func, _BoundArgs...>::type
    bind(_Func&& __f, _BoundArgs&&... __args)
d1404 6
a1409 76
      typedef _Bindres_helper<_Result, _Func, _BoundArgs...> __helper_type;
      typedef typename __helper_type::__maybe_type __maybe_type;
      typedef typename __helper_type::type __result_type;
      return __result_type(__maybe_type::__do_wrap(std::forward<_Func>(__f)),
			   std::forward<_BoundArgs>(__args)...);
    }

  template<typename _Signature>
    struct _Bind_simple;

  template<typename _Callable, typename... _Args>
    struct _Bind_simple<_Callable(_Args...)>
    {
      typedef typename result_of<_Callable(_Args...)>::type result_type;

      template<typename... _Args2, typename = typename
               enable_if< sizeof...(_Args) == sizeof...(_Args2)>::type>
        explicit
        _Bind_simple(const _Callable& __callable, _Args2&&... __args)
        : _M_bound(__callable, std::forward<_Args2>(__args)...)
        { }

      template<typename... _Args2, typename = typename
               enable_if< sizeof...(_Args) == sizeof...(_Args2)>::type>
        explicit
        _Bind_simple(_Callable&& __callable, _Args2&&... __args)
        : _M_bound(std::move(__callable), std::forward<_Args2>(__args)...)
        { }

      _Bind_simple(const _Bind_simple&) = default;
      _Bind_simple(_Bind_simple&&) = default;

      result_type
      operator()()
      {
        typedef typename _Build_index_tuple<sizeof...(_Args)>::__type _Indices;
        return _M_invoke(_Indices());
      }

    private:

      template<std::size_t... _Indices>
        typename result_of<_Callable(_Args...)>::type
        _M_invoke(_Index_tuple<_Indices...>)
        {
	  // std::bind always forwards bound arguments as lvalues,
	  // but this type can call functions which only accept rvalues.
          return std::forward<_Callable>(std::get<0>(_M_bound))(
              std::forward<_Args>(std::get<_Indices+1>(_M_bound))...);
        }

      std::tuple<_Callable, _Args...> _M_bound;
    };

  template<typename _Func, typename... _BoundArgs>
    struct _Bind_simple_helper
    {
      typedef _Maybe_wrap_member_pointer<typename decay<_Func>::type>
        __maybe_type;
      typedef typename __maybe_type::type __func_type;
      typedef _Bind_simple<__func_type(typename decay<_BoundArgs>::type...)>
       	__type;
    };

  // Simplified version of std::bind for internal use, without support for
  // unbound arguments, placeholders or nested bind expressions.
  template<typename _Callable, typename... _Args>
    typename _Bind_simple_helper<_Callable, _Args...>::__type
    __bind_simple(_Callable&& __callable, _Args&&... __args)
    {
      typedef _Bind_simple_helper<_Callable, _Args...> __helper_type;
      typedef typename __helper_type::__maybe_type __maybe_type;
      typedef typename __helper_type::__type __result_type;
      return __result_type(
          __maybe_type::__do_wrap( std::forward<_Callable>(__callable)),
          std::forward<_Args>(__args)...);
d1417 1
a1417 4
  class bad_function_call : public std::exception
  {
  public:
    virtual ~bad_function_call() noexcept;
d1419 6
a1424 2
    const char* what() const noexcept;
  };
d1499 1
a1499 1
    { return std::mem_fn(__p); }
d1504 1
a1504 11
    { return std::mem_fn(__p); }

  template<typename _Member, typename _Class>
    inline _Mem_fn<_Member _Class::*>
    __callable_functor(_Member _Class::* volatile &__p)
    { return std::mem_fn(__p); }

  template<typename _Member, typename _Class>
    inline _Mem_fn<_Member _Class::*>
    __callable_functor(_Member _Class::* const volatile &__p)
    { return std::mem_fn(__p); }
d1521 5
a1525 5
	(__is_location_invariant<_Functor>::value
	 && sizeof(_Functor) <= _M_max_size
	 && __alignof__(_Functor) <= _M_max_align
	 && (_M_max_align % __alignof__(_Functor) == 0));

d1533 1
a1533 1
	    __stored_locally? std::__addressof(__source._M_access<_Functor>())
d1562 1
a1562 1

d1569 1
a1569 1

d1585 1
a1585 1

d1600 1
a1600 1

d1604 1
a1604 1
	  { return static_cast<bool>(__f); }
d1608 1
a1608 1
	  _M_not_empty_function(_Tp* const& __fp)
d1622 1
a1622 1
	static void
d1636 1
a1636 1
      public:
d1652 1
a1652 1

d1662 2
a1663 1
	  _Base::_M_init_functor(__functor, std::__addressof(__f.get()));
d1668 1
a1668 1

d1679 1
a1679 1
				  _Manager_operation);
d1698 2
a1699 2
	return (*_Base::_M_get_pointer(__functor))(
	    std::forward<_ArgTypes>(__args)...);
d1713 2
a1714 2
	(*_Base::_M_get_pointer(__functor))(
	    std::forward<_ArgTypes>(__args)...);
d1728 2
a1729 2
	return __callable_functor(**_Base::_M_get_pointer(__functor))(
	      std::forward<_ArgTypes>(__args)...);
d1743 2
a1744 2
	__callable_functor(**_Base::_M_get_pointer(__functor))(
	    std::forward<_ArgTypes>(__args)...);
d1748 2
a1749 2
  template<typename _Class, typename _Member, typename _Res,
	   typename... _ArgTypes>
d1754 1
a1754 1
	_Base;
d1760 2
a1761 2
	return std::mem_fn(_Base::_M_get_pointer(__functor)->__value)(
	    std::forward<_ArgTypes>(__args)...);
d1768 1
a1768 1
		 _Simple_type_wrapper< _Member _Class::* > >
d1774 1
a1774 1
    public:
d1777 1
a1777 1
		 _Manager_operation __op)
d1779 1
a1779 1
	switch (__op)
d1785 1
a1785 1
#endif
d1790 1
a1790 1

d1794 1
a1794 1
	return false;
d1800 2
a1801 2
	std::mem_fn(_Base::_M_get_pointer(__functor)->__value)(
	    std::forward<_ArgTypes>(__args)...);
a1804 4
  template<typename _From, typename _To>
    using __check_func_return_type
      = __or_<is_void<_To>, is_convertible<_From, _To>>;

d1817 3
a1819 11

      template<typename _Functor>
	using _Invoke = decltype(__callable_functor(std::declval<_Functor&>())
				 (std::declval<_ArgTypes>()...) );

      template<typename _Functor>
	using _Callable = __check_func_return_type<_Invoke<_Functor>, _Res>;

      template<typename _Cond, typename _Tp>
	using _Requires = typename enable_if<_Cond::value, _Tp>::type;

d1822 1
a1822 1

d1824 1
a1824 1

d1829 3
a1831 3
      function() noexcept
      : _Function_base() { }

d1833 1
a1833 1
       *  @@brief Creates an empty function call wrapper.
d1836 2
a1837 3
      function(nullptr_t) noexcept
      : _Function_base() { }

d1840 2
a1841 2
       *  @@param __x A %function object with identical call signature.
       *  @@post @@c bool(*this) == bool(__x)
d1844 1
a1844 1
       *  __x (if it has one).
d1850 1
a1850 1
       *  @@param __x A %function object rvalue with identical call signature.
d1852 1
a1852 1
       *  The newly-created %function contains the target of @@a __x
d1857 1
a1857 1
	__x.swap(*this);
d1861 1
a1861 1

d1865 1
a1865 1
       *  @@param __f A %function object that is callable with parameters of
d1869 2
a1870 2
       *  The newly-created %function object will target a copy of 
       *  @@a __f. If @@a __f is @@c reference_wrapper<F>, then this function
d1872 1
a1872 1
       *  __f.get(). If @@a __f is a NULL function pointer or NULL
d1875 1
a1875 1
       *  If @@a __f is a non-NULL function pointer or an object of type @@c
d1878 5
a1882 3
      template<typename _Functor,
	       typename = _Requires<_Callable<_Functor>, void>>
	function(_Functor);
d1886 1
a1886 1
       *  @@param __x A %function with identical call signature.
d1890 1
a1890 1
       *  The target of @@a __x is copied to @@c *this. If @@a __x has no
d1893 1
a1893 1
       *  If @@a __x targets a function pointer or a reference to a function
d1899 2
a1900 2
	function(__x).swap(*this);
	return *this;
d1905 1
a1905 1
       *  @@param __x A %function rvalue with identical call signature.
d1908 1
a1908 1
       *  The target of @@a __x is moved to @@c *this. If @@a __x has no
d1911 1
a1911 1
       *  If @@a __x targets a function pointer or a reference to a function
d1917 2
a1918 2
	function(std::move(__x)).swap(*this);
	return *this;
d1929 1
a1929 1
      operator=(nullptr_t)
d1931 1
a1931 1
	if (_M_manager)
d1937 1
a1937 1
	return *this;
d1942 1
a1942 1
       *  @@param __f A %function object that is callable with parameters of
d1948 1
a1948 1
       *  __f. If @@a __f is @@c reference_wrapper<F>, then this function
d1950 1
a1950 1
       *  __f.get(). If @@a __f is a NULL function pointer or NULL
d1953 1
a1953 1
       *  If @@a __f is a non-NULL function pointer or an object of type @@c
d1957 1
a1957 1
	_Requires<_Callable<_Functor>, function&>
d1966 2
a1967 2
	function&
	operator=(reference_wrapper<_Functor> __f) noexcept
d1974 1
a1974 1

d1977 1
a1977 1
       *  @@param __x A %function with identical call signature.
d1979 1
a1979 1
       *  Swap the targets of @@c this function object and @@a __f. This
d1984 16
a1999 3
	std::swap(_M_functor, __x._M_functor);
	std::swap(_M_manager, __x._M_manager);
	std::swap(_M_invoker, __x._M_invoker);
d2005 6
a2010 6
	void
	assign(_Functor&& __f, const _Alloc& __a)
	{
	  function(allocator_arg, __a,
		   std::forward<_Functor>(__f)).swap(*this);
	}
d2012 1
a2012 1

d2023 1
a2023 1
      explicit operator bool() const noexcept
d2049 2
a2050 2
      const type_info& target_type() const noexcept;

d2060 2
a2061 2
      template<typename _Functor>       _Functor* target() noexcept;

d2063 1
a2063 1
      template<typename _Functor> const _Functor* target() const noexcept;
d2066 6
d2092 1
a2092 1
    template<typename _Functor, typename>
d2094 3
a2096 1
      function(_Functor __f)
a2102 1
	    _My_handler::_M_init_functor(_M_functor, std::move(__f));
d2105 1
d2115 1
a2115 1
	__throw_bad_function_call();
d2123 1
a2123 1
    target_type() const noexcept
d2126 5
a2130 5
	{
	  _Any_data __typeinfo_result;
	  _M_manager(__typeinfo_result, _M_functor, __get_type_info);
	  return *__typeinfo_result._M_access<const type_info*>();
	}
d2139 1
a2139 1
      target() noexcept
d2158 1
a2158 1
      target() const noexcept
d2182 1
a2182 1
    operator==(const function<_Res(_Args...)>& __f, nullptr_t) noexcept
d2188 1
a2188 1
    operator==(nullptr_t, const function<_Res(_Args...)>& __f) noexcept
d2200 1
a2200 1
    operator!=(const function<_Res(_Args...)>& __f, nullptr_t) noexcept
d2206 1
a2206 1
    operator!=(nullptr_t, const function<_Res(_Args...)>& __f) noexcept
d2220 1
d2222 1
a2222 4
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std

#endif // C++11
@


1.1.1.2.2.1
log
@Rebase.
@
text
@a2183 5
      // Used so the return type convertibility checks aren't done when
      // performing overload resolution for copy construction/assignment.
      template<typename _Tp>
	using _NotSelf = __not_<is_same<_Tp, function>>;

d2185 1
a2185 3
	using _Callable
	  = __and_<_NotSelf<_Functor>,
		   __check_func_return_type<_Invoke<_Functor>, _Res>>;
d2326 1
a2326 1
	_Requires<_Callable<typename decay<_Functor>::type>, function&>
@


1.1.1.3
log
@Import gcc 4.8.3 which has 98 bugs fixed on gcc-4-8-3-pre-r208254
@
text
@a2183 5
      // Used so the return type convertibility checks aren't done when
      // performing overload resolution for copy construction/assignment.
      template<typename _Tp>
	using _NotSelf = __not_<is_same<_Tp, function>>;

d2185 1
a2185 3
	using _Callable
	  = __and_<_NotSelf<_Functor>,
		   __check_func_return_type<_Invoke<_Functor>, _Res>>;
d2326 1
a2326 1
	_Requires<_Callable<typename decay<_Functor>::type>, function&>
@


1.1.1.3.2.1
log
@Sync gcc with -current, requested by skrll in ticket #448:

tools/gcc/Makefile                              up to 1.74
tools/gcc/gcc-version.mk                        up to 1.3
external/gpl3/gcc/dist/config/mh-alpha-linux    up to 1.1.1.1
external/gpl3/gcc/dist/gcc/config/or1k/constraints.md up to 1.1
external/gpl3/gcc/dist/gcc/config/or1k/elf.h    up to 1.1
external/gpl3/gcc/dist/gcc/config/or1k/linux-elf.h up to 1.1
external/gpl3/gcc/dist/gcc/config/or1k/linux-gas.h up to 1.1
external/gpl3/gcc/dist/gcc/config/or1k/netbsd.h up to 1.2
external/gpl3/gcc/dist/gcc/config/or1k/or1k-modes.def up to 1.1
external/gpl3/gcc/dist/gcc/config/or1k/or1k-opts.h up to 1.1
external/gpl3/gcc/dist/gcc/config/or1k/or1k-protos.h up to 1.1
external/gpl3/gcc/dist/gcc/config/or1k/or1k.c   up to 1.2
external/gpl3/gcc/dist/gcc/config/or1k/or1k.h   up to 1.1
external/gpl3/gcc/dist/gcc/config/or1k/or1k.md  up to 1.1
external/gpl3/gcc/dist/gcc/config/or1k/or1k.opt up to 1.1
external/gpl3/gcc/dist/gcc/config/or1k/predicates.md up to 1.1
external/gpl3/gcc/dist/gcc/config/or1k/t-linux  up to 1.1
external/gpl3/gcc/dist/gcc/config/or1k/t-or1k   up to 1.1
external/gpl3/gcc/dist/gcc/config/or1k/t-or1knd up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/constraints.md up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/crti.asm up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/crtn.asm up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/div.S   up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/elf.h   up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/generic.md up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/linux-unwind.h up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/linux.h up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/linux64.h up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/opcode-riscv.h up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/peephole.md up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/predicates.md up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/riscv-fp.c up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/riscv-ftypes.def up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/riscv-modes.def up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/riscv-opc.h up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/riscv-protos.h up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/riscv.c up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/riscv.h up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/riscv.md up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/riscv.opt up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/sync.md up to 1.2
external/gpl3/gcc/dist/gcc/config/riscv/t-elf   up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/t-linux64 up to 1.1
external/gpl3/gcc/dist/gcc/config/riscv/t-netbsd64 up to 1.1
external/gpl3/gcc/dist/gcc/common/config/or1k/or1k-common.c up to 1.1
external/gpl3/gcc/dist/gcc/common/config/riscv/riscv-common.c up to 1.1
external/gpl3/gcc/dist/libgcc/config/or1k/or1k-asm.h up to 1.1
external/gpl3/gcc/dist/libgcc/config/or1k/crti.S up to 1.1
external/gpl3/gcc/dist/libgcc/config/or1k/crtn.S up to 1.1
external/gpl3/gcc/dist/libgcc/config/or1k/linux-unwind.h up to 1.1
external/gpl3/gcc/dist/libgcc/config/or1k/or1k.S up to 1.1
external/gpl3/gcc/dist/libgcc/config/or1k/sfp-machine.h up to 1.1
external/gpl3/gcc/dist/libgcc/config/or1k/t-crtstuff up to 1.1
external/gpl3/gcc/dist/libgcc/config/or1k/t-linux up to 1.1
external/gpl3/gcc/dist/libgcc/config/or1k/t-or1k up to 1.1
external/gpl3/gcc/dist/libgcc/config/riscv/riscv-fp.c up to 1.1
external/gpl3/gcc/dist/libgcc/config/riscv/crti.S up to 1.1
external/gpl3/gcc/dist/libgcc/config/riscv/crtn.S up to 1.1
external/gpl3/gcc/dist/libgcc/config/riscv/t-dpbit up to 1.1
external/gpl3/gcc/dist/libgcc/config/riscv/t-elf up to 1.1
external/gpl3/gcc/dist/libgcc/config/riscv/t-fpbit up to 1.1
external/gpl3/gcc/dist/libgcc/config/riscv/t-linux up to 1.1
external/gpl3/gcc/dist/libgcc/config/riscv/t-tpbit up to 1.1
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_netbsd.cc up to 1.3
external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/powerpc/Makefile up to 1.1
external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/powerpc64/Makefile up to 1.1
external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/riscv32/Makefile up to 1.1
external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/riscv64/Makefile up to 1.1
external/gpl3/gcc/lib/libtsan/Makefile          up to 1.2
external/gpl3/gcc/lib/libtsan/shlib_version     up to 1.1
external/gpl3/gcc/lib/libasan/Makefile          up to 1.9
external/gpl3/gcc/lib/libasan/shlib_version     up to 1.1
external/gpl3/gcc/usr.bin/lto-wrapper/Makefile  up to 1.1
external/gpl3/gcc/usr.bin/lto1/Makefile         up to 1.2
external/gpl3/gcc/Makefile                      up to 1.2
external/gpl3/gcc/README.gcc48                  up to 1.6
external/gpl3/gcc/dist/ChangeLog                up to 1.1.1.6
external/gpl3/gcc/dist/LAST_UPDATED             up to 1.5
external/gpl3/gcc/dist/MD5SUMS                  up to 1.5
external/gpl3/gcc/dist/Makefile.def             up to 1.1.1.4
external/gpl3/gcc/dist/Makefile.in              up to 1.1.1.4
external/gpl3/gcc/dist/configure                up to 1.8
external/gpl3/gcc/dist/configure.ac             up to 1.7
external/gpl3/gcc/dist/config/ChangeLog         up to 1.1.1.6
external/gpl3/gcc/dist/contrib/ChangeLog        up to 1.1.1.6
external/gpl3/gcc/dist/contrib/reghunt/ChangeLog up to 1.1.1.5
external/gpl3/gcc/dist/contrib/regression/ChangeLog up to 1.1.1.5
external/gpl3/gcc/dist/fixincludes/ChangeLog    up to 1.1.1.5
external/gpl3/gcc/dist/fixincludes/fixincl.x    up to 1.1.1.3
external/gpl3/gcc/dist/fixincludes/inclhack.def up to 1.1.1.3
external/gpl3/gcc/dist/fixincludes/tests/base/assert.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/ChangeLog            up to 1.11
external/gpl3/gcc/dist/gcc/DATESTAMP            up to 1.1.1.7
external/gpl3/gcc/dist/gcc/DEV-PHASE            up to 1.1.1.5
external/gpl3/gcc/dist/gcc/config.gcc           up to 1.32
external/gpl3/gcc/dist/gcc/config.in            up to 1.1.1.4
external/gpl3/gcc/dist/gcc/configure            up to 1.11
external/gpl3/gcc/dist/gcc/configure.ac         up to 1.9
external/gpl3/gcc/dist/gcc/convert.c            up to 1.1.1.4
external/gpl3/gcc/dist/gcc/expr.c               up to 1.7
external/gpl3/gcc/dist/gcc/fold-const.c         up to 1.1.1.7
external/gpl3/gcc/dist/gcc/graphite-clast-to-gimple.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/graphite-interchange.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/graphite-optimize-isl.c up to 1.1.1.2
external/gpl3/gcc/dist/gcc/graphite-poly.c      up to 1.1.1.3
external/gpl3/gcc/dist/gcc/graphite-sese-to-poly.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/ipa-pure-const.c     up to 1.1.1.3
external/gpl3/gcc/dist/gcc/omp-low.c            up to 1.1.1.4
external/gpl3/gcc/dist/gcc/ree.c                up to 1.1.1.2
external/gpl3/gcc/dist/gcc/rtlanal.c            up to 1.2
external/gpl3/gcc/dist/gcc/stor-layout.c        up to 1.1.1.3
external/gpl3/gcc/dist/gcc/tree-data-ref.c      up to 1.1.1.3
external/gpl3/gcc/dist/gcc/tree-data-ref.h      up to 1.1.1.3
external/gpl3/gcc/dist/gcc/tree-nrv.c           up to 1.1.1.3
external/gpl3/gcc/dist/gcc/tree-ssa-forwprop.c  up to 1.1.1.3
external/gpl3/gcc/dist/gcc/tree-ssa-reassoc.c   up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-ssa-strlen.c    up to 1.1.1.2
external/gpl3/gcc/dist/gcc/tree-ssa-tail-merge.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/tree-vect-slp.c      up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree.c               up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tsan.c               up to 1.1.1.2
external/gpl3/gcc/dist/gcc/c/ChangeLog          up to 1.1.1.4
external/gpl3/gcc/dist/gcc/c-family/ChangeLog   up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/darwin-c.c    up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/darwin-driver.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/netbsd.h      up to 1.14
external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-elf-raw.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-linux.h up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-protos.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.c up to 1.1.1.5
external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.h up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.opt up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/arm/arm.h     up to 1.10
external/gpl3/gcc/dist/gcc/config/arm/arm.md    up to 1.8
external/gpl3/gcc/dist/gcc/config/i386/i386.c   up to 1.9
external/gpl3/gcc/dist/gcc/config/pa/pa.md      up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/rs6000/altivec.h up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/rs6000/altivec.md up to 1.1.1.5
external/gpl3/gcc/dist/gcc/config/rs6000/netbsd.h up to 1.8
external/gpl3/gcc/dist/gcc/config/rs6000/rs6000-builtin.def up to 1.1.1.5
external/gpl3/gcc/dist/gcc/config/rs6000/rs6000-c.c up to 1.1.1.5
external/gpl3/gcc/dist/gcc/config/rs6000/rs6000-protos.h up to 1.1.1.5
external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c up to 1.10
external/gpl3/gcc/dist/gcc/config/rs6000/vsx.md up to 1.1.1.6
external/gpl3/gcc/dist/gcc/config/rs6000/xcoff.h up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/sh/sh.c       up to 1.7
external/gpl3/gcc/dist/gcc/config/sh/sh.md      up to 1.1.1.5
external/gpl3/gcc/dist/gcc/config/sparc/leon.md up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/sparc/sparc-opts.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/sparc/sparc.c up to 1.1.1.5
external/gpl3/gcc/dist/gcc/config/sparc/sparc.h up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/sparc/sparc.md up to 1.4
external/gpl3/gcc/dist/gcc/config/sparc/sparc.opt up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/sparc/t-rtems up to 1.1.1.2
external/gpl3/gcc/dist/gcc/cp/ChangeLog         up to 1.1.1.7
external/gpl3/gcc/dist/gcc/cp/parser.c          up to 1.1.1.6
external/gpl3/gcc/dist/gcc/cp/pt.c              up to 1.1.1.5
external/gpl3/gcc/dist/gcc/cp/semantics.c       up to 1.1.1.5
external/gpl3/gcc/dist/gcc/doc/extend.texi      up to 1.1.1.5
external/gpl3/gcc/dist/gcc/doc/install.texi     up to 1.1.1.5
external/gpl3/gcc/dist/gcc/doc/invoke.texi      up to 1.7
external/gpl3/gcc/dist/gcc/doc/md.texi          up to 1.1.1.6
external/gpl3/gcc/dist/gcc/doc/tm.texi          up to 1.1.1.4
external/gpl3/gcc/dist/gcc/doc/tm.texi.in       up to 1.1.1.3
external/gpl3/gcc/dist/gcc/lto/ChangeLog        up to 1.1.1.5
external/gpl3/gcc/dist/gcc/objc/ChangeLog       up to 1.1.1.5
external/gpl3/gcc/dist/gcc/objcp/ChangeLog      up to 1.1.1.5
external/gpl3/gcc/dist/gnattools/ChangeLog      up to 1.1.1.3
external/gpl3/gcc/dist/include/ChangeLog        up to 1.1.1.5
external/gpl3/gcc/dist/intl/ChangeLog           up to 1.1.1.5
external/gpl3/gcc/dist/libbacktrace/ChangeLog   up to 1.1.1.4
external/gpl3/gcc/dist/libcpp/ChangeLog         up to 1.1.1.5
external/gpl3/gcc/dist/libcpp/lex.c             up to 1.5
external/gpl3/gcc/dist/libcpp/line-map.c        up to 1.1.1.4
external/gpl3/gcc/dist/libdecnumber/ChangeLog   up to 1.1.1.5
external/gpl3/gcc/dist/libgcc/ChangeLog         up to 1.1.1.7
external/gpl3/gcc/dist/libgcc/config/libbid/ChangeLog up to 1.1.1.5
external/gpl3/gcc/dist/libgcc/config/pa/linux-unwind.h up to 1.1.1.2
external/gpl3/gcc/dist/libgcc/config/sh/lib1funcs.S up to 1.1.1.2
external/gpl3/gcc/dist/libgomp/ChangeLog        up to 1.1.1.5
external/gpl3/gcc/dist/libgomp/configure.tgt    up to 1.1.1.3
external/gpl3/gcc/dist/libiberty/ChangeLog      up to 1.1.1.5
external/gpl3/gcc/dist/libitm/ChangeLog         up to 1.1.1.3
external/gpl3/gcc/dist/libitm/configure.tgt     up to 1.1.1.3
external/gpl3/gcc/dist/libitm/libitm.info       up to 1.1.1.2
external/gpl3/gcc/dist/libmudflap/ChangeLog     up to 1.1.1.5
external/gpl3/gcc/dist/libobjc/ChangeLog        up to 1.1.1.6
external/gpl3/gcc/dist/libsanitizer/ChangeLog   up to 1.1.1.3
external/gpl3/gcc/dist/libsanitizer/configure.tgt up to 1.3
external/gpl3/gcc/dist/libsanitizer/asan/asan_intercepted_functions.h up to 1.2
external/gpl3/gcc/dist/libsanitizer/asan/asan_internal.h up to 1.2
external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc up to 1.5
external/gpl3/gcc/dist/libsanitizer/asan/asan_malloc_linux.cc up to 1.2
external/gpl3/gcc/dist/libsanitizer/asan/asan_posix.cc up to 1.2
external/gpl3/gcc/dist/libsanitizer/interception/interception.h up to 1.2
external/gpl3/gcc/dist/libsanitizer/interception/interception_linux.cc up to 1.3
external/gpl3/gcc/dist/libsanitizer/interception/interception_linux.h up to 1.2
external/gpl3/gcc/dist/libsanitizer/interception/interception_type_test.cc up to 1.2
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc up to 1.2
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_internal_defs.h up to 1.2
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_placement_new.h up to 1.2
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc up to 1.2
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_posix.cc up to 1.2
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps.h up to 1.2
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_symbolizer_linux.cc up to 1.2
external/gpl3/gcc/dist/libsanitizer/tsan/tsan_symbolize_addr2line_linux.cc up to 1.2
external/gpl3/gcc/dist/libssp/ChangeLog         up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/ChangeLog   up to 1.1.1.7
external/gpl3/gcc/dist/libstdc++-v3/configure.host up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/config/os/mingw32/os_defines.h up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/config/os/mingw32-w64/os_defines.h up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/status.html up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_algo.h up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/std/functional up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/std/tuple up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/tr1/functional up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/libsupc++/dyncast.cc up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/libsupc++/eh_personality.cc up to 1.1.1.3
external/gpl3/gcc/dist/lto-plugin/ChangeLog     up to 1.1.1.5
external/gpl3/gcc/dist/maintainer-scripts/ChangeLog up to 1.1.1.6
external/gpl3/gcc/lib/Makefile                  up to 1.8
external/gpl3/gcc/lib/crtstuff/arch/coldfire.mk up to 1.3
external/gpl3/gcc/lib/crtstuff/arch/m68000.mk   up to 1.6
external/gpl3/gcc/lib/libbacktrace/arch/alpha/backtrace-supported.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/alpha/config.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/arm/backtrace-supported.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/arm/config.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/armeb/backtrace-supported.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/armeb/config.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/coldfire/backtrace-supported.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/coldfire/config.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/hppa/backtrace-supported.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/hppa/config.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/i386/backtrace-supported.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/i386/config.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/m68000/backtrace-supported.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/m68000/config.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/m68k/backtrace-supported.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/m68k/config.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/mips64eb/backtrace-supported.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/mips64eb/config.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/mips64el/backtrace-supported.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/mips64el/config.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/mipseb/backtrace-supported.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/mipseb/config.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/mipsel/backtrace-supported.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/mipsel/config.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/powerpc/backtrace-supported.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/powerpc/config.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/backtrace-supported.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/powerpc64/config.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/sh3eb/backtrace-supported.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/sh3eb/config.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/sh3el/backtrace-supported.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/sh3el/config.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/sparc/backtrace-supported.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/sparc/config.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/sparc64/backtrace-supported.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/sparc64/config.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/vax/backtrace-supported.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/vax/config.h up to 1.3
external/gpl3/gcc/lib/libbacktrace/arch/x86_64/backtrace-supported.h up to 1.2
external/gpl3/gcc/lib/libbacktrace/arch/x86_64/config.h up to 1.2
external/gpl3/gcc/lib/libgcc/Makefile.inc       up to 1.29
external/gpl3/gcc/lib/libgcc/arch/m68000/defs.mk up to 1.2
external/gpl3/gcc/lib/libgcc/arch/powerpc64/defs.mk up to 1.3
external/gpl3/gcc/lib/libgcc/libgcc_s/Makefile  up to 1.11
external/gpl3/gcc/lib/libgcc/libgcov/arch/alpha/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/arm/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/armeb/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/coldfire/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/earm/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmeb/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhf/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhfeb/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4eb/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6eb/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6hf/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6hfeb/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7eb/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7hf/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7hfeb/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/hppa/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/i386/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/m68000/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/m68k/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/mips64eb/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/mips64el/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/mipseb/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/mipsel/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/gcov-iov.h up to 1.4
external/gpl3/gcc/lib/libgcc/libgcov/arch/sh3eb/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/sh3el/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/sparc/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/sparc64/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/vax/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/x86_64/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgomp/arch/m68000/config.h up to 1.3
external/gpl3/gcc/lib/libgomp/arch/m68000/libgomp.spec up to 1.3
external/gpl3/gcc/lib/libiberty/arch/coldfire/config.h up to 1.3
external/gpl3/gcc/lib/libiberty/arch/m68000/config.h up to 1.3
external/gpl3/gcc/lib/liblto_plugin/Makefile    up to 1.3
external/gpl3/gcc/lib/libmudflap/Makefile       up to 1.6
external/gpl3/gcc/lib/libobjc/arch/m68000/config.h up to 1.3
external/gpl3/gcc/lib/libstdc++-v3/Makefile     up to 1.19
external/gpl3/gcc/lib/libstdc++-v3/arch/alpha/c++config.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/alpha/gstdint.h up to 1.9
external/gpl3/gcc/lib/libstdc++-v3/arch/arm/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/arm/gstdint.h up to 1.9
external/gpl3/gcc/lib/libstdc++-v3/arch/armeb/c++config.h up to 1.15
external/gpl3/gcc/lib/libstdc++-v3/arch/armeb/gstdint.h up to 1.9
external/gpl3/gcc/lib/libstdc++-v3/arch/coldfire/c++config.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/coldfire/gstdint.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/earm/c++config.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/earm/gstdint.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb/c++config.h up to 1.11
external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb/gstdint.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf/c++config.h up to 1.11
external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf/gstdint.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb/c++config.h up to 1.9
external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb/gstdint.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4/c++config.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4/gstdint.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb/c++config.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb/gstdint.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6/c++config.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6/gstdint.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6eb/c++config.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6eb/gstdint.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf/c++config.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf/gstdint.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hfeb/c++config.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hfeb/gstdint.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7/c++config.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7/gstdint.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7eb/c++config.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7eb/gstdint.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hf/c++config.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hf/gstdint.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hfeb/c++config.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hfeb/gstdint.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/hppa/c++config.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/hppa/gstdint.h up to 1.10
external/gpl3/gcc/lib/libstdc++-v3/arch/i386/c++config.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/i386/gstdint.h up to 1.9
external/gpl3/gcc/lib/libstdc++-v3/arch/m68000/c++config.h up to 1.10
external/gpl3/gcc/lib/libstdc++-v3/arch/m68000/gstdint.h up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/m68k/c++config.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/m68k/gstdint.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/mips64eb/c++config.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/mips64eb/gstdint.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/c++config.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/gstdint.h up to 1.9
external/gpl3/gcc/lib/libstdc++-v3/arch/mipseb/c++config.h up to 1.15
external/gpl3/gcc/lib/libstdc++-v3/arch/mipseb/gstdint.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/mipsel/c++config.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/mipsel/gstdint.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc/c++config.h up to 1.15
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc/gstdint.h up to 1.9
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/c++config.h up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/defs.mk up to 1.3
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gstdint.h up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/c++config.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/gstdint.h up to 1.9
external/gpl3/gcc/lib/libstdc++-v3/arch/sh3el/c++config.h up to 1.15
external/gpl3/gcc/lib/libstdc++-v3/arch/sh3el/gstdint.h up to 1.9
external/gpl3/gcc/lib/libstdc++-v3/arch/sparc/c++config.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/sparc/gstdint.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/sparc64/c++config.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/sparc64/gstdint.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/vax/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/vax/gstdint.h up to 1.8
external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/c++config.h up to 1.15
external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/gstdint.h up to 1.9
external/gpl3/gcc/lib/libstdc++-v3/include/bits/arch/Makefile up to 1.3
external/gpl3/gcc/usr.bin/Makefile              up to 1.7
external/gpl3/gcc/usr.bin/backend/Makefile      up to 1.23
external/gpl3/gcc/usr.bin/frontend/Makefile     up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/alpha/auto-host.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/alpha/configargs.h up to 1.15
external/gpl3/gcc/usr.bin/gcc/arch/alpha/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/arm/auto-host.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/arm/configargs.h up to 1.17
external/gpl3/gcc/usr.bin/gcc/arch/arm/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/armeb/auto-host.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/armeb/configargs.h up to 1.17
external/gpl3/gcc/usr.bin/gcc/arch/armeb/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/coldfire/auto-host.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/coldfire/bversion.h up to 1.3
external/gpl3/gcc/usr.bin/gcc/arch/coldfire/configargs.h up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/coldfire/defs.mk up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/coldfire/plugin-version.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/coldfire/tm.h up to 1.3
external/gpl3/gcc/usr.bin/gcc/arch/earm/auto-host.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earm/configargs.h up to 1.15
external/gpl3/gcc/usr.bin/gcc/arch/earm/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmeb/auto-host.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/earmeb/configargs.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/earmeb/plugin-version.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/earmhf/auto-host.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/earmhf/configargs.h up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/earmhf/plugin-version.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/earmhfeb/auto-host.h up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/earmhfeb/configargs.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmhfeb/plugin-version.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/earmv4/auto-host.h up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/earmv4/configargs.h up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv4/plugin-version.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/earmv4eb/auto-host.h up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/earmv4eb/configargs.h up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv4eb/plugin-version.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/earmv6/auto-host.h up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/earmv6/configargs.h up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv6/plugin-version.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/earmv6eb/auto-host.h up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/earmv6eb/configargs.h up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv6eb/plugin-version.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hf/auto-host.h up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hf/configargs.h up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hf/plugin-version.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hfeb/auto-host.h up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hfeb/configargs.h up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hfeb/plugin-version.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/earmv7/auto-host.h up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/earmv7/configargs.h up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv7/plugin-version.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/earmv7eb/auto-host.h up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/earmv7eb/configargs.h up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv7eb/plugin-version.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hf/auto-host.h up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hf/configargs.h up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hf/plugin-version.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hfeb/auto-host.h up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hfeb/configargs.h up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hfeb/plugin-version.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/hppa/auto-host.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/hppa/configargs.h up to 1.17
external/gpl3/gcc/usr.bin/gcc/arch/hppa/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/i386/auto-host.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/i386/configargs.h up to 1.19
external/gpl3/gcc/usr.bin/gcc/arch/i386/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/m68000/auto-host.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/m68000/bversion.h up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/m68000/configargs.h up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/m68000/defs.mk up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/m68000/plugin-version.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/m68000/tm.h  up to 1.3
external/gpl3/gcc/usr.bin/gcc/arch/m68k/auto-host.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/m68k/configargs.h up to 1.14
external/gpl3/gcc/usr.bin/gcc/arch/m68k/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/mips64eb/auto-host.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/mips64eb/configargs.h up to 1.15
external/gpl3/gcc/usr.bin/gcc/arch/mips64eb/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/mips64el/auto-host.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h up to 1.16
external/gpl3/gcc/usr.bin/gcc/arch/mips64el/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/mipseb/auto-host.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/mipseb/configargs.h up to 1.15
external/gpl3/gcc/usr.bin/gcc/arch/mipseb/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/mipsel/auto-host.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/mipsel/configargs.h up to 1.16
external/gpl3/gcc/usr.bin/gcc/arch/mipsel/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/powerpc/auto-host.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/powerpc/configargs.h up to 1.21
external/gpl3/gcc/usr.bin/gcc/arch/powerpc/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/auto-host.h up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/bversion.h up to 1.3
external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/configargs.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/defs.mk up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/gtyp-input.list up to 1.3
external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/multilib.h up to 1.3
external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/plugin-version.h up to 1.3
external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/tm.h up to 1.3
external/gpl3/gcc/usr.bin/gcc/arch/sh3eb/auto-host.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/sh3eb/configargs.h up to 1.16
external/gpl3/gcc/usr.bin/gcc/arch/sh3eb/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/sh3el/auto-host.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/sh3el/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/sh3el/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/sparc/auto-host.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/sparc/configargs.h up to 1.16
external/gpl3/gcc/usr.bin/gcc/arch/sparc/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/sparc64/auto-host.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/sparc64/configargs.h up to 1.17
external/gpl3/gcc/usr.bin/gcc/arch/sparc64/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/vax/auto-host.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/vax/configargs.h up to 1.17
external/gpl3/gcc/usr.bin/gcc/arch/vax/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/x86_64/auto-host.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/x86_64/configargs.h up to 1.20
external/gpl3/gcc/usr.bin/gcc/arch/x86_64/plugin-version.h up to 1.7
external/gpl3/gcc/usr.bin/libcpp/arch/alpha/config.h up to 1.3
external/gpl3/gcc/usr.bin/libcpp/arch/armeb/config.h up to 1.2
external/gpl3/gcc/usr.bin/libcpp/arch/x86_64/config.h up to 1.3
distrib/sets/lists/base/ad.arm			1.58
distrib/sets/lists/base/ad.arm			1.61
distrib/sets/lists/base/ad.mips			1.53
distrib/sets/lists/base/ad.mips			1.56
distrib/sets/lists/base/ad.powerpc		1.22
distrib/sets/lists/base/ad.powerpc		1.25
distrib/sets/lists/base/ad.powerpc		1.26
distrib/sets/lists/base/md.amd64		1.249
distrib/sets/lists/base/md.amd64		1.252
distrib/sets/lists/base/md.sparc64		1.237
distrib/sets/lists/base/md.sparc64		1.240
distrib/sets/lists/base/shl.mi			1.718
distrib/sets/lists/base/shl.mi			1.721
distrib/sets/lists/base/shl.mi			1.722
distrib/sets/lists/comp/ad.arm			1.62
distrib/sets/lists/comp/ad.mips			1.52
distrib/sets/lists/comp/ad.powerpc		1.74
distrib/sets/lists/comp/ad.powerpc		1.75
distrib/sets/lists/comp/md.amd64		1.226
distrib/sets/lists/comp/md.sparc64		1.189
distrib/sets/lists/comp/mi			1.1918
distrib/sets/lists/comp/mi			1.1919
distrib/sets/lists/comp/mi			1.1937
distrib/sets/lists/comp/mi			1.1937
distrib/sets/lists/comp/shl.mi			1.268
distrib/sets/lists/comp/shl.mi			1.268
distrib/sets/lists/comp/shl.mi			1.269
distrib/sets/lists/debug/ad.arm			1.47
distrib/sets/lists/debug/ad.arm			1.50
distrib/sets/lists/debug/ad.mips		1.43
distrib/sets/lists/debug/ad.mips		1.46
distrib/sets/lists/debug/ad.powerpc		1.23
distrib/sets/lists/debug/ad.powerpc		1.26
distrib/sets/lists/debug/md.amd64		1.67
distrib/sets/lists/debug/md.amd64		1.70
distrib/sets/lists/debug/md.evbmips		1.5
distrib/sets/lists/debug/md.sparc64		1.66
distrib/sets/lists/debug/md.sparc64		1.69
distrib/sets/lists/debug/mi			1.101
distrib/sets/lists/debug/mi			1.101
distrib/sets/lists/debug/mi			1.90
distrib/sets/lists/debug/mi			1.91
distrib/sets/lists/debug/shl.mi			1.77
distrib/sets/lists/debug/shl.mi			1.80
distrib/sets/lists/debug/shl.mi			1.81
lib/Makefile					1.216
lib/Makefile					1.217
lib/Makefile					1.218
lib/libexecinfo/Makefile			1.6
lib/libexecinfo/Makefile			1.7
lib/libexecinfo/Makefile			1.8
lib/libexecinfo/unwind.h			1.3
sys/lib/libunwind/Makefile.inc			1.10

Sync gcc and its libraries with -current, including the import
of gcc 4.8.4, fixes to the use of cpu specific string instructions
on powerpc and a branch delay slot fix for SH from upstream.
@
text
@a2441 1
	  __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
d2444 1
@


1.1.1.4
log
@import GCC 4.8.4 release.  this fixes at least these GCC PRs:
	fortran/61407
	sanitizer/64265
	tree-optimization/64269
	middle-end/64225
	tree-optimization/61686
	bootstrap/64213
	rtl-optimization/64037
	target/50751
	rtl-optimization/64037
	target/59593
	target/59593
	c++/56493
	target/64115
	middle-end/64111
	middle-end/64067
	rtl-optimization/63659
	libgomp/61200
	tree-optimization/61969
	tree-optimization/62031
	tree-optimization/63379
	tree-optimization/63605
	middle-end/63665
	target/60111
	target/63673
	target/63947
	tree-optimization/62167
	tree-optimization/63841
	ipa/63838
	c++/63455
	c++/63415
	c++/56710
	c++/58624
	preprocessor/60436
	target/55351
	fortran/63938
	libgomp/61200
	libstdc++/63840
	libstdc++/61947
	libstdc++/59603
	target/56846
	libstdc++/57440
@
text
@a2441 1
	  __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
d2444 1
@


1.1.1.5
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) 2001-2015 Free Software Foundation, Inc.
d70 2
d73 1
a73 1
  template<typename _Functor, typename = __void_t<>>
d78 1
a78 2
    struct _Maybe_get_result_type<_Functor,
				  __void_t<typename _Functor::result_type>>
d83 1
a83 1
   *  defined in 20.8.2 [func.require] of C++11.
d87 1
a87 1
    : _Maybe_get_result_type<_Functor>
d188 32
d445 3
a447 1
      reference_wrapper(const reference_wrapper&) = default;
d450 5
a454 1
      operator=(const reference_wrapper&) = default;
d539 1
a539 3
  template<typename _Signature>
    struct _Mem_fn_traits;

d541 2
a542 1
    struct _Mem_fn_traits_base
d544 34
a577 65
      using __result_type = _Res;
      using __class_type =  _Class;
      using __arg_types = _Pack<_ArgTypes...>;
      using __maybe_type
	= _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...>;
      using __arity = integral_constant<size_t, sizeof...(_ArgTypes)>;
    };

#define _GLIBCXX_MEM_FN_TRAITS2(_CV, _REF, _LVAL, _RVAL)		\
  template<typename _Res, typename _Class, typename... _ArgTypes>	\
    struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) _CV _REF>	\
    : _Mem_fn_traits_base<_Res, _CV _Class, _ArgTypes...>		\
    {									\
      using __pmf_type  = _Res (_Class::*)(_ArgTypes...) _CV _REF;	\
      using __lvalue = _LVAL;						\
      using __rvalue = _RVAL;						\
      using __vararg = false_type;					\
    };									\
  template<typename _Res, typename _Class, typename... _ArgTypes>	\
    struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) _CV _REF>	\
    : _Mem_fn_traits_base<_Res, _CV _Class, _ArgTypes...>		\
    {									\
      using __pmf_type  = _Res (_Class::*)(_ArgTypes... ...) _CV _REF;	\
      using __lvalue = _LVAL;						\
      using __rvalue = _RVAL;						\
      using __vararg = true_type;					\
    };

#define _GLIBCXX_MEM_FN_TRAITS(_REF, _LVAL, _RVAL)		\
  _GLIBCXX_MEM_FN_TRAITS2(		, _REF, _LVAL, _RVAL)	\
  _GLIBCXX_MEM_FN_TRAITS2(const		, _REF, _LVAL, _RVAL)	\
  _GLIBCXX_MEM_FN_TRAITS2(volatile	, _REF, _LVAL, _RVAL)	\
  _GLIBCXX_MEM_FN_TRAITS2(const volatile, _REF, _LVAL, _RVAL)

_GLIBCXX_MEM_FN_TRAITS( , true_type, true_type)
_GLIBCXX_MEM_FN_TRAITS(&, true_type, false_type)
_GLIBCXX_MEM_FN_TRAITS(&&, false_type, true_type)

#undef _GLIBCXX_MEM_FN_TRAITS
#undef _GLIBCXX_MEM_FN_TRAITS2

  template<typename _MemFunPtr,
	   bool __is_mem_fn = is_member_function_pointer<_MemFunPtr>::value>
    class _Mem_fn_base
    : public _Mem_fn_traits<_MemFunPtr>::__maybe_type
    {
      using _Traits = _Mem_fn_traits<_MemFunPtr>;

      using _Class = typename _Traits::__class_type;
      using _ArgTypes = typename _Traits::__arg_types;
      using _Pmf = typename _Traits::__pmf_type;

      using _Arity = typename _Traits::__arity;
      using _Varargs = typename _Traits::__vararg;

      template<typename _Func, typename... _BoundArgs>
	friend struct _Bind_check_arity;

      // for varargs functions we just check the number of arguments,
      // otherwise we also check they are convertible.
      template<typename _Args>
	using _CheckArgs = typename conditional<_Varargs::value,
	  __bool_constant<(_Args::value >= _ArgTypes::value)>,
	  _AllConvertible<_Args, _ArgTypes>
	>::type;
d580 1
a580 1
      using result_type = typename _Traits::__result_type;
d582 1
a582 1
      explicit _Mem_fn_base(_Pmf __pmf) : _M_pmf(__pmf) { }
d585 2
a586 4
      template<typename... _Args, typename _Req
               = _Require<typename _Traits::__lvalue,
                          _CheckArgs<_Pack<_Args...>>>>
	result_type
d588 1
a588 1
	{ return (__object.*_M_pmf)(std::forward<_Args>(__args)...); }
d590 2
a591 4
      template<typename... _Args, typename _Req
               = _Require<typename _Traits::__rvalue,
                          _CheckArgs<_Pack<_Args...>>>>
	result_type
d594 1
a594 1
	  return (std::move(__object).*_M_pmf)(std::forward<_Args>(__args)...);
d598 2
a599 4
      template<typename... _Args, typename _Req
               = _Require<typename _Traits::__lvalue,
                          _CheckArgs<_Pack<_Args...>>>>
	result_type
d601 160
a760 1
	{ return (__object->*_M_pmf)(std::forward<_Args>(__args)...); }
d763 3
a765 4
      template<typename _Tp, typename... _Args, typename _Req
               = _Require<_NotSame<_Class, _Tp>, _NotSame<_Class*, _Tp>,
                          _CheckArgs<_Pack<_Args...>>>>
	result_type
d772 3
a774 5
      // Handle reference wrappers
      template<typename _Tp, typename... _Args, typename _Req
               = _Require<is_base_of<_Class, _Tp>, typename _Traits::__lvalue,
                          _CheckArgs<_Pack<_Args...>>>>
	result_type
d779 11
d791 1
a791 1
	result_type
d795 1
a795 1
	  return (std::forward<_Tp>(__object).*_M_pmf)
d800 1
a800 1
	result_type
d802 5
a806 1
	{ return ((*__ptr).*_M_pmf)(std::forward<_Args>(__args)...); }
d808 65
a872 1
      _Pmf _M_pmf;
a874 1
  // Partial specialization for member object pointers.
d876 1
a876 1
    class _Mem_fn_base<_Res _Class::*, false>
d887 1
a887 1
	{ return std::forward<_Tp>(__object).*_M_pm; }
d893 1
a893 1
	{ return (*std::forward<_Tp>(__object)).*_M_pm; }
d900 1
a900 7
	{ return (*__ptr).*_M_pm; }

      using _Arity = integral_constant<size_t, 0>;
      using _Varargs = false_type;

      template<typename _Func, typename... _BoundArgs>
	friend struct _Bind_check_arity;
d904 1
a904 1
      _Mem_fn_base(_Res _Class::*__pm) noexcept : _M_pm(__pm) { }
d909 1
a909 1
      { return __object.*_M_pm; }
d913 1
a913 1
      { return __object.*_M_pm; }
d917 1
a917 1
      { return std::forward<_Class>(__object).*_M_pm; }
d921 1
a921 1
      { return std::forward<const _Class>(__object).*_M_pm; }
d926 1
a926 1
      { return __object->*_M_pm; }
d930 1
a930 1
      { return __object->*_M_pm; }
d936 1
a936 1
	noexcept(noexcept(std::declval<_Mem_fn_base*>()->_M_call
d944 1
a944 1
	noexcept(noexcept(std::declval<_Mem_fn_base&>()(__ref.get())))
d949 1
a949 8
      _Res _Class::*_M_pm;
    };

  template<typename _Res, typename _Class>
    struct _Mem_fn<_Res _Class::*>
    : _Mem_fn_base<_Res _Class::*>
    {
      using _Mem_fn_base<_Res _Class::*>::_Mem_fn_base;
d1155 1
a1155 1
	  return __arg(std::forward<_Args>(std::get<_Indexes>(__tuple))...);
d1219 2
a1220 2
   *  other function objects untouched. Used by std::bind(). The
   *  primary template handles the non-member-pointer case.
d1238 1
a1238 1
   *  other function objects untouched. Used by std::bind(). This
d1265 1
a1265 1
    -> __tuple_element_t<_Ind, tuple<_Tp...>> volatile&
d1272 1
a1272 1
    -> __tuple_element_t<_Ind, tuple<_Tp...>> const volatile&
d1296 1
a1296 1
		      (std::get<_Indexes>(_M_bound_args), __args)...);
d1305 1
a1305 1
		      (std::get<_Indexes>(_M_bound_args), __args)...);
d1428 1
a1428 1
		      (std::get<_Indexes>(_M_bound_args), __args)...);
d1438 1
a1438 1
	       (std::get<_Indexes>(_M_bound_args), __args)...);
d1448 1
a1448 1
		      (std::get<_Indexes>(_M_bound_args), __args)...);
d1458 1
a1458 1
	       (std::get<_Indexes>(_M_bound_args),  __args)...);
a1625 28
  template<typename _Func, typename... _BoundArgs>
    struct _Bind_check_arity { };

  template<typename _Ret, typename... _Args, typename... _BoundArgs>
    struct _Bind_check_arity<_Ret (*)(_Args...), _BoundArgs...>
    {
      static_assert(sizeof...(_BoundArgs) == sizeof...(_Args),
                   "Wrong number of arguments for function");
    };

  template<typename _Ret, typename... _Args, typename... _BoundArgs>
    struct _Bind_check_arity<_Ret (*)(_Args......), _BoundArgs...>
    {
      static_assert(sizeof...(_BoundArgs) >= sizeof...(_Args),
                   "Wrong number of arguments for function");
    };

  template<typename _Tp, typename _Class, typename... _BoundArgs>
    struct _Bind_check_arity<_Tp _Class::*, _BoundArgs...>
    {
      using _Arity = typename _Mem_fn<_Tp _Class::*>::_Arity;
      using _Varargs = typename _Mem_fn<_Tp _Class::*>::_Varargs;
      static_assert(_Varargs::value
		    ? sizeof...(_BoundArgs) >= _Arity::value + 1
		    : sizeof...(_BoundArgs) == _Arity::value + 1,
		    "Wrong number of arguments for pointer-to-member");
    };

a1633 1
    : _Bind_check_arity<typename decay<_Func>::type, _BoundArgs...>
a1665 1
    : _Bind_check_arity<typename decay<_Func>::type, _BoundArgs...>
d1699 2
a1700 1
      template<typename _Tp, typename... _Up>
d1702 9
a1710 2
        _Bind_simple(_Tp&& __f, _Up&&... __args)
        : _M_bound(std::forward<_Tp>(__f), std::forward<_Up>(__args)...)
d1724 1
a1739 1
    : _Bind_check_arity<typename decay<_Func>::type, _BoundArgs...>
d1778 1
a1778 2
   *  Trivially copyable types are location-invariant and users can
   *  specialize this trait for other types.
d1782 2
a1783 1
    : is_trivially_copyable<_Tp>::type
d1936 1
a1936 1
#if __cpp_rtti
d2002 1
a2002 1
#if __cpp_rtti
d2025 1
a2025 1
    _Function_base() : _M_manager(nullptr) { }
d2054 1
a2054 1
      _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args)
d2069 1
a2069 1
      _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args)
d2084 1
a2084 1
      _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args)
d2099 1
a2099 1
      _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args)
d2116 1
a2116 1
      _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args)
d2139 1
a2139 1
#if __cpp_rtti
d2156 1
a2156 1
      _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args)
d2305 1
a2305 1
      operator=(nullptr_t) noexcept
d2310 2
a2311 2
	    _M_manager = nullptr;
	    _M_invoker = nullptr;
d2401 1
a2401 1
#if __cpp_rtti
d2430 1
a2430 1
      using _Invoker_type = _Res (*)(const _Any_data&, _ArgTypes&&...);
d2474 1
a2474 1
#if __cpp_rtti
@


1.1.1.6
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
@d1125 1
a1125 1
	= decltype( std::declval<_Functor&>()(
d1139 1
a1139 1
		       typename add_const<_Functor>::type&>::type>()(
d1153 1
a1153 1
                       typename add_volatile<_Functor>::type&>::type>()(
d1167 1
a1167 1
                       typename add_cv<_Functor>::type&>::type>()(
d1886 1
a1886 1
	return std::__callable_functor(**_Base::_M_get_pointer(__functor))(
d1901 1
a1901 1
	std::__callable_functor(**_Base::_M_get_pointer(__functor))(
d1980 3
a1982 3
      template<typename _Func,
	       typename _Res2 = typename result_of<_Func(_ArgTypes...)>::type>
	struct _Callable : __check_func_return_type<_Res2, _Res> { };
d1987 6
a1992 1
	struct _Callable<function, _Tp> : false_type { };
a2056 1
	       typename = _Requires<__not_<is_same<_Functor, function>>, void>,
d2249 1
a2249 1
    template<typename _Functor, typename, typename>
@


1.1.1.6.8.1
log
@Pull up the gcc 5.5 import and assorted fixes, requested by mrg in ticket #381:

external/gpl3/gcc/dist/fixincludes/tests/base/iso/stdlib_c99.h up to 1.1.1.1
external/gpl3/gcc/dist/gcc/config/arm/t-phoenix up to 1.1.1.1
external/gpl3/gcc/dist/gcc/config/phoenix.h     up to 1.1.1.1
external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-freebsd.h up to 1.1.1.1
external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64-freebsd up to 1.1.1.1
external/gpl3/gcc/dist/gcc/doc/gcov-dump.1      up to 1.1.1.1
external/gpl3/gcc/dist/gcc/doc/gcov-dump.texi   up to 1.1.1.1
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/lfts_config.h up to 1.1.1.1
external/gpl3/gcc/dist/gcc/config/i386/pcommitintrin.h delete
external/gpl3/gcc/dist/gcc/config/i386/stringop.opt delete
external/gpl3/gcc/lib/libgcc/Makefile.wrapper   delete
external/gpl3/gcc/dist/ChangeLog                up to 1.1.1.10
external/gpl3/gcc/dist/LAST_UPDATED             up to 1.9
external/gpl3/gcc/dist/MD5SUMS                  up to 1.9
external/gpl3/gcc/dist/NEWS                     up to 1.7
external/gpl3/gcc/dist/config.sub               up to 1.11
external/gpl3/gcc/dist/configure                up to 1.11
external/gpl3/gcc/dist/configure.ac             up to 1.10
external/gpl3/gcc/dist/INSTALL/binaries.html    up to 1.5
external/gpl3/gcc/dist/INSTALL/build.html       up to 1.6
external/gpl3/gcc/dist/INSTALL/configure.html   up to 1.6
external/gpl3/gcc/dist/INSTALL/download.html    up to 1.5
external/gpl3/gcc/dist/INSTALL/finalinstall.html up to 1.5
external/gpl3/gcc/dist/INSTALL/gfdl.html        up to 1.5
external/gpl3/gcc/dist/INSTALL/index.html       up to 1.5
external/gpl3/gcc/dist/INSTALL/old.html         up to 1.5
external/gpl3/gcc/dist/INSTALL/prerequisites.html up to 1.6
external/gpl3/gcc/dist/INSTALL/specific.html    up to 1.6
external/gpl3/gcc/dist/INSTALL/test.html        up to 1.5
external/gpl3/gcc/dist/config/ChangeLog         up to 1.1.1.10
external/gpl3/gcc/dist/contrib/ChangeLog        up to 1.1.1.10
external/gpl3/gcc/dist/contrib/gcc_update       up to 1.1.1.4
external/gpl3/gcc/dist/contrib/reghunt/ChangeLog up to 1.1.1.9
external/gpl3/gcc/dist/contrib/regression/ChangeLog up to 1.1.1.9
external/gpl3/gcc/dist/fixincludes/ChangeLog    up to 1.1.1.9
external/gpl3/gcc/dist/fixincludes/fixincl.x    up to 1.1.1.6
external/gpl3/gcc/dist/fixincludes/inclhack.def up to 1.1.1.6
external/gpl3/gcc/dist/fixincludes/tests/base/math.h up to 1.1.1.3
external/gpl3/gcc/dist/fixincludes/tests/base/stdio.h up to 1.1.1.5
external/gpl3/gcc/dist/fixincludes/tests/base/stdlib.h up to 1.1.1.3
external/gpl3/gcc/dist/fixincludes/tests/base/iso/stdio_iso.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/BASE-VER             up to 1.1.1.8
external/gpl3/gcc/dist/gcc/ChangeLog            up to 1.15
external/gpl3/gcc/dist/gcc/DATESTAMP            up to 1.1.1.11
external/gpl3/gcc/dist/gcc/Makefile.in          up to 1.14
external/gpl3/gcc/dist/gcc/asan.c               up to 1.1.1.3
external/gpl3/gcc/dist/gcc/auto-profile.c       up to 1.3
external/gpl3/gcc/dist/gcc/bb-reorder.c         up to 1.1.1.6
external/gpl3/gcc/dist/gcc/builtins.c           up to 1.10
external/gpl3/gcc/dist/gcc/calls.c              up to 1.1.1.6
external/gpl3/gcc/dist/gcc/cgraph.c             up to 1.1.1.5
external/gpl3/gcc/dist/gcc/cgraph.h             up to 1.1.1.5
external/gpl3/gcc/dist/gcc/cgraphclones.c       up to 1.1.1.4
external/gpl3/gcc/dist/gcc/cgraphunit.c         up to 1.1.1.6
external/gpl3/gcc/dist/gcc/combine.c            up to 1.1.1.8
external/gpl3/gcc/dist/gcc/common.opt           up to 1.6
external/gpl3/gcc/dist/gcc/config.gcc           up to 1.37
external/gpl3/gcc/dist/gcc/coverage.c           up to 1.1.1.4
external/gpl3/gcc/dist/gcc/coverage.h           up to 1.1.1.4
external/gpl3/gcc/dist/gcc/cselib.c             up to 1.1.1.5
external/gpl3/gcc/dist/gcc/data-streamer-in.c   up to 1.1.1.3
external/gpl3/gcc/dist/gcc/data-streamer-out.c  up to 1.1.1.3
external/gpl3/gcc/dist/gcc/diagnostic.c         up to 1.4
external/gpl3/gcc/dist/gcc/dwarf2out.c          up to 1.8
external/gpl3/gcc/dist/gcc/explow.c             up to 1.1.1.4
external/gpl3/gcc/dist/gcc/expmed.c             up to 1.1.1.4
external/gpl3/gcc/dist/gcc/expr.c               up to 1.10
external/gpl3/gcc/dist/gcc/fold-const.c         up to 1.1.1.11
external/gpl3/gcc/dist/gcc/function.c           up to 1.1.1.7
external/gpl3/gcc/dist/gcc/function.h           up to 1.1.1.4
external/gpl3/gcc/dist/gcc/fwprop.c             up to 1.1.1.5
external/gpl3/gcc/dist/gcc/gcc.c                up to 1.15
external/gpl3/gcc/dist/gcc/gcov-dump.c          up to 1.1.1.5
external/gpl3/gcc/dist/gcc/gcov-io.c            up to 1.1.1.4
external/gpl3/gcc/dist/gcc/gcov-tool.c          up to 1.1.1.2
external/gpl3/gcc/dist/gcc/gcov.c               up to 1.1.1.5
external/gpl3/gcc/dist/gcc/gcse.c               up to 1.1.1.5
external/gpl3/gcc/dist/gcc/gengtype-lex.c       up to 1.7
external/gpl3/gcc/dist/gcc/genmatch.c           up to 1.1.1.2
external/gpl3/gcc/dist/gcc/gimple-fold.c        up to 1.1.1.5
external/gpl3/gcc/dist/gcc/gimple-ssa-strength-reduction.c up to 1.1.1.5
external/gpl3/gcc/dist/gcc/gimplify.c           up to 1.1.1.7
external/gpl3/gcc/dist/gcc/graphite-isl-ast-to-gimple.c up to 1.3
external/gpl3/gcc/dist/gcc/incpath.c            up to 1.1.1.4
external/gpl3/gcc/dist/gcc/internal-fn.c        up to 1.1.1.3
external/gpl3/gcc/dist/gcc/ipa-comdats.c        up to 1.1.1.2
external/gpl3/gcc/dist/gcc/ipa-cp.c             up to 1.1.1.8
external/gpl3/gcc/dist/gcc/ipa-devirt.c         up to 1.1.1.3
external/gpl3/gcc/dist/gcc/ipa-icf-gimple.c     up to 1.1.1.2
external/gpl3/gcc/dist/gcc/ipa-icf-gimple.h     up to 1.1.1.2
external/gpl3/gcc/dist/gcc/ipa-icf.c            up to 1.1.1.3
external/gpl3/gcc/dist/gcc/ipa-icf.h            up to 1.1.1.2
external/gpl3/gcc/dist/gcc/ipa-inline-transform.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/ipa-polymorphic-call.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/ipa-prop.c           up to 1.1.1.7
external/gpl3/gcc/dist/gcc/ipa-pure-const.c     up to 1.1.1.5
external/gpl3/gcc/dist/gcc/ipa-split.c          up to 1.1.1.4
external/gpl3/gcc/dist/gcc/ipa-visibility.c     up to 1.1.1.2
external/gpl3/gcc/dist/gcc/ira-build.c          up to 1.1.1.4
external/gpl3/gcc/dist/gcc/ira-costs.c          up to 1.1.1.4
external/gpl3/gcc/dist/gcc/ira-int.h            up to 1.1.1.4
external/gpl3/gcc/dist/gcc/ira-lives.c          up to 1.1.1.4
external/gpl3/gcc/dist/gcc/loop-doloop.c        up to 1.1.1.5
external/gpl3/gcc/dist/gcc/loop-invariant.c     up to 1.1.1.4
external/gpl3/gcc/dist/gcc/lra-constraints.c    up to 1.1.1.5
external/gpl3/gcc/dist/gcc/lra-remat.c          up to 1.1.1.3
external/gpl3/gcc/dist/gcc/lto-cgraph.c         up to 1.1.1.4
external/gpl3/gcc/dist/gcc/lto-streamer.h       up to 1.1.1.5
external/gpl3/gcc/dist/gcc/match.pd             up to 1.1.1.3
external/gpl3/gcc/dist/gcc/omp-low.c            up to 1.1.1.8
external/gpl3/gcc/dist/gcc/params.def           up to 1.1.1.5
external/gpl3/gcc/dist/gcc/postreload.c         up to 1.1.1.5
external/gpl3/gcc/dist/gcc/pretty-print.c       up to 1.1.1.4
external/gpl3/gcc/dist/gcc/real.c               up to 1.1.1.5
external/gpl3/gcc/dist/gcc/ree.c                up to 1.1.1.4
external/gpl3/gcc/dist/gcc/rtl.h                up to 1.1.1.6
external/gpl3/gcc/dist/gcc/sel-sched.c          up to 1.1.1.6
external/gpl3/gcc/dist/gcc/simplify-rtx.c       up to 1.1.1.4
external/gpl3/gcc/dist/gcc/system.h             up to 1.6
external/gpl3/gcc/dist/gcc/toplev.c             up to 1.2
external/gpl3/gcc/dist/gcc/tree-call-cdce.c     up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-cfg.c           up to 1.8
external/gpl3/gcc/dist/gcc/tree-chkp-opt.c      up to 1.1.1.2
external/gpl3/gcc/dist/gcc/tree-chkp.c          up to 1.1.1.2
external/gpl3/gcc/dist/gcc/tree-chrec.c         up to 1.1.1.5
external/gpl3/gcc/dist/gcc/tree-data-ref.c      up to 1.1.1.7
external/gpl3/gcc/dist/gcc/tree-eh.c            up to 1.1.1.7
external/gpl3/gcc/dist/gcc/tree-inline.c        up to 1.1.1.7
external/gpl3/gcc/dist/gcc/tree-inline.h        up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-loop-distribution.c up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-nested.c        up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-predcom.c       up to 1.1.1.5
external/gpl3/gcc/dist/gcc/tree-profile.c       up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-ssa-ccp.c       up to 1.8
external/gpl3/gcc/dist/gcc/tree-ssa-loop-im.c   up to 1.1.1.5
external/gpl3/gcc/dist/gcc/tree-ssa-loop-ivopts.c up to 1.1.1.5
external/gpl3/gcc/dist/gcc/tree-ssa-loop-prefetch.c up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-ssa-math-opts.c up to 1.1.1.7
external/gpl3/gcc/dist/gcc/tree-ssa-pre.c       up to 1.1.1.5
external/gpl3/gcc/dist/gcc/tree-ssa-reassoc.c   up to 1.1.1.7
external/gpl3/gcc/dist/gcc/tree-ssa-sccvn.c     up to 1.1.1.7
external/gpl3/gcc/dist/gcc/tree-ssa-strlen.c    up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-ssa-structalias.c up to 1.1.1.6
external/gpl3/gcc/dist/gcc/tree-ssa-tail-merge.c up to 1.1.1.6
external/gpl3/gcc/dist/gcc/tree-ssa-threadedge.c up to 1.1.1.4
external/gpl3/gcc/dist/gcc/tree-ssa-uninit.c    up to 1.1.1.5
external/gpl3/gcc/dist/gcc/tree-ssa.c           up to 1.1.1.5
external/gpl3/gcc/dist/gcc/tree-vect-data-refs.c up to 1.1.1.9
external/gpl3/gcc/dist/gcc/tree-vect-loop-manip.c up to 1.1.1.5
external/gpl3/gcc/dist/gcc/tree-vrp.c           up to 1.1.1.7
external/gpl3/gcc/dist/gcc/tsan.c               up to 1.1.1.4
external/gpl3/gcc/dist/gcc/ubsan.c              up to 1.1.1.3
external/gpl3/gcc/dist/gcc/value-prof.c         up to 1.1.1.4
external/gpl3/gcc/dist/gcc/c/ChangeLog          up to 1.1.1.8
external/gpl3/gcc/dist/gcc/c/c-decl.c           up to 1.1.1.5
external/gpl3/gcc/dist/gcc/c/c-objc-common.c    up to 1.1.1.3
external/gpl3/gcc/dist/gcc/c/c-parser.c         up to 1.1.1.5
external/gpl3/gcc/dist/gcc/c/c-typeck.c         up to 1.1.1.7
external/gpl3/gcc/dist/gcc/c-family/ChangeLog   up to 1.1.1.7
external/gpl3/gcc/dist/gcc/c-family/c-ada-spec.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/c-family/c-common.c  up to 1.1.1.6
external/gpl3/gcc/dist/gcc/c-family/c-cppbuiltin.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/c-family/c-gimplify.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/c-family/c-omp.c     up to 1.1.1.3
external/gpl3/gcc/dist/gcc/c-family/c-opts.c    up to 1.5
external/gpl3/gcc/dist/gcc/common/config/i386/i386-common.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-simd.md up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.c up to 1.1.1.8
external/gpl3/gcc/dist/gcc/config/aarch64/aarch64.md up to 1.1.1.6
external/gpl3/gcc/dist/gcc/config/arm/arm-builtins.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/arm/arm-protos.h up to 1.1.1.5
external/gpl3/gcc/dist/gcc/config/arm/arm.c     up to 1.4
external/gpl3/gcc/dist/gcc/config/arm/arm.h     up to 1.15
external/gpl3/gcc/dist/gcc/config/arm/arm.md    up to 1.12
external/gpl3/gcc/dist/gcc/config/arm/freebsd.h up to 1.4
external/gpl3/gcc/dist/gcc/config/arm/neon.md   up to 1.1.1.5
external/gpl3/gcc/dist/gcc/config/avr/avr.c     up to 1.1.1.7
external/gpl3/gcc/dist/gcc/config/avr/avr.md    up to 1.1.1.7
external/gpl3/gcc/dist/gcc/config/avr/avr.opt   up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/avr/gen-avr-mmcu-specs.c up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/avr/gen-avr-mmcu-texi.c up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/i386/avx2intrin.h up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/i386/avx512bwintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512dqintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512fintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512ifmaintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512ifmavlintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512pfintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512vbmiintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512vbmivlintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512vlbwintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512vldqintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/avx512vlintrin.h up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/i386/cpuid.h  up to 1.4
external/gpl3/gcc/dist/gcc/config/i386/driver-i386.c up to 1.7
external/gpl3/gcc/dist/gcc/config/i386/gmm_malloc.h up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/i386/i386-builtin-types.def up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/i386/i386-c.c up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/i386/i386.c   up to 1.14
external/gpl3/gcc/dist/gcc/config/i386/i386.h   up to 1.6
external/gpl3/gcc/dist/gcc/config/i386/i386.md  up to 1.1.1.9
external/gpl3/gcc/dist/gcc/config/i386/i386.opt up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/i386/ia32intrin.h up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/i386/lwpintrin.h up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/i386/mmx.md   up to 1.1.1.5
external/gpl3/gcc/dist/gcc/config/i386/pmm_malloc.h up to 1.4
external/gpl3/gcc/dist/gcc/config/i386/rdseedintrin.h up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/i386/rtmintrin.h up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/i386/sse.md   up to 1.1.1.8
external/gpl3/gcc/dist/gcc/config/i386/x86-64.h up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/i386/x86intrin.h up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/nds32/nds32.md up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/pa/pa-64.h    up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/pa/pa.h       up to 1.7
external/gpl3/gcc/dist/gcc/config/rl78/rl78-expand.md up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/rl78/rl78-real.md up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/rl78/rl78-virt.md up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/rs6000/altivec.md up to 1.1.1.9
external/gpl3/gcc/dist/gcc/config/rs6000/dfp.md up to 1.1.1.5
external/gpl3/gcc/dist/gcc/config/rs6000/predicates.md up to 1.1.1.7
external/gpl3/gcc/dist/gcc/config/rs6000/rs6000-c.c up to 1.1.1.8
external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c up to 1.17
external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.md up to 1.1.1.9
external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.opt up to 1.1.1.6
external/gpl3/gcc/dist/gcc/config/rs6000/vector.md up to 1.1.1.6
external/gpl3/gcc/dist/gcc/config/rs6000/vsx.md up to 1.1.1.10
external/gpl3/gcc/dist/gcc/config/s390/s390-modes.def up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/s390/s390.c   up to 1.1.1.8
external/gpl3/gcc/dist/gcc/config/s390/s390.md  up to 1.1.1.6
external/gpl3/gcc/dist/gcc/config/s390/vx-builtins.md up to 1.1.1.3
external/gpl3/gcc/dist/gcc/config/sh/sh-mem.cc  up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/sh/sh.c       up to 1.9
external/gpl3/gcc/dist/gcc/config/sh/sh_treg_combine.cc up to 1.1.1.2
external/gpl3/gcc/dist/gcc/config/sparc/sparc.c up to 1.1.1.8
external/gpl3/gcc/dist/gcc/config/sparc/sparc.md up to 1.7
external/gpl3/gcc/dist/gcc/config/xtensa/xtensa.c up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/xtensa/xtensa.h up to 1.1.1.4
external/gpl3/gcc/dist/gcc/config/xtensa/xtensa.md up to 1.1.1.4
external/gpl3/gcc/dist/gcc/cp/ChangeLog         up to 1.1.1.11
external/gpl3/gcc/dist/gcc/cp/call.c            up to 1.1.1.8
external/gpl3/gcc/dist/gcc/cp/class.c           up to 1.1.1.6
external/gpl3/gcc/dist/gcc/cp/constexpr.c       up to 1.1.1.3
external/gpl3/gcc/dist/gcc/cp/cp-gimplify.c     up to 1.1.1.4
external/gpl3/gcc/dist/gcc/cp/decl.c            up to 1.1.1.8
external/gpl3/gcc/dist/gcc/cp/error.c           up to 1.1.1.4
external/gpl3/gcc/dist/gcc/cp/init.c            up to 1.1.1.6
external/gpl3/gcc/dist/gcc/cp/mangle.c          up to 1.1.1.7
external/gpl3/gcc/dist/gcc/cp/name-lookup.c     up to 1.1.1.6
external/gpl3/gcc/dist/gcc/cp/parser.c          up to 1.1.1.10
external/gpl3/gcc/dist/gcc/cp/pt.c              up to 1.1.1.8
external/gpl3/gcc/dist/gcc/cp/semantics.c       up to 1.1.1.9
external/gpl3/gcc/dist/gcc/cp/tree.c            up to 1.1.1.7
external/gpl3/gcc/dist/gcc/cp/typeck.c          up to 1.1.1.9
external/gpl3/gcc/dist/gcc/doc/aot-compile.1    up to 1.7
external/gpl3/gcc/dist/gcc/doc/cppinternals.info up to 1.7
external/gpl3/gcc/dist/gcc/doc/extend.texi      up to 1.1.1.8
external/gpl3/gcc/dist/gcc/doc/fsf-funding.7    up to 1.7
external/gpl3/gcc/dist/gcc/doc/gc-analyze.1     up to 1.7
external/gpl3/gcc/dist/gcc/doc/gcc.texi         up to 1.1.1.5
external/gpl3/gcc/dist/gcc/doc/gccinstall.info  up to 1.7
external/gpl3/gcc/dist/gcc/doc/gccint.info      up to 1.7
external/gpl3/gcc/dist/gcc/doc/gcj-dbtool.1     up to 1.7
external/gpl3/gcc/dist/gcc/doc/gcj.1            up to 1.7
external/gpl3/gcc/dist/gcc/doc/gcj.info         up to 1.7
external/gpl3/gcc/dist/gcc/doc/gcov-tool.1      up to 1.1.1.3
external/gpl3/gcc/dist/gcc/doc/gcov-tool.texi   up to 1.1.1.2
external/gpl3/gcc/dist/gcc/doc/gcov.texi        up to 1.6
external/gpl3/gcc/dist/gcc/doc/generic.texi     up to 1.1.1.4
external/gpl3/gcc/dist/gcc/doc/gfdl.7           up to 1.7
external/gpl3/gcc/dist/gcc/doc/gfortran.1       up to 1.7
external/gpl3/gcc/dist/gcc/doc/gij.1            up to 1.7
external/gpl3/gcc/dist/gcc/doc/gpl.7            up to 1.7
external/gpl3/gcc/dist/gcc/doc/grmic.1          up to 1.7
external/gpl3/gcc/dist/gcc/doc/install.texi     up to 1.1.1.8
external/gpl3/gcc/dist/gcc/doc/invoke.texi      up to 1.12
external/gpl3/gcc/dist/gcc/doc/jcf-dump.1       up to 1.7
external/gpl3/gcc/dist/gcc/doc/jv-convert.1     up to 1.7
external/gpl3/gcc/dist/gcc/doc/lto.texi         up to 1.1.1.3
external/gpl3/gcc/dist/gcc/doc/passes.texi      up to 1.1.1.4
external/gpl3/gcc/dist/gcc/doc/rebuild-gcj-db.1 up to 1.7
external/gpl3/gcc/dist/gcc/doc/rtl.texi         up to 1.1.1.4
external/gpl3/gcc/dist/gcc/jit/ChangeLog        up to 1.1.1.3
external/gpl3/gcc/dist/gcc/lto/ChangeLog        up to 1.1.1.9
external/gpl3/gcc/dist/gcc/lto/lto-lang.c       up to 1.1.1.4
external/gpl3/gcc/dist/gcc/objc/ChangeLog       up to 1.1.1.9
external/gpl3/gcc/dist/gcc/objcp/ChangeLog      up to 1.1.1.9
external/gpl3/gcc/dist/gnattools/ChangeLog      up to 1.1.1.7
external/gpl3/gcc/dist/gotools/ChangeLog        up to 1.1.1.3
external/gpl3/gcc/dist/include/ChangeLog        up to 1.1.1.9
external/gpl3/gcc/dist/intl/ChangeLog           up to 1.1.1.9
external/gpl3/gcc/dist/libbacktrace/ChangeLog   up to 1.1.1.8
external/gpl3/gcc/dist/libcc1/ChangeLog         up to 1.1.1.3
external/gpl3/gcc/dist/libcpp/ChangeLog         up to 1.1.1.9
external/gpl3/gcc/dist/libcpp/line-map.c        up to 1.1.1.6
external/gpl3/gcc/dist/libdecnumber/ChangeLog   up to 1.1.1.9
external/gpl3/gcc/dist/libgcc/ChangeLog         up to 1.1.1.11
external/gpl3/gcc/dist/libgcc/config.host       up to 1.16
external/gpl3/gcc/dist/libgcc/libgcc2.c         up to 1.1.1.4
external/gpl3/gcc/dist/libgcc/libgcov-driver.c  up to 1.1.1.2
external/gpl3/gcc/dist/libgcc/unwind-c.c        up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/aarch64/linux-unwind.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/alpha/linux-unwind.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/arm/unwind-arm.c up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/arm/unwind-arm.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/bfin/linux-unwind.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/i386/linux-unwind.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/libbid/ChangeLog up to 1.1.1.9
external/gpl3/gcc/dist/libgcc/config/m68k/linux-unwind.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/nios2/linux-unwind.h up to 1.1.1.2
external/gpl3/gcc/dist/libgcc/config/pa/linux-unwind.h up to 1.1.1.4
external/gpl3/gcc/dist/libgcc/config/rs6000/t-crtstuff up to 1.1.1.2
external/gpl3/gcc/dist/libgcc/config/sh/linux-unwind.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/sparc/lb1spc.S up to 1.1.1.2
external/gpl3/gcc/dist/libgcc/config/tilepro/linux-unwind.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/xtensa/ieee754-df.S up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/xtensa/ieee754-sf.S up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/xtensa/linux-unwind.h up to 1.1.1.3
external/gpl3/gcc/dist/libgcc/config/xtensa/t-elf up to 1.1.1.2
external/gpl3/gcc/dist/libgcc/config/xtensa/t-linux up to 1.1.1.2
external/gpl3/gcc/dist/libgcc/config/xtensa/t-windowed up to 1.1.1.2
external/gpl3/gcc/dist/libgcc/config/xtensa/unwind-dw2-xtensa.c up to 1.4
external/gpl3/gcc/dist/libgomp/ChangeLog        up to 1.1.1.9
external/gpl3/gcc/dist/libgomp/env.c            up to 1.1.1.4
external/gpl3/gcc/dist/libgomp/hashtab.h        up to 1.1.1.2
external/gpl3/gcc/dist/libgomp/libgomp.info     up to 1.7
external/gpl3/gcc/dist/libiberty/ChangeLog      up to 1.1.1.9
external/gpl3/gcc/dist/libiberty/cp-demangle.c  up to 1.1.1.5
external/gpl3/gcc/dist/libiberty/vprintf-support.c up to 1.2
external/gpl3/gcc/dist/libitm/ChangeLog         up to 1.1.1.7
external/gpl3/gcc/dist/libitm/libitm.info       up to 1.1.1.6
external/gpl3/gcc/dist/libobjc/ChangeLog        up to 1.1.1.10
external/gpl3/gcc/dist/libsanitizer/ChangeLog   up to 1.1.1.7
external/gpl3/gcc/dist/libsanitizer/asan/asan_globals.cc up to 1.1.1.3
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc up to 1.5
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc up to 1.9
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h up to 1.3
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc up to 1.6
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h up to 1.10
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_procmaps_netbsd.cc up to 1.3
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc up to 1.1.1.2
external/gpl3/gcc/dist/libsanitizer/tsan/tsan_platform_linux.cc up to 1.3
external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl.cc up to 1.1.1.3
external/gpl3/gcc/dist/libssp/ChangeLog         up to 1.1.1.9
external/gpl3/gcc/dist/libstdc++-v3/ChangeLog   up to 1.1.1.11
external/gpl3/gcc/dist/libstdc++-v3/acinclude.m4 up to 1.4
external/gpl3/gcc/dist/libstdc++-v3/config.h.in up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/configure   up to 1.8
external/gpl3/gcc/dist/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/config/io/basic_file_stdio.cc up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/config/os/mingw32-w64/error_constants.h up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/doc/doxygen/mainpage.html up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/doc/html/api.html up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/doc/html/faq.html up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/doc/html/ext/lwg-active.html up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/doc/html/ext/lwg-closed.html up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/doc/html/ext/lwg-defects.html up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/abi.html up to 1.1.1.6
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/bugs.html up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/ext_demangling.html up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/memory.html up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/mt_allocator_impl.html up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/source_code_style.html up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/source_organization.html up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/doc/html/manual/status.html up to 1.1.1.6
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/api.xml up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/faq.xml up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/abi.xml up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/allocator.xml up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/appendix_contributing.xml up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/extensions.xml up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/intro.xml up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/mt_allocator.xml up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/status_cxx2011.xml up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/doc/xml/manual/status_cxx2014.xml up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/Makefile.am up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/include/Makefile.in up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/include/bits/allocator.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/basic_ios.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/basic_string.h up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/include/bits/basic_string.tcc up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/c++config up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/include/bits/hashtable.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/ios_base.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/istream.tcc up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/list.tcc up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/locale_classes.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/locale_conv.h up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/bits/mask_array.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/predefined_ops.h up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/bits/regex.h up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/bits/regex.tcc up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/bits/regex_compiler.h up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/bits/shared_ptr_base.h up to 1.1.1.6
external/gpl3/gcc/dist/libstdc++-v3/include/bits/slice_array.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/sstream.tcc up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_iterator.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_map.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_multimap.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_multiset.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_set.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_stack.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/bits/stl_tree.h up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/include/bits/uniform_int_dist.h up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/bits/unique_ptr.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/c_global/cmath up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/include/debug/safe_iterator.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/debug/string up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/algorithm up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/any up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/chrono up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/fs_dir.h up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/fs_fwd.h up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/fs_ops.h up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/fs_path.h up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/functional up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/optional up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/ratio up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/string_view up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/string_view.tcc up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/system_error up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/tuple up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/include/experimental/type_traits up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/include/ext/new_allocator.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/ext/pointer.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/std/atomic up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/std/chrono up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/std/complex up to 1.5
external/gpl3/gcc/dist/libstdc++-v3/include/std/functional up to 1.1.1.7
external/gpl3/gcc/dist/libstdc++-v3/include/std/istream up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/include/std/scoped_allocator up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/std/sstream up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/std/thread up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/std/tuple up to 1.1.1.6
external/gpl3/gcc/dist/libstdc++-v3/include/std/utility up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/include/tr1/cmath up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/libsupc++/cxxabi.h up to 1.1.1.4
external/gpl3/gcc/dist/libstdc++-v3/python/libstdcxx/v6/printers.py up to 1.1.1.5
external/gpl3/gcc/dist/libstdc++-v3/python/libstdcxx/v6/xmethods.py up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/src/c++11/codecvt.cc up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/src/c++11/cxx11-shim_facets.cc up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/src/c++11/shared_ptr.cc up to 1.1.1.3
external/gpl3/gcc/dist/libstdc++-v3/src/filesystem/Makefile.in up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/src/filesystem/dir.cc up to 1.1.1.2
external/gpl3/gcc/dist/libstdc++-v3/src/filesystem/ops.cc up to 1.1.1.3
external/gpl3/gcc/dist/lto-plugin/ChangeLog     up to 1.1.1.9
external/gpl3/gcc/dist/lto-plugin/lto-plugin.c  up to 1.1.1.4
external/gpl3/gcc/dist/maintainer-scripts/ChangeLog up to 1.1.1.10
external/gpl3/gcc/lib/libasan/Makefile          up to 1.18
external/gpl3/gcc/lib/libgcc/arch/i386/defs.mk  up to 1.5
external/gpl3/gcc/lib/libgcc/arch/m68000/defs.mk up to 1.7
external/gpl3/gcc/lib/libgcc/arch/x86_64/defs.mk up to 1.4
external/gpl3/gcc/lib/libgcc/libgcc/Makefile    up to 1.28
external/gpl3/gcc/lib/libgcc/libgcov/arch/alpha/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/arm/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/armeb/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/earm/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmeb/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhf/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmhfeb/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv4eb/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6eb/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6hf/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv6hfeb/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7eb/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7hf/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/earmv7hfeb/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/hppa/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/i386/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/ia64/gcov-iov.h up to 1.5
external/gpl3/gcc/lib/libgcc/libgcov/arch/m68000/gcov-iov.h up to 1.9
external/gpl3/gcc/lib/libgcc/libgcov/arch/m68k/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/mips64eb/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/mips64el/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/mipseb/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/mipsel/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/powerpc64/gcov-iov.h up to 1.6
external/gpl3/gcc/lib/libgcc/libgcov/arch/sh3eb/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/sh3el/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/sparc/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/sparc64/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/vax/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libgcc/libgcov/arch/x86_64/gcov-iov.h up to 1.10
external/gpl3/gcc/lib/libiberty/defs.mk         up to 1.14
external/gpl3/gcc/lib/libiberty/arch/ia64/config.h up to 1.6
external/gpl3/gcc/lib/liblto_plugin/Makefile    up to 1.9
external/gpl3/gcc/lib/libstdc++-v3/Makefile     up to 1.28
external/gpl3/gcc/lib/libstdc++-v3/arch/alpha/c++config.h up to 1.21
external/gpl3/gcc/lib/libstdc++-v3/arch/alpha/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/alpha/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/arm/c++config.h up to 1.23
external/gpl3/gcc/lib/libstdc++-v3/arch/arm/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/arm/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/armeb/c++config.h up to 1.23
external/gpl3/gcc/lib/libstdc++-v3/arch/armeb/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/armeb/gstdint.h up to 1.15
external/gpl3/gcc/lib/libstdc++-v3/arch/coldfire/defs.mk up to 1.6
external/gpl3/gcc/lib/libstdc++-v3/arch/earm/c++config.h up to 1.21
external/gpl3/gcc/lib/libstdc++-v3/arch/earm/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earm/gstdint.h up to 1.15
external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb/c++config.h up to 1.19
external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb/defs.mk up to 1.6
external/gpl3/gcc/lib/libstdc++-v3/arch/earmeb/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf/c++config.h up to 1.19
external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf/defs.mk up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/earmhf/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb/c++config.h up to 1.17
external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmhfeb/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv4eb/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6eb/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6eb/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6eb/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hf/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hfeb/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hfeb/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv6hfeb/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7eb/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7eb/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7eb/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hf/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hf/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hf/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hfeb/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hfeb/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/earmv7hfeb/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/hppa/c++config.h up to 1.21
external/gpl3/gcc/lib/libstdc++-v3/arch/hppa/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/hppa/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/i386/c++config.h up to 1.22
external/gpl3/gcc/lib/libstdc++-v3/arch/i386/defs.mk up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/i386/gstdint.h up to 1.14
external/gpl3/gcc/lib/libstdc++-v3/arch/ia64/c++config.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/ia64/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/ia64/gstdint.h up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/m68000/c++config.h up to 1.16
external/gpl3/gcc/lib/libstdc++-v3/arch/m68000/defs.mk up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/m68000/gstdint.h up to 1.9
external/gpl3/gcc/lib/libstdc++-v3/arch/m68k/c++config.h up to 1.21
external/gpl3/gcc/lib/libstdc++-v3/arch/m68k/defs.mk up to 1.6
external/gpl3/gcc/lib/libstdc++-v3/arch/m68k/gstdint.h up to 1.12
external/gpl3/gcc/lib/libstdc++-v3/arch/mips64eb/c++config.h up to 1.21
external/gpl3/gcc/lib/libstdc++-v3/arch/mips64eb/defs.mk up to 1.6
external/gpl3/gcc/lib/libstdc++-v3/arch/mips64eb/gstdint.h up to 1.12
external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/c++config.h up to 1.20
external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/defs.mk up to 1.6
external/gpl3/gcc/lib/libstdc++-v3/arch/mips64el/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/mipseb/c++config.h up to 1.23
external/gpl3/gcc/lib/libstdc++-v3/arch/mipseb/defs.mk up to 1.6
external/gpl3/gcc/lib/libstdc++-v3/arch/mipseb/gstdint.h up to 1.12
external/gpl3/gcc/lib/libstdc++-v3/arch/mipsel/c++config.h up to 1.21
external/gpl3/gcc/lib/libstdc++-v3/arch/mipsel/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/mipsel/gstdint.h up to 1.12
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc/c++config.h up to 1.22
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/c++config.h up to 1.10
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/defs.mk up to 1.6
external/gpl3/gcc/lib/libstdc++-v3/arch/powerpc64/gstdint.h up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/c++config.h up to 1.21
external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/defs.mk up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/sh3eb/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/sh3el/c++config.h up to 1.23
external/gpl3/gcc/lib/libstdc++-v3/arch/sh3el/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/sh3el/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/sparc/c++config.h up to 1.22
external/gpl3/gcc/lib/libstdc++-v3/arch/sparc/defs.mk up to 1.5
external/gpl3/gcc/lib/libstdc++-v3/arch/sparc/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/sparc64/c++config.h up to 1.21
external/gpl3/gcc/lib/libstdc++-v3/arch/sparc64/defs.mk up to 1.6
external/gpl3/gcc/lib/libstdc++-v3/arch/sparc64/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/vax/c++config.h up to 1.23
external/gpl3/gcc/lib/libstdc++-v3/arch/vax/defs.mk up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/vax/gstdint.h up to 1.13
external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/c++config.h up to 1.25
external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/defs.mk up to 1.7
external/gpl3/gcc/lib/libstdc++-v3/arch/x86_64/gstdint.h up to 1.15
external/gpl3/gcc/lib/libstdc++-v3/include/bits/Makefile up to 1.19
external/gpl3/gcc/lib/libubsan/Makefile         up to 1.3
external/gpl3/gcc/usr.bin/Makefile.backend      up to 1.6
external/gpl3/gcc/usr.bin/Makefile.inc          up to 1.29
external/gpl3/gcc/usr.bin/backend/Makefile      up to 1.39
external/gpl3/gcc/usr.bin/common/Makefile       up to 1.5
external/gpl3/gcc/usr.bin/frontend/Makefile     up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/alpha/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/alpha/configargs.h up to 1.23
external/gpl3/gcc/usr.bin/gcc/arch/alpha/defs.mk up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/alpha/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/arm/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/arm/configargs.h up to 1.26
external/gpl3/gcc/usr.bin/gcc/arch/arm/defs.mk  up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/arm/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/armeb/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/armeb/configargs.h up to 1.27
external/gpl3/gcc/usr.bin/gcc/arch/armeb/defs.mk up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/armeb/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/earm/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/earm/configargs.h up to 1.24
external/gpl3/gcc/usr.bin/gcc/arch/earm/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/earm/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/earmeb/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmeb/configargs.h up to 1.20
external/gpl3/gcc/usr.bin/gcc/arch/earmeb/defs.mk up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmeb/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmhf/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmhf/configargs.h up to 1.21
external/gpl3/gcc/usr.bin/gcc/arch/earmhf/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/earmhf/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmhfeb/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmhfeb/configargs.h up to 1.19
external/gpl3/gcc/usr.bin/gcc/arch/earmhfeb/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmhfeb/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv4/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv4/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv4/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv4/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv4eb/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv4eb/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv4eb/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv4eb/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv6/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv6/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv6/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv6/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv6eb/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv6eb/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv6eb/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv6eb/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hf/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hf/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hf/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hf/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hfeb/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hfeb/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hfeb/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv6hfeb/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv7/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv7/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv7/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv7/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv7eb/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv7eb/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv7eb/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv7eb/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hf/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hf/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hf/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hf/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hfeb/bversion.h up to 1.7
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hfeb/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hfeb/defs.mk up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/earmv7hfeb/plugin-version.h up to 1.10
external/gpl3/gcc/usr.bin/gcc/arch/hppa/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/hppa/configargs.h up to 1.24
external/gpl3/gcc/usr.bin/gcc/arch/hppa/defs.mk up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/hppa/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/i386/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/i386/configargs.h up to 1.31
external/gpl3/gcc/usr.bin/gcc/arch/i386/defs.mk up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/i386/i386-builtin-types.inc up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/i386/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/ia64/auto-host.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/ia64/bversion.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/ia64/configargs.h up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/ia64/defs.mk up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/ia64/plugin-version.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/m68000/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/m68000/configargs.h up to 1.18
external/gpl3/gcc/usr.bin/gcc/arch/m68000/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/m68000/plugin-version.h up to 1.9
external/gpl3/gcc/usr.bin/gcc/arch/m68k/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/m68k/configargs.h up to 1.21
external/gpl3/gcc/usr.bin/gcc/arch/m68k/defs.mk up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/m68k/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/mips64eb/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/mips64eb/configargs.h up to 1.22
external/gpl3/gcc/usr.bin/gcc/arch/mips64eb/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/mips64eb/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/mips64el/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/mips64el/configargs.h up to 1.23
external/gpl3/gcc/usr.bin/gcc/arch/mips64el/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/mips64el/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/mipseb/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/mipseb/configargs.h up to 1.22
external/gpl3/gcc/usr.bin/gcc/arch/mipseb/defs.mk up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/mipseb/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/mipsel/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/mipsel/configargs.h up to 1.23
external/gpl3/gcc/usr.bin/gcc/arch/mipsel/defs.mk up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/mipsel/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/powerpc/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/powerpc/configargs.h up to 1.28
external/gpl3/gcc/usr.bin/gcc/arch/powerpc/defs.mk up to 1.13
external/gpl3/gcc/usr.bin/gcc/arch/powerpc/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/bversion.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/configargs.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/defs.mk up to 1.6
external/gpl3/gcc/usr.bin/gcc/arch/powerpc64/plugin-version.h up to 1.5
external/gpl3/gcc/usr.bin/gcc/arch/sh3eb/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/sh3eb/configargs.h up to 1.24
external/gpl3/gcc/usr.bin/gcc/arch/sh3eb/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/sh3eb/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/sh3el/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/sh3el/configargs.h up to 1.26
external/gpl3/gcc/usr.bin/gcc/arch/sh3el/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/sh3el/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/sparc/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/sparc/configargs.h up to 1.26
external/gpl3/gcc/usr.bin/gcc/arch/sparc/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/sparc/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/sparc64/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/sparc64/configargs.h up to 1.26
external/gpl3/gcc/usr.bin/gcc/arch/sparc64/defs.mk up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/sparc64/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/vax/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/vax/configargs.h up to 1.24
external/gpl3/gcc/usr.bin/gcc/arch/vax/defs.mk  up to 1.12
external/gpl3/gcc/usr.bin/gcc/arch/vax/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/gcc/arch/x86_64/bversion.h up to 1.8
external/gpl3/gcc/usr.bin/gcc/arch/x86_64/configargs.h up to 1.33
external/gpl3/gcc/usr.bin/gcc/arch/x86_64/defs.mk up to 1.13
external/gpl3/gcc/usr.bin/gcc/arch/x86_64/i386-builtin-types.inc up to 1.4
external/gpl3/gcc/usr.bin/gcc/arch/x86_64/plugin-version.h up to 1.11
external/gpl3/gcc/usr.bin/include/arch/i386.mk  up to 1.3
external/gpl3/gcc/usr.bin/include/arch/x86_64.mk up to 1.3
external/gpl3/gcc/usr.bin/libcpp/arch/ia64/config.h up to 1.4
distrib/sets/lists/comp/md.amd64				1.252
distrib/sets/lists/comp/md.i386					1.175
distrib/sets/lists/comp/shl.mi					1.309
distrib/sets/lists/debug/shl.mi					1.187
external/gpl3/gcc/lib/liblto_plugin/Makefile			1.6
lib/libc/stdlib/jemalloc.c					1.43

Update gcc to gcc 5.5.
Bump lib minor for liblto_plugin.so link with -liberty.
The HPPA architectures (1.1 and 2.0) both define quadruple-word
(128-bit) floating point types.  Adjust alignment to match.
@
text
@d451 1
a451 1
  /// std::ref overload to prevent wrapping a reference_wrapper
d455 1
a455 1
    { return std::ref(__t.get()); }
d457 1
a457 1
  /// std::cref overload to prevent wrapping a reference_wrapper
d461 1
a461 1
    { return std::cref(__t.get()); }
d1596 1
a1596 1
  union [[gnu::may_alias]] _Any_data
d1702 1
a1702 1
	  ::new (__dest._M_access()) _Functor(__source._M_access<_Functor>());
d1767 2
a1768 2
	  _M_not_empty_function(_Tp* __fp)
	  { return __fp != nullptr; }
d1772 2
a1773 2
	  _M_not_empty_function(_Tp _Class::* __mp)
	  { return __mp != nullptr; }
d1783 1
a1783 1
	{ ::new (__functor._M_access()) _Functor(std::move(__f)); }
d1981 1
a1981 1
	       typename _Res2 = typename result_of<_Func&(_ArgTypes...)>::type>
d2028 1
a2028 1
      function(function&& __x) noexcept : _Function_base()
d2087 1
a2087 1
      operator=(function&& __x) noexcept
d2154 1
a2154 1
      void swap(function& __x) noexcept
a2366 2
  // _GLIBCXX_RESOLVE_LIB_DEFECTS
  // 2062. Effect contradictions w/o no-throw guarantee of std::function swaps
d2369 1
a2369 1
    swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) noexcept
@


1.1.1.7
log
@initial import of GCC 5.5.0.  this fixes a very large number of PRs.
280 are listed here:
    https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=5.5
and this list is likely not complete, and not reproduced here.  the
only specific change in functionality is removal of x86 "pcommit"
instruction (which was apparently never implemented.)
@
text
@d451 1
a451 1
  /// std::ref overload to prevent wrapping a reference_wrapper
d455 1
a455 1
    { return std::ref(__t.get()); }
d457 1
a457 1
  /// std::cref overload to prevent wrapping a reference_wrapper
d461 1
a461 1
    { return std::cref(__t.get()); }
d1596 1
a1596 1
  union [[gnu::may_alias]] _Any_data
d1702 1
a1702 1
	  ::new (__dest._M_access()) _Functor(__source._M_access<_Functor>());
d1767 2
a1768 2
	  _M_not_empty_function(_Tp* __fp)
	  { return __fp != nullptr; }
d1772 2
a1773 2
	  _M_not_empty_function(_Tp _Class::* __mp)
	  { return __mp != nullptr; }
d1783 1
a1783 1
	{ ::new (__functor._M_access()) _Functor(std::move(__f)); }
d1981 1
a1981 1
	       typename _Res2 = typename result_of<_Func&(_ArgTypes...)>::type>
d2028 1
a2028 1
      function(function&& __x) noexcept : _Function_base()
d2087 1
a2087 1
      operator=(function&& __x) noexcept
d2154 1
a2154 1
      void swap(function& __x) noexcept
a2366 2
  // _GLIBCXX_RESOLVE_LIB_DEFECTS
  // 2062. Effect contradictions w/o no-throw guarantee of std::function swaps
d2369 1
a2369 1
    swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) noexcept
@


1.1.1.8
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) 2001-2016 Free Software Foundation, Inc.
d187 13
a199 39
  template<typename _Tp, typename _Up = typename decay<_Tp>::type>
    struct __inv_unwrap
    {
      using type = _Tp;
    };

  template<typename _Tp, typename _Up>
    struct __inv_unwrap<_Tp, reference_wrapper<_Up>>
    {
      using type = _Up&;
    };

  // Used by __invoke_impl instead of std::forward<_Tp> so that a
  // reference_wrapper is converted to an lvalue-reference.
  template<typename _Tp, typename _Up = typename __inv_unwrap<_Tp>::type>
    inline _Up&&
    __invfwd(typename remove_reference<_Tp>::type& __t) noexcept
    { return static_cast<_Up&&>(__t); }

  template<typename _Res, typename _Fn, typename... _Args>
    inline _Res
    __invoke_impl(__invoke_other, _Fn&& __f, _Args&&... __args)
    noexcept(noexcept(std::forward<_Fn>(__f)(std::forward<_Args>(__args)...)))
    { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); }

  template<typename _Res, typename _MemFun, typename _Tp, typename... _Args>
    inline _Res
    __invoke_impl(__invoke_memfun_ref, _MemFun&& __f, _Tp&& __t,
		  _Args&&... __args)
    noexcept(noexcept(
	  (__invfwd<_Tp>(__t).*__f)(std::forward<_Args>(__args)...)))
    { return (__invfwd<_Tp>(__t).*__f)(std::forward<_Args>(__args)...); }

  template<typename _Res, typename _MemFun, typename _Tp, typename... _Args>
    inline _Res
    __invoke_impl(__invoke_memfun_deref, _MemFun&& __f, _Tp&& __t,
		  _Args&&... __args)
    noexcept(noexcept(
	  ((*std::forward<_Tp>(__t)).*__f)(std::forward<_Args>(__args)...)))
d201 1
a201 1
      return ((*std::forward<_Tp>(__t)).*__f)(std::forward<_Args>(__args)...);
d204 9
a212 16
  template<typename _Res, typename _MemPtr, typename _Tp>
    inline _Res
    __invoke_impl(__invoke_memobj_ref, _MemPtr&& __f, _Tp&& __t)
    noexcept(noexcept(__invfwd<_Tp>(__t).*__f))
    { return __invfwd<_Tp>(__t).*__f; }

  template<typename _Res, typename _MemPtr, typename _Tp>
    inline _Res
    __invoke_impl(__invoke_memobj_deref, _MemPtr&& __f, _Tp&& __t)
    noexcept(noexcept((*std::forward<_Tp>(__t)).*__f))
    { return (*std::forward<_Tp>(__t)).*__f; }

  /// Invoke a callable object.
  template<typename _Callable, typename... _Args>
    inline typename result_of<_Callable&&(_Args&&...)>::type
    __invoke(_Callable&& __fn, _Args&&... __args)
d214 1
a214 5
      using __result_of = result_of<_Callable&&(_Args&&...)>;
      using __type = typename __result_of::type;
      using __tag = typename __result_of::__invoke_type;
      return std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn),
					std::forward<_Args>(__args)...);
d217 9
a225 7
#if __cplusplus > 201402L
# define __cpp_lib_invoke 201411

  /// Invoke a callable object.
  template<typename _Callable, typename... _Args>
    inline result_of_t<_Callable&&(_Args&&...)>
    invoke(_Callable&& __fn, _Args&&... __args)
d227 1
a227 2
      return std::__invoke(std::forward<_Callable>(__fn),
			   std::forward<_Args>(__args)...);
a228 1
#endif
d428 1
a428 1
	  return std::__invoke(get(), std::forward<_Args>(__args)...);
d507 2
d519 3
d528 3
d554 4
d564 7
a570 1
      _MemFunPtr _M_pmf;
d573 47
d621 9
a629 1
      using result_type = typename _Traits::__result_type;
d631 4
a634 2
      explicit constexpr
      _Mem_fn_base(_MemFunPtr __pmf) noexcept : _M_pmf(__pmf) { }
d636 1
a636 7
      template<typename... _Args>
	auto
	operator()(_Args&&... __args) const
	noexcept(noexcept(
	      std::__invoke(_M_pmf, std::forward<_Args>(__args)...)))
	-> decltype(std::__invoke(_M_pmf, std::forward<_Args>(__args)...))
	{ return std::__invoke(_M_pmf, std::forward<_Args>(__args)...); }
d640 2
a641 2
  template<typename _MemObjPtr>
    class _Mem_fn_base<_MemObjPtr, false>
d643 24
d673 29
a701 1
      _MemObjPtr _M_pm;
d703 8
a710 3
    public:
      explicit constexpr
      _Mem_fn_base(_MemObjPtr __pm) noexcept : _M_pm(__pm) { }
d712 1
a712 1
      template<typename _Tp>
d714 7
a720 4
	operator()(_Tp&& __obj) const
	noexcept(noexcept(std::__invoke(_M_pm, std::forward<_Tp>(__obj))))
	-> decltype(std::__invoke(_M_pm, std::forward<_Tp>(__obj)))
	{ return std::__invoke(_M_pm, std::forward<_Tp>(__obj)); }
d745 1
a745 1
   *  @@brief Determines if the given type _Tp is a function object that
d747 1
a747 3
   *  function objects returned by bind().
   *
   *  C++11 [func.bind.isbind].
d756 1
a756 3
   *  bind() expression and, if so, which placeholder it is.
   *
   *  C++11 [func.bind.isplace].
d831 25
d857 4
a860 1
  // Like tuple_element_t but SFINAE-friendly.
d862 4
a865 3
   using _Safe_tuple_element_t
     = typename enable_if<(__i < tuple_size<_Tuple>::value),
			  tuple_element<__i, _Tuple>>::type::type;
d869 1
a869 1
   *  function object [func.bind.bind]/10. Only the first parameter should
d885 1
a885 2
   *  underlying reference.
   *  C++11 [func.bind.bind] p10 bullet 1.
d891 2
d898 1
a898 1
	_Tp&
d906 1
a906 2
   *  pass along all of our arguments (unwrapped).
   *  C++11 [func.bind.bind] p10 bullet 2.
d940 1
a940 1
   *  C++11 [func.bind.bind] p10 bullet 3.
d946 16
d963 1
a963 1
	_Safe_tuple_element_t<(is_placeholder<_Arg>::value - 1), _Tuple>&&
d966 1
a966 3
	  using __type
	    = __tuple_element_t<(is_placeholder<_Arg>::value - 1), _Tuple>;
	  return std::forward<__type>(
d973 2
a974 2
   *  value. The cv-qualifiers on the reference are determined by the caller.
   *  C++11 [func.bind.bind] p10 bullet 4.
d980 9
d1005 1
a1005 1
      static constexpr const _Tp&
d1009 1
a1009 1
      static constexpr _Tp&&
d1024 1
a1024 1
      static constexpr type
d1965 1
a1965 1
      = __or_<is_void<_To>, is_same<_From, _To>, is_convertible<_From, _To>>;
d2028 1
a2028 1
      function(function&& __x) : _Function_base()
d2087 1
a2087 1
      operator=(function&& __x)
@


1.1.1.8.4.1
log
@Sync with HEAD
@
text
@d3 1
a3 1
// Copyright (C) 2001-2017 Free Software Foundation, Inc.
d53 1
d57 1
a58 9
#include <bits/invoke.h>
#include <bits/std_function.h>
#if __cplusplus > 201402L
# include <unordered_map>
# include <vector>
# include <array>
# include <utility>
# include <bits/stl_algo.h>
#endif
d64 190
d259 1
a259 1
    inline invoke_result_t<_Callable, _Args...>
a260 1
    noexcept(is_nothrow_invocable_v<_Callable, _Args...>)
d267 235
d519 18
a572 6
#if __cplusplus > 201402L
_GLIBCXX_MEM_FN_TRAITS(noexcept, true_type, true_type)
_GLIBCXX_MEM_FN_TRAITS(& noexcept, true_type, false_type)
_GLIBCXX_MEM_FN_TRAITS(&& noexcept, false_type, true_type)
#endif

a630 3
  template<typename _MemberPointer>
    struct _Mem_fn; // undefined

a675 7
#if __cplusplus > 201402L
  template <typename _Tp> inline constexpr bool is_bind_expression_v
    = is_bind_expression<_Tp>::value;
  template <typename _Tp> inline constexpr int is_placeholder_v
    = is_placeholder<_Tp>::value;
#endif // C++17

d745 4
a748 4
  template<std::size_t __i, typename _Tuple>
    using _Safe_tuple_element_t
      = typename enable_if<(__i < tuple_size<_Tuple>::value),
			   tuple_element<__i, _Tuple>>::type::type;
d816 1
a816 1
	  return __arg(std::get<_Indexes>(std::move(__tuple))...);
d833 4
a836 2
	  return
	    ::std::get<(is_placeholder<_Arg>::value - 1)>(std::move(__tuple));
d855 44
d921 1
d933 2
a934 3
	  return std::__invoke(_M_f,
	      _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)...
	      );
d942 2
a943 3
	  return std::__invoke(_M_f,
	      _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)...
	      );
d952 2
a953 3
	  return std::__invoke(_M_f,
	      _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)...
	      );
d962 3
a964 26
	  return std::__invoke(_M_f,
	      _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)...
	      );
	}

      template<typename _BoundArg, typename _CallArgs>
	using _Mu_type = decltype(
	    _Mu<typename remove_cv<_BoundArg>::type>()(
	      std::declval<_BoundArg&>(), std::declval<_CallArgs&>()) );

      template<typename _Fn, typename _CallArgs, typename... _BArgs>
	using _Res_type_impl
	  = typename result_of< _Fn&(_Mu_type<_BArgs, _CallArgs>&&...) >::type;

      template<typename _CallArgs>
	using _Res_type = _Res_type_impl<_Functor, _CallArgs, _Bound_args...>;

      template<typename _CallArgs>
	using __dependent = typename
	  enable_if<bool(tuple_size<_CallArgs>::value+1), _Functor>::type;

      template<typename _CallArgs, template<class> class __cv_quals>
	using _Res_type_cv = _Res_type_impl<
	  typename __cv_quals<__dependent<_CallArgs>>::type,
	  _CallArgs,
	  typename __cv_quals<_Bound_args>::type...>;
d984 4
a987 2
      template<typename... _Args,
	       typename _Result = _Res_type<tuple<_Args...>>>
d997 5
a1001 2
      template<typename... _Args,
	       typename _Result = _Res_type_cv<tuple<_Args...>, add_const>>
a1009 6
#if __cplusplus > 201402L
# define _GLIBCXX_DEPR_BIND \
      [[deprecated("std::bind does not support volatile in C++17")]]
#else
# define _GLIBCXX_DEPR_BIND
#endif
d1011 5
a1015 3
      template<typename... _Args,
	       typename _Result = _Res_type_cv<tuple<_Args...>, add_volatile>>
	_GLIBCXX_DEPR_BIND
d1025 5
a1029 3
      template<typename... _Args,
	       typename _Result = _Res_type_cv<tuple<_Args...>, add_cv>>
	_GLIBCXX_DEPR_BIND
d1046 1
d1055 1
a1055 3
	using __enable_if_void
	  = typename enable_if<is_void<_Res>{}>::type;

d1057 1
a1057 2
	using __disable_if_void
	  = typename enable_if<!is_void<_Res>{}, _Result>::type;
d1061 3
a1063 2
	__disable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>)
d1065 1
a1065 1
	  return std::__invoke(_M_f, _Mu<_Bound_args>()
d1071 3
a1073 2
	__enable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>)
d1075 1
a1075 1
	  std::__invoke(_M_f, _Mu<_Bound_args>()
d1081 3
a1083 2
	__disable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const
d1085 1
a1085 1
	  return std::__invoke(_M_f, _Mu<_Bound_args>()
d1091 3
a1093 2
	__enable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const
d1095 1
a1095 1
	  std::__invoke(_M_f, _Mu<_Bound_args>()
d1101 3
a1103 2
	__disable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile
d1105 1
a1105 1
	  return std::__invoke(_M_f, _Mu<_Bound_args>()
d1111 3
a1113 2
	__enable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile
d1115 1
a1115 1
	  std::__invoke(_M_f, _Mu<_Bound_args>()
d1121 3
a1123 3
	__disable_if_void<_Res>
	__call(tuple<_Args...>&& __args,
	       _Index_tuple<_Indexes...>) const volatile
d1125 1
a1125 1
	  return std::__invoke(_M_f, _Mu<_Bound_args>()
d1131 1
a1131 1
	__enable_if_void<_Res>
d1133 2
a1134 1
	       _Index_tuple<_Indexes...>) const volatile
d1136 1
a1136 1
	  std::__invoke(_M_f, _Mu<_Bound_args>()
a1180 1
	_GLIBCXX_DEPR_BIND
a1190 1
	_GLIBCXX_DEPR_BIND
a1198 1
#undef _GLIBCXX_DEPR_BIND
d1302 3
a1304 1
      typedef typename decay<_Func>::type __func_type;
d1325 4
a1328 2
      return typename __helper_type::type(std::forward<_Func>(__f),
					  std::forward<_BoundArgs>(__args)...);
d1335 3
a1337 1
      typedef typename decay<_Func>::type __functor_type;
d1353 4
a1356 2
      return typename __helper_type::type(std::forward<_Func>(__f),
					  std::forward<_BoundArgs>(__args)...);
d1359 5
a1363 4
#if __cplusplus >= 201402L
  /// Generalized negator.
  template<typename _Fn>
    class _Not_fn
d1365 7
a1371 2
      template<typename _Fn2, typename... _Args>
	using __inv_res_t = typename __invoke_result<_Fn2, _Args...>::type;
d1373 2
a1374 3
      template<typename _Tp>
	static decltype(!std::declval<_Tp>())
	_S_not() noexcept(noexcept(!std::declval<_Tp>()));
d1376 6
a1381 27
    public:
      template<typename _Fn2>
	_Not_fn(_Fn2&& __fn, int)
	: _M_fn(std::forward<_Fn2>(__fn)) { }

      _Not_fn(const _Not_fn& __fn) = default;
      _Not_fn(_Not_fn&& __fn) = default;
      ~_Not_fn() = default;

      // Macro to define operator() with given cv-qualifiers ref-qualifiers,
      // forwarding _M_fn and the function arguments with the same qualifiers,
      // and deducing the return type and exception-specification.
#define _GLIBCXX_NOT_FN_CALL_OP( _QUALS )				\
      template<typename... _Args>					\
	decltype(_S_not<__inv_res_t<_Fn _QUALS, _Args...>>())		\
	operator()(_Args&&... __args) _QUALS				\
	noexcept(__is_nothrow_invocable<_Fn _QUALS, _Args...>::value	\
	    && noexcept(_S_not<__inv_res_t<_Fn _QUALS, _Args...>>()))	\
	{								\
	  return !std::__invoke(std::forward< _Fn _QUALS >(_M_fn),	\
				std::forward<_Args>(__args)...);	\
	}
      _GLIBCXX_NOT_FN_CALL_OP( & )
      _GLIBCXX_NOT_FN_CALL_OP( const & )
      _GLIBCXX_NOT_FN_CALL_OP( && )
      _GLIBCXX_NOT_FN_CALL_OP( const && )
#undef _GLIBCXX_NOT_FN_CALL
d1384 22
a1405 1
      _Fn _M_fn;
d1408 5
a1412 7
#if __cplusplus > 201402L
#define __cpp_lib_not_fn 201603
  /// [func.not_fn] Function template not_fn
  template<typename _Fn>
    inline auto
    not_fn(_Fn&& __fn)
    noexcept(std::is_nothrow_constructible<std::decay_t<_Fn>, _Fn&&>::value)
d1414 6
a1419 1
      return _Not_fn<std::decay_t<_Fn>>{std::forward<_Fn>(__fn), 0};
d1422 25
a1446 2
  // Searchers
#define __cpp_lib_boyer_moore_searcher 201603
d1448 39
a1486 2
  template<typename _ForwardIterator1, typename _BinaryPredicate = equal_to<>>
    class default_searcher
d1488 85
a1572 6
    public:
      default_searcher(_ForwardIterator1 __pat_first,
		       _ForwardIterator1 __pat_last,
		       _BinaryPredicate __pred = _BinaryPredicate())
      : _M_m(__pat_first, __pat_last, std::move(__pred))
      { }
d1574 6
a1579 12
      template<typename _ForwardIterator2>
        pair<_ForwardIterator2, _ForwardIterator2>
	operator()(_ForwardIterator2 __first, _ForwardIterator2 __last) const
	{
	  _ForwardIterator2 __first_ret =
	    std::search(__first, __last, std::get<0>(_M_m), std::get<1>(_M_m),
			std::get<2>(_M_m));
	  auto __ret = std::make_pair(__first_ret, __first_ret);
	  if (__ret.first != __last)
	    std::advance(__ret.second, std::distance(std::get<0>(_M_m),
						     std::get<1>(_M_m)));
	  return __ret;
d1582 6
a1587 3
    private:
      tuple<_ForwardIterator1, _ForwardIterator1, _BinaryPredicate> _M_m;
    };
d1589 4
a1592 7
  template<typename _Key, typename _Tp, typename _Hash, typename _Pred>
    struct __boyer_moore_map_base
    {
      template<typename _RAIter>
	__boyer_moore_map_base(_RAIter __pat, size_t __patlen,
			       _Hash&& __hf, _Pred&& __pred)
	: _M_bad_char{ __patlen, std::move(__hf), std::move(__pred) }
d1594 20
a1613 3
	  if (__patlen > 0)
	    for (__diff_type __i = 0; __i < __patlen - 1; ++__i)
	      _M_bad_char[__pat[__i]] = __patlen - 1 - __i;
d1616 33
a1648 1
      using __diff_type = _Tp;
d1650 2
a1651 2
      __diff_type
      _M_lookup(_Key __key, __diff_type __not_found) const
d1653 1
a1653 5
	auto __iter = _M_bad_char.find(__key);
	if (__iter == _M_bad_char.end())
	  return __not_found;
	return __iter->second;
      }
d1655 16
a1670 2
      _Pred
      _M_pred() const { return _M_bad_char.key_eq(); }
d1672 5
a1676 2
      _GLIBCXX_STD_C::unordered_map<_Key, _Tp, _Hash, _Pred> _M_bad_char;
    };
d1678 2
a1679 7
  template<typename _Tp, size_t _Len, typename _Pred>
    struct __boyer_moore_array_base
    {
      template<typename _RAIter, typename _Unused>
	__boyer_moore_array_base(_RAIter __pat, size_t __patlen,
				 _Unused&&, _Pred&& __pred)
	: _M_bad_char{ _GLIBCXX_STD_C::array<_Tp, _Len>{}, std::move(__pred) }
d1681 1
a1681 9
	  std::get<0>(_M_bad_char).fill(__patlen);
	  if (__patlen > 0)
	    for (__diff_type __i = 0; __i < __patlen - 1; ++__i)
	      {
		auto __ch = __pat[__i];
		using _UCh = make_unsigned_t<decltype(__ch)>;
		auto __uch = static_cast<_UCh>(__ch);
		std::get<0>(_M_bad_char)[__uch] = __patlen - 1 - __i;
	      }
d1683 15
d1699 3
a1701 1
      using __diff_type = _Tp;
d1703 17
a1719 9
      template<typename _Key>
	__diff_type
	_M_lookup(_Key __key, __diff_type __not_found) const
	{
	  auto __ukey = static_cast<make_unsigned_t<_Key>>(__key);
	  if (__ukey >= _Len)
	    return __not_found;
	  return std::get<0>(_M_bad_char)[__ukey];
	}
d1721 5
a1725 2
      const _Pred&
      _M_pred() const { return std::get<1>(_M_bad_char); }
d1727 7
a1733 1
      tuple<_GLIBCXX_STD_C::array<_Tp, _Len>, _Pred> _M_bad_char;
d1736 5
a1740 2
  template<typename _Pred>
    struct __is_std_equal_to : false_type { };
d1742 8
a1749 2
  template<>
    struct __is_std_equal_to<equal_to<void>> : true_type { };
d1751 3
a1753 16
  // Use __boyer_moore_array_base when pattern consists of narrow characters
  // and uses std::equal_to as the predicate.
  template<typename _RAIter, typename _Hash, typename _Pred,
           typename _Val = typename iterator_traits<_RAIter>::value_type,
	   typename _Diff = typename iterator_traits<_RAIter>::difference_type>
    using __boyer_moore_base_t
      = conditional_t<sizeof(_Val) == 1 && is_integral<_Val>::value
		      && __is_std_equal_to<_Pred>::value,
		      __boyer_moore_array_base<_Diff, 256, _Pred>,
		      __boyer_moore_map_base<_Val, _Diff, _Hash, _Pred>>;

  template<typename _RAIter, typename _Hash
	     = hash<typename iterator_traits<_RAIter>::value_type>,
	   typename _BinaryPredicate = equal_to<>>
    class boyer_moore_searcher
    : __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>
d1755 1
a1755 2
      using _Base = __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>;
      using typename _Base::__diff_type;
d1757 16
a1772 9
    public:
      boyer_moore_searcher(_RAIter __pat_first, _RAIter __pat_last,
			   _Hash __hf = _Hash(),
			   _BinaryPredicate __pred = _BinaryPredicate());

      template<typename _RandomAccessIterator2>
        pair<_RandomAccessIterator2, _RandomAccessIterator2>
	operator()(_RandomAccessIterator2 __first,
		   _RandomAccessIterator2 __last) const;
d1774 3
a1776 4
    private:
      bool
      _M_is_prefix(_RAIter __word, __diff_type __len,
		   __diff_type __pos)
d1778 2
a1779 6
	const auto& __pred = this->_M_pred();
	__diff_type __suffixlen = __len - __pos;
	for (__diff_type __i = 0; __i < __suffixlen; ++__i)
	  if (!__pred(__word[__i], __word[__pos + __i]))
	    return false;
	return true;
d1781 10
d1792 4
a1795 3
      __diff_type
      _M_suffix_length(_RAIter __word, __diff_type __len,
		       __diff_type __pos)
d1797 1
a1797 4
	const auto& __pred = this->_M_pred();
	__diff_type __i = 0;
	while (__pred(__word[__pos - __i], __word[__len - 1 - __i])
	       && __i < __pos)
d1799 12
a1810 1
	    ++__i;
d1812 8
a1819 1
	return __i;
d1821 1
d1823 23
d1847 4
a1850 17
	__diff_type
	_M_bad_char_shift(_Tp __c) const
	{ return this->_M_lookup(__c, _M_pat_end - _M_pat); }

      _RAIter _M_pat;
      _RAIter _M_pat_end;
      _GLIBCXX_STD_C::vector<__diff_type> _M_good_suffix;
    };

  template<typename _RAIter, typename _Hash
	     = hash<typename iterator_traits<_RAIter>::value_type>,
	   typename _BinaryPredicate = equal_to<>>
    class boyer_moore_horspool_searcher
    : __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>
    {
      using _Base = __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>;
      using typename _Base::__diff_type;
d1853 142
a1994 8
      boyer_moore_horspool_searcher(_RAIter __pat,
				    _RAIter __pat_end,
				    _Hash __hf = _Hash(),
				    _BinaryPredicate __pred
				    = _BinaryPredicate())
      : _Base(__pat, __pat_end - __pat, std::move(__hf), std::move(__pred)),
	_M_pat(__pat), _M_pat_end(__pat_end)
      { }
d1996 7
a2002 21
      template<typename _RandomAccessIterator2>
        pair<_RandomAccessIterator2, _RandomAccessIterator2>
	operator()(_RandomAccessIterator2 __first,
		   _RandomAccessIterator2 __last) const
	{
	  const auto& __pred = this->_M_pred();
	  auto __patlen = _M_pat_end - _M_pat;
	  if (__patlen == 0)
	    return std::make_pair(__first, __first);
	  auto __len = __last - __first;
	  while (__len >= __patlen)
	    {
	      for (auto __scan = __patlen - 1;
		   __pred(__first[__scan], _M_pat[__scan]); --__scan)
		if (__scan == 0)
		  return std::make_pair(__first, __first + __patlen);
	      auto __shift = _M_bad_char_shift(__first[__patlen - 1]);
	      __len -= __shift;
	      __first += __shift;
	    }
	  return std::make_pair(__last, __last);
d2005 80
d2086 15
a2100 32
      template<typename _Tp>
	__diff_type
	_M_bad_char_shift(_Tp __c) const
	{ return this->_M_lookup(__c, _M_pat_end - _M_pat); }

      _RAIter _M_pat;
      _RAIter _M_pat_end;
    };

  template<typename _RAIter, typename _Hash, typename _BinaryPredicate>
    boyer_moore_searcher<_RAIter, _Hash, _BinaryPredicate>::
    boyer_moore_searcher(_RAIter __pat, _RAIter __pat_end,
			 _Hash __hf, _BinaryPredicate __pred)
    : _Base(__pat, __pat_end - __pat, std::move(__hf), std::move(__pred)),
      _M_pat(__pat), _M_pat_end(__pat_end), _M_good_suffix(__pat_end - __pat)
    {
      auto __patlen = __pat_end - __pat;
      if (__patlen == 0)
	return;
      __diff_type __last_prefix = __patlen - 1;
      for (__diff_type __p = __patlen - 1; __p >= 0; --__p)
	{
	  if (_M_is_prefix(__pat, __patlen, __p + 1))
	    __last_prefix = __p + 1;
	  _M_good_suffix[__p] = __last_prefix + (__patlen - 1 - __p);
	}
      for (__diff_type __p = 0; __p < __patlen - 1; ++__p)
	{
	  auto __slen = _M_suffix_length(__pat, __patlen, __p);
	  auto __pos = __patlen - 1 - __slen;
	  if (!__pred(__pat[__p - __slen], __pat[__pos]))
	    _M_good_suffix[__pos] = __patlen - 1 - __p + __slen;
d2104 37
a2140 28
  template<typename _RAIter, typename _Hash, typename _BinaryPredicate>
  template<typename _RandomAccessIterator2>
    pair<_RandomAccessIterator2, _RandomAccessIterator2>
    boyer_moore_searcher<_RAIter, _Hash, _BinaryPredicate>::
    operator()(_RandomAccessIterator2 __first,
	       _RandomAccessIterator2 __last) const
    {
      auto __patlen = _M_pat_end - _M_pat;
      if (__patlen == 0)
	return std::make_pair(__first, __first);
      const auto& __pred = this->_M_pred();
      __diff_type __i = __patlen - 1;
      auto __stringlen = __last - __first;
      while (__i < __stringlen)
	{
	  __diff_type __j = __patlen - 1;
	  while (__j >= 0 && __pred(__first[__i], _M_pat[__j]))
	    {
	      --__i;
	      --__j;
	    }
	  if (__j < 0)
	    {
	      const auto __match = __first + __i + 1;
	      return std::make_pair(__match, __match + __patlen);
	    }
	  __i += std::max(_M_bad_char_shift(__first[__i]),
			  _M_good_suffix[__j]);
d2142 2
a2143 1
      return std::make_pair(__last, __last);
d2146 87
a2232 2
#endif // C++17
#endif // C++14
@


1.1.1.8.4.2
log
@Mostly merge changes from HEAD upto 20200411
@
text
@d3 1
a3 1
// Copyright (C) 2001-2018 Free Software Foundation, Inc.
d58 1
a58 2
#include <bits/refwrap.h>	// std::reference_wrapper and _Mem_fn_traits
#include <bits/std_function.h>	// std::function
d85 62
d262 2
d270 1
d304 1
d307 2
d950 1
a950 23
  template<typename _Tp, typename _Pred>
    struct __is_byte_like : false_type { };

  template<typename _Tp>
    struct __is_byte_like<_Tp, equal_to<_Tp>>
    : __bool_constant<sizeof(_Tp) == 1 && is_integral<_Tp>::value> { };

  template<typename _Tp>
    struct __is_byte_like<_Tp, equal_to<void>>
    : __bool_constant<sizeof(_Tp) == 1 && is_integral<_Tp>::value> { };

#if __cplusplus >= 201703L
  // Declare std::byte (full definition is in <cstddef>).
  enum class byte : unsigned char;

  template<>
    struct __is_byte_like<byte, equal_to<byte>>
    : true_type { };

  template<>
    struct __is_byte_like<byte, equal_to<void>>
    : true_type { };

d1059 6
d1066 1
a1066 1
  // (or std::byte) and uses std::equal_to as the predicate.
d1071 2
a1072 1
      = conditional_t<__is_byte_like<_Val, _Pred>::value,
@


1.1.1.8.2.1
log
@Sync with HEAD, resolve a couple of conflicts
@
text
@d1888 1
a1888 1
      function(function&& __x) noexcept : _Function_base()
d1947 1
a1947 1
      operator=(function&& __x) noexcept
@


1.1.1.8.2.2
log
@Sync with HEAD
@
text
@d3 1
a3 1
// Copyright (C) 2001-2017 Free Software Foundation, Inc.
d53 1
d57 1
a58 9
#include <bits/invoke.h>
#include <bits/std_function.h>
#if __cplusplus > 201402L
# include <unordered_map>
# include <vector>
# include <array>
# include <utility>
# include <bits/stl_algo.h>
#endif
d64 190
d259 1
a259 1
    inline invoke_result_t<_Callable, _Args...>
a260 1
    noexcept(is_nothrow_invocable_v<_Callable, _Args...>)
d267 235
d519 18
a572 6
#if __cplusplus > 201402L
_GLIBCXX_MEM_FN_TRAITS(noexcept, true_type, true_type)
_GLIBCXX_MEM_FN_TRAITS(& noexcept, true_type, false_type)
_GLIBCXX_MEM_FN_TRAITS(&& noexcept, false_type, true_type)
#endif

a630 3
  template<typename _MemberPointer>
    struct _Mem_fn; // undefined

a675 7
#if __cplusplus > 201402L
  template <typename _Tp> inline constexpr bool is_bind_expression_v
    = is_bind_expression<_Tp>::value;
  template <typename _Tp> inline constexpr int is_placeholder_v
    = is_placeholder<_Tp>::value;
#endif // C++17

d745 4
a748 4
  template<std::size_t __i, typename _Tuple>
    using _Safe_tuple_element_t
      = typename enable_if<(__i < tuple_size<_Tuple>::value),
			   tuple_element<__i, _Tuple>>::type::type;
d816 1
a816 1
	  return __arg(std::get<_Indexes>(std::move(__tuple))...);
d833 4
a836 2
	  return
	    ::std::get<(is_placeholder<_Arg>::value - 1)>(std::move(__tuple));
d855 44
d921 1
d933 2
a934 3
	  return std::__invoke(_M_f,
	      _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)...
	      );
d942 2
a943 3
	  return std::__invoke(_M_f,
	      _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)...
	      );
d952 2
a953 3
	  return std::__invoke(_M_f,
	      _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)...
	      );
d962 3
a964 26
	  return std::__invoke(_M_f,
	      _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)...
	      );
	}

      template<typename _BoundArg, typename _CallArgs>
	using _Mu_type = decltype(
	    _Mu<typename remove_cv<_BoundArg>::type>()(
	      std::declval<_BoundArg&>(), std::declval<_CallArgs&>()) );

      template<typename _Fn, typename _CallArgs, typename... _BArgs>
	using _Res_type_impl
	  = typename result_of< _Fn&(_Mu_type<_BArgs, _CallArgs>&&...) >::type;

      template<typename _CallArgs>
	using _Res_type = _Res_type_impl<_Functor, _CallArgs, _Bound_args...>;

      template<typename _CallArgs>
	using __dependent = typename
	  enable_if<bool(tuple_size<_CallArgs>::value+1), _Functor>::type;

      template<typename _CallArgs, template<class> class __cv_quals>
	using _Res_type_cv = _Res_type_impl<
	  typename __cv_quals<__dependent<_CallArgs>>::type,
	  _CallArgs,
	  typename __cv_quals<_Bound_args>::type...>;
d984 4
a987 2
      template<typename... _Args,
	       typename _Result = _Res_type<tuple<_Args...>>>
d997 5
a1001 2
      template<typename... _Args,
	       typename _Result = _Res_type_cv<tuple<_Args...>, add_const>>
a1009 6
#if __cplusplus > 201402L
# define _GLIBCXX_DEPR_BIND \
      [[deprecated("std::bind does not support volatile in C++17")]]
#else
# define _GLIBCXX_DEPR_BIND
#endif
d1011 5
a1015 3
      template<typename... _Args,
	       typename _Result = _Res_type_cv<tuple<_Args...>, add_volatile>>
	_GLIBCXX_DEPR_BIND
d1025 5
a1029 3
      template<typename... _Args,
	       typename _Result = _Res_type_cv<tuple<_Args...>, add_cv>>
	_GLIBCXX_DEPR_BIND
d1046 1
d1055 1
a1055 3
	using __enable_if_void
	  = typename enable_if<is_void<_Res>{}>::type;

d1057 1
a1057 2
	using __disable_if_void
	  = typename enable_if<!is_void<_Res>{}, _Result>::type;
d1061 3
a1063 2
	__disable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>)
d1065 1
a1065 1
	  return std::__invoke(_M_f, _Mu<_Bound_args>()
d1071 3
a1073 2
	__enable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>)
d1075 1
a1075 1
	  std::__invoke(_M_f, _Mu<_Bound_args>()
d1081 3
a1083 2
	__disable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const
d1085 1
a1085 1
	  return std::__invoke(_M_f, _Mu<_Bound_args>()
d1091 3
a1093 2
	__enable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const
d1095 1
a1095 1
	  std::__invoke(_M_f, _Mu<_Bound_args>()
d1101 3
a1103 2
	__disable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile
d1105 1
a1105 1
	  return std::__invoke(_M_f, _Mu<_Bound_args>()
d1111 3
a1113 2
	__enable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile
d1115 1
a1115 1
	  std::__invoke(_M_f, _Mu<_Bound_args>()
d1121 3
a1123 3
	__disable_if_void<_Res>
	__call(tuple<_Args...>&& __args,
	       _Index_tuple<_Indexes...>) const volatile
d1125 1
a1125 1
	  return std::__invoke(_M_f, _Mu<_Bound_args>()
d1131 1
a1131 1
	__enable_if_void<_Res>
d1133 2
a1134 1
	       _Index_tuple<_Indexes...>) const volatile
d1136 1
a1136 1
	  std::__invoke(_M_f, _Mu<_Bound_args>()
a1180 1
	_GLIBCXX_DEPR_BIND
a1190 1
	_GLIBCXX_DEPR_BIND
a1198 1
#undef _GLIBCXX_DEPR_BIND
d1302 3
a1304 1
      typedef typename decay<_Func>::type __func_type;
d1325 4
a1328 2
      return typename __helper_type::type(std::forward<_Func>(__f),
					  std::forward<_BoundArgs>(__args)...);
d1335 3
a1337 1
      typedef typename decay<_Func>::type __functor_type;
d1353 4
a1356 2
      return typename __helper_type::type(std::forward<_Func>(__f),
					  std::forward<_BoundArgs>(__args)...);
d1359 5
a1363 4
#if __cplusplus >= 201402L
  /// Generalized negator.
  template<typename _Fn>
    class _Not_fn
d1365 7
a1371 2
      template<typename _Fn2, typename... _Args>
	using __inv_res_t = typename __invoke_result<_Fn2, _Args...>::type;
d1373 2
a1374 3
      template<typename _Tp>
	static decltype(!std::declval<_Tp>())
	_S_not() noexcept(noexcept(!std::declval<_Tp>()));
d1376 6
a1381 27
    public:
      template<typename _Fn2>
	_Not_fn(_Fn2&& __fn, int)
	: _M_fn(std::forward<_Fn2>(__fn)) { }

      _Not_fn(const _Not_fn& __fn) = default;
      _Not_fn(_Not_fn&& __fn) = default;
      ~_Not_fn() = default;

      // Macro to define operator() with given cv-qualifiers ref-qualifiers,
      // forwarding _M_fn and the function arguments with the same qualifiers,
      // and deducing the return type and exception-specification.
#define _GLIBCXX_NOT_FN_CALL_OP( _QUALS )				\
      template<typename... _Args>					\
	decltype(_S_not<__inv_res_t<_Fn _QUALS, _Args...>>())		\
	operator()(_Args&&... __args) _QUALS				\
	noexcept(__is_nothrow_invocable<_Fn _QUALS, _Args...>::value	\
	    && noexcept(_S_not<__inv_res_t<_Fn _QUALS, _Args...>>()))	\
	{								\
	  return !std::__invoke(std::forward< _Fn _QUALS >(_M_fn),	\
				std::forward<_Args>(__args)...);	\
	}
      _GLIBCXX_NOT_FN_CALL_OP( & )
      _GLIBCXX_NOT_FN_CALL_OP( const & )
      _GLIBCXX_NOT_FN_CALL_OP( && )
      _GLIBCXX_NOT_FN_CALL_OP( const && )
#undef _GLIBCXX_NOT_FN_CALL
d1384 22
a1405 1
      _Fn _M_fn;
d1408 5
a1412 7
#if __cplusplus > 201402L
#define __cpp_lib_not_fn 201603
  /// [func.not_fn] Function template not_fn
  template<typename _Fn>
    inline auto
    not_fn(_Fn&& __fn)
    noexcept(std::is_nothrow_constructible<std::decay_t<_Fn>, _Fn&&>::value)
d1414 6
a1419 1
      return _Not_fn<std::decay_t<_Fn>>{std::forward<_Fn>(__fn), 0};
d1422 25
a1446 2
  // Searchers
#define __cpp_lib_boyer_moore_searcher 201603
d1448 39
a1486 2
  template<typename _ForwardIterator1, typename _BinaryPredicate = equal_to<>>
    class default_searcher
d1488 85
a1572 6
    public:
      default_searcher(_ForwardIterator1 __pat_first,
		       _ForwardIterator1 __pat_last,
		       _BinaryPredicate __pred = _BinaryPredicate())
      : _M_m(__pat_first, __pat_last, std::move(__pred))
      { }
d1574 6
a1579 12
      template<typename _ForwardIterator2>
        pair<_ForwardIterator2, _ForwardIterator2>
	operator()(_ForwardIterator2 __first, _ForwardIterator2 __last) const
	{
	  _ForwardIterator2 __first_ret =
	    std::search(__first, __last, std::get<0>(_M_m), std::get<1>(_M_m),
			std::get<2>(_M_m));
	  auto __ret = std::make_pair(__first_ret, __first_ret);
	  if (__ret.first != __last)
	    std::advance(__ret.second, std::distance(std::get<0>(_M_m),
						     std::get<1>(_M_m)));
	  return __ret;
d1582 6
a1587 3
    private:
      tuple<_ForwardIterator1, _ForwardIterator1, _BinaryPredicate> _M_m;
    };
d1589 4
a1592 7
  template<typename _Key, typename _Tp, typename _Hash, typename _Pred>
    struct __boyer_moore_map_base
    {
      template<typename _RAIter>
	__boyer_moore_map_base(_RAIter __pat, size_t __patlen,
			       _Hash&& __hf, _Pred&& __pred)
	: _M_bad_char{ __patlen, std::move(__hf), std::move(__pred) }
d1594 20
a1613 3
	  if (__patlen > 0)
	    for (__diff_type __i = 0; __i < __patlen - 1; ++__i)
	      _M_bad_char[__pat[__i]] = __patlen - 1 - __i;
d1616 33
a1648 1
      using __diff_type = _Tp;
d1650 2
a1651 2
      __diff_type
      _M_lookup(_Key __key, __diff_type __not_found) const
d1653 1
a1653 5
	auto __iter = _M_bad_char.find(__key);
	if (__iter == _M_bad_char.end())
	  return __not_found;
	return __iter->second;
      }
d1655 16
a1670 2
      _Pred
      _M_pred() const { return _M_bad_char.key_eq(); }
d1672 5
a1676 2
      _GLIBCXX_STD_C::unordered_map<_Key, _Tp, _Hash, _Pred> _M_bad_char;
    };
d1678 2
a1679 7
  template<typename _Tp, size_t _Len, typename _Pred>
    struct __boyer_moore_array_base
    {
      template<typename _RAIter, typename _Unused>
	__boyer_moore_array_base(_RAIter __pat, size_t __patlen,
				 _Unused&&, _Pred&& __pred)
	: _M_bad_char{ _GLIBCXX_STD_C::array<_Tp, _Len>{}, std::move(__pred) }
d1681 1
a1681 9
	  std::get<0>(_M_bad_char).fill(__patlen);
	  if (__patlen > 0)
	    for (__diff_type __i = 0; __i < __patlen - 1; ++__i)
	      {
		auto __ch = __pat[__i];
		using _UCh = make_unsigned_t<decltype(__ch)>;
		auto __uch = static_cast<_UCh>(__ch);
		std::get<0>(_M_bad_char)[__uch] = __patlen - 1 - __i;
	      }
d1683 15
d1699 3
a1701 1
      using __diff_type = _Tp;
d1703 17
a1719 9
      template<typename _Key>
	__diff_type
	_M_lookup(_Key __key, __diff_type __not_found) const
	{
	  auto __ukey = static_cast<make_unsigned_t<_Key>>(__key);
	  if (__ukey >= _Len)
	    return __not_found;
	  return std::get<0>(_M_bad_char)[__ukey];
	}
d1721 5
a1725 2
      const _Pred&
      _M_pred() const { return std::get<1>(_M_bad_char); }
d1727 7
a1733 1
      tuple<_GLIBCXX_STD_C::array<_Tp, _Len>, _Pred> _M_bad_char;
d1736 5
a1740 2
  template<typename _Pred>
    struct __is_std_equal_to : false_type { };
d1742 8
a1749 2
  template<>
    struct __is_std_equal_to<equal_to<void>> : true_type { };
d1751 3
a1753 16
  // Use __boyer_moore_array_base when pattern consists of narrow characters
  // and uses std::equal_to as the predicate.
  template<typename _RAIter, typename _Hash, typename _Pred,
           typename _Val = typename iterator_traits<_RAIter>::value_type,
	   typename _Diff = typename iterator_traits<_RAIter>::difference_type>
    using __boyer_moore_base_t
      = conditional_t<sizeof(_Val) == 1 && is_integral<_Val>::value
		      && __is_std_equal_to<_Pred>::value,
		      __boyer_moore_array_base<_Diff, 256, _Pred>,
		      __boyer_moore_map_base<_Val, _Diff, _Hash, _Pred>>;

  template<typename _RAIter, typename _Hash
	     = hash<typename iterator_traits<_RAIter>::value_type>,
	   typename _BinaryPredicate = equal_to<>>
    class boyer_moore_searcher
    : __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>
d1755 1
a1755 2
      using _Base = __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>;
      using typename _Base::__diff_type;
d1757 16
a1772 9
    public:
      boyer_moore_searcher(_RAIter __pat_first, _RAIter __pat_last,
			   _Hash __hf = _Hash(),
			   _BinaryPredicate __pred = _BinaryPredicate());

      template<typename _RandomAccessIterator2>
        pair<_RandomAccessIterator2, _RandomAccessIterator2>
	operator()(_RandomAccessIterator2 __first,
		   _RandomAccessIterator2 __last) const;
d1774 3
a1776 4
    private:
      bool
      _M_is_prefix(_RAIter __word, __diff_type __len,
		   __diff_type __pos)
d1778 2
a1779 6
	const auto& __pred = this->_M_pred();
	__diff_type __suffixlen = __len - __pos;
	for (__diff_type __i = 0; __i < __suffixlen; ++__i)
	  if (!__pred(__word[__i], __word[__pos + __i]))
	    return false;
	return true;
d1781 10
d1792 4
a1795 3
      __diff_type
      _M_suffix_length(_RAIter __word, __diff_type __len,
		       __diff_type __pos)
d1797 1
a1797 4
	const auto& __pred = this->_M_pred();
	__diff_type __i = 0;
	while (__pred(__word[__pos - __i], __word[__len - 1 - __i])
	       && __i < __pos)
d1799 12
a1810 1
	    ++__i;
d1812 8
a1819 1
	return __i;
d1821 1
d1823 23
d1847 4
a1850 17
	__diff_type
	_M_bad_char_shift(_Tp __c) const
	{ return this->_M_lookup(__c, _M_pat_end - _M_pat); }

      _RAIter _M_pat;
      _RAIter _M_pat_end;
      _GLIBCXX_STD_C::vector<__diff_type> _M_good_suffix;
    };

  template<typename _RAIter, typename _Hash
	     = hash<typename iterator_traits<_RAIter>::value_type>,
	   typename _BinaryPredicate = equal_to<>>
    class boyer_moore_horspool_searcher
    : __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>
    {
      using _Base = __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>;
      using typename _Base::__diff_type;
d1853 142
a1994 8
      boyer_moore_horspool_searcher(_RAIter __pat,
				    _RAIter __pat_end,
				    _Hash __hf = _Hash(),
				    _BinaryPredicate __pred
				    = _BinaryPredicate())
      : _Base(__pat, __pat_end - __pat, std::move(__hf), std::move(__pred)),
	_M_pat(__pat), _M_pat_end(__pat_end)
      { }
d1996 7
a2002 21
      template<typename _RandomAccessIterator2>
        pair<_RandomAccessIterator2, _RandomAccessIterator2>
	operator()(_RandomAccessIterator2 __first,
		   _RandomAccessIterator2 __last) const
	{
	  const auto& __pred = this->_M_pred();
	  auto __patlen = _M_pat_end - _M_pat;
	  if (__patlen == 0)
	    return std::make_pair(__first, __first);
	  auto __len = __last - __first;
	  while (__len >= __patlen)
	    {
	      for (auto __scan = __patlen - 1;
		   __pred(__first[__scan], _M_pat[__scan]); --__scan)
		if (__scan == 0)
		  return std::make_pair(__first, __first + __patlen);
	      auto __shift = _M_bad_char_shift(__first[__patlen - 1]);
	      __len -= __shift;
	      __first += __shift;
	    }
	  return std::make_pair(__last, __last);
d2005 80
d2086 15
a2100 32
      template<typename _Tp>
	__diff_type
	_M_bad_char_shift(_Tp __c) const
	{ return this->_M_lookup(__c, _M_pat_end - _M_pat); }

      _RAIter _M_pat;
      _RAIter _M_pat_end;
    };

  template<typename _RAIter, typename _Hash, typename _BinaryPredicate>
    boyer_moore_searcher<_RAIter, _Hash, _BinaryPredicate>::
    boyer_moore_searcher(_RAIter __pat, _RAIter __pat_end,
			 _Hash __hf, _BinaryPredicate __pred)
    : _Base(__pat, __pat_end - __pat, std::move(__hf), std::move(__pred)),
      _M_pat(__pat), _M_pat_end(__pat_end), _M_good_suffix(__pat_end - __pat)
    {
      auto __patlen = __pat_end - __pat;
      if (__patlen == 0)
	return;
      __diff_type __last_prefix = __patlen - 1;
      for (__diff_type __p = __patlen - 1; __p >= 0; --__p)
	{
	  if (_M_is_prefix(__pat, __patlen, __p + 1))
	    __last_prefix = __p + 1;
	  _M_good_suffix[__p] = __last_prefix + (__patlen - 1 - __p);
	}
      for (__diff_type __p = 0; __p < __patlen - 1; ++__p)
	{
	  auto __slen = _M_suffix_length(__pat, __patlen, __p);
	  auto __pos = __patlen - 1 - __slen;
	  if (!__pred(__pat[__p - __slen], __pat[__pos]))
	    _M_good_suffix[__pos] = __patlen - 1 - __p + __slen;
d2104 37
a2140 28
  template<typename _RAIter, typename _Hash, typename _BinaryPredicate>
  template<typename _RandomAccessIterator2>
    pair<_RandomAccessIterator2, _RandomAccessIterator2>
    boyer_moore_searcher<_RAIter, _Hash, _BinaryPredicate>::
    operator()(_RandomAccessIterator2 __first,
	       _RandomAccessIterator2 __last) const
    {
      auto __patlen = _M_pat_end - _M_pat;
      if (__patlen == 0)
	return std::make_pair(__first, __first);
      const auto& __pred = this->_M_pred();
      __diff_type __i = __patlen - 1;
      auto __stringlen = __last - __first;
      while (__i < __stringlen)
	{
	  __diff_type __j = __patlen - 1;
	  while (__j >= 0 && __pred(__first[__i], _M_pat[__j]))
	    {
	      --__i;
	      --__j;
	    }
	  if (__j < 0)
	    {
	      const auto __match = __first + __i + 1;
	      return std::make_pair(__match, __match + __patlen);
	    }
	  __i += std::max(_M_bad_char_shift(__first[__i]),
			  _M_good_suffix[__j]);
d2142 2
a2143 1
      return std::make_pair(__last, __last);
d2146 87
a2232 2
#endif // C++17
#endif // C++14
@


1.1.1.9
log
@import GCC 6.5.0.  this is largely a maint release with no
particularly features listed here:

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

this fixes over 250 PRs in the GCC bugzilla:

   https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=6.5
@
text
@d1888 1
a1888 1
      function(function&& __x) noexcept : _Function_base()
d1947 1
a1947 1
      operator=(function&& __x) noexcept
@


1.1.1.10
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) 2001-2017 Free Software Foundation, Inc.
d53 1
d57 1
a58 9
#include <bits/invoke.h>
#include <bits/std_function.h>
#if __cplusplus > 201402L
# include <unordered_map>
# include <vector>
# include <array>
# include <utility>
# include <bits/stl_algo.h>
#endif
d64 190
d259 1
a259 1
    inline invoke_result_t<_Callable, _Args...>
a260 1
    noexcept(is_nothrow_invocable_v<_Callable, _Args...>)
d267 235
d519 18
a572 6
#if __cplusplus > 201402L
_GLIBCXX_MEM_FN_TRAITS(noexcept, true_type, true_type)
_GLIBCXX_MEM_FN_TRAITS(& noexcept, true_type, false_type)
_GLIBCXX_MEM_FN_TRAITS(&& noexcept, false_type, true_type)
#endif

a630 3
  template<typename _MemberPointer>
    struct _Mem_fn; // undefined

a675 7
#if __cplusplus > 201402L
  template <typename _Tp> inline constexpr bool is_bind_expression_v
    = is_bind_expression<_Tp>::value;
  template <typename _Tp> inline constexpr int is_placeholder_v
    = is_placeholder<_Tp>::value;
#endif // C++17

d745 4
a748 4
  template<std::size_t __i, typename _Tuple>
    using _Safe_tuple_element_t
      = typename enable_if<(__i < tuple_size<_Tuple>::value),
			   tuple_element<__i, _Tuple>>::type::type;
d816 1
a816 1
	  return __arg(std::get<_Indexes>(std::move(__tuple))...);
d833 4
a836 2
	  return
	    ::std::get<(is_placeholder<_Arg>::value - 1)>(std::move(__tuple));
d855 44
d921 1
d933 2
a934 3
	  return std::__invoke(_M_f,
	      _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)...
	      );
d942 2
a943 3
	  return std::__invoke(_M_f,
	      _Mu<_Bound_args>()(std::get<_Indexes>(_M_bound_args), __args)...
	      );
d952 2
a953 3
	  return std::__invoke(_M_f,
	      _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)...
	      );
d962 3
a964 26
	  return std::__invoke(_M_f,
	      _Mu<_Bound_args>()(__volget<_Indexes>(_M_bound_args), __args)...
	      );
	}

      template<typename _BoundArg, typename _CallArgs>
	using _Mu_type = decltype(
	    _Mu<typename remove_cv<_BoundArg>::type>()(
	      std::declval<_BoundArg&>(), std::declval<_CallArgs&>()) );

      template<typename _Fn, typename _CallArgs, typename... _BArgs>
	using _Res_type_impl
	  = typename result_of< _Fn&(_Mu_type<_BArgs, _CallArgs>&&...) >::type;

      template<typename _CallArgs>
	using _Res_type = _Res_type_impl<_Functor, _CallArgs, _Bound_args...>;

      template<typename _CallArgs>
	using __dependent = typename
	  enable_if<bool(tuple_size<_CallArgs>::value+1), _Functor>::type;

      template<typename _CallArgs, template<class> class __cv_quals>
	using _Res_type_cv = _Res_type_impl<
	  typename __cv_quals<__dependent<_CallArgs>>::type,
	  _CallArgs,
	  typename __cv_quals<_Bound_args>::type...>;
d984 4
a987 2
      template<typename... _Args,
	       typename _Result = _Res_type<tuple<_Args...>>>
d997 5
a1001 2
      template<typename... _Args,
	       typename _Result = _Res_type_cv<tuple<_Args...>, add_const>>
a1009 6
#if __cplusplus > 201402L
# define _GLIBCXX_DEPR_BIND \
      [[deprecated("std::bind does not support volatile in C++17")]]
#else
# define _GLIBCXX_DEPR_BIND
#endif
d1011 5
a1015 3
      template<typename... _Args,
	       typename _Result = _Res_type_cv<tuple<_Args...>, add_volatile>>
	_GLIBCXX_DEPR_BIND
d1025 5
a1029 3
      template<typename... _Args,
	       typename _Result = _Res_type_cv<tuple<_Args...>, add_cv>>
	_GLIBCXX_DEPR_BIND
d1046 1
d1055 1
a1055 3
	using __enable_if_void
	  = typename enable_if<is_void<_Res>{}>::type;

d1057 1
a1057 2
	using __disable_if_void
	  = typename enable_if<!is_void<_Res>{}, _Result>::type;
d1061 3
a1063 2
	__disable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>)
d1065 1
a1065 1
	  return std::__invoke(_M_f, _Mu<_Bound_args>()
d1071 3
a1073 2
	__enable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>)
d1075 1
a1075 1
	  std::__invoke(_M_f, _Mu<_Bound_args>()
d1081 3
a1083 2
	__disable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const
d1085 1
a1085 1
	  return std::__invoke(_M_f, _Mu<_Bound_args>()
d1091 3
a1093 2
	__enable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const
d1095 1
a1095 1
	  std::__invoke(_M_f, _Mu<_Bound_args>()
d1101 3
a1103 2
	__disable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile
d1105 1
a1105 1
	  return std::__invoke(_M_f, _Mu<_Bound_args>()
d1111 3
a1113 2
	__enable_if_void<_Res>
	__call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile
d1115 1
a1115 1
	  std::__invoke(_M_f, _Mu<_Bound_args>()
d1121 3
a1123 3
	__disable_if_void<_Res>
	__call(tuple<_Args...>&& __args,
	       _Index_tuple<_Indexes...>) const volatile
d1125 1
a1125 1
	  return std::__invoke(_M_f, _Mu<_Bound_args>()
d1131 1
a1131 1
	__enable_if_void<_Res>
d1133 2
a1134 1
	       _Index_tuple<_Indexes...>) const volatile
d1136 1
a1136 1
	  std::__invoke(_M_f, _Mu<_Bound_args>()
a1180 1
	_GLIBCXX_DEPR_BIND
a1190 1
	_GLIBCXX_DEPR_BIND
a1198 1
#undef _GLIBCXX_DEPR_BIND
d1302 3
a1304 1
      typedef typename decay<_Func>::type __func_type;
d1325 4
a1328 2
      return typename __helper_type::type(std::forward<_Func>(__f),
					  std::forward<_BoundArgs>(__args)...);
d1335 3
a1337 1
      typedef typename decay<_Func>::type __functor_type;
d1353 4
a1356 2
      return typename __helper_type::type(std::forward<_Func>(__f),
					  std::forward<_BoundArgs>(__args)...);
d1359 5
a1363 4
#if __cplusplus >= 201402L
  /// Generalized negator.
  template<typename _Fn>
    class _Not_fn
d1365 7
a1371 2
      template<typename _Fn2, typename... _Args>
	using __inv_res_t = typename __invoke_result<_Fn2, _Args...>::type;
d1373 2
a1374 3
      template<typename _Tp>
	static decltype(!std::declval<_Tp>())
	_S_not() noexcept(noexcept(!std::declval<_Tp>()));
d1376 6
a1381 27
    public:
      template<typename _Fn2>
	_Not_fn(_Fn2&& __fn, int)
	: _M_fn(std::forward<_Fn2>(__fn)) { }

      _Not_fn(const _Not_fn& __fn) = default;
      _Not_fn(_Not_fn&& __fn) = default;
      ~_Not_fn() = default;

      // Macro to define operator() with given cv-qualifiers ref-qualifiers,
      // forwarding _M_fn and the function arguments with the same qualifiers,
      // and deducing the return type and exception-specification.
#define _GLIBCXX_NOT_FN_CALL_OP( _QUALS )				\
      template<typename... _Args>					\
	decltype(_S_not<__inv_res_t<_Fn _QUALS, _Args...>>())		\
	operator()(_Args&&... __args) _QUALS				\
	noexcept(__is_nothrow_invocable<_Fn _QUALS, _Args...>::value	\
	    && noexcept(_S_not<__inv_res_t<_Fn _QUALS, _Args...>>()))	\
	{								\
	  return !std::__invoke(std::forward< _Fn _QUALS >(_M_fn),	\
				std::forward<_Args>(__args)...);	\
	}
      _GLIBCXX_NOT_FN_CALL_OP( & )
      _GLIBCXX_NOT_FN_CALL_OP( const & )
      _GLIBCXX_NOT_FN_CALL_OP( && )
      _GLIBCXX_NOT_FN_CALL_OP( const && )
#undef _GLIBCXX_NOT_FN_CALL
d1384 22
a1405 1
      _Fn _M_fn;
d1408 5
a1412 7
#if __cplusplus > 201402L
#define __cpp_lib_not_fn 201603
  /// [func.not_fn] Function template not_fn
  template<typename _Fn>
    inline auto
    not_fn(_Fn&& __fn)
    noexcept(std::is_nothrow_constructible<std::decay_t<_Fn>, _Fn&&>::value)
d1414 6
a1419 1
      return _Not_fn<std::decay_t<_Fn>>{std::forward<_Fn>(__fn), 0};
d1422 25
a1446 2
  // Searchers
#define __cpp_lib_boyer_moore_searcher 201603
d1448 39
a1486 2
  template<typename _ForwardIterator1, typename _BinaryPredicate = equal_to<>>
    class default_searcher
d1488 85
a1572 6
    public:
      default_searcher(_ForwardIterator1 __pat_first,
		       _ForwardIterator1 __pat_last,
		       _BinaryPredicate __pred = _BinaryPredicate())
      : _M_m(__pat_first, __pat_last, std::move(__pred))
      { }
d1574 6
a1579 12
      template<typename _ForwardIterator2>
        pair<_ForwardIterator2, _ForwardIterator2>
	operator()(_ForwardIterator2 __first, _ForwardIterator2 __last) const
	{
	  _ForwardIterator2 __first_ret =
	    std::search(__first, __last, std::get<0>(_M_m), std::get<1>(_M_m),
			std::get<2>(_M_m));
	  auto __ret = std::make_pair(__first_ret, __first_ret);
	  if (__ret.first != __last)
	    std::advance(__ret.second, std::distance(std::get<0>(_M_m),
						     std::get<1>(_M_m)));
	  return __ret;
d1582 6
a1587 3
    private:
      tuple<_ForwardIterator1, _ForwardIterator1, _BinaryPredicate> _M_m;
    };
d1589 4
a1592 7
  template<typename _Key, typename _Tp, typename _Hash, typename _Pred>
    struct __boyer_moore_map_base
    {
      template<typename _RAIter>
	__boyer_moore_map_base(_RAIter __pat, size_t __patlen,
			       _Hash&& __hf, _Pred&& __pred)
	: _M_bad_char{ __patlen, std::move(__hf), std::move(__pred) }
d1594 20
a1613 3
	  if (__patlen > 0)
	    for (__diff_type __i = 0; __i < __patlen - 1; ++__i)
	      _M_bad_char[__pat[__i]] = __patlen - 1 - __i;
d1616 33
a1648 1
      using __diff_type = _Tp;
d1650 2
a1651 2
      __diff_type
      _M_lookup(_Key __key, __diff_type __not_found) const
d1653 1
a1653 5
	auto __iter = _M_bad_char.find(__key);
	if (__iter == _M_bad_char.end())
	  return __not_found;
	return __iter->second;
      }
d1655 16
a1670 2
      _Pred
      _M_pred() const { return _M_bad_char.key_eq(); }
d1672 5
a1676 2
      _GLIBCXX_STD_C::unordered_map<_Key, _Tp, _Hash, _Pred> _M_bad_char;
    };
d1678 2
a1679 7
  template<typename _Tp, size_t _Len, typename _Pred>
    struct __boyer_moore_array_base
    {
      template<typename _RAIter, typename _Unused>
	__boyer_moore_array_base(_RAIter __pat, size_t __patlen,
				 _Unused&&, _Pred&& __pred)
	: _M_bad_char{ _GLIBCXX_STD_C::array<_Tp, _Len>{}, std::move(__pred) }
d1681 1
a1681 9
	  std::get<0>(_M_bad_char).fill(__patlen);
	  if (__patlen > 0)
	    for (__diff_type __i = 0; __i < __patlen - 1; ++__i)
	      {
		auto __ch = __pat[__i];
		using _UCh = make_unsigned_t<decltype(__ch)>;
		auto __uch = static_cast<_UCh>(__ch);
		std::get<0>(_M_bad_char)[__uch] = __patlen - 1 - __i;
	      }
d1683 15
d1699 3
a1701 1
      using __diff_type = _Tp;
d1703 17
a1719 9
      template<typename _Key>
	__diff_type
	_M_lookup(_Key __key, __diff_type __not_found) const
	{
	  auto __ukey = static_cast<make_unsigned_t<_Key>>(__key);
	  if (__ukey >= _Len)
	    return __not_found;
	  return std::get<0>(_M_bad_char)[__ukey];
	}
d1721 5
a1725 2
      const _Pred&
      _M_pred() const { return std::get<1>(_M_bad_char); }
d1727 7
a1733 1
      tuple<_GLIBCXX_STD_C::array<_Tp, _Len>, _Pred> _M_bad_char;
d1736 5
a1740 2
  template<typename _Pred>
    struct __is_std_equal_to : false_type { };
d1742 8
a1749 2
  template<>
    struct __is_std_equal_to<equal_to<void>> : true_type { };
d1751 3
a1753 16
  // Use __boyer_moore_array_base when pattern consists of narrow characters
  // and uses std::equal_to as the predicate.
  template<typename _RAIter, typename _Hash, typename _Pred,
           typename _Val = typename iterator_traits<_RAIter>::value_type,
	   typename _Diff = typename iterator_traits<_RAIter>::difference_type>
    using __boyer_moore_base_t
      = conditional_t<sizeof(_Val) == 1 && is_integral<_Val>::value
		      && __is_std_equal_to<_Pred>::value,
		      __boyer_moore_array_base<_Diff, 256, _Pred>,
		      __boyer_moore_map_base<_Val, _Diff, _Hash, _Pred>>;

  template<typename _RAIter, typename _Hash
	     = hash<typename iterator_traits<_RAIter>::value_type>,
	   typename _BinaryPredicate = equal_to<>>
    class boyer_moore_searcher
    : __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>
d1755 1
a1755 2
      using _Base = __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>;
      using typename _Base::__diff_type;
d1757 16
a1772 9
    public:
      boyer_moore_searcher(_RAIter __pat_first, _RAIter __pat_last,
			   _Hash __hf = _Hash(),
			   _BinaryPredicate __pred = _BinaryPredicate());

      template<typename _RandomAccessIterator2>
        pair<_RandomAccessIterator2, _RandomAccessIterator2>
	operator()(_RandomAccessIterator2 __first,
		   _RandomAccessIterator2 __last) const;
d1774 3
a1776 4
    private:
      bool
      _M_is_prefix(_RAIter __word, __diff_type __len,
		   __diff_type __pos)
d1778 2
a1779 6
	const auto& __pred = this->_M_pred();
	__diff_type __suffixlen = __len - __pos;
	for (__diff_type __i = 0; __i < __suffixlen; ++__i)
	  if (!__pred(__word[__i], __word[__pos + __i]))
	    return false;
	return true;
d1781 10
d1792 4
a1795 3
      __diff_type
      _M_suffix_length(_RAIter __word, __diff_type __len,
		       __diff_type __pos)
d1797 1
a1797 4
	const auto& __pred = this->_M_pred();
	__diff_type __i = 0;
	while (__pred(__word[__pos - __i], __word[__len - 1 - __i])
	       && __i < __pos)
d1799 12
a1810 1
	    ++__i;
d1812 8
a1819 1
	return __i;
d1821 1
d1823 23
d1847 4
a1850 17
	__diff_type
	_M_bad_char_shift(_Tp __c) const
	{ return this->_M_lookup(__c, _M_pat_end - _M_pat); }

      _RAIter _M_pat;
      _RAIter _M_pat_end;
      _GLIBCXX_STD_C::vector<__diff_type> _M_good_suffix;
    };

  template<typename _RAIter, typename _Hash
	     = hash<typename iterator_traits<_RAIter>::value_type>,
	   typename _BinaryPredicate = equal_to<>>
    class boyer_moore_horspool_searcher
    : __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>
    {
      using _Base = __boyer_moore_base_t<_RAIter, _Hash, _BinaryPredicate>;
      using typename _Base::__diff_type;
d1853 142
a1994 8
      boyer_moore_horspool_searcher(_RAIter __pat,
				    _RAIter __pat_end,
				    _Hash __hf = _Hash(),
				    _BinaryPredicate __pred
				    = _BinaryPredicate())
      : _Base(__pat, __pat_end - __pat, std::move(__hf), std::move(__pred)),
	_M_pat(__pat), _M_pat_end(__pat_end)
      { }
d1996 7
a2002 21
      template<typename _RandomAccessIterator2>
        pair<_RandomAccessIterator2, _RandomAccessIterator2>
	operator()(_RandomAccessIterator2 __first,
		   _RandomAccessIterator2 __last) const
	{
	  const auto& __pred = this->_M_pred();
	  auto __patlen = _M_pat_end - _M_pat;
	  if (__patlen == 0)
	    return std::make_pair(__first, __first);
	  auto __len = __last - __first;
	  while (__len >= __patlen)
	    {
	      for (auto __scan = __patlen - 1;
		   __pred(__first[__scan], _M_pat[__scan]); --__scan)
		if (__scan == 0)
		  return std::make_pair(__first, __first + __patlen);
	      auto __shift = _M_bad_char_shift(__first[__patlen - 1]);
	      __len -= __shift;
	      __first += __shift;
	    }
	  return std::make_pair(__last, __last);
d2005 80
d2086 15
a2100 32
      template<typename _Tp>
	__diff_type
	_M_bad_char_shift(_Tp __c) const
	{ return this->_M_lookup(__c, _M_pat_end - _M_pat); }

      _RAIter _M_pat;
      _RAIter _M_pat_end;
    };

  template<typename _RAIter, typename _Hash, typename _BinaryPredicate>
    boyer_moore_searcher<_RAIter, _Hash, _BinaryPredicate>::
    boyer_moore_searcher(_RAIter __pat, _RAIter __pat_end,
			 _Hash __hf, _BinaryPredicate __pred)
    : _Base(__pat, __pat_end - __pat, std::move(__hf), std::move(__pred)),
      _M_pat(__pat), _M_pat_end(__pat_end), _M_good_suffix(__pat_end - __pat)
    {
      auto __patlen = __pat_end - __pat;
      if (__patlen == 0)
	return;
      __diff_type __last_prefix = __patlen - 1;
      for (__diff_type __p = __patlen - 1; __p >= 0; --__p)
	{
	  if (_M_is_prefix(__pat, __patlen, __p + 1))
	    __last_prefix = __p + 1;
	  _M_good_suffix[__p] = __last_prefix + (__patlen - 1 - __p);
	}
      for (__diff_type __p = 0; __p < __patlen - 1; ++__p)
	{
	  auto __slen = _M_suffix_length(__pat, __patlen, __p);
	  auto __pos = __patlen - 1 - __slen;
	  if (!__pred(__pat[__p - __slen], __pat[__pos]))
	    _M_good_suffix[__pos] = __patlen - 1 - __p + __slen;
d2104 37
a2140 28
  template<typename _RAIter, typename _Hash, typename _BinaryPredicate>
  template<typename _RandomAccessIterator2>
    pair<_RandomAccessIterator2, _RandomAccessIterator2>
    boyer_moore_searcher<_RAIter, _Hash, _BinaryPredicate>::
    operator()(_RandomAccessIterator2 __first,
	       _RandomAccessIterator2 __last) const
    {
      auto __patlen = _M_pat_end - _M_pat;
      if (__patlen == 0)
	return std::make_pair(__first, __first);
      const auto& __pred = this->_M_pred();
      __diff_type __i = __patlen - 1;
      auto __stringlen = __last - __first;
      while (__i < __stringlen)
	{
	  __diff_type __j = __patlen - 1;
	  while (__j >= 0 && __pred(__first[__i], _M_pat[__j]))
	    {
	      --__i;
	      --__j;
	    }
	  if (__j < 0)
	    {
	      const auto __match = __first + __i + 1;
	      return std::make_pair(__match, __match + __patlen);
	    }
	  __i += std::max(_M_bad_char_shift(__first[__i]),
			  _M_good_suffix[__j]);
d2142 2
a2143 1
      return std::make_pair(__last, __last);
d2146 87
a2232 2
#endif // C++17
#endif // C++14
@


1.1.1.11
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) 2001-2018 Free Software Foundation, Inc.
d58 1
a58 2
#include <bits/refwrap.h>	// std::reference_wrapper and _Mem_fn_traits
#include <bits/std_function.h>	// std::function
d85 62
d262 2
d270 1
d304 1
d307 2
d950 1
a950 23
  template<typename _Tp, typename _Pred>
    struct __is_byte_like : false_type { };

  template<typename _Tp>
    struct __is_byte_like<_Tp, equal_to<_Tp>>
    : __bool_constant<sizeof(_Tp) == 1 && is_integral<_Tp>::value> { };

  template<typename _Tp>
    struct __is_byte_like<_Tp, equal_to<void>>
    : __bool_constant<sizeof(_Tp) == 1 && is_integral<_Tp>::value> { };

#if __cplusplus >= 201703L
  // Declare std::byte (full definition is in <cstddef>).
  enum class byte : unsigned char;

  template<>
    struct __is_byte_like<byte, equal_to<byte>>
    : true_type { };

  template<>
    struct __is_byte_like<byte, equal_to<void>>
    : true_type { };

d1059 6
d1066 1
a1066 1
  // (or std::byte) and uses std::equal_to as the predicate.
d1071 2
a1072 1
      = conditional_t<__is_byte_like<_Val, _Pred>::value,
@


1.1.1.12
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) 2001-2017 Free Software Foundation, Inc.
d58 2
a59 1
#include <bits/std_function.h>
a85 62
  template<typename... _Types>
    struct _Pack : integral_constant<size_t, sizeof...(_Types)>
    { };

  template<typename _From, typename _To, bool = _From::value == _To::value>
    struct _AllConvertible : false_type
    { };

  template<typename... _From, typename... _To>
    struct _AllConvertible<_Pack<_From...>, _Pack<_To...>, true>
    : __and_<is_convertible<_From, _To>...>
    { };

  template<typename _Tp1, typename _Tp2>
    using _NotSame = __not_<is_same<typename std::decay<_Tp1>::type,
				    typename std::decay<_Tp2>::type>>;

  template<typename _Signature>
    struct _Mem_fn_traits;

  template<typename _Res, typename _Class, typename... _ArgTypes>
    struct _Mem_fn_traits_base
    {
      using __result_type = _Res;
      using __maybe_type
	= _Maybe_unary_or_binary_function<_Res, _Class*, _ArgTypes...>;
      using __arity = integral_constant<size_t, sizeof...(_ArgTypes)>;
    };

#define _GLIBCXX_MEM_FN_TRAITS2(_CV, _REF, _LVAL, _RVAL)		\
  template<typename _Res, typename _Class, typename... _ArgTypes>	\
    struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes...) _CV _REF>	\
    : _Mem_fn_traits_base<_Res, _CV _Class, _ArgTypes...>		\
    {									\
      using __vararg = false_type;					\
    };									\
  template<typename _Res, typename _Class, typename... _ArgTypes>	\
    struct _Mem_fn_traits<_Res (_Class::*)(_ArgTypes... ...) _CV _REF>	\
    : _Mem_fn_traits_base<_Res, _CV _Class, _ArgTypes...>		\
    {									\
      using __vararg = true_type;					\
    };

#define _GLIBCXX_MEM_FN_TRAITS(_REF, _LVAL, _RVAL)		\
  _GLIBCXX_MEM_FN_TRAITS2(		, _REF, _LVAL, _RVAL)	\
  _GLIBCXX_MEM_FN_TRAITS2(const		, _REF, _LVAL, _RVAL)	\
  _GLIBCXX_MEM_FN_TRAITS2(volatile	, _REF, _LVAL, _RVAL)	\
  _GLIBCXX_MEM_FN_TRAITS2(const volatile, _REF, _LVAL, _RVAL)

_GLIBCXX_MEM_FN_TRAITS( , true_type, true_type)
_GLIBCXX_MEM_FN_TRAITS(&, true_type, false_type)
_GLIBCXX_MEM_FN_TRAITS(&&, false_type, true_type)

#if __cplusplus > 201402L
_GLIBCXX_MEM_FN_TRAITS(noexcept, true_type, true_type)
_GLIBCXX_MEM_FN_TRAITS(& noexcept, true_type, false_type)
_GLIBCXX_MEM_FN_TRAITS(&& noexcept, false_type, true_type)
#endif

#undef _GLIBCXX_MEM_FN_TRAITS
#undef _GLIBCXX_MEM_FN_TRAITS2

a200 2
  _GLIBCXX_END_NAMESPACE_VERSION

a206 1
  _GLIBCXX_BEGIN_NAMESPACE_VERSION
a239 1
  _GLIBCXX_END_NAMESPACE_VERSION
a241 2
  _GLIBCXX_BEGIN_NAMESPACE_VERSION

d883 23
a905 1
#if __cplusplus > 201402L
a1013 6
  template<typename _Pred>
    struct __is_std_equal_to : false_type { };

  template<>
    struct __is_std_equal_to<equal_to<void>> : true_type { };

d1015 1
a1015 1
  // and uses std::equal_to as the predicate.
d1020 1
a1020 2
      = conditional_t<sizeof(_Val) == 1 && is_integral<_Val>::value
		      && __is_std_equal_to<_Pred>::value,
@


1.1.1.13
log
@re-import GCC 8.4.0.
@
text
@d3 1
a3 1
// Copyright (C) 2001-2018 Free Software Foundation, Inc.
d58 1
a58 2
#include <bits/refwrap.h>	// std::reference_wrapper and _Mem_fn_traits
#include <bits/std_function.h>	// std::function
d85 62
d262 2
d270 1
d304 1
d307 2
d950 1
a950 23
  template<typename _Tp, typename _Pred>
    struct __is_byte_like : false_type { };

  template<typename _Tp>
    struct __is_byte_like<_Tp, equal_to<_Tp>>
    : __bool_constant<sizeof(_Tp) == 1 && is_integral<_Tp>::value> { };

  template<typename _Tp>
    struct __is_byte_like<_Tp, equal_to<void>>
    : __bool_constant<sizeof(_Tp) == 1 && is_integral<_Tp>::value> { };

#if __cplusplus >= 201703L
  // Declare std::byte (full definition is in <cstddef>).
  enum class byte : unsigned char;

  template<>
    struct __is_byte_like<byte, equal_to<byte>>
    : true_type { };

  template<>
    struct __is_byte_like<byte, equal_to<void>>
    : true_type { };

d1059 6
d1066 1
a1066 1
  // (or std::byte) and uses std::equal_to as the predicate.
d1071 2
a1072 1
      = conditional_t<__is_byte_like<_Val, _Pred>::value,
@


1.1.1.14
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) 2001-2019 Free Software Foundation, Inc.
a838 100
#if __cplusplus > 201703L
#define __cpp_lib_bind_front 201907L

  template<typename _Fd, typename... _BoundArgs>
    struct _Bind_front
    {
      static_assert(is_move_constructible_v<_Fd>);
      static_assert((is_move_constructible_v<_BoundArgs> && ...));

      // First parameter is to ensure this constructor is never used
      // instead of the copy/move constructor.
      template<typename _Fn, typename... _Args>
	explicit constexpr
	_Bind_front(int, _Fn&& __fn, _Args&&... __args)
	noexcept(__and_<is_nothrow_constructible<_Fd, _Fn>,
			is_nothrow_constructible<_BoundArgs, _Args>...>::value)
	: _M_fd(std::forward<_Fn>(__fn)),
	  _M_bound_args(std::forward<_Args>(__args)...)
	{ static_assert(sizeof...(_Args) == sizeof...(_BoundArgs)); }

      _Bind_front(const _Bind_front&) = default;
      _Bind_front(_Bind_front&&) = default;
      _Bind_front& operator=(const _Bind_front&) = default;
      _Bind_front& operator=(_Bind_front&&) = default;
      ~_Bind_front() = default;

      template<typename... _CallArgs>
	constexpr
	invoke_result_t<_Fd&, _BoundArgs&..., _CallArgs...>
	operator()(_CallArgs&&... __call_args) &
	noexcept(is_nothrow_invocable_v<_Fd&, _BoundArgs&..., _CallArgs...>)
	{
	  return _S_call(*this, _BoundIndices(),
	      std::forward<_CallArgs>(__call_args)...);
	}

      template<typename... _CallArgs>
	constexpr
	invoke_result_t<const _Fd&, const _BoundArgs&..., _CallArgs...>
	operator()(_CallArgs&&... __call_args) const &
	noexcept(is_nothrow_invocable_v<const _Fd&, const _BoundArgs&...,
					_CallArgs...>)
	{
	  return _S_call(*this, _BoundIndices(),
	      std::forward<_CallArgs>(__call_args)...);
	}

      template<typename... _CallArgs>
	constexpr
	invoke_result_t<_Fd, _BoundArgs..., _CallArgs...>
	operator()(_CallArgs&&... __call_args) &&
	noexcept(is_nothrow_invocable_v<_Fd, _BoundArgs..., _CallArgs...>)
	{
	  return _S_call(std::move(*this), _BoundIndices(),
	      std::forward<_CallArgs>(__call_args)...);
	}

      template<typename... _CallArgs>
	constexpr
	invoke_result_t<const _Fd, const _BoundArgs..., _CallArgs...>
	operator()(_CallArgs&&... __call_args) const &&
	noexcept(is_nothrow_invocable_v<const _Fd, const _BoundArgs...,
					_CallArgs...>)
	{
	  return _S_call(std::move(*this), _BoundIndices(),
	      std::forward<_CallArgs>(__call_args)...);
	}

    private:
      using _BoundIndices = index_sequence_for<_BoundArgs...>;

      template<typename _Tp, size_t... _Ind, typename... _CallArgs>
	static constexpr
	decltype(auto)
	_S_call(_Tp&& __g, index_sequence<_Ind...>, _CallArgs&&... __call_args)
	{
	  return std::invoke(std::forward<_Tp>(__g)._M_fd,
	      std::get<_Ind>(std::forward<_Tp>(__g)._M_bound_args)...,
	      std::forward<_CallArgs>(__call_args)...);
	}

      _Fd _M_fd;
      std::tuple<_BoundArgs...> _M_bound_args;
    };

  template<typename _Fn, typename... _Args>
    using _Bind_front_t
      = _Bind_front<decay_t<_Fn>, decay_t<_Args>...>;

  template<typename _Fn, typename... _Args>
    _Bind_front_t<_Fn, _Args...>
    bind_front(_Fn&& __fn, _Args&&... __args)
    noexcept(is_nothrow_constructible_v<int, _Bind_front_t<_Fn, _Args...>,
					_Fn, _Args...>)
    {
      return _Bind_front_t<_Fn, _Args...>(0, std::forward<_Fn>(__fn),
					  std::forward<_Args>(__args)...);
    }
#endif

@


1.1.1.15
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) 2001-2020 Free Software Foundation, Inc.
a66 4
#if __cplusplus > 201703L
# include <bits/range_cmp.h>
# include <compare>
#endif
d72 2
a73 5
#if __cplusplus >= 201703L
# define __cpp_lib_invoke 201411L
# if __cplusplus > 201703L
#  define __cpp_lib_constexpr_functional 201907L
# endif
d77 1
a77 1
    inline _GLIBCXX20_CONSTEXPR invoke_result_t<_Callable, _Args...>
d84 1
a84 1
#endif // C++17
a108 1
	_GLIBCXX20_CONSTEXPR
a133 1
	_GLIBCXX20_CONSTEXPR
a158 1
    _GLIBCXX20_CONSTEXPR
d202 1
a202 1
   *  @@brief ISO C++ 2011 namespace for std::bind placeholders.
a293 1
	_GLIBCXX20_CONSTEXPR
a309 1
	_GLIBCXX20_CONSTEXPR
a324 1
	_GLIBCXX20_CONSTEXPR
a343 1
	_GLIBCXX20_CONSTEXPR
a361 1
	_GLIBCXX20_CONSTEXPR
a396 1
	_GLIBCXX20_CONSTEXPR
a406 1
	_GLIBCXX20_CONSTEXPR
d461 1
a461 2
	explicit _GLIBCXX20_CONSTEXPR
	_Bind(const _Functor& __f, _Args&&... __args)
d466 1
a466 2
	explicit _GLIBCXX20_CONSTEXPR
	_Bind(_Functor&& __f, _Args&&... __args)
d471 4
a474 1
      _Bind(_Bind&&) = default;
a478 1
	_GLIBCXX20_CONSTEXPR
a489 1
	_GLIBCXX20_CONSTEXPR
d542 9
d553 1
a553 2
	_GLIBCXX20_CONSTEXPR
	_Res
d556 1
a556 1
	  return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>()
d560 9
d571 1
a571 2
	_GLIBCXX20_CONSTEXPR
	_Res
d574 1
a574 1
	  return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>()
d578 9
d589 1
a589 2
	_GLIBCXX20_CONSTEXPR
	_Res
d592 1
a592 1
	  return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>()
d596 9
d607 1
a607 2
	_GLIBCXX20_CONSTEXPR
	_Res
d611 1
a611 1
	  return std::__invoke_r<_Res>(_M_f, _Mu<_Bound_args>()
d615 10
d629 1
a629 2
	explicit _GLIBCXX20_CONSTEXPR
	_Bind_result(const _Functor& __f, _Args&&... __args)
d634 1
a634 2
	explicit _GLIBCXX20_CONSTEXPR
	_Bind_result(_Functor&& __f, _Args&&... __args)
d639 4
a642 1
      _Bind_result(_Bind_result&&) = default;
a645 1
	_GLIBCXX20_CONSTEXPR
a655 1
	_GLIBCXX20_CONSTEXPR
d806 1
a806 1
    inline _GLIBCXX20_CONSTEXPR typename
d830 1
a830 1
    inline _GLIBCXX20_CONSTEXPR
d929 1
a929 1
    constexpr _Bind_front_t<_Fn, _Args...>
d931 2
a932 2
    noexcept(is_nothrow_constructible_v<_Bind_front_t<_Fn, _Args...>,
					int, _Fn, _Args...>)
a952 1
	constexpr
a964 1
	_GLIBCXX20_CONSTEXPR						\
d977 1
a977 1
#undef _GLIBCXX_NOT_FN_CALL_OP
a1008 1
    _GLIBCXX20_CONSTEXPR
a1022 1
      _GLIBCXX20_CONSTEXPR
d1030 1
a1030 2
	_GLIBCXX20_CONSTEXPR
	pair<_ForwardIterator2, _ForwardIterator2>
@


1.1.1.16
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) 2001-2022 Free Software Foundation, Inc.
d64 1
d68 1
a68 1
# include <bits/ranges_cmp.h>
a70 5
#if __cplusplus > 202002L
# include <bits/move_only_function.h>
#endif

#endif // C++11
a75 8
  /** @@brief The type of placeholder objects defined by libstdc++.
   *  @@ingroup binders
   *  @@since C++11
   */
  template<int _Num> struct _Placeholder { };

#if __cplusplus >= 201103L

d82 1
a82 11
  /** Invoke a callable object.
   *
   * `std::invoke` takes a callable object as its first argument and calls it
   * with the remaining arguments. The callable object can be a pointer or
   * reference to a function, a lambda closure, a class with `operator()`,
   * or even a pointer-to-member.  For a pointer-to-member the first argument
   * must be a reference or pointer to the object that the pointer-to-member
   * will be applied to.
   *
   *  @@since C++17
   */
a90 21

#if __cplusplus > 202002L
# define __cpp_lib_invoke_r 202106L

  /** Invoke a callable object and convert the result to `_Res`.
   *
   * `std::invoke_r<R>(f, args...)` is equivalent to `std::invoke(f, args...)`
   * with the result implicitly converted to `R`.
   *
   *  @@since C++23
   */
  template<typename _Res, typename _Callable, typename... _Args>
    requires is_invocable_r_v<_Res, _Callable, _Args...>
    constexpr _Res
    invoke_r(_Callable&& __fn, _Args&&... __args)
    noexcept(is_nothrow_invocable_r_v<_Res, _Callable, _Args...>)
    {
      return std::__invoke_r<_Res>(std::forward<_Callable>(__fn),
				   std::forward<_Args>(__args)...);
    }
#endif // C++23
a92 2
  /// @@cond undocumented

a158 1
  /// @@endcond
d163 3
a165 21
   * @@brief Returns a function object that forwards to the member pointer
   * pointer `pm`.
   *
   * This allows a pointer-to-member to be transformed into a function object
   * that can be called with an object expression as its first argument.
   *
   * For a pointer-to-data-member the result must be called with exactly one
   * argument, the object expression that would be used as the first operand
   * in a `obj.*memptr` or `objp->*memptr` expression.
   *
   * For a pointer-to-member-function the result must be called with an object
   * expression and any additional arguments to pass to the member function,
   * as in an expression like `(obj.*memfun)(args...)` or
   * `(objp->*memfun)(args...)`.
   *
   * The object expression can be a pointer, reference, `reference_wrapper`,
   * or smart pointer, and the call wrapper will dereference it as needed
   * to apply the pointer-to-member.
   *
   * @@ingroup functors
   * @@since C++11
d176 3
a178 5
   * @@brief Trait that identifies a bind expression.
   * 
   * Determines if the given type `_Tp` is a function object that
   * should be treated as a subexpression when evaluating calls to
   * function objects returned by `std::bind`.
d180 2
a181 3
   * C++11 [func.bind.isbind].
   * @@ingroup binders
   * @@since C++11
a192 1
   *  @@since C++11
d206 5
a213 1
   *  @@since C++11
a255 1
   *  @@since C++11
a266 1
  /// @@cond undocumented
a395 13
  /// @@endcond

#if __cplusplus == 201703L && _GLIBCXX_USE_DEPRECATED
# define _GLIBCXX_VOLATILE_BIND
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 2487. bind() should be const-overloaded, not cv-overloaded
# define _GLIBCXX_DEPR_BIND \
      [[deprecated("std::bind does not support volatile in C++17")]]
#elif __cplusplus < 201703L
# define _GLIBCXX_VOLATILE_BIND
# define _GLIBCXX_DEPR_BIND
#endif

d398 1
a398 1
    class _Bind;
a431 1
#ifdef _GLIBCXX_VOLATILE_BIND
a452 1
#endif // volatile
d516 6
a521 1
#ifdef _GLIBCXX_VOLATILE_BIND
a544 1
#endif // volatile
d549 1
a549 1
    class _Bind_result;
a579 1
#ifdef _GLIBCXX_VOLATILE_BIND
d582 1
d592 1
a599 1
#endif // volatile
a640 1
#ifdef _GLIBCXX_VOLATILE_BIND
a661 4
#else
      template<typename... _Args>
	void operator()(_Args&&...) const volatile = delete;
#endif // volatile
a662 2

#undef _GLIBCXX_VOLATILE_BIND
a780 1
   *  @@since C++11
a804 1
   *  @@since C++11
a904 9
  /** Create call wrapper by partial application of arguments to function.
   *
   * The result of `std::bind_front(f, args...)` is a function object that
   * stores `f` and the bound arguments, `args...`. When that function
   * object is invoked with `call_args...` it returns the result of calling
   * `f(args..., call_args...)`.
   *
   *  @@since C++20
   */
d914 1
a914 1
#endif // C++20
d985 2
a986 14
  // [func.not_fn] Function template not_fn
#define __cpp_lib_not_fn 201603L
  /** Wrap a function object to create one that negates its result.
   *
   * The function template `std::not_fn` creates a "forwarding call wrapper",
   * which is a function object that wraps another function object and
   * when called, forwards its arguments to the wrapped function object.
   *
   * The result of invoking the wrapper is the negation (using `!`) of
   * the wrapped function object.
   *
   *  @@ingroup functors
   *  @@since C++17
   */
d997 1
a997 1
#define __cpp_lib_boyer_moore_searcher 201603L
d1065 1
a1065 1
	: _M_bad_char{ array<_Tp, _Len>{}, std::move(__pred) }
d1093 1
a1093 1
      tuple<array<_Tp, _Len>, _Pred> _M_bad_char;
d1102 3
a1104 3
      = __conditional_t<__is_byte_like<_Val, _Pred>::value,
			__boyer_moore_array_base<_Diff, 256, _Pred>,
			__boyer_moore_map_base<_Val, _Diff, _Hash, _Pred>>;
a1273 1
#endif // C++11
d1278 2
@


1.1.1.17
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) 2001-2024 Free Software Foundation, Inc.
d49 1
a49 1
#include <bits/stl_function.h> // std::equal_to, std::unary_function etc.
d53 1
d59 6
a64 10
#if _GLIBCXX_HOSTED
# include <bits/std_function.h>	// std::function
#endif
#if __cplusplus >= 201703L
# if _GLIBCXX_HOSTED
#  include <unordered_map>
#  include <vector>
#  include <array>
# endif
# include <bits/stl_algobase.h> // std::search
d66 2
a67 2
#if __cplusplus >= 202002L
# include <bits/ranges_cmp.h> // std::identity, ranges::equal_to etc.
d70 1
a70 1
#if __cplusplus > 202002L && _GLIBCXX_HOSTED
a73 13
#define __glibcxx_want_boyer_moore_searcher
#define __glibcxx_want_bind_front
#define __glibcxx_want_bind_back
#define __glibcxx_want_constexpr_functional
#define __glibcxx_want_invoke
#define __glibcxx_want_invoke_r
#define __glibcxx_want_move_only_function
#define __glibcxx_want_not_fn
#define __glibcxx_want_ranges
#define __glibcxx_want_reference_wrapper
#define __glibcxx_want_transparent_operators
#include <bits/version.h>

d86 7
a92 1
#ifdef __cpp_lib_invoke // C++ >= 17
a112 1
#endif
d114 2
a115 1
#ifdef __cpp_lib_invoke_r // C++ >= 23
d133 2
a134 1
#endif // __cpp_lib_invoke_r
a137 1
#if __cplusplus >= 201103L
d241 1
a241 1
   *
d285 29
a313 37
#if __cpp_inline_variables
#  define _GLIBCXX_PLACEHOLDER inline
#else
#  define _GLIBCXX_PLACEHOLDER extern
#endif

    _GLIBCXX_PLACEHOLDER const _Placeholder<1> _1;
    _GLIBCXX_PLACEHOLDER const _Placeholder<2> _2;
    _GLIBCXX_PLACEHOLDER const _Placeholder<3> _3;
    _GLIBCXX_PLACEHOLDER const _Placeholder<4> _4;
    _GLIBCXX_PLACEHOLDER const _Placeholder<5> _5;
    _GLIBCXX_PLACEHOLDER const _Placeholder<6> _6;
    _GLIBCXX_PLACEHOLDER const _Placeholder<7> _7;
    _GLIBCXX_PLACEHOLDER const _Placeholder<8> _8;
    _GLIBCXX_PLACEHOLDER const _Placeholder<9> _9;
    _GLIBCXX_PLACEHOLDER const _Placeholder<10> _10;
    _GLIBCXX_PLACEHOLDER const _Placeholder<11> _11;
    _GLIBCXX_PLACEHOLDER const _Placeholder<12> _12;
    _GLIBCXX_PLACEHOLDER const _Placeholder<13> _13;
    _GLIBCXX_PLACEHOLDER const _Placeholder<14> _14;
    _GLIBCXX_PLACEHOLDER const _Placeholder<15> _15;
    _GLIBCXX_PLACEHOLDER const _Placeholder<16> _16;
    _GLIBCXX_PLACEHOLDER const _Placeholder<17> _17;
    _GLIBCXX_PLACEHOLDER const _Placeholder<18> _18;
    _GLIBCXX_PLACEHOLDER const _Placeholder<19> _19;
    _GLIBCXX_PLACEHOLDER const _Placeholder<20> _20;
    _GLIBCXX_PLACEHOLDER const _Placeholder<21> _21;
    _GLIBCXX_PLACEHOLDER const _Placeholder<22> _22;
    _GLIBCXX_PLACEHOLDER const _Placeholder<23> _23;
    _GLIBCXX_PLACEHOLDER const _Placeholder<24> _24;
    _GLIBCXX_PLACEHOLDER const _Placeholder<25> _25;
    _GLIBCXX_PLACEHOLDER const _Placeholder<26> _26;
    _GLIBCXX_PLACEHOLDER const _Placeholder<27> _27;
    _GLIBCXX_PLACEHOLDER const _Placeholder<28> _28;
    _GLIBCXX_PLACEHOLDER const _Placeholder<29> _29;

#undef _GLIBCXX_PLACEHOLDER
d542 1
a542 1
	  = __invoke_result_t<_Fn&, _Mu_type<_BArgs, _CallArgs>&&...>;
d902 2
a903 1
#ifdef __cpp_lib_bind_front // C++ >= 20
d922 6
a927 12
#if __cpp_explicit_this_parameter
      template<typename _Self, typename... _CallArgs>
	constexpr
	invoke_result_t<__like_t<_Self, _Fd>, __like_t<_Self, _BoundArgs>..., _CallArgs...>
	operator()(this _Self&& __self, _CallArgs&&... __call_args)
	noexcept(is_nothrow_invocable_v<__like_t<_Self, _Fd>,
					__like_t<_Self, _BoundArgs>..., _CallArgs...>)
	{
	  return _S_call(__like_t<_Self, _Bind_front>(__self), _BoundIndices(),
			 std::forward<_CallArgs>(__call_args)...);
	}
#else
a928 1
	requires true
a938 1
	requires true
a949 1
	requires true
a959 1
	requires true
a969 13
      template<typename... _CallArgs>
	void operator()(_CallArgs&&...) & = delete;

      template<typename... _CallArgs>
	void operator()(_CallArgs&&...) const & = delete;

      template<typename... _CallArgs>
	void operator()(_CallArgs&&...) && = delete;

      template<typename... _CallArgs>
	void operator()(_CallArgs&&...) const && = delete;
#endif

d983 2
a984 2
      [[no_unique_address]] _Fd _M_fd;
      [[no_unique_address]] std::tuple<_BoundArgs...> _M_bound_args;
d988 2
a989 1
    using _Bind_front_t = _Bind_front<decay_t<_Fn>, decay_t<_Args>...>;
d1009 1
a1009 70
#endif // __cpp_lib_bind_front

#ifdef __cpp_lib_bind_back // C++ >= 23
  template<typename _Fd, typename... _BoundArgs>
    struct _Bind_back
    {
      static_assert(is_move_constructible_v<_Fd>);
      static_assert((is_move_constructible_v<_BoundArgs> && ...));

      // First parameter is to ensure this constructor is never used
      // instead of the copy/move constructor.
      template<typename _Fn, typename... _Args>
	explicit constexpr
	_Bind_back(int, _Fn&& __fn, _Args&&... __args)
	noexcept(__and_<is_nothrow_constructible<_Fd, _Fn>,
			is_nothrow_constructible<_BoundArgs, _Args>...>::value)
	: _M_fd(std::forward<_Fn>(__fn)),
	  _M_bound_args(std::forward<_Args>(__args)...)
	{ static_assert(sizeof...(_Args) == sizeof...(_BoundArgs)); }

      template<typename _Self, typename... _CallArgs>
	constexpr
	invoke_result_t<__like_t<_Self, _Fd>, _CallArgs..., __like_t<_Self, _BoundArgs>...>
	operator()(this _Self&& __self, _CallArgs&&... __call_args)
	noexcept(is_nothrow_invocable_v<__like_t<_Self, _Fd>,
					_CallArgs..., __like_t<_Self, _BoundArgs>...>)
	{
	  return _S_call(__like_t<_Self, _Bind_back>(__self), _BoundIndices(),
			 std::forward<_CallArgs>(__call_args)...);
	}

    private:
      using _BoundIndices = index_sequence_for<_BoundArgs...>;

      template<typename _Tp, size_t... _Ind, typename... _CallArgs>
	static constexpr
	decltype(auto)
	_S_call(_Tp&& __g, index_sequence<_Ind...>, _CallArgs&&... __call_args)
	{
	  return std::invoke(std::forward<_Tp>(__g)._M_fd,
	      std::forward<_CallArgs>(__call_args)...,
	      std::get<_Ind>(std::forward<_Tp>(__g)._M_bound_args)...);
	}

      [[no_unique_address]] _Fd _M_fd;
      [[no_unique_address]] std::tuple<_BoundArgs...> _M_bound_args;
    };

  template<typename _Fn, typename... _Args>
    using _Bind_back_t = _Bind_back<decay_t<_Fn>, decay_t<_Args>...>;

  /** Create call wrapper by partial application of arguments to function.
   *
   * The result of `std::bind_back(f, args...)` is a function object that
   * stores `f` and the bound arguments, `args...`. When that function
   * object is invoked with `call_args...` it returns the result of calling
   * `f(call_args..., args...)`.
   *
   *  @@since C++23
   */
  template<typename _Fn, typename... _Args>
    constexpr _Bind_back_t<_Fn, _Args...>
    bind_back(_Fn&& __fn, _Args&&... __args)
    noexcept(is_nothrow_constructible_v<_Bind_back_t<_Fn, _Args...>,
					int, _Fn, _Args...>)
    {
      return _Bind_back_t<_Fn, _Args...>(0, std::forward<_Fn>(__fn),
					 std::forward<_Args>(__args)...);
    }
#endif // __cpp_lib_bind_back
d1037 1
a1037 2
      template<typename... _Args,					\
	       typename = enable_if_t<__is_invocable<_Fn _QUALS, _Args...>::value>> \
d1046 1
a1046 6
	}								\
									\
      template<typename... _Args,					\
	       typename = enable_if_t<!__is_invocable<_Fn _QUALS, _Args...>::value>> \
	void operator()(_Args&&... __args) _QUALS = delete;

a1078 1
#endif
d1081 1
a1081 1
#ifdef __cpp_lib_not_fn // C++ >= 17
a1101 1
#endif
a1102 1
#if __cplusplus >= 201703L
d1104 1
a1135 2
#ifdef __cpp_lib_boyer_moore_searcher // C++ >= 17 && HOSTED

a1377 1
#endif // __cpp_lib_boyer_moore_searcher
@


