summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-04-13 00:34:24 +0000
committerEric Fiselier <eric@efcs.ca>2017-04-13 00:34:24 +0000
commit161ccc1a72083c64f22893252eb0b3865b49ba5f (patch)
tree6a324471bc3829125ef9f081df8e8ceff3255c81 /include
parentdb14bcc51c71ee5f859534225e2e0ced7a31d8f9 (diff)
Fix most failures caused by r300140
r300140 introduced a bunch of failures by changing the internal interface provided by __compressed_pair. This patch fixes all of the failures caused by the new interface by changing the existing code to use it. In addition to those changes this patch also fixes two separate issues causing test failures: 1) Fix the member swap definition for __map_value_compare. Previously the swap was incorrectly configured to swap the comparator as const. 2) Fix an assertion failure in futures.task.members/ctor_func_alloc.pass.cpp that incorrectly expected a move to take place when a single copy is sufficient. There is one remaining failure regarding make_shared. I'll commit a fix for that shortly. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300148 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/__split_buffer2
-rw-r--r--include/__tree8
-rw-r--r--include/map4
3 files changed, 7 insertions, 7 deletions
diff --git a/include/__split_buffer b/include/__split_buffer
index 79d1aa1d7..e74cf1f3b 100644
--- a/include/__split_buffer
+++ b/include/__split_buffer
@@ -361,7 +361,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c)
template <class _Tp, class _Allocator>
__split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c, const __alloc_rr& __a)
- : __end_cap_(__a)
+ : __end_cap_(__second_tag(), __a)
{
if (__a == __c.__alloc())
{
diff --git a/include/__tree b/include/__tree
index 708fe97cb..2161c6cb7 100644
--- a/include/__tree
+++ b/include/__tree
@@ -1502,7 +1502,7 @@ __tree<_Tp, _Compare, _Allocator>::__tree(const value_compare& __comp)
template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::__tree(const allocator_type& __a)
: __begin_node_(__iter_pointer()),
- __pair1_(__node_allocator(__a)),
+ __pair1_(__second_tag(), __node_allocator(__a)),
__pair3_(0)
{
__begin_node() = __end_node();
@@ -1512,7 +1512,7 @@ template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::__tree(const value_compare& __comp,
const allocator_type& __a)
: __begin_node_(__iter_pointer()),
- __pair1_(__node_allocator(__a)),
+ __pair1_(__second_tag(), __node_allocator(__a)),
__pair3_(0, __comp)
{
__begin_node() = __end_node();
@@ -1669,7 +1669,7 @@ __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _Input
template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::__tree(const __tree& __t)
: __begin_node_(__iter_pointer()),
- __pair1_(__node_traits::select_on_container_copy_construction(__t.__node_alloc())),
+ __pair1_(__second_tag(), __node_traits::select_on_container_copy_construction(__t.__node_alloc())),
__pair3_(0, __t.value_comp())
{
__begin_node() = __end_node();
@@ -1699,7 +1699,7 @@ __tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t)
template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t, const allocator_type& __a)
- : __pair1_(__node_allocator(__a)),
+ : __pair1_(__second_tag(), __node_allocator(__a)),
__pair3_(0, _VSTD::move(__t.value_comp()))
{
if (__a == __t.__alloc())
diff --git a/include/map b/include/map
index ecd9d924e..c8131eceb 100644
--- a/include/map
+++ b/include/map
@@ -480,8 +480,8 @@ public:
void swap(__map_value_compare&__y)
_NOEXCEPT_(__is_nothrow_swappable<_Compare>::value)
{
- using _VSTD::swap;
- swap(static_cast<const _Compare&>(*this), static_cast<const _Compare&>(__y));
+ using _VSTD::swap;
+ swap(static_cast<_Compare&>(*this), static_cast<_Compare&>(__y));
}
#if _LIBCPP_STD_VER > 11