summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2011-06-14 19:58:17 +0000
committerHoward Hinnant <hhinnant@apple.com>2011-06-14 19:58:17 +0000
commit2b1b2d40d71786272dfb2670cadc468c890e400c (patch)
tree494e6c94a7fd9dba1da794d247920a93c3b40177
parent8f5f2563aa2061dc7aafdceb170391163277bc89 (diff)
downloadexternal_libcxx-2b1b2d40d71786272dfb2670cadc468c890e400c.tar.gz
external_libcxx-2b1b2d40d71786272dfb2670cadc468c890e400c.tar.bz2
external_libcxx-2b1b2d40d71786272dfb2670cadc468c890e400c.zip
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
-rw-r--r--include/__hash_table17
-rw-r--r--include/__mutex_base4
-rw-r--r--include/__tree26
-rw-r--r--include/forward_list6
-rw-r--r--include/future12
-rw-r--r--include/list8
-rw-r--r--include/map8
-rw-r--r--include/memory6
-rw-r--r--include/new16
-rw-r--r--include/regex2
-rw-r--r--include/string11
-rw-r--r--include/type_traits2
12 files changed, 62 insertions, 56 deletions
diff --git a/include/__hash_table b/include/__hash_table
index 2e371a424..b185cde2f 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 @@ struct __hash_node
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 @@ private:
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 @@ public:
}
};
-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 3bc0b5baf..6f98d2e64 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 018d72909..676819b0b 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 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
}
}
-template <class> class __map_node_destructor;
+template <class _Allocator> class __map_node_destructor;
template <class _Allocator>
class __tree_node_destructor
@@ -606,8 +612,8 @@ public:
#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 aae3317c8..a3810f0d7 100644
--- a/include/forward_list
+++ b/include/forward_list
@@ -178,7 +178,7 @@ template <class T, class Allocator>
_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 @@ struct __forward_list_node
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 90eb6e4ca..e39ae4cf8 100644
--- a/include/future
+++ b/include/future
@@ -967,9 +967,8 @@ __async_assoc_state<void, _F>::__on_zero_shared() _NOEXCEPT
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 @@ class _LIBCPP_VISIBLE future
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 @@ class _LIBCPP_VISIBLE future<_R&>
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 @@ class _LIBCPP_VISIBLE future<void>
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 @@ swap(future<_R>& __x, future<_R>& __y)
// promise<R>
-template <class> class packaged_task;
+template <class _Callable> class packaged_task;
template <class _R>
class _LIBCPP_VISIBLE promise
@@ -1728,7 +1724,7 @@ __packaged_task_func<_F, _Alloc, _R(_ArgTypes...)>::operator()(_ArgTypes&& ... _
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 9d8fc726a..278f057db 100644
--- a/include/list
+++ b/include/list
@@ -180,7 +180,7 @@ template <class T, class Alloc>
_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 @@ struct __list_node
_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 c0bc78413..d675bc56b 100644
--- a/include/map
+++ b/include/map
@@ -524,9 +524,11 @@ public:
}
};
-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 67f9937cb..6f6a8ce3f 100644
--- a/include/memory
+++ b/include/memory
@@ -2507,7 +2507,7 @@ inline _LIBCPP_INLINE_VISIBILITY
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_reachable(void* __p);
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 @@ undeclare_reachable(_Tp* __p)
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 fac9f8530..81c16bdfc 100644
--- a/include/new
+++ b/include/new
@@ -89,23 +89,23 @@ _LIBCPP_VISIBLE new_handler get_new_handler() _NOEXCEPT;
} // 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 b8b4a285c..c4c58a4bb 100644
--- a/include/regex
+++ b/include/regex
@@ -2410,7 +2410,7 @@ __exit:
}
}
-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 f05fe367c..249af093c 100644
--- a/include/string
+++ b/include/string
@@ -972,23 +972,24 @@ char_traits<char32_t>::assign(char_type* __s, size_t __n, char_type __a)
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 e7bb1eb34..5c7e46f2e 100644
--- a/include/type_traits
+++ b/include/type_traits
@@ -1666,7 +1666,7 @@ struct __member_pointer_traits
// result_of
-template <class> class result_of;
+template <class _Callable> class result_of;
template <class _Fn, bool, bool>
class __result_of