Compare commits
34 Commits
svn-tags/l
...
svn-tags/l
Author | SHA1 | Date | |
---|---|---|---|
![]() |
fefdbf94f9 | ||
![]() |
c7e4d82bc0 | ||
![]() |
36cdf027d2 | ||
![]() |
cb2deb2652 | ||
![]() |
e764f0b648 | ||
![]() |
745d473ac1 | ||
![]() |
27031115bf | ||
![]() |
99ad765261 | ||
![]() |
954b366317 | ||
![]() |
aad0db393f | ||
![]() |
87eea6d801 | ||
![]() |
bb73d762b2 | ||
![]() |
6fd2e09b36 | ||
![]() |
2fd6d25bf1 | ||
![]() |
1387038988 | ||
![]() |
f6547cbf61 | ||
![]() |
3991b553df | ||
![]() |
a2ccccce89 | ||
![]() |
9c2683d77c | ||
![]() |
e3e488eb61 | ||
![]() |
b02310e487 | ||
![]() |
bfd5530c06 | ||
![]() |
73d21a4f07 | ||
![]() |
04acacadca | ||
![]() |
171a9a7cc3 | ||
![]() |
e6e4d01553 | ||
![]() |
99be8237db | ||
![]() |
ae153b9855 | ||
![]() |
54da338f59 | ||
![]() |
7158e5c38b | ||
![]() |
f39daa8e5a | ||
![]() |
47499b162a | ||
![]() |
98ccdeca3b | ||
![]() |
a652172d86 |
2
Makefile
2
Makefile
@@ -12,7 +12,7 @@ export TRIPLE=-apple-
|
||||
installsrc:: $(SRCROOT)
|
||||
|
||||
ditto $(SRCDIRS)/include $(SRCROOT)/include
|
||||
ditto $(SRCDIRS)/lib/buildit $(SRCROOT)/lib/buildit
|
||||
ditto $(SRCDIRS)/lib $(SRCROOT)/lib
|
||||
ditto $(SRCDIRS)/src $(SRCROOT)/src
|
||||
ditto $(SRCDIRS)/Makefile $(SRCROOT)/Makefile
|
||||
|
||||
|
@@ -86,6 +86,13 @@
|
||||
|
||||
#if defined(__clang__)
|
||||
|
||||
#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
||||
|
||||
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
||||
#define _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_exceptions))
|
||||
#define _LIBCPP_NO_EXCEPTIONS
|
||||
#endif
|
||||
@@ -94,48 +101,65 @@
|
||||
#define _LIBCPP_NO_RTTI
|
||||
#endif
|
||||
|
||||
#define _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
#define _LIBCPP_HAS_NO_STRONG_USING
|
||||
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
||||
|
||||
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
||||
|
||||
#define _LIBCPP_HAS_NO_DECLTYPE
|
||||
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
|
||||
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
||||
#define _LIBCPP_HAS_NO_NULLPTR
|
||||
#define _LIBCPP_HAS_NO_STATIC_ASSERT
|
||||
#define _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
#define _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
#else // __GXX_EXPERIMENTAL_CXX0X__
|
||||
|
||||
#if __has_feature(cxx_rvalue_references)
|
||||
#define _LIBCPP_MOVE
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_decltype))
|
||||
#define _LIBCPP_HAS_NO_DECLTYPE
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_attributes))
|
||||
#define _LIBCPP_HAS_NO_ATTRIBUTES
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_deleted_functions))
|
||||
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
|
||||
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
||||
#endif // !(__has_feature(cxx_deleted_functions))
|
||||
|
||||
#if !(__has_feature(cxx_lambdas))
|
||||
#define _LIBCPP_HAS_NO_LAMBDAS
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_nullptr))
|
||||
#define _LIBCPP_HAS_NO_NULLPTR
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_rvalue_references))
|
||||
#define _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_static_assert))
|
||||
#define _LIBCPP_HAS_NO_STATIC_ASSERT
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_auto_type))
|
||||
#define _LIBCPP_HAS_NO_AUTO_TYPE
|
||||
#endif
|
||||
|
||||
#if !(__has_feature(cxx_variadic_templates))
|
||||
#define _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif
|
||||
|
||||
#endif // __GXX_EXPERIMENTAL_CXX0X__
|
||||
#if __has_feature(cxx_inline_namespaces)
|
||||
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {inline namespace _LIBCPP_NAMESPACE {
|
||||
#define _LIBCPP_END_NAMESPACE_STD } }
|
||||
#define _STD std::_LIBCPP_NAMESPACE
|
||||
|
||||
namespace std {
|
||||
inline namespace _LIBCPP_NAMESPACE {
|
||||
}
|
||||
using namespace _LIBCPP_NAMESPACE;
|
||||
}
|
||||
|
||||
#else // __has_feature(cxx_inline_namespaces)
|
||||
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {
|
||||
#define _LIBCPP_END_NAMESPACE_STD }
|
||||
#define _STD std
|
||||
#endif // __has_feature(cxx_inline_namespaces)
|
||||
|
||||
#if !(__has_feature(cxx_constexpr))
|
||||
#define _LIBCPP_HAS_NO_CONSTEXPR
|
||||
#endif
|
||||
|
||||
// end defined(__clang__)
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
|
||||
@@ -144,6 +168,7 @@
|
||||
#endif
|
||||
|
||||
#define _LIBCPP_HAS_NO_TEMPLATE_ALIASES
|
||||
#define _LIBCPP_HAS_NO_CONSTEXPR
|
||||
|
||||
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
||||
|
||||
@@ -155,11 +180,12 @@
|
||||
#define _LIBCPP_HAS_NO_STATIC_ASSERT
|
||||
#define _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
#define _LIBCPP_HAS_NO_VARIADICS
|
||||
#define _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#else // __GXX_EXPERIMENTAL_CXX0X__
|
||||
|
||||
#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 3
|
||||
#define _LIBCPP_MOVE
|
||||
#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3)
|
||||
#define _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
|
||||
#if !(__GNUC__ >= 4 && __GNUC_MINOR__ >= 3)
|
||||
@@ -181,13 +207,6 @@
|
||||
|
||||
#endif // __GXX_EXPERIMENTAL_CXX0X__
|
||||
|
||||
#endif // defined(__GNUC__)
|
||||
|
||||
#ifdef _LIBCPP_HAS_NO_STRONG_USING
|
||||
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std {
|
||||
#define _LIBCPP_END_NAMESPACE_STD }
|
||||
#define _STD std
|
||||
#else // _LIBCPP_HAS_NO_STRONG_USING
|
||||
#define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { namespace _LIBCPP_NAMESPACE {
|
||||
#define _LIBCPP_END_NAMESPACE_STD } }
|
||||
#define _STD std::_LIBCPP_NAMESPACE
|
||||
@@ -198,7 +217,7 @@ namespace _LIBCPP_NAMESPACE {
|
||||
using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_STRONG_USING
|
||||
#endif // defined(__GNUC__)
|
||||
|
||||
#ifdef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
typedef unsigned short char16_t;
|
||||
@@ -220,4 +239,8 @@ template <unsigned> struct __static_assert_check {};
|
||||
#define decltype(x) __typeof__(x)
|
||||
#endif
|
||||
|
||||
#ifdef _LIBCPP_HAS_NO_CONSTEXPR
|
||||
#define constexpr const
|
||||
#endif
|
||||
|
||||
#endif // _LIBCPP_CONFIG
|
||||
|
@@ -457,7 +457,7 @@ private:
|
||||
public:
|
||||
// construct/copy/destroy
|
||||
_LIBCPP_INLINE_VISIBILITY reference_wrapper(type& __f) : __f_(&__f) {}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
private: reference_wrapper(type&&); public: // = delete; // do not bind to temps
|
||||
#endif
|
||||
|
||||
@@ -511,10 +511,20 @@ cref(reference_wrapper<_Tp> __t)
|
||||
return cref(__t.get());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
template <class _Tp> void ref(const _Tp&& __t);// = delete; // LWG 688
|
||||
template <class _Tp> void cref(const _Tp&& __t);// = delete; // LWG 688
|
||||
#endif // _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
||||
|
||||
template <class _Tp> void ref(const _Tp&& __t) = delete;
|
||||
template <class _Tp> void cref(const _Tp&& __t) = delete;
|
||||
|
||||
#else // _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
||||
|
||||
template <class _Tp> void ref(const _Tp&& __t);// = delete;
|
||||
template <class _Tp> void cref(const _Tp&& __t);// = delete;
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
|
@@ -346,7 +346,7 @@ public:
|
||||
__bucket_list_deallocator(const allocator_type& __a, size_type __size)
|
||||
: __data_(__size, __a) {}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
__bucket_list_deallocator(__bucket_list_deallocator&& __x)
|
||||
: __data_(_STD::move(__x.__data_))
|
||||
@@ -354,7 +354,7 @@ public:
|
||||
__x.size() = 0;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
size_type& size() {return __data_.first();}
|
||||
size_type size() const {return __data_.first();}
|
||||
@@ -486,14 +486,14 @@ public:
|
||||
explicit __hash_table(const allocator_type& __a);
|
||||
__hash_table(const __hash_table& __u);
|
||||
__hash_table(const __hash_table& __u, const allocator_type& __a);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__hash_table(__hash_table&& __u);
|
||||
__hash_table(__hash_table&& __u, const allocator_type& __a);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
~__hash_table();
|
||||
|
||||
__hash_table& operator=(const __hash_table& __u);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__hash_table& operator=(__hash_table&& __u);
|
||||
#endif
|
||||
template <class _InputIterator>
|
||||
@@ -512,31 +512,31 @@ public:
|
||||
iterator __node_insert_multi(const_iterator __p,
|
||||
__node_pointer __nd);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
template <class... _Args>
|
||||
pair<iterator, bool> __emplace_unique(_Args&&... __args);
|
||||
template <class... _Args>
|
||||
iterator __emplace_multi(_Args&&... __args);
|
||||
template <class... _Args>
|
||||
iterator __emplace_hint_multi(const_iterator __p, _Args&&... __args);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
|
||||
pair<iterator, bool> __insert_unique(const value_type& __x);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _P>
|
||||
pair<iterator, bool> __insert_unique(_P&& __x);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _P>
|
||||
iterator __insert_multi(_P&& __x);
|
||||
template <class _P>
|
||||
iterator __insert_multi(const_iterator __p, _P&& __x);
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator __insert_multi(const value_type& __x);
|
||||
iterator __insert_multi(const_iterator __p, const value_type& __x);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void clear();
|
||||
void rehash(size_type __n);
|
||||
@@ -615,11 +615,13 @@ public:
|
||||
private:
|
||||
void __rehash(size_type __n);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class ..._Args>
|
||||
__node_holder __construct_node(_Args&& ...__args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
__node_holder __construct_node(value_type&& __v, size_t __hash);
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__node_holder __construct_node(const value_type& __v);
|
||||
#endif
|
||||
__node_holder __construct_node(const value_type& __v, size_t __hash);
|
||||
@@ -734,7 +736,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(const __hash_table& __u,
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u)
|
||||
@@ -777,7 +779,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u,
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
__hash_table<_Tp, _Hash, _Equal, _Alloc>::~__hash_table()
|
||||
@@ -842,7 +844,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__detach()
|
||||
return __cache;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
void
|
||||
@@ -926,7 +928,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(__hash_table&& __u)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
template <class _InputIterator>
|
||||
@@ -1245,7 +1247,8 @@ __done:
|
||||
return pair<iterator, bool>(iterator(__nd), __inserted);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
template <class... _Args>
|
||||
@@ -1282,6 +1285,8 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_hint_multi(
|
||||
return __r;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
template <class _P>
|
||||
pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool>
|
||||
@@ -1294,9 +1299,9 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_unique(_P&& __x)
|
||||
return __r;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
template <class _P>
|
||||
@@ -1321,7 +1326,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_multi(const_iterator __p,
|
||||
return __r;
|
||||
}
|
||||
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
|
||||
@@ -1344,7 +1349,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__insert_multi(const_iterator __p,
|
||||
return __r;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
void
|
||||
@@ -1468,7 +1473,8 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::find(const _Key& __k) const
|
||||
return end();
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
template <class ..._Args>
|
||||
@@ -1484,6 +1490,8 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(_Args&& ...__args)
|
||||
return __h;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
|
||||
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(value_type&& __v,
|
||||
@@ -1498,7 +1506,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(value_type&& __v,
|
||||
return _STD::move(__h);
|
||||
}
|
||||
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
|
||||
@@ -1513,7 +1521,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(const value_type& __v
|
||||
return _STD::move(__h);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
||||
typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_holder
|
||||
|
@@ -115,7 +115,7 @@ private:
|
||||
unique_lock& operator=(unique_lock const&); // = delete;
|
||||
|
||||
public:
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unique_lock(unique_lock&& __u)
|
||||
: __m_(__u.__m_), __owns_(__u.__owns_)
|
||||
{__u.__m_ = nullptr; __u.__owns_ = false;}
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
__u.__owns_ = false;
|
||||
return *this;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void lock();
|
||||
bool try_lock();
|
||||
|
@@ -58,11 +58,11 @@ public:
|
||||
__split_buffer(size_type __cap, size_type __start, __alloc_rr& __a);
|
||||
~__split_buffer();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__split_buffer(__split_buffer&& __c);
|
||||
__split_buffer(__split_buffer&& __c, const __alloc_rr& __a);
|
||||
__split_buffer& operator=(__split_buffer&& __c);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY iterator begin() {return __begin_;}
|
||||
_LIBCPP_INLINE_VISIBILITY const_iterator begin() const {return __begin_;}
|
||||
@@ -85,12 +85,12 @@ public:
|
||||
void shrink_to_fit();
|
||||
void push_front(const_reference __x);
|
||||
void push_back(const_reference __x);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void push_front(value_type&& __x);
|
||||
void push_back(value_type&& __x);
|
||||
template <class... _Args>
|
||||
void emplace_back(_Args&&... __args);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY void pop_front() {__destruct_at_begin(__begin_+1);}
|
||||
_LIBCPP_INLINE_VISIBILITY void pop_back() {__destruct_at_end(__end_-1);}
|
||||
@@ -367,7 +367,7 @@ __split_buffer<_Tp, _Allocator>::~__split_buffer()
|
||||
__alloc_traits::deallocate(__alloc(), __first_, capacity());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
__split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c)
|
||||
@@ -425,7 +425,7 @@ __split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
@@ -510,7 +510,7 @@ __split_buffer<_Tp, _Allocator>::push_front(const_reference __x)
|
||||
--__begin_;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
@@ -542,7 +542,7 @@ __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x)
|
||||
--__begin_;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
@@ -574,7 +574,7 @@ __split_buffer<_Tp, _Allocator>::push_back(const_reference __x)
|
||||
++__end_;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
@@ -606,6 +606,8 @@ __split_buffer<_Tp, _Allocator>::push_back(value_type&& __x)
|
||||
++__end_;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class... _Args>
|
||||
void
|
||||
@@ -637,7 +639,9 @@ __split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args)
|
||||
++__end_;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
@@ -589,14 +589,14 @@ public:
|
||||
|
||||
value_type __value_;
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
template <class ..._Args>
|
||||
explicit __tree_node(_Args&& ...__args)
|
||||
: __value_(_STD::forward<_Args>(__args)...) {}
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
explicit __tree_node(const value_type& __v)
|
||||
: __value_(__v) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
};
|
||||
|
||||
template <class> class __map_iterator;
|
||||
@@ -827,11 +827,11 @@ public:
|
||||
void __assign_unique(_InputIterator __first, _InputIterator __last);
|
||||
template <class _InputIterator>
|
||||
void __assign_multi(_InputIterator __first, _InputIterator __last);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__tree(__tree&& __t);
|
||||
__tree(__tree&& __t, const allocator_type& __a);
|
||||
__tree& operator=(__tree&& __t);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
~__tree();
|
||||
|
||||
@@ -846,7 +846,8 @@ public:
|
||||
|
||||
void swap(__tree& __t);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args>
|
||||
pair<iterator, bool>
|
||||
__emplace_unique(_Args&&... __args);
|
||||
@@ -860,6 +861,7 @@ public:
|
||||
template <class... _Args>
|
||||
iterator
|
||||
__emplace_hint_multi(const_iterator __p, _Args&&... __args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _V>
|
||||
pair<iterator, bool> __insert_unique(_V&& __v);
|
||||
@@ -869,13 +871,13 @@ public:
|
||||
iterator __insert_multi(_V&& __v);
|
||||
template <class _V>
|
||||
iterator __insert_multi(const_iterator __p, _V&& __v);
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
pair<iterator, bool> __insert_unique(const value_type& __v);
|
||||
iterator __insert_unique(const_iterator __p, const value_type& __v);
|
||||
iterator __insert_multi(const value_type& __v);
|
||||
iterator __insert_multi(const_iterator __p, const value_type& __v);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
pair<iterator, bool> __node_insert_unique(__node_pointer __nd);
|
||||
iterator __node_insert_unique(const_iterator __p,
|
||||
@@ -967,10 +969,10 @@ private:
|
||||
__find_equal(const_iterator __hint, typename __node::base::pointer& __parent,
|
||||
const _Key& __v);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
template <class ..._Args>
|
||||
__node_holder __construct_node(_Args&& ...__args);
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
__node_holder __construct_node(const value_type& __v);
|
||||
#endif
|
||||
|
||||
@@ -1182,7 +1184,7 @@ __tree<_Tp, _Compare, _Allocator>::__tree(const __tree& __t)
|
||||
__begin_node() = __end_node();
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Compare, class _Allocator>
|
||||
__tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t)
|
||||
@@ -1302,7 +1304,7 @@ __tree<_Tp, _Compare, _Allocator>::operator=(__tree&& __t)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Compare, class _Allocator>
|
||||
__tree<_Tp, _Compare, _Allocator>::~__tree()
|
||||
@@ -1591,7 +1593,8 @@ __tree<_Tp, _Compare, _Allocator>::__insert_node_at(__node_base_pointer __parent
|
||||
++size();
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Compare, class _Allocator>
|
||||
template <class ..._Args>
|
||||
@@ -1666,6 +1669,8 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_hint_multi(const_iterator __p,
|
||||
return iterator(static_cast<__node_pointer>(__h.release()));
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Compare, class _Allocator>
|
||||
template <class _V>
|
||||
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
|
||||
@@ -1726,7 +1731,7 @@ __tree<_Tp, _Compare, _Allocator>::__insert_multi(const_iterator __p, _V&& __v)
|
||||
return iterator(__h.release());
|
||||
}
|
||||
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Compare, class _Allocator>
|
||||
typename __tree<_Tp, _Compare, _Allocator>::__node_holder
|
||||
@@ -1795,7 +1800,7 @@ __tree<_Tp, _Compare, _Allocator>::__insert_multi(const_iterator __p, const valu
|
||||
return iterator(__h.release());
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Compare, class _Allocator>
|
||||
pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
|
||||
|
@@ -2693,7 +2693,7 @@ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
|
||||
template <class _RandomAccessIterator, class _RandomNumberGenerator>
|
||||
void
|
||||
random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_RandomNumberGenerator&& __rand)
|
||||
#else
|
||||
_RandomNumberGenerator& __rand)
|
||||
|
@@ -61,6 +61,8 @@ public:
|
||||
native_handle_type native_handle();
|
||||
};
|
||||
|
||||
void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
|
||||
|
||||
class condition_variable_any
|
||||
{
|
||||
public:
|
||||
@@ -244,6 +246,8 @@ condition_variable_any::wait_for(_Lock& __lock,
|
||||
_STD::move(__pred));
|
||||
}
|
||||
|
||||
void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
#endif // _LIBCPP_CONDITION_VARIABLE
|
||||
|
@@ -930,12 +930,12 @@ protected:
|
||||
explicit __deque_base(const allocator_type& __a);
|
||||
~__deque_base();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
__deque_base(__deque_base&& __c);
|
||||
__deque_base(__deque_base&& __c, const allocator_type& __a);
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void swap(__deque_base& __c);
|
||||
void clear();
|
||||
|
||||
@@ -1059,7 +1059,7 @@ __deque_base<_Tp, _Allocator>::~__deque_base()
|
||||
__alloc_traits::deallocate(__alloc(), *__i, __block_size);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
__deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c)
|
||||
@@ -1090,7 +1090,7 @@ __deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c, const allocator_
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
@@ -1171,11 +1171,11 @@ public:
|
||||
deque& operator=(const deque& __c);
|
||||
deque& operator=(initializer_list<value_type> __il) {assign(__il); return *this;}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
deque(deque&& __c);
|
||||
deque(deque&& __c, const allocator_type& __a);
|
||||
deque& operator=(deque&& __c);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _InputIter>
|
||||
void assign(_InputIter __f, _InputIter __l,
|
||||
@@ -1227,14 +1227,16 @@ public:
|
||||
// 23.2.2.3 modifiers:
|
||||
void push_front(const value_type& __v);
|
||||
void push_back(const value_type& __v);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args> void emplace_front(_Args&&... __args);
|
||||
template <class... _Args> void emplace_back(_Args&&... __args);
|
||||
template <class... _Args> iterator emplace(const_iterator __p, _Args&&... __args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
void push_front(value_type&& __v);
|
||||
void push_back(value_type&& __v);
|
||||
iterator insert(const_iterator __p, value_type&& __v);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator insert(const_iterator __p, const value_type& __v);
|
||||
iterator insert(const_iterator __p, size_type __n, const value_type& __v);
|
||||
template <class _InputIter>
|
||||
@@ -1396,7 +1398,7 @@ deque<_Tp, _Allocator>::operator=(const deque& __c)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
inline
|
||||
@@ -1449,7 +1451,7 @@ deque<_Tp, _Allocator>::__move_assign(deque& __c, true_type)
|
||||
__base::__move_assign(__c);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class _InputIter>
|
||||
@@ -1645,7 +1647,7 @@ deque<_Tp, _Allocator>::push_back(const value_type& __v)
|
||||
++__base::size();
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
@@ -1659,6 +1661,8 @@ deque<_Tp, _Allocator>::push_back(value_type&& __v)
|
||||
++__base::size();
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class... _Args>
|
||||
void
|
||||
@@ -1672,7 +1676,8 @@ deque<_Tp, _Allocator>::emplace_back(_Args&&... __args)
|
||||
++__base::size();
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
@@ -1687,7 +1692,7 @@ deque<_Tp, _Allocator>::push_front(const value_type& __v)
|
||||
++__base::size();
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
@@ -1702,6 +1707,8 @@ deque<_Tp, _Allocator>::push_front(value_type&& __v)
|
||||
++__base::size();
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class... _Args>
|
||||
void
|
||||
@@ -1716,7 +1723,8 @@ deque<_Tp, _Allocator>::emplace_front(_Args&&... __args)
|
||||
++__base::size();
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
typename deque<_Tp, _Allocator>::iterator
|
||||
@@ -1779,7 +1787,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
|
||||
return __base::begin() + __pos;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
typename deque<_Tp, _Allocator>::iterator
|
||||
@@ -1836,6 +1844,8 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
|
||||
return __base::begin() + __pos;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class... _Args>
|
||||
typename deque<_Tp, _Allocator>::iterator
|
||||
@@ -1892,7 +1902,8 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
|
||||
return __base::begin() + __pos;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
typename deque<_Tp, _Allocator>::iterator
|
||||
|
@@ -179,16 +179,16 @@ struct __nested
|
||||
|
||||
template <class _Tp>
|
||||
void
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
throw_with_nested /*[[noreturn]]*/ (_Tp&& __t, typename enable_if<
|
||||
is_class<typename remove_reference<_Tp>::type>::value &&
|
||||
!is_base_of<nested_exception, typename remove_reference<_Tp>::type>::value
|
||||
>::type* = 0)
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
throw_with_nested (_Tp& __t, typename enable_if<
|
||||
is_class<_Tp>::value && !is_base_of<nested_exception, _Tp>::value
|
||||
>::type* = 0)
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw __nested<typename remove_reference<_Tp>::type>(_STD::forward<_Tp>(__t));
|
||||
@@ -197,16 +197,16 @@ throw_with_nested (_Tp& __t, typename enable_if<
|
||||
|
||||
template <class _Tp>
|
||||
void
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
throw_with_nested /*[[noreturn]]*/ (_Tp&& __t, typename enable_if<
|
||||
!is_class<typename remove_reference<_Tp>::type>::value ||
|
||||
is_base_of<nested_exception, typename remove_reference<_Tp>::type>::value
|
||||
>::type* = 0)
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
throw_with_nested (_Tp& __t, typename enable_if<
|
||||
!is_class<_Tp>::value || is_base_of<nested_exception, _Tp>::value
|
||||
>::type* = 0)
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
throw _STD::forward<_Tp>(__t);
|
||||
|
@@ -304,7 +304,7 @@ public:
|
||||
__second_constructed(false)
|
||||
{}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__hash_map_node_destructor(__hash_node_destructor<allocator_type>&& __x)
|
||||
: __na_(__x.__na_),
|
||||
__first_constructed(__x.__value_constructed),
|
||||
@@ -312,7 +312,7 @@ public:
|
||||
{
|
||||
__x.__value_constructed = false;
|
||||
}
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__hash_map_node_destructor(const __hash_node_destructor<allocator_type>& __x)
|
||||
: __na_(__x.__na_),
|
||||
__first_constructed(__x.__value_constructed),
|
||||
@@ -320,7 +320,7 @@ public:
|
||||
{
|
||||
const_cast<bool&>(__x.__value_constructed) = false;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void operator()(pointer __p)
|
||||
{
|
||||
|
@@ -355,10 +355,10 @@ protected:
|
||||
__forward_list_base(const allocator_type& __a)
|
||||
: __before_begin_(__begin_node(), __node_allocator(__a)) {}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__forward_list_base(__forward_list_base&& __x);
|
||||
__forward_list_base(__forward_list_base&& __x, const allocator_type& __a);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
private:
|
||||
__forward_list_base(const __forward_list_base&);
|
||||
@@ -405,7 +405,7 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
inline
|
||||
@@ -428,7 +428,7 @@ __forward_list_base<_Tp, _Alloc>::__forward_list_base(__forward_list_base&& __x,
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
__forward_list_base<_Tp, _Alloc>::~__forward_list_base()
|
||||
@@ -498,17 +498,17 @@ public:
|
||||
>::type* = nullptr);
|
||||
forward_list(const forward_list& __x);
|
||||
forward_list(const forward_list& __x, const allocator_type& __a);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
forward_list(forward_list&& __x) : base(_STD::move(__x)) {}
|
||||
forward_list(forward_list&& __x, const allocator_type& __a);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
forward_list(initializer_list<value_type> __il);
|
||||
forward_list(initializer_list<value_type> __il, const allocator_type& __a);
|
||||
|
||||
// ~forward_list() = default;
|
||||
|
||||
forward_list& operator=(const forward_list& __x);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
forward_list& operator=(forward_list&& __x);
|
||||
#endif
|
||||
forward_list& operator=(initializer_list<value_type> __il);
|
||||
@@ -543,19 +543,23 @@ public:
|
||||
reference front() {return base::__before_begin()->__next_->__value_;}
|
||||
const_reference front() const {return base::__before_begin()->__next_->__value_;}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args> void emplace_front(_Args&&... __args);
|
||||
#endif
|
||||
void push_front(value_type&& __v);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void push_front(const value_type& __v);
|
||||
|
||||
void pop_front();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args>
|
||||
iterator emplace_after(const_iterator __p, _Args&&... __args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
iterator insert_after(const_iterator __p, value_type&& __v);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator insert_after(const_iterator __p, const value_type& __v);
|
||||
iterator insert_after(const_iterator __p, size_type __n, const value_type& __v);
|
||||
template <class _InputIterator>
|
||||
@@ -577,28 +581,28 @@ public:
|
||||
void resize(size_type __n, const value_type& __v);
|
||||
void clear() {base::clear();}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void splice_after(const_iterator __p, forward_list&& __x);
|
||||
void splice_after(const_iterator __p, forward_list&& __x, const_iterator __i);
|
||||
void splice_after(const_iterator __p, forward_list&& __x,
|
||||
const_iterator __f, const_iterator __l);
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void splice_after(const_iterator __p, forward_list& __x);
|
||||
void splice_after(const_iterator __p, forward_list& __x, const_iterator __i);
|
||||
void splice_after(const_iterator __p, forward_list& __x,
|
||||
const_iterator __f, const_iterator __l);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void remove(const value_type& __v);
|
||||
template <class _Predicate> void remove_if(_Predicate __pred);
|
||||
void unique() {unique(__equal_to<value_type>());}
|
||||
template <class _BinaryPredicate> void unique(_BinaryPredicate __binary_pred);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void merge(forward_list&& __x) {merge(_STD::move(__x), __less<value_type>());}
|
||||
template <class _Compare> void merge(forward_list&& __x, _Compare __comp);
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void merge(forward_list& __x) {merge(__x, __less<value_type>());}
|
||||
template <class _Compare> void merge(forward_list& __x, _Compare __comp);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void sort() {sort(__less<value_type>());}
|
||||
template <class _Compare> void sort(_Compare __comp);
|
||||
void reverse();
|
||||
@@ -609,10 +613,10 @@ private:
|
||||
typedef typename base::__node_traits __node_traits;
|
||||
typedef typename base::__node_pointer __node_pointer;
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void __move_assign(forward_list& __x, true_type);
|
||||
void __move_assign(forward_list& __x, false_type);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Compare>
|
||||
static
|
||||
@@ -705,7 +709,7 @@ forward_list<_Tp, _Alloc>::forward_list(const forward_list& __x,
|
||||
insert_after(cbefore_begin(), __x.begin(), __x.end());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
forward_list<_Tp, _Alloc>::forward_list(forward_list&& __x,
|
||||
@@ -719,7 +723,7 @@ forward_list<_Tp, _Alloc>::forward_list(forward_list&& __x,
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
forward_list<_Tp, _Alloc>::forward_list(initializer_list<value_type> __il)
|
||||
@@ -747,7 +751,7 @@ forward_list<_Tp, _Alloc>::operator=(const forward_list& __x)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
void
|
||||
@@ -782,7 +786,7 @@ forward_list<_Tp, _Alloc>::operator=(forward_list&& __x)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
inline
|
||||
@@ -836,7 +840,8 @@ forward_list<_Tp, _Alloc>::assign(initializer_list<value_type> __il)
|
||||
assign(__il.begin(), __il.end());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
template <class... _Args>
|
||||
@@ -852,6 +857,8 @@ forward_list<_Tp, _Alloc>::emplace_front(_Args&&... __args)
|
||||
base::__before_begin()->__next_ = __h.release();
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
void
|
||||
forward_list<_Tp, _Alloc>::push_front(value_type&& __v)
|
||||
@@ -864,7 +871,7 @@ forward_list<_Tp, _Alloc>::push_front(value_type&& __v)
|
||||
base::__before_begin()->__next_ = __h.release();
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
void
|
||||
@@ -889,7 +896,8 @@ forward_list<_Tp, _Alloc>::pop_front()
|
||||
__node_traits::deallocate(__a, __p, 1);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
template <class... _Args>
|
||||
@@ -907,6 +915,8 @@ forward_list<_Tp, _Alloc>::emplace_after(const_iterator __p, _Args&&... __args)
|
||||
return iterator(__r->__next_);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
typename forward_list<_Tp, _Alloc>::iterator
|
||||
forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, value_type&& __v)
|
||||
@@ -921,7 +931,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, value_type&& __v)
|
||||
return iterator(__r->__next_);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
typename forward_list<_Tp, _Alloc>::iterator
|
||||
@@ -1137,7 +1147,7 @@ forward_list<_Tp, _Alloc>::resize(size_type __n, const value_type& __v)
|
||||
template <class _Tp, class _Alloc>
|
||||
void
|
||||
forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
forward_list&& __x)
|
||||
#else
|
||||
forward_list& __x)
|
||||
@@ -1162,7 +1172,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
|
||||
template <class _Tp, class _Alloc>
|
||||
void
|
||||
forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
forward_list&& __x,
|
||||
#else
|
||||
forward_list& __x,
|
||||
@@ -1184,7 +1194,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
|
||||
template <class _Tp, class _Alloc>
|
||||
void
|
||||
forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
forward_list&& __x,
|
||||
#else
|
||||
forward_list& __x,
|
||||
@@ -1272,7 +1282,7 @@ forward_list<_Tp, _Alloc>::unique(_BinaryPredicate __binary_pred)
|
||||
template <class _Tp, class _Alloc>
|
||||
template <class _Compare>
|
||||
void
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
forward_list<_Tp, _Alloc>::merge(forward_list&& __x, _Compare __comp)
|
||||
#else
|
||||
forward_list<_Tp, _Alloc>::merge(forward_list& __x, _Compare __comp)
|
||||
|
@@ -189,13 +189,13 @@ public:
|
||||
|
||||
// 27.9.1.2 Constructors/destructor:
|
||||
basic_filebuf();
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_filebuf(basic_filebuf&& __rhs);
|
||||
#endif
|
||||
virtual ~basic_filebuf();
|
||||
|
||||
// 27.9.1.3 Assign/swap:
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_filebuf& operator=(basic_filebuf&& __rhs);
|
||||
#endif
|
||||
void swap(basic_filebuf& __rhs);
|
||||
@@ -260,7 +260,7 @@ basic_filebuf<_CharT, _Traits>::basic_filebuf()
|
||||
setbuf(0, 4096);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
basic_filebuf<_CharT, _Traits>::basic_filebuf(basic_filebuf&& __rhs)
|
||||
@@ -333,7 +333,7 @@ basic_filebuf<_CharT, _Traits>::operator=(basic_filebuf&& __rhs)
|
||||
swap(__rhs);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
basic_filebuf<_CharT, _Traits>::~basic_filebuf()
|
||||
@@ -970,11 +970,11 @@ public:
|
||||
basic_ifstream();
|
||||
explicit basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in);
|
||||
explicit basic_ifstream(const string& __s, ios_base::openmode __mode = ios_base::in);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_ifstream(basic_ifstream&& __rhs);
|
||||
#endif
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_ifstream& operator=(basic_ifstream&& __rhs);
|
||||
#endif
|
||||
void swap(basic_ifstream& __rhs);
|
||||
@@ -1014,7 +1014,7 @@ basic_ifstream<_CharT, _Traits>::basic_ifstream(const string& __s, ios_base::ope
|
||||
this->setstate(ios_base::failbit);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1035,7 +1035,7 @@ basic_ifstream<_CharT, _Traits>::operator=(basic_ifstream&& __rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1115,11 +1115,11 @@ public:
|
||||
basic_ofstream();
|
||||
explicit basic_ofstream(const char* __s, ios_base::openmode __mode = ios_base::out);
|
||||
explicit basic_ofstream(const string& __s, ios_base::openmode __mode = ios_base::out);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_ofstream(basic_ofstream&& __rhs);
|
||||
#endif
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_ofstream& operator=(basic_ofstream&& __rhs);
|
||||
#endif
|
||||
void swap(basic_ofstream& __rhs);
|
||||
@@ -1159,7 +1159,7 @@ basic_ofstream<_CharT, _Traits>::basic_ofstream(const string& __s, ios_base::ope
|
||||
this->setstate(ios_base::failbit);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1180,7 +1180,7 @@ basic_ofstream<_CharT, _Traits>::operator=(basic_ofstream&& __rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1260,11 +1260,11 @@ public:
|
||||
basic_fstream();
|
||||
explicit basic_fstream(const char* __s, ios_base::openmode __mode = ios_base::in | ios_base::out);
|
||||
explicit basic_fstream(const string& __s, ios_base::openmode __mode = ios_base::in | ios_base::out);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_fstream(basic_fstream&& __rhs);
|
||||
#endif
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_fstream& operator=(basic_fstream&& __rhs);
|
||||
#endif
|
||||
void swap(basic_fstream& __rhs);
|
||||
@@ -1304,7 +1304,7 @@ basic_fstream<_CharT, _Traits>::basic_fstream(const string& __s, ios_base::openm
|
||||
this->setstate(ios_base::failbit);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1325,7 +1325,7 @@ basic_fstream<_CharT, _Traits>::operator=(basic_fstream&& __rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
|
1963
include/future
1963
include/future
File diff suppressed because it is too large
Load Diff
@@ -609,7 +609,7 @@ protected:
|
||||
void init(basic_streambuf<char_type, traits_type>* __sb);
|
||||
|
||||
void move(basic_ios& __rhs);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void move(basic_ios&& __rhs) {move(__rhs);}
|
||||
#endif
|
||||
void swap(basic_ios& __rhs);
|
||||
|
@@ -92,8 +92,8 @@ typedef fpos<char_traits<wchar_t>::state_type> wstreampos;
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template<class _CharT> struct char_traits;
|
||||
template<class _Tp> class allocator;
|
||||
template<class _CharT> struct _LIBCPP_VISIBLE char_traits;
|
||||
template<class _Tp> class _LIBCPP_VISIBLE allocator;
|
||||
|
||||
template <class _CharT, class _Traits = char_traits<_CharT> > class basic_ios;
|
||||
|
||||
@@ -164,7 +164,7 @@ typedef long long streamoff; // for char_traits in <string>
|
||||
|
||||
template <class _CharT, // for <stdexcept>
|
||||
class _Traits = char_traits<_CharT>,
|
||||
class _Allocator = allocator<_CharT> > class basic_string;
|
||||
class _Allocator = allocator<_CharT> > class _LIBCPP_VISIBLE basic_string;
|
||||
typedef basic_string<char, char_traits<char>, allocator<char> > string;
|
||||
typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;
|
||||
|
||||
|
@@ -176,12 +176,12 @@ public:
|
||||
explicit basic_istream(basic_streambuf<char_type, traits_type>* __sb);
|
||||
virtual ~basic_istream();
|
||||
protected:
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_istream(basic_istream&& __rhs);
|
||||
#endif
|
||||
|
||||
// 27.7.1.1.2 Assign/swap:
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_istream& operator=(basic_istream&& __rhs);
|
||||
#endif
|
||||
void swap(basic_istream& __rhs);
|
||||
@@ -287,7 +287,7 @@ basic_istream<_CharT, _Traits>::basic_istream(basic_streambuf<char_type, traits_
|
||||
this->init(__sb);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -307,7 +307,7 @@ basic_istream<_CharT, _Traits>::operator=(basic_istream&& __rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
basic_istream<_CharT, _Traits>::~basic_istream()
|
||||
@@ -1463,7 +1463,7 @@ ws(basic_istream<_CharT, _Traits>& __is)
|
||||
return __is;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits, class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1474,7 +1474,7 @@ operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
|
||||
return __is;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
class basic_iostream
|
||||
@@ -1493,12 +1493,12 @@ public:
|
||||
explicit basic_iostream(basic_streambuf<char_type, traits_type>* __sb);
|
||||
virtual ~basic_iostream();
|
||||
protected:
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_iostream(basic_iostream&& __rhs);
|
||||
#endif
|
||||
|
||||
// assign/swap
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_iostream& operator=(basic_iostream&& __rhs);
|
||||
#endif
|
||||
void swap(basic_iostream& __rhs);
|
||||
@@ -1512,7 +1512,7 @@ basic_iostream<_CharT, _Traits>::basic_iostream(basic_streambuf<char_type, trait
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1530,7 +1530,7 @@ basic_iostream<_CharT, _Traits>::operator=(basic_iostream&& __rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
basic_iostream<_CharT, _Traits>::~basic_iostream()
|
||||
@@ -1655,7 +1655,7 @@ getline(basic_istream<_CharT, _Traits>& __is,
|
||||
return getline(__is, __str, __is.widen('\n'));
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
inline
|
||||
@@ -1675,7 +1675,7 @@ getline(basic_istream<_CharT, _Traits>&& __is,
|
||||
return getline(__is, __str, __is.widen('\n'));
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits, size_t _Size>
|
||||
basic_istream<_CharT, _Traits>&
|
||||
|
@@ -626,10 +626,10 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit back_insert_iterator(_Container& __x) : container(&__x) {}
|
||||
_LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator=(typename _Container::const_reference __value)
|
||||
{container->push_back(__value); return *this;}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator=(typename _Container::value_type&& __value)
|
||||
{container->push_back(_STD::move(__value)); return *this;}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator*() {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY back_insert_iterator& operator++() {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY back_insert_iterator operator++(int) {return *this;}
|
||||
@@ -659,10 +659,10 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY explicit front_insert_iterator(_Container& __x) : container(&__x) {}
|
||||
_LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator=(typename _Container::const_reference __value)
|
||||
{container->push_front(__value); return *this;}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator=(typename _Container::value_type&& __value)
|
||||
{container->push_front(_STD::move(__value)); return *this;}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator*() {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY front_insert_iterator& operator++() {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY front_insert_iterator operator++(int) {return *this;}
|
||||
@@ -694,10 +694,10 @@ public:
|
||||
: container(&__x), iter(__i) {}
|
||||
_LIBCPP_INLINE_VISIBILITY insert_iterator& operator=(typename _Container::const_reference __value)
|
||||
{iter = container->insert(iter, __value); ++iter; return *this;}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY insert_iterator& operator=(typename _Container::value_type&& __value)
|
||||
{iter = container->insert(iter, _STD::move(__value)); ++iter; return *this;}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY insert_iterator& operator*() {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY insert_iterator& operator++() {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY insert_iterator& operator++(int) {return *this;}
|
||||
@@ -890,7 +890,7 @@ public:
|
||||
typedef typename iterator_traits<iterator_type>::value_type value_type;
|
||||
typedef typename iterator_traits<iterator_type>::difference_type difference_type;
|
||||
typedef typename iterator_traits<iterator_type>::pointer pointer;
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef value_type&& reference;
|
||||
#else
|
||||
typedef typename iterator_traits<iterator_type>::reference reference;
|
||||
@@ -1615,7 +1615,7 @@ operator+(typename __debug_iter<_Container, _Iter>::difference_type __n,
|
||||
|
||||
#endif // _LIBCPP_DEBUG
|
||||
|
||||
#if defined(_LIBCPP_MOVE) && !defined(_LIBCPP_HAS_NO_DECLTYPE)
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_DECLTYPE)
|
||||
|
||||
template <class _C>
|
||||
inline
|
||||
@@ -1649,7 +1649,7 @@ end(const _C& __c) -> decltype(__c.end())
|
||||
return __c.end();
|
||||
}
|
||||
|
||||
#else // defined(_LIBCPP_MOVE) && !defined(_LIBCPP_HAS_NO_DECLTYPE)
|
||||
#else // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_DECLTYPE)
|
||||
|
||||
template <class _C>
|
||||
inline
|
||||
@@ -1683,7 +1683,7 @@ end(const _C& __c)
|
||||
return __c.end();
|
||||
}
|
||||
|
||||
#endif // defined(_LIBCPP_MOVE) && !defined(_LIBCPP_HAS_NO_DECLTYPE)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_DECLTYPE)
|
||||
|
||||
template <class _T, size_t _N>
|
||||
inline
|
||||
|
40
include/list
40
include/list
@@ -501,11 +501,11 @@ public:
|
||||
list& operator=(const list& __c);
|
||||
list(initializer_list<value_type> __il);
|
||||
list(initializer_list<value_type> __il, const allocator_type& __a);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
list(list&& __c);
|
||||
list(list&& __c, const allocator_type& __a);
|
||||
list& operator=(list&& __c);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
list& operator=(initializer_list<value_type> __il)
|
||||
{assign(__il.begin(), __il.end()); return *this;}
|
||||
|
||||
@@ -541,17 +541,19 @@ public:
|
||||
reference back() {return base::__end_.__prev_->__value_;}
|
||||
const_reference back() const {return base::__end_.__prev_->__value_;}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void push_front(value_type&& __x);
|
||||
void push_back(value_type&& __x);
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args>
|
||||
void emplace_front(_Args&&... __args);
|
||||
template <class... _Args>
|
||||
void emplace_back(_Args&&... __args);
|
||||
template <class... _Args>
|
||||
iterator emplace(const_iterator __p, _Args&&... __args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
iterator insert(const_iterator __p, value_type&& __x);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void push_front(const value_type& __x);
|
||||
void push_back(const value_type& __x);
|
||||
@@ -577,19 +579,19 @@ public:
|
||||
void resize(size_type __n, const value_type& __x);
|
||||
|
||||
void splice(const_iterator __p, list& __c);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void splice(const_iterator __p, list&& __c) {splice(__p, __c);}
|
||||
#endif
|
||||
void splice(const_iterator __p, list& __c, const_iterator __i);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void splice(const_iterator __p, list&& __c, const_iterator __i)
|
||||
{splice(__p, __c, __i);}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void splice(const_iterator __p, list& __c, const_iterator __f, const_iterator __l);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void splice(const_iterator __p, list&& __c, const_iterator __f, const_iterator __l)
|
||||
{splice(__p, __c, __f, __l);}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void remove(const value_type& __x);
|
||||
template <class _Pred> void remove_if(_Pred __pred);
|
||||
@@ -597,15 +599,15 @@ public:
|
||||
template <class _BinaryPred>
|
||||
void unique(_BinaryPred __binary_pred);
|
||||
void merge(list& __c);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void merge(list&& __c) {merge(__c);}
|
||||
#endif
|
||||
template <class _Comp>
|
||||
void merge(list& __c, _Comp __comp);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _Comp>
|
||||
void merge(list&& __c, _Comp __comp) {merge(__c, __comp);}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void sort();
|
||||
template <class _Comp>
|
||||
void sort(_Comp __comp);
|
||||
@@ -647,7 +649,7 @@ template <class _Tp, class _Alloc>
|
||||
list<_Tp, _Alloc>::list(size_type __n)
|
||||
{
|
||||
for (; __n > 0; --__n)
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
emplace_back();
|
||||
#else
|
||||
push_back(value_type());
|
||||
@@ -736,7 +738,7 @@ list<_Tp, _Alloc>::operator=(const list& __c)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
inline
|
||||
@@ -792,7 +794,7 @@ list<_Tp, _Alloc>::__move_assign(list& __c, true_type)
|
||||
splice(end(), __c);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
template <class _InpIter>
|
||||
@@ -976,7 +978,7 @@ list<_Tp, _Alloc>::push_back(const value_type& __x)
|
||||
__hold.release();
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
void
|
||||
@@ -1004,6 +1006,8 @@ list<_Tp, _Alloc>::push_back(value_type&& __x)
|
||||
__hold.release();
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
template <class... _Args>
|
||||
void
|
||||
@@ -1047,6 +1051,8 @@ list<_Tp, _Alloc>::emplace(const_iterator __p, _Args&&... __args)
|
||||
return iterator(__hold.release());
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
typename list<_Tp, _Alloc>::iterator
|
||||
list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x)
|
||||
@@ -1061,7 +1067,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x)
|
||||
return iterator(__hold.release());
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Alloc>
|
||||
void
|
||||
|
@@ -3564,7 +3564,7 @@ public:
|
||||
wstring_convert(_Codecvt* __pcvt, state_type __state);
|
||||
wstring_convert(const byte_string& __byte_err,
|
||||
const wide_string& __wide_err = wide_string());
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
wstring_convert(wstring_convert&& __wc);
|
||||
#endif
|
||||
~wstring_convert();
|
||||
@@ -3614,7 +3614,7 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::
|
||||
__cvtptr_ = new _Codecvt;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template<class _Codecvt, class _Elem, class _Wide_alloc, class _Byte_alloc>
|
||||
inline
|
||||
@@ -3628,7 +3628,7 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::
|
||||
__wc.__cvtptr_ = nullptr;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template<class _Codecvt, class _Elem, class _Wide_alloc, class _Byte_alloc>
|
||||
wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::~wstring_convert()
|
||||
|
79
include/map
79
include/map
@@ -455,7 +455,7 @@ public:
|
||||
__second_constructed(false)
|
||||
{}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__map_node_destructor(__tree_node_destructor<allocator_type>&& __x)
|
||||
: __na_(__x.__na_),
|
||||
__first_constructed(__x.__value_constructed),
|
||||
@@ -463,7 +463,7 @@ public:
|
||||
{
|
||||
__x.__value_constructed = false;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void operator()(pointer __p)
|
||||
{
|
||||
@@ -672,7 +672,7 @@ public:
|
||||
insert(__m.begin(), __m.end());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
map(map&& __m)
|
||||
: __tree_(_STD::move(__m.__tree_))
|
||||
@@ -705,7 +705,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
explicit map(const allocator_type& __a)
|
||||
: __tree_(__a)
|
||||
@@ -738,7 +738,7 @@ public:
|
||||
size_type max_size() const {return __tree_.max_size();}
|
||||
|
||||
mapped_type& operator[](const key_type& __k);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
mapped_type& operator[](key_type&& __k);
|
||||
#endif
|
||||
|
||||
@@ -749,7 +749,7 @@ public:
|
||||
key_compare key_comp() const {return __tree_.value_comp().key_comp();}
|
||||
value_compare value_comp() const {return value_compare(__tree_.value_comp().key_comp());}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
pair<iterator, bool>
|
||||
emplace() {return __tree_.__emplace_unique();}
|
||||
@@ -760,11 +760,15 @@ public:
|
||||
emplace(_A0&& __a0)
|
||||
{return __tree_.__emplace_unique(_STD::forward<_A0>(__a0));}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _A0, class ..._Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
pair<iterator, bool>
|
||||
emplace(_A0&& __a0, _Args&& ...__args);
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
iterator
|
||||
emplace_hint(const_iterator __p)
|
||||
{return __tree_.__emplace_hint_unique(__p.__i_);}
|
||||
@@ -775,11 +779,15 @@ public:
|
||||
emplace_hint(const_iterator __p, _A0&& __a0)
|
||||
{return __tree_.__emplace_hint_unique(__p.__i_, _STD::forward<_A0>(__a0));}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _A0, class ..._Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
iterator
|
||||
emplace_hint(const_iterator __p, _A0&& __a0, _Args&& ...__args);
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _P,
|
||||
class = typename enable_if<is_convertible<_P, value_type>::value>::type>
|
||||
pair<iterator, bool> insert(_P&& __p)
|
||||
@@ -790,7 +798,7 @@ public:
|
||||
iterator insert(const_iterator __pos, _P&& __p)
|
||||
{return __tree_.__insert_unique(__pos.__i_, _STD::forward<_P>(__p));}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
pair<iterator, bool>
|
||||
insert(const value_type& __v) {return __tree_.__insert_unique(__v);}
|
||||
@@ -845,15 +853,17 @@ private:
|
||||
typedef __map_node_destructor<__node_allocator> _D;
|
||||
typedef unique_ptr<__node, _D> __node_holder;
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__node_holder __construct_node();
|
||||
template <class _A0,
|
||||
class = typename enable_if<is_convertible<_A0, value_type>::value>::type>
|
||||
__node_holder __construct_node(_A0&& __a0);
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class _A0, class ..._Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
__node_holder __construct_node(_A0&& __a0, _Args&& ...__args);
|
||||
#else // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__node_holder __construct_node(const key_type& __k);
|
||||
#endif
|
||||
|
||||
@@ -1016,7 +1026,7 @@ map<_Key, _Tp, _Compare, _Allocator>::__find_equal_key(__node_base_const_pointer
|
||||
return const_cast<const __node_base_const_pointer&>(__parent->__left_);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
map<_Key, _Tp, _Compare, _Allocator>::map(map&& __m, const allocator_type& __a)
|
||||
@@ -1058,6 +1068,8 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0)
|
||||
return __h;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
template <class _A0, class ..._Args,
|
||||
class>
|
||||
@@ -1073,7 +1085,9 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0, _Args&& ...__
|
||||
return __h;
|
||||
}
|
||||
|
||||
#else // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
typename map<_Key, _Tp, _Compare, _Allocator>::__node_holder
|
||||
@@ -1088,7 +1102,7 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node(const key_type& __k)
|
||||
return _STD::move(__h);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
_Tp&
|
||||
@@ -1106,7 +1120,7 @@ map<_Key, _Tp, _Compare, _Allocator>::operator[](const key_type& __k)
|
||||
return __r->__value_.second;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
_Tp&
|
||||
@@ -1124,7 +1138,7 @@ map<_Key, _Tp, _Compare, _Allocator>::operator[](key_type&& __k)
|
||||
return __r->__value_.second;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
_Tp&
|
||||
@@ -1152,7 +1166,7 @@ map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k) const
|
||||
return static_cast<__node_const_pointer>(__child)->__value_.second;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
template <class _A0, class ..._Args,
|
||||
@@ -1185,7 +1199,7 @@ map<_Key, _Tp, _Compare, _Allocator>::emplace_hint(const_iterator __p,
|
||||
return __r;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
inline
|
||||
@@ -1332,7 +1346,7 @@ public:
|
||||
insert(__m.begin(), __m.end());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
multimap(multimap&& __m)
|
||||
: __tree_(_STD::move(__m.__tree_))
|
||||
@@ -1364,7 +1378,7 @@ public:
|
||||
__tree_.__assign_multi(__il.begin(), __il.end());
|
||||
return *this;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
explicit multimap(const allocator_type& __a)
|
||||
: __tree_(__a)
|
||||
@@ -1400,7 +1414,7 @@ public:
|
||||
key_compare key_comp() const {return __tree_.value_comp().key_comp();}
|
||||
value_compare value_comp() const {return value_compare(__tree_.value_comp().key_comp());}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
iterator emplace() {return __tree_.__emplace_multi();}
|
||||
|
||||
@@ -1410,11 +1424,15 @@ public:
|
||||
emplace(_A0&& __a0)
|
||||
{return __tree_.__emplace_multi(_STD::forward<_A0>(__a0));}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _A0, class ..._Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
iterator
|
||||
emplace(_A0&& __a0, _Args&& ...__args);
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
iterator emplace_hint(const_iterator __p)
|
||||
{return __tree_.__emplace_hint_multi(__p.__i_);}
|
||||
|
||||
@@ -1424,11 +1442,15 @@ public:
|
||||
emplace_hint(const_iterator __p, _A0&& __a0)
|
||||
{return __tree_.__emplace_hint_multi(__p.__i_, _STD::forward<_A0>(__a0));}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _A0, class ..._Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
iterator
|
||||
emplace_hint(const_iterator __p, _A0&& __a0, _Args&& ...__args);
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _P,
|
||||
class = typename enable_if<is_convertible<_P, value_type>::value>::type>
|
||||
iterator insert(_P&& __p)
|
||||
@@ -1439,7 +1461,7 @@ public:
|
||||
iterator insert(const_iterator __pos, _P&& __p)
|
||||
{return __tree_.__insert_multi(__pos.__i_, _STD::forward<_P>(__p));}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
iterator insert(const value_type& __v) {return __tree_.__insert_multi(__v);}
|
||||
|
||||
@@ -1489,18 +1511,20 @@ private:
|
||||
typedef __map_node_destructor<__node_allocator> _D;
|
||||
typedef unique_ptr<__node, _D> __node_holder;
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__node_holder __construct_node();
|
||||
template <class _A0,
|
||||
class = typename enable_if<is_convertible<_A0, value_type>::value>::type>
|
||||
__node_holder __construct_node(_A0&& __a0);
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class _A0, class ..._Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
__node_holder __construct_node(_A0&& __a0, _Args&& ...__args);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
};
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
multimap<_Key, _Tp, _Compare, _Allocator>::multimap(multimap&& __m, const allocator_type& __a)
|
||||
@@ -1543,6 +1567,8 @@ multimap<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0)
|
||||
return __h;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
template <class _A0, class ..._Args,
|
||||
class // = typename enable_if<is_convertible<_A0, key_type>::value>::type
|
||||
@@ -1559,9 +1585,10 @@ multimap<_Key, _Tp, _Compare, _Allocator>::__construct_node(_A0&& __a0, _Args&&
|
||||
return __h;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
template <class _A0, class ..._Args,
|
||||
@@ -1593,7 +1620,7 @@ multimap<_Key, _Tp, _Compare, _Allocator>::emplace_hint(const_iterator __p,
|
||||
return __r;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
|
||||
template <class _Key, class _Tp, class _Compare, class _Allocator>
|
||||
inline
|
||||
|
102
include/memory
102
include/memory
@@ -1448,7 +1448,7 @@ struct uses_allocator
|
||||
{
|
||||
};
|
||||
|
||||
#if defined(_LIBCPP_MOVE) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE)
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE)
|
||||
|
||||
// uses-allocator construction
|
||||
|
||||
@@ -1466,12 +1466,12 @@ struct __uses_alloc_ctor
|
||||
: integral_constant<int, __uses_alloc_ctor_imp<_Tp, _Alloc, _Args...>::value>
|
||||
{};
|
||||
|
||||
#endif // defined(_LIBCPP_MOVE) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE)
|
||||
|
||||
// allocator
|
||||
|
||||
template <class _Tp>
|
||||
class allocator
|
||||
class _LIBCPP_VISIBLE allocator
|
||||
{
|
||||
public:
|
||||
typedef size_t size_type;
|
||||
@@ -1492,7 +1492,7 @@ public:
|
||||
{return static_cast<pointer>(::operator new(__n * sizeof(_Tp)));}
|
||||
_LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type) {::operator delete((void*)__p);}
|
||||
_LIBCPP_INLINE_VISIBILITY size_type max_size() const throw() {return size_type(~0) / sizeof(_Tp);}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
template <class _Up, class... _Args>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
@@ -1500,7 +1500,7 @@ public:
|
||||
{
|
||||
::new((void*)__p) _Up(_STD::forward<_Args>(__args)...);
|
||||
}
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
construct(pointer __p)
|
||||
@@ -1568,7 +1568,7 @@ public:
|
||||
{
|
||||
::new((void*)__p) _Tp(__a0, __a1);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
_LIBCPP_INLINE_VISIBILITY void destroy(pointer __p) {__p->~_Tp();}
|
||||
};
|
||||
|
||||
@@ -1732,10 +1732,10 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2)
|
||||
: __first_(_STD::forward<_T1_param>(__t1)), __second_(_STD::forward<_T2_param>(__t2)) {}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(__libcpp_compressed_pair_imp&& __p)
|
||||
: __first_(_STD::forward<_T1>(__p.first())), __second_(_STD::forward<_T2>(__p.second())) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _T1_reference first() {return __first_;}
|
||||
_LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const {return __first_;}
|
||||
@@ -1775,10 +1775,10 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2)
|
||||
: _T1(_STD::forward<_T1_param>(__t1)), __second_(_STD::forward<_T2_param>(__t2)) {}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(__libcpp_compressed_pair_imp&& __p)
|
||||
: _T1(_STD::move(__p.first())), __second_(_STD::forward<_T2>(__p.second())) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _T1_reference first() {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const {return *this;}
|
||||
@@ -1817,10 +1817,10 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2)
|
||||
: _T2(_STD::forward<_T2_param>(__t2)), __first_(_STD::forward<_T1_param>(__t1)) {}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__libcpp_compressed_pair_imp(__libcpp_compressed_pair_imp&& __p)
|
||||
: _T2(_STD::forward<_T2>(__p.second())), __first_(_STD::move(__p.first())) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _T1_reference first() {return __first_;}
|
||||
_LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const {return __first_;}
|
||||
@@ -1858,10 +1858,10 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2)
|
||||
: _T1(_STD::forward<_T1_param>(__t1)), _T2(_STD::forward<_T2_param>(__t2)) {}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(__libcpp_compressed_pair_imp&& __p)
|
||||
: _T1(_STD::move(__p.first())), _T2(_STD::move(__p.second())) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _T1_reference first() {return *this;}
|
||||
_LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const {return *this;}
|
||||
@@ -1897,10 +1897,10 @@ public:
|
||||
_LIBCPP_INLINE_VISIBILITY __compressed_pair(_T1_param __t1, _T2_param __t2)
|
||||
: base(_STD::forward<_T1_param>(__t1), _STD::forward<_T2_param>(__t2)) {}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__compressed_pair(__compressed_pair&& __p)
|
||||
: base(_STD::move(__p)) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY _T1_reference first() {return base::first();}
|
||||
_LIBCPP_INLINE_VISIBILITY _T1_const_reference first() const {return base::first();}
|
||||
@@ -1953,21 +1953,21 @@ public:
|
||||
private:
|
||||
__compressed_pair<pointer, deleter_type> __ptr_;
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unique_ptr(const unique_ptr&);
|
||||
unique_ptr& operator=(const unique_ptr&);
|
||||
template <class _Up, class _Ep>
|
||||
unique_ptr(const unique_ptr<_Up, _Ep>&);
|
||||
template <class _Up, class _Ep>
|
||||
unique_ptr& operator=(const unique_ptr<_Up, _Ep>&);
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unique_ptr(unique_ptr&);
|
||||
template <class _Up, class _Ep>
|
||||
unique_ptr(unique_ptr<_Up, _Ep>&);
|
||||
unique_ptr& operator=(unique_ptr&);
|
||||
template <class _Up, class _Ep>
|
||||
unique_ptr& operator=(unique_ptr<_Up, _Ep>&);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
struct __nat {int __for_bool_;};
|
||||
|
||||
@@ -1993,7 +1993,7 @@ public:
|
||||
"unique_ptr constructed with null function pointer deleter");
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY unique_ptr(pointer __p, typename conditional<
|
||||
is_reference<deleter_type>::value,
|
||||
deleter_type,
|
||||
@@ -2054,7 +2054,7 @@ public:
|
||||
__ptr_.second() = _STD::forward<_Ep>(__u.get_deleter());
|
||||
return *this;
|
||||
}
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY operator __rv<unique_ptr>()
|
||||
{
|
||||
@@ -2085,7 +2085,7 @@ public:
|
||||
operator=(auto_ptr<_Up> __p)
|
||||
{reset(__p.release()); return *this;}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY ~unique_ptr() {reset();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY unique_ptr& operator=(nullptr_t)
|
||||
@@ -2130,17 +2130,17 @@ public:
|
||||
private:
|
||||
__compressed_pair<pointer, deleter_type> __ptr_;
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unique_ptr(const unique_ptr&);
|
||||
unique_ptr& operator=(const unique_ptr&);
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unique_ptr(unique_ptr&);
|
||||
template <class _Up>
|
||||
unique_ptr(unique_ptr<_Up>&);
|
||||
unique_ptr& operator=(unique_ptr&);
|
||||
template <class _Up>
|
||||
unique_ptr& operator=(unique_ptr<_Up>&);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
struct __nat {int __for_bool_;};
|
||||
|
||||
@@ -2159,7 +2159,7 @@ public:
|
||||
static_assert(!is_pointer<deleter_type>::value,
|
||||
"unique_ptr constructed with null function pointer deleter");
|
||||
}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _P,
|
||||
class = typename enable_if<is_same<_P, pointer>::value>::type
|
||||
>
|
||||
@@ -2210,7 +2210,7 @@ public:
|
||||
__ptr_.second() = _STD::forward<deleter_type>(__u.get_deleter());
|
||||
return *this;
|
||||
}
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY explicit unique_ptr(pointer __p)
|
||||
: __ptr_(__p)
|
||||
@@ -2240,7 +2240,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY ~unique_ptr() {reset();}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY unique_ptr& operator=(nullptr_t)
|
||||
@@ -2263,7 +2263,7 @@ public:
|
||||
return __t;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _P,
|
||||
class = typename enable_if<is_same<_P, pointer>::value>::type
|
||||
>
|
||||
@@ -2288,7 +2288,7 @@ public:
|
||||
if (__tmp)
|
||||
__ptr_.second()(__tmp);
|
||||
}
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY void reset(pointer __p = pointer())
|
||||
{
|
||||
pointer __tmp = __ptr_.first();
|
||||
@@ -2296,12 +2296,12 @@ public:
|
||||
if (__tmp)
|
||||
__ptr_.second()(__tmp);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY void swap(unique_ptr& __u) {__ptr_.swap(__u.__ptr_);}
|
||||
private:
|
||||
|
||||
#ifndef _LIBCPP_MOVE
|
||||
#ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _Up>
|
||||
explicit unique_ptr(_Up);
|
||||
template <class _Up>
|
||||
@@ -2315,7 +2315,7 @@ private:
|
||||
is_convertible<_Up, pointer>::value,
|
||||
__nat
|
||||
>::type = __nat());
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
};
|
||||
|
||||
template <class _Tp, class _Dp>
|
||||
@@ -2667,19 +2667,19 @@ public:
|
||||
template<class _Yp>
|
||||
shared_ptr(const shared_ptr<_Yp>& __r,
|
||||
typename enable_if<is_convertible<_Yp*, _Tp*>::value, __nat>::type = __nat());
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
shared_ptr(shared_ptr&& __r);
|
||||
template<class _Yp> shared_ptr(shared_ptr<_Yp>&& __r,
|
||||
typename enable_if<is_convertible<_Yp*, _Tp*>::value, __nat>::type = __nat());
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template<class _Yp> explicit shared_ptr(const weak_ptr<_Yp>& __r,
|
||||
typename enable_if<is_convertible<_Yp*, _Tp*>::value, __nat>::type= __nat());
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template<class _Yp> shared_ptr(auto_ptr<_Yp>&& __r);
|
||||
#else
|
||||
template<class _Yp> shared_ptr(auto_ptr<_Yp> __r);
|
||||
#endif
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
private:
|
||||
template <class _Yp, class _Dp> shared_ptr(const unique_ptr<_Yp, _Dp>& __r);// = delete;
|
||||
public:
|
||||
@@ -2687,30 +2687,30 @@ public:
|
||||
typename enable_if<!is_lvalue_reference<_Dp>::value, __nat>::type = __nat());
|
||||
template <class _Yp, class _Dp> shared_ptr(unique_ptr<_Yp, _Dp>&&,
|
||||
typename enable_if<is_lvalue_reference<_Dp>::value, __nat>::type = __nat());
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _Yp, class _Dp> shared_ptr(unique_ptr<_Yp, _Dp>,
|
||||
typename enable_if<!is_lvalue_reference<_Dp>::value, __nat>::type = __nat());
|
||||
template <class _Yp, class _Dp> shared_ptr(unique_ptr<_Yp, _Dp>,
|
||||
typename enable_if<is_lvalue_reference<_Dp>::value, __nat>::type = __nat());
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
~shared_ptr();
|
||||
|
||||
shared_ptr& operator=(const shared_ptr& __r);
|
||||
template<class _Yp> shared_ptr& operator=(const shared_ptr<_Yp>& __r);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
shared_ptr& operator=(shared_ptr&& __r);
|
||||
template<class _Yp> shared_ptr& operator=(shared_ptr<_Yp>&& __r);
|
||||
template<class _Yp> shared_ptr& operator=(auto_ptr<_Yp>&& __r);
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template<class _Yp> shared_ptr& operator=(auto_ptr<_Yp> __r);
|
||||
#endif
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
private:
|
||||
template <class _Yp, class _Dp> shared_ptr& operator=(const unique_ptr<_Yp, _Dp>& __r);// = delete;
|
||||
public:
|
||||
template <class _Yp, class _Dp> shared_ptr& operator=(unique_ptr<_Yp, _Dp>&& __r);
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _Yp, class _Dp> shared_ptr& operator=(unique_ptr<_Yp, _Dp> __r);
|
||||
#endif
|
||||
|
||||
@@ -2954,7 +2954,7 @@ shared_ptr<_Tp>::shared_ptr(const shared_ptr<_Yp>& __r,
|
||||
__cntrl_->__add_shared();
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template<class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -2978,11 +2978,11 @@ shared_ptr<_Tp>::shared_ptr(shared_ptr<_Yp>&& __r,
|
||||
__r.__cntrl_ = 0;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template<class _Tp>
|
||||
template<class _Yp>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
shared_ptr<_Tp>::shared_ptr(auto_ptr<_Yp>&& __r)
|
||||
#else
|
||||
shared_ptr<_Tp>::shared_ptr(auto_ptr<_Yp> __r)
|
||||
@@ -2997,7 +2997,7 @@ shared_ptr<_Tp>::shared_ptr(auto_ptr<_Yp> __r)
|
||||
|
||||
template<class _Tp>
|
||||
template <class _Yp, class _Dp>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp>&& __r,
|
||||
#else
|
||||
shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp> __r,
|
||||
@@ -3013,7 +3013,7 @@ shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp> __r,
|
||||
|
||||
template<class _Tp>
|
||||
template <class _Yp, class _Dp>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp>&& __r,
|
||||
#else
|
||||
shared_ptr<_Tp>::shared_ptr(unique_ptr<_Yp, _Dp> __r,
|
||||
@@ -3240,7 +3240,7 @@ shared_ptr<_Tp>::operator=(const shared_ptr<_Yp>& __r)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template<class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -3281,7 +3281,7 @@ shared_ptr<_Tp>::operator=(unique_ptr<_Yp, _Dp>&& __r)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template<class _Tp>
|
||||
template<class _Yp>
|
||||
@@ -3303,7 +3303,7 @@ shared_ptr<_Tp>::operator=(unique_ptr<_Yp, _Dp> __r)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template<class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
|
@@ -456,7 +456,7 @@ class __call_once_param
|
||||
{
|
||||
_F __f_;
|
||||
public:
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
explicit __call_once_param(_F&& __f) : __f_(_STD::move(__f)) {}
|
||||
#else
|
||||
explicit __call_once_param(const _F& __f) : __f_(__f) {}
|
||||
|
@@ -153,12 +153,12 @@ public:
|
||||
explicit basic_ostream(basic_streambuf<char_type, traits_type>* __sb);
|
||||
virtual ~basic_ostream();
|
||||
protected:
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_ostream(basic_ostream&& __rhs);
|
||||
#endif
|
||||
|
||||
// 27.7.2.3 Assign/swap
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_ostream& operator=(basic_ostream&& __rhs);
|
||||
#endif
|
||||
void swap(basic_ostream& __rhs);
|
||||
@@ -261,7 +261,7 @@ basic_ostream<_CharT, _Traits>::basic_ostream(basic_streambuf<char_type, traits_
|
||||
this->init(__sb);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -279,7 +279,7 @@ basic_ostream<_CharT, _Traits>::operator=(basic_ostream&& __rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits>
|
||||
basic_ostream<_CharT, _Traits>::~basic_ostream()
|
||||
@@ -1206,7 +1206,7 @@ flush(basic_ostream<_CharT, _Traits>& __os)
|
||||
return __os;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Stream, class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1222,7 +1222,7 @@ operator<<(_Stream&& __os, const _Tp& __x)
|
||||
return __os;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
|
@@ -182,10 +182,10 @@ protected:
|
||||
public:
|
||||
queue() : c() {}
|
||||
explicit queue(const container_type& __c) : c(__c) {}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
explicit queue(container_type&& __c) : c(_STD::move(__c)) {}
|
||||
queue(queue&& __q) : c(_STD::move(__q.c)) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _Alloc>
|
||||
explicit queue(const _Alloc& __a,
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
@@ -201,7 +201,7 @@ public:
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
_Alloc>::value>::type* = 0)
|
||||
: c(__c, __a) {}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _Alloc>
|
||||
queue(container_type&& __c, const _Alloc& __a,
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
c = _STD::move(__q.c);
|
||||
return *this;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
bool empty() const {return c.empty();}
|
||||
size_type size() const {return c.size();}
|
||||
@@ -229,12 +229,14 @@ public:
|
||||
const_reference back() const {return c.back();}
|
||||
|
||||
void push(const value_type& __v) {c.push_back(__v);}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void push(value_type&& __v) {c.push_back(_STD::move(__v));}
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args>
|
||||
void emplace(_Args&&... __args)
|
||||
{c.emplace_back(_STD::forward<_Args>(__args)...);}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void pop() {c.pop_front();}
|
||||
|
||||
void swap(queue& __q)
|
||||
@@ -336,7 +338,7 @@ public:
|
||||
explicit priority_queue(const value_compare& __comp = value_compare())
|
||||
: c(), comp(__comp) {}
|
||||
priority_queue(const value_compare& __comp, const container_type& __c);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
explicit priority_queue(const value_compare& __comp, container_type&& __c);
|
||||
#endif
|
||||
template <class _InputIter>
|
||||
@@ -345,13 +347,13 @@ public:
|
||||
template <class _InputIter>
|
||||
priority_queue(_InputIter __f, _InputIter __l,
|
||||
const value_compare& __comp, const container_type& __c);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _InputIter>
|
||||
priority_queue(_InputIter __f, _InputIter __l,
|
||||
const value_compare& __comp, container_type&& __c);
|
||||
priority_queue(priority_queue&& __q);
|
||||
priority_queue& operator=(priority_queue&& __q);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _Alloc>
|
||||
explicit priority_queue(const _Alloc& __a,
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
@@ -369,7 +371,7 @@ public:
|
||||
priority_queue(const priority_queue& __q, const _Alloc& __a,
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
_Alloc>::value>::type* = 0);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _Alloc>
|
||||
priority_queue(const value_compare& __comp, container_type&& __c,
|
||||
const _Alloc& __a,
|
||||
@@ -379,17 +381,19 @@ public:
|
||||
priority_queue(priority_queue&& __q, const _Alloc& __a,
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
_Alloc>::value>::type* = 0);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
bool empty() const {return c.empty();}
|
||||
size_type size() const {return c.size();}
|
||||
const_reference top() const {return c.front();}
|
||||
|
||||
void push(const value_type& __v);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void push(value_type&& __v);
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args> void emplace(_Args&&... __args);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void pop();
|
||||
|
||||
void swap(priority_queue& __q);
|
||||
@@ -405,7 +409,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(const _Compare& __comp
|
||||
_STD::make_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
inline
|
||||
@@ -417,7 +421,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& _
|
||||
_STD::make_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
template <class _InputIter>
|
||||
@@ -443,7 +447,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _Input
|
||||
_STD::make_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
template <class _InputIter>
|
||||
@@ -475,7 +479,7 @@ priority_queue<_Tp, _Container, _Compare>::operator=(priority_queue&& __q)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
template <class _Alloc>
|
||||
@@ -526,7 +530,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(const priority_queue&
|
||||
_STD::make_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
template <class _Alloc>
|
||||
@@ -555,7 +559,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(priority_queue&& __q,
|
||||
_STD::make_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
inline
|
||||
@@ -566,7 +570,7 @@ priority_queue<_Tp, _Container, _Compare>::push(const value_type& __v)
|
||||
_STD::push_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
inline
|
||||
@@ -577,6 +581,8 @@ priority_queue<_Tp, _Container, _Compare>::push(value_type&& __v)
|
||||
_STD::push_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
template <class... _Args>
|
||||
inline
|
||||
@@ -587,7 +593,8 @@ priority_queue<_Tp, _Container, _Compare>::emplace(_Args&&... __args)
|
||||
_STD::push_heap(c.begin(), c.end(), comp);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Container, class _Compare>
|
||||
inline
|
||||
|
@@ -2685,10 +2685,10 @@ public:
|
||||
discard_block_engine() : __n_(0) {}
|
||||
explicit discard_block_engine(const _Engine& __e)
|
||||
: __e_(__e), __n_(0) {}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
explicit discard_block_engine(_Engine&& __e)
|
||||
: __e_(_STD::move(__e)), __n_(0) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
explicit discard_block_engine(result_type __sd) : __e_(__sd), __n_(0) {}
|
||||
template<class _Sseq> explicit discard_block_engine(_Sseq& __q,
|
||||
typename enable_if<!is_convertible<_Sseq, result_type>::value &&
|
||||
@@ -2872,10 +2872,10 @@ public:
|
||||
independent_bits_engine() {}
|
||||
explicit independent_bits_engine(const _Engine& __e)
|
||||
: __e_(__e) {}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
explicit independent_bits_engine(_Engine&& __e)
|
||||
: __e_(_STD::move(__e)) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
explicit independent_bits_engine(result_type __sd) : __e_(__sd) {}
|
||||
template<class _Sseq> explicit independent_bits_engine(_Sseq& __q,
|
||||
typename enable_if<!is_convertible<_Sseq, result_type>::value &&
|
||||
@@ -3080,10 +3080,10 @@ public:
|
||||
shuffle_order_engine() {__init();}
|
||||
explicit shuffle_order_engine(const _Engine& __e)
|
||||
: __e_(__e) {__init();}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
explicit shuffle_order_engine(_Engine&& __e)
|
||||
: __e_(_STD::move(__e)) {__init();}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
explicit shuffle_order_engine(result_type __sd) : __e_(__sd) {__init();}
|
||||
template<class _Sseq> explicit shuffle_order_engine(_Sseq& __q,
|
||||
typename enable_if<!is_convertible<_Sseq, result_type>::value &&
|
||||
|
@@ -5185,10 +5185,8 @@ public:
|
||||
explicit match_results(const allocator_type& __a = allocator_type());
|
||||
// match_results(const match_results&) = default;
|
||||
// match_results& operator=(const match_results&) = default;
|
||||
#ifdef _LIBCPP_MOVE
|
||||
// match_results(match_results&& __m) = default;
|
||||
// match_results& operator=(match_results&& __m) = default;
|
||||
#endif // _LIBCPP_MOVE
|
||||
// ~match_results() = default;
|
||||
|
||||
// size:
|
||||
|
@@ -107,7 +107,7 @@ template <class OuterA1, class OuterA2, class... InnerAllocs>
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
#if defined(_LIBCPP_MOVE) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE)
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE)
|
||||
|
||||
// scoped_allocator_adaptor
|
||||
|
||||
@@ -526,7 +526,7 @@ operator!=(const scoped_allocator_adaptor<_OuterA1, _InnerAllocs...>& __a,
|
||||
return !(__a == __b);
|
||||
}
|
||||
|
||||
#endif // defined(_LIBCPP_MOVE) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE)
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_ADVANCED_SFINAE)
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
||||
|
52
include/set
52
include/set
@@ -365,10 +365,10 @@ public:
|
||||
insert(__s.begin(), __s.end());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
set(set&& __s)
|
||||
: __tree_(_STD::move(__s.__tree_)) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
explicit set(const allocator_type& __a)
|
||||
: __tree_(__a) {}
|
||||
@@ -379,7 +379,7 @@ public:
|
||||
insert(__s.begin(), __s.end());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
set(set&& __s, const allocator_type& __a);
|
||||
#endif
|
||||
|
||||
@@ -402,13 +402,13 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
set& operator=(set&& __s)
|
||||
{
|
||||
__tree_ = _STD::move(__s.__tree_);
|
||||
return *this;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
iterator begin() {return __tree_.begin();}
|
||||
const_iterator begin() const {return __tree_.begin();}
|
||||
@@ -430,26 +430,26 @@ public:
|
||||
size_type max_size() const {return __tree_.max_size();}
|
||||
|
||||
// modifiers:
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
template <class... _Args>
|
||||
pair<iterator, bool> emplace(_Args&&... __args)
|
||||
{return __tree_.__emplace_unique(_STD::forward<_Args>(__args)...);}
|
||||
template <class... _Args>
|
||||
iterator emplace_hint(const_iterator __p, _Args&&... __args)
|
||||
{return __tree_.__emplace_hint_unique(__p, _STD::forward<_Args>(__args)...);}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
pair<iterator,bool> insert(const value_type& __v)
|
||||
{return __tree_.__insert_unique(__v);}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
pair<iterator,bool> insert(value_type&& __v)
|
||||
{return __tree_.__insert_unique(_STD::move(__v));}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator insert(const_iterator __p, const value_type& __v)
|
||||
{return __tree_.__insert_unique(__p, __v);}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator insert(const_iterator __p, value_type&& __v)
|
||||
{return __tree_.__insert_unique(__p, _STD::move(__v));}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __f, _InputIterator __l)
|
||||
{
|
||||
@@ -492,7 +492,7 @@ public:
|
||||
{return __tree_.__equal_range_unique(__k);}
|
||||
};
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Compare, class _Allocator>
|
||||
set<_Key, _Compare, _Allocator>::set(set&& __s, const allocator_type& __a)
|
||||
@@ -506,7 +506,7 @@ set<_Key, _Compare, _Allocator>::set(set&& __s, const allocator_type& __a)
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Compare, class _Allocator>
|
||||
inline
|
||||
@@ -631,10 +631,10 @@ public:
|
||||
insert(__s.begin(), __s.end());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
multiset(multiset&& __s)
|
||||
: __tree_(_STD::move(__s.__tree_)) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
explicit multiset(const allocator_type& __a)
|
||||
: __tree_(__a) {}
|
||||
multiset(const multiset& __s, const allocator_type& __a)
|
||||
@@ -642,7 +642,7 @@ public:
|
||||
{
|
||||
insert(__s.begin(), __s.end());
|
||||
}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
multiset(multiset&& __s, const allocator_type& __a);
|
||||
#endif
|
||||
|
||||
@@ -665,13 +665,13 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
multiset& operator=(multiset&& __s)
|
||||
{
|
||||
__tree_ = _STD::move(__s.__tree_);
|
||||
return *this;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
iterator begin() {return __tree_.begin();}
|
||||
const_iterator begin() const {return __tree_.begin();}
|
||||
@@ -693,26 +693,26 @@ public:
|
||||
size_type max_size() const {return __tree_.max_size();}
|
||||
|
||||
// modifiers:
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
template <class... _Args>
|
||||
iterator emplace(_Args&&... __args)
|
||||
{return __tree_.__emplace_multi(_STD::forward<_Args>(__args)...);}
|
||||
template <class... _Args>
|
||||
iterator emplace_hint(const_iterator __p, _Args&&... __args)
|
||||
{return __tree_.__emplace_hint_multi(__p, _STD::forward<_Args>(__args)...);}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
iterator insert(const value_type& __v)
|
||||
{return __tree_.__insert_multi(__v);}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator insert(value_type&& __v)
|
||||
{return __tree_.__insert_multi(_STD::move(__v));}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator insert(const_iterator __p, const value_type& __v)
|
||||
{return __tree_.__insert_multi(__p, __v);}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator insert(const_iterator __p, value_type&& __v)
|
||||
{return __tree_.__insert_multi(_STD::move(__v));}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __f, _InputIterator __l)
|
||||
{
|
||||
@@ -754,7 +754,7 @@ public:
|
||||
{return __tree_.__equal_range_multi(__k);}
|
||||
};
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Compare, class _Allocator>
|
||||
multiset<_Key, _Compare, _Allocator>::multiset(multiset&& __s, const allocator_type& __a)
|
||||
@@ -768,7 +768,7 @@ multiset<_Key, _Compare, _Allocator>::multiset(multiset&& __s, const allocator_t
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Compare, class _Allocator>
|
||||
inline
|
||||
|
@@ -206,12 +206,12 @@ public:
|
||||
explicit basic_stringbuf(ios_base::openmode __wch = ios_base::in | ios_base::out);
|
||||
explicit basic_stringbuf(const string_type& __s,
|
||||
ios_base::openmode __wch = ios_base::in | ios_base::out);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_stringbuf(basic_stringbuf&& __rhs);
|
||||
#endif
|
||||
|
||||
// 27.8.1.2 Assign and swap:
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_stringbuf& operator=(basic_stringbuf&& __rhs);
|
||||
#endif
|
||||
void swap(basic_stringbuf& __rhs);
|
||||
@@ -250,7 +250,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(const string_type&
|
||||
str(__s);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(basic_stringbuf&& __rhs)
|
||||
@@ -298,7 +298,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::operator=(basic_stringbuf&& __rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
void
|
||||
@@ -546,12 +546,12 @@ public:
|
||||
explicit basic_istringstream(ios_base::openmode __wch = ios_base::in);
|
||||
explicit basic_istringstream(const string_type& __s,
|
||||
ios_base::openmode __wch = ios_base::in);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_istringstream(basic_istringstream&& __rhs);
|
||||
|
||||
// 27.8.2.2 Assign and swap:
|
||||
basic_istringstream& operator=(basic_istringstream&& __rhs);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void swap(basic_istringstream& __rhs);
|
||||
|
||||
// 27.8.2.3 Members:
|
||||
@@ -577,7 +577,7 @@ basic_istringstream<_CharT, _Traits, _Allocator>::basic_istringstream(const stri
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -597,7 +597,7 @@ basic_istringstream<_CharT, _Traits, _Allocator>::operator=(basic_istringstream&
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -665,12 +665,12 @@ public:
|
||||
explicit basic_ostringstream(ios_base::openmode __wch = ios_base::out);
|
||||
explicit basic_ostringstream(const string_type& __s,
|
||||
ios_base::openmode __wch = ios_base::out);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_ostringstream(basic_ostringstream&& __rhs);
|
||||
|
||||
// 27.8.2.2 Assign and swap:
|
||||
basic_ostringstream& operator=(basic_ostringstream&& __rhs);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void swap(basic_ostringstream& __rhs);
|
||||
|
||||
// 27.8.2.3 Members:
|
||||
@@ -696,7 +696,7 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::basic_ostringstream(const stri
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -716,7 +716,7 @@ basic_ostringstream<_CharT, _Traits, _Allocator>::operator=(basic_ostringstream&
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -784,12 +784,12 @@ public:
|
||||
explicit basic_stringstream(ios_base::openmode __wch = ios_base::in | ios_base::out);
|
||||
explicit basic_stringstream(const string_type& __s,
|
||||
ios_base::openmode __wch = ios_base::in | ios_base::out);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_stringstream(basic_stringstream&& __rhs);
|
||||
|
||||
// 27.8.2.2 Assign and swap:
|
||||
basic_stringstream& operator=(basic_stringstream&& __rhs);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void swap(basic_stringstream& __rhs);
|
||||
|
||||
// 27.8.2.3 Members:
|
||||
@@ -815,7 +815,7 @@ basic_stringstream<_CharT, _Traits, _Allocator>::basic_stringstream(const string
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -835,7 +835,7 @@ basic_stringstream<_CharT, _Traits, _Allocator>::operator=(basic_stringstream&&
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
|
@@ -107,11 +107,11 @@ protected:
|
||||
public:
|
||||
stack() : c() {}
|
||||
explicit stack(const container_type& __c) : c(__c) {}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
explicit stack(container_type&& __c) : c(_STD::move(__c)) {}
|
||||
stack(stack&& __s) : c(_STD::move(__s.c)) {}
|
||||
stack& operator=(stack&& __s) {c = _STD::move(__s.c); return *this;}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _Alloc>
|
||||
explicit stack(const _Alloc& __a,
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
_Alloc>::value>::type* = 0)
|
||||
: c(__s.c, __a) {}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _Alloc>
|
||||
stack(container_type&& __c, const _Alloc& __a,
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
typename enable_if<uses_allocator<container_type,
|
||||
_Alloc>::value>::type* = 0)
|
||||
: c(_STD::move(__s.c), __a) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
bool empty() const {return c.empty();}
|
||||
size_type size() const {return c.size();}
|
||||
@@ -146,11 +146,13 @@ public:
|
||||
const_reference top() const {return c.back();}
|
||||
|
||||
void push(const value_type& __v) {c.push_back(__v);}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void push(value_type&& __v) {c.push_back(_STD::move(__v));}
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args> void emplace(_Args&&... __args)
|
||||
{c.emplace_back(_STD::forward<_Args>(__args)...);}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void pop() {c.pop_back();}
|
||||
|
||||
void swap(stack& __s)
|
||||
|
@@ -479,7 +479,7 @@ bool operator!=(const fpos<_StateT>& __x, const fpos<_StateT>& __y)
|
||||
// char_traits
|
||||
|
||||
template <class _CharT>
|
||||
struct char_traits
|
||||
struct _LIBCPP_VISIBLE char_traits
|
||||
{
|
||||
typedef _CharT char_type;
|
||||
typedef int int_type;
|
||||
@@ -591,7 +591,7 @@ char_traits<_CharT>::assign(char_type* __s, size_t __n, char_type __a)
|
||||
// char_traits<char>
|
||||
|
||||
template <>
|
||||
struct char_traits<char>
|
||||
struct _LIBCPP_VISIBLE char_traits<char>
|
||||
{
|
||||
typedef char char_type;
|
||||
typedef int int_type;
|
||||
@@ -933,7 +933,7 @@ __basic_string_common<__b>::__throw_out_of_range() const
|
||||
extern template class __basic_string_common<true>;
|
||||
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
class basic_string
|
||||
class _LIBCPP_VISIBLE basic_string
|
||||
: private __basic_string_common<true>
|
||||
{
|
||||
public:
|
||||
@@ -1031,10 +1031,10 @@ public:
|
||||
explicit basic_string(const allocator_type& __a);
|
||||
basic_string(const basic_string& __str);
|
||||
basic_string(const basic_string& __str, const allocator_type& __a);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_string(basic_string&& __str);
|
||||
basic_string(basic_string&& __str, const allocator_type& __a);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
basic_string(const_pointer __s);
|
||||
basic_string(const_pointer __s, const allocator_type& __a);
|
||||
basic_string(const_pointer __s, size_type __n);
|
||||
@@ -1053,7 +1053,7 @@ public:
|
||||
~basic_string();
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY basic_string& operator=(const basic_string& __str) {return assign(__str);}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY basic_string& operator=(basic_string&& __str) {swap(__str); return *this;}
|
||||
#endif
|
||||
_LIBCPP_INLINE_VISIBILITY basic_string& operator=(const_pointer __s) {return assign(__s);}
|
||||
@@ -1521,7 +1521,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __st
|
||||
__init(__str.__get_long_pointer(), __str.__get_long_size());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
@@ -1545,7 +1545,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str, co
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _CharT, class _Traits, class _Allocator>
|
||||
void
|
||||
@@ -3423,7 +3423,7 @@ operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, _CharT __rhs)
|
||||
return __r;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template<class _CharT, class _Traits, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
@@ -3483,7 +3483,7 @@ operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, _CharT __rhs)
|
||||
return _STD::move(__lhs);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
// swap
|
||||
|
||||
|
@@ -149,10 +149,10 @@ public:
|
||||
strstreambuf(unsigned char* __gnext, streamsize __n, unsigned char* __pbeg = 0);
|
||||
strstreambuf(const unsigned char* __gnext, streamsize __n);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
strstreambuf(strstreambuf&& __rhs);
|
||||
strstreambuf& operator=(strstreambuf&& __rhs);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
virtual ~strstreambuf();
|
||||
|
||||
@@ -200,7 +200,7 @@ public:
|
||||
istrstream(char* __s, streamsize __n)
|
||||
: istream(&__sb_), __sb_(__s, __n) {}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
istrstream(istrstream&& __rhs)
|
||||
: istream(_STD::move(__rhs)),
|
||||
__sb_(_STD::move(__rhs.__sb_))
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
__sb_ = _STD::move(__rhs.__sb_);
|
||||
return *this;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
virtual ~istrstream();
|
||||
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
__sb_(__s, __n, __s + (__mode & ios::app ? strlen(__s) : 0))
|
||||
{}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
ostrstream(ostrstream&& __rhs)
|
||||
: ostream(_STD::move(__rhs)),
|
||||
__sb_(_STD::move(__rhs.__sb_))
|
||||
@@ -256,7 +256,7 @@ public:
|
||||
__sb_ = _STD::move(__rhs.__sb_);
|
||||
return *this;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
virtual ~ostrstream();
|
||||
|
||||
@@ -293,7 +293,7 @@ public:
|
||||
__sb_(__s, __n, __s + (__mode & ios::app ? strlen(__s) : 0))
|
||||
{}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
strstream(strstream&& __rhs)
|
||||
: iostream(_STD::move(__rhs)),
|
||||
__sb_(_STD::move(__rhs.__sb_))
|
||||
@@ -307,7 +307,7 @@ public:
|
||||
__sb_ = _STD::move(__rhs.__sb_);
|
||||
return *this;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
virtual ~strstream();
|
||||
|
||||
|
@@ -103,6 +103,68 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
template <class _Tp>
|
||||
class __thread_specific_ptr
|
||||
{
|
||||
pthread_key_t __key_;
|
||||
|
||||
__thread_specific_ptr(const __thread_specific_ptr&);
|
||||
__thread_specific_ptr& operator=(const __thread_specific_ptr&);
|
||||
|
||||
static void __at_thread_exit(void*);
|
||||
public:
|
||||
typedef _Tp* pointer;
|
||||
|
||||
__thread_specific_ptr();
|
||||
~__thread_specific_ptr();
|
||||
|
||||
pointer get() const {return static_cast<_Tp*>(pthread_getspecific(__key_));}
|
||||
pointer operator*() const {return *get();}
|
||||
pointer operator->() const {return get();}
|
||||
pointer release();
|
||||
void reset(pointer __p = nullptr);
|
||||
};
|
||||
|
||||
template <class _Tp>
|
||||
void
|
||||
__thread_specific_ptr<_Tp>::__at_thread_exit(void* __p)
|
||||
{
|
||||
delete static_cast<pointer>(__p);
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
__thread_specific_ptr<_Tp>::__thread_specific_ptr()
|
||||
{
|
||||
int __ec = pthread_key_create(&__key_, &__thread_specific_ptr::__at_thread_exit);
|
||||
if (__ec)
|
||||
throw system_error(error_code(__ec, system_category()),
|
||||
"__thread_specific_ptr construction failed");
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
__thread_specific_ptr<_Tp>::~__thread_specific_ptr()
|
||||
{
|
||||
pthread_key_delete(__key_);
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
typename __thread_specific_ptr<_Tp>::pointer
|
||||
__thread_specific_ptr<_Tp>::release()
|
||||
{
|
||||
pointer __p = get();
|
||||
pthread_setspecific(__key_, 0);
|
||||
return __p;
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
void
|
||||
__thread_specific_ptr<_Tp>::reset(pointer __p)
|
||||
{
|
||||
pointer __p_old = get();
|
||||
pthread_setspecific(__key_, __p);
|
||||
delete __p_old;
|
||||
}
|
||||
|
||||
class thread;
|
||||
class __thread_id;
|
||||
|
||||
@@ -203,10 +265,10 @@ public:
|
||||
#endif
|
||||
~thread();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
thread(thread&& __t) : __t_(__t.__t_) {__t.__t_ = 0;}
|
||||
thread& operator=(thread&& __t);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void swap(thread& __t) {_STD::swap(__t_, __t.__t_);}
|
||||
|
||||
@@ -219,10 +281,31 @@ public:
|
||||
static unsigned hardware_concurrency();
|
||||
};
|
||||
|
||||
class __assoc_sub_state;
|
||||
|
||||
class __thread_struct_imp;
|
||||
|
||||
class __thread_struct
|
||||
{
|
||||
__thread_struct_imp* __p_;
|
||||
|
||||
__thread_struct(const __thread_struct&);
|
||||
__thread_struct& operator=(const __thread_struct&);
|
||||
public:
|
||||
__thread_struct();
|
||||
~__thread_struct();
|
||||
|
||||
void notify_all_at_thread_exit(condition_variable*, mutex*);
|
||||
void __make_ready_at_thread_exit(__assoc_sub_state*);
|
||||
};
|
||||
|
||||
extern __thread_specific_ptr<__thread_struct> __thread_local_data;
|
||||
|
||||
template <class _F>
|
||||
void*
|
||||
__thread_proxy(void* __vp)
|
||||
{
|
||||
__thread_local_data.reset(new __thread_struct);
|
||||
std::unique_ptr<_F> __p(static_cast<_F*>(__vp));
|
||||
(*__p)();
|
||||
return nullptr;
|
||||
@@ -260,7 +343,7 @@ thread::thread(_F __f)
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
inline
|
||||
thread&
|
||||
@@ -273,7 +356,7 @@ thread::operator=(thread&& __t)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
inline
|
||||
void swap(thread& __x, thread& __y) {__x.swap(__y);}
|
||||
|
@@ -34,7 +34,6 @@ namespace std
|
||||
template <class T> struct is_pointer;
|
||||
template <class T> struct is_lvalue_reference;
|
||||
template <class T> struct is_rvalue_reference;
|
||||
template <class T> struct is_reference;
|
||||
template <class T> struct is_member_object_pointer;
|
||||
template <class T> struct is_member_function_pointer;
|
||||
template <class T> struct is_enum;
|
||||
@@ -91,31 +90,37 @@ namespace std
|
||||
template <class T> struct is_empty;
|
||||
template <class T> struct is_polymorphic;
|
||||
template <class T> struct is_abstract;
|
||||
|
||||
template <class T, class... Args> struct is_constructible;
|
||||
template <class T, class... Args> struct is_nothrow_constructible;
|
||||
template <class T> struct has_default_constructor;
|
||||
template <class T> struct has_copy_constructor;
|
||||
template <class T> struct has_move_constructor;
|
||||
template <class T> struct has_copy_assign;
|
||||
template <class T> struct has_move_assign;
|
||||
|
||||
template <class T> struct has_trivial_default_constructor
|
||||
template <class T> struct has_trivial_copy_constructor;
|
||||
template <class T> struct has_trivial_move_constructor;
|
||||
template <class T> struct has_trivial_copy_assign;
|
||||
template <class T> struct has_trivial_move_assign;
|
||||
template <class T> struct has_trivial_destructor;
|
||||
template <class T> struct has_nothrow_default_constructor;
|
||||
template <class T> struct has_default_constructor;
|
||||
|
||||
template <class T> struct has_trivial_copy_constructor;
|
||||
template <class T> struct has_nothrow_copy_constructor;
|
||||
template <class T> struct has_copy_constructor;
|
||||
|
||||
template <class T> struct has_trivial_move_constructor;
|
||||
template <class T> struct has_nothrow_move_constructor;
|
||||
template <class T> struct has_move_constructor;
|
||||
|
||||
template <class T> struct has_trivial_copy_assign;
|
||||
template <class T> struct has_nothrow_copy_assign;
|
||||
template <class T> struct has_copy_assign;
|
||||
|
||||
template <class T> struct has_trivial_move_assign;
|
||||
template <class T> struct has_nothrow_move_assign;
|
||||
template <class T> struct has_move_assign;
|
||||
|
||||
template <class T> struct has_trivial_destructor;
|
||||
template <class T> struct has_virtual_destructor;
|
||||
|
||||
// Relationships between types:
|
||||
template <class T, class U> struct is_same;
|
||||
template <class Base, class Derived> struct is_base_of;
|
||||
template <class From, class To> struct is_convertible;
|
||||
template <class T> struct underlying_type;
|
||||
|
||||
// Alignment properties and transformations:
|
||||
template <class T> struct alignment_of;
|
||||
@@ -152,9 +157,12 @@ struct __two {char _[2];};
|
||||
template <class _Tp, _Tp __v>
|
||||
struct integral_constant
|
||||
{
|
||||
static const _Tp value = __v;
|
||||
static constexpr _Tp value = __v;
|
||||
typedef _Tp value_type;
|
||||
typedef integral_constant type;
|
||||
#ifndef _LIBCPP_HAS_NO_CONSTEXPR
|
||||
constexpr operator value_type() {return value;}
|
||||
#endif
|
||||
};
|
||||
|
||||
template <class _Tp, _Tp __v>
|
||||
@@ -246,31 +254,43 @@ template <class _Tp> struct is_lvalue_reference : public false_type {};
|
||||
template <class _Tp> struct is_lvalue_reference<_Tp&> : public true_type {};
|
||||
|
||||
template <class _Tp> struct is_rvalue_reference : public false_type {};
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _Tp> struct is_rvalue_reference<_Tp&&> : public true_type {};
|
||||
#endif
|
||||
|
||||
template <class _Tp> struct is_reference : public false_type {};
|
||||
template <class _Tp> struct is_reference<_Tp&> : public true_type {};
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _Tp> struct is_reference<_Tp&&> : public true_type {};
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
||||
#define _LIBCPP_HAS_TYPE_TRAITS
|
||||
#endif
|
||||
|
||||
// is_union
|
||||
|
||||
#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 3
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct is_union : public integral_constant<bool, __is_union(_Tp)> {};
|
||||
template <class _Tp> struct is_union
|
||||
: public integral_constant<bool, __is_union(_Tp)> {};
|
||||
|
||||
#else // __GNUC__ >= 4 && __GNUC_MINOR__ >= 3
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct __libcpp_union : public false_type {};
|
||||
template <class _Tp> struct is_union : public __libcpp_union<typename remove_cv<_Tp>::type> {};
|
||||
|
||||
#endif // __GNUC__ >= 4 && __GNUC_MINOR__ >= 3
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// is_class
|
||||
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct is_class
|
||||
: public integral_constant<bool, __is_class(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
namespace __is_class_imp
|
||||
{
|
||||
template <class _Tp> char __test(int _Tp::*);
|
||||
@@ -280,6 +300,8 @@ template <class _Tp> __two __test(...);
|
||||
template <class _Tp> struct is_class
|
||||
: public integral_constant<bool, sizeof(__is_class_imp::__test<_Tp>(0)) == 1 && !is_union<_Tp>::value> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// is_function
|
||||
|
||||
namespace __is_function_imp
|
||||
@@ -324,6 +346,13 @@ template <class _Tp> struct is_member_object_pointer
|
||||
|
||||
// is_enum
|
||||
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct is_enum
|
||||
: public integral_constant<bool, __is_enum(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct is_enum
|
||||
: public integral_constant<bool, !is_void<_Tp>::value &&
|
||||
!is_integral<_Tp>::value &&
|
||||
@@ -336,6 +365,8 @@ template <class _Tp> struct is_enum
|
||||
!is_class<_Tp>::value &&
|
||||
!is_function<_Tp>::value > {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// is_arithmetic
|
||||
|
||||
template <class _Tp> struct is_arithmetic
|
||||
@@ -400,7 +431,7 @@ template <class _Tp> struct add_cv {typedef typename add_const<typename add_vola
|
||||
|
||||
template <class _Tp> struct remove_reference {typedef _Tp type;};
|
||||
template <class _Tp> struct remove_reference<_Tp&> {typedef _Tp type;};
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _Tp> struct remove_reference<_Tp&&> {typedef _Tp type;};
|
||||
#endif
|
||||
|
||||
@@ -413,7 +444,7 @@ template <> struct add_lvalue_reference<const void> {typedef c
|
||||
template <> struct add_lvalue_reference<volatile void> {typedef volatile void type;};
|
||||
template <> struct add_lvalue_reference<const volatile void> {typedef const volatile void type;};
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp> struct add_rvalue_reference {typedef _Tp&& type;};
|
||||
template <> struct add_rvalue_reference<void> {typedef void type;};
|
||||
@@ -421,7 +452,26 @@ template <> struct add_rvalue_reference<const void> {typedef c
|
||||
template <> struct add_rvalue_reference<volatile void> {typedef volatile void type;};
|
||||
template <> struct add_rvalue_reference<const volatile void> {typedef const volatile void type;};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
typename add_rvalue_reference<_Tp>::type
|
||||
declval();
|
||||
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
typename add_lvalue_reference<_Tp>::type
|
||||
declval();
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
struct __any
|
||||
{
|
||||
__any(...);
|
||||
};
|
||||
|
||||
// remove_pointer
|
||||
|
||||
@@ -515,13 +565,13 @@ template <class _Tp> struct is_abstract : public __libcpp_abstract<_Tp> {};
|
||||
|
||||
namespace __is_convertible_imp
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _Tp> char __test(const volatile typename remove_reference<_Tp>::type&&);
|
||||
#else
|
||||
template <class _Tp> char __test(_Tp);
|
||||
#endif
|
||||
template <class _Tp> __two __test(...);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _Tp> _Tp&& __source();
|
||||
#else
|
||||
template <class _Tp> typename remove_reference<_Tp>::type& __source();
|
||||
@@ -561,12 +611,12 @@ struct __is_convertible
|
||||
template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 0> : false_type {};
|
||||
|
||||
template <class _T1> struct __is_convertible<_T1, const _T1&, 1, 0> : true_type {};
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _T1> struct __is_convertible<_T1, _T1&&, 1, 0> : true_type {};
|
||||
template <class _T1> struct __is_convertible<_T1, const _T1&&, 1, 0> : true_type {};
|
||||
template <class _T1> struct __is_convertible<_T1, volatile _T1&&, 1, 0> : true_type {};
|
||||
template <class _T1> struct __is_convertible<_T1, const volatile _T1&&, 1, 0> : true_type {};
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _T1, class _T2> struct __is_convertible<_T1, _T2*, 1, 0>
|
||||
: public integral_constant<bool, __is_convertible<typename remove_all_extents<_T1>::type*, _T2*>::value> {};
|
||||
@@ -581,7 +631,7 @@ template <class _T1, class _T2> struct __is_convertible<_T1, _T2* const volatile
|
||||
: public integral_constant<bool, __is_convertible<typename remove_all_extents<_T1>::type*, _T2*const volatile>::value> {};
|
||||
|
||||
template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 0> : public false_type {};
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _T1> struct __is_convertible<_T1, _T1&&, 2, 0> : public true_type {};
|
||||
#endif
|
||||
template <class _T1> struct __is_convertible<_T1, _T1*, 2, 0> : public true_type {};
|
||||
@@ -696,66 +746,144 @@ template <class _Tp> struct is_polymorphic : public __libcpp_polymorphic<_Tp> {}
|
||||
|
||||
// has_trivial_default_constructor
|
||||
|
||||
template <class _Tp> struct __has_trivial_default_constructor : public integral_constant<bool, is_scalar<_Tp>::value> {};
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_trivial_default_constructor
|
||||
: public integral_constant<bool, __has_trivial_constructor(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct __has_trivial_default_constructor
|
||||
: public integral_constant<bool, is_scalar<_Tp>::value> {};
|
||||
|
||||
template <class _Tp> struct has_trivial_default_constructor
|
||||
: public __has_trivial_default_constructor<typename remove_all_extents<_Tp>::type> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// has_nothrow_default_constructor
|
||||
|
||||
template <class _Tp> struct has_nothrow_default_constructor : public has_trivial_default_constructor<_Tp> {};
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_nothrow_default_constructor
|
||||
: public integral_constant<bool, __has_nothrow_constructor(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_nothrow_default_constructor
|
||||
: public has_trivial_default_constructor<_Tp> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// has_trivial_copy_constructor
|
||||
|
||||
template <class _Tp> struct __has_trivial_copy_constructor : public integral_constant<bool, is_scalar<_Tp>::value ||
|
||||
is_reference<_Tp>::value> {};
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_trivial_copy_constructor
|
||||
: public __has_trivial_copy_constructor<typename remove_all_extents<_Tp>::type> {};
|
||||
: public integral_constant<bool, __has_trivial_copy(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_trivial_copy_constructor
|
||||
: public integral_constant<bool, is_scalar<_Tp>::value ||
|
||||
is_reference<_Tp>::value> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// has_nothrow_copy_constructor
|
||||
|
||||
template <class _Tp> struct has_nothrow_copy_constructor : public has_trivial_copy_constructor<_Tp> {};
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_nothrow_copy_constructor
|
||||
: public integral_constant<bool, __has_nothrow_copy(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_nothrow_copy_constructor
|
||||
: public has_trivial_copy_constructor<_Tp> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// has_nothrow_move_constructor
|
||||
|
||||
template <class _Tp> struct has_nothrow_move_constructor : public has_nothrow_copy_constructor<_Tp> {};
|
||||
|
||||
// has_copy_constructor
|
||||
|
||||
template <class _Tp> struct has_copy_constructor : public true_type {};
|
||||
|
||||
// has_trivial_copy_assign
|
||||
|
||||
template <class _Tp> struct __libcpp_trivial_copy_assign : public integral_constant<bool, !is_const<_Tp>::value &&
|
||||
is_scalar<_Tp>::value> {};
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_trivial_copy_assign
|
||||
: public __libcpp_trivial_copy_assign<typename remove_all_extents<_Tp>::type> {};
|
||||
: public integral_constant<bool, __has_trivial_assign(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_trivial_copy_assign
|
||||
: public integral_constant<bool, is_scalar<_Tp>::value &&
|
||||
!is_const<_Tp>::value> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// has_nothrow_copy_assign
|
||||
|
||||
template <class _Tp> struct has_nothrow_copy_assign: public has_trivial_copy_assign<_Tp> {};
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_nothrow_copy_assign
|
||||
: public integral_constant<bool, __has_nothrow_assign(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_nothrow_copy_assign
|
||||
: public has_trivial_copy_assign<_Tp> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// has_trivial_destructor
|
||||
|
||||
template <class _Tp> struct __libcpp_trivial_destructor : public integral_constant<bool, is_scalar<_Tp>::value ||
|
||||
is_reference<_Tp>::value> {};
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_trivial_destructor
|
||||
: public integral_constant<bool, __has_trivial_destructor(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct __libcpp_trivial_destructor
|
||||
: public integral_constant<bool, is_scalar<_Tp>::value ||
|
||||
is_reference<_Tp>::value> {};
|
||||
|
||||
template <class _Tp> struct has_trivial_destructor
|
||||
: public __libcpp_trivial_destructor<typename remove_all_extents<_Tp>::type> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// has_virtual_destructor
|
||||
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_virtual_destructor
|
||||
: public integral_constant<bool, __has_virtual_destructor(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct has_virtual_destructor : public false_type {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// is_pod
|
||||
|
||||
#ifdef _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct is_pod
|
||||
: public integral_constant<bool, __is_pod(_Tp)> {};
|
||||
|
||||
#else // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
template <class _Tp> struct is_pod : public integral_constant<bool, has_trivial_default_constructor<_Tp>::value &&
|
||||
has_trivial_copy_constructor<_Tp>::value &&
|
||||
has_trivial_copy_assign<_Tp>::value &&
|
||||
has_trivial_destructor<_Tp>::value> {};
|
||||
|
||||
#endif // _LIBCPP_HAS_TYPE_TRAITS
|
||||
|
||||
// alignment_of
|
||||
|
||||
template <class _Tp> struct __alignment_of {_Tp _;};
|
||||
@@ -1083,13 +1211,13 @@ template <class _Tp, class _Up>
|
||||
struct common_type<_Tp, _Up, void>
|
||||
{
|
||||
private:
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
static _Tp&& __t();
|
||||
static _Up&& __u();
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
static _Tp __t();
|
||||
static _Up __u();
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
static bool __f();
|
||||
public:
|
||||
typedef decltype(__f() ? __t() : __u()) type;
|
||||
@@ -1124,9 +1252,47 @@ struct common_type<_Tp, _Up, _Vp...>
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Arg>
|
||||
decltype((_STD::declval<_Tp>() = _STD::declval<_Arg>(), true_type()))
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__is_assignable_test(_Tp&&, _Arg&&);
|
||||
#else
|
||||
__is_assignable_test(_Tp&, _Arg&);
|
||||
#endif
|
||||
|
||||
template <class _Arg>
|
||||
false_type
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__is_assignable_test(__any, _Arg&&);
|
||||
#else
|
||||
__is_assignable_test(__any, _Arg&);
|
||||
#endif
|
||||
|
||||
template <class _Tp, class _Arg>
|
||||
struct __is_assignable_imp
|
||||
: public common_type
|
||||
<
|
||||
decltype(__is_assignable_test(declval<_Tp>(), declval<_Arg>()))
|
||||
>::type {};
|
||||
|
||||
template <class _Tp, class _Arg>
|
||||
struct __is_assignable
|
||||
: public __is_assignable_imp<_Tp, _Arg> {};
|
||||
|
||||
// has_copy_assign
|
||||
|
||||
template <class _Tp> struct has_copy_assign
|
||||
: public __is_assignable<_Tp&, const _Tp&> {};
|
||||
|
||||
template <class _Tp> struct has_copy_assign<_Tp[]>
|
||||
: public false_type {};
|
||||
|
||||
template <class _Tp> struct has_copy_assign<_Tp&>
|
||||
: public false_type {};
|
||||
|
||||
// move
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -1180,7 +1346,7 @@ template <class _Tp,
|
||||
_Tp
|
||||
forward(typename remove_reference<_Tp>::type&& __t) = delete;
|
||||
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
class __rv
|
||||
@@ -1264,21 +1430,7 @@ forward(const _Up& __t)
|
||||
return _Tp(__rv<_Tp>(__t));
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp>
|
||||
typename add_rvalue_reference<_Tp>::type
|
||||
declval();
|
||||
|
||||
#else // _LIBCPP_MOVE
|
||||
|
||||
template <class _Tp>
|
||||
typename add_lvalue_reference<_Tp>::type
|
||||
declval();
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
struct decay
|
||||
@@ -1484,11 +1636,6 @@ template <class _Tp, class ..._Args>
|
||||
decltype(_STD::move(_Tp(_STD::declval<_Args>()...)), true_type())
|
||||
__is_constructible_test(_Tp&&, _Args&& ...);
|
||||
|
||||
struct __any
|
||||
{
|
||||
__any(...);
|
||||
};
|
||||
|
||||
template <class ..._Args>
|
||||
false_type
|
||||
__is_constructible_test(__any, _Args&& ...);
|
||||
@@ -1599,6 +1746,98 @@ struct __is_constructible<false, _A[], _Args...>
|
||||
: public false_type
|
||||
{};
|
||||
|
||||
template <class _Tp>
|
||||
struct has_default_constructor
|
||||
: public is_constructible<_Tp>
|
||||
{};
|
||||
|
||||
#else // _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
|
||||
// template <class T> struct is_constructible0;
|
||||
|
||||
// main is_constructible0 test
|
||||
|
||||
template <class _Tp>
|
||||
decltype((_STD::move(_Tp()), true_type()))
|
||||
__is_constructible0_test(_Tp&);
|
||||
|
||||
false_type
|
||||
__is_constructible0_test(__any);
|
||||
|
||||
template <bool, class _Tp>
|
||||
struct __is_constructible0_imp // false, _Tp is not a scalar
|
||||
: public common_type
|
||||
<
|
||||
decltype(__is_constructible0_test(declval<_Tp&>()))
|
||||
>::type
|
||||
{};
|
||||
|
||||
// handle scalars and reference types
|
||||
|
||||
// Scalars are default constructible, references are not
|
||||
|
||||
template <class _Tp>
|
||||
struct __is_constructible0_imp<true, _Tp>
|
||||
: public is_scalar<_Tp>
|
||||
{};
|
||||
|
||||
// Treat scalars and reference types separately
|
||||
|
||||
template <bool, class _Tp>
|
||||
struct __is_constructible0_void_check
|
||||
: public __is_constructible0_imp<is_scalar<_Tp>::value || is_reference<_Tp>::value,
|
||||
_Tp>
|
||||
{};
|
||||
|
||||
// If any of T or Args is void, is_constructible should be false
|
||||
|
||||
template <class _Tp>
|
||||
struct __is_constructible0_void_check<true, _Tp>
|
||||
: public false_type
|
||||
{};
|
||||
|
||||
// has_default_constructor entry point
|
||||
|
||||
template <class _Tp>
|
||||
struct has_default_constructor
|
||||
: public __is_constructible0_void_check<is_void<_Tp>::value
|
||||
|| is_abstract<_Tp>::value,
|
||||
_Tp>
|
||||
{};
|
||||
|
||||
// Array types are default constructible if their element type
|
||||
// is default constructible
|
||||
|
||||
template <class _A, size_t _N>
|
||||
struct __is_constructible0_imp<false, _A[_N]>
|
||||
: public has_default_constructor<typename remove_all_extents<_A>::type>
|
||||
{};
|
||||
|
||||
// Incomplete array types are not constructible
|
||||
|
||||
template <class _A>
|
||||
struct __is_constructible0_imp<false, _A[]>
|
||||
: public false_type
|
||||
{};
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
|
||||
// has_copy_constructor
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
|
||||
template <class _Tp>
|
||||
struct has_copy_constructor
|
||||
: public is_constructible<_Tp, typename add_lvalue_reference<const _Tp>::type>
|
||||
{};
|
||||
|
||||
#else // _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
|
||||
template <class _Tp>
|
||||
struct has_copy_constructor
|
||||
: public has_nothrow_copy_constructor<_Tp>
|
||||
{};
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE
|
||||
|
||||
template <class _Tp> struct __is_zero_default_constructible
|
||||
|
@@ -375,7 +375,7 @@ public:
|
||||
__second_constructed(false)
|
||||
{}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__hash_map_node_destructor(__hash_node_destructor<allocator_type>&& __x)
|
||||
: __na_(__x.__na_),
|
||||
__first_constructed(__x.__value_constructed),
|
||||
@@ -383,7 +383,7 @@ public:
|
||||
{
|
||||
__x.__value_constructed = false;
|
||||
}
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__hash_map_node_destructor(const __hash_node_destructor<allocator_type>& __x)
|
||||
: __na_(__x.__na_),
|
||||
__first_constructed(__x.__value_constructed),
|
||||
@@ -391,7 +391,7 @@ public:
|
||||
{
|
||||
const_cast<bool&>(__x.__value_constructed) = false;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void operator()(pointer __p)
|
||||
{
|
||||
@@ -573,10 +573,10 @@ public:
|
||||
explicit unordered_map(const allocator_type& __a);
|
||||
unordered_map(const unordered_map& __u);
|
||||
unordered_map(const unordered_map& __u, const allocator_type& __a);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unordered_map(unordered_map&& __u);
|
||||
unordered_map(unordered_map&& __u, const allocator_type& __a);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unordered_map(initializer_list<value_type> __il);
|
||||
unordered_map(initializer_list<value_type> __il, size_type __n,
|
||||
const hasher& __hf = hasher(), const key_equal& __eql = key_equal());
|
||||
@@ -585,7 +585,7 @@ public:
|
||||
const allocator_type& __a);
|
||||
// ~unordered_map() = default;
|
||||
// unordered_map& operator=(const unordered_map& __u) = default;
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unordered_map& operator=(unordered_map&& __u);
|
||||
#endif
|
||||
unordered_map& operator=(initializer_list<value_type> __il);
|
||||
@@ -604,7 +604,7 @@ public:
|
||||
const_iterator cbegin() const {return __table_.begin();}
|
||||
const_iterator cend() const {return __table_.end();}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
pair<iterator, bool> emplace()
|
||||
{return __table_.__emplace_unique();}
|
||||
|
||||
@@ -613,10 +613,14 @@ public:
|
||||
pair<iterator, bool> emplace(_A0&& __a0)
|
||||
{return __table_.__emplace_unique(_STD::forward<_A0>(__a0));}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _A0, class... _Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
pair<iterator, bool> emplace(_A0&& __a0, _Args&&... __args);
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
iterator emplace_hint(const_iterator)
|
||||
{return __table_.__emplace_unique().first;}
|
||||
|
||||
@@ -625,28 +629,31 @@ public:
|
||||
iterator emplace_hint(const_iterator, _A0&& __a0)
|
||||
{return __table_.__emplace_unique(_STD::forward<_A0>(__a0)).first;}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _A0, class... _Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
iterator emplace_hint(const_iterator, _A0&& __a0, _Args&&... __args)
|
||||
{return emplace(_STD::forward<_A0>(__a0),
|
||||
_STD::forward<_Args>(__args)...).first;}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
pair<iterator, bool> insert(const value_type& __x)
|
||||
{return __table_.__insert_unique(__x);}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _P,
|
||||
class = typename enable_if<is_convertible<_P, value_type>::value>::type>
|
||||
pair<iterator, bool> insert(_P&& __x)
|
||||
{return __table_.__insert_unique(_STD::forward<_P>(__x));}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator insert(const_iterator, const value_type& __x)
|
||||
{return insert(__x).first;}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _P,
|
||||
class = typename enable_if<is_convertible<_P, value_type>::value>::type>
|
||||
iterator insert(const_iterator, _P&& __x)
|
||||
{return insert(_STD::forward<_P>(__x)).first;}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __first, _InputIterator __last);
|
||||
void insert(initializer_list<value_type> __il)
|
||||
@@ -674,7 +681,7 @@ public:
|
||||
{return __table_.__equal_range_unique(__k);}
|
||||
|
||||
mapped_type& operator[](const key_type& __k);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
mapped_type& operator[](key_type&& __k);
|
||||
#endif
|
||||
|
||||
@@ -702,14 +709,16 @@ public:
|
||||
void reserve(size_type __n) {__table_.reserve(__n);}
|
||||
|
||||
private:
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class _A0, class... _Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
__node_holder __construct_node(_A0&& __a0, _Args&&... __args);
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class _A0,
|
||||
class = typename enable_if<is_convertible<_A0, value_type>::value>::type>
|
||||
__node_holder __construct_node(_A0&& __a0);
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__node_holder __construct_node(const key_type& __k);
|
||||
#endif
|
||||
};
|
||||
@@ -787,7 +796,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
|
||||
insert(__u.begin(), __u.end());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -812,7 +821,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
|
||||
@@ -841,7 +850,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
|
||||
insert(__il.begin(), __il.end());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -852,7 +861,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_map&& __u)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -864,7 +873,8 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _A0, class... _Args,
|
||||
@@ -885,6 +895,8 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(_A0&& __a0,
|
||||
return __h;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _A0,
|
||||
class // = typename enable_if<is_convertible<_A0, value_type>::value>::type
|
||||
@@ -901,6 +913,8 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(_A0&& __a0)
|
||||
return __h;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _A0, class... _Args,
|
||||
class // = typename enable_if<is_convertible<_A0, key_type>::value>::type
|
||||
@@ -916,7 +930,8 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::emplace(_A0&& __a0, _Args&&... _
|
||||
return __r;
|
||||
}
|
||||
|
||||
#else // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
typename unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__node_holder
|
||||
@@ -931,7 +946,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(const key_type&
|
||||
return _STD::move(__h);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _InputIterator>
|
||||
@@ -957,7 +972,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type& __k)
|
||||
return __r.first->second;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
_Tp&
|
||||
@@ -972,7 +987,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](key_type&& __k)
|
||||
return __r.first->second;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
_Tp&
|
||||
@@ -1104,10 +1119,10 @@ public:
|
||||
explicit unordered_multimap(const allocator_type& __a);
|
||||
unordered_multimap(const unordered_multimap& __u);
|
||||
unordered_multimap(const unordered_multimap& __u, const allocator_type& __a);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unordered_multimap(unordered_multimap&& __u);
|
||||
unordered_multimap(unordered_multimap&& __u, const allocator_type& __a);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unordered_multimap(initializer_list<value_type> __il);
|
||||
unordered_multimap(initializer_list<value_type> __il, size_type __n,
|
||||
const hasher& __hf = hasher(),
|
||||
@@ -1117,7 +1132,7 @@ public:
|
||||
const allocator_type& __a);
|
||||
// ~unordered_multimap() = default;
|
||||
// unordered_multimap& operator=(const unordered_multimap& __u) = default;
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unordered_multimap& operator=(unordered_multimap&& __u);
|
||||
#endif
|
||||
unordered_multimap& operator=(initializer_list<value_type> __il);
|
||||
@@ -1136,7 +1151,7 @@ public:
|
||||
const_iterator cbegin() const {return __table_.begin();}
|
||||
const_iterator cend() const {return __table_.end();}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator emplace()
|
||||
{return __table_.__emplace_multi();}
|
||||
|
||||
@@ -1145,10 +1160,14 @@ public:
|
||||
iterator emplace(_A0&& __a0)
|
||||
{return __table_.__emplace_multi(_STD::forward<_A0>(__a0));}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _A0, class... _Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
iterator emplace(_A0&& __a0, _Args&&... __args);
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
iterator emplace_hint(const_iterator __p)
|
||||
{return __table_.__emplace_hint_multi(__p.__i_);}
|
||||
|
||||
@@ -1157,25 +1176,28 @@ public:
|
||||
iterator emplace_hint(const_iterator __p, _A0&& __a0)
|
||||
{return __table_.__emplace_hint_multi(__p.__i_, _STD::forward<_A0>(__a0));}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _A0, class... _Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
iterator emplace_hint(const_iterator __p, _A0&& __a0, _Args&&... __args);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _P,
|
||||
class = typename enable_if<is_convertible<_P, value_type>::value>::type>
|
||||
iterator insert(_P&& __x)
|
||||
{return __table_.__insert_multi(_STD::forward<_P>(__x));}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator insert(const_iterator __p, const value_type& __x)
|
||||
{return __table_.__insert_multi(__p.__i_, __x);}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _P,
|
||||
class = typename enable_if<is_convertible<_P, value_type>::value>::type>
|
||||
iterator insert(const_iterator __p, _P&& __x)
|
||||
{return __table_.__insert_multi(__p.__i_, _STD::forward<_P>(__x));}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __first, _InputIterator __last);
|
||||
void insert(initializer_list<value_type> __il)
|
||||
@@ -1223,14 +1245,14 @@ public:
|
||||
void reserve(size_type __n) {__table_.reserve(__n);}
|
||||
|
||||
private:
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
template <class _A0, class... _Args,
|
||||
class = typename enable_if<is_convertible<_A0, key_type>::value>::type>
|
||||
__node_holder __construct_node(_A0&& __a0, _Args&&... __args);
|
||||
template <class _A0,
|
||||
class = typename enable_if<is_convertible<_A0, value_type>::value>::type>
|
||||
__node_holder __construct_node(_A0&& __a0);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
};
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
@@ -1306,7 +1328,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
|
||||
insert(__u.begin(), __u.end());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -1333,7 +1355,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
|
||||
@@ -1362,7 +1384,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
|
||||
insert(__il.begin(), __il.end());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -1373,7 +1395,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_multima
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -1385,7 +1407,8 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _A0, class... _Args,
|
||||
@@ -1406,6 +1429,8 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(
|
||||
return __h;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _A0,
|
||||
class // = typename enable_if<is_convertible<_A0, value_type>::value>::type
|
||||
@@ -1422,6 +1447,8 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(_A0&& __a0
|
||||
return __h;
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _A0, class... _Args,
|
||||
class // = typename enable_if<is_convertible<_A0, key_type>::value>::type
|
||||
@@ -1451,7 +1478,8 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::emplace_hint(
|
||||
return __r;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
|
||||
template <class _InputIterator>
|
||||
|
@@ -317,10 +317,10 @@ public:
|
||||
explicit unordered_set(const allocator_type& __a);
|
||||
unordered_set(const unordered_set& __u);
|
||||
unordered_set(const unordered_set& __u, const allocator_type& __a);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unordered_set(unordered_set&& __u);
|
||||
unordered_set(unordered_set&& __u, const allocator_type& __a);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unordered_set(initializer_list<value_type> __il);
|
||||
unordered_set(initializer_list<value_type> __il, size_type __n,
|
||||
const hasher& __hf = hasher(),
|
||||
@@ -330,7 +330,7 @@ public:
|
||||
const allocator_type& __a);
|
||||
// ~unordered_set() = default;
|
||||
// unordered_set& operator=(const unordered_set& __u) = default;
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unordered_set& operator=(unordered_set&& __u);
|
||||
#endif
|
||||
unordered_set& operator=(initializer_list<value_type> __il);
|
||||
@@ -349,26 +349,26 @@ public:
|
||||
const_iterator cbegin() const {return __table_.begin();}
|
||||
const_iterator cend() const {return __table_.end();}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
template <class... _Args>
|
||||
pair<iterator, bool> emplace(_Args&&... __args)
|
||||
{return __table_.__emplace_unique(_STD::forward<_Args>(__args)...);}
|
||||
template <class... _Args>
|
||||
iterator emplace_hint(const_iterator, _Args&&... __args)
|
||||
{return __table_.__emplace_unique(_STD::forward<_Args>(__args)...).first;}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
pair<iterator, bool> insert(const value_type& __x)
|
||||
{return __table_.__insert_unique(__x);}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
pair<iterator, bool> insert(value_type&& __x)
|
||||
{return __table_.__insert_unique(_STD::move(__x));}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator insert(const_iterator, const value_type& __x)
|
||||
{return insert(__x).first;}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator insert(const_iterator, value_type&& __x)
|
||||
{return insert(_STD::move(__x)).first;}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __first, _InputIterator __last);
|
||||
void insert(initializer_list<value_type> __il)
|
||||
@@ -485,7 +485,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
|
||||
insert(__u.begin(), __u.end());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -508,7 +508,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
|
||||
@@ -537,7 +537,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
|
||||
insert(__il.begin(), __il.end());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -548,7 +548,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(unordered_set&& __u)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -656,10 +656,10 @@ public:
|
||||
explicit unordered_multiset(const allocator_type& __a);
|
||||
unordered_multiset(const unordered_multiset& __u);
|
||||
unordered_multiset(const unordered_multiset& __u, const allocator_type& __a);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unordered_multiset(unordered_multiset&& __u);
|
||||
unordered_multiset(unordered_multiset&& __u, const allocator_type& __a);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unordered_multiset(initializer_list<value_type> __il);
|
||||
unordered_multiset(initializer_list<value_type> __il, size_type __n,
|
||||
const hasher& __hf = hasher(),
|
||||
@@ -669,7 +669,7 @@ public:
|
||||
const allocator_type& __a);
|
||||
// ~unordered_multiset() = default;
|
||||
// unordered_multiset& operator=(const unordered_multiset& __u) = default;
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
unordered_multiset& operator=(unordered_multiset&& __u);
|
||||
#endif
|
||||
unordered_multiset& operator=(initializer_list<value_type> __il);
|
||||
@@ -688,24 +688,24 @@ public:
|
||||
const_iterator cbegin() const {return __table_.begin();}
|
||||
const_iterator cend() const {return __table_.end();}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
template <class... _Args>
|
||||
iterator emplace(_Args&&... __args)
|
||||
{return __table_.__emplace_multi(_STD::forward<_Args>(__args)...);}
|
||||
template <class... _Args>
|
||||
iterator emplace_hint(const_iterator __p, _Args&&... __args)
|
||||
{return __table_.__emplace_hint_multi(__p, _STD::forward<_Args>(__args)...);}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
|
||||
iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator insert(value_type&& __x) {return __table_.__insert_multi(_STD::move(__x));}
|
||||
#endif
|
||||
iterator insert(const_iterator __p, const value_type& __x)
|
||||
{return __table_.__insert_multi(__p, __x);}
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator insert(const_iterator __p, value_type&& __x)
|
||||
{return __table_.__insert_multi(__p, _STD::move(__x));}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template <class _InputIterator>
|
||||
void insert(_InputIterator __first, _InputIterator __last);
|
||||
void insert(initializer_list<value_type> __il)
|
||||
@@ -823,7 +823,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
|
||||
insert(__u.begin(), __u.end());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -846,7 +846,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
|
||||
@@ -875,7 +875,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
|
||||
insert(__il.begin(), __il.end());
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
@@ -887,7 +887,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::operator=(
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Value, class _Hash, class _Pred, class _Alloc>
|
||||
inline
|
||||
|
@@ -171,14 +171,14 @@ swap(_Tp (&__a)[_N], _Tp (&__b)[_N])
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typename conditional
|
||||
<
|
||||
!has_nothrow_move_constructor<_Tp>::value && has_copy_constructor<_Tp>::value,
|
||||
const _Tp&,
|
||||
_Tp&&
|
||||
>::type
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
const _Tp&
|
||||
#endif
|
||||
move_if_noexcept(_Tp& __x)
|
||||
@@ -207,7 +207,7 @@ struct pair
|
||||
_LIBCPP_INLINE_VISIBILITY pair(const _T1& __x, const _T2& __y)
|
||||
: first(__x), second(__y) {}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _U1, class _U2,
|
||||
class = typename enable_if<is_convertible<_U1, first_type >::value &&
|
||||
@@ -253,11 +253,11 @@ struct pair
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
template<class _U1, class _U2>
|
||||
_LIBCPP_INLINE_VISIBILITY pair(const pair<_U1, _U2>& __p)
|
||||
: first(__p.first), second(__p.second) {}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void _LIBCPP_INLINE_VISIBILITY swap(pair& __p) {_STD::swap(*this, __p);}
|
||||
private:
|
||||
|
||||
@@ -326,7 +326,7 @@ swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
|
||||
swap(__x.second, __y.second);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp> class reference_wrapper;
|
||||
|
||||
@@ -357,7 +357,7 @@ make_pair(_T1&& __t1, _T2&& __t2)
|
||||
(_STD::forward<_T1>(__t1), _STD::forward<_T2>(__t2));
|
||||
}
|
||||
|
||||
#else // _LIBCPP_MOVE
|
||||
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _T1, class _T2>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
@@ -367,7 +367,7 @@ make_pair(_T1 __x, _T2 __y)
|
||||
return pair<_T1, _T2>(__x, __y);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
|
@@ -795,10 +795,10 @@ public:
|
||||
valarray(const value_type& __x, size_t __n);
|
||||
valarray(const value_type* __p, size_t __n);
|
||||
valarray(const valarray& __v);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
valarray(valarray&& __v);
|
||||
valarray(initializer_list<value_type> __il);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
valarray(const slice_array<value_type>& __sa);
|
||||
valarray(const gslice_array<value_type>& __ga);
|
||||
valarray(const mask_array<value_type>& __ma);
|
||||
@@ -807,10 +807,10 @@ public:
|
||||
|
||||
// assignment:
|
||||
valarray& operator=(const valarray& __v);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
valarray& operator=(valarray&& __v);
|
||||
valarray& operator=(initializer_list<value_type>);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
valarray& operator=(const value_type& __x);
|
||||
valarray& operator=(const slice_array<value_type>& __sa);
|
||||
valarray& operator=(const gslice_array<value_type>& __ga);
|
||||
@@ -829,22 +829,22 @@ public:
|
||||
slice_array<value_type> operator[](slice __s);
|
||||
__val_expr<__indirect_expr<const valarray&> > operator[](const gslice& __gs) const;
|
||||
gslice_array<value_type> operator[](const gslice& __gs);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__val_expr<__indirect_expr<const valarray&> > operator[](gslice&& __gs) const;
|
||||
gslice_array<value_type> operator[](gslice&& __gs);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__val_expr<__mask_expr<const valarray&> > operator[](const valarray<bool>& __vb) const;
|
||||
mask_array<value_type> operator[](const valarray<bool>& __vb);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__val_expr<__mask_expr<const valarray&> > operator[](valarray<bool>&& __vb) const;
|
||||
mask_array<value_type> operator[](valarray<bool>&& __vb);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__val_expr<__indirect_expr<const valarray&> > operator[](const valarray<size_t>& __vs) const;
|
||||
indirect_array<value_type> operator[](const valarray<size_t>& __vs);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
__val_expr<__indirect_expr<const valarray&> > operator[](valarray<size_t>&& __vs) const;
|
||||
indirect_array<value_type> operator[](valarray<size_t>&& __vs);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
// unary operators:
|
||||
valarray operator+() const;
|
||||
@@ -1395,7 +1395,7 @@ public:
|
||||
__stride_(__stride)
|
||||
{__init(__start);}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
gslice(size_t __start, const valarray<size_t>& __size,
|
||||
@@ -1418,7 +1418,7 @@ public:
|
||||
__stride_(move(__stride))
|
||||
{__init(__start);}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
// gslice(const gslice&) = default;
|
||||
// gslice(gslice&&) = default;
|
||||
@@ -1559,7 +1559,7 @@ private:
|
||||
__1d_(__gs.__1d_)
|
||||
{}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
gslice_array(gslice&& __gs, const valarray<value_type>& __v)
|
||||
@@ -1567,7 +1567,7 @@ private:
|
||||
__1d_(move(__gs.__1d_))
|
||||
{}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class> friend class valarray;
|
||||
};
|
||||
@@ -2232,7 +2232,7 @@ private:
|
||||
__1d_(__ia)
|
||||
{}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
indirect_array(valarray<size_t>&& __ia, const valarray<value_type>& __v)
|
||||
@@ -2240,7 +2240,7 @@ private:
|
||||
__1d_(move(__ia))
|
||||
{}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class> friend class valarray;
|
||||
};
|
||||
@@ -2450,14 +2450,14 @@ private:
|
||||
__1d_(__ia)
|
||||
{}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
__indirect_expr(valarray<size_t>&& __ia, const _RmExpr& __e)
|
||||
: __expr_(__e),
|
||||
__1d_(move(__ia))
|
||||
{}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
public:
|
||||
_LIBCPP_ALWAYS_INLINE
|
||||
@@ -2691,7 +2691,7 @@ valarray<_Tp>::valarray(const valarray& __v)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_ALWAYS_INLINE
|
||||
@@ -2728,7 +2728,7 @@ valarray<_Tp>::valarray(initializer_list<value_type> __il)
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
valarray<_Tp>::valarray(const slice_array<value_type>& __sa)
|
||||
@@ -2863,7 +2863,7 @@ valarray<_Tp>::operator=(const valarray& __v)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_ALWAYS_INLINE
|
||||
@@ -2889,7 +2889,7 @@ valarray<_Tp>::operator=(initializer_list<value_type> __il)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_ALWAYS_INLINE
|
||||
@@ -2986,7 +2986,7 @@ valarray<_Tp>::operator[](const gslice& __gs)
|
||||
return gslice_array<value_type>(__gs, *this);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_ALWAYS_INLINE
|
||||
@@ -3004,7 +3004,7 @@ valarray<_Tp>::operator[](gslice&& __gs)
|
||||
return gslice_array<value_type>(move(__gs), *this);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_ALWAYS_INLINE
|
||||
@@ -3022,7 +3022,7 @@ valarray<_Tp>::operator[](const valarray<bool>& __vb)
|
||||
return mask_array<value_type>(__vb, *this);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_ALWAYS_INLINE
|
||||
@@ -3040,7 +3040,7 @@ valarray<_Tp>::operator[](valarray<bool>&& __vb)
|
||||
return mask_array<value_type>(move(__vb), *this);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_ALWAYS_INLINE
|
||||
@@ -3058,7 +3058,7 @@ valarray<_Tp>::operator[](const valarray<size_t>& __vs)
|
||||
return indirect_array<value_type>(__vs, *this);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
inline _LIBCPP_ALWAYS_INLINE
|
||||
@@ -3076,7 +3076,7 @@ valarray<_Tp>::operator[](valarray<size_t>&& __vs)
|
||||
return indirect_array<value_type>(move(__vs), *this);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp>
|
||||
valarray<_Tp>
|
||||
|
@@ -419,7 +419,7 @@ __vector_base<_Tp, _Allocator>::~__vector_base()
|
||||
}
|
||||
|
||||
template <class _Tp, class _Allocator = allocator<_Tp> >
|
||||
class vector
|
||||
class _LIBCPP_VISIBLE vector
|
||||
: private __vector_base<_Tp, _Allocator>
|
||||
{
|
||||
private:
|
||||
@@ -484,11 +484,11 @@ public:
|
||||
vector(const vector& __x);
|
||||
vector(const vector& __x, const allocator_type& __a);
|
||||
vector& operator=(const vector& __x);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
vector(vector&& __x);
|
||||
vector(vector&& __x, const allocator_type& __a);
|
||||
vector& operator=(vector&& __x);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
vector& operator=(initializer_list<value_type> __il)
|
||||
{assign(__il.begin(), __il.end()); return *this;}
|
||||
|
||||
@@ -552,19 +552,23 @@ public:
|
||||
{return _STD::__to_raw_pointer(this->__begin_);}
|
||||
|
||||
void push_back(const_reference __x);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void push_back(value_type&& __x);
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args>
|
||||
void emplace_back(_Args&&... __args);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
void pop_back();
|
||||
|
||||
iterator insert(const_iterator __position, const_reference __x);
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator insert(const_iterator __position, value_type&& __x);
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args>
|
||||
iterator emplace(const_iterator __position, _Args&&... __args);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
iterator insert(const_iterator __position, size_type __n, const_reference __x);
|
||||
template <class _InputIterator>
|
||||
typename enable_if
|
||||
@@ -951,7 +955,7 @@ vector<_Tp, _Allocator>::vector(const vector& __x, const allocator_type& __a)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
@@ -1043,7 +1047,7 @@ vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type)
|
||||
__c.__begin_ = __c.__end_ = __c.__end_cap() = nullptr;
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
@@ -1283,7 +1287,7 @@ vector<_Tp, _Allocator>::push_back(const_reference __x)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
void
|
||||
@@ -1305,6 +1309,8 @@ vector<_Tp, _Allocator>::push_back(value_type&& __x)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class... _Args>
|
||||
void
|
||||
@@ -1326,7 +1332,8 @@ vector<_Tp, _Allocator>::emplace_back(_Args&&... __args)
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
@@ -1402,7 +1409,7 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, const_reference __x)
|
||||
return __make_iter(__p);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
typename vector<_Tp, _Allocator>::iterator
|
||||
@@ -1434,6 +1441,8 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, value_type&& __x)
|
||||
return __make_iter(__p);
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
template <class... _Args>
|
||||
typename vector<_Tp, _Allocator>::iterator
|
||||
@@ -1465,7 +1474,8 @@ vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args)
|
||||
return __make_iter(__p);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Tp, class _Allocator>
|
||||
typename vector<_Tp, _Allocator>::iterator
|
||||
@@ -1672,7 +1682,7 @@ template <class _Allocator> class vector<bool, _Allocator>;
|
||||
template <class _Allocator> struct hash<vector<bool, _Allocator> >;
|
||||
|
||||
template <class _Allocator>
|
||||
class vector<bool, _Allocator>
|
||||
class _LIBCPP_VISIBLE vector<bool, _Allocator>
|
||||
: private __vector_base_common<true>
|
||||
{
|
||||
public:
|
||||
@@ -1761,11 +1771,11 @@ public:
|
||||
vector(initializer_list<value_type> __il);
|
||||
vector(initializer_list<value_type> __il, const allocator_type& __a);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
vector(vector&& __v);
|
||||
vector(vector&& __v, const allocator_type& __a);
|
||||
vector& operator=(vector&& __v);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
vector& operator=(initializer_list<value_type> __il)
|
||||
{assign(__il.begin(), __il.end()); return *this;}
|
||||
|
||||
@@ -2272,7 +2282,8 @@ vector<bool, _Allocator>::operator=(const vector& __v)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Allocator>
|
||||
_LIBCPP_INLINE_VISIBILITY inline
|
||||
vector<bool, _Allocator>::vector(vector&& __v)
|
||||
@@ -2337,7 +2348,8 @@ vector<bool, _Allocator>::__move_assign(vector& __c, true_type)
|
||||
__c.__begin_ = nullptr;
|
||||
__c.__cap() = __c.__size_ = 0;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class _Allocator>
|
||||
void
|
||||
|
41
lib/buildit
41
lib/buildit
@@ -17,6 +17,16 @@ then
|
||||
CXX=g++
|
||||
fi
|
||||
|
||||
if [ -z $MACOSX_DEPLOYMENT_TARGET ]
|
||||
then
|
||||
MACOSX_DEPLOYMENT_TARGET=10.6
|
||||
fi
|
||||
|
||||
if [ -z $RC_ProjectSourceVersion ]
|
||||
then
|
||||
RC_ProjectSourceVersion=1
|
||||
fi
|
||||
|
||||
case $TRIPLE in
|
||||
*-apple-*)
|
||||
if [ -z $RC_BUILDIT ]
|
||||
@@ -24,12 +34,28 @@ case $TRIPLE in
|
||||
RC_CFLAGS="-arch i386 -arch x86_64"
|
||||
fi
|
||||
SOEXT=dylib
|
||||
LDSHARED_FLAGS="-o libc++.1.dylib \
|
||||
-dynamiclib -nodefaultlibs -current_version 1 \
|
||||
-compatibility_version 1 \
|
||||
-install_name /usr/lib/libc++.dylib \
|
||||
-Wl,-reexport_library,/usr/lib/libc++abi.dylib \
|
||||
/usr/lib/libSystem.B.dylib"
|
||||
if [ "$MACOSX_DEPLOYMENT_TARGET" == "10.6" ]
|
||||
then
|
||||
LDSHARED_FLAGS="-o libc++.1.dylib \
|
||||
-dynamiclib -nodefaultlibs -current_version 1 \
|
||||
-compatibility_version 1 \
|
||||
-install_name /usr/lib/libc++.dylib \
|
||||
-Wl,-reexport_library,/usr/lib/libc++abi.dylib \
|
||||
/usr/lib/libSystem.B.dylib"
|
||||
else
|
||||
LDSHARED_FLAGS="-o libc++.1.dylib \
|
||||
-dynamiclib -nodefaultlibs \
|
||||
-current_version ${RC_ProjectSourceVersion} -compatibility_version 1 \
|
||||
-install_name /usr/lib/libc++.dylib \
|
||||
${SDKROOT}/usr/lib/libc++abi.dylib \
|
||||
-lSystem \
|
||||
-Xarch_x86_64 -exported_symbols_list \
|
||||
-Xarch_x86_64 x86_64.exp \
|
||||
-Xarch_i386 -exported_symbols_list \
|
||||
-Xarch_i386 i386.exp \
|
||||
-exported_symbols_list libc++abi.exp \
|
||||
-Wl,-force_symbols_not_weak_list,notweak.exp"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
RC_CFLAGS="-fPIC"
|
||||
@@ -51,7 +77,8 @@ for FILE in ../src/*.cpp; do
|
||||
$CXX -c -g -Os $RC_CFLAGS -nostdinc++ -I../include $FILE
|
||||
done
|
||||
|
||||
$CXX *.o $RC_CFLAGS $LDSHARED_FLAGS
|
||||
|
||||
$CXX *.o $RC_CFLAGS $LDSHARED_FLAGS
|
||||
|
||||
#libtool -static -o libc++.a *.o
|
||||
|
||||
|
2262
lib/i386.exp
Normal file
2262
lib/i386.exp
Normal file
File diff suppressed because it is too large
Load Diff
150
lib/libc++abi.exp
Normal file
150
lib/libc++abi.exp
Normal file
@@ -0,0 +1,150 @@
|
||||
___cxa_allocate_exception
|
||||
___cxa_end_catch
|
||||
___cxa_demangle
|
||||
___cxa_current_exception_type
|
||||
___cxa_call_unexpected
|
||||
___cxa_free_exception
|
||||
___cxa_get_exception_ptr
|
||||
___cxa_get_globals
|
||||
___cxa_get_globals_fast
|
||||
___cxa_guard_abort
|
||||
___cxa_guard_acquire
|
||||
___cxa_guard_release
|
||||
___cxa_rethrow
|
||||
___cxa_pure_virtual
|
||||
___cxa_begin_catch
|
||||
___cxa_throw
|
||||
___cxa_vec_cctor
|
||||
___cxa_vec_cleanup
|
||||
___cxa_vec_ctor
|
||||
___cxa_vec_delete
|
||||
___cxa_vec_delete2
|
||||
___cxa_vec_delete3
|
||||
___cxa_vec_dtor
|
||||
___cxa_vec_new
|
||||
___cxa_vec_new2
|
||||
___cxa_vec_new3
|
||||
___dynamic_cast
|
||||
___gxx_personality_v0
|
||||
__ZTSPm
|
||||
__ZTSPl
|
||||
__ZTSPj
|
||||
__ZTSPi
|
||||
__ZTSPh
|
||||
__ZTSPf
|
||||
__ZTSPe
|
||||
__ZTSPd
|
||||
__ZTSPc
|
||||
__ZTSPb
|
||||
__ZTSPa
|
||||
__ZTSPKc
|
||||
__ZTSPKy
|
||||
__ZTSPKx
|
||||
__ZTSPKw
|
||||
__ZTSPKv
|
||||
__ZTSPKt
|
||||
__ZTSPKs
|
||||
__ZTSPKm
|
||||
__ZTSPKl
|
||||
__ZTSPKi
|
||||
__ZTSPKh
|
||||
__ZTSPs
|
||||
__ZTSPt
|
||||
__ZTSPv
|
||||
__ZTSPw
|
||||
__ZTSPKa
|
||||
__ZTSPx
|
||||
__ZTSPy
|
||||
__ZTSPKd
|
||||
__ZTSPKe
|
||||
__ZTSPKj
|
||||
__ZTSPKb
|
||||
__ZTSPKf
|
||||
__ZTSv
|
||||
__ZTSt
|
||||
__ZTSs
|
||||
__ZTSm
|
||||
__ZTSl
|
||||
__ZTSj
|
||||
__ZTSi
|
||||
__ZTSh
|
||||
__ZTSf
|
||||
__ZTSe
|
||||
__ZTSd
|
||||
__ZTSc
|
||||
__ZTSw
|
||||
__ZTSx
|
||||
__ZTSy
|
||||
__ZTSb
|
||||
__ZTSa
|
||||
__ZTIPKh
|
||||
__ZTIPKf
|
||||
__ZTIPKe
|
||||
__ZTIPKd
|
||||
__ZTIPKc
|
||||
__ZTIPKb
|
||||
__ZTIPKa
|
||||
__ZTIPy
|
||||
__ZTIPx
|
||||
__ZTIPw
|
||||
__ZTIPv
|
||||
__ZTIPt
|
||||
__ZTIPs
|
||||
__ZTIPm
|
||||
__ZTIPl
|
||||
__ZTIPj
|
||||
__ZTIPi
|
||||
__ZTIPKi
|
||||
__ZTIPKj
|
||||
__ZTIPKl
|
||||
__ZTIPKm
|
||||
__ZTIPKs
|
||||
__ZTIPKt
|
||||
__ZTIPKv
|
||||
__ZTIPKw
|
||||
__ZTIPKx
|
||||
__ZTIPKy
|
||||
__ZTIPa
|
||||
__ZTIPb
|
||||
__ZTIPc
|
||||
__ZTIPd
|
||||
__ZTIPe
|
||||
__ZTIPf
|
||||
__ZTIPh
|
||||
__ZTVN10__cxxabiv129__pointer_to_member_type_infoE
|
||||
__ZTVN10__cxxabiv116__enum_type_infoE
|
||||
__ZTVN10__cxxabiv117__array_type_infoE
|
||||
__ZTVN10__cxxabiv117__class_type_infoE
|
||||
__ZTVN10__cxxabiv117__pbase_type_infoE
|
||||
__ZTVN10__cxxabiv119__pointer_type_infoE
|
||||
__ZTVN10__cxxabiv120__function_type_infoE
|
||||
__ZTVN10__cxxabiv120__si_class_type_infoE
|
||||
__ZTVN10__cxxabiv121__vmi_class_type_infoE
|
||||
__ZTVN10__cxxabiv123__fundamental_type_infoE
|
||||
__ZTIa
|
||||
__ZTIb
|
||||
__ZTIc
|
||||
__ZTId
|
||||
__ZTIe
|
||||
__ZTIf
|
||||
__ZTIh
|
||||
__ZTIi
|
||||
__ZTIj
|
||||
__ZTIl
|
||||
__ZTIm
|
||||
__ZTIs
|
||||
__ZTIt
|
||||
__ZTSN10__cxxabiv129__pointer_to_member_type_infoE
|
||||
__ZTSN10__cxxabiv123__fundamental_type_infoE
|
||||
__ZTSN10__cxxabiv121__vmi_class_type_infoE
|
||||
__ZTSN10__cxxabiv120__si_class_type_infoE
|
||||
__ZTSN10__cxxabiv120__function_type_infoE
|
||||
__ZTSN10__cxxabiv119__pointer_type_infoE
|
||||
__ZTSN10__cxxabiv117__pbase_type_infoE
|
||||
__ZTSN10__cxxabiv117__class_type_infoE
|
||||
__ZTSN10__cxxabiv117__array_type_infoE
|
||||
__ZTSN10__cxxabiv116__enum_type_infoE
|
||||
__ZTIy
|
||||
__ZTIx
|
||||
__ZTIw
|
||||
__ZTIv
|
5
lib/notweak.exp
Normal file
5
lib/notweak.exp
Normal file
@@ -0,0 +1,5 @@
|
||||
# Remove the weak-def bit from these external symbols
|
||||
__ZT*
|
||||
__ZN*
|
||||
__ZS*
|
||||
|
2264
lib/x86_64.exp
Normal file
2264
lib/x86_64.exp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -94,7 +94,7 @@ init_monotonic_clock()
|
||||
return &monotonic_full;
|
||||
}
|
||||
|
||||
#pragma GCC visiblity pop
|
||||
#pragma GCC visibility pop
|
||||
|
||||
monotonic_clock::time_point
|
||||
monotonic_clock::now()
|
||||
|
@@ -61,4 +61,10 @@ condition_variable::__do_timed_wait(unique_lock<mutex>& lk,
|
||||
__throw_system_error(ec, "condition_variable timed_wait failed");
|
||||
}
|
||||
|
||||
void
|
||||
notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk)
|
||||
{
|
||||
__thread_local_data->notify_all_at_thread_exit(&cond, lk.release());
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
294
src/future.cpp
Normal file
294
src/future.cpp
Normal file
@@ -0,0 +1,294 @@
|
||||
//===------------------------- future.cpp ---------------------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "future"
|
||||
#include "string"
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
||||
|
||||
class _LIBCPP_HIDDEN __future_error_category
|
||||
: public __do_message
|
||||
{
|
||||
public:
|
||||
virtual const char* name() const;
|
||||
virtual string message(int ev) const;
|
||||
};
|
||||
|
||||
const char*
|
||||
__future_error_category::name() const
|
||||
{
|
||||
return "future";
|
||||
}
|
||||
|
||||
string
|
||||
__future_error_category::message(int ev) const
|
||||
{
|
||||
switch (ev)
|
||||
{
|
||||
case future_errc::broken_promise:
|
||||
return string("The associated promise has been destructed prior "
|
||||
"to the associated state becoming ready.");
|
||||
case future_errc::future_already_retrieved:
|
||||
return string("The future has already been retrieved from "
|
||||
"the promise or packaged_task.");
|
||||
case future_errc::promise_already_satisfied:
|
||||
return string("The state of the promise has already been set.");
|
||||
case future_errc::no_state:
|
||||
return string("Operation not permitted on an object without "
|
||||
"an associated state.");
|
||||
}
|
||||
return string("unspecified future_errc value\n");
|
||||
}
|
||||
|
||||
const error_category&
|
||||
future_category()
|
||||
{
|
||||
static __future_error_category __f;
|
||||
return __f;
|
||||
}
|
||||
|
||||
future_error::future_error(error_code __ec)
|
||||
: logic_error(__ec.message()),
|
||||
__ec_(__ec)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::__on_zero_shared()
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::set_value()
|
||||
{
|
||||
unique_lock<mutex> __lk(__mut_);
|
||||
if (__has_value())
|
||||
throw future_error(make_error_code(future_errc::promise_already_satisfied));
|
||||
__state_ |= __constructed | ready;
|
||||
__lk.unlock();
|
||||
__cv_.notify_all();
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::set_value_at_thread_exit()
|
||||
{
|
||||
unique_lock<mutex> __lk(__mut_);
|
||||
if (__has_value())
|
||||
throw future_error(make_error_code(future_errc::promise_already_satisfied));
|
||||
__state_ |= __constructed;
|
||||
__thread_local_data->__make_ready_at_thread_exit(this);
|
||||
__lk.unlock();
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::set_exception(exception_ptr __p)
|
||||
{
|
||||
unique_lock<mutex> __lk(__mut_);
|
||||
if (__has_value())
|
||||
throw future_error(make_error_code(future_errc::promise_already_satisfied));
|
||||
__exception_ = __p;
|
||||
__state_ |= ready;
|
||||
__lk.unlock();
|
||||
__cv_.notify_all();
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::set_exception_at_thread_exit(exception_ptr __p)
|
||||
{
|
||||
unique_lock<mutex> __lk(__mut_);
|
||||
if (__has_value())
|
||||
throw future_error(make_error_code(future_errc::promise_already_satisfied));
|
||||
__exception_ = __p;
|
||||
__thread_local_data->__make_ready_at_thread_exit(this);
|
||||
__lk.unlock();
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::__make_ready()
|
||||
{
|
||||
unique_lock<mutex> __lk(__mut_);
|
||||
__state_ |= ready;
|
||||
__lk.unlock();
|
||||
__cv_.notify_all();
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::copy()
|
||||
{
|
||||
unique_lock<mutex> __lk(__mut_);
|
||||
__sub_wait(__lk);
|
||||
if (__exception_ != nullptr)
|
||||
rethrow_exception(__exception_);
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::wait()
|
||||
{
|
||||
unique_lock<mutex> __lk(__mut_);
|
||||
__sub_wait(__lk);
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::__sub_wait(unique_lock<mutex>& __lk)
|
||||
{
|
||||
if (!__is_ready())
|
||||
{
|
||||
if (__state_ & deferred)
|
||||
{
|
||||
__state_ &= ~deferred;
|
||||
__lk.unlock();
|
||||
__execute();
|
||||
}
|
||||
else
|
||||
while (!__is_ready())
|
||||
__cv_.wait(__lk);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
__assoc_sub_state::__execute()
|
||||
{
|
||||
throw future_error(make_error_code(future_errc::no_state));
|
||||
}
|
||||
|
||||
future<void>::future(__assoc_sub_state* __state)
|
||||
: __state_(__state)
|
||||
{
|
||||
if (__state_->__has_future_attached())
|
||||
throw future_error(make_error_code(future_errc::future_already_retrieved));
|
||||
__state_->__add_shared();
|
||||
__state_->__set_future_attached();
|
||||
}
|
||||
|
||||
future<void>::~future()
|
||||
{
|
||||
if (__state_)
|
||||
__state_->__release_shared();
|
||||
}
|
||||
|
||||
void
|
||||
future<void>::get()
|
||||
{
|
||||
unique_ptr<__shared_count, __release_shared_count> __(__state_);
|
||||
__assoc_sub_state* __s = __state_;
|
||||
__state_ = nullptr;
|
||||
__s->copy();
|
||||
}
|
||||
|
||||
promise<void>::promise()
|
||||
: __state_(new __assoc_sub_state)
|
||||
{
|
||||
}
|
||||
|
||||
promise<void>::~promise()
|
||||
{
|
||||
if (__state_)
|
||||
{
|
||||
if (!__state_->__has_value() && __state_->use_count() > 1)
|
||||
__state_->set_exception(make_exception_ptr(
|
||||
future_error(make_error_code(future_errc::broken_promise))
|
||||
));
|
||||
__state_->__release_shared();
|
||||
}
|
||||
}
|
||||
|
||||
future<void>
|
||||
promise<void>::get_future()
|
||||
{
|
||||
if (__state_ == nullptr)
|
||||
throw future_error(make_error_code(future_errc::no_state));
|
||||
return future<void>(__state_);
|
||||
}
|
||||
|
||||
void
|
||||
promise<void>::set_value()
|
||||
{
|
||||
if (__state_ == nullptr)
|
||||
throw future_error(make_error_code(future_errc::no_state));
|
||||
__state_->set_value();
|
||||
}
|
||||
|
||||
void
|
||||
promise<void>::set_exception(exception_ptr __p)
|
||||
{
|
||||
if (__state_ == nullptr)
|
||||
throw future_error(make_error_code(future_errc::no_state));
|
||||
__state_->set_exception(__p);
|
||||
}
|
||||
|
||||
void
|
||||
promise<void>::set_value_at_thread_exit()
|
||||
{
|
||||
if (__state_ == nullptr)
|
||||
throw future_error(make_error_code(future_errc::no_state));
|
||||
__state_->set_value_at_thread_exit();
|
||||
}
|
||||
|
||||
void
|
||||
promise<void>::set_exception_at_thread_exit(exception_ptr __p)
|
||||
{
|
||||
if (__state_ == nullptr)
|
||||
throw future_error(make_error_code(future_errc::no_state));
|
||||
__state_->set_exception_at_thread_exit(__p);
|
||||
}
|
||||
|
||||
shared_future<void>::~shared_future()
|
||||
{
|
||||
if (__state_)
|
||||
__state_->__release_shared();
|
||||
}
|
||||
|
||||
shared_future<void>&
|
||||
shared_future<void>::operator=(const shared_future& __rhs)
|
||||
{
|
||||
if (__rhs.__state_)
|
||||
__rhs.__state_->__add_shared();
|
||||
if (__state_)
|
||||
__state_->__release_shared();
|
||||
__state_ = __rhs.__state_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
atomic_future<void>::~atomic_future()
|
||||
{
|
||||
if (__state_)
|
||||
__state_->__release_shared();
|
||||
}
|
||||
|
||||
atomic_future<void>&
|
||||
atomic_future<void>::operator=(const atomic_future& __rhs)
|
||||
{
|
||||
if (this != &__rhs)
|
||||
{
|
||||
unique_lock<mutex> __this(__mut_, defer_lock);
|
||||
unique_lock<mutex> __that(__rhs.__mut_, defer_lock);
|
||||
_STD::lock(__this, __that);
|
||||
if (__rhs.__state_)
|
||||
__rhs.__state_->__add_shared();
|
||||
if (__state_)
|
||||
__state_->__release_shared();
|
||||
__state_ = __rhs.__state_;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
void
|
||||
atomic_future<void>::swap(atomic_future& __rhs)
|
||||
{
|
||||
if (this != &__rhs)
|
||||
{
|
||||
unique_lock<mutex> __this(__mut_, defer_lock);
|
||||
unique_lock<mutex> __that(__rhs.__mut_, defer_lock);
|
||||
_STD::lock(__this, __that);
|
||||
_STD::swap(__state_, __rhs.__state_);
|
||||
}
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
@@ -81,7 +81,7 @@ __libcpp_nmstr::~__libcpp_nmstr()
|
||||
|
||||
}
|
||||
|
||||
#pragma GCC visiblity pop
|
||||
#pragma GCC visibility pop
|
||||
|
||||
namespace std // purposefully not using versioning namespace
|
||||
{
|
||||
|
@@ -100,7 +100,7 @@ strstreambuf::strstreambuf(const unsigned char* __gnext, streamsize __n)
|
||||
__init((char*)__gnext, __n, nullptr);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
strstreambuf::strstreambuf(strstreambuf&& __rhs)
|
||||
: streambuf(__rhs),
|
||||
@@ -132,7 +132,7 @@ strstreambuf::operator=(strstreambuf&& __rhs)
|
||||
__rhs.setp(nullptr, nullptr);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
strstreambuf::~strstreambuf()
|
||||
{
|
||||
|
@@ -9,6 +9,8 @@
|
||||
|
||||
#include "thread"
|
||||
#include "exception"
|
||||
#include "vector"
|
||||
#include "future"
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
@@ -81,4 +83,79 @@ sleep_for(const chrono::nanoseconds& ns)
|
||||
|
||||
} // this_thread
|
||||
|
||||
__thread_specific_ptr<__thread_struct> __thread_local_data;
|
||||
|
||||
// __thread_struct_imp
|
||||
|
||||
class __thread_struct_imp
|
||||
{
|
||||
typedef vector<__assoc_sub_state*> _AsyncStates;
|
||||
typedef vector<pair<condition_variable*, mutex*> > _Notify;
|
||||
|
||||
_AsyncStates async_states_;
|
||||
_Notify notify_;
|
||||
|
||||
__thread_struct_imp(const __thread_struct_imp&);
|
||||
__thread_struct_imp& operator=(const __thread_struct_imp&);
|
||||
public:
|
||||
__thread_struct_imp() {}
|
||||
~__thread_struct_imp();
|
||||
|
||||
void notify_all_at_thread_exit(condition_variable* cv, mutex* m);
|
||||
void __make_ready_at_thread_exit(__assoc_sub_state* __s);
|
||||
};
|
||||
|
||||
__thread_struct_imp::~__thread_struct_imp()
|
||||
{
|
||||
for (_Notify::iterator i = notify_.begin(), e = notify_.end();
|
||||
i != e; ++i)
|
||||
{
|
||||
i->second->unlock();
|
||||
i->first->notify_all();
|
||||
}
|
||||
for (_AsyncStates::iterator i = async_states_.begin(), e = async_states_.end();
|
||||
i != e; ++i)
|
||||
{
|
||||
(*i)->__make_ready();
|
||||
(*i)->__release_shared();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
__thread_struct_imp::notify_all_at_thread_exit(condition_variable* cv, mutex* m)
|
||||
{
|
||||
notify_.push_back(pair<condition_variable*, mutex*>(cv, m));
|
||||
}
|
||||
|
||||
void
|
||||
__thread_struct_imp::__make_ready_at_thread_exit(__assoc_sub_state* __s)
|
||||
{
|
||||
async_states_.push_back(__s);
|
||||
__s->__add_shared();
|
||||
}
|
||||
|
||||
// __thread_struct
|
||||
|
||||
__thread_struct::__thread_struct()
|
||||
: __p_(new __thread_struct_imp)
|
||||
{
|
||||
}
|
||||
|
||||
__thread_struct::~__thread_struct()
|
||||
{
|
||||
delete __p_;
|
||||
}
|
||||
|
||||
void
|
||||
__thread_struct::notify_all_at_thread_exit(condition_variable* cv, mutex* m)
|
||||
{
|
||||
__p_->notify_all_at_thread_exit(cv, m);
|
||||
}
|
||||
|
||||
void
|
||||
__thread_struct::__make_ready_at_thread_exit(__assoc_sub_state* __s)
|
||||
{
|
||||
__p_->__make_ready_at_thread_exit(__s);
|
||||
}
|
||||
|
||||
_LIBCPP_END_NAMESPACE_STD
|
||||
|
@@ -7,6 +7,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
#include <stdlib.h>
|
||||
#include <cxxabi.h>
|
||||
|
||||
#include "typeinfo"
|
||||
|
||||
@@ -37,3 +38,11 @@ std::bad_typeid::what() const throw()
|
||||
{
|
||||
return "std::bad_typeid";
|
||||
}
|
||||
|
||||
#if __APPLE__
|
||||
// On Darwin, the cxa_bad_* functions cannot be in the lower level library
|
||||
// because bad_cast and bad_typeid are defined in his higher level library
|
||||
void __cxxabiv1::__cxa_bad_typeid() { throw std::bad_typeid(); }
|
||||
void __cxxabiv1::__cxa_bad_cast() { throw std::bad_cast(); }
|
||||
#endif
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -38,7 +38,7 @@ test()
|
||||
assert(ia[i] == ib[i]);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class InIter, class OutIter>
|
||||
void
|
||||
@@ -56,7 +56,7 @@ test1()
|
||||
assert(*ib[i] == i);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -95,7 +95,7 @@ int main()
|
||||
test<const int*, random_access_iterator<int*> >();
|
||||
test<const int*, int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test1<input_iterator<std::unique_ptr<int>*>, output_iterator<std::unique_ptr<int>*> >();
|
||||
test1<input_iterator<std::unique_ptr<int>*>, input_iterator<std::unique_ptr<int>*> >();
|
||||
test1<input_iterator<std::unique_ptr<int>*>, forward_iterator<std::unique_ptr<int>*> >();
|
||||
@@ -130,5 +130,5 @@ int main()
|
||||
test1<std::unique_ptr<int>*, bidirectional_iterator<std::unique_ptr<int>*> >();
|
||||
test1<std::unique_ptr<int>*, random_access_iterator<std::unique_ptr<int>*> >();
|
||||
test1<std::unique_ptr<int>*, std::unique_ptr<int>*>();
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -38,7 +38,7 @@ test()
|
||||
assert(ia[i] == ib[i]);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class InIter, class OutIter>
|
||||
void
|
||||
@@ -56,7 +56,7 @@ test1()
|
||||
assert(*ib[i] == i);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -72,7 +72,7 @@ int main()
|
||||
test<const int*, random_access_iterator<int*> >();
|
||||
test<const int*, int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test1<bidirectional_iterator<std::unique_ptr<int>*>, bidirectional_iterator<std::unique_ptr<int>*> >();
|
||||
test1<bidirectional_iterator<std::unique_ptr<int>*>, random_access_iterator<std::unique_ptr<int>*> >();
|
||||
test1<bidirectional_iterator<std::unique_ptr<int>*>, std::unique_ptr<int>*>();
|
||||
@@ -84,5 +84,5 @@ int main()
|
||||
test1<std::unique_ptr<int>*, bidirectional_iterator<std::unique_ptr<int>*> >();
|
||||
test1<std::unique_ptr<int>*, random_access_iterator<std::unique_ptr<int>*> >();
|
||||
test1<std::unique_ptr<int>*, std::unique_ptr<int>*>();
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -283,7 +283,7 @@ test()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
struct is_null
|
||||
{
|
||||
@@ -300,7 +300,7 @@ test1()
|
||||
Iter r = std::stable_partition(Iter(array), Iter(array+size), is_null());
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -308,7 +308,7 @@ int main()
|
||||
test<random_access_iterator<std::pair<int,int>*> >();
|
||||
test<std::pair<int,int>*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
test1<bidirectional_iterator<std::unique_ptr<int>*> >();
|
||||
#endif
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -39,7 +39,7 @@ test()
|
||||
assert(ia[5] == 4);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class Iter>
|
||||
void
|
||||
@@ -63,7 +63,7 @@ test1()
|
||||
assert(*ia[5] == 4);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -72,12 +72,12 @@ int main()
|
||||
test<random_access_iterator<int*> >();
|
||||
test<int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
test1<forward_iterator<std::unique_ptr<int>*> >();
|
||||
test1<bidirectional_iterator<std::unique_ptr<int>*> >();
|
||||
test1<random_access_iterator<std::unique_ptr<int>*> >();
|
||||
test1<std::unique_ptr<int>*>();
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -40,7 +40,7 @@ test()
|
||||
assert(ia[5] == 4);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
struct pred
|
||||
{
|
||||
@@ -72,7 +72,7 @@ test1()
|
||||
assert(*ia[5] == 4);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -81,12 +81,12 @@ int main()
|
||||
test<random_access_iterator<int*> >();
|
||||
test<int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
test1<forward_iterator<std::unique_ptr<int>*> >();
|
||||
test1<bidirectional_iterator<std::unique_ptr<int>*> >();
|
||||
test1<random_access_iterator<std::unique_ptr<int>*> >();
|
||||
test1<std::unique_ptr<int>*>();
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -213,7 +213,7 @@ test()
|
||||
assert(ig[5] == 2);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template <class Iter>
|
||||
void
|
||||
@@ -419,7 +419,7 @@ test1()
|
||||
assert(*ig[5] == 2);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -428,12 +428,12 @@ int main()
|
||||
test<random_access_iterator<int*> >();
|
||||
test<int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
test1<forward_iterator<std::unique_ptr<int>*> >();
|
||||
test1<bidirectional_iterator<std::unique_ptr<int>*> >();
|
||||
test1<random_access_iterator<std::unique_ptr<int>*> >();
|
||||
test1<std::unique_ptr<int>*>();
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -38,7 +38,7 @@ test()
|
||||
assert(j[2] == 3);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
template<class Iter1, class Iter2>
|
||||
void
|
||||
@@ -60,7 +60,7 @@ test1()
|
||||
assert(*j[2] == 3);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -84,7 +84,7 @@ int main()
|
||||
test<int*, random_access_iterator<int*> >();
|
||||
test<int*, int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
test1<forward_iterator<std::unique_ptr<int>*>, forward_iterator<std::unique_ptr<int>*> >();
|
||||
test1<forward_iterator<std::unique_ptr<int>*>, bidirectional_iterator<std::unique_ptr<int>*> >();
|
||||
@@ -106,5 +106,5 @@ int main()
|
||||
test1<std::unique_ptr<int>*, random_access_iterator<std::unique_ptr<int>*> >();
|
||||
test1<std::unique_ptr<int>*, std::unique_ptr<int>*>();
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -84,7 +84,7 @@ test()
|
||||
assert(ii[2] == 2);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
struct do_nothing
|
||||
{
|
||||
@@ -169,7 +169,7 @@ test1()
|
||||
assert(*ii[2] == 2);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -178,12 +178,12 @@ int main()
|
||||
test<random_access_iterator<int*> >();
|
||||
test<int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
test1<forward_iterator<Ptr*> >();
|
||||
test1<bidirectional_iterator<Ptr*> >();
|
||||
test1<random_access_iterator<Ptr*> >();
|
||||
test1<Ptr*>();
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
#endif
|
||||
|
||||
@@ -110,7 +110,7 @@ test()
|
||||
assert(count_equal::count == si-1);
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
struct do_nothing
|
||||
{
|
||||
@@ -211,7 +211,7 @@ test1()
|
||||
assert(count_equal::count == si-1);
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -220,12 +220,12 @@ int main()
|
||||
test<random_access_iterator<int*> >();
|
||||
test<int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
test1<forward_iterator<Ptr*> >();
|
||||
test1<bidirectional_iterator<Ptr*> >();
|
||||
test1<random_access_iterator<Ptr*> >();
|
||||
test1<Ptr*>();
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -27,7 +27,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void test(unsigned N)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ int main()
|
||||
test(10);
|
||||
test(1000);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
const int N = 1000;
|
||||
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
|
||||
@@ -60,5 +60,5 @@ int main()
|
||||
assert(std::is_heap(ia, ia+N, indirect_less()));
|
||||
delete [] ia;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -27,7 +27,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void test(unsigned N)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ int main()
|
||||
{
|
||||
test(1000);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
const int N = 1000;
|
||||
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
|
||||
@@ -64,5 +64,5 @@ int main()
|
||||
}
|
||||
delete [] ia;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -28,7 +28,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void test(unsigned N)
|
||||
{
|
||||
@@ -48,7 +48,7 @@ int main()
|
||||
{
|
||||
test(1000);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
const int N = 1000;
|
||||
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
|
||||
@@ -62,5 +62,5 @@ int main()
|
||||
}
|
||||
delete [] ia;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -27,7 +27,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void test(unsigned N)
|
||||
{
|
||||
@@ -50,7 +50,7 @@ int main()
|
||||
test(10);
|
||||
test(1000);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
const int N = 1000;
|
||||
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
|
||||
@@ -62,5 +62,5 @@ int main()
|
||||
assert(std::is_sorted(ia, ia+N, indirect_less()));
|
||||
delete [] ia;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -28,7 +28,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#include "../../iterators.h"
|
||||
|
||||
@@ -89,7 +89,7 @@ int main()
|
||||
test<random_access_iterator<int*> >();
|
||||
test<int*>();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
unsigned N = 100;
|
||||
unsigned M = 50;
|
||||
@@ -108,5 +108,5 @@ int main()
|
||||
}
|
||||
delete [] ia;
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
int i = std::max({2, 3, 1});
|
||||
assert(i == 3);
|
||||
i = std::max({2, 1, 3});
|
||||
@@ -31,5 +31,5 @@ int main()
|
||||
assert(i == 3);
|
||||
i = std::max({1, 3, 2});
|
||||
assert(i == 3);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
int i = std::max({2, 3, 1}, std::greater<int>());
|
||||
assert(i == 1);
|
||||
i = std::max({2, 1, 3}, std::greater<int>());
|
||||
@@ -32,5 +32,5 @@ int main()
|
||||
assert(i == 1);
|
||||
i = std::max({1, 3, 2}, std::greater<int>());
|
||||
assert(i == 1);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
int i = std::min({2, 3, 1});
|
||||
assert(i == 1);
|
||||
i = std::min({2, 1, 3});
|
||||
@@ -31,5 +31,5 @@ int main()
|
||||
assert(i == 1);
|
||||
i = std::min({1, 3, 2});
|
||||
assert(i == 1);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
int i = std::min({2, 3, 1}, std::greater<int>());
|
||||
assert(i == 3);
|
||||
i = std::min({2, 1, 3}, std::greater<int>());
|
||||
@@ -32,5 +32,5 @@ int main()
|
||||
assert(i == 3);
|
||||
i = std::min({1, 3, 2}, std::greater<int>());
|
||||
assert(i == 3);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -18,12 +18,12 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
assert((std::minmax({1, 2, 3}) == std::pair<int, int>(1, 3)));
|
||||
assert((std::minmax({1, 3, 2}) == std::pair<int, int>(1, 3)));
|
||||
assert((std::minmax({2, 1, 3}) == std::pair<int, int>(1, 3)));
|
||||
assert((std::minmax({2, 3, 1}) == std::pair<int, int>(1, 3)));
|
||||
assert((std::minmax({3, 1, 2}) == std::pair<int, int>(1, 3)));
|
||||
assert((std::minmax({3, 2, 1}) == std::pair<int, int>(1, 3)));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -19,12 +19,12 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
assert((std::minmax({1, 2, 3}, std::greater<int>()) == std::pair<int, int>(3, 1)));
|
||||
assert((std::minmax({1, 3, 2}, std::greater<int>()) == std::pair<int, int>(3, 1)));
|
||||
assert((std::minmax({2, 1, 3}, std::greater<int>()) == std::pair<int, int>(3, 1)));
|
||||
assert((std::minmax({2, 3, 1}, std::greater<int>()) == std::pair<int, int>(3, 1)));
|
||||
assert((std::minmax({3, 1, 2}, std::greater<int>()) == std::pair<int, int>(3, 1)));
|
||||
assert((std::minmax({3, 2, 1}, std::greater<int>()) == std::pair<int, int>(3, 1)));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -29,7 +29,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void
|
||||
test_one(unsigned N, unsigned M)
|
||||
@@ -73,7 +73,7 @@ int main()
|
||||
test(1000);
|
||||
test(1009);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
std::vector<std::unique_ptr<int> > v(1000);
|
||||
for (int i = 0; i < v.size(); ++i)
|
||||
@@ -81,5 +81,5 @@ int main()
|
||||
std::nth_element(v.begin(), v.begin() + v.size()/2, v.end(), indirect_less());
|
||||
assert(*v[v.size()/2] == v.size()/2);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -29,7 +29,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
void
|
||||
test_larger_sorts(unsigned N, unsigned M)
|
||||
@@ -74,7 +74,7 @@ int main()
|
||||
test_larger_sorts(1000);
|
||||
test_larger_sorts(1009);
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
std::vector<std::unique_ptr<int> > v(1000);
|
||||
for (int i = 0; i < v.size(); ++i)
|
||||
@@ -83,5 +83,5 @@ int main()
|
||||
for (int i = 0; i < v.size()/2; ++i)
|
||||
assert(*v[i] == i);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -29,7 +29,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -42,7 +42,7 @@ int main()
|
||||
assert(std::is_sorted(v.begin(), v.end()));
|
||||
}
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
std::vector<std::unique_ptr<int> > v(1000);
|
||||
for (int i = 0; i < v.size(); ++i)
|
||||
@@ -53,5 +53,5 @@ int main()
|
||||
assert(*v[1] == 1);
|
||||
assert(*v[2] == 2);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
#include <memory>
|
||||
|
||||
struct indirect_less
|
||||
@@ -29,7 +29,7 @@ struct indirect_less
|
||||
{return *x < *y;}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
struct first_only
|
||||
{
|
||||
@@ -68,7 +68,7 @@ int main()
|
||||
{
|
||||
test();
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
std::vector<std::unique_ptr<int> > v(1000);
|
||||
for (int i = 0; i < v.size(); ++i)
|
||||
@@ -79,5 +79,5 @@ int main()
|
||||
assert(*v[1] == 1);
|
||||
assert(*v[2] == 2);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#ifndef EMPLACEABLE_H
|
||||
#define EMPLACEABLE_H
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
class Emplaceable
|
||||
{
|
||||
@@ -40,6 +40,6 @@ struct hash<Emplaceable>
|
||||
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#endif // EMPLACEABLE_H
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#ifndef MOVEONLY_H
|
||||
#define MOVEONLY_H
|
||||
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
@@ -36,6 +36,6 @@ struct hash<MoveOnly>
|
||||
|
||||
}
|
||||
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
|
||||
#endif // MOVEONLY_H
|
||||
|
@@ -20,7 +20,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::pair<MoveOnly, double> V;
|
||||
std::map<MoveOnly, double> m;
|
||||
assert(m.size() == 0);
|
||||
@@ -34,5 +34,5 @@ int main()
|
||||
m[6] = 6.5;
|
||||
assert(m[6] == 6.5);
|
||||
assert(m.size() == 2);
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::pair<const int, double> V;
|
||||
std::map<int, double> m =
|
||||
{
|
||||
@@ -41,5 +41,5 @@ int main()
|
||||
assert(*m.begin() == V(1, 1));
|
||||
assert(*next(m.begin()) == V(2, 1));
|
||||
assert(*next(m.begin(), 2) == V(3, 1));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::pair<const int, double> V;
|
||||
std::map<int, double> m =
|
||||
{
|
||||
@@ -37,5 +37,5 @@ int main()
|
||||
assert(*m.begin() == V(1, 1));
|
||||
assert(*next(m.begin()) == V(2, 1));
|
||||
assert(*next(m.begin(), 2) == V(3, 1));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::pair<const int, double> V;
|
||||
typedef test_compare<std::less<int> > C;
|
||||
std::map<int, double, C> m({
|
||||
@@ -39,5 +39,5 @@ int main()
|
||||
assert(*next(m.begin()) == V(2, 1));
|
||||
assert(*next(m.begin(), 2) == V(3, 1));
|
||||
assert(m.key_comp() == C(3));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::pair<const int, double> V;
|
||||
typedef test_compare<std::less<int> > C;
|
||||
typedef test_allocator<std::pair<const int, double> > A;
|
||||
@@ -42,5 +42,5 @@ int main()
|
||||
assert(*next(m.begin(), 2) == V(3, 1));
|
||||
assert(m.key_comp() == C(3));
|
||||
assert(m.get_allocator() == A(6));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::pair<const int, double> V;
|
||||
{
|
||||
typedef test_compare<std::less<int> > C;
|
||||
@@ -68,5 +68,5 @@ int main()
|
||||
assert(mo.size() == 0);
|
||||
assert(distance(mo.begin(), mo.end()) == 0);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::pair<MoveOnly, MoveOnly> V;
|
||||
typedef std::pair<const MoveOnly, MoveOnly> VC;
|
||||
@@ -140,5 +140,5 @@ int main()
|
||||
assert(m3.key_comp() == C(5));
|
||||
assert(m1.empty());
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::pair<MoveOnly, MoveOnly> V;
|
||||
typedef std::pair<const MoveOnly, MoveOnly> VC;
|
||||
@@ -143,5 +143,5 @@ int main()
|
||||
assert(m3.key_comp() == C(5));
|
||||
assert(m1.empty());
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::map<int, DefaultOnly> M;
|
||||
typedef std::pair<M::iterator, bool> R;
|
||||
@@ -85,5 +85,5 @@ int main()
|
||||
assert(m.begin()->first == 2);
|
||||
assert(m.begin()->second == 3.5);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::map<int, DefaultOnly> M;
|
||||
typedef M::iterator R;
|
||||
@@ -78,5 +78,5 @@ int main()
|
||||
assert(m.begin()->first == 2);
|
||||
assert(m.begin()->second == 3.5);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::pair<const int, double> V;
|
||||
std::map<int, double> m =
|
||||
{
|
||||
@@ -39,5 +39,5 @@ int main()
|
||||
assert(*m.begin() == V(1, 1));
|
||||
assert(*next(m.begin()) == V(2, 1));
|
||||
assert(*next(m.begin(), 2) == V(3, 1));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::map<int, MoveOnly> M;
|
||||
typedef std::pair<int, MoveOnly> P;
|
||||
@@ -51,5 +51,5 @@ int main()
|
||||
assert(r->first == 3);
|
||||
assert(r->second == 3);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::map<int, MoveOnly> M;
|
||||
typedef std::pair<M::iterator, bool> R;
|
||||
@@ -54,5 +54,5 @@ int main()
|
||||
assert(r.first->first == 3);
|
||||
assert(r.first->second == 3);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::multimap<int, double> C;
|
||||
typedef C::value_type V;
|
||||
C m = {{20, 1}};
|
||||
@@ -46,5 +46,5 @@ int main()
|
||||
assert(*++i == V(3, 1));
|
||||
assert(*++i == V(3, 1.5));
|
||||
assert(*++i == V(3, 2));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::multimap<int, double> C;
|
||||
typedef C::value_type V;
|
||||
C m =
|
||||
@@ -45,5 +45,5 @@ int main()
|
||||
assert(*++i == V(3, 1));
|
||||
assert(*++i == V(3, 1.5));
|
||||
assert(*++i == V(3, 2));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef test_compare<std::less<int> > Cmp;
|
||||
typedef std::multimap<int, double, Cmp> C;
|
||||
typedef C::value_type V;
|
||||
@@ -50,5 +50,5 @@ int main()
|
||||
assert(*++i == V(3, 1.5));
|
||||
assert(*++i == V(3, 2));
|
||||
assert(m.key_comp() == Cmp(4));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef test_compare<std::less<int> > Cmp;
|
||||
typedef test_allocator<std::pair<const int, double> > A;
|
||||
typedef std::multimap<int, double, Cmp, A> C;
|
||||
@@ -53,5 +53,5 @@ int main()
|
||||
assert(*++i == V(3, 2));
|
||||
assert(m.key_comp() == Cmp(4));
|
||||
assert(m.get_allocator() == A(5));
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
typedef std::pair<const int, double> V;
|
||||
{
|
||||
typedef test_compare<std::less<int> > C;
|
||||
@@ -74,5 +74,5 @@ int main()
|
||||
assert(mo.size() == 0);
|
||||
assert(distance(mo.begin(), mo.end()) == 0);
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::pair<MoveOnly, MoveOnly> V;
|
||||
typedef std::pair<const MoveOnly, MoveOnly> VC;
|
||||
@@ -140,5 +140,5 @@ int main()
|
||||
assert(m3.key_comp() == C(5));
|
||||
assert(m1.empty());
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifdef _LIBCPP_MOVE
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef std::pair<MoveOnly, MoveOnly> V;
|
||||
typedef std::pair<const MoveOnly, MoveOnly> VC;
|
||||
@@ -143,5 +143,5 @@ int main()
|
||||
assert(m3.key_comp() == C(5));
|
||||
assert(m1.empty());
|
||||
}
|
||||
#endif // _LIBCPP_MOVE
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user