visibility-decoration.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@114486 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/ext/hash_set b/include/ext/hash_set
index 098c073..83bf6b7 100644
--- a/include/ext/hash_set
+++ b/include/ext/hash_set
@@ -205,7 +205,7 @@
template <class _Value, class _Hash = std::hash<_Value>, class _Pred = equal_to<_Value>,
class _Alloc = allocator<_Value> >
-class hash_set
+class _LIBCPP_VISIBLE hash_set
{
public:
// types
@@ -231,6 +231,7 @@
typedef typename __table::const_iterator iterator;
typedef typename __table::const_iterator const_iterator;
+ _LIBCPP_INLINE_VISIBILITY
hash_set() {__table_.rehash(193);}
explicit hash_set(size_type __n, const hasher& __hf = hasher(),
const key_equal& __eql = key_equal());
@@ -248,47 +249,72 @@
const allocator_type& __a);
hash_set(const hash_set& __u);
+ _LIBCPP_INLINE_VISIBILITY
allocator_type get_allocator() const
{return allocator_type(__table_.__node_alloc());}
+ _LIBCPP_INLINE_VISIBILITY
bool empty() const {return __table_.size() == 0;}
+ _LIBCPP_INLINE_VISIBILITY
size_type size() const {return __table_.size();}
+ _LIBCPP_INLINE_VISIBILITY
size_type max_size() const {return __table_.max_size();}
+ _LIBCPP_INLINE_VISIBILITY
iterator begin() {return __table_.begin();}
+ _LIBCPP_INLINE_VISIBILITY
iterator end() {return __table_.end();}
+ _LIBCPP_INLINE_VISIBILITY
const_iterator begin() const {return __table_.begin();}
+ _LIBCPP_INLINE_VISIBILITY
const_iterator end() const {return __table_.end();}
+ _LIBCPP_INLINE_VISIBILITY
pair<iterator, bool> insert(const value_type& __x)
{return __table_.__insert_unique(__x);}
template <class _InputIterator>
void insert(_InputIterator __first, _InputIterator __last);
+ _LIBCPP_INLINE_VISIBILITY
void erase(const_iterator __p) {__table_.erase(__p);}
+ _LIBCPP_INLINE_VISIBILITY
size_type erase(const key_type& __k) {return __table_.__erase_unique(__k);}
+ _LIBCPP_INLINE_VISIBILITY
void erase(const_iterator __first, const_iterator __last)
{__table_.erase(__first, __last);}
+ _LIBCPP_INLINE_VISIBILITY
void clear() {__table_.clear();}
+ _LIBCPP_INLINE_VISIBILITY
void swap(hash_set& __u) {__table_.swap(__u.__table_);}
+ _LIBCPP_INLINE_VISIBILITY
hasher hash_funct() const {return __table_.hash_function();}
+ _LIBCPP_INLINE_VISIBILITY
key_equal key_eq() const {return __table_.key_eq();}
+ _LIBCPP_INLINE_VISIBILITY
iterator find(const key_type& __k) {return __table_.find(__k);}
+ _LIBCPP_INLINE_VISIBILITY
const_iterator find(const key_type& __k) const {return __table_.find(__k);}
+ _LIBCPP_INLINE_VISIBILITY
size_type count(const key_type& __k) const {return __table_.__count_unique(__k);}
+ _LIBCPP_INLINE_VISIBILITY
pair<iterator, iterator> equal_range(const key_type& __k)
{return __table_.__equal_range_unique(__k);}
+ _LIBCPP_INLINE_VISIBILITY
pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
{return __table_.__equal_range_unique(__k);}
+ _LIBCPP_INLINE_VISIBILITY
size_type bucket_count() const {return __table_.bucket_count();}
+ _LIBCPP_INLINE_VISIBILITY
size_type max_bucket_count() const {return __table_.max_bucket_count();}
+ _LIBCPP_INLINE_VISIBILITY
size_type elems_in_bucket(size_type __n) const {return __table_.bucket_size(__n);}
+ _LIBCPP_INLINE_VISIBILITY
void resize(size_type __n) {__table_.rehash(__n);}
};
@@ -350,7 +376,7 @@
template <class _Value, class _Hash, class _Pred, class _Alloc>
template <class _InputIterator>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
void
hash_set<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
_InputIterator __last)
@@ -360,7 +386,7 @@
}
template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
void
swap(hash_set<_Value, _Hash, _Pred, _Alloc>& __x,
hash_set<_Value, _Hash, _Pred, _Alloc>& __y)
@@ -388,7 +414,7 @@
}
template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const hash_set<_Value, _Hash, _Pred, _Alloc>& __x,
const hash_set<_Value, _Hash, _Pred, _Alloc>& __y)
@@ -398,7 +424,7 @@
template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
class _Alloc = allocator<_Value> >
-class hash_multiset
+class _LIBCPP_VISIBLE hash_multiset
{
public:
// types
@@ -424,6 +450,7 @@
typedef typename __table::const_iterator iterator;
typedef typename __table::const_iterator const_iterator;
+ _LIBCPP_INLINE_VISIBILITY
hash_multiset() {__table_.rehash(193);}
explicit hash_multiset(size_type __n, const hasher& __hf = hasher(),
const key_equal& __eql = key_equal());
@@ -441,46 +468,71 @@
const key_equal& __eql, const allocator_type& __a);
hash_multiset(const hash_multiset& __u);
+ _LIBCPP_INLINE_VISIBILITY
allocator_type get_allocator() const
{return allocator_type(__table_.__node_alloc());}
+ _LIBCPP_INLINE_VISIBILITY
bool empty() const {return __table_.size() == 0;}
+ _LIBCPP_INLINE_VISIBILITY
size_type size() const {return __table_.size();}
+ _LIBCPP_INLINE_VISIBILITY
size_type max_size() const {return __table_.max_size();}
+ _LIBCPP_INLINE_VISIBILITY
iterator begin() {return __table_.begin();}
+ _LIBCPP_INLINE_VISIBILITY
iterator end() {return __table_.end();}
+ _LIBCPP_INLINE_VISIBILITY
const_iterator begin() const {return __table_.begin();}
+ _LIBCPP_INLINE_VISIBILITY
const_iterator end() const {return __table_.end();}
+ _LIBCPP_INLINE_VISIBILITY
iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
template <class _InputIterator>
void insert(_InputIterator __first, _InputIterator __last);
+ _LIBCPP_INLINE_VISIBILITY
void erase(const_iterator __p) {__table_.erase(__p);}
+ _LIBCPP_INLINE_VISIBILITY
size_type erase(const key_type& __k) {return __table_.__erase_multi(__k);}
+ _LIBCPP_INLINE_VISIBILITY
void erase(const_iterator __first, const_iterator __last)
{__table_.erase(__first, __last);}
+ _LIBCPP_INLINE_VISIBILITY
void clear() {__table_.clear();}
+ _LIBCPP_INLINE_VISIBILITY
void swap(hash_multiset& __u) {__table_.swap(__u.__table_);}
+ _LIBCPP_INLINE_VISIBILITY
hasher hash_funct() const {return __table_.hash_function();}
+ _LIBCPP_INLINE_VISIBILITY
key_equal key_eq() const {return __table_.key_eq();}
+ _LIBCPP_INLINE_VISIBILITY
iterator find(const key_type& __k) {return __table_.find(__k);}
+ _LIBCPP_INLINE_VISIBILITY
const_iterator find(const key_type& __k) const {return __table_.find(__k);}
+ _LIBCPP_INLINE_VISIBILITY
size_type count(const key_type& __k) const {return __table_.__count_multi(__k);}
+ _LIBCPP_INLINE_VISIBILITY
pair<iterator, iterator> equal_range(const key_type& __k)
{return __table_.__equal_range_multi(__k);}
+ _LIBCPP_INLINE_VISIBILITY
pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
{return __table_.__equal_range_multi(__k);}
+ _LIBCPP_INLINE_VISIBILITY
size_type bucket_count() const {return __table_.bucket_count();}
+ _LIBCPP_INLINE_VISIBILITY
size_type max_bucket_count() const {return __table_.max_bucket_count();}
+ _LIBCPP_INLINE_VISIBILITY
size_type elems_in_bucket(size_type __n) const {return __table_.bucket_size(__n);}
+ _LIBCPP_INLINE_VISIBILITY
void resize(size_type __n) {__table_.rehash(__n);}
};
@@ -543,7 +595,7 @@
template <class _Value, class _Hash, class _Pred, class _Alloc>
template <class _InputIterator>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
void
hash_multiset<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
_InputIterator __last)
@@ -553,7 +605,7 @@
}
template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
void
swap(hash_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
hash_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
@@ -585,7 +637,7 @@
}
template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline
+inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const hash_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
const hash_multiset<_Value, _Hash, _Pred, _Alloc>& __y)