OSDN Git Service

2006-10-16 Douglas Gregor <doug.gregor@gmail.com>
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 Oct 2006 19:08:22 +0000 (19:08 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 Oct 2006 19:08:22 +0000 (19:08 +0000)
* include/Makefile.am (tr1_headers): Add new tuple_defs.h.
* include/Makefile.in (tr1_headers): Regenerate.
* include/tr1/tuple (tuple): Move declaration to tuple_defs.h.
(get): Ditto.
(operator==): Ditto.
(operator<): Ditto.
(operator!=): Ditto.
(operator>): Ditto.
(operator<=): Ditto.
(operator>=): Ditto.
(__stripped_tuple_type): Ditto.
Include tuple.defs.h
* include/tr1/tuple_iterate.h (tuple): Use
_GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS_UNNAMED macro instead of 10
"typename"s.
(tuple_element): Use _GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS and
_GLIBCXX_TYPLE_ALL_TEMPLATE_ARGS instead of 10
parameters/arguments.
* include/tr1/tuple_defs.h: New header, contains declarations and
definitions for the tuple template with all arguments.
* include/tr1/repeat.h (_GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS): New.
(_GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS_UNNAMED): New.
(_GLIBCXX_TUPLE_ALL_TEMPLATE_ARGS): New.
(_GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS): New.
(_GLIBCXX_TEMPLATE_ARGS_STRIPPED): New.
* scripts/gen_includers.pl: Update.
* scripts/gen_includers2.pl: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117790 138bc75d-0d04-0410-961f-82ee72b054a4

15 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/Makefile.in
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/tr1/repeat.h
libstdc++-v3/include/tr1/tuple
libstdc++-v3/include/tr1/tuple_defs.h [new file with mode: 0644]
libstdc++-v3/include/tr1/tuple_iterate.h
libstdc++-v3/libmath/Makefile.in
libstdc++-v3/libsupc++/Makefile.in
libstdc++-v3/po/Makefile.in
libstdc++-v3/scripts/gen_includers.pl
libstdc++-v3/scripts/gen_includers2.pl [new file with mode: 0644]
libstdc++-v3/src/Makefile.in
libstdc++-v3/testsuite/Makefile.in

index 29b5e3c..0bac304 100644 (file)
@@ -1,3 +1,33 @@
+2006-10-16  Douglas Gregor  <doug.gregor@gmail.com>
+
+       * include/Makefile.am (tr1_headers): Add new tuple_defs.h.
+       * include/Makefile.in (tr1_headers): Regenerate.
+       * include/tr1/tuple (tuple): Move declaration to tuple_defs.h.
+       (get): Ditto.
+       (operator==): Ditto.
+       (operator<): Ditto.
+       (operator!=): Ditto.
+       (operator>): Ditto.
+       (operator<=): Ditto.
+       (operator>=): Ditto.
+       (__stripped_tuple_type): Ditto.
+       Include tuple.defs.h
+       * include/tr1/tuple_iterate.h (tuple): Use
+       _GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS_UNNAMED macro instead of 10
+       "typename"s.
+       (tuple_element): Use _GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS and
+       _GLIBCXX_TYPLE_ALL_TEMPLATE_ARGS instead of 10
+       parameters/arguments.
+       * include/tr1/tuple_defs.h: New header, contains declarations and
+       definitions for the tuple template with all arguments.
+       * include/tr1/repeat.h (_GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS): New.
+       (_GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS_UNNAMED): New.
+       (_GLIBCXX_TUPLE_ALL_TEMPLATE_ARGS): New.
+       (_GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS): New.
+       (_GLIBCXX_TEMPLATE_ARGS_STRIPPED): New.
+       * scripts/gen_includers.pl: Update.
+       * scripts/gen_includers2.pl: New.       
+
 2006-10-16  Benjamin Kosnik  <bkoz@redhat.com>
 
        PR libstdc++/29095 continued
index 6dc1ec0..9339af4 100644 (file)
@@ -47,6 +47,7 @@ subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
+       $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
        $(top_srcdir)/../libtool.m4 $(top_srcdir)/crossconfig.m4 \
index 04cd930..9fbc81f 100644 (file)
@@ -599,6 +599,7 @@ tr1_headers = \
        ${tr1_srcdir}/stdlib.h \
        ${tr1_srcdir}/tgmath.h \
        ${tr1_srcdir}/tuple \
+       ${tr1_srcdir}/tuple_defs.h \
        ${tr1_srcdir}/tuple_iterate.h \
        ${tr1_srcdir}/type_traits \
        ${tr1_srcdir}/type_traits_fwd.h \
index 87eb188..9f9c299 100644 (file)
@@ -42,6 +42,7 @@ subdir = include
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
+       $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
        $(top_srcdir)/../libtool.m4 $(top_srcdir)/crossconfig.m4 \
@@ -819,6 +820,7 @@ tr1_headers = \
        ${tr1_srcdir}/stdlib.h \
        ${tr1_srcdir}/tgmath.h \
        ${tr1_srcdir}/tuple \
+       ${tr1_srcdir}/tuple_defs.h \
        ${tr1_srcdir}/tuple_iterate.h \
        ${tr1_srcdir}/type_traits \
        ${tr1_srcdir}/type_traits_fwd.h \
index eecf619..ba24f29 100644 (file)
 #  error Internal error: _GLIBCXX_REPEAT_HEADER must be set
 #endif /* _GLIBCXX_REPEAT_HEADER */
 
+#ifndef _GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS
+#  define _GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10
+#  define _GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS_UNNAMED typename, typename, typename, typename, typename, typename, typename, typename, typename, typename
+#  define _GLIBCXX_TUPLE_ALL_TEMPLATE_ARGS _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10
+#endif
+
 #define _GLIBCXX_NUM_ARGS 0
 #define _GLIBCXX_COMMA
 #define _GLIBCXX_TEMPLATE_PARAMS
@@ -57,6 +63,8 @@
 #define _GLIBCXX_TUPLE_ADD_CREF
 #define _GLIBCXX_TUPLE_COPY_INIT
 #define _GLIBCXX_TUPLE_ASSIGN
+#define _GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS
+#define _GLIBCXX_TEMPLATE_ARGS_STRIPPED
 #define _GLIBCXX_TEMPLATE_PARAMS_U
 #define _GLIBCXX_TEMPLATE_ARGS_U
 #define _GLIBCXX_REF_WRAP_PARAMS
@@ -70,6 +78,8 @@
 #undef _GLIBCXX_REF_WRAP_PARAMS
 #undef _GLIBCXX_TEMPLATE_ARGS_U
 #undef _GLIBCXX_TEMPLATE_PARAMS_U
+#undef _GLIBCXX_TEMPLATE_ARGS_STRIPPED
+#undef _GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS
 #undef _GLIBCXX_TUPLE_ASSIGN
 #undef _GLIBCXX_TUPLE_COPY_INIT
 #undef _GLIBCXX_TUPLE_ADD_CREF
 #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_NULL_CLASS typename _T1 = _NullClass
+#define _GLIBCXX_TEMPLATE_ARGS_STRIPPED typename __strip_reference_wrapper<_T1>::__type
 #define _GLIBCXX_TEMPLATE_PARAMS_U typename _U1
 #define _GLIBCXX_TEMPLATE_ARGS_U _U1
 #define _GLIBCXX_REF_WRAP_PARAMS ref(__a1)
 #undef _GLIBCXX_REF_WRAP_PARAMS
 #undef _GLIBCXX_TEMPLATE_ARGS_U
 #undef _GLIBCXX_TEMPLATE_PARAMS_U
+#undef _GLIBCXX_TEMPLATE_ARGS_STRIPPED
+#undef _GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS
 #undef _GLIBCXX_TUPLE_ASSIGN
 #undef _GLIBCXX_TUPLE_COPY_INIT
 #undef _GLIBCXX_TUPLE_ADD_CREF
 #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_NULL_CLASS typename _T1 = _NullClass, typename _T2 = _NullClass
+#define _GLIBCXX_TEMPLATE_ARGS_STRIPPED typename __strip_reference_wrapper<_T1>::__type, typename __strip_reference_wrapper<_T2>::__type
 #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)
 #undef _GLIBCXX_REF_WRAP_PARAMS
 #undef _GLIBCXX_TEMPLATE_ARGS_U
 #undef _GLIBCXX_TEMPLATE_PARAMS_U
+#undef _GLIBCXX_TEMPLATE_ARGS_STRIPPED
+#undef _GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS
 #undef _GLIBCXX_TUPLE_ASSIGN
 #undef _GLIBCXX_TUPLE_COPY_INIT
 #undef _GLIBCXX_TUPLE_ADD_CREF
 #undef _GLIBCXX_TEMPLATE_PARAMS
 #undef _GLIBCXX_COMMA
 #undef _GLIBCXX_NUM_ARGS
-
 #define _GLIBCXX_NUM_ARGS 3
 #define _GLIBCXX_COMMA ,
 #define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3
 #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_NULL_CLASS typename _T1 = _NullClass, typename _T2 = _NullClass, typename _T3 = _NullClass
+#define _GLIBCXX_TEMPLATE_ARGS_STRIPPED typename __strip_reference_wrapper<_T1>::__type, typename __strip_reference_wrapper<_T2>::__type, typename __strip_reference_wrapper<_T3>::__type
 #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)
 #undef _GLIBCXX_REF_WRAP_PARAMS
 #undef _GLIBCXX_TEMPLATE_ARGS_U
 #undef _GLIBCXX_TEMPLATE_PARAMS_U
+#undef _GLIBCXX_TEMPLATE_ARGS_STRIPPED
+#undef _GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS
 #undef _GLIBCXX_TUPLE_ASSIGN
 #undef _GLIBCXX_TUPLE_COPY_INIT
 #undef _GLIBCXX_TUPLE_ADD_CREF
 #undef _GLIBCXX_TEMPLATE_PARAMS
 #undef _GLIBCXX_COMMA
 #undef _GLIBCXX_NUM_ARGS
-
 #define _GLIBCXX_NUM_ARGS 4
 #define _GLIBCXX_COMMA ,
 #define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4
 #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_NULL_CLASS typename _T1 = _NullClass, typename _T2 = _NullClass, typename _T3 = _NullClass, typename _T4 = _NullClass
+#define _GLIBCXX_TEMPLATE_ARGS_STRIPPED typename __strip_reference_wrapper<_T1>::__type, typename __strip_reference_wrapper<_T2>::__type, typename __strip_reference_wrapper<_T3>::__type, typename __strip_reference_wrapper<_T4>::__type
 #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)
 #undef _GLIBCXX_REF_WRAP_PARAMS
 #undef _GLIBCXX_TEMPLATE_ARGS_U
 #undef _GLIBCXX_TEMPLATE_PARAMS_U
+#undef _GLIBCXX_TEMPLATE_ARGS_STRIPPED
+#undef _GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS
 #undef _GLIBCXX_TUPLE_ASSIGN
 #undef _GLIBCXX_TUPLE_COPY_INIT
 #undef _GLIBCXX_TUPLE_ADD_CREF
 #undef _GLIBCXX_TEMPLATE_PARAMS
 #undef _GLIBCXX_COMMA
 #undef _GLIBCXX_NUM_ARGS
-
 #define _GLIBCXX_NUM_ARGS 5
 #define _GLIBCXX_COMMA ,
 #define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4, typename _T5
 #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_NULL_CLASS typename _T1 = _NullClass, typename _T2 = _NullClass, typename _T3 = _NullClass, typename _T4 = _NullClass, typename _T5 = _NullClass
+#define _GLIBCXX_TEMPLATE_ARGS_STRIPPED typename __strip_reference_wrapper<_T1>::__type, typename __strip_reference_wrapper<_T2>::__type, typename __strip_reference_wrapper<_T3>::__type, typename __strip_reference_wrapper<_T4>::__type, typename __strip_reference_wrapper<_T5>::__type
 #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)
 #undef _GLIBCXX_REF_WRAP_PARAMS
 #undef _GLIBCXX_TEMPLATE_ARGS_U
 #undef _GLIBCXX_TEMPLATE_PARAMS_U
+#undef _GLIBCXX_TEMPLATE_ARGS_STRIPPED
+#undef _GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS
 #undef _GLIBCXX_TUPLE_ASSIGN
 #undef _GLIBCXX_TUPLE_COPY_INIT
 #undef _GLIBCXX_TUPLE_ADD_CREF
 #undef _GLIBCXX_TEMPLATE_PARAMS
 #undef _GLIBCXX_COMMA
 #undef _GLIBCXX_NUM_ARGS
-
 #define _GLIBCXX_NUM_ARGS 6
 #define _GLIBCXX_COMMA ,
 #define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6
 #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_NULL_CLASS typename _T1 = _NullClass, typename _T2 = _NullClass, typename _T3 = _NullClass, typename _T4 = _NullClass, typename _T5 = _NullClass, typename _T6 = _NullClass
+#define _GLIBCXX_TEMPLATE_ARGS_STRIPPED typename __strip_reference_wrapper<_T1>::__type, typename __strip_reference_wrapper<_T2>::__type, typename __strip_reference_wrapper<_T3>::__type, typename __strip_reference_wrapper<_T4>::__type, typename __strip_reference_wrapper<_T5>::__type, typename __strip_reference_wrapper<_T6>::__type
 #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)
 #undef _GLIBCXX_REF_WRAP_PARAMS
 #undef _GLIBCXX_TEMPLATE_ARGS_U
 #undef _GLIBCXX_TEMPLATE_PARAMS_U
+#undef _GLIBCXX_TEMPLATE_ARGS_STRIPPED
+#undef _GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS
 #undef _GLIBCXX_TUPLE_ASSIGN
 #undef _GLIBCXX_TUPLE_COPY_INIT
 #undef _GLIBCXX_TUPLE_ADD_CREF
 #undef _GLIBCXX_TEMPLATE_PARAMS
 #undef _GLIBCXX_COMMA
 #undef _GLIBCXX_NUM_ARGS
-
 #define _GLIBCXX_NUM_ARGS 7
 #define _GLIBCXX_COMMA ,
 #define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7
 #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_NULL_CLASS typename _T1 = _NullClass, typename _T2 = _NullClass, typename _T3 = _NullClass, typename _T4 = _NullClass, typename _T5 = _NullClass, typename _T6 = _NullClass, typename _T7 = _NullClass
+#define _GLIBCXX_TEMPLATE_ARGS_STRIPPED typename __strip_reference_wrapper<_T1>::__type, typename __strip_reference_wrapper<_T2>::__type, typename __strip_reference_wrapper<_T3>::__type, typename __strip_reference_wrapper<_T4>::__type, typename __strip_reference_wrapper<_T5>::__type, typename __strip_reference_wrapper<_T6>::__type, typename __strip_reference_wrapper<_T7>::__type
 #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)
 #undef _GLIBCXX_REF_WRAP_PARAMS
 #undef _GLIBCXX_TEMPLATE_ARGS_U
 #undef _GLIBCXX_TEMPLATE_PARAMS_U
+#undef _GLIBCXX_TEMPLATE_ARGS_STRIPPED
+#undef _GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS
 #undef _GLIBCXX_TUPLE_ASSIGN
 #undef _GLIBCXX_TUPLE_COPY_INIT
 #undef _GLIBCXX_TUPLE_ADD_CREF
 #undef _GLIBCXX_TEMPLATE_PARAMS
 #undef _GLIBCXX_COMMA
 #undef _GLIBCXX_NUM_ARGS
-
 #define _GLIBCXX_NUM_ARGS 8
 #define _GLIBCXX_COMMA ,
 #define _GLIBCXX_TEMPLATE_PARAMS typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8
 #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_NULL_CLASS typename _T1 = _NullClass, typename _T2 = _NullClass, typename _T3 = _NullClass, typename _T4 = _NullClass, typename _T5 = _NullClass, typename _T6 = _NullClass, typename _T7 = _NullClass, typename _T8 = _NullClass
+#define _GLIBCXX_TEMPLATE_ARGS_STRIPPED typename __strip_reference_wrapper<_T1>::__type, typename __strip_reference_wrapper<_T2>::__type, typename __strip_reference_wrapper<_T3>::__type, typename __strip_reference_wrapper<_T4>::__type, typename __strip_reference_wrapper<_T5>::__type, typename __strip_reference_wrapper<_T6>::__type, typename __strip_reference_wrapper<_T7>::__type, typename __strip_reference_wrapper<_T8>::__type
 #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)
 #undef _GLIBCXX_REF_WRAP_PARAMS
 #undef _GLIBCXX_TEMPLATE_ARGS_U
 #undef _GLIBCXX_TEMPLATE_PARAMS_U
+#undef _GLIBCXX_TEMPLATE_ARGS_STRIPPED
+#undef _GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS
 #undef _GLIBCXX_TUPLE_ASSIGN
 #undef _GLIBCXX_TUPLE_COPY_INIT
 #undef _GLIBCXX_TUPLE_ADD_CREF
 #undef _GLIBCXX_TEMPLATE_PARAMS
 #undef _GLIBCXX_COMMA
 #undef _GLIBCXX_NUM_ARGS
-
 #define _GLIBCXX_NUM_ARGS 9
 #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
 #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_NULL_CLASS typename _T1 = _NullClass, typename _T2 = _NullClass, typename _T3 = _NullClass, typename _T4 = _NullClass, typename _T5 = _NullClass, typename _T6 = _NullClass, typename _T7 = _NullClass, typename _T8 = _NullClass, typename _T9 = _NullClass
+#define _GLIBCXX_TEMPLATE_ARGS_STRIPPED typename __strip_reference_wrapper<_T1>::__type, typename __strip_reference_wrapper<_T2>::__type, typename __strip_reference_wrapper<_T3>::__type, typename __strip_reference_wrapper<_T4>::__type, typename __strip_reference_wrapper<_T5>::__type, typename __strip_reference_wrapper<_T6>::__type, typename __strip_reference_wrapper<_T7>::__type, typename __strip_reference_wrapper<_T8>::__type, typename __strip_reference_wrapper<_T9>::__type
 #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)
 #undef _GLIBCXX_REF_WRAP_PARAMS
 #undef _GLIBCXX_TEMPLATE_ARGS_U
 #undef _GLIBCXX_TEMPLATE_PARAMS_U
+#undef _GLIBCXX_TEMPLATE_ARGS_STRIPPED
+#undef _GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS
 #undef _GLIBCXX_TUPLE_ASSIGN
 #undef _GLIBCXX_TUPLE_COPY_INIT
 #undef _GLIBCXX_TUPLE_ADD_CREF
 #undef _GLIBCXX_TEMPLATE_PARAMS
 #undef _GLIBCXX_COMMA
 #undef _GLIBCXX_NUM_ARGS
-
 #define _GLIBCXX_LAST_INCLUDE
 #define _GLIBCXX_NUM_ARGS 10
 #define _GLIBCXX_COMMA ,
 #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_NULL_CLASS typename _T1 = _NullClass, typename _T2 = _NullClass, typename _T3 = _NullClass, typename _T4 = _NullClass, typename _T5 = _NullClass, typename _T6 = _NullClass, typename _T7 = _NullClass, typename _T8 = _NullClass, typename _T9 = _NullClass, typename _T10 = _NullClass
+#define _GLIBCXX_TEMPLATE_ARGS_STRIPPED typename __strip_reference_wrapper<_T1>::__type, typename __strip_reference_wrapper<_T2>::__type, typename __strip_reference_wrapper<_T3>::__type, typename __strip_reference_wrapper<_T4>::__type, typename __strip_reference_wrapper<_T5>::__type, typename __strip_reference_wrapper<_T6>::__type, typename __strip_reference_wrapper<_T7>::__type, typename __strip_reference_wrapper<_T8>::__type, typename __strip_reference_wrapper<_T9>::__type, typename __strip_reference_wrapper<_T10>::__type
 #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)
 #undef _GLIBCXX_REF_WRAP_PARAMS
 #undef _GLIBCXX_TEMPLATE_ARGS_U
 #undef _GLIBCXX_TEMPLATE_PARAMS_U
+#undef _GLIBCXX_TEMPLATE_ARGS_STRIPPED
+#undef _GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS
 #undef _GLIBCXX_TUPLE_ASSIGN
 #undef _GLIBCXX_TUPLE_COPY_INIT
 #undef _GLIBCXX_TUPLE_ADD_CREF
 #undef _GLIBCXX_TEMPLATE_PARAMS
 #undef _GLIBCXX_COMMA
 #undef _GLIBCXX_NUM_ARGS
-
 #undef _GLIBCXX_LAST_INCLUDE
 
index bd1a81f..4ec88bd 100644 (file)
@@ -47,13 +47,6 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
  // when the tuple is not maximum possible size.
  struct _NullClass { };
 
- template<typename _Tp0 = _NullClass, typename _Tp1 = _NullClass,
-          typename _Tp2 = _NullClass, typename _Tp3 = _NullClass,
-          typename _Tp4 = _NullClass, typename _Tp5 = _NullClass,
-          typename _Tp6 = _NullClass, typename _Tp7 = _NullClass,
-          typename _Tp8 = _NullClass, typename _Tp9 = _NullClass>
-   class tuple;
-
  /// Gives the type of the ith element of a given tuple type.
  template<int __i, typename _Tp>
    struct tuple_element;
@@ -86,38 +79,32 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
 
  // 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<int __i, typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
-                   typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
-                   typename _Tp8, typename _Tp9>
-   typename __add_ref<typename tuple_element<__i, tuple<_Tp0, _Tp1, _Tp2,
-                                                        _Tp3, _Tp4, _Tp5,
-                                                        _Tp6, _Tp7, _Tp8,
-                                                        _Tp9> >::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<int __i, typename _Tp0, typename _Tp1, typename _Tp2, typename _Tp3,
-                   typename _Tp4, typename _Tp5, typename _Tp6, typename _Tp7,
-                   typename _Tp8, typename _Tp9>
-   typename __add_c_ref<typename tuple_element<__i, tuple<_Tp0, _Tp1, _Tp2,
-                                                          _Tp3, _Tp4, _Tp5,
-                                                          _Tp6, _Tp7, _Tp8,
-                                                          _Tp9> >::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<int __check_equal_size, int __i, int __j, typename _Tp, typename _Up>
    struct __tuple_compare;
 
+ // Helper which adds a reference to a type when given a reference_wrapper
+ template<typename _Tp>
+   struct __strip_reference_wrapper
+   {
+       typedef _Tp __type;
+   };
+
+ template<typename _Tp>
+   struct __strip_reference_wrapper<reference_wrapper<_Tp> >
+   {
+     typedef _Tp& __type;
+   };
+
+ template<typename _Tp>
+   struct __strip_reference_wrapper<const reference_wrapper<_Tp> >
+   {
+       typedef _Tp& __type;
+   };
+
+  #include "tuple_defs.h"
+
  template<int __i, int __j, typename _Tp, typename _Up>
    struct __tuple_compare<0, __i, __j, _Tp, _Up>
    {
@@ -142,108 +129,6 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
      { return false; }
    };
 
- template<typename _T1, typename _T2, typename _T3, typename _T4, typename _T5,
-          typename _T6, typename _T7, typename _T8, typename _T9, typename _T10,
-          typename _U1, typename _U2, typename _U3, typename _U4, typename _U5,
-          typename _U6, typename _U7, typename _U8, typename _U9, typename _U10>
- 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<tuple_size<_Tp>::value - tuple_size<_Tp>::value, 0,
-                          tuple_size<_Tp>::value, _Tp, _Up>::__eq(__t, __u);
- }
-
- template<typename _T1, typename _T2, typename _T3, typename _T4, typename _T5,
-          typename _T6, typename _T7, typename _T8, typename _T9, typename _T10,
-          typename _U1, typename _U2, typename _U3, typename _U4, typename _U5,
-          typename _U6, typename _U7, typename _U8, typename _U9, typename _U10>
- 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<tuple_size<_Tp>::value - tuple_size<_Tp>::value, 0,
-                          tuple_size<_Tp>::value, _Tp, _Up>::__less(__t, __u);
- }
-
- template<typename _T1, typename _T2, typename _T3, typename _T4, typename _T5,
-          typename _T6, typename _T7, typename _T8, typename _T9, typename _T10,
-          typename _U1, typename _U2, typename _U3, typename _U4, typename _U5,
-          typename _U6, typename _U7, typename _U8, typename _U9, typename _U10>
- 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<typename _T1, typename _T2, typename _T3, typename _T4, typename _T5,
-          typename _T6, typename _T7, typename _T8, typename _T9, typename _T10,
-          typename _U1, typename _U2, typename _U3, typename _U4, typename _U5,
-          typename _U6, typename _U7, typename _U8, typename _U9, typename _U10>
- 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<typename _T1, typename _T2, typename _T3, typename _T4, typename _T5,
-          typename _T6, typename _T7, typename _T8, typename _T9, typename _T10,
-          typename _U1, typename _U2, typename _U3, typename _U4, typename _U5,
-          typename _U6, typename _U7, typename _U8, typename _U9, typename _U10>
- 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<typename _T1, typename _T2, typename _T3, typename _T4, typename _T5,
-          typename _T6, typename _T7, typename _T8, typename _T9, typename _T10,
-          typename _U1, typename _U2, typename _U3, typename _U4, typename _U5,
-          typename _U6, typename _U7, typename _U8, typename _U9, typename _U10>
- 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<typename _Tp>
-   struct __strip_reference_wrapper
-   {
-       typedef _Tp __type;
-   };
-
- template<typename _Tp>
-   struct __strip_reference_wrapper<reference_wrapper<_Tp> >
-   {
-     typedef _Tp& __type;
-   };
-
- template<typename _Tp>
-   struct __strip_reference_wrapper<const reference_wrapper<_Tp> >
-   {
-       typedef _Tp& __type;
-   };
-
- template<typename _Tp0 = _NullClass, typename _Tp1 = _NullClass,
-          typename _Tp2 = _NullClass, typename _Tp3 = _NullClass,
-          typename _Tp4 = _NullClass, typename _Tp5 = _NullClass,
-          typename _Tp6 = _NullClass, typename _Tp7 = _NullClass,
-          typename _Tp8 = _NullClass, typename _Tp9 = _NullClass>
-   struct __stripped_tuple_type
-   {
-     typedef tuple<typename __strip_reference_wrapper<_Tp0>::__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
diff --git a/libstdc++-v3/include/tr1/tuple_defs.h b/libstdc++-v3/include/tr1/tuple_defs.h
new file mode 100644 (file)
index 0000000..35a739e
--- /dev/null
@@ -0,0 +1,108 @@
+// 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+#ifndef _GLIBCXX_REPEAT_HEADER
+#  define _GLIBCXX_REPEAT_HEADER "tuple_defs.h"
+#  include "repeat.h"
+#  undef _GLIBCXX_REPEAT_HEADER
+#endif
+
+#ifdef _GLIBCXX_LAST_INCLUDE
+// Chris Jefferson <chris@bubblescope.net>
+   template<_GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS> class tuple;
+
+   // 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<int __i, _GLIBCXX_TEMPLATE_PARAMS>
+   typename __add_ref<typename tuple_element<__i, tuple<_GLIBCXX_TEMPLATE_ARGS> >::type>::type
+   get(tuple<_GLIBCXX_TEMPLATE_ARGS>& __t)
+   {
+     return __get_helper<__i, tuple<_GLIBCXX_TEMPLATE_ARGS> >::get_value(__t);
+   }
+
+   template<int __i, _GLIBCXX_TEMPLATE_PARAMS>
+   typename __add_c_ref<typename tuple_element<__i, tuple<_GLIBCXX_TEMPLATE_ARGS> >::type>::type
+   get(const tuple<_GLIBCXX_TEMPLATE_ARGS>& __t)
+   {
+     return __get_helper<__i, tuple<_GLIBCXX_TEMPLATE_ARGS> >::get_value(__t);
+   }
+
+ template<_GLIBCXX_TEMPLATE_PARAMS, _GLIBCXX_TEMPLATE_PARAMS_U>
+ bool
+ operator==(const tuple<_GLIBCXX_TEMPLATE_ARGS>& __t,
+            const tuple<_GLIBCXX_TEMPLATE_ARGS_U>& __u)
+ {
+   typedef tuple<_GLIBCXX_TEMPLATE_ARGS> _Tp;
+   typedef tuple<_GLIBCXX_TEMPLATE_ARGS_U> _Up;
+   return __tuple_compare<tuple_size<_Tp>::value - tuple_size<_Tp>::value, 0,
+                          tuple_size<_Tp>::value, _Tp, _Up>::__eq(__t, __u);
+ }
+
+ template<_GLIBCXX_TEMPLATE_PARAMS, _GLIBCXX_TEMPLATE_PARAMS_U>
+ bool
+ operator<(const tuple<_GLIBCXX_TEMPLATE_ARGS>& __t,
+           const tuple<_GLIBCXX_TEMPLATE_ARGS_U>& __u)
+ {
+   typedef tuple<_GLIBCXX_TEMPLATE_ARGS> _Tp;
+   typedef tuple<_GLIBCXX_TEMPLATE_ARGS_U> _Up;
+   return __tuple_compare<tuple_size<_Tp>::value - tuple_size<_Tp>::value, 0,
+                          tuple_size<_Tp>::value, _Tp, _Up>::__less(__t, __u);
+ }
+
+ template<_GLIBCXX_TEMPLATE_PARAMS, _GLIBCXX_TEMPLATE_PARAMS_U>
+ bool
+ operator!=(const tuple<_GLIBCXX_TEMPLATE_ARGS>& __t,
+            const tuple<_GLIBCXX_TEMPLATE_ARGS_U>& __u)
+ { return !(__t == __u); }
+
+ template<_GLIBCXX_TEMPLATE_PARAMS, _GLIBCXX_TEMPLATE_PARAMS_U>
+ bool
+ operator>(const tuple<_GLIBCXX_TEMPLATE_ARGS>& __t,
+           const tuple<_GLIBCXX_TEMPLATE_ARGS_U>& __u)
+ { return __u < __t; }
+
+ template<_GLIBCXX_TEMPLATE_PARAMS, _GLIBCXX_TEMPLATE_PARAMS_U>
+ bool
+ operator<=(const tuple<_GLIBCXX_TEMPLATE_ARGS>& __t,
+            const tuple<_GLIBCXX_TEMPLATE_ARGS_U>& __u)
+ { return !(__u < __t); }
+
+ template<_GLIBCXX_TEMPLATE_PARAMS, _GLIBCXX_TEMPLATE_PARAMS_U>
+ bool
+ operator>=(const tuple<_GLIBCXX_TEMPLATE_ARGS>& __t,
+            const tuple<_GLIBCXX_TEMPLATE_ARGS_U>& __u)
+ { return !(__t < __u); }
+
+ template<_GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS>
+   struct __stripped_tuple_type
+   {
+     typedef tuple<_GLIBCXX_TEMPLATE_ARGS_STRIPPED>      __type;
+   };
+
+#endif
+
index 320073b..8d57576 100644 (file)
@@ -108,8 +108,7 @@ template<_GLIBCXX_TEMPLATE_PARAMS>
     template<int __i, typename __Type>
       friend class __get_helper;
 
-    template<typename, typename, typename, typename, typename,
-             typename, typename, typename, typename, typename>
+    template<_GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS_UNNAMED>
       friend class tuple;
   };
 
@@ -130,12 +129,8 @@ template<typename _Tp>
     };
 
 /// @brief class tuple_element
-template<typename _T1, typename _T2, typename _T3, typename _T4,
-         typename _T5, typename _T6, typename _T7, typename _T8,
-         typename _T9, typename _T10>
-   struct tuple_element<_GLIBCXX_NUM_ARGS, tuple<_T1, _T2, _T3, _T4,
-                                                _T5, _T6, _T7, _T8, _T9,
-                                                _T10> >
+template<_GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS>
+   struct tuple_element<_GLIBCXX_NUM_ARGS, tuple<_GLIBCXX_TUPLE_ALL_TEMPLATE_ARGS> >
   { typedef _GLIBCXX_T_NUM_ARGS_PLUS_1 type; };
 
 #endif
index 931d39d..799720c 100644 (file)
@@ -42,6 +42,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
+       $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
        $(top_srcdir)/../libtool.m4 $(top_srcdir)/crossconfig.m4 \
index 167ecd0..9b2a061 100644 (file)
@@ -44,6 +44,7 @@ subdir = libsupc++
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
+       $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
        $(top_srcdir)/../libtool.m4 $(top_srcdir)/crossconfig.m4 \
index 1157e33..bb30735 100644 (file)
@@ -42,6 +42,7 @@ subdir = po
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
+       $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
        $(top_srcdir)/../libtool.m4 $(top_srcdir)/crossconfig.m4 \
index bfc3a7e..477f028 100644 (file)
@@ -4,6 +4,7 @@ use English;
 $max = shift @ARGV;
 
 $template_params = "typename _T1";
+$template_params_unnamed = "typename";
 $template_args = "_T1";
 $params = "_T1 __a1";
 $ref_params = "_T1& __a1";
@@ -16,6 +17,8 @@ $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_null_class = "typename _T1 = _NullClass";
+$template_args_stripped = "typename __strip_reference_wrapper<_T1>::__type";
 $template_params_u = "typename _U1";
 $template_args_u = "_U1";
 $ref_wrap_params = "ref(__a1)";
@@ -28,6 +31,7 @@ for ($num_args = 2; $num_args <= $max; ++$num_args) {
   $params_shifted = $params;
   $args_shifted = $args;
   $template_params .= ", typename _T$num_args";
+  $template_params_unnamed .= ", typename";
   $template_args .= ", _T$num_args";
   $params .= ", _T$num_args __a$num_args";
   $ref_params .=", _T$num_args& __a$num_args";
@@ -40,11 +44,16 @@ for ($num_args = 2; $num_args <= $max; ++$num_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_null_class .= ", typename _T$num_args = _NullClass";
+  $template_args_stripped .= ", typename __strip_reference_wrapper<_T$num_args>::__type";
   $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&";
 
+  if ($num_args == $max) {
+    print "#define _GLIBCXX_LAST_INCLUDE\n"
+  }
   print "#define _GLIBCXX_NUM_ARGS $num_args\n";
   print "#define _GLIBCXX_COMMA ,\n";
   print "#define _GLIBCXX_TEMPLATE_PARAMS $template_params\n";
@@ -65,25 +74,23 @@ for ($num_args = 2; $num_args <= $max; ++$num_args) {
   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_NULL_CLASS $template_params_null_class\n";
+  print "#define _GLIBCXX_TEMPLATE_ARGS_STRIPPED $template_args_stripped\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";
   print "#define _GLIBCXX_T_NUM_ARGS_PLUS_1 _T$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_T_NUM_ARGS_PLUS_1\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_TEMPLATE_ARGS_STRIPPED\n";
+  print "#undef _GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS\n";
   print "#undef _GLIBCXX_TUPLE_ASSIGN\n";
   print "#undef _GLIBCXX_TUPLE_COPY_INIT\n";
   print "#undef _GLIBCXX_TUPLE_ADD_CREF\n";
@@ -104,5 +111,16 @@ for ($num_args = 2; $num_args <= $max; ++$num_args) {
   print "#undef _GLIBCXX_TEMPLATE_PARAMS\n";
   print "#undef _GLIBCXX_COMMA\n";
   print "#undef _GLIBCXX_NUM_ARGS\n";
-  print "\n";
+  if ($num_args == $max) {
+    print "#undef _GLIBCXX_LAST_INCLUDE\n"
+  }
 }
+
+print "\n";
+print "#ifndef _GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS\n";
+print "#  define _GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS $template_params\n";
+print "#  define _GLIBCXX_TUPLE_ALL_TEMPLATE_PARAMS_UNNAMED $template_params_unnamed\n";
+print "#  define _GLIBCXX_TUPLE_ALL_TEMPLATE_ARGS $template_args\n";
+print "#endif\n";
+print "\n";
+
diff --git a/libstdc++-v3/scripts/gen_includers2.pl b/libstdc++-v3/scripts/gen_includers2.pl
new file mode 100644 (file)
index 0000000..88e9bec
--- /dev/null
@@ -0,0 +1,31 @@
+#!/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";
+}
+
index 34b86e3..6000d21 100644 (file)
@@ -42,6 +42,7 @@ subdir = src
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
+       $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
        $(top_srcdir)/../libtool.m4 $(top_srcdir)/crossconfig.m4 \
index 6ec17fd..6f443ec 100644 (file)
@@ -42,6 +42,7 @@ subdir = testsuite
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/enable.m4 \
        $(top_srcdir)/../config/lead-dot.m4 \
+       $(top_srcdir)/../config/multi.m4 \
        $(top_srcdir)/../config/no-executables.m4 \
        $(top_srcdir)/../config/unwind_ipinfo.m4 \
        $(top_srcdir)/../libtool.m4 $(top_srcdir)/crossconfig.m4 \