diff options
author | Douglas Gregor <doug.gregor@gmail.com> | 2005-04-02 12:56:18 +0000 |
---|---|---|
committer | Doug Gregor <dgregor@gcc.gnu.org> | 2005-04-02 12:56:18 +0000 |
commit | 4ee3998918974120f7850e40ea328b898566e8b6 (patch) | |
tree | 31673126f2ecfcfdb1fe3671537a34ee2a2a8449 /libstdc++-v3/include | |
parent | b6d2248c7e8bffa8f8dde30d7f1700ea920dcded (diff) | |
download | gcc-4ee3998918974120f7850e40ea328b898566e8b6.zip gcc-4ee3998918974120f7850e40ea328b898566e8b6.tar.gz gcc-4ee3998918974120f7850e40ea328b898566e8b6.tar.bz2 |
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
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r-- | libstdc++-v3/include/tr1/repeat.h | 22 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1/tuple_iterate.h | 28 |
2 files changed, 36 insertions, 14 deletions
diff --git a/libstdc++-v3/include/tr1/repeat.h b/libstdc++-v3/include/tr1/repeat.h index 1c57b0b..fa23c0b 100644 --- a/libstdc++-v3/include/tr1/repeat.h +++ b/libstdc++-v3/include/tr1/repeat.h @@ -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 diff --git a/libstdc++-v3/include/tr1/tuple_iterate.h b/libstdc++-v3/include/tr1/tuple_iterate.h index df57276..23cb01f 100644 --- a/libstdc++-v3/include/tr1/tuple_iterate.h +++ b/libstdc++-v3/include/tr1/tuple_iterate.h @@ -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); } |