tuple_iterate.h (tuple_element): Use new macro _GLIBCXX_T_NUM_ARGS_PLUS_1 because _T is a macro on Darwin.

2005-04-02  Douglas Gregor  <doug.gregor@gmail.com>

	* include/tr1/tuple_iterate.h (tuple_element): Use new macro
	_GLIBCXX_T_NUM_ARGS_PLUS_1 because _T is a macro on Darwin.
	* include/tr1/repeat.h (_GLIBCXX_T_NUM_ARGS_PLUS_1): Define for
	each iteration.
	* scripts/gen_includers.h: Define _GLIBCXX_T_NUM_ARGS_PLUS_1 for
	each iteration.

From-SVN: r97438
This commit is contained in:
Douglas Gregor 2005-04-02 12:56:18 +00:00 committed by Doug Gregor
parent b6d2248c7e
commit 4ee3998918
4 changed files with 47 additions and 15 deletions

View File

@ -1,3 +1,12 @@
2005-04-02 Douglas Gregor <doug.gregor@gmail.com>
* include/tr1/tuple_iterate.h (tuple_element): Use new macro
_GLIBCXX_T_NUM_ARGS_PLUS_1 because _T is a macro on Darwin.
* include/tr1/repeat.h (_GLIBCXX_T_NUM_ARGS_PLUS_1): Define for
each iteration.
* scripts/gen_includers.h: Define _GLIBCXX_T_NUM_ARGS_PLUS_1 for
each iteration.
2005-04-01 Douglas Gregor <doug.gregor@gmail.com>
* include/tr1/functional (_Maybe_wrap_member_pointer): Wrap up

View File

@ -62,7 +62,9 @@
#define _GLIBCXX_REF_WRAP_PARAMS
#define _GLIBCXX_REF_TEMPLATE_ARGS
#define _GLIBCXX_NUM_ARGS_PLUS_1 1
#define _GLIBCXX_T_NUM_ARGS_PLUS_1 _T1
#include _GLIBCXX_REPEAT_HEADER
#undef _GLIBCXX_T_NUM_ARGS_PLUS_1
#undef _GLIBCXX_NUM_ARGS_PLUS_1
#undef _GLIBCXX_REF_TEMPLATE_ARGS
#undef _GLIBCXX_REF_WRAP_PARAMS
@ -114,7 +116,9 @@
#define _GLIBCXX_REF_WRAP_PARAMS ref(__a1)
#define _GLIBCXX_REF_TEMPLATE_ARGS _T1&
#define _GLIBCXX_NUM_ARGS_PLUS_1 2
#define _GLIBCXX_T_NUM_ARGS_PLUS_1 _T2
#include _GLIBCXX_REPEAT_HEADER
#undef _GLIBCXX_T_NUM_ARGS_PLUS_1
#undef _GLIBCXX_NUM_ARGS_PLUS_1
#undef _GLIBCXX_REF_TEMPLATE_ARGS
#undef _GLIBCXX_REF_WRAP_PARAMS
@ -166,7 +170,9 @@
#define _GLIBCXX_REF_WRAP_PARAMS ref(__a1), ref(__a2)
#define _GLIBCXX_REF_TEMPLATE_ARGS _T1&, _T2&
#define _GLIBCXX_NUM_ARGS_PLUS_1 3
#define _GLIBCXX_T_NUM_ARGS_PLUS_1 _T3
#include _GLIBCXX_REPEAT_HEADER
#undef _GLIBCXX_T_NUM_ARGS_PLUS_1
#undef _GLIBCXX_NUM_ARGS_PLUS_1
#undef _GLIBCXX_REF_TEMPLATE_ARGS
#undef _GLIBCXX_REF_WRAP_PARAMS
@ -218,7 +224,9 @@
#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
#define _GLIBCXX_T_NUM_ARGS_PLUS_1 _T4
#include _GLIBCXX_REPEAT_HEADER
#undef _GLIBCXX_T_NUM_ARGS_PLUS_1
#undef _GLIBCXX_NUM_ARGS_PLUS_1
#undef _GLIBCXX_REF_TEMPLATE_ARGS
#undef _GLIBCXX_REF_WRAP_PARAMS
@ -270,7 +278,9 @@
#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
#define _GLIBCXX_T_NUM_ARGS_PLUS_1 _T5
#include _GLIBCXX_REPEAT_HEADER
#undef _GLIBCXX_T_NUM_ARGS_PLUS_1
#undef _GLIBCXX_NUM_ARGS_PLUS_1
#undef _GLIBCXX_REF_TEMPLATE_ARGS
#undef _GLIBCXX_REF_WRAP_PARAMS
@ -322,7 +332,9 @@
#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
#define _GLIBCXX_T_NUM_ARGS_PLUS_1 _T6
#include _GLIBCXX_REPEAT_HEADER
#undef _GLIBCXX_T_NUM_ARGS_PLUS_1
#undef _GLIBCXX_NUM_ARGS_PLUS_1
#undef _GLIBCXX_REF_TEMPLATE_ARGS
#undef _GLIBCXX_REF_WRAP_PARAMS
@ -374,7 +386,9 @@
#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
#define _GLIBCXX_T_NUM_ARGS_PLUS_1 _T7
#include _GLIBCXX_REPEAT_HEADER
#undef _GLIBCXX_T_NUM_ARGS_PLUS_1
#undef _GLIBCXX_NUM_ARGS_PLUS_1
#undef _GLIBCXX_REF_TEMPLATE_ARGS
#undef _GLIBCXX_REF_WRAP_PARAMS
@ -426,7 +440,9 @@
#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
#define _GLIBCXX_T_NUM_ARGS_PLUS_1 _T8
#include _GLIBCXX_REPEAT_HEADER
#undef _GLIBCXX_T_NUM_ARGS_PLUS_1
#undef _GLIBCXX_NUM_ARGS_PLUS_1
#undef _GLIBCXX_REF_TEMPLATE_ARGS
#undef _GLIBCXX_REF_WRAP_PARAMS
@ -478,7 +494,9 @@
#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
#define _GLIBCXX_T_NUM_ARGS_PLUS_1 _T9
#include _GLIBCXX_REPEAT_HEADER
#undef _GLIBCXX_T_NUM_ARGS_PLUS_1
#undef _GLIBCXX_NUM_ARGS_PLUS_1
#undef _GLIBCXX_REF_TEMPLATE_ARGS
#undef _GLIBCXX_REF_WRAP_PARAMS
@ -530,7 +548,9 @@
#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
#define _GLIBCXX_T_NUM_ARGS_PLUS_1 _T10
#include _GLIBCXX_REPEAT_HEADER
#undef _GLIBCXX_T_NUM_ARGS_PLUS_1
#undef _GLIBCXX_NUM_ARGS_PLUS_1
#undef _GLIBCXX_REF_TEMPLATE_ARGS
#undef _GLIBCXX_REF_WRAP_PARAMS
@ -583,7 +603,9 @@
#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
#define _GLIBCXX_T_NUM_ARGS_PLUS_1 _T11
#include _GLIBCXX_REPEAT_HEADER
#undef _GLIBCXX_T_NUM_ARGS_PLUS_1
#undef _GLIBCXX_NUM_ARGS_PLUS_1
#undef _GLIBCXX_REF_TEMPLATE_ARGS
#undef _GLIBCXX_REF_WRAP_PARAMS

View File

@ -49,7 +49,7 @@ template<_GLIBCXX_TEMPLATE_PARAMS>
_GLIBCXX_BIND_MEMBERS
public:
tuple()
tuple()
{ }
#if _GLIBCXX_NUM_ARGS == 2
@ -75,8 +75,8 @@ template<class _U1, class _U2>
tuple&
operator=(const tuple<_GLIBCXX_TEMPLATE_ARGS_U>& __in)
{
_GLIBCXX_TUPLE_ASSIGN
return *this;
_GLIBCXX_TUPLE_ASSIGN
return *this;
}
tuple(const tuple& __in) :
@ -94,7 +94,7 @@ template<class _U1, class _U2>
operator=(const tuple& __in)
{
_GLIBCXX_TUPLE_ASSIGN
return *this;
return *this;
}
template<int __i, typename __Type>
@ -110,25 +110,25 @@ template<class _U1, class _U2>
template<typename _Tp>
struct __get_helper<_GLIBCXX_NUM_ARGS, _Tp>
{
static typename __add_ref<typename tuple_element<_GLIBCXX_NUM_ARGS,
_Tp>::type>::type
static typename __add_ref<typename tuple_element<_GLIBCXX_NUM_ARGS,
_Tp>::type>::type
get_value(_Tp& __in)
{ return __in._GLIBCXX_CAT(_M_arg,_GLIBCXX_NUM_ARGS_PLUS_1); }
static typename __add_c_ref<typename tuple_element<_GLIBCXX_NUM_ARGS,
_Tp>::type>::type
_Tp>::type>::type
get_value(const _Tp& __in)
{ return __in._GLIBCXX_CAT(_M_arg,_GLIBCXX_NUM_ARGS_PLUS_1); }
};
/// @brief class tuple_element
template<typename _T1, typename _T2, typename _T3, typename _T4,
typename _T5, typename _T6, typename _T7, typename _T8,
/// @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,
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; };
{ typedef _GLIBCXX_T_NUM_ARGS_PLUS_1 type; };
#endif
#if _GLIBCXX_NUM_ARGS == 0
@ -145,7 +145,7 @@ tie()
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);
}

View File

@ -70,6 +70,7 @@ for ($num_args = 2; $num_args <= $max; ++$num_args) {
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"
}
@ -77,7 +78,7 @@ for ($num_args = 2; $num_args <= $max; ++$num_args) {
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";