Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@133008 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/__hash_table b/include/__hash_table index 2e371a4..b185cde 100644 --- a/include/__hash_table +++ b/include/__hash_table
@@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_VISIBLE -size_t __next_prime(size_t); +size_t __next_prime(size_t __n); template <class _NodePtr> struct __hash_node_base @@ -54,11 +54,12 @@ value_type __value_; }; -template <class, class, class, class> class __hash_table; -template <class> class __hash_const_iterator; -template <class> class __hash_map_iterator; -template <class> class __hash_map_const_iterator; -template <class, class, class, class, class> class _LIBCPP_VISIBLE unordered_map; +template <class _Tp, class _Hash, class _Equal, class _Alloc> class __hash_table; +template <class _ConstNodePtr> class __hash_const_iterator; +template <class _HashIterator> class __hash_map_iterator; +template <class _HashIterator> class __hash_map_const_iterator; +template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> + class _LIBCPP_VISIBLE unordered_map; template <class _NodePtr> class _LIBCPP_VISIBLE __hash_iterator @@ -199,7 +200,7 @@ template <class, class, class, class, class> friend class _LIBCPP_VISIBLE unordered_multimap; }; -template <class> class _LIBCPP_VISIBLE __hash_const_local_iterator; +template <class _ConstNodePtr> class _LIBCPP_VISIBLE __hash_const_local_iterator; template <class _NodePtr> class _LIBCPP_VISIBLE __hash_local_iterator @@ -411,7 +412,7 @@ } }; -template <class> class __hash_map_node_destructor; +template <class _Alloc> class __hash_map_node_destructor; template <class _Alloc> class __hash_node_destructor
diff --git a/include/__mutex_base b/include/__mutex_base index 3bc0b5b..6f98d2e 100644 --- a/include/__mutex_base +++ b/include/__mutex_base
@@ -21,8 +21,8 @@ #ifdef _LIBCPP_SHARED_LOCK namespace ting { -template <class> class shared_lock; -template <class> class upgrade_lock; +template <class _Mutex> class shared_lock; +template <class _Mutex> class upgrade_lock; } #endif // _LIBCPP_SHARED_LOCK
diff --git a/include/__tree b/include/__tree index 018d729..676819b 100644 --- a/include/__tree +++ b/include/__tree
@@ -21,13 +21,19 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template <class, class, class> class __tree; -template <class, class, class> class _LIBCPP_VISIBLE __tree_iterator; -template <class, class, class> class _LIBCPP_VISIBLE __tree_const_iterator; -template <class, class, class, class> class _LIBCPP_VISIBLE map; -template <class, class, class, class> class _LIBCPP_VISIBLE multimap; -template <class, class, class> class _LIBCPP_VISIBLE set; -template <class, class, class> class _LIBCPP_VISIBLE multiset; +template <class _Tp, class _Compare, class _Allocator> class __tree; +template <class _Tp, class _NodePtr, class _DiffType> + class _LIBCPP_VISIBLE __tree_iterator; +template <class _Tp, class _ConstNodePtr, class _DiffType> + class _LIBCPP_VISIBLE __tree_const_iterator; +template <class _Key, class _Tp, class _Compare, class _Allocator> + class _LIBCPP_VISIBLE map; +template <class _Key, class _Tp, class _Compare, class _Allocator> + class _LIBCPP_VISIBLE multimap; +template <class _Key, class _Compare, class _Allocator> + class _LIBCPP_VISIBLE set; +template <class _Key, class _Compare, class _Allocator> + class _LIBCPP_VISIBLE multiset; /* @@ -494,7 +500,7 @@ } } -template <class> class __map_node_destructor; +template <class _Allocator> class __map_node_destructor; template <class _Allocator> class __tree_node_destructor @@ -606,8 +612,8 @@ #endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS) }; -template <class> class __map_iterator; -template <class> class __map_const_iterator; +template <class _TreeIterator> class __map_iterator; +template <class _TreeIterator> class __map_const_iterator; template <class _Tp, class _NodePtr, class _DiffType> class _LIBCPP_VISIBLE __tree_iterator
diff --git a/include/forward_list b/include/forward_list index aae3317..a3810f0 100644 --- a/include/forward_list +++ b/include/forward_list
@@ -178,7 +178,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template <class, class> struct __forward_list_node; +template <class _Tp, class _VoidPtr> struct __forward_list_node; template <class _NodePtr> struct __forward_begin_node @@ -208,8 +208,8 @@ value_type __value_; }; -template<class, class> class forward_list; -template<class> class __forward_list_const_iterator; +template<class _Tp, class _Alloc> class forward_list; +template<class _NodeConstPtr> class __forward_list_const_iterator; template <class _NodePtr> class _LIBCPP_VISIBLE __forward_list_iterator
diff --git a/include/future b/include/future index 90eb6e4..e39ae4c 100644 --- a/include/future +++ b/include/future
@@ -967,9 +967,8 @@ base::__on_zero_shared(); } -template <class> class promise; -template <class> class shared_future; -template <class> class atomic_future; +template <class _R> class promise; +template <class _R> class shared_future; // future @@ -1000,7 +999,6 @@ template <class> friend class promise; template <class> friend class shared_future; - template <class> friend class atomic_future; #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _R1, class _F> @@ -1103,7 +1101,6 @@ template <class> friend class promise; template <class> friend class shared_future; - template <class> friend class atomic_future; #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _R1, class _F> @@ -1201,7 +1198,6 @@ template <class> friend class promise; template <class> friend class shared_future; - template <class> friend class atomic_future; #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _R1, class _F> @@ -1273,7 +1269,7 @@ // promise<R> -template <class> class packaged_task; +template <class _Callable> class packaged_task; template <class _R> class _LIBCPP_VISIBLE promise @@ -1728,7 +1724,7 @@ return __invoke(__f_.first(), _STD::forward<_ArgTypes>(__arg)...); } -template <class> class __packaged_task_function; +template <class _Callable> class __packaged_task_function; template<class _R, class ..._ArgTypes> class __packaged_task_function<_R(_ArgTypes...)>
diff --git a/include/list b/include/list index 9d8fc72..278f057 100644 --- a/include/list +++ b/include/list
@@ -180,7 +180,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template <class, class> struct __list_node; +template <class _Tp, class _VoidPtr> struct __list_node; template <class _Tp, class _VoidPtr> struct __list_node_base @@ -209,9 +209,9 @@ _Tp __value_; }; -template <class, class> class list; -template <class, class> class __list_imp; -template <class, class> class __list_const_iterator; +template <class _Tp, class _Alloc> class list; +template <class _Tp, class _Alloc> class __list_imp; +template <class _Tp, class _VoidPtr> class __list_const_iterator; template <class _Tp, class _VoidPtr> class _LIBCPP_VISIBLE __list_iterator
diff --git a/include/map b/include/map index c0bc784..d675bc5 100644 --- a/include/map +++ b/include/map
@@ -524,9 +524,11 @@ } }; -template <class, class, class, class> class map; -template <class, class, class, class> class multimap; -template <class> class __map_const_iterator; +template <class _Key, class _Tp, class _Compare, class _Allocator> + class map; +template <class _Key, class _Tp, class _Compare, class _Allocator> + class multimap; +template <class _TreeIterator> class __map_const_iterator; template <class _TreeIterator> class _LIBCPP_VISIBLE __map_iterator
diff --git a/include/memory b/include/memory index 67f9937..6f6a8ce 100644 --- a/include/memory +++ b/include/memory
@@ -2507,7 +2507,7 @@ bool operator>=(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return !(__x < __y);} -template <class> struct hash; +template <class _Tp> struct hash; template<class _Tp> struct _LIBCPP_VISIBLE hash<_Tp*> @@ -3965,7 +3965,7 @@ void declare_no_pointers(char* __p, size_t __n); void undeclare_no_pointers(char* __p, size_t __n); pointer_safety get_pointer_safety() _NOEXCEPT; -void* __undeclare_reachable(void*); +void* __undeclare_reachable(void* __p); template <class _Tp> inline _LIBCPP_INLINE_VISIBILITY @@ -3975,7 +3975,7 @@ return static_cast<_Tp*>(__undeclare_reachable(__p)); } -void* align(size_t, size_t, void*&, size_t&); +void* align(size_t __align, size_t __sz, void*& __ptr, size_t& __space); _LIBCPP_END_NAMESPACE_STD
diff --git a/include/new b/include/new index fac9f85..81c16bd 100644 --- a/include/new +++ b/include/new
@@ -89,23 +89,23 @@ } // std -_LIBCPP_VISIBLE void* operator new(std::size_t) +_LIBCPP_VISIBLE void* operator new(std::size_t __sz) #if !__has_feature(cxx_noexcept) throw(std::bad_alloc) #endif ; -_LIBCPP_VISIBLE void* operator new(std::size_t, const std::nothrow_t&) _NOEXCEPT; -_LIBCPP_VISIBLE void operator delete(void*) _NOEXCEPT; -_LIBCPP_VISIBLE void operator delete(void*, const std::nothrow_t&) _NOEXCEPT; +_LIBCPP_VISIBLE void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT; +_LIBCPP_VISIBLE void operator delete(void* __p) _NOEXCEPT; +_LIBCPP_VISIBLE void operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT; -_LIBCPP_VISIBLE void* operator new[](std::size_t) +_LIBCPP_VISIBLE void* operator new[](std::size_t __sz) #if !__has_feature(cxx_noexcept) throw(std::bad_alloc) #endif ; -_LIBCPP_VISIBLE void* operator new[](std::size_t, const std::nothrow_t&) _NOEXCEPT; -_LIBCPP_VISIBLE void operator delete[](void*) _NOEXCEPT; -_LIBCPP_VISIBLE void operator delete[](void*, const std::nothrow_t&) _NOEXCEPT; +_LIBCPP_VISIBLE void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT; +_LIBCPP_VISIBLE void operator delete[](void* __p) _NOEXCEPT; +_LIBCPP_VISIBLE void operator delete[](void* __p, const std::nothrow_t&) _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY inline void* operator new (std::size_t, void* __p) _NOEXCEPT {return __p;} _LIBCPP_INLINE_VISIBILITY inline void* operator new[](std::size_t, void* __p) _NOEXCEPT {return __p;}
diff --git a/include/regex b/include/regex index b8b4a28..c4c58a4 100644 --- a/include/regex +++ b/include/regex
@@ -2410,7 +2410,7 @@ } } -template <class, class> class __lookahead; +template <class _CharT, class _Traits> class __lookahead; template <class _CharT, class _Traits = regex_traits<_CharT> > class _LIBCPP_VISIBLE basic_regex
diff --git a/include/string b/include/string index f05fe36..249af09 100644 --- a/include/string +++ b/include/string
@@ -972,23 +972,24 @@ template<class _CharT, class _Traits, class _Allocator> basic_string<_CharT, _Traits, _Allocator> -operator+(const basic_string<_CharT, _Traits, _Allocator>&, const basic_string<_CharT, _Traits, _Allocator>&); +operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, + const basic_string<_CharT, _Traits, _Allocator>& __y); template<class _CharT, class _Traits, class _Allocator> basic_string<_CharT, _Traits, _Allocator> -operator+(const _CharT*, const basic_string<_CharT,_Traits,_Allocator>&); +operator+(const _CharT* __x, const basic_string<_CharT,_Traits,_Allocator>& __y); template<class _CharT, class _Traits, class _Allocator> basic_string<_CharT, _Traits, _Allocator> -operator+(_CharT, const basic_string<_CharT,_Traits,_Allocator>&); +operator+(_CharT __x, const basic_string<_CharT,_Traits,_Allocator>& __y); template<class _CharT, class _Traits, class _Allocator> basic_string<_CharT, _Traits, _Allocator> -operator+(const basic_string<_CharT, _Traits, _Allocator>&, const _CharT*); +operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, const _CharT* __y); template<class _CharT, class _Traits, class _Allocator> basic_string<_CharT, _Traits, _Allocator> -operator+(const basic_string<_CharT, _Traits, _Allocator>&, _CharT); +operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, _CharT __y); template <bool> class __basic_string_common
diff --git a/include/type_traits b/include/type_traits index e7bb1eb..5c7e46f 100644 --- a/include/type_traits +++ b/include/type_traits
@@ -1666,7 +1666,7 @@ // result_of -template <class> class result_of; +template <class _Callable> class result_of; template <class _Fn, bool, bool> class __result_of