[cfe-commits] [libcxx] r133008 - in /libcxx/trunk/include: __hash_table __mutex_base __tree forward_list future list map memory new regex string type_traits
Howard Hinnant
hhinnant at apple.com
Tue Jun 14 12:58:17 PDT 2011
Author: hhinnant
Date: Tue Jun 14 14:58:17 2011
New Revision: 133008
URL: http://llvm.org/viewvc/llvm-project?rev=133008&view=rev
Log:
Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools.
Modified:
libcxx/trunk/include/__hash_table
libcxx/trunk/include/__mutex_base
libcxx/trunk/include/__tree
libcxx/trunk/include/forward_list
libcxx/trunk/include/future
libcxx/trunk/include/list
libcxx/trunk/include/map
libcxx/trunk/include/memory
libcxx/trunk/include/new
libcxx/trunk/include/regex
libcxx/trunk/include/string
libcxx/trunk/include/type_traits
Modified: libcxx/trunk/include/__hash_table
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__hash_table?rev=133008&r1=133007&r2=133008&view=diff
==============================================================================
--- libcxx/trunk/include/__hash_table (original)
+++ libcxx/trunk/include/__hash_table Tue Jun 14 14:58:17 2011
@@ -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
Modified: libcxx/trunk/include/__mutex_base
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__mutex_base?rev=133008&r1=133007&r2=133008&view=diff
==============================================================================
--- libcxx/trunk/include/__mutex_base (original)
+++ libcxx/trunk/include/__mutex_base Tue Jun 14 14:58:17 2011
@@ -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
Modified: libcxx/trunk/include/__tree
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__tree?rev=133008&r1=133007&r2=133008&view=diff
==============================================================================
--- libcxx/trunk/include/__tree (original)
+++ libcxx/trunk/include/__tree Tue Jun 14 14:58:17 2011
@@ -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
Modified: libcxx/trunk/include/forward_list
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/forward_list?rev=133008&r1=133007&r2=133008&view=diff
==============================================================================
--- libcxx/trunk/include/forward_list (original)
+++ libcxx/trunk/include/forward_list Tue Jun 14 14:58:17 2011
@@ -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
Modified: libcxx/trunk/include/future
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/future?rev=133008&r1=133007&r2=133008&view=diff
==============================================================================
--- libcxx/trunk/include/future (original)
+++ libcxx/trunk/include/future Tue Jun 14 14:58:17 2011
@@ -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...)>
Modified: libcxx/trunk/include/list
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/list?rev=133008&r1=133007&r2=133008&view=diff
==============================================================================
--- libcxx/trunk/include/list (original)
+++ libcxx/trunk/include/list Tue Jun 14 14:58:17 2011
@@ -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
Modified: libcxx/trunk/include/map
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/map?rev=133008&r1=133007&r2=133008&view=diff
==============================================================================
--- libcxx/trunk/include/map (original)
+++ libcxx/trunk/include/map Tue Jun 14 14:58:17 2011
@@ -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
Modified: libcxx/trunk/include/memory
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/memory?rev=133008&r1=133007&r2=133008&view=diff
==============================================================================
--- libcxx/trunk/include/memory (original)
+++ libcxx/trunk/include/memory Tue Jun 14 14:58:17 2011
@@ -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
Modified: libcxx/trunk/include/new
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/new?rev=133008&r1=133007&r2=133008&view=diff
==============================================================================
--- libcxx/trunk/include/new (original)
+++ libcxx/trunk/include/new Tue Jun 14 14:58:17 2011
@@ -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;}
Modified: libcxx/trunk/include/regex
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/regex?rev=133008&r1=133007&r2=133008&view=diff
==============================================================================
--- libcxx/trunk/include/regex (original)
+++ libcxx/trunk/include/regex Tue Jun 14 14:58:17 2011
@@ -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
Modified: libcxx/trunk/include/string
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=133008&r1=133007&r2=133008&view=diff
==============================================================================
--- libcxx/trunk/include/string (original)
+++ libcxx/trunk/include/string Tue Jun 14 14:58:17 2011
@@ -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
Modified: libcxx/trunk/include/type_traits
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/type_traits?rev=133008&r1=133007&r2=133008&view=diff
==============================================================================
--- libcxx/trunk/include/type_traits (original)
+++ libcxx/trunk/include/type_traits Tue Jun 14 14:58:17 2011
@@ -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
More information about the cfe-commits
mailing list