diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index cb801d1d2e1..014eef94ccc 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,51 @@ +2005-03-31 Chris Jefferson + + * include/tr1/tuple: Support iteration via tuple_iterate.h. + * include/tr1/tuple_iterate.h: Iteration file for tuple. + +2005-03-31 Douglas Gregor + + * include/Makefile.am (tr1_headers): Add bind and mu repetition + headers and reference_wrapper<> forwarding header. + * include/Makefile.in: Regenerate. + * include/tr1/bind_iterate.h: Implementation of function call + operators for the function object returned from tr1::bind(). + * include/tr1/bind_repeat.h: Bind-specific repetition header, + akin to include/tr1/repeat.h. + * include/tr1/functional (_Mem_fn): Bug fix: declare result member + template for use with result_of. + (is_bind_expression): New. + (is_placeholder): New. + (_Placeholder): New. Placeholder type for bind. + (_Mu): New. Implementation detail of bind. + (_Bind, _Bind_result): New. Function objects returned by bind. + (_GLIBCXX_JOIN): New. Required to create bind placeholders. + * include/tr1/functional_iterate.h (_Bind, _Bind_result, bind): + New. Implementation of tr1::bind. + * include/tr1/mu_iterate.h (_Mu): result template and operator() + for the _Mu helper to bind. + * include/tr1/ref_fwd.h (reference_wrapper): Forward declaration + used by tuple header. + (ref): Ditto. + (cref): Ditto. + * include/tr1/repeat.h: Add bind-specific repetition macros. + * include/tr1/tuple: Use reference_wrapper forwarding header for + initial definitions, then include at the end, to + make the circular dependencies work. + (tie): Support zero-argument tie() function. + * testsuite/tr1/3_function_objects/bind/all_bound.cc: New test of + bind() functionality with parameters bound. + * testsuite/tr1/3_function_objects/bind/nested.cc: New test of + nested bind() expressions. + * testsuite/tr1/3_function_objects/bind/placeholders.cc: New test + of bind() placeholders. + * testsuite/tr1/3_function_objects/bind/ref.cc: New test of bind() + with arguments bound via reference_wrapper<>. + * scripts/gen_includers.pl: Generate the repetitive part of + include/tr1/repeat.h. + * scripts/gen_bind_includers.pl: Generate the repetitive part of + include/tr1/bind_repeat.h. + 2005-03-30 Aaron W. LaFramboise * testsuite/Makefile.am (CXX): Use ${SHELL}. diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am index 547ec373adb..abd9abf4e70 100644 --- a/libstdc++-v3/include/Makefile.am +++ b/libstdc++-v3/include/Makefile.am @@ -228,13 +228,18 @@ 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}/mu_iterate.h \ ${tr1_srcdir}/functional \ ${tr1_srcdir}/functional_iterate.h \ ${tr1_srcdir}/memory \ + ${tr1_srcdir}/ref_fwd.h \ ${tr1_srcdir}/ref_wrap_iterate.h \ ${tr1_srcdir}/repeat.h \ ${tr1_srcdir}/tuple \ + ${tr1_srcdir}/tuple_iterate.h \ ${tr1_srcdir}/utility \ ${tr1_srcdir}/type_traits \ ${tr1_srcdir}/type_traits_fwd.h \ diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index 814bccf8b08..ddd636c9eac 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -447,13 +447,18 @@ 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}/mu_iterate.h \ ${tr1_srcdir}/functional \ ${tr1_srcdir}/functional_iterate.h \ ${tr1_srcdir}/memory \ + ${tr1_srcdir}/ref_fwd.h \ ${tr1_srcdir}/ref_wrap_iterate.h \ ${tr1_srcdir}/repeat.h \ ${tr1_srcdir}/tuple \ + ${tr1_srcdir}/tuple_iterate.h \ ${tr1_srcdir}/utility \ ${tr1_srcdir}/type_traits \ ${tr1_srcdir}/type_traits_fwd.h \ diff --git a/libstdc++-v3/include/tr1/bind_iterate.h b/libstdc++-v3/include/tr1/bind_iterate.h new file mode 100644 index 00000000000..ed5aeb626e2 --- /dev/null +++ b/libstdc++-v3/include/tr1/bind_iterate.h @@ -0,0 +1,78 @@ +// TR1 functional -*- C++ -*- + +// Copyright (C) 2005 Free Software Foundation, Inc. +// Written by Douglas Gregor +// +// 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// 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 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::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::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::type +#endif +operator()(_GLIBCXX_BIND_PARAMS) const volatile +{ return _M_f(_GLIBCXX_BIND_V_ARGS); } diff --git a/libstdc++-v3/include/tr1/bind_repeat.h b/libstdc++-v3/include/tr1/bind_repeat.h new file mode 100644 index 00000000000..2422a5b186f --- /dev/null +++ b/libstdc++-v3/include/tr1/bind_repeat.h @@ -0,0 +1,192 @@ +// TR1 code repetition for bind -*- C++ -*- + +// Copyright (C) 2005 Free Software Foundation, Inc. +// Written by Douglas Gregor +// +// 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// 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 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 + diff --git a/libstdc++-v3/include/tr1/functional b/libstdc++-v3/include/tr1/functional index 778b9d7ef9a..ab811d1c8a6 100644 --- a/libstdc++-v3/include/tr1/functional +++ b/libstdc++-v3/include/tr1/functional @@ -40,6 +40,7 @@ #include #include // for std::tr1::hash #include // for std::abort +#include namespace std { @@ -452,6 +453,17 @@ namespace tr1 == sizeof(__check_const<_Tp>(__get_ref<_Tp>(), (_Tp*)0)))> { }; + template + struct result; + + template + struct result<_CVMem(_Tp)> + : public _Result_type<_Tp> { }; + + template + struct result<_CVMem(_Tp&)> + : public _Result_type<_Tp> { }; + explicit _Mem_fn(_Res _Class::*__pm) : __pm(__pm) { } // Handle objects @@ -490,6 +502,201 @@ namespace tr1 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] + */ + template + struct is_bind_expression + { + static const bool value = false; + }; + + /** + * @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] + */ + template + struct is_placeholder + { + static const int value = 0; + }; + + /** + * @if maint + * The type of placeholder objects defined by libstdc++. + * @endif + */ + template struct _Placeholder { }; + + /** + * @if maint + * Partial specialization of is_placeholder that provides the placeholder + * number for the placeholder objects defined by libstdc++. + * @endif + */ + template + struct is_placeholder<_Placeholder<_Num> > + { + static const int value = _Num; + }; + + /** + * @if maint + * 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, isn't not 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. + * @endif + */ + template::value, + bool _IsPlaceholder = (is_placeholder<_Arg>::value > 0)> + class _Mu; + + /** + * @if maint + * If the argument is reference_wrapper<_Tp>, returns the + * underlying reference. [TR1 3.6.3/5 bullet 1] + * @endif + */ + template + class _Mu, 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 + result_type + operator()(_CVRef& __arg, const _Tuple&) const volatile + { return __arg.get(); } + }; + + /** + * @if maint + * 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] + * @endif + */ + template + class _Mu<_Arg, true, false> + { + public: + template class result; + +#define _GLIBCXX_REPEAT_HEADER +# include +#undef _GLIBCXX_REPEAT_HEADER + }; + + /** + * @if maint + * 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] + * @endif + */ + template + class _Mu<_Arg, false, true> + { + public: + template class result; + + template + 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 tuple_element<(is_placeholder<_Arg>::value - 1), + _Tuple>::type __base_type; + + public: + typedef typename add_reference<__base_type>::type type; + }; + + template + typename result<_Mu(_Arg, _Tuple)>::type + operator()(const volatile _Arg&, const _Tuple& __tuple) const volatile + { + return ::std::tr1::get<(is_placeholder<_Arg>::value - 1)>(__tuple); + } + }; + + /** + * @if maint + * 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] + * @endif + */ + template + class _Mu<_Arg, false, false> + { + public: + template struct result; + + template + struct result<_CVMu(_CVArg, _Tuple)> + { + typedef typename add_reference<_CVArg>::type type; + }; + + // Pick up the cv-qualifiers of the argument + template + _CVArg& operator()(_CVArg& __arg, const _Tuple&) const volatile + { return __arg; } + }; + + /** + * @if maint + * Type of the function object returned from bind(). + * @endif + */ + template + struct _Bind; + + /** + * @if maint + * Type of the function object returned from bind(). + * @endif + */ + template + struct _Bind_result; + + /** + * @if maint + * Class template _Bind is always a bind expression. + * @endif + */ + template + struct is_bind_expression<_Bind<_Signature> > + { + static const bool value = true; + }; + + /** + * @if maint + * Class template _Bind_result is always a bind expression. + * @endif + */ + template + struct is_bind_expression<_Bind_result<_Result, _Signature> > + { + static const bool value = true; + }; + /** * @brief Exception class thrown when class template function's * operator() is called with an empty target. @@ -845,9 +1052,15 @@ namespace tr1 __x.swap(__y); } +#define _GLIBCXX_JOIN(X,Y) _GLIBCXX_JOIN2( X , Y ) +#define _GLIBCXX_JOIN2(X,Y) _GLIBCXX_JOIN3(X,Y) +#define _GLIBCXX_JOIN3(X,Y) X##Y #define _GLIBCXX_REPEAT_HEADER #include #undef _GLIBCXX_REPEAT_HEADER +#undef _GLIBCXX_JOIN3 +#undef _GLIBCXX_JOIN2 +#undef _GLIBCXX_JOIN // Definition of default hash function std::tr1::hash<>. The types for // which std::tr1::hash is defined is in clause 6.3.3. of the PDTR. diff --git a/libstdc++-v3/include/tr1/functional_iterate.h b/libstdc++-v3/include/tr1/functional_iterate.h index 97f4d248794..0a1ccee94e8 100644 --- a/libstdc++-v3/include/tr1/functional_iterate.h +++ b/libstdc++-v3/include/tr1/functional_iterate.h @@ -28,7 +28,7 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file function_iterate.h +/** @file functional_iterate.h * This is an internal header file, included by other library headers. * You should not attempt to use it directly. */ @@ -390,7 +390,101 @@ template class _Function_handler; +#if _GLIBCXX_NUM_ARGS > 0 +namespace placeholders +{ +namespace +{ + _Placeholder<_GLIBCXX_NUM_ARGS> _GLIBCXX_JOIN(_,_GLIBCXX_NUM_ARGS); +} +} +#endif + +template +class _Bind<_Functor(_GLIBCXX_TEMPLATE_ARGS)> + : public _Weak_result_type<_Functor> +{ + typedef _Bind __self_type; + + _Functor _M_f; + _GLIBCXX_BIND_MEMBERS + + public: +#if _GLIBCXX_NUM_ARGS == 0 + explicit +#endif + _Bind(_Functor __f _GLIBCXX_COMMA _GLIBCXX_PARAMS) + : _M_f(__f) _GLIBCXX_COMMA _GLIBCXX_BIND_MEMBERS_INIT { } + +#define _GLIBCXX_BIND_REPEAT_HEADER +#include +#undef _GLIBCXX_BIND_REPEAT_HEADER +}; + +template +class _Bind_result<_Result, _Functor(_GLIBCXX_TEMPLATE_ARGS)> +{ + _Functor _M_f; + _GLIBCXX_BIND_MEMBERS + + public: + typedef _Result result_type; + +#if _GLIBCXX_NUM_ARGS == 0 + explicit +#endif + _Bind_result(_Functor __f _GLIBCXX_COMMA _GLIBCXX_PARAMS) + : _M_f(__f) _GLIBCXX_COMMA _GLIBCXX_BIND_MEMBERS_INIT { } + +#define _GLIBCXX_BIND_REPEAT_HEADER +#define _GLIBCXX_BIND_HAS_RESULT_TYPE +#include +#undef _GLIBCXX_BIND_HAS_RESULT_TYPE +#undef _GLIBCXX_BIND_REPEAT_HEADER +}; + +// Handle member pointers +template +inline _Bind<_Mem_fn<_Tp _Class::*>(_GLIBCXX_TEMPLATE_ARGS)> +bind(_Tp _Class::* __pm _GLIBCXX_COMMA _GLIBCXX_PARAMS) +{ + typedef _Bind<_Mem_fn<_Tp _Class::*>(_GLIBCXX_TEMPLATE_ARGS)> __result_type; + return __result_type(_Mem_fn<_Tp _Class::*>(__pm) + _GLIBCXX_COMMA _GLIBCXX_ARGS); +} + +template +inline _Bind_result<_Result, _Mem_fn<_Tp _Class::*>(_GLIBCXX_TEMPLATE_ARGS)> +bind(_Tp _Class::* __pm _GLIBCXX_COMMA _GLIBCXX_PARAMS) +{ + typedef _Bind_result<_Result, _Mem_fn<_Tp _Class::*>(_GLIBCXX_TEMPLATE_ARGS)> + __result_type; + return __result_type(_Mem_fn<_Tp _Class::*>(__pm) + _GLIBCXX_COMMA _GLIBCXX_ARGS); +} + +// Handle arbitrary function objects +template +inline _Bind<_Functor(_GLIBCXX_TEMPLATE_ARGS)> +bind(_Functor __f _GLIBCXX_COMMA _GLIBCXX_PARAMS) +{ + typedef _Bind<_Functor(_GLIBCXX_TEMPLATE_ARGS)> __result_type; + return __result_type(__f _GLIBCXX_COMMA _GLIBCXX_ARGS); +} + +template +inline +typename __enable_if<_Bind_result<_Result, _Functor(_GLIBCXX_TEMPLATE_ARGS)>, + !is_member_pointer<_Functor>::value>::__type +bind(_Functor __f _GLIBCXX_COMMA _GLIBCXX_PARAMS) +{ + typedef _Bind_result<_Result, _Functor(_GLIBCXX_TEMPLATE_ARGS)> + __result_type; + return __result_type(__f _GLIBCXX_COMMA _GLIBCXX_ARGS); +} template diff --git a/libstdc++-v3/include/tr1/mu_iterate.h b/libstdc++-v3/include/tr1/mu_iterate.h new file mode 100644 index 00000000000..57a81e3d7a9 --- /dev/null +++ b/libstdc++-v3/include/tr1/mu_iterate.h @@ -0,0 +1,51 @@ +// TR1 functional -*- C++ -*- + +// Copyright (C) 2005 Free Software Foundation, Inc. +// Written by Douglas Gregor +// +// 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// 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 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. +template +class result<_CVMu(_CVArg, tuple<_GLIBCXX_TEMPLATE_ARGS>)> + : public result_of<_CVArg(_GLIBCXX_TEMPLATE_ARGS)> { }; + +template +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); +} + diff --git a/libstdc++-v3/include/tr1/ref_fwd.h b/libstdc++-v3/include/tr1/ref_fwd.h new file mode 100644 index 00000000000..10272a3889a --- /dev/null +++ b/libstdc++-v3/include/tr1/ref_fwd.h @@ -0,0 +1,59 @@ + + +// class template reference_wrapper forwarding header -*- C++ -*- + +// Copyright (C) 2004, 2005 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// 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 ref_fwd.h + * This is an internal header file, included by other library headers. + * You should not attempt to use it directly. + */ + +// Douglas Gregor +#ifndef _TR1_REF_FWD +#define _TR1_REF_FWD + +namespace std +{ +namespace tr1 +{ + +template + class reference_wrapper; + +template + reference_wrapper<_Tp> + ref(_Tp& __t); + + // Denotes a const reference should be taken to a variable. +template + reference_wrapper + cref(const _Tp& __t); +} +} +#endif diff --git a/libstdc++-v3/include/tr1/repeat.h b/libstdc++-v3/include/tr1/repeat.h index d87aeb9b14f..1c57b0bd55e 100644 --- a/libstdc++-v3/include/tr1/repeat.h +++ b/libstdc++-v3/include/tr1/repeat.h @@ -49,7 +49,33 @@ #define _GLIBCXX_TEMPLATE_ARGS_SHIFTED #define _GLIBCXX_PARAMS_SHIFTED #define _GLIBCXX_ARGS_SHIFTED +#define _GLIBCXX_BIND_MEMBERS_INIT +#define _GLIBCXX_BIND_MEMBERS +#define _GLIBCXX_MU_GET_TUPLE_ARGS +#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) +#define _GLIBCXX_BIND_V_ARGS +#define _GLIBCXX_TUPLE_ADD_CREF +#define _GLIBCXX_TUPLE_COPY_INIT +#define _GLIBCXX_TUPLE_ASSIGN +#define _GLIBCXX_TEMPLATE_PARAMS_U +#define _GLIBCXX_TEMPLATE_ARGS_U +#define _GLIBCXX_REF_WRAP_PARAMS +#define _GLIBCXX_REF_TEMPLATE_ARGS +#define _GLIBCXX_NUM_ARGS_PLUS_1 1 #include _GLIBCXX_REPEAT_HEADER +#undef _GLIBCXX_NUM_ARGS_PLUS_1 +#undef _GLIBCXX_REF_TEMPLATE_ARGS +#undef _GLIBCXX_REF_WRAP_PARAMS +#undef _GLIBCXX_TEMPLATE_ARGS_U +#undef _GLIBCXX_TEMPLATE_PARAMS_U +#undef _GLIBCXX_TUPLE_ASSIGN +#undef _GLIBCXX_TUPLE_COPY_INIT +#undef _GLIBCXX_TUPLE_ADD_CREF +#undef _GLIBCXX_BIND_V_ARGS +#undef _GLIBCXX_BIND_V_TEMPLATE_ARGS +#undef _GLIBCXX_MU_GET_TUPLE_ARGS +#undef _GLIBCXX_BIND_MEMBERS_INIT +#undef _GLIBCXX_BIND_MEMBERS #undef _GLIBCXX_ARGS_SHIFTED #undef _GLIBCXX_PARAMS_SHIFTED #undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED @@ -75,7 +101,33 @@ #define _GLIBCXX_TEMPLATE_ARGS_SHIFTED #define _GLIBCXX_PARAMS_SHIFTED #define _GLIBCXX_ARGS_SHIFTED +#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; +#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1) +#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple) +#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type +#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)) +#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1 +#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1) +#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; +#define _GLIBCXX_TEMPLATE_PARAMS_U typename _U1 +#define _GLIBCXX_TEMPLATE_ARGS_U _U1 +#define _GLIBCXX_REF_WRAP_PARAMS ref(__a1) +#define _GLIBCXX_REF_TEMPLATE_ARGS _T1& +#define _GLIBCXX_NUM_ARGS_PLUS_1 2 #include _GLIBCXX_REPEAT_HEADER +#undef _GLIBCXX_NUM_ARGS_PLUS_1 +#undef _GLIBCXX_REF_TEMPLATE_ARGS +#undef _GLIBCXX_REF_WRAP_PARAMS +#undef _GLIBCXX_TEMPLATE_ARGS_U +#undef _GLIBCXX_TEMPLATE_PARAMS_U +#undef _GLIBCXX_TUPLE_ASSIGN +#undef _GLIBCXX_TUPLE_COPY_INIT +#undef _GLIBCXX_TUPLE_ADD_CREF +#undef _GLIBCXX_BIND_V_ARGS +#undef _GLIBCXX_BIND_V_TEMPLATE_ARGS +#undef _GLIBCXX_MU_GET_TUPLE_ARGS +#undef _GLIBCXX_BIND_MEMBERS_INIT +#undef _GLIBCXX_BIND_MEMBERS #undef _GLIBCXX_ARGS_SHIFTED #undef _GLIBCXX_PARAMS_SHIFTED #undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED @@ -101,7 +153,33 @@ #define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1 #define _GLIBCXX_PARAMS_SHIFTED _T1 __a1 #define _GLIBCXX_ARGS_SHIFTED __a1 +#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; +#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2) +#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple) +#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type +#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)) +#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2 +#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2) +#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; +#define _GLIBCXX_TEMPLATE_PARAMS_U typename _U1, typename _U2 +#define _GLIBCXX_TEMPLATE_ARGS_U _U1, _U2 +#define _GLIBCXX_REF_WRAP_PARAMS ref(__a1), ref(__a2) +#define _GLIBCXX_REF_TEMPLATE_ARGS _T1&, _T2& +#define _GLIBCXX_NUM_ARGS_PLUS_1 3 #include _GLIBCXX_REPEAT_HEADER +#undef _GLIBCXX_NUM_ARGS_PLUS_1 +#undef _GLIBCXX_REF_TEMPLATE_ARGS +#undef _GLIBCXX_REF_WRAP_PARAMS +#undef _GLIBCXX_TEMPLATE_ARGS_U +#undef _GLIBCXX_TEMPLATE_PARAMS_U +#undef _GLIBCXX_TUPLE_ASSIGN +#undef _GLIBCXX_TUPLE_COPY_INIT +#undef _GLIBCXX_TUPLE_ADD_CREF +#undef _GLIBCXX_BIND_V_ARGS +#undef _GLIBCXX_BIND_V_TEMPLATE_ARGS +#undef _GLIBCXX_MU_GET_TUPLE_ARGS +#undef _GLIBCXX_BIND_MEMBERS_INIT +#undef _GLIBCXX_BIND_MEMBERS #undef _GLIBCXX_ARGS_SHIFTED #undef _GLIBCXX_PARAMS_SHIFTED #undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED @@ -127,7 +205,33 @@ #define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2 #define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2 #define _GLIBCXX_ARGS_SHIFTED __a1, __a2 +#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; _T3 _M_arg3; +#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2), _M_arg3(__a3) +#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple), ::std::tr1::get<2>(__tuple) +#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T3> _CV(_T3, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type +#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)) +#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2, typename __add_c_ref<_T3>::type __a3 +#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2), _M_arg3(__in._M_arg3) +#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; _M_arg3 = __in._M_arg3; +#define _GLIBCXX_TEMPLATE_PARAMS_U typename _U1, typename _U2, typename _U3 +#define _GLIBCXX_TEMPLATE_ARGS_U _U1, _U2, _U3 +#define _GLIBCXX_REF_WRAP_PARAMS ref(__a1), ref(__a2), ref(__a3) +#define _GLIBCXX_REF_TEMPLATE_ARGS _T1&, _T2&, _T3& +#define _GLIBCXX_NUM_ARGS_PLUS_1 4 #include _GLIBCXX_REPEAT_HEADER +#undef _GLIBCXX_NUM_ARGS_PLUS_1 +#undef _GLIBCXX_REF_TEMPLATE_ARGS +#undef _GLIBCXX_REF_WRAP_PARAMS +#undef _GLIBCXX_TEMPLATE_ARGS_U +#undef _GLIBCXX_TEMPLATE_PARAMS_U +#undef _GLIBCXX_TUPLE_ASSIGN +#undef _GLIBCXX_TUPLE_COPY_INIT +#undef _GLIBCXX_TUPLE_ADD_CREF +#undef _GLIBCXX_BIND_V_ARGS +#undef _GLIBCXX_BIND_V_TEMPLATE_ARGS +#undef _GLIBCXX_MU_GET_TUPLE_ARGS +#undef _GLIBCXX_BIND_MEMBERS_INIT +#undef _GLIBCXX_BIND_MEMBERS #undef _GLIBCXX_ARGS_SHIFTED #undef _GLIBCXX_PARAMS_SHIFTED #undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED @@ -153,7 +257,33 @@ #define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3 #define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3 #define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3 +#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; _T3 _M_arg3; _T4 _M_arg4; +#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2), _M_arg3(__a3), _M_arg4(__a4) +#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple), ::std::tr1::get<2>(__tuple), ::std::tr1::get<3>(__tuple) +#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T3> _CV(_T3, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T4> _CV(_T4, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type +#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)) +#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2, typename __add_c_ref<_T3>::type __a3, typename __add_c_ref<_T4>::type __a4 +#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2), _M_arg3(__in._M_arg3), _M_arg4(__in._M_arg4) +#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; _M_arg3 = __in._M_arg3; _M_arg4 = __in._M_arg4; +#define _GLIBCXX_TEMPLATE_PARAMS_U typename _U1, typename _U2, typename _U3, typename _U4 +#define _GLIBCXX_TEMPLATE_ARGS_U _U1, _U2, _U3, _U4 +#define _GLIBCXX_REF_WRAP_PARAMS ref(__a1), ref(__a2), ref(__a3), ref(__a4) +#define _GLIBCXX_REF_TEMPLATE_ARGS _T1&, _T2&, _T3&, _T4& +#define _GLIBCXX_NUM_ARGS_PLUS_1 5 #include _GLIBCXX_REPEAT_HEADER +#undef _GLIBCXX_NUM_ARGS_PLUS_1 +#undef _GLIBCXX_REF_TEMPLATE_ARGS +#undef _GLIBCXX_REF_WRAP_PARAMS +#undef _GLIBCXX_TEMPLATE_ARGS_U +#undef _GLIBCXX_TEMPLATE_PARAMS_U +#undef _GLIBCXX_TUPLE_ASSIGN +#undef _GLIBCXX_TUPLE_COPY_INIT +#undef _GLIBCXX_TUPLE_ADD_CREF +#undef _GLIBCXX_BIND_V_ARGS +#undef _GLIBCXX_BIND_V_TEMPLATE_ARGS +#undef _GLIBCXX_MU_GET_TUPLE_ARGS +#undef _GLIBCXX_BIND_MEMBERS_INIT +#undef _GLIBCXX_BIND_MEMBERS #undef _GLIBCXX_ARGS_SHIFTED #undef _GLIBCXX_PARAMS_SHIFTED #undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED @@ -179,7 +309,33 @@ #define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3, _T4 #define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4 #define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4 +#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; _T3 _M_arg3; _T4 _M_arg4; _T5 _M_arg5; +#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2), _M_arg3(__a3), _M_arg4(__a4), _M_arg5(__a5) +#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple), ::std::tr1::get<2>(__tuple), ::std::tr1::get<3>(__tuple), ::std::tr1::get<4>(__tuple) +#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T3> _CV(_T3, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T4> _CV(_T4, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T5> _CV(_T5, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type +#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)) +#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2, typename __add_c_ref<_T3>::type __a3, typename __add_c_ref<_T4>::type __a4, typename __add_c_ref<_T5>::type __a5 +#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2), _M_arg3(__in._M_arg3), _M_arg4(__in._M_arg4), _M_arg5(__in._M_arg5) +#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; _M_arg3 = __in._M_arg3; _M_arg4 = __in._M_arg4; _M_arg5 = __in._M_arg5; +#define _GLIBCXX_TEMPLATE_PARAMS_U typename _U1, typename _U2, typename _U3, typename _U4, typename _U5 +#define _GLIBCXX_TEMPLATE_ARGS_U _U1, _U2, _U3, _U4, _U5 +#define _GLIBCXX_REF_WRAP_PARAMS ref(__a1), ref(__a2), ref(__a3), ref(__a4), ref(__a5) +#define _GLIBCXX_REF_TEMPLATE_ARGS _T1&, _T2&, _T3&, _T4&, _T5& +#define _GLIBCXX_NUM_ARGS_PLUS_1 6 #include _GLIBCXX_REPEAT_HEADER +#undef _GLIBCXX_NUM_ARGS_PLUS_1 +#undef _GLIBCXX_REF_TEMPLATE_ARGS +#undef _GLIBCXX_REF_WRAP_PARAMS +#undef _GLIBCXX_TEMPLATE_ARGS_U +#undef _GLIBCXX_TEMPLATE_PARAMS_U +#undef _GLIBCXX_TUPLE_ASSIGN +#undef _GLIBCXX_TUPLE_COPY_INIT +#undef _GLIBCXX_TUPLE_ADD_CREF +#undef _GLIBCXX_BIND_V_ARGS +#undef _GLIBCXX_BIND_V_TEMPLATE_ARGS +#undef _GLIBCXX_MU_GET_TUPLE_ARGS +#undef _GLIBCXX_BIND_MEMBERS_INIT +#undef _GLIBCXX_BIND_MEMBERS #undef _GLIBCXX_ARGS_SHIFTED #undef _GLIBCXX_PARAMS_SHIFTED #undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED @@ -205,7 +361,33 @@ #define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3, _T4, _T5 #define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5 #define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5 +#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; _T3 _M_arg3; _T4 _M_arg4; _T5 _M_arg5; _T6 _M_arg6; +#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2), _M_arg3(__a3), _M_arg4(__a4), _M_arg5(__a5), _M_arg6(__a6) +#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple), ::std::tr1::get<2>(__tuple), ::std::tr1::get<3>(__tuple), ::std::tr1::get<4>(__tuple), ::std::tr1::get<5>(__tuple) +#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T3> _CV(_T3, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T4> _CV(_T4, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T5> _CV(_T5, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T6> _CV(_T6, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type +#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T6>()(_M_arg6, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)) +#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2, typename __add_c_ref<_T3>::type __a3, typename __add_c_ref<_T4>::type __a4, typename __add_c_ref<_T5>::type __a5, typename __add_c_ref<_T6>::type __a6 +#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2), _M_arg3(__in._M_arg3), _M_arg4(__in._M_arg4), _M_arg5(__in._M_arg5), _M_arg6(__in._M_arg6) +#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; _M_arg3 = __in._M_arg3; _M_arg4 = __in._M_arg4; _M_arg5 = __in._M_arg5; _M_arg6 = __in._M_arg6; +#define _GLIBCXX_TEMPLATE_PARAMS_U typename _U1, typename _U2, typename _U3, typename _U4, typename _U5, typename _U6 +#define _GLIBCXX_TEMPLATE_ARGS_U _U1, _U2, _U3, _U4, _U5, _U6 +#define _GLIBCXX_REF_WRAP_PARAMS ref(__a1), ref(__a2), ref(__a3), ref(__a4), ref(__a5), ref(__a6) +#define _GLIBCXX_REF_TEMPLATE_ARGS _T1&, _T2&, _T3&, _T4&, _T5&, _T6& +#define _GLIBCXX_NUM_ARGS_PLUS_1 7 #include _GLIBCXX_REPEAT_HEADER +#undef _GLIBCXX_NUM_ARGS_PLUS_1 +#undef _GLIBCXX_REF_TEMPLATE_ARGS +#undef _GLIBCXX_REF_WRAP_PARAMS +#undef _GLIBCXX_TEMPLATE_ARGS_U +#undef _GLIBCXX_TEMPLATE_PARAMS_U +#undef _GLIBCXX_TUPLE_ASSIGN +#undef _GLIBCXX_TUPLE_COPY_INIT +#undef _GLIBCXX_TUPLE_ADD_CREF +#undef _GLIBCXX_BIND_V_ARGS +#undef _GLIBCXX_BIND_V_TEMPLATE_ARGS +#undef _GLIBCXX_MU_GET_TUPLE_ARGS +#undef _GLIBCXX_BIND_MEMBERS_INIT +#undef _GLIBCXX_BIND_MEMBERS #undef _GLIBCXX_ARGS_SHIFTED #undef _GLIBCXX_PARAMS_SHIFTED #undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED @@ -231,7 +413,33 @@ #define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3, _T4, _T5, _T6 #define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6 #define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6 +#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; _T3 _M_arg3; _T4 _M_arg4; _T5 _M_arg5; _T6 _M_arg6; _T7 _M_arg7; +#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2), _M_arg3(__a3), _M_arg4(__a4), _M_arg5(__a5), _M_arg6(__a6), _M_arg7(__a7) +#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple), ::std::tr1::get<2>(__tuple), ::std::tr1::get<3>(__tuple), ::std::tr1::get<4>(__tuple), ::std::tr1::get<5>(__tuple), ::std::tr1::get<6>(__tuple) +#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T3> _CV(_T3, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T4> _CV(_T4, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T5> _CV(_T5, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T6> _CV(_T6, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T7> _CV(_T7, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type +#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T6>()(_M_arg6, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T7>()(_M_arg7, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)) +#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2, typename __add_c_ref<_T3>::type __a3, typename __add_c_ref<_T4>::type __a4, typename __add_c_ref<_T5>::type __a5, typename __add_c_ref<_T6>::type __a6, typename __add_c_ref<_T7>::type __a7 +#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2), _M_arg3(__in._M_arg3), _M_arg4(__in._M_arg4), _M_arg5(__in._M_arg5), _M_arg6(__in._M_arg6), _M_arg7(__in._M_arg7) +#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; _M_arg3 = __in._M_arg3; _M_arg4 = __in._M_arg4; _M_arg5 = __in._M_arg5; _M_arg6 = __in._M_arg6; _M_arg7 = __in._M_arg7; +#define _GLIBCXX_TEMPLATE_PARAMS_U typename _U1, typename _U2, typename _U3, typename _U4, typename _U5, typename _U6, typename _U7 +#define _GLIBCXX_TEMPLATE_ARGS_U _U1, _U2, _U3, _U4, _U5, _U6, _U7 +#define _GLIBCXX_REF_WRAP_PARAMS ref(__a1), ref(__a2), ref(__a3), ref(__a4), ref(__a5), ref(__a6), ref(__a7) +#define _GLIBCXX_REF_TEMPLATE_ARGS _T1&, _T2&, _T3&, _T4&, _T5&, _T6&, _T7& +#define _GLIBCXX_NUM_ARGS_PLUS_1 8 #include _GLIBCXX_REPEAT_HEADER +#undef _GLIBCXX_NUM_ARGS_PLUS_1 +#undef _GLIBCXX_REF_TEMPLATE_ARGS +#undef _GLIBCXX_REF_WRAP_PARAMS +#undef _GLIBCXX_TEMPLATE_ARGS_U +#undef _GLIBCXX_TEMPLATE_PARAMS_U +#undef _GLIBCXX_TUPLE_ASSIGN +#undef _GLIBCXX_TUPLE_COPY_INIT +#undef _GLIBCXX_TUPLE_ADD_CREF +#undef _GLIBCXX_BIND_V_ARGS +#undef _GLIBCXX_BIND_V_TEMPLATE_ARGS +#undef _GLIBCXX_MU_GET_TUPLE_ARGS +#undef _GLIBCXX_BIND_MEMBERS_INIT +#undef _GLIBCXX_BIND_MEMBERS #undef _GLIBCXX_ARGS_SHIFTED #undef _GLIBCXX_PARAMS_SHIFTED #undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED @@ -257,7 +465,33 @@ #define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3, _T4, _T5, _T6, _T7 #define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7 #define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6, __a7 +#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; _T3 _M_arg3; _T4 _M_arg4; _T5 _M_arg5; _T6 _M_arg6; _T7 _M_arg7; _T8 _M_arg8; +#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2), _M_arg3(__a3), _M_arg4(__a4), _M_arg5(__a5), _M_arg6(__a6), _M_arg7(__a7), _M_arg8(__a8) +#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple), ::std::tr1::get<2>(__tuple), ::std::tr1::get<3>(__tuple), ::std::tr1::get<4>(__tuple), ::std::tr1::get<5>(__tuple), ::std::tr1::get<6>(__tuple), ::std::tr1::get<7>(__tuple) +#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T3> _CV(_T3, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T4> _CV(_T4, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T5> _CV(_T5, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T6> _CV(_T6, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T7> _CV(_T7, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T8> _CV(_T8, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type +#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T6>()(_M_arg6, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T7>()(_M_arg7, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T8>()(_M_arg8, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)) +#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2, typename __add_c_ref<_T3>::type __a3, typename __add_c_ref<_T4>::type __a4, typename __add_c_ref<_T5>::type __a5, typename __add_c_ref<_T6>::type __a6, typename __add_c_ref<_T7>::type __a7, typename __add_c_ref<_T8>::type __a8 +#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2), _M_arg3(__in._M_arg3), _M_arg4(__in._M_arg4), _M_arg5(__in._M_arg5), _M_arg6(__in._M_arg6), _M_arg7(__in._M_arg7), _M_arg8(__in._M_arg8) +#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; _M_arg3 = __in._M_arg3; _M_arg4 = __in._M_arg4; _M_arg5 = __in._M_arg5; _M_arg6 = __in._M_arg6; _M_arg7 = __in._M_arg7; _M_arg8 = __in._M_arg8; +#define _GLIBCXX_TEMPLATE_PARAMS_U typename _U1, typename _U2, typename _U3, typename _U4, typename _U5, typename _U6, typename _U7, typename _U8 +#define _GLIBCXX_TEMPLATE_ARGS_U _U1, _U2, _U3, _U4, _U5, _U6, _U7, _U8 +#define _GLIBCXX_REF_WRAP_PARAMS ref(__a1), ref(__a2), ref(__a3), ref(__a4), ref(__a5), ref(__a6), ref(__a7), ref(__a8) +#define _GLIBCXX_REF_TEMPLATE_ARGS _T1&, _T2&, _T3&, _T4&, _T5&, _T6&, _T7&, _T8& +#define _GLIBCXX_NUM_ARGS_PLUS_1 9 #include _GLIBCXX_REPEAT_HEADER +#undef _GLIBCXX_NUM_ARGS_PLUS_1 +#undef _GLIBCXX_REF_TEMPLATE_ARGS +#undef _GLIBCXX_REF_WRAP_PARAMS +#undef _GLIBCXX_TEMPLATE_ARGS_U +#undef _GLIBCXX_TEMPLATE_PARAMS_U +#undef _GLIBCXX_TUPLE_ASSIGN +#undef _GLIBCXX_TUPLE_COPY_INIT +#undef _GLIBCXX_TUPLE_ADD_CREF +#undef _GLIBCXX_BIND_V_ARGS +#undef _GLIBCXX_BIND_V_TEMPLATE_ARGS +#undef _GLIBCXX_MU_GET_TUPLE_ARGS +#undef _GLIBCXX_BIND_MEMBERS_INIT +#undef _GLIBCXX_BIND_MEMBERS #undef _GLIBCXX_ARGS_SHIFTED #undef _GLIBCXX_PARAMS_SHIFTED #undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED @@ -283,7 +517,33 @@ #define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8 #define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8 #define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8 +#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; _T3 _M_arg3; _T4 _M_arg4; _T5 _M_arg5; _T6 _M_arg6; _T7 _M_arg7; _T8 _M_arg8; _T9 _M_arg9; +#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2), _M_arg3(__a3), _M_arg4(__a4), _M_arg5(__a5), _M_arg6(__a6), _M_arg7(__a7), _M_arg8(__a8), _M_arg9(__a9) +#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple), ::std::tr1::get<2>(__tuple), ::std::tr1::get<3>(__tuple), ::std::tr1::get<4>(__tuple), ::std::tr1::get<5>(__tuple), ::std::tr1::get<6>(__tuple), ::std::tr1::get<7>(__tuple), ::std::tr1::get<8>(__tuple) +#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T3> _CV(_T3, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T4> _CV(_T4, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T5> _CV(_T5, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T6> _CV(_T6, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T7> _CV(_T7, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T8> _CV(_T8, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T9> _CV(_T9, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type +#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T6>()(_M_arg6, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T7>()(_M_arg7, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T8>()(_M_arg8, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T9>()(_M_arg9, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)) +#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2, typename __add_c_ref<_T3>::type __a3, typename __add_c_ref<_T4>::type __a4, typename __add_c_ref<_T5>::type __a5, typename __add_c_ref<_T6>::type __a6, typename __add_c_ref<_T7>::type __a7, typename __add_c_ref<_T8>::type __a8, typename __add_c_ref<_T9>::type __a9 +#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2), _M_arg3(__in._M_arg3), _M_arg4(__in._M_arg4), _M_arg5(__in._M_arg5), _M_arg6(__in._M_arg6), _M_arg7(__in._M_arg7), _M_arg8(__in._M_arg8), _M_arg9(__in._M_arg9) +#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; _M_arg3 = __in._M_arg3; _M_arg4 = __in._M_arg4; _M_arg5 = __in._M_arg5; _M_arg6 = __in._M_arg6; _M_arg7 = __in._M_arg7; _M_arg8 = __in._M_arg8; _M_arg9 = __in._M_arg9; +#define _GLIBCXX_TEMPLATE_PARAMS_U typename _U1, typename _U2, typename _U3, typename _U4, typename _U5, typename _U6, typename _U7, typename _U8, typename _U9 +#define _GLIBCXX_TEMPLATE_ARGS_U _U1, _U2, _U3, _U4, _U5, _U6, _U7, _U8, _U9 +#define _GLIBCXX_REF_WRAP_PARAMS ref(__a1), ref(__a2), ref(__a3), ref(__a4), ref(__a5), ref(__a6), ref(__a7), ref(__a8), ref(__a9) +#define _GLIBCXX_REF_TEMPLATE_ARGS _T1&, _T2&, _T3&, _T4&, _T5&, _T6&, _T7&, _T8&, _T9& +#define _GLIBCXX_NUM_ARGS_PLUS_1 10 #include _GLIBCXX_REPEAT_HEADER +#undef _GLIBCXX_NUM_ARGS_PLUS_1 +#undef _GLIBCXX_REF_TEMPLATE_ARGS +#undef _GLIBCXX_REF_WRAP_PARAMS +#undef _GLIBCXX_TEMPLATE_ARGS_U +#undef _GLIBCXX_TEMPLATE_PARAMS_U +#undef _GLIBCXX_TUPLE_ASSIGN +#undef _GLIBCXX_TUPLE_COPY_INIT +#undef _GLIBCXX_TUPLE_ADD_CREF +#undef _GLIBCXX_BIND_V_ARGS +#undef _GLIBCXX_BIND_V_TEMPLATE_ARGS +#undef _GLIBCXX_MU_GET_TUPLE_ARGS +#undef _GLIBCXX_BIND_MEMBERS_INIT +#undef _GLIBCXX_BIND_MEMBERS #undef _GLIBCXX_ARGS_SHIFTED #undef _GLIBCXX_PARAMS_SHIFTED #undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED @@ -297,6 +557,7 @@ #undef _GLIBCXX_COMMA #undef _GLIBCXX_NUM_ARGS +#define _GLIBCXX_LAST_INCLUDE #define _GLIBCXX_NUM_ARGS 10 #define _GLIBCXX_COMMA , #define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10 @@ -309,7 +570,33 @@ #define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9 #define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9 #define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9 +#define _GLIBCXX_BIND_MEMBERS _T1 _M_arg1; _T2 _M_arg2; _T3 _M_arg3; _T4 _M_arg4; _T5 _M_arg5; _T6 _M_arg6; _T7 _M_arg7; _T8 _M_arg8; _T9 _M_arg9; _T10 _M_arg10; +#define _GLIBCXX_BIND_MEMBERS_INIT _M_arg1(__a1), _M_arg2(__a2), _M_arg3(__a3), _M_arg4(__a4), _M_arg5(__a5), _M_arg6(__a6), _M_arg7(__a7), _M_arg8(__a8), _M_arg9(__a9), _M_arg10(__a10) +#define _GLIBCXX_MU_GET_TUPLE_ARGS ::std::tr1::get<0>(__tuple), ::std::tr1::get<1>(__tuple), ::std::tr1::get<2>(__tuple), ::std::tr1::get<3>(__tuple), ::std::tr1::get<4>(__tuple), ::std::tr1::get<5>(__tuple), ::std::tr1::get<6>(__tuple), ::std::tr1::get<7>(__tuple), ::std::tr1::get<8>(__tuple), ::std::tr1::get<9>(__tuple) +#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T2> _CV(_T2, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T3> _CV(_T3, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T4> _CV(_T4, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T5> _CV(_T5, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T6> _CV(_T6, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T7> _CV(_T7, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T8> _CV(_T8, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T9> _CV(_T9, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type, typename result_of<_Mu<_T10> _CV(_T10, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type +#define _GLIBCXX_BIND_V_ARGS _Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T2>()(_M_arg2, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T3>()(_M_arg3, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T4>()(_M_arg4, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T5>()(_M_arg5, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T6>()(_M_arg6, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T7>()(_M_arg7, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T8>()(_M_arg8, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T9>()(_M_arg9, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)), _Mu<_T10>()(_M_arg10, ::std::tr1::tie(_GLIBCXX_BIND_ARGS)) +#define _GLIBCXX_TUPLE_ADD_CREF typename __add_c_ref<_T1>::type __a1, typename __add_c_ref<_T2>::type __a2, typename __add_c_ref<_T3>::type __a3, typename __add_c_ref<_T4>::type __a4, typename __add_c_ref<_T5>::type __a5, typename __add_c_ref<_T6>::type __a6, typename __add_c_ref<_T7>::type __a7, typename __add_c_ref<_T8>::type __a8, typename __add_c_ref<_T9>::type __a9, typename __add_c_ref<_T10>::type __a10 +#define _GLIBCXX_TUPLE_COPY_INIT _M_arg1(__in._M_arg1), _M_arg2(__in._M_arg2), _M_arg3(__in._M_arg3), _M_arg4(__in._M_arg4), _M_arg5(__in._M_arg5), _M_arg6(__in._M_arg6), _M_arg7(__in._M_arg7), _M_arg8(__in._M_arg8), _M_arg9(__in._M_arg9), _M_arg10(__in._M_arg10) +#define _GLIBCXX_TUPLE_ASSIGN _M_arg1 = __in._M_arg1; _M_arg2 = __in._M_arg2; _M_arg3 = __in._M_arg3; _M_arg4 = __in._M_arg4; _M_arg5 = __in._M_arg5; _M_arg6 = __in._M_arg6; _M_arg7 = __in._M_arg7; _M_arg8 = __in._M_arg8; _M_arg9 = __in._M_arg9; _M_arg10 = __in._M_arg10; +#define _GLIBCXX_TEMPLATE_PARAMS_U typename _U1, typename _U2, typename _U3, typename _U4, typename _U5, typename _U6, typename _U7, typename _U8, typename _U9, typename _U10 +#define _GLIBCXX_TEMPLATE_ARGS_U _U1, _U2, _U3, _U4, _U5, _U6, _U7, _U8, _U9, _U10 +#define _GLIBCXX_REF_WRAP_PARAMS ref(__a1), ref(__a2), ref(__a3), ref(__a4), ref(__a5), ref(__a6), ref(__a7), ref(__a8), ref(__a9), ref(__a10) +#define _GLIBCXX_REF_TEMPLATE_ARGS _T1&, _T2&, _T3&, _T4&, _T5&, _T6&, _T7&, _T8&, _T9&, _T10& +#define _GLIBCXX_NUM_ARGS_PLUS_1 11 #include _GLIBCXX_REPEAT_HEADER +#undef _GLIBCXX_NUM_ARGS_PLUS_1 +#undef _GLIBCXX_REF_TEMPLATE_ARGS +#undef _GLIBCXX_REF_WRAP_PARAMS +#undef _GLIBCXX_TEMPLATE_ARGS_U +#undef _GLIBCXX_TEMPLATE_PARAMS_U +#undef _GLIBCXX_TUPLE_ASSIGN +#undef _GLIBCXX_TUPLE_COPY_INIT +#undef _GLIBCXX_TUPLE_ADD_CREF +#undef _GLIBCXX_BIND_V_ARGS +#undef _GLIBCXX_BIND_V_TEMPLATE_ARGS +#undef _GLIBCXX_MU_GET_TUPLE_ARGS +#undef _GLIBCXX_BIND_MEMBERS_INIT +#undef _GLIBCXX_BIND_MEMBERS #undef _GLIBCXX_ARGS_SHIFTED #undef _GLIBCXX_PARAMS_SHIFTED #undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED @@ -323,263 +610,5 @@ #undef _GLIBCXX_COMMA #undef _GLIBCXX_NUM_ARGS -#define _GLIBCXX_NUM_ARGS 11 -#define _GLIBCXX_COMMA , -#define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11 -#define _GLIBCXX_TEMPLATE_ARGS _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11 -#define _GLIBCXX_PARAMS _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11 -#define _GLIBCXX_REF_PARAMS _T1& __a1, _T2& __a2, _T3& __a3, _T4& __a4, _T5& __a5, _T6& __a6, _T7& __a7, _T8& __a8, _T9& __a9, _T10& __a10, _T11& __a11 -#define _GLIBCXX_ARGS __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11 -#define _GLIBCXX_COMMA_SHIFTED , -#define _GLIBCXX_TEMPLATE_PARAMS_SHIFTED typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10 -#define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10 -#define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10 -#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10 -#include _GLIBCXX_REPEAT_HEADER -#undef _GLIBCXX_ARGS_SHIFTED -#undef _GLIBCXX_PARAMS_SHIFTED -#undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED -#undef _GLIBCXX_TEMPLATE_PARAMS_SHIFTED -#undef _GLIBCXX_COMMA_SHIFTED -#undef _GLIBCXX_ARGS -#undef _GLIBCXX_REF_PARAMS -#undef _GLIBCXX_PARAMS -#undef _GLIBCXX_TEMPLATE_ARGS -#undef _GLIBCXX_TEMPLATE_PARAMS -#undef _GLIBCXX_COMMA -#undef _GLIBCXX_NUM_ARGS - -#define _GLIBCXX_NUM_ARGS 12 -#define _GLIBCXX_COMMA , -#define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12 -#define _GLIBCXX_TEMPLATE_ARGS _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12 -#define _GLIBCXX_PARAMS _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12 -#define _GLIBCXX_REF_PARAMS _T1& __a1, _T2& __a2, _T3& __a3, _T4& __a4, _T5& __a5, _T6& __a6, _T7& __a7, _T8& __a8, _T9& __a9, _T10& __a10, _T11& __a11, _T12& __a12 -#define _GLIBCXX_ARGS __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12 -#define _GLIBCXX_COMMA_SHIFTED , -#define _GLIBCXX_TEMPLATE_PARAMS_SHIFTED typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11 -#define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11 -#define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11 -#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11 -#include _GLIBCXX_REPEAT_HEADER -#undef _GLIBCXX_ARGS_SHIFTED -#undef _GLIBCXX_PARAMS_SHIFTED -#undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED -#undef _GLIBCXX_TEMPLATE_PARAMS_SHIFTED -#undef _GLIBCXX_COMMA_SHIFTED -#undef _GLIBCXX_ARGS -#undef _GLIBCXX_REF_PARAMS -#undef _GLIBCXX_PARAMS -#undef _GLIBCXX_TEMPLATE_ARGS -#undef _GLIBCXX_TEMPLATE_PARAMS -#undef _GLIBCXX_COMMA -#undef _GLIBCXX_NUM_ARGS - -#define _GLIBCXX_NUM_ARGS 13 -#define _GLIBCXX_COMMA , -#define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13 -#define _GLIBCXX_TEMPLATE_ARGS _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13 -#define _GLIBCXX_PARAMS _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12, _T13 __a13 -#define _GLIBCXX_REF_PARAMS _T1& __a1, _T2& __a2, _T3& __a3, _T4& __a4, _T5& __a5, _T6& __a6, _T7& __a7, _T8& __a8, _T9& __a9, _T10& __a10, _T11& __a11, _T12& __a12, _T13& __a13 -#define _GLIBCXX_ARGS __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12, __a13 -#define _GLIBCXX_COMMA_SHIFTED , -#define _GLIBCXX_TEMPLATE_PARAMS_SHIFTED typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12 -#define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12 -#define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12 -#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12 -#include _GLIBCXX_REPEAT_HEADER -#undef _GLIBCXX_ARGS_SHIFTED -#undef _GLIBCXX_PARAMS_SHIFTED -#undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED -#undef _GLIBCXX_TEMPLATE_PARAMS_SHIFTED -#undef _GLIBCXX_COMMA_SHIFTED -#undef _GLIBCXX_ARGS -#undef _GLIBCXX_REF_PARAMS -#undef _GLIBCXX_PARAMS -#undef _GLIBCXX_TEMPLATE_ARGS -#undef _GLIBCXX_TEMPLATE_PARAMS -#undef _GLIBCXX_COMMA -#undef _GLIBCXX_NUM_ARGS - -#define _GLIBCXX_NUM_ARGS 14 -#define _GLIBCXX_COMMA , -#define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13, typename _T14 -#define _GLIBCXX_TEMPLATE_ARGS _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14 -#define _GLIBCXX_PARAMS _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12, _T13 __a13, _T14 __a14 -#define _GLIBCXX_REF_PARAMS _T1& __a1, _T2& __a2, _T3& __a3, _T4& __a4, _T5& __a5, _T6& __a6, _T7& __a7, _T8& __a8, _T9& __a9, _T10& __a10, _T11& __a11, _T12& __a12, _T13& __a13, _T14& __a14 -#define _GLIBCXX_ARGS __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12, __a13, __a14 -#define _GLIBCXX_COMMA_SHIFTED , -#define _GLIBCXX_TEMPLATE_PARAMS_SHIFTED typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13 -#define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13 -#define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12, _T13 __a13 -#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12, __a13 -#include _GLIBCXX_REPEAT_HEADER -#undef _GLIBCXX_ARGS_SHIFTED -#undef _GLIBCXX_PARAMS_SHIFTED -#undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED -#undef _GLIBCXX_TEMPLATE_PARAMS_SHIFTED -#undef _GLIBCXX_COMMA_SHIFTED -#undef _GLIBCXX_ARGS -#undef _GLIBCXX_REF_PARAMS -#undef _GLIBCXX_PARAMS -#undef _GLIBCXX_TEMPLATE_ARGS -#undef _GLIBCXX_TEMPLATE_PARAMS -#undef _GLIBCXX_COMMA -#undef _GLIBCXX_NUM_ARGS - -#define _GLIBCXX_NUM_ARGS 15 -#define _GLIBCXX_COMMA , -#define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13, typename _T14, typename _T15 -#define _GLIBCXX_TEMPLATE_ARGS _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15 -#define _GLIBCXX_PARAMS _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12, _T13 __a13, _T14 __a14, _T15 __a15 -#define _GLIBCXX_REF_PARAMS _T1& __a1, _T2& __a2, _T3& __a3, _T4& __a4, _T5& __a5, _T6& __a6, _T7& __a7, _T8& __a8, _T9& __a9, _T10& __a10, _T11& __a11, _T12& __a12, _T13& __a13, _T14& __a14, _T15& __a15 -#define _GLIBCXX_ARGS __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12, __a13, __a14, __a15 -#define _GLIBCXX_COMMA_SHIFTED , -#define _GLIBCXX_TEMPLATE_PARAMS_SHIFTED typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13, typename _T14 -#define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14 -#define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12, _T13 __a13, _T14 __a14 -#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12, __a13, __a14 -#include _GLIBCXX_REPEAT_HEADER -#undef _GLIBCXX_ARGS_SHIFTED -#undef _GLIBCXX_PARAMS_SHIFTED -#undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED -#undef _GLIBCXX_TEMPLATE_PARAMS_SHIFTED -#undef _GLIBCXX_COMMA_SHIFTED -#undef _GLIBCXX_ARGS -#undef _GLIBCXX_REF_PARAMS -#undef _GLIBCXX_PARAMS -#undef _GLIBCXX_TEMPLATE_ARGS -#undef _GLIBCXX_TEMPLATE_PARAMS -#undef _GLIBCXX_COMMA -#undef _GLIBCXX_NUM_ARGS - -#define _GLIBCXX_NUM_ARGS 16 -#define _GLIBCXX_COMMA , -#define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13, typename _T14, typename _T15, typename _T16 -#define _GLIBCXX_TEMPLATE_ARGS _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16 -#define _GLIBCXX_PARAMS _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12, _T13 __a13, _T14 __a14, _T15 __a15, _T16 __a16 -#define _GLIBCXX_REF_PARAMS _T1& __a1, _T2& __a2, _T3& __a3, _T4& __a4, _T5& __a5, _T6& __a6, _T7& __a7, _T8& __a8, _T9& __a9, _T10& __a10, _T11& __a11, _T12& __a12, _T13& __a13, _T14& __a14, _T15& __a15, _T16& __a16 -#define _GLIBCXX_ARGS __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12, __a13, __a14, __a15, __a16 -#define _GLIBCXX_COMMA_SHIFTED , -#define _GLIBCXX_TEMPLATE_PARAMS_SHIFTED typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13, typename _T14, typename _T15 -#define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15 -#define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12, _T13 __a13, _T14 __a14, _T15 __a15 -#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12, __a13, __a14, __a15 -#include _GLIBCXX_REPEAT_HEADER -#undef _GLIBCXX_ARGS_SHIFTED -#undef _GLIBCXX_PARAMS_SHIFTED -#undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED -#undef _GLIBCXX_TEMPLATE_PARAMS_SHIFTED -#undef _GLIBCXX_COMMA_SHIFTED -#undef _GLIBCXX_ARGS -#undef _GLIBCXX_REF_PARAMS -#undef _GLIBCXX_PARAMS -#undef _GLIBCXX_TEMPLATE_ARGS -#undef _GLIBCXX_TEMPLATE_PARAMS -#undef _GLIBCXX_COMMA -#undef _GLIBCXX_NUM_ARGS - -#define _GLIBCXX_NUM_ARGS 17 -#define _GLIBCXX_COMMA , -#define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13, typename _T14, typename _T15, typename _T16, typename _T17 -#define _GLIBCXX_TEMPLATE_ARGS _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17 -#define _GLIBCXX_PARAMS _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12, _T13 __a13, _T14 __a14, _T15 __a15, _T16 __a16, _T17 __a17 -#define _GLIBCXX_REF_PARAMS _T1& __a1, _T2& __a2, _T3& __a3, _T4& __a4, _T5& __a5, _T6& __a6, _T7& __a7, _T8& __a8, _T9& __a9, _T10& __a10, _T11& __a11, _T12& __a12, _T13& __a13, _T14& __a14, _T15& __a15, _T16& __a16, _T17& __a17 -#define _GLIBCXX_ARGS __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12, __a13, __a14, __a15, __a16, __a17 -#define _GLIBCXX_COMMA_SHIFTED , -#define _GLIBCXX_TEMPLATE_PARAMS_SHIFTED typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13, typename _T14, typename _T15, typename _T16 -#define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16 -#define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12, _T13 __a13, _T14 __a14, _T15 __a15, _T16 __a16 -#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12, __a13, __a14, __a15, __a16 -#include _GLIBCXX_REPEAT_HEADER -#undef _GLIBCXX_ARGS_SHIFTED -#undef _GLIBCXX_PARAMS_SHIFTED -#undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED -#undef _GLIBCXX_TEMPLATE_PARAMS_SHIFTED -#undef _GLIBCXX_COMMA_SHIFTED -#undef _GLIBCXX_ARGS -#undef _GLIBCXX_REF_PARAMS -#undef _GLIBCXX_PARAMS -#undef _GLIBCXX_TEMPLATE_ARGS -#undef _GLIBCXX_TEMPLATE_PARAMS -#undef _GLIBCXX_COMMA -#undef _GLIBCXX_NUM_ARGS - -#define _GLIBCXX_NUM_ARGS 18 -#define _GLIBCXX_COMMA , -#define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13, typename _T14, typename _T15, typename _T16, typename _T17, typename _T18 -#define _GLIBCXX_TEMPLATE_ARGS _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18 -#define _GLIBCXX_PARAMS _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12, _T13 __a13, _T14 __a14, _T15 __a15, _T16 __a16, _T17 __a17, _T18 __a18 -#define _GLIBCXX_REF_PARAMS _T1& __a1, _T2& __a2, _T3& __a3, _T4& __a4, _T5& __a5, _T6& __a6, _T7& __a7, _T8& __a8, _T9& __a9, _T10& __a10, _T11& __a11, _T12& __a12, _T13& __a13, _T14& __a14, _T15& __a15, _T16& __a16, _T17& __a17, _T18& __a18 -#define _GLIBCXX_ARGS __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12, __a13, __a14, __a15, __a16, __a17, __a18 -#define _GLIBCXX_COMMA_SHIFTED , -#define _GLIBCXX_TEMPLATE_PARAMS_SHIFTED typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13, typename _T14, typename _T15, typename _T16, typename _T17 -#define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17 -#define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12, _T13 __a13, _T14 __a14, _T15 __a15, _T16 __a16, _T17 __a17 -#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12, __a13, __a14, __a15, __a16, __a17 -#include _GLIBCXX_REPEAT_HEADER -#undef _GLIBCXX_ARGS_SHIFTED -#undef _GLIBCXX_PARAMS_SHIFTED -#undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED -#undef _GLIBCXX_TEMPLATE_PARAMS_SHIFTED -#undef _GLIBCXX_COMMA_SHIFTED -#undef _GLIBCXX_ARGS -#undef _GLIBCXX_REF_PARAMS -#undef _GLIBCXX_PARAMS -#undef _GLIBCXX_TEMPLATE_ARGS -#undef _GLIBCXX_TEMPLATE_PARAMS -#undef _GLIBCXX_COMMA -#undef _GLIBCXX_NUM_ARGS - -#define _GLIBCXX_NUM_ARGS 19 -#define _GLIBCXX_COMMA , -#define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13, typename _T14, typename _T15, typename _T16, typename _T17, typename _T18, typename _T19 -#define _GLIBCXX_TEMPLATE_ARGS _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19 -#define _GLIBCXX_PARAMS _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12, _T13 __a13, _T14 __a14, _T15 __a15, _T16 __a16, _T17 __a17, _T18 __a18, _T19 __a19 -#define _GLIBCXX_REF_PARAMS _T1& __a1, _T2& __a2, _T3& __a3, _T4& __a4, _T5& __a5, _T6& __a6, _T7& __a7, _T8& __a8, _T9& __a9, _T10& __a10, _T11& __a11, _T12& __a12, _T13& __a13, _T14& __a14, _T15& __a15, _T16& __a16, _T17& __a17, _T18& __a18, _T19& __a19 -#define _GLIBCXX_ARGS __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12, __a13, __a14, __a15, __a16, __a17, __a18, __a19 -#define _GLIBCXX_COMMA_SHIFTED , -#define _GLIBCXX_TEMPLATE_PARAMS_SHIFTED typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13, typename _T14, typename _T15, typename _T16, typename _T17, typename _T18 -#define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18 -#define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12, _T13 __a13, _T14 __a14, _T15 __a15, _T16 __a16, _T17 __a17, _T18 __a18 -#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12, __a13, __a14, __a15, __a16, __a17, __a18 -#include _GLIBCXX_REPEAT_HEADER -#undef _GLIBCXX_ARGS_SHIFTED -#undef _GLIBCXX_PARAMS_SHIFTED -#undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED -#undef _GLIBCXX_TEMPLATE_PARAMS_SHIFTED -#undef _GLIBCXX_COMMA_SHIFTED -#undef _GLIBCXX_ARGS -#undef _GLIBCXX_REF_PARAMS -#undef _GLIBCXX_PARAMS -#undef _GLIBCXX_TEMPLATE_ARGS -#undef _GLIBCXX_TEMPLATE_PARAMS -#undef _GLIBCXX_COMMA -#undef _GLIBCXX_NUM_ARGS - -#define _GLIBCXX_NUM_ARGS 20 -#define _GLIBCXX_COMMA , -#define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13, typename _T14, typename _T15, typename _T16, typename _T17, typename _T18, typename _T19, typename _T20 -#define _GLIBCXX_TEMPLATE_ARGS _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20 -#define _GLIBCXX_PARAMS _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12, _T13 __a13, _T14 __a14, _T15 __a15, _T16 __a16, _T17 __a17, _T18 __a18, _T19 __a19, _T20 __a20 -#define _GLIBCXX_REF_PARAMS _T1& __a1, _T2& __a2, _T3& __a3, _T4& __a4, _T5& __a5, _T6& __a6, _T7& __a7, _T8& __a8, _T9& __a9, _T10& __a10, _T11& __a11, _T12& __a12, _T13& __a13, _T14& __a14, _T15& __a15, _T16& __a16, _T17& __a17, _T18& __a18, _T19& __a19, _T20& __a20 -#define _GLIBCXX_ARGS __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12, __a13, __a14, __a15, __a16, __a17, __a18, __a19, __a20 -#define _GLIBCXX_COMMA_SHIFTED , -#define _GLIBCXX_TEMPLATE_PARAMS_SHIFTED typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13, typename _T14, typename _T15, typename _T16, typename _T17, typename _T18, typename _T19 -#define _GLIBCXX_TEMPLATE_ARGS_SHIFTED _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19 -#define _GLIBCXX_PARAMS_SHIFTED _T1 __a1, _T2 __a2, _T3 __a3, _T4 __a4, _T5 __a5, _T6 __a6, _T7 __a7, _T8 __a8, _T9 __a9, _T10 __a10, _T11 __a11, _T12 __a12, _T13 __a13, _T14 __a14, _T15 __a15, _T16 __a16, _T17 __a17, _T18 __a18, _T19 __a19 -#define _GLIBCXX_ARGS_SHIFTED __a1, __a2, __a3, __a4, __a5, __a6, __a7, __a8, __a9, __a10, __a11, __a12, __a13, __a14, __a15, __a16, __a17, __a18, __a19 -#include _GLIBCXX_REPEAT_HEADER -#undef _GLIBCXX_ARGS_SHIFTED -#undef _GLIBCXX_PARAMS_SHIFTED -#undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED -#undef _GLIBCXX_TEMPLATE_PARAMS_SHIFTED -#undef _GLIBCXX_COMMA_SHIFTED -#undef _GLIBCXX_ARGS -#undef _GLIBCXX_REF_PARAMS -#undef _GLIBCXX_PARAMS -#undef _GLIBCXX_TEMPLATE_ARGS -#undef _GLIBCXX_TEMPLATE_PARAMS -#undef _GLIBCXX_COMMA -#undef _GLIBCXX_NUM_ARGS +#undef _GLIBCXX_LAST_INCLUDE diff --git a/libstdc++-v3/include/tr1/tuple b/libstdc++-v3/include/tr1/tuple index b3fed8ad6d6..89bccc3d495 100644 --- a/libstdc++-v3/include/tr1/tuple +++ b/libstdc++-v3/include/tr1/tuple @@ -27,1432 +27,249 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -/** @file - * This is a TR1 C++ Library header. - */ +/** @file +* This is a TR1 C++ Library header. +*/ // Chris Jefferson -// This header is automatically generated: see maketuple.c for details. - #ifndef _TUPLE #define _TUPLE 1 #include -#include +#include namespace std { namespace tr1 { - // An implementation specific class which is used in the tuple class - // when the tuple is not maximum possible size. - struct _NullClass { }; - - template - class tuple; - - /// Gives the type of the ith element of a given tuple type. - template - struct tuple_element; - - template - struct tuple_element<0, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, - _Tp7, _Tp8, _Tp9> > - { typedef _Tp0 type; }; - - template - struct tuple_element<1, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, - _Tp7, _Tp8, _Tp9> > - { typedef _Tp1 type; }; - - template - struct tuple_element<2, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, - _Tp7, _Tp8, _Tp9> > - { typedef _Tp2 type; }; - - template - struct tuple_element<3, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, - _Tp7, _Tp8, _Tp9> > - { typedef _Tp3 type; }; - - template - struct tuple_element<4, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, - _Tp7, _Tp8, _Tp9> > - { typedef _Tp4 type; }; - - template - struct tuple_element<5, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, - _Tp7, _Tp8, _Tp9> > - { typedef _Tp5 type; }; - - template - struct tuple_element<6, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, - _Tp7, _Tp8, _Tp9> > - { typedef _Tp6 type; }; - - template - struct tuple_element<7, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, - _Tp7, _Tp8, _Tp9> > - { typedef _Tp7 type; }; - - template - struct tuple_element<8, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, - _Tp7, _Tp8, _Tp9> > - { typedef _Tp8 type; }; - - /// @brief class tuple_element - template - struct tuple_element<9, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, - _Tp7, _Tp8, _Tp9> > - { typedef _Tp9 type; }; - - /// Finds the size of a given tuple type. - template - struct tuple_size; - - template<> - struct tuple_size > - { static const int value = 0; }; - - template< typename _Tp0> - struct tuple_size > - { static const int value = 1; }; - - template - struct tuple_size > - { static const int value = 2; }; - - template - struct tuple_size > - { static const int value = 3; }; - - template - struct tuple_size > - { static const int value = 4; }; - - template - struct tuple_size > - { static const int value = 5; }; - - template - struct tuple_size > - { static const int value = 6; }; - - template - struct tuple_size > - { static const int value = 7; }; - - template - struct tuple_size > - { static const int value = 8; }; - - template - struct tuple_size > - { static const int value = 9; }; - - /// @brief class tuple_size - template - struct tuple_size > - { static const int value = 10; }; - - // Adds a const reference to a non-reference type. - template - struct __add_c_ref - { typedef const _Tp& type; }; - - template - struct __add_c_ref<_Tp&> - { typedef _Tp& type; }; - - // Adds a reference to a non-reference type. - template - struct __add_ref - { typedef _Tp& type; }; - - template - struct __add_ref<_Tp&> - { typedef _Tp& type; }; - - // The empty tuple. - template<> - class tuple<_NullClass, _NullClass, _NullClass, _NullClass, _NullClass, - _NullClass, _NullClass, _NullClass, _NullClass, _NullClass> - { - public: - tuple() - { } - - tuple(const tuple& __in) - { } - - tuple& operator=(const tuple& __in) - { return *this; } - }; - - template< typename _Tp0> - class tuple< _Tp0, _NullClass, _NullClass, _NullClass, _NullClass, - _NullClass, _NullClass, _NullClass, _NullClass, _NullClass> - { - _Tp0 _M_t0; - - public: - tuple() - { } - - explicit tuple( typename __add_c_ref<_Tp0>::type __in0): - _M_t0(__in0) - { } - - tuple(const tuple& __in): - _M_t0(__in._M_t0) - { } - - template< typename _Up0> - tuple(const tuple< _Up0>& __in): - _M_t0(__in._M_t0) - { } - - tuple& - operator=(const tuple& __in) - { - _M_t0=__in._M_t0; - return *this; - } - - template< typename _Up0> - tuple& - operator=(const tuple< _Up0>& __in) - { - _M_t0=__in._M_t0; - return *this; - } - - template - friend class __get_helper; - template - friend class tuple; - }; - - template - class tuple<_Tp0, _Tp1, _NullClass, _NullClass, _NullClass, _NullClass, - _NullClass, _NullClass, _NullClass, _NullClass> - { - _Tp0 _M_t0; - _Tp1 _M_t1; - - public: - tuple() - { } - - explicit tuple(typename __add_c_ref<_Tp0>::type __in0, - typename __add_c_ref<_Tp1>::type __in1): - _M_t0(__in0), _M_t1(__in1) - { } - - tuple(const tuple& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1) - { } - - template - tuple(const tuple<_Up0, _Up1>& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1) - { } - - template - tuple(const std::pair<_Up1, _Up2>& __u): - _M_t0(__u.first), _M_t1(__u.second) - { } - - tuple& - operator=(const tuple& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - return *this; - } - - template - tuple& - operator=(const tuple<_Up0, _Up1>& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - return *this; - } - - template - friend class __get_helper; - template - friend class tuple; - }; - - template - class tuple<_Tp0, _Tp1, _Tp2, _NullClass, _NullClass, _NullClass, - _NullClass, _NullClass, _NullClass, _NullClass> - { - _Tp0 _M_t0; - _Tp1 _M_t1; - _Tp2 _M_t2; - - public: - tuple() - { } - - explicit tuple(typename __add_c_ref<_Tp0>::type __in0, - typename __add_c_ref<_Tp1>::type __in1, - typename __add_c_ref<_Tp2>::type __in2): - _M_t0(__in0), _M_t1(__in1), _M_t2(__in2) - { } - - tuple(const tuple& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2) - { } - - template - tuple(const tuple<_Up0, _Up1, _Up2>& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2) - { } - - tuple& - operator=(const tuple& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - _M_t2=__in._M_t2; - return *this; - } - - template - tuple& - operator=(const tuple<_Up0, _Up1, _Up2>& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - _M_t2=__in._M_t2; - return *this; - } - - template - friend class __get_helper; - template - friend class tuple; - }; - - template - class tuple<_Tp0, _Tp1, _Tp2, _Tp3, _NullClass, _NullClass, _NullClass, - _NullClass, _NullClass, _NullClass> - { - _Tp0 _M_t0; - _Tp1 _M_t1; - _Tp2 _M_t2; - _Tp3 _M_t3; - - public: - tuple() - { } - - explicit tuple(typename __add_c_ref<_Tp0>::type __in0, - typename __add_c_ref<_Tp1>::type __in1, - typename __add_c_ref<_Tp2>::type __in2, - typename __add_c_ref<_Tp3>::type __in3): - _M_t0(__in0), _M_t1(__in1), _M_t2(__in2), _M_t3(__in3) - { } - - tuple(const tuple& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2), - _M_t3(__in._M_t3) - { } - - template - tuple(const tuple<_Up0, _Up1, _Up2, _Up3>& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2), - _M_t3(__in._M_t3) - { } - - tuple& - operator=(const tuple& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - _M_t2=__in._M_t2; - _M_t3=__in._M_t3; - return *this; - } - - template - tuple& - operator=(const tuple<_Up0, _Up1, _Up2, _Up3>& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - _M_t2=__in._M_t2; - _M_t3=__in._M_t3; - return *this; - } - - template - friend class __get_helper; - template - friend class tuple; - }; - - template - class tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _NullClass, _NullClass, - _NullClass, _NullClass, _NullClass> - { - _Tp0 _M_t0; - _Tp1 _M_t1; - _Tp2 _M_t2; - _Tp3 _M_t3; - _Tp4 _M_t4; - - public: - tuple() - { } - - explicit tuple(typename __add_c_ref<_Tp0>::type __in0, - typename __add_c_ref<_Tp1>::type __in1, - typename __add_c_ref<_Tp2>::type __in2, - typename __add_c_ref<_Tp3>::type __in3, - typename __add_c_ref<_Tp4>::type __in4): - _M_t0(__in0), _M_t1(__in1), _M_t2(__in2), _M_t3(__in3), _M_t4(__in4) - { } - - tuple(const tuple& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2), - _M_t3(__in._M_t3), _M_t4(__in._M_t4) - { } - - template - tuple(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4>& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2), - _M_t3(__in._M_t3), _M_t4(__in._M_t4) - { } - - tuple& - operator=(const tuple& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - _M_t2=__in._M_t2; - _M_t3=__in._M_t3; - _M_t4=__in._M_t4; - return *this; - } - - template - tuple& - operator=(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4>& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - _M_t2=__in._M_t2; - _M_t3=__in._M_t3; - _M_t4=__in._M_t4; - return *this; - } - - template - friend class __get_helper; - template - friend class tuple; - }; - - template - class tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _NullClass, _NullClass, - _NullClass, _NullClass> - { - _Tp0 _M_t0; - _Tp1 _M_t1; - _Tp2 _M_t2; - _Tp3 _M_t3; - _Tp4 _M_t4; - _Tp5 _M_t5; - - public: - tuple() - { } - - explicit tuple(typename __add_c_ref<_Tp0>::type __in0, - typename __add_c_ref<_Tp1>::type __in1, - typename __add_c_ref<_Tp2>::type __in2, - typename __add_c_ref<_Tp3>::type __in3, - typename __add_c_ref<_Tp4>::type __in4, - typename __add_c_ref<_Tp5>::type __in5): - _M_t0(__in0), _M_t1(__in1), _M_t2(__in2), _M_t3(__in3), _M_t4(__in4), - _M_t5(__in5) - { } - - tuple(const tuple& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2), - _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5) - { } - - template - tuple(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5>& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2), - _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5) - { } - - tuple& - operator=(const tuple& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - _M_t2=__in._M_t2; - _M_t3=__in._M_t3; - _M_t4=__in._M_t4; - _M_t5=__in._M_t5; - return *this; - } - - template - tuple& - operator=(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5>& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - _M_t2=__in._M_t2; - _M_t3=__in._M_t3; - _M_t4=__in._M_t4; - _M_t5=__in._M_t5; - return *this; - } - - template - friend class __get_helper; - template - friend class tuple; - }; - - template - class tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _NullClass, - _NullClass, _NullClass> - { - _Tp0 _M_t0; - _Tp1 _M_t1; - _Tp2 _M_t2; - _Tp3 _M_t3; - _Tp4 _M_t4; - _Tp5 _M_t5; - _Tp6 _M_t6; - - public: - tuple() - { } - - explicit tuple(typename __add_c_ref<_Tp0>::type __in0, - typename __add_c_ref<_Tp1>::type __in1, - typename __add_c_ref<_Tp2>::type __in2, - typename __add_c_ref<_Tp3>::type __in3, - typename __add_c_ref<_Tp4>::type __in4, - typename __add_c_ref<_Tp5>::type __in5, - typename __add_c_ref<_Tp6>::type __in6): - _M_t0(__in0), _M_t1(__in1), _M_t2(__in2), _M_t3(__in3), _M_t4(__in4), - _M_t5(__in5), _M_t6(__in6) - { } - - tuple(const tuple& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2), - _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5), - _M_t6(__in._M_t6) - { } - - template - tuple(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6>& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2), - _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5), - _M_t6(__in._M_t6) - { } - - tuple& - operator=(const tuple& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - _M_t2=__in._M_t2; - _M_t3=__in._M_t3; - _M_t4=__in._M_t4; - _M_t5=__in._M_t5; - _M_t6=__in._M_t6; - return *this; - } - - template - tuple& - operator=(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, - _Up6>& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - _M_t2=__in._M_t2; - _M_t3=__in._M_t3; - _M_t4=__in._M_t4; - _M_t5=__in._M_t5; - _M_t6=__in._M_t6; - return *this; - } - - template - friend class __get_helper; - template - friend class tuple; - }; - - template - class tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _NullClass, - _NullClass> - { - _Tp0 _M_t0; - _Tp1 _M_t1; - _Tp2 _M_t2; - _Tp3 _M_t3; - _Tp4 _M_t4; - _Tp5 _M_t5; - _Tp6 _M_t6; - _Tp7 _M_t7; - - public: - tuple() - { } - - explicit tuple(typename __add_c_ref<_Tp0>::type __in0, - typename __add_c_ref<_Tp1>::type __in1, - typename __add_c_ref<_Tp2>::type __in2, - typename __add_c_ref<_Tp3>::type __in3, - typename __add_c_ref<_Tp4>::type __in4, - typename __add_c_ref<_Tp5>::type __in5, - typename __add_c_ref<_Tp6>::type __in6, - typename __add_c_ref<_Tp7>::type __in7): - _M_t0(__in0), _M_t1(__in1), _M_t2(__in2), _M_t3(__in3), _M_t4(__in4), - _M_t5(__in5), _M_t6(__in6), _M_t7(__in7) - { } - - tuple(const tuple& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2), - _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5), - _M_t6(__in._M_t6), _M_t7(__in._M_t7) - { } - - template - tuple(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, - _Up7>& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2), - _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5), - _M_t6(__in._M_t6), _M_t7(__in._M_t7) - { } - - tuple& - operator=(const tuple& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - _M_t2=__in._M_t2; - _M_t3=__in._M_t3; - _M_t4=__in._M_t4; - _M_t5=__in._M_t5; - _M_t6=__in._M_t6; - _M_t7=__in._M_t7; - return *this; - } - - template - tuple& - operator=(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, - _Up7>& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - _M_t2=__in._M_t2; - _M_t3=__in._M_t3; - _M_t4=__in._M_t4; - _M_t5=__in._M_t5; - _M_t6=__in._M_t6; - _M_t7=__in._M_t7; - return *this; - } - - template - friend class __get_helper; - template - friend class tuple; - }; - - template - class tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, - _NullClass> - { - _Tp0 _M_t0; - _Tp1 _M_t1; - _Tp2 _M_t2; - _Tp3 _M_t3; - _Tp4 _M_t4; - _Tp5 _M_t5; - _Tp6 _M_t6; - _Tp7 _M_t7; - _Tp8 _M_t8; - - public: - tuple() - { } - - explicit tuple(typename __add_c_ref<_Tp0>::type __in0, - typename __add_c_ref<_Tp1>::type __in1, - typename __add_c_ref<_Tp2>::type __in2, - typename __add_c_ref<_Tp3>::type __in3, - typename __add_c_ref<_Tp4>::type __in4, - typename __add_c_ref<_Tp5>::type __in5, - typename __add_c_ref<_Tp6>::type __in6, - typename __add_c_ref<_Tp7>::type __in7, - typename __add_c_ref<_Tp8>::type __in8): - _M_t0(__in0), _M_t1(__in1), _M_t2(__in2), _M_t3(__in3), _M_t4(__in4), - _M_t5(__in5), _M_t6(__in6), _M_t7(__in7), _M_t8(__in8) - { } - - tuple(const tuple& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2), - _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5), - _M_t6(__in._M_t6), _M_t7(__in._M_t7), _M_t8(__in._M_t8) - { } - - template - tuple(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, - _Up8>& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2), - _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5), - _M_t6(__in._M_t6), _M_t7(__in._M_t7), _M_t8(__in._M_t8) - { } - - tuple& - operator=(const tuple& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - _M_t2=__in._M_t2; - _M_t3=__in._M_t3; - _M_t4=__in._M_t4; - _M_t5=__in._M_t5; - _M_t6=__in._M_t6; - _M_t7=__in._M_t7; - _M_t8=__in._M_t8; - return *this; - } - - template - tuple& - operator=(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, - _Up8>& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - _M_t2=__in._M_t2; - _M_t3=__in._M_t3; - _M_t4=__in._M_t4; - _M_t5=__in._M_t5; - _M_t6=__in._M_t6; - _M_t7=__in._M_t7; - _M_t8=__in._M_t8; - return *this; - } - - template - friend class __get_helper; - template - friend class tuple; - }; - - /// @brief Template class tuple - template - class tuple - { - _Tp0 _M_t0; - _Tp1 _M_t1; - _Tp2 _M_t2; - _Tp3 _M_t3; - _Tp4 _M_t4; - _Tp5 _M_t5; - _Tp6 _M_t6; - _Tp7 _M_t7; - _Tp8 _M_t8; - _Tp9 _M_t9; - - public: - tuple() - { } - - explicit tuple(typename __add_c_ref<_Tp0>::type __in0, - typename __add_c_ref<_Tp1>::type __in1, - typename __add_c_ref<_Tp2>::type __in2, - typename __add_c_ref<_Tp3>::type __in3, - typename __add_c_ref<_Tp4>::type __in4, - typename __add_c_ref<_Tp5>::type __in5, - typename __add_c_ref<_Tp6>::type __in6, - typename __add_c_ref<_Tp7>::type __in7, - typename __add_c_ref<_Tp8>::type __in8, - typename __add_c_ref<_Tp9>::type __in9): - _M_t0(__in0), _M_t1(__in1), _M_t2(__in2), _M_t3(__in3), _M_t4(__in4), - _M_t5(__in5), _M_t6(__in6), _M_t7(__in7), _M_t8(__in8), _M_t9(__in9) - { } - - tuple(const tuple& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2), - _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5), - _M_t6(__in._M_t6), _M_t7(__in._M_t7), _M_t8(__in._M_t8), - _M_t9(__in._M_t9) - { } - - template - tuple(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8, - _Up9>& __in): - _M_t0(__in._M_t0), _M_t1(__in._M_t1), _M_t2(__in._M_t2), - _M_t3(__in._M_t3), _M_t4(__in._M_t4), _M_t5(__in._M_t5), - _M_t6(__in._M_t6), _M_t7(__in._M_t7), _M_t8(__in._M_t8), - _M_t9(__in._M_t9) - { } - - tuple& - operator=(const tuple& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - _M_t2=__in._M_t2; - _M_t3=__in._M_t3; - _M_t4=__in._M_t4; - _M_t5=__in._M_t5; - _M_t6=__in._M_t6; - _M_t7=__in._M_t7; - _M_t8=__in._M_t8; - _M_t9=__in._M_t9; - return *this; - } - - template - tuple& - operator=(const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, - _Up8, _Up9>& __in) - { - _M_t0=__in._M_t0; - _M_t1=__in._M_t1; - _M_t2=__in._M_t2; - _M_t3=__in._M_t3; - _M_t4=__in._M_t4; - _M_t5=__in._M_t5; - _M_t6=__in._M_t6; - _M_t7=__in._M_t7; - _M_t8=__in._M_t8; - _M_t9=__in._M_t9; - return *this; - } - - template - friend class __get_helper; - template - friend class tuple; - }; - - // Class used in the implementation of get - template - struct __get_helper; - - template - struct __get_helper<0, _Tp> - { - static typename __add_ref::type>::type - get_value(_Tp& __in) - { return __in._M_t0; } - - static typename __add_c_ref::type>::type - get_value(const _Tp& __in) - { return __in._M_t0; } - }; - - template - struct __get_helper<1, _Tp> - { - static typename __add_ref::type>::type - get_value(_Tp& __in) - { return __in._M_t1; } - - static typename __add_c_ref::type>::type - get_value(const _Tp& __in) - { return __in._M_t1; } - }; - - template - struct __get_helper<2, _Tp> - { - static typename __add_ref::type>::type - get_value(_Tp& __in) - { return __in._M_t2; } - - static typename __add_c_ref::type>::type - get_value(const _Tp& __in) - { return __in._M_t2; } - }; - - template - struct __get_helper<3, _Tp> - { - static typename __add_ref::type>::type - get_value(_Tp& __in) - { return __in._M_t3; } - - static typename __add_c_ref::type>::type - get_value(const _Tp& __in) - { return __in._M_t3; } - }; - - template - struct __get_helper<4, _Tp> - { - static typename __add_ref::type>::type - get_value(_Tp& __in) - { return __in._M_t4; } - - static typename __add_c_ref::type>::type - get_value(const _Tp& __in) - { return __in._M_t4; } - }; - - template - struct __get_helper<5, _Tp> - { - static typename __add_ref::type>::type - get_value(_Tp& __in) - { return __in._M_t5; } - - static typename __add_c_ref::type>::type - get_value(const _Tp& __in) - { return __in._M_t5; } - }; - - template - struct __get_helper<6, _Tp> - { - static typename __add_ref::type>::type - get_value(_Tp& __in) - { return __in._M_t6; } - - static typename __add_c_ref::type>::type - get_value(const _Tp& __in) - { return __in._M_t6; } - }; - - template - struct __get_helper<7, _Tp> - { - static typename __add_ref::type>::type - get_value(_Tp& __in) - { return __in._M_t7; } - - static typename __add_c_ref::type>::type - get_value(const _Tp& __in) - { return __in._M_t7; } - }; - - template - struct __get_helper<8, _Tp> - { - static typename __add_ref::type>::type - get_value(_Tp& __in) - { return __in._M_t8; } - - static typename __add_c_ref::type>::type - get_value(const _Tp& __in) - { return __in._M_t8; } - }; - - template - struct __get_helper<9, _Tp> - { - static typename __add_ref::type>::type - get_value(_Tp& __in) - { return __in._M_t9; } - - static typename __add_c_ref::type>::type - get_value(const _Tp& __in) - { return __in._M_t9; } - }; - - // Returns a reference to the ith element of a tuple. - // Any const or non-const ref elements are returned with their original type. - template - typename __add_ref >::type>::type - get(tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, - _Tp9>& __t) - { - return __get_helper<__i, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, - _Tp7, _Tp8, _Tp9> >::get_value(__t); - } - - // Returns a const reference to the ith element of a tuple. - // Any const or non-const ref elements are returned with their original type. - template - typename __add_c_ref >::type>::type - get(const tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, - _Tp9>& __t) - { - return __get_helper<__i, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, - _Tp7, _Tp8, _Tp9> >::get_value(__t); - } - - // This class helps construct the various comparison operations on tuples - template - struct __tuple_compare; - - template - struct __tuple_compare<0, __i, __j, _Tp, _Up> - { - static bool __eq(const _Tp& __t, const _Up& __u) - { - return get<__i>(__t) == get<__i>(__u) && - __tuple_compare<0, __i+1, __j, _Tp, _Up>::__eq(__t, __u); - } - static bool __less(const _Tp& __t, const _Up& __u) - { - return (get<__i>(__t) < get<__i>(__u)) || !(get<__i>(__u) < get<__i>(__t)) && - __tuple_compare<0, __i+1, __j, _Tp, _Up>::__less(__t, __u); - } - }; - - template - struct __tuple_compare<0, __i, __i, _Tp, _Up> - { - static bool __eq(const _Tp&, const _Up&) - { return true; } - static bool __less(const _Tp&, const _Up&) - { return false; } - }; - - template - bool - operator==(const tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, _Tp9>& __t, - const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8, _Up9>& __u) - { - typedef tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, - _Tp9> _Tp; - typedef tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8, - _Up9> _Up; - return __tuple_compare::value - - tuple_size<_Tp>::value, 0, - tuple_size<_Tp>::value, _Tp, _Up>::__eq(__t, __u); - } - - template - bool - operator<(const tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, _Tp9>& __t, - const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8, _Up9>& __u) - { - typedef tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, - _Tp9> _Tp; - typedef tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8, - _Up9> _Up; - return __tuple_compare::value - - tuple_size<_Tp>::value, 0, - tuple_size<_Tp>::value, _Tp, _Up>::__less(__t, __u); - } - - template - bool - operator!=(const tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, _Tp9>& __t, - const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8, _Up9>& __u) - { - return !(__t == __u); - } - template - bool - operator>(const tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, _Tp9>& __t, - const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8, _Up9>& __u) - { - return __u < __t; - } - template - bool - operator<=(const tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, _Tp9>& __t, - const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8, _Up9>& __u) - { - return !(__u < __t); - } - template - bool - operator>=(const tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, _Tp9>& __t, - const tuple<_Up0, _Up1, _Up2, _Up3, _Up4, _Up5, _Up6, _Up7, _Up8, _Up9>& __u) - { - return !(__t < __u); - } - - // Helper which adds a reference to a type when given a reference_wrapper - template - struct __strip_reference_wrapper - { - typedef _Tp __type; - }; - - template - struct __strip_reference_wrapper > - { - typedef _Tp& __type; - }; - - template - struct __strip_reference_wrapper > - { - typedef _Tp& __type; - }; - - template - struct __stripped_tuple_type - { - typedef tuple::__type, - typename __strip_reference_wrapper<_Tp1>::__type, - typename __strip_reference_wrapper<_Tp2>::__type, - typename __strip_reference_wrapper<_Tp3>::__type, - typename __strip_reference_wrapper<_Tp4>::__type, - typename __strip_reference_wrapper<_Tp5>::__type, - typename __strip_reference_wrapper<_Tp6>::__type, - typename __strip_reference_wrapper<_Tp7>::__type, - typename __strip_reference_wrapper<_Tp8>::__type, - typename __strip_reference_wrapper<_Tp9>::__type> __type; - }; - - tuple<> - make_tuple() - { return tuple<>(); } - - template< typename _Tp0> - typename __stripped_tuple_type< _Tp0>::__type - make_tuple( _Tp0 __t0) - { - return typename __stripped_tuple_type< _Tp0>:: - __type( __t0); - } - - template - typename __stripped_tuple_type<_Tp0, _Tp1>::__type - make_tuple(_Tp0 __t0, _Tp1 __t1) - { - return typename __stripped_tuple_type<_Tp0, _Tp1>:: - __type(__t0, __t1); - } - - template - typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2>::__type - make_tuple(_Tp0 __t0, _Tp1 __t1, _Tp2 __t2) - { - return typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2>:: - __type(__t0, __t1, __t2); - } - - template - typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3>::__type - make_tuple(_Tp0 __t0, _Tp1 __t1, _Tp2 __t2, _Tp3 __t3) - { - return typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3>:: - __type(__t0, __t1, __t2, __t3); - } - - template - typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4>::__type - make_tuple(_Tp0 __t0, _Tp1 __t1, _Tp2 __t2, _Tp3 __t3, _Tp4 __t4) - { - return typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4>:: - __type(__t0, __t1, __t2, __t3, __t4); - } - - template - typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, - _Tp5>::__type - make_tuple(_Tp0 __t0, _Tp1 __t1, _Tp2 __t2, _Tp3 __t3, _Tp4 __t4, - _Tp5 __t5) - { - return typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, - _Tp5>:: - __type(__t0, __t1, __t2, __t3, __t4, __t5); - } - - template - typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, - _Tp6>::__type - make_tuple(_Tp0 __t0, _Tp1 __t1, _Tp2 __t2, _Tp3 __t3, _Tp4 __t4, - _Tp5 __t5, _Tp6 __t6) - { - return typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, - _Tp5, _Tp6>:: - __type(__t0, __t1, __t2, __t3, __t4, __t5, __t6); - } - - template - typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, - _Tp7>::__type - make_tuple(_Tp0 __t0, _Tp1 __t1, _Tp2 __t2, _Tp3 __t3, _Tp4 __t4, - _Tp5 __t5, _Tp6 __t6, _Tp7 __t7) - { - return typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, - _Tp5, _Tp6, _Tp7>:: - __type(__t0, __t1, __t2, __t3, __t4, __t5, __t6, __t7); - } - - template - typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, - _Tp7, _Tp8>::__type - make_tuple(_Tp0 __t0, _Tp1 __t1, _Tp2 __t2, _Tp3 __t3, _Tp4 __t4, - _Tp5 __t5, _Tp6 __t6, _Tp7 __t7, _Tp8 __t8) - { - return typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, - _Tp5, _Tp6, _Tp7, _Tp8>:: - __type(__t0, __t1, __t2, __t3, __t4, __t5, __t6, __t7, __t8); - } - - template - typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, - _Tp7, _Tp8, _Tp9>::__type - make_tuple(_Tp0 __t0, _Tp1 __t1, _Tp2 __t2, _Tp3 __t3, _Tp4 __t4, - _Tp5 __t5, _Tp6 __t6, _Tp7 __t7, _Tp8 __t8, _Tp9 __t9) - { - return typename __stripped_tuple_type<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, - _Tp5, _Tp6, _Tp7, _Tp8, _Tp9>:: - __type(__t0, __t1, __t2, __t3, __t4, __t5, __t6, __t7, __t8, __t9); - } - - // A class (and instance) which can be used in 'tie' when an element - // of a tuple is not required - struct swallow_assign - { - template - swallow_assign& - operator=(const T&) - { return *this; } - }; - - // TODO: Put this in some kind of shared file. - namespace - { - swallow_assign ignore; - }; - - - // Forms a tuple of references to a list of variables. - template< typename _Tp0> - tuple< _Tp0&> - tie( _Tp0& __t0) - { - return make_tuple( ref(__t0)); - }; - - template - tuple<_Tp0&, _Tp1&> - tie(_Tp0& __t0, _Tp1& __t1) - { - return make_tuple(ref(__t0), ref(__t1)); - }; - - template - tuple<_Tp0&, _Tp1&, _Tp2&> - tie(_Tp0& __t0, _Tp1& __t1, _Tp2& __t2) - { - return make_tuple(ref(__t0), ref(__t1), ref(__t2)); - }; - - template - tuple<_Tp0&, _Tp1&, _Tp2&, _Tp3&> - tie(_Tp0& __t0, _Tp1& __t1, _Tp2& __t2, _Tp3& __t3) - { - return make_tuple(ref(__t0), ref(__t1), ref(__t2), ref(__t3)); - }; - - template - tuple<_Tp0&, _Tp1&, _Tp2&, _Tp3&, _Tp4&> - tie(_Tp0& __t0, _Tp1& __t1, _Tp2& __t2, _Tp3& __t3, _Tp4& __t4) - { - return make_tuple(ref(__t0), ref(__t1), ref(__t2), ref(__t3), - ref(__t4)); - }; - - template - tuple<_Tp0&, _Tp1&, _Tp2&, _Tp3&, _Tp4&, _Tp5&> - tie(_Tp0& __t0, _Tp1& __t1, _Tp2& __t2, _Tp3& __t3, _Tp4& __t4, - _Tp5& __t5) - { - return make_tuple(ref(__t0), ref(__t1), ref(__t2), ref(__t3), ref(__t4), - ref(__t5)); - }; - - template - tuple<_Tp0&, _Tp1&, _Tp2&, _Tp3&, _Tp4&, _Tp5&, _Tp6&> - tie(_Tp0& __t0, _Tp1& __t1, _Tp2& __t2, _Tp3& __t3, _Tp4& __t4, _Tp5& __t5, - _Tp6& __t6) - { - return make_tuple(ref(__t0), ref(__t1), ref(__t2), ref(__t3), ref(__t4), - ref(__t5), ref(__t6)); - }; - - template - tuple<_Tp0&, _Tp1&, _Tp2&, _Tp3&, _Tp4&, _Tp5&, _Tp6&, _Tp7&> - tie(_Tp0& __t0, _Tp1& __t1, _Tp2& __t2, _Tp3& __t3, _Tp4& __t4, _Tp5& __t5, - _Tp6& __t6, _Tp7& __t7) - { - return make_tuple(ref(__t0), ref(__t1), ref(__t2), ref(__t3), ref(__t4), - ref(__t5), ref(__t6), ref(__t7)); - }; - - template - tuple<_Tp0&, _Tp1&, _Tp2&, _Tp3&, _Tp4&, _Tp5&, _Tp6&, _Tp7&, _Tp8&> - tie(_Tp0& __t0, _Tp1& __t1, _Tp2& __t2, _Tp3& __t3, _Tp4& __t4, _Tp5& __t5, - _Tp6& __t6, _Tp7& __t7, _Tp8& __t8) - { - return make_tuple(ref(__t0), ref(__t1), ref(__t2), ref(__t3), ref(__t4), - ref(__t5), ref(__t6), ref(__t7), ref(__t8)); - }; - - template - tuple<_Tp0&, _Tp1&, _Tp2&, _Tp3&, _Tp4&, _Tp5&, _Tp6&, _Tp7&, _Tp8&, - _Tp9&> - tie(_Tp0& __t0, _Tp1& __t1, _Tp2& __t2, _Tp3& __t3, _Tp4& __t4, _Tp5& __t5, - _Tp6& __t6, _Tp7& __t7, _Tp8& __t8, _Tp9& __t9) - { - return make_tuple(ref(__t0), ref(__t1), ref(__t2), ref(__t3), ref(__t4), - ref(__t5), ref(__t6), ref(__t7), ref(__t8), - ref(__t9)); - }; - + // An implementation specific class which is used in the tuple class + // when the tuple is not maximum possible size. + struct _NullClass { }; + + template + class tuple; + + /// Gives the type of the ith element of a given tuple type. + template + struct tuple_element; + + /// Finds the size of a given tuple type. + template + struct tuple_size; + + // Adds a const reference to a non-reference type. + template + struct __add_c_ref + { typedef const _Tp& type; }; + + template + struct __add_c_ref<_Tp&> + { typedef _Tp& type; }; + + // Adds a reference to a non-reference type. + template + struct __add_ref + { typedef _Tp& type; }; + + template + struct __add_ref<_Tp&> + { typedef _Tp& type; }; + + // Class used in the implementation of get + template + struct __get_helper; + + // Returns a const reference to the ith element of a tuple. + // Any const or non-const ref elements are returned with their original type. + template + typename __add_ref >::type>::type + get(tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, + _Tp9>& __t) + { + return __get_helper<__i, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, + _Tp7, _Tp8, _Tp9> >::get_value(__t); + } + + template + typename __add_c_ref >::type>::type + get(const tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, _Tp7, _Tp8, + _Tp9>& __t) + { + return __get_helper<__i, tuple<_Tp0, _Tp1, _Tp2, _Tp3, _Tp4, _Tp5, _Tp6, + _Tp7, _Tp8, _Tp9> >::get_value(__t); + } + + // This class helps construct the various comparison operations on tuples + template + struct __tuple_compare; + + template + struct __tuple_compare<0, __i, __j, _Tp, _Up> + { + static bool __eq(const _Tp& __t, const _Up& __u) + { + return get<__i>(__t) == get<__i>(__u) && + __tuple_compare<0, __i+1, __j, _Tp, _Up>::__eq(__t, __u); + } + static bool __less(const _Tp& __t, const _Up& __u) + { + return (get<__i>(__t) < get<__i>(__u)) || !(get<__i>(__u) < get<__i>(__t)) && + __tuple_compare<0, __i+1, __j, _Tp, _Up>::__less(__t, __u); + } + }; + + template + struct __tuple_compare<0, __i, __i, _Tp, _Up> + { + static bool __eq(const _Tp&, const _Up&) + { return true; } + static bool __less(const _Tp&, const _Up&) + { return false; } + }; + + template + bool + operator==(const tuple<_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10>& __t, + const tuple<_U1, _U2, _U3, _U4, _U5, _U6, _U7, _U8, _U9, _U10>& __u) + { + typedef tuple<_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10> _Tp; + typedef tuple<_U1, _U2, _U3, _U4, _U5, _U6, _U7, _U8,_U9, _U10> _Up; + return __tuple_compare::value - tuple_size<_Tp>::value, 0, + tuple_size<_Tp>::value, _Tp, _Up>::__eq(__t, __u); + } + + template + bool + operator<(const tuple<_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10>& __t, + const tuple<_U1, _U2, _U3, _U4, _U5, _U6, _U7, _U8, _U9, _U10>& __u) + { + typedef tuple<_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10> _Tp; + typedef tuple<_U1, _U2, _U3, _U4, _U5, _U6, _U7, _U8,_U9, _U10> _Up; + return __tuple_compare::value - tuple_size<_Tp>::value, 0, + tuple_size<_Tp>::value, _Tp, _Up>::__less(__t, __u); + } + + template + bool + operator!=(const tuple<_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10>& __t, + const tuple<_U1, _U2, _U3, _U4, _U5, _U6, _U7, _U8, _U9, _U10>& __u) + { return !(__t == __u); } + + template + bool + operator>(const tuple<_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10>& __t, + const tuple<_U1, _U2, _U3, _U4, _U5, _U6, _U7, _U8, _U9, _U10>& __u) + { return __u < __t; } + + template + bool + operator<=(const tuple<_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10>& __t, + const tuple<_U1, _U2, _U3, _U4, _U5, _U6, _U7, _U8, _U9, _U10>& __u) + { return !(__u < __t); } + + template + bool + operator>=(const tuple<_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10>& __t, + const tuple<_U1, _U2, _U3, _U4, _U5, _U6, _U7, _U8, _U9, _U10>& __u) + { return !(__t < __u); } + + // Helper which adds a reference to a type when given a reference_wrapper + template + struct __strip_reference_wrapper + { + typedef _Tp __type; + }; + + template + struct __strip_reference_wrapper > + { + typedef _Tp& __type; + }; + + template + struct __strip_reference_wrapper > + { + typedef _Tp& __type; + }; + + template + struct __stripped_tuple_type + { + typedef tuple::__type, + typename __strip_reference_wrapper<_Tp1>::__type, + typename __strip_reference_wrapper<_Tp2>::__type, + typename __strip_reference_wrapper<_Tp3>::__type, + typename __strip_reference_wrapper<_Tp4>::__type, + typename __strip_reference_wrapper<_Tp5>::__type, + typename __strip_reference_wrapper<_Tp6>::__type, + typename __strip_reference_wrapper<_Tp7>::__type, + typename __strip_reference_wrapper<_Tp8>::__type, + typename __strip_reference_wrapper<_Tp9>::__type> __type; + }; + + // A class (and instance) which can be used in 'tie' when an element + // of a tuple is not required + struct swallow_assign + { + template + swallow_assign& + operator=(const T&) + { return *this; } + }; + + // TODO: Put this in some kind of shared file. + namespace + { + swallow_assign ignore; + }; + +#define _GLIBCXX_CAT(x,y) _GLIBCXX_CAT2(x,y) +#define _GLIBCXX_CAT2(x,y) x##y +#define _SHORT_REPEAT +#define _GLIBCXX_REPEAT_HEADER +#include +#undef _GLIBCXX_REPEAT_HEADER +#undef _SHORT_REPEAT } } +#include + #endif - diff --git a/libstdc++-v3/include/tr1/tuple_iterate.h b/libstdc++-v3/include/tr1/tuple_iterate.h new file mode 100644 index 00000000000..df572764b4d --- /dev/null +++ b/libstdc++-v3/include/tr1/tuple_iterate.h @@ -0,0 +1,158 @@ +// class template tuple -*- C++ -*- + +// Copyright (C) 2004, 2005 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// 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 + * This is an internal header file, included by other library headers. + * You should not attempt to use it directly. + */ + +// Chris Jefferson + +/// @brief class tuple_size +template<_GLIBCXX_TEMPLATE_PARAMS> + struct tuple_size > + { static const int value = _GLIBCXX_NUM_ARGS; }; + +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 + tuple(const std::pair<_U1, _U2>& __u): + _M_arg1(__u.first), _M_arg2(__u.second) + { } + +#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& __in) + { } + +#endif + + tuple& + operator=(const tuple& __in) + { + _GLIBCXX_TUPLE_ASSIGN + return *this; + } + + template + friend class __get_helper; + + template + friend class tuple; + }; + +#ifndef _GLIBCXX_LAST_INCLUDE + +template + struct __get_helper<_GLIBCXX_NUM_ARGS, _Tp> + { + static typename __add_ref::type>::type + get_value(_Tp& __in) + { return __in._GLIBCXX_CAT(_M_arg,_GLIBCXX_NUM_ARGS_PLUS_1); } + + static typename __add_c_ref::type>::type + get_value(const _Tp& __in) + { return __in._GLIBCXX_CAT(_M_arg,_GLIBCXX_NUM_ARGS_PLUS_1); } + }; + +/// @brief class tuple_element +template + struct tuple_element<_GLIBCXX_NUM_ARGS, tuple<_T1, _T2, _T3, _T4, + _T5, _T6, _T7, _T8, _T9, + _T10> > + { typedef _GLIBCXX_CAT(_T,_GLIBCXX_NUM_ARGS_PLUS_1) type; }; + +#endif +#if _GLIBCXX_NUM_ARGS == 0 + +tuple<> +inline make_tuple() +{ return tuple<>(); } + +inline tuple<> +tie() +{ return tuple<>(); } +#else + +template<_GLIBCXX_TEMPLATE_PARAMS> + typename __stripped_tuple_type<_GLIBCXX_TEMPLATE_ARGS>::__type + make_tuple(_GLIBCXX_PARAMS) + { + return typename __stripped_tuple_type<_GLIBCXX_TEMPLATE_ARGS>:: + __type(_GLIBCXX_ARGS); + } + +template<_GLIBCXX_TEMPLATE_PARAMS> + tuple<_GLIBCXX_REF_TEMPLATE_ARGS> + tie(_GLIBCXX_REF_PARAMS) + { return make_tuple(_GLIBCXX_REF_WRAP_PARAMS); } +#endif + diff --git a/libstdc++-v3/scripts/gen_bind_includers.pl b/libstdc++-v3/scripts/gen_bind_includers.pl new file mode 100644 index 00000000000..52b11d28332 --- /dev/null +++ b/libstdc++-v3/scripts/gen_bind_includers.pl @@ -0,0 +1,30 @@ +#!/usr/bin/perl -w +use English; + +$max = shift @ARGV; + +$template_params = "typename _U1"; +$template_args = "_U1"; +$params = "_U1& __u1"; +$args = "__u1"; + +for ($num_args = 2; $num_args <= $max; ++$num_args) { + $template_params .= ", typename _U$num_args"; + $template_args .= ", _U$num_args"; + $params .= ", _U$num_args& __u$num_args"; + $args .= ", __u$num_args"; + print "#define _GLIBCXX_BIND_NUM_ARGS $num_args\n"; + print "#define _GLIBCXX_BIND_COMMA ,\n"; + print "#define _GLIBCXX_BIND_TEMPLATE_PARAMS $template_params\n"; + print "#define _GLIBCXX_BIND_TEMPLATE_ARGS $template_args\n"; + print "#define _GLIBCXX_BIND_PARAMS $params\n"; + print "#define _GLIBCXX_BIND_ARGS $args\n"; + print "#include _GLIBCXX_BIND_REPEAT_HEADER\n"; + print "#undef _GLIBCXX_BIND_ARGS\n"; + print "#undef _GLIBCXX_BIND_PARAMS\n"; + print "#undef _GLIBCXX_BIND_TEMPLATE_ARGS\n"; + print "#undef _GLIBCXX_BIND_TEMPLATE_PARAMS\n"; + print "#undef _GLIBCXX_BIND_COMMA\n"; + print "#undef _GLIBCXX_BIND_NUM_ARGS\n"; + print "\n"; +} diff --git a/libstdc++-v3/scripts/gen_includers.pl b/libstdc++-v3/scripts/gen_includers.pl new file mode 100644 index 00000000000..62ab0f2739d --- /dev/null +++ b/libstdc++-v3/scripts/gen_includers.pl @@ -0,0 +1,107 @@ +#!/usr/bin/perl -w +use English; + +$max = shift @ARGV; + +$template_params = "typename _T1"; +$template_args = "_T1"; +$params = "_T1 __a1"; +$ref_params = "_T1& __a1"; +$args = "__a1"; +$bind_members = "_T1 _M_arg1;"; +$bind_members_init = "_M_arg1(__a1)"; +$mu_get_tuple_args = "::std::tr1::get<0>(__tuple)"; +$bind_v_template_args = "typename result_of<_Mu<_T1> _CV(_T1, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type"; +$bind_v_args = "_Mu<_T1>()(_M_arg1, ::std::tr1::tie(_GLIBCXX_BIND_ARGS))"; +$tuple_add_cref = "typename __add_c_ref<_T1>::type __a1"; +$tuple_copy_init = "_M_arg1(__in._M_arg1)"; +$tuple_assign = "_M_arg1 = __in._M_arg1;"; +$template_params_u = "typename _U1"; +$template_args_u = "_U1"; +$ref_wrap_params = "ref(__a1)"; +$ref_template_args = "_T1&"; +for ($num_args = 2; $num_args <= $max; ++$num_args) { + $prev_args = $num_args - 1; + $next_args = $num_args + 1; + $template_params_shifted = $template_params; + $template_args_shifted = $template_args; + $params_shifted = $params; + $args_shifted = $args; + $template_params .= ", typename _T$num_args"; + $template_args .= ", _T$num_args"; + $params .= ", _T$num_args __a$num_args"; + $ref_params .=", _T$num_args& __a$num_args"; + $args .= ", __a$num_args"; + $bind_members .= " _T$num_args _M_arg$num_args;"; + $bind_members_init .= ", _M_arg$num_args(__a$num_args)"; + $mu_get_tuple_args .= ", ::std::tr1::get<$prev_args>(__tuple)"; + $bind_v_template_args .= ", typename result_of<_Mu<_T$num_args> _CV(_T$num_args, tuple<_GLIBCXX_BIND_TEMPLATE_ARGS>)>::type"; + $bind_v_args .= ", _Mu<_T$num_args>()(_M_arg$num_args, ::std::tr1::tie(_GLIBCXX_BIND_ARGS))"; + $tuple_add_cref .= ", typename __add_c_ref<_T$num_args>::type __a$num_args"; + $tuple_copy_init .= ", _M_arg$num_args(__in._M_arg$num_args)"; + $tuple_assign .= " _M_arg$num_args = __in._M_arg$num_args;"; + $template_params_u .= ", typename _U$num_args"; + $template_args_u .= ", _U$num_args"; + $ref_wrap_params .= ", ref(__a$num_args)"; + $ref_template_args .= ", _T$num_args&"; + + print "#define _GLIBCXX_NUM_ARGS $num_args\n"; + print "#define _GLIBCXX_COMMA ,\n"; + print "#define _GLIBCXX_TEMPLATE_PARAMS $template_params\n"; + print "#define _GLIBCXX_TEMPLATE_ARGS $template_args\n"; + print "#define _GLIBCXX_PARAMS $params\n"; + print "#define _GLIBCXX_REF_PARAMS $ref_params\n"; + print "#define _GLIBCXX_ARGS $args\n"; + print "#define _GLIBCXX_COMMA_SHIFTED ,\n"; + print "#define _GLIBCXX_TEMPLATE_PARAMS_SHIFTED $template_params_shifted\n"; + print "#define _GLIBCXX_TEMPLATE_ARGS_SHIFTED $template_args_shifted\n"; + print "#define _GLIBCXX_PARAMS_SHIFTED $params_shifted\n"; + print "#define _GLIBCXX_ARGS_SHIFTED $args_shifted\n"; + print "#define _GLIBCXX_BIND_MEMBERS $bind_members\n"; + print "#define _GLIBCXX_BIND_MEMBERS_INIT $bind_members_init\n"; + print "#define _GLIBCXX_MU_GET_TUPLE_ARGS $mu_get_tuple_args\n"; + print "#define _GLIBCXX_BIND_V_TEMPLATE_ARGS(_CV) $bind_v_template_args\n"; + print "#define _GLIBCXX_BIND_V_ARGS $bind_v_args\n"; + print "#define _GLIBCXX_TUPLE_ADD_CREF $tuple_add_cref\n"; + print "#define _GLIBCXX_TUPLE_COPY_INIT $tuple_copy_init\n"; + print "#define _GLIBCXX_TUPLE_ASSIGN $tuple_assign\n"; + print "#define _GLIBCXX_TEMPLATE_PARAMS_U $template_params_u\n"; + print "#define _GLIBCXX_TEMPLATE_ARGS_U $template_args_u\n"; + print "#define _GLIBCXX_REF_WRAP_PARAMS $ref_wrap_params\n"; + print "#define _GLIBCXX_REF_TEMPLATE_ARGS $ref_template_args\n"; + print "#define _GLIBCXX_NUM_ARGS_PLUS_1 $next_args\n"; + if ($num_args == $max) { + print "#define _GLIBCXX_LAST_INCLUDE\n" + } + print "#include _GLIBCXX_REPEAT_HEADER\n"; + if ($num_args == $max) { + print "#undef _GLIBCXX_LAST_INCLUDE\n" + } + + print "#undef _GLIBCXX_NUM_ARGS_PLUS_1\n"; + print "#undef _GLIBCXX_REF_TEMPLATE_ARGS\n"; + print "#undef _GLIBCXX_REF_WRAP_PARAMS\n"; + print "#undef _GLIBCXX_TEMPLATE_ARGS_U\n"; + print "#undef _GLIBCXX_TEMPLATE_PARAMS_U\n"; + print "#undef _GLIBCXX_TUPLE_ASSIGN\n"; + print "#undef _GLIBCXX_TUPLE_COPY_INIT\n"; + print "#undef _GLIBCXX_TUPLE_ADD_CREF\n"; + print "#undef _GLIBCXX_BIND_V_ARGS\n"; + print "#undef _GLIBCXX_BIND_V_TEMPLATE_ARGS\n"; + print "#undef _GLIBCXX_MU_GET_TUPLE_ARGS\n"; + print "#undef _GLIBCXX_BIND_MEMBERS_INIT\n"; + print "#undef _GLIBCXX_BIND_MEMBERS\n"; + print "#undef _GLIBCXX_ARGS_SHIFTED\n"; + print "#undef _GLIBCXX_PARAMS_SHIFTED\n"; + print "#undef _GLIBCXX_TEMPLATE_ARGS_SHIFTED\n"; + print "#undef _GLIBCXX_TEMPLATE_PARAMS_SHIFTED\n"; + print "#undef _GLIBCXX_COMMA_SHIFTED\n"; + print "#undef _GLIBCXX_ARGS\n"; + print "#undef _GLIBCXX_REF_PARAMS\n"; + print "#undef _GLIBCXX_PARAMS\n"; + print "#undef _GLIBCXX_TEMPLATE_ARGS\n"; + print "#undef _GLIBCXX_TEMPLATE_PARAMS\n"; + print "#undef _GLIBCXX_COMMA\n"; + print "#undef _GLIBCXX_NUM_ARGS\n"; + print "\n"; +} diff --git a/libstdc++-v3/testsuite/testsuite_tr1.h b/libstdc++-v3/testsuite/testsuite_tr1.h index fa514ca7e16..ea6affb37c1 100644 --- a/libstdc++-v3/testsuite/testsuite_tr1.h +++ b/libstdc++-v3/testsuite/testsuite_tr1.h @@ -121,18 +121,18 @@ namespace __gnu_test { operator int() const; }; class AbstractClass - { + { virtual void rotate(int) = 0; virtual ~AbstractClass(); }; class PolymorphicClass - { + { virtual void rotate(int); virtual ~PolymorphicClass(); }; - class DerivedPolymorphic : public PolymorphicClass { }; + class DerivedPolymorphic : public PolymorphicClass { }; union UnionType { }; @@ -151,14 +151,14 @@ namespace __gnu_test { ++live_objects; } - + ~do_truncate_float_t() { --live_objects; } int operator()(float x) { return (int)x; } - + static int live_objects; }; @@ -182,21 +182,21 @@ namespace __gnu_test } long operator()(double x) { return (long)x; } - + static int live_objects; }; - + int do_truncate_double_t::live_objects = 0; - + struct X { int bar; - + int foo() { return 1; } int foo_c() const { return 2; } int foo_v() volatile { return 3; } int foo_cv() const volatile { return 4; } }; -}; // namespace __gnu_test +} // namespace __gnu_test #endif // _GLIBCXX_TESTSUITE_TR1_H diff --git a/libstdc++-v3/testsuite/tr1/3_function_objects/bind/all_bound.cc b/libstdc++-v3/testsuite/tr1/3_function_objects/bind/all_bound.cc new file mode 100644 index 00000000000..17ed6857a7a --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/3_function_objects/bind/all_bound.cc @@ -0,0 +1,45 @@ +// 2005-03-20 Douglas Gregor +// +// Copyright (C) 2005 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 3.6 function object binders +#include +#include +#include + +using namespace __gnu_test; + +bool test __attribute__((unused)) = true; + +// Operations on empty function<> objects +void test01() +{ + using std::tr1::bind; + + VERIFY( bind(std::plus(), 3, 5)() == 8 ); + VERIFY( bind(std::minus(), 3, 5)() == -2 ); + VERIFY( bind(std::plus(), 3, 5)() == 8 ); + VERIFY( bind(std::minus(), 3, 5)() == -2 ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/tr1/3_function_objects/bind/nested.cc b/libstdc++-v3/testsuite/tr1/3_function_objects/bind/nested.cc new file mode 100644 index 00000000000..8e6bf7c0e5d --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/3_function_objects/bind/nested.cc @@ -0,0 +1,46 @@ +// 2005-03-20 Douglas Gregor +// +// Copyright (C) 2005 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 3.6 function object binders +#include +#include +#include + +using namespace __gnu_test; + +bool test __attribute__((unused)) = true; + +// Operations on empty function<> objects +void test01() +{ + using std::tr1::bind; + using namespace std::tr1::placeholders; + + int five = 5; + int seven = 7; + VERIFY( bind(std::multiplies(), _1, bind(std::minus(), 6, _2))(five, seven) == -5 ); + VERIFY( bind(std::multiplies(), _1, bind(std::minus(), 6, _2))(seven, five) == 7 ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/tr1/3_function_objects/bind/placeholders.cc b/libstdc++-v3/testsuite/tr1/3_function_objects/bind/placeholders.cc new file mode 100644 index 00000000000..1dc7450eb1f --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/3_function_objects/bind/placeholders.cc @@ -0,0 +1,46 @@ +// 2005-03-20 Douglas Gregor +// +// Copyright (C) 2005 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 3.6 function object binders +#include +#include +#include + +using namespace __gnu_test; + +bool test __attribute__((unused)) = true; + +// Operations on empty function<> objects +void test01() +{ + using std::tr1::bind; + using namespace std::tr1::placeholders; + + int five = 5; + int seven = 7; + VERIFY( bind(std::minus(), _1, _2)(five, seven) == -2 ); + VERIFY( bind(std::minus(), _2, _1)(five, seven) == 2 ); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/tr1/3_function_objects/bind/ref.cc b/libstdc++-v3/testsuite/tr1/3_function_objects/bind/ref.cc new file mode 100644 index 00000000000..de3a1a3dbfa --- /dev/null +++ b/libstdc++-v3/testsuite/tr1/3_function_objects/bind/ref.cc @@ -0,0 +1,60 @@ +// 2005-03-20 Douglas Gregor +// +// Copyright (C) 2005 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 3.6 function object binders +#include +#include +#include + +using namespace __gnu_test; + +bool test __attribute__((unused)) = true; + +struct X +{ + X() : bar(17) {} + + int foo(int x, int y) { return bar + x + y; } + + int bar; + +private: + X(const X&); + X& operator=(const X&); +}; + +// Operations on empty function<> objects +void test01() +{ + using std::tr1::bind; + using std::tr1::ref; + ::X x; + + VERIFY( bind(&::X::foo, ref(x), 1, 2)() == 20 ); + VERIFY( bind(&::X::foo, ref(x), 1, 2)() == 20 ); + VERIFY( bind(&::X::bar, ref(x))() == 17 ); + VERIFY( bind(&::X::bar, ref(x))() == 17 ); +} + +int main() +{ + test01(); + return 0; +}