diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2011-09-10 00:47:02 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2011-09-10 00:47:02 +0000 |
commit | 049d28935129d6c2daa4993899f25a27e7b239af (patch) | |
tree | 154eda56aed65fcdc4a80fc2f24a7aa86d2dfc02 /libstdc++-v3/include/std | |
parent | 25e723bdecca5da30b51aa3a00889550e7c6a6c5 (diff) | |
download | gcc-049d28935129d6c2daa4993899f25a27e7b239af.tar.gz |
tuple: Use everywhere std::size_t...
2011-09-09 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/tuple: Use everywhere std::size_t... instead of int...
* include/std/functional: Likewise.
* include/std/scoped_allocator: Likewise.
* include/bits/stl_pair.h: Likewise.
From-SVN: r178746
Diffstat (limited to 'libstdc++-v3/include/std')
-rw-r--r-- | libstdc++-v3/include/std/functional | 40 | ||||
-rw-r--r-- | libstdc++-v3/include/std/scoped_allocator | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/std/tuple | 4 |
3 files changed, 23 insertions, 23 deletions
diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index 9296d755faa..4a04eca8969 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -914,7 +914,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) * template handles the case where it is safe to use @c * tuple_element. */ - template<int __i, typename _Tuple, bool _IsSafe> + template<std::size_t __i, typename _Tuple, bool _IsSafe> struct _Safe_tuple_element_impl : tuple_element<__i, _Tuple> { }; @@ -923,7 +923,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) * specialization handles the case where it is not safe to use @c * tuple_element. We just return @c _No_tuple_element. */ - template<int __i, typename _Tuple> + template<std::size_t __i, typename _Tuple> struct _Safe_tuple_element_impl<__i, _Tuple, false> { typedef _No_tuple_element type; @@ -933,10 +933,10 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) * Like tuple_element, but returns @c _No_tuple_element when * tuple_element would return an error. */ - template<int __i, typename _Tuple> + template<std::size_t __i, typename _Tuple> struct _Safe_tuple_element : _Safe_tuple_element_impl<__i, _Tuple, - (__i >= 0 && __i < tuple_size<_Tuple>::value)> + (__i < tuple_size<_Tuple>::value)> { }; /** @@ -999,7 +999,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) private: // Invokes the underlying function object __arg by unpacking all // of the arguments in the tuple. - template<typename _CVArg, typename... _Args, int... _Indexes> + template<typename _CVArg, typename... _Args, std::size_t... _Indexes> auto __call(_CVArg& __arg, tuple<_Args...>& __tuple, const _Index_tuple<_Indexes...>&) const volatile @@ -1112,14 +1112,14 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) }; // std::get<I> for volatile-qualified tuples - template<size_t _Ind, typename... _Tp> + template<std::size_t _Ind, typename... _Tp> inline auto __volget(volatile tuple<_Tp...>& __tuple) -> typename tuple_element<_Ind, tuple<_Tp...>>::type volatile& { return std::get<_Ind>(const_cast<tuple<_Tp...>&>(__tuple)); } // std::get<I> for const-volatile-qualified tuples - template<size_t _Ind, typename... _Tp> + template<std::size_t _Ind, typename... _Tp> inline auto __volget(const volatile tuple<_Tp...>& __tuple) -> typename tuple_element<_Ind, tuple<_Tp...>>::type const volatile& @@ -1141,7 +1141,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) tuple<_Bound_args...> _M_bound_args; // Call unqualified - template<typename _Result, typename... _Args, int... _Indexes> + template<typename _Result, typename... _Args, std::size_t... _Indexes> _Result __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) { @@ -1150,7 +1150,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) } // Call as const - template<typename _Result, typename... _Args, int... _Indexes> + template<typename _Result, typename... _Args, std::size_t... _Indexes> _Result __call_c(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const { @@ -1159,7 +1159,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) } // Call as volatile - template<typename _Result, typename... _Args, int... _Indexes> + template<typename _Result, typename... _Args, std::size_t... _Indexes> _Result __call_v(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) volatile @@ -1169,7 +1169,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) } // Call as const volatile - template<typename _Result, typename... _Args, int... _Indexes> + template<typename _Result, typename... _Args, std::size_t... _Indexes> _Result __call_c_v(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>) const volatile @@ -1272,7 +1272,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) struct __disable_if_void : enable_if<!is_void<_Res>::value, int> { }; // Call unqualified - template<typename _Res, typename... _Args, int... _Indexes> + template<typename _Res, typename... _Args, std::size_t... _Indexes> _Result __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, typename __disable_if_void<_Res>::type = 0) @@ -1282,7 +1282,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) } // Call unqualified, return void - template<typename _Res, typename... _Args, int... _Indexes> + template<typename _Res, typename... _Args, std::size_t... _Indexes> void __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, typename __enable_if_void<_Res>::type = 0) @@ -1292,7 +1292,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) } // Call as const - template<typename _Res, typename... _Args, int... _Indexes> + template<typename _Res, typename... _Args, std::size_t... _Indexes> _Result __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, typename __disable_if_void<_Res>::type = 0) const @@ -1302,7 +1302,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) } // Call as const, return void - template<typename _Res, typename... _Args, int... _Indexes> + template<typename _Res, typename... _Args, std::size_t... _Indexes> void __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, typename __enable_if_void<_Res>::type = 0) const @@ -1312,7 +1312,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) } // Call as volatile - template<typename _Res, typename... _Args, int... _Indexes> + template<typename _Res, typename... _Args, std::size_t... _Indexes> _Result __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, typename __disable_if_void<_Res>::type = 0) volatile @@ -1322,7 +1322,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) } // Call as volatile, return void - template<typename _Res, typename... _Args, int... _Indexes> + template<typename _Res, typename... _Args, std::size_t... _Indexes> void __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, typename __enable_if_void<_Res>::type = 0) volatile @@ -1332,7 +1332,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) } // Call as const volatile - template<typename _Res, typename... _Args, int... _Indexes> + template<typename _Res, typename... _Args, std::size_t... _Indexes> _Result __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, typename __disable_if_void<_Res>::type = 0) const volatile @@ -1342,7 +1342,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) } // Call as const volatile, return void - template<typename _Res, typename... _Args, int... _Indexes> + template<typename _Res, typename... _Args, std::size_t... _Indexes> void __call(tuple<_Args...>&& __args, _Index_tuple<_Indexes...>, @@ -1533,7 +1533,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) private: - template<int... _Indices> + template<std::size_t... _Indices> typename result_of<_Callable(_Args...)>::type _M_invoke(_Index_tuple<_Indices...>) { diff --git a/libstdc++-v3/include/std/scoped_allocator b/libstdc++-v3/include/std/scoped_allocator index bebbbd29cc9..9fd53db6133 100644 --- a/libstdc++-v3/include/std/scoped_allocator +++ b/libstdc++-v3/include/std/scoped_allocator @@ -234,7 +234,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __a_traits::select_on_container_copy_construction(__a); } - template<int... _Indices> + template<std::size_t... _Indices> scoped_allocator_adaptor(tuple<const _OuterAlloc&, const _InnerAllocs&...> __refs, _Index_tuple<_Indices...>) diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index f68766f5747..515fb4ea001 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -1011,7 +1011,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Stores a tuple of indices. Used by bind() to extract the elements * in a tuple. */ - template<int... _Indexes> + template<std::size_t... _Indexes> struct _Index_tuple { typedef _Index_tuple<_Indexes..., sizeof...(_Indexes)> __next; @@ -1042,7 +1042,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } template<class _T1, class _T2> - template<typename _Tp, typename... _Args, int... _Indexes> + template<typename _Tp, typename... _Args, std::size_t... _Indexes> inline _Tp pair<_T1, _T2>::__do_cons(tuple<_Args...>&& __tuple, const _Index_tuple<_Indexes...>&) |