Commit 9eeea761 by Douglas Gregor Committed by Doug Gregor

Makefile.in: Regenerate.

2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>

	* include/Makefile.in: Regenerate.
	* include/tr1/mu_iterate.h: Remove.
	* include/tr1/tuple (_Tuple_impl): New.
	(tuple): Make variadic, re-implement as shell over _Tuple_impl.
	(0-element tuple): Basis case.
	(2-element tuple): Handle pair methods.
	(__get_helper): Remove.
	(tuple_element): Reimplement with variadic templates.
	(tuple_size): Ditto.
	(get): Ditto.
	(operator==): Use variadic templates in the signature.
	(operator<): Ditto.
	(operator!=): Ditto.
	(operator>): Ditto.
	(operator<=): Ditto.
	(operator>=): Ditto.
	(__stripped_tuple_type): Remove; we've inlined its behavior.
	(make_tuple): Reimplement with variadic templates.
	(tie): Ditto.
	* include/tr1/tuple_iterate.h: Remove.
	* include/tr1/bind_repeat.h: Remove.
	* include/tr1/ref_wrap_iterate.h: Remove.
	* include/tr1/bind_iterate.h: Remove.
	* include/tr1/functional (_Weak_result_type): Add variadic
	partial specializations.
	(result_of): Ditto.
	(__invoke): Reimplement using variadic templates.
	(reference_wrapper): Reimplement operator() with variadic
	templates.
	(_Maybe_unary_or_binary_function): New.
	(_Mem_fn): Implement for member function pointers using variadic
	templates.
	(placeholders): Define 30 placeholders.
	(_Index_tuple): New.
	(_Build_index_tuple): New.
	(_No_tuple_element): New.
	(_Safe_tuple_element_impl): New.
	(_Safe_tuple_element): New.
	(_Mu): Reimplement with variadic templates, use
	_Safe_tuple_element instead of tuple_element.
	(_Bind): Reimplement with variadic templates and tuples.
	(_Bind_result): Ditto.
	(bind): Reimplement with variadic templates.
	(_Function_handler): Ditto.
	(function): Ditto.
	* include/tr1/functional_iterate.h: Remove.
	* include/tr1/repeat.h: Remove.
	* include/Makefile.am: Don't install removed headers.

From-SVN: r122790
parent d6a85c8d
2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
* include/Makefile.in: Regenerate.
* include/tr1/mu_iterate.h: Remove.
* include/tr1/tuple (_Tuple_impl): New.
(tuple): Make variadic, re-implement as shell over _Tuple_impl.
(0-element tuple): Basis case.
(2-element tuple): Handle pair methods.
(__get_helper): Remove.
(tuple_element): Reimplement with variadic templates.
(tuple_size): Ditto.
(get): Ditto.
(operator==): Use variadic templates in the signature.
(operator<): Ditto.
(operator!=): Ditto.
(operator>): Ditto.
(operator<=): Ditto.
(operator>=): Ditto.
(__stripped_tuple_type): Remove; we've inlined its behavior.
(make_tuple): Reimplement with variadic templates.
(tie): Ditto.
* include/tr1/tuple_iterate.h: Remove.
* include/tr1/bind_repeat.h: Remove.
* include/tr1/ref_wrap_iterate.h: Remove.
* include/tr1/bind_iterate.h: Remove.
* include/tr1/functional (_Weak_result_type): Add variadic
partial specializations.
(result_of): Ditto.
(__invoke): Reimplement using variadic templates.
(reference_wrapper): Reimplement operator() with variadic
templates.
(_Maybe_unary_or_binary_function): New.
(_Mem_fn): Implement for member function pointers using variadic
templates.
(placeholders): Define 30 placeholders.
(_Index_tuple): New.
(_Build_index_tuple): New.
(_No_tuple_element): New.
(_Safe_tuple_element_impl): New.
(_Safe_tuple_element): New.
(_Mu): Reimplement with variadic templates, use
_Safe_tuple_element instead of tuple_element.
(_Bind): Reimplement with variadic templates and tuples.
(_Bind_result): Ditto.
(bind): Reimplement with variadic templates.
(_Function_handler): Ditto.
(function): Ditto.
* include/tr1/functional_iterate.h: Remove.
* include/tr1/repeat.h: Remove.
* include/Makefile.am: Don't install removed headers.
2007-03-06 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/28080 (partial)
......
......@@ -532,8 +532,6 @@ tr1_srcdir = ${glibcxx_srcdir}/include/tr1
tr1_builddir = ./tr1
tr1_headers = \
${tr1_srcdir}/array \
${tr1_srcdir}/bind_repeat.h \
${tr1_srcdir}/bind_iterate.h \
${tr1_srcdir}/boost_shared_ptr.h \
${tr1_srcdir}/ccomplex \
${tr1_srcdir}/cctype \
......@@ -559,20 +557,16 @@ tr1_headers = \
${tr1_srcdir}/float.h \
${tr1_srcdir}/functional \
${tr1_srcdir}/functional_hash.h \
${tr1_srcdir}/functional_iterate.h \
${tr1_srcdir}/hashtable \
${tr1_srcdir}/hashtable_policy.h \
${tr1_srcdir}/inttypes.h \
${tr1_srcdir}/limits.h \
${tr1_srcdir}/math.h \
${tr1_srcdir}/memory \
${tr1_srcdir}/mu_iterate.h \
${tr1_srcdir}/random \
${tr1_srcdir}/random.tcc \
${tr1_srcdir}/ref_fwd.h \
${tr1_srcdir}/ref_wrap_iterate.h \
${tr1_srcdir}/regex \
${tr1_srcdir}/repeat.h \
${tr1_srcdir}/stdarg.h \
${tr1_srcdir}/stdbool.h \
${tr1_srcdir}/stdint.h \
......@@ -580,8 +574,6 @@ tr1_headers = \
${tr1_srcdir}/stdlib.h \
${tr1_srcdir}/tgmath.h \
${tr1_srcdir}/tuple \
${tr1_srcdir}/tuple_defs.h \
${tr1_srcdir}/tuple_iterate.h \
${tr1_srcdir}/type_traits \
${tr1_srcdir}/type_traits_fwd.h \
${tr1_srcdir}/unordered_set \
......
......@@ -762,8 +762,6 @@ tr1_srcdir = ${glibcxx_srcdir}/include/tr1
tr1_builddir = ./tr1
tr1_headers = \
${tr1_srcdir}/array \
${tr1_srcdir}/bind_repeat.h \
${tr1_srcdir}/bind_iterate.h \
${tr1_srcdir}/boost_shared_ptr.h \
${tr1_srcdir}/ccomplex \
${tr1_srcdir}/cctype \
......@@ -789,20 +787,16 @@ tr1_headers = \
${tr1_srcdir}/float.h \
${tr1_srcdir}/functional \
${tr1_srcdir}/functional_hash.h \
${tr1_srcdir}/functional_iterate.h \
${tr1_srcdir}/hashtable \
${tr1_srcdir}/hashtable_policy.h \
${tr1_srcdir}/inttypes.h \
${tr1_srcdir}/limits.h \
${tr1_srcdir}/math.h \
${tr1_srcdir}/memory \
${tr1_srcdir}/mu_iterate.h \
${tr1_srcdir}/random \
${tr1_srcdir}/random.tcc \
${tr1_srcdir}/ref_fwd.h \
${tr1_srcdir}/ref_wrap_iterate.h \
${tr1_srcdir}/regex \
${tr1_srcdir}/repeat.h \
${tr1_srcdir}/stdarg.h \
${tr1_srcdir}/stdbool.h \
${tr1_srcdir}/stdint.h \
......@@ -810,8 +804,6 @@ tr1_headers = \
${tr1_srcdir}/stdlib.h \
${tr1_srcdir}/tgmath.h \
${tr1_srcdir}/tuple \
${tr1_srcdir}/tuple_defs.h \
${tr1_srcdir}/tuple_iterate.h \
${tr1_srcdir}/type_traits \
${tr1_srcdir}/type_traits_fwd.h \
${tr1_srcdir}/unordered_set \
......
// TR1 functional -*- C++ -*-
// Copyright (C) 2005 Free Software Foundation, Inc.
// Written by Douglas Gregor <doug.gregor -at- gmail.com>
//
// 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 2, 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.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file tr1/bind_iterate.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
#if _GLIBCXX_BIND_NUM_ARGS > 0
template<_GLIBCXX_BIND_TEMPLATE_PARAMS>
#endif
#ifdef _GLIBCXX_BIND_HAS_RESULT_TYPE
result_type
#else
typename result_of<_Functor(_GLIBCXX_BIND_V_TEMPLATE_ARGS())>::type
#endif
operator()(_GLIBCXX_BIND_PARAMS)
{ return _M_f(_GLIBCXX_BIND_V_ARGS); }
#if _GLIBCXX_BIND_NUM_ARGS > 0
template<_GLIBCXX_BIND_TEMPLATE_PARAMS>
#endif
#ifdef _GLIBCXX_BIND_HAS_RESULT_TYPE
result_type
#else
typename result_of<const _Functor(_GLIBCXX_BIND_V_TEMPLATE_ARGS(const))>::type
#endif
operator()(_GLIBCXX_BIND_PARAMS) const
{ return _M_f(_GLIBCXX_BIND_V_ARGS); }
#if _GLIBCXX_BIND_NUM_ARGS > 0
template<_GLIBCXX_BIND_TEMPLATE_PARAMS>
#endif
#ifdef _GLIBCXX_BIND_HAS_RESULT_TYPE
result_type
#else
typename result_of<volatile _Functor(_GLIBCXX_BIND_V_TEMPLATE_ARGS(volatile))>::type
#endif
operator()(_GLIBCXX_BIND_PARAMS) volatile
{ return _M_f(_GLIBCXX_BIND_V_ARGS); }
#if _GLIBCXX_BIND_NUM_ARGS > 0
template<_GLIBCXX_BIND_TEMPLATE_PARAMS>
#endif
#ifdef _GLIBCXX_BIND_HAS_RESULT_TYPE
result_type
#else
typename result_of<const volatile _Functor(_GLIBCXX_BIND_V_TEMPLATE_ARGS(const volatile))>::type
#endif
operator()(_GLIBCXX_BIND_PARAMS) const volatile
{ return _M_f(_GLIBCXX_BIND_V_ARGS); }
// TR1 code repetition for bind -*- C++ -*-
// Copyright (C) 2005 Free Software Foundation, Inc.
// Written by Douglas Gregor <doug.gregor -at- gmail.com>
//
// 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 2, 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.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file tr1/bind_repeat.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
#ifndef _GLIBCXX_BIND_REPEAT_HEADER
# error Internal error: _GLIBCXX_BIND_REPEAT_HEADER must be set
#endif /* _GLIBCXX_BIND_REPEAT_HEADER */
#define _GLIBCXX_BIND_NUM_ARGS 0
#define _GLIBCXX_BIND_COMMA
#define _GLIBCXX_BIND_TEMPLATE_PARAMS
#define _GLIBCXX_BIND_TEMPLATE_ARGS
#define _GLIBCXX_BIND_PARAMS
#define _GLIBCXX_BIND_ARGS
# include _GLIBCXX_BIND_REPEAT_HEADER
#undef _GLIBCXX_BIND_ARGS
#undef _GLIBCXX_BIND_PARAMS
#undef _GLIBCXX_BIND_TEMPLATE_ARGS
#undef _GLIBCXX_BIND_TEMPLATE_PARAMS
#undef _GLIBCXX_BIND_COMMA
#undef _GLIBCXX_BIND_NUM_ARGS
#define _GLIBCXX_BIND_NUM_ARGS 1
#define _GLIBCXX_BIND_COMMA ,
#define _GLIBCXX_BIND_TEMPLATE_PARAMS typename _U1
#define _GLIBCXX_BIND_TEMPLATE_ARGS _U1
#define _GLIBCXX_BIND_PARAMS _U1& __u1
#define _GLIBCXX_BIND_ARGS __u1
#include _GLIBCXX_BIND_REPEAT_HEADER
#undef _GLIBCXX_BIND_ARGS
#undef _GLIBCXX_BIND_PARAMS
#undef _GLIBCXX_BIND_TEMPLATE_ARGS
#undef _GLIBCXX_BIND_TEMPLATE_PARAMS
#undef _GLIBCXX_BIND_COMMA
#undef _GLIBCXX_BIND_NUM_ARGS
#define _GLIBCXX_BIND_NUM_ARGS 2
#define _GLIBCXX_BIND_COMMA ,
#define _GLIBCXX_BIND_TEMPLATE_PARAMS typename _U1, typename _U2
#define _GLIBCXX_BIND_TEMPLATE_ARGS _U1, _U2
#define _GLIBCXX_BIND_PARAMS _U1& __u1, _U2& __u2
#define _GLIBCXX_BIND_ARGS __u1, __u2
#include _GLIBCXX_BIND_REPEAT_HEADER
#undef _GLIBCXX_BIND_ARGS
#undef _GLIBCXX_BIND_PARAMS
#undef _GLIBCXX_BIND_TEMPLATE_ARGS
#undef _GLIBCXX_BIND_TEMPLATE_PARAMS
#undef _GLIBCXX_BIND_COMMA
#undef _GLIBCXX_BIND_NUM_ARGS
#define _GLIBCXX_BIND_NUM_ARGS 3
#define _GLIBCXX_BIND_COMMA ,
#define _GLIBCXX_BIND_TEMPLATE_PARAMS typename _U1, typename _U2, typename _U3
#define _GLIBCXX_BIND_TEMPLATE_ARGS _U1, _U2, _U3
#define _GLIBCXX_BIND_PARAMS _U1& __u1, _U2& __u2, _U3& __u3
#define _GLIBCXX_BIND_ARGS __u1, __u2, __u3
#include _GLIBCXX_BIND_REPEAT_HEADER
#undef _GLIBCXX_BIND_ARGS
#undef _GLIBCXX_BIND_PARAMS
#undef _GLIBCXX_BIND_TEMPLATE_ARGS
#undef _GLIBCXX_BIND_TEMPLATE_PARAMS
#undef _GLIBCXX_BIND_COMMA
#undef _GLIBCXX_BIND_NUM_ARGS
#define _GLIBCXX_BIND_NUM_ARGS 4
#define _GLIBCXX_BIND_COMMA ,
#define _GLIBCXX_BIND_TEMPLATE_PARAMS typename _U1, typename _U2, typename _U3, typename _U4
#define _GLIBCXX_BIND_TEMPLATE_ARGS _U1, _U2, _U3, _U4
#define _GLIBCXX_BIND_PARAMS _U1& __u1, _U2& __u2, _U3& __u3, _U4& __u4
#define _GLIBCXX_BIND_ARGS __u1, __u2, __u3, __u4
#include _GLIBCXX_BIND_REPEAT_HEADER
#undef _GLIBCXX_BIND_ARGS
#undef _GLIBCXX_BIND_PARAMS
#undef _GLIBCXX_BIND_TEMPLATE_ARGS
#undef _GLIBCXX_BIND_TEMPLATE_PARAMS
#undef _GLIBCXX_BIND_COMMA
#undef _GLIBCXX_BIND_NUM_ARGS
#define _GLIBCXX_BIND_NUM_ARGS 5
#define _GLIBCXX_BIND_COMMA ,
#define _GLIBCXX_BIND_TEMPLATE_PARAMS typename _U1, typename _U2, typename _U3, typename _U4, typename _U5
#define _GLIBCXX_BIND_TEMPLATE_ARGS _U1, _U2, _U3, _U4, _U5
#define _GLIBCXX_BIND_PARAMS _U1& __u1, _U2& __u2, _U3& __u3, _U4& __u4, _U5& __u5
#define _GLIBCXX_BIND_ARGS __u1, __u2, __u3, __u4, __u5
#include _GLIBCXX_BIND_REPEAT_HEADER
#undef _GLIBCXX_BIND_ARGS
#undef _GLIBCXX_BIND_PARAMS
#undef _GLIBCXX_BIND_TEMPLATE_ARGS
#undef _GLIBCXX_BIND_TEMPLATE_PARAMS
#undef _GLIBCXX_BIND_COMMA
#undef _GLIBCXX_BIND_NUM_ARGS
#define _GLIBCXX_BIND_NUM_ARGS 6
#define _GLIBCXX_BIND_COMMA ,
#define _GLIBCXX_BIND_TEMPLATE_PARAMS typename _U1, typename _U2, typename _U3, typename _U4, typename _U5, typename _U6
#define _GLIBCXX_BIND_TEMPLATE_ARGS _U1, _U2, _U3, _U4, _U5, _U6
#define _GLIBCXX_BIND_PARAMS _U1& __u1, _U2& __u2, _U3& __u3, _U4& __u4, _U5& __u5, _U6& __u6
#define _GLIBCXX_BIND_ARGS __u1, __u2, __u3, __u4, __u5, __u6
#include _GLIBCXX_BIND_REPEAT_HEADER
#undef _GLIBCXX_BIND_ARGS
#undef _GLIBCXX_BIND_PARAMS
#undef _GLIBCXX_BIND_TEMPLATE_ARGS
#undef _GLIBCXX_BIND_TEMPLATE_PARAMS
#undef _GLIBCXX_BIND_COMMA
#undef _GLIBCXX_BIND_NUM_ARGS
#define _GLIBCXX_BIND_NUM_ARGS 7
#define _GLIBCXX_BIND_COMMA ,
#define _GLIBCXX_BIND_TEMPLATE_PARAMS typename _U1, typename _U2, typename _U3, typename _U4, typename _U5, typename _U6, typename _U7
#define _GLIBCXX_BIND_TEMPLATE_ARGS _U1, _U2, _U3, _U4, _U5, _U6, _U7
#define _GLIBCXX_BIND_PARAMS _U1& __u1, _U2& __u2, _U3& __u3, _U4& __u4, _U5& __u5, _U6& __u6, _U7& __u7
#define _GLIBCXX_BIND_ARGS __u1, __u2, __u3, __u4, __u5, __u6, __u7
#include _GLIBCXX_BIND_REPEAT_HEADER
#undef _GLIBCXX_BIND_ARGS
#undef _GLIBCXX_BIND_PARAMS
#undef _GLIBCXX_BIND_TEMPLATE_ARGS
#undef _GLIBCXX_BIND_TEMPLATE_PARAMS
#undef _GLIBCXX_BIND_COMMA
#undef _GLIBCXX_BIND_NUM_ARGS
#define _GLIBCXX_BIND_NUM_ARGS 8
#define _GLIBCXX_BIND_COMMA ,
#define _GLIBCXX_BIND_TEMPLATE_PARAMS typename _U1, typename _U2, typename _U3, typename _U4, typename _U5, typename _U6, typename _U7, typename _U8
#define _GLIBCXX_BIND_TEMPLATE_ARGS _U1, _U2, _U3, _U4, _U5, _U6, _U7, _U8
#define _GLIBCXX_BIND_PARAMS _U1& __u1, _U2& __u2, _U3& __u3, _U4& __u4, _U5& __u5, _U6& __u6, _U7& __u7, _U8& __u8
#define _GLIBCXX_BIND_ARGS __u1, __u2, __u3, __u4, __u5, __u6, __u7, __u8
#include _GLIBCXX_BIND_REPEAT_HEADER
#undef _GLIBCXX_BIND_ARGS
#undef _GLIBCXX_BIND_PARAMS
#undef _GLIBCXX_BIND_TEMPLATE_ARGS
#undef _GLIBCXX_BIND_TEMPLATE_PARAMS
#undef _GLIBCXX_BIND_COMMA
#undef _GLIBCXX_BIND_NUM_ARGS
#define _GLIBCXX_BIND_NUM_ARGS 9
#define _GLIBCXX_BIND_COMMA ,
#define _GLIBCXX_BIND_TEMPLATE_PARAMS typename _U1, typename _U2, typename _U3, typename _U4, typename _U5, typename _U6, typename _U7, typename _U8, typename _U9
#define _GLIBCXX_BIND_TEMPLATE_ARGS _U1, _U2, _U3, _U4, _U5, _U6, _U7, _U8, _U9
#define _GLIBCXX_BIND_PARAMS _U1& __u1, _U2& __u2, _U3& __u3, _U4& __u4, _U5& __u5, _U6& __u6, _U7& __u7, _U8& __u8, _U9& __u9
#define _GLIBCXX_BIND_ARGS __u1, __u2, __u3, __u4, __u5, __u6, __u7, __u8, __u9
#include _GLIBCXX_BIND_REPEAT_HEADER
#undef _GLIBCXX_BIND_ARGS
#undef _GLIBCXX_BIND_PARAMS
#undef _GLIBCXX_BIND_TEMPLATE_ARGS
#undef _GLIBCXX_BIND_TEMPLATE_PARAMS
#undef _GLIBCXX_BIND_COMMA
#undef _GLIBCXX_BIND_NUM_ARGS
#define _GLIBCXX_BIND_NUM_ARGS 10
#define _GLIBCXX_BIND_COMMA ,
#define _GLIBCXX_BIND_TEMPLATE_PARAMS typename _U1, typename _U2, typename _U3, typename _U4, typename _U5, typename _U6, typename _U7, typename _U8, typename _U9, typename _U10
#define _GLIBCXX_BIND_TEMPLATE_ARGS _U1, _U2, _U3, _U4, _U5, _U6, _U7, _U8, _U9, _U10
#define _GLIBCXX_BIND_PARAMS _U1& __u1, _U2& __u2, _U3& __u3, _U4& __u4, _U5& __u5, _U6& __u6, _U7& __u7, _U8& __u8, _U9& __u9, _U10& __u10
#define _GLIBCXX_BIND_ARGS __u1, __u2, __u3, __u4, __u5, __u6, __u7, __u8, __u9, __u10
#include _GLIBCXX_BIND_REPEAT_HEADER
#undef _GLIBCXX_BIND_ARGS
#undef _GLIBCXX_BIND_PARAMS
#undef _GLIBCXX_BIND_TEMPLATE_ARGS
#undef _GLIBCXX_BIND_TEMPLATE_PARAMS
#undef _GLIBCXX_BIND_COMMA
#undef _GLIBCXX_BIND_NUM_ARGS
// TR1 functional -*- C++ -*-
// Copyright (C) 2005 Free Software Foundation, Inc.
// Written by Douglas Gregor <doug.gregor -at- gmail.com>
//
// 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 2, 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.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file tr1/mu_iterate.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
// 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.
// @namespace std::tr1
// @class std::tr1::_Mu::result
template<typename _CVMu, typename _CVArg
_GLIBCXX_COMMA _GLIBCXX_TEMPLATE_PARAMS>
class result<_CVMu(_CVArg, tuple<_GLIBCXX_TEMPLATE_ARGS>)>
: public result_of<_CVArg(_GLIBCXX_TEMPLATE_ARGS)> { };
template<typename _CVArg _GLIBCXX_COMMA _GLIBCXX_TEMPLATE_PARAMS>
typename result_of<_CVArg(_GLIBCXX_TEMPLATE_ARGS)>::type
operator()(_CVArg& __arg, const tuple<_GLIBCXX_TEMPLATE_ARGS>& __tuple)
const volatile
{
return __arg(_GLIBCXX_MU_GET_TUPLE_ARGS);
}
// TR1 reference_wrapper -*- C++ -*-
// Copyright (C) 2005 Free Software Foundation, Inc.
// Written by Douglas Gregor <doug.gregor -at- gmail.com>
//
// 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 2, 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.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file tr1/ref_wrap_iterate.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
#if _GLIBCXX_NUM_ARGS > 0
template<_GLIBCXX_TEMPLATE_PARAMS>
typename result_of<_M_func_type(_GLIBCXX_TEMPLATE_ARGS)>::type
operator()(_GLIBCXX_REF_PARAMS) const;
#else
typename result_of<_M_func_type()>::type
operator()() const
{ return get()(); }
#endif
// class template tuple -*- C++ -*-
// Copyright (C) 2004, 2005, 2006 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 2, 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.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file tr1/tuple_iterate.h
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
// Chris Jefferson <chris@bubblescope.net>
namespace std
{
_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
/// @brief class tuple_size
template<_GLIBCXX_TEMPLATE_PARAMS>
struct tuple_size<tuple<_GLIBCXX_TEMPLATE_ARGS> >
{ static const int value = _GLIBCXX_NUM_ARGS; };
#if _GLIBCXX_NUM_ARGS > 0
template<_GLIBCXX_TEMPLATE_PARAMS>
const int tuple_size<tuple<_GLIBCXX_TEMPLATE_ARGS> >::value;
#endif
template<_GLIBCXX_TEMPLATE_PARAMS>
#ifdef _GLIBCXX_LAST_INCLUDE
class tuple
#else
class tuple<_GLIBCXX_TEMPLATE_ARGS>
#endif
{
_GLIBCXX_BIND_MEMBERS
public:
tuple()
{ }
#if _GLIBCXX_NUM_ARGS == 2
template<typename _U1, typename _U2>
tuple(const std::pair<_U1, _U2>& __u) :
_M_arg1(__u.first), _M_arg2(__u.second)
{ }
template<typename _U1, typename _U2>
tuple&
operator=(const std::pair<_U1, _U2>& __u)
{
_M_arg1 = __u.first;
_M_arg2 = __u.second;
return *this;
}
#endif
#if _GLIBCXX_NUM_ARGS > 0
explicit tuple(_GLIBCXX_TUPLE_ADD_CREF) :
_GLIBCXX_BIND_MEMBERS_INIT
{ }
template<_GLIBCXX_TEMPLATE_PARAMS_U>
tuple(const tuple<_GLIBCXX_TEMPLATE_ARGS_U>& __in) :
_GLIBCXX_TUPLE_COPY_INIT
{ }
template<_GLIBCXX_TEMPLATE_PARAMS_U>
tuple&
operator=(const tuple<_GLIBCXX_TEMPLATE_ARGS_U>& __in)
{
_GLIBCXX_TUPLE_ASSIGN
return *this;
}
tuple(const tuple& __in) :
_GLIBCXX_TUPLE_COPY_INIT
{ }
#else
tuple(const tuple&)
{ }
#endif
tuple&
operator=(const tuple& __in __attribute__((__unused__)) )
{
_GLIBCXX_TUPLE_ASSIGN
return *this;
}
template<int __i, typename __Type>
friend class __get_helper;
template<_GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS_UNNAMED>
friend class tuple;
};
#ifndef _GLIBCXX_LAST_INCLUDE
template<typename _Tp>
struct __get_helper<_GLIBCXX_NUM_ARGS, _Tp>
{
static typename __add_ref<typename tuple_element<_GLIBCXX_NUM_ARGS,
_Tp>::type>::type
get_value(_Tp& __in)
{ return __in._GLIBCXX_CAT(_M_arg,_GLIBCXX_NUM_ARGS_PLUS_1); }
static typename __add_c_ref<typename tuple_element<_GLIBCXX_NUM_ARGS,
_Tp>::type>::type
get_value(const _Tp& __in)
{ return __in._GLIBCXX_CAT(_M_arg,_GLIBCXX_NUM_ARGS_PLUS_1); }
};
/// @brief class tuple_element
template<_GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS>
struct tuple_element<_GLIBCXX_NUM_ARGS, tuple<_GLIBCXX_TUPLE_ALL_TEMPLATE_ARGS> >
{ typedef _GLIBCXX_T_NUM_ARGS_PLUS_1 type; };
#endif
#if _GLIBCXX_NUM_ARGS == 0
tuple<>
inline make_tuple()
{ return tuple<>(); }
tuple<>
inline tie()
{ return tuple<>(); }
#else
template<_GLIBCXX_TEMPLATE_PARAMS>
typename __stripped_tuple_type<_GLIBCXX_TEMPLATE_ARGS>::__type
inline make_tuple(_GLIBCXX_PARAMS)
{
return typename __stripped_tuple_type<_GLIBCXX_TEMPLATE_ARGS>::
__type(_GLIBCXX_ARGS);
}
template<_GLIBCXX_TEMPLATE_PARAMS>
tuple<_GLIBCXX_REF_TEMPLATE_ARGS>
inline tie(_GLIBCXX_REF_PARAMS)
{ return make_tuple(_GLIBCXX_REF_WRAP_PARAMS); }
#endif
_GLIBCXX_END_NAMESPACE
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment