Skip to content

Commit a72b619

Browse files
start seeing constexpr failures for at.pass.cpp
1 parent ce1a62f commit a72b619

File tree

3 files changed

+73
-66
lines changed

3 files changed

+73
-66
lines changed

libcxx/include/__tree

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -967,39 +967,39 @@ public:
967967
typedef __tree_iterator<value_type, __node_pointer, difference_type> iterator;
968968
typedef __tree_const_iterator<value_type, __node_pointer, difference_type> const_iterator;
969969

970-
_LIBCPP_HIDE_FROM_ABI explicit __tree(const value_compare& __comp) _NOEXCEPT_(
970+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit __tree(const value_compare& __comp) _NOEXCEPT_(
971971
is_nothrow_default_constructible<__node_allocator>::value&& is_nothrow_copy_constructible<value_compare>::value);
972-
_LIBCPP_HIDE_FROM_ABI explicit __tree(const allocator_type& __a);
973-
_LIBCPP_HIDE_FROM_ABI __tree(const value_compare& __comp, const allocator_type& __a);
974-
_LIBCPP_HIDE_FROM_ABI __tree(const __tree& __t);
975-
_LIBCPP_HIDE_FROM_ABI __tree& operator=(const __tree& __t);
972+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 explicit __tree(const allocator_type& __a);
973+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __tree(const value_compare& __comp, const allocator_type& __a);
974+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __tree(const __tree& __t);
975+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __tree& operator=(const __tree& __t);
976976
template <class _ForwardIterator>
977-
_LIBCPP_HIDE_FROM_ABI void __assign_unique(_ForwardIterator __first, _ForwardIterator __last);
977+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void __assign_unique(_ForwardIterator __first, _ForwardIterator __last);
978978
template <class _InputIterator>
979-
_LIBCPP_HIDE_FROM_ABI void __assign_multi(_InputIterator __first, _InputIterator __last);
980-
_LIBCPP_HIDE_FROM_ABI __tree(__tree&& __t) _NOEXCEPT_(
979+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void __assign_multi(_InputIterator __first, _InputIterator __last);
980+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __tree(__tree&& __t) _NOEXCEPT_(
981981
is_nothrow_move_constructible<__node_allocator>::value&& is_nothrow_move_constructible<value_compare>::value);
982-
_LIBCPP_HIDE_FROM_ABI __tree(__tree&& __t, const allocator_type& __a);
983-
_LIBCPP_HIDE_FROM_ABI __tree& operator=(__tree&& __t)
982+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __tree(__tree&& __t, const allocator_type& __a);
983+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __tree& operator=(__tree&& __t)
984984
_NOEXCEPT_(is_nothrow_move_assignable<value_compare>::value &&
985985
((__node_traits::propagate_on_container_move_assignment::value &&
986986
is_nothrow_move_assignable<__node_allocator>::value) ||
987987
allocator_traits<__node_allocator>::is_always_equal::value));
988988

989-
_LIBCPP_HIDE_FROM_ABI ~__tree();
989+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 ~__tree();
990990

991-
_LIBCPP_HIDE_FROM_ABI iterator begin() _NOEXCEPT { return iterator(__begin_node()); }
992-
_LIBCPP_HIDE_FROM_ABI const_iterator begin() const _NOEXCEPT { return const_iterator(__begin_node()); }
993-
_LIBCPP_HIDE_FROM_ABI iterator end() _NOEXCEPT { return iterator(__end_node()); }
994-
_LIBCPP_HIDE_FROM_ABI const_iterator end() const _NOEXCEPT { return const_iterator(__end_node()); }
991+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator begin() _NOEXCEPT { return iterator(__begin_node()); }
992+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator begin() const _NOEXCEPT { return const_iterator(__begin_node()); }
993+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator end() _NOEXCEPT { return iterator(__end_node()); }
994+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator end() const _NOEXCEPT { return const_iterator(__end_node()); }
995995

996-
_LIBCPP_HIDE_FROM_ABI size_type max_size() const _NOEXCEPT {
996+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 size_type max_size() const _NOEXCEPT {
997997
return std::min<size_type>(__node_traits::max_size(__node_alloc()), numeric_limits<difference_type >::max());
998998
}
999999

1000-
_LIBCPP_HIDE_FROM_ABI void clear() _NOEXCEPT;
1000+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void clear() _NOEXCEPT;
10011001

1002-
_LIBCPP_HIDE_FROM_ABI void swap(__tree& __t)
1002+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void swap(__tree& __t)
10031003
#if _LIBCPP_STD_VER <= 11
10041004
_NOEXCEPT_(__is_nothrow_swappable_v<value_compare> &&
10051005
(!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<__node_allocator>));
@@ -1315,20 +1315,20 @@ private:
13151315
};
13161316

13171317
template <class _Tp, class _Compare, class _Allocator>
1318-
__tree<_Tp, _Compare, _Allocator>::__tree(const value_compare& __comp) _NOEXCEPT_(
1318+
_LIBCPP_CONSTEXPR_SINCE_CXX26 __tree<_Tp, _Compare, _Allocator>::__tree(const value_compare& __comp) _NOEXCEPT_(
13191319
is_nothrow_default_constructible<__node_allocator>::value&& is_nothrow_copy_constructible<value_compare>::value)
13201320
: __size_(0), __value_comp_(__comp) {
13211321
__begin_node() = __end_node();
13221322
}
13231323

13241324
template <class _Tp, class _Compare, class _Allocator>
1325-
__tree<_Tp, _Compare, _Allocator>::__tree(const allocator_type& __a)
1325+
_LIBCPP_CONSTEXPR_SINCE_CXX26 __tree<_Tp, _Compare, _Allocator>::__tree(const allocator_type& __a)
13261326
: __begin_node_(__iter_pointer()), __node_alloc_(__node_allocator(__a)), __size_(0) {
13271327
__begin_node() = __end_node();
13281328
}
13291329

13301330
template <class _Tp, class _Compare, class _Allocator>
1331-
__tree<_Tp, _Compare, _Allocator>::__tree(const value_compare& __comp, const allocator_type& __a)
1331+
_LIBCPP_CONSTEXPR_SINCE_CXX26 __tree<_Tp, _Compare, _Allocator>::__tree(const value_compare& __comp, const allocator_type& __a)
13321332
: __begin_node_(__iter_pointer()), __node_alloc_(__node_allocator(__a)), __size_(0), __value_comp_(__comp) {
13331333
__begin_node() = __end_node();
13341334
}
@@ -1375,7 +1375,7 @@ __tree<_Tp, _Compare, _Allocator>::_DetachedTreeCache::__detach_next(__node_poin
13751375
}
13761376

13771377
template <class _Tp, class _Compare, class _Allocator>
1378-
__tree<_Tp, _Compare, _Allocator>& __tree<_Tp, _Compare, _Allocator>::operator=(const __tree& __t) {
1378+
_LIBCPP_CONSTEXPR_SINCE_CXX26 __tree<_Tp, _Compare, _Allocator>& __tree<_Tp, _Compare, _Allocator>::operator=(const __tree& __t) {
13791379
if (this != std::addressof(__t)) {
13801380
value_comp() = __t.value_comp();
13811381
__copy_assign_alloc(__t);
@@ -1386,7 +1386,7 @@ __tree<_Tp, _Compare, _Allocator>& __tree<_Tp, _Compare, _Allocator>::operator=(
13861386

13871387
template <class _Tp, class _Compare, class _Allocator>
13881388
template <class _ForwardIterator>
1389-
void __tree<_Tp, _Compare, _Allocator>::__assign_unique(_ForwardIterator __first, _ForwardIterator __last) {
1389+
_LIBCPP_CONSTEXPR_SINCE_CXX26 void __tree<_Tp, _Compare, _Allocator>::__assign_unique(_ForwardIterator __first, _ForwardIterator __last) {
13901390
typedef iterator_traits<_ForwardIterator> _ITraits;
13911391
typedef typename _ITraits::value_type _ItValueType;
13921392
static_assert(is_same<_ItValueType, __container_value_type>::value,
@@ -1406,7 +1406,7 @@ void __tree<_Tp, _Compare, _Allocator>::__assign_unique(_ForwardIterator __first
14061406

14071407
template <class _Tp, class _Compare, class _Allocator>
14081408
template <class _InputIterator>
1409-
void __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _InputIterator __last) {
1409+
_LIBCPP_CONSTEXPR_SINCE_CXX26 void __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _InputIterator __last) {
14101410
typedef iterator_traits<_InputIterator> _ITraits;
14111411
typedef typename _ITraits::value_type _ItValueType;
14121412
static_assert(
@@ -1426,7 +1426,7 @@ void __tree<_Tp, _Compare, _Allocator>::__assign_multi(_InputIterator __first, _
14261426
}
14271427

14281428
template <class _Tp, class _Compare, class _Allocator>
1429-
__tree<_Tp, _Compare, _Allocator>::__tree(const __tree& __t)
1429+
_LIBCPP_CONSTEXPR_SINCE_CXX26 __tree<_Tp, _Compare, _Allocator>::__tree(const __tree& __t)
14301430
: __begin_node_(__iter_pointer()),
14311431
__node_alloc_(__node_traits::select_on_container_copy_construction(__t.__node_alloc())),
14321432
__size_(0),
@@ -1435,7 +1435,7 @@ __tree<_Tp, _Compare, _Allocator>::__tree(const __tree& __t)
14351435
}
14361436

14371437
template <class _Tp, class _Compare, class _Allocator>
1438-
__tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t) _NOEXCEPT_(
1438+
_LIBCPP_CONSTEXPR_SINCE_CXX26 __tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t) _NOEXCEPT_(
14391439
is_nothrow_move_constructible<__node_allocator>::value&& is_nothrow_move_constructible<value_compare>::value)
14401440
: __begin_node_(std::move(__t.__begin_node_)),
14411441
__end_node_(std::move(__t.__end_node_)),
@@ -1453,7 +1453,7 @@ __tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t) _NOEXCEPT_(
14531453
}
14541454

14551455
template <class _Tp, class _Compare, class _Allocator>
1456-
__tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t, const allocator_type& __a)
1456+
_LIBCPP_CONSTEXPR_SINCE_CXX26 __tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t, const allocator_type& __a)
14571457
: __node_alloc_(__node_allocator(__a)), __size_(0), __value_comp_(std::move(__t.value_comp())) {
14581458
if (__a == __t.__alloc()) {
14591459
if (__t.size() == 0)
@@ -1512,7 +1512,7 @@ void __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, false_type) {
15121512
}
15131513

15141514
template <class _Tp, class _Compare, class _Allocator>
1515-
__tree<_Tp, _Compare, _Allocator>& __tree<_Tp, _Compare, _Allocator>::operator=(__tree&& __t)
1515+
_LIBCPP_CONSTEXPR_SINCE_CXX26 __tree<_Tp, _Compare, _Allocator>& __tree<_Tp, _Compare, _Allocator>::operator=(__tree&& __t)
15161516
_NOEXCEPT_(is_nothrow_move_assignable<value_compare>::value &&
15171517
((__node_traits::propagate_on_container_move_assignment::value &&
15181518
is_nothrow_move_assignable<__node_allocator>::value) ||
@@ -1522,7 +1522,7 @@ __tree<_Tp, _Compare, _Allocator>& __tree<_Tp, _Compare, _Allocator>::operator=(
15221522
}
15231523

15241524
template <class _Tp, class _Compare, class _Allocator>
1525-
__tree<_Tp, _Compare, _Allocator>::~__tree() {
1525+
_LIBCPP_CONSTEXPR_SINCE_CXX26 __tree<_Tp, _Compare, _Allocator>::~__tree() {
15261526
static_assert(is_copy_constructible<value_compare>::value, "Comparator must be copy-constructible.");
15271527
destroy(__root());
15281528
}
@@ -1539,7 +1539,7 @@ void __tree<_Tp, _Compare, _Allocator>::destroy(__node_pointer __nd) _NOEXCEPT {
15391539
}
15401540

15411541
template <class _Tp, class _Compare, class _Allocator>
1542-
void __tree<_Tp, _Compare, _Allocator>::swap(__tree& __t)
1542+
_LIBCPP_CONSTEXPR_SINCE_CXX26 void __tree<_Tp, _Compare, _Allocator>::swap(__tree& __t)
15431543
#if _LIBCPP_STD_VER <= 11
15441544
_NOEXCEPT_(__is_nothrow_swappable_v<value_compare> &&
15451545
(!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<__node_allocator>))
@@ -1564,7 +1564,7 @@ void __tree<_Tp, _Compare, _Allocator>::swap(__tree& __t)
15641564
}
15651565

15661566
template <class _Tp, class _Compare, class _Allocator>
1567-
void __tree<_Tp, _Compare, _Allocator>::clear() _NOEXCEPT {
1567+
_LIBCPP_CONSTEXPR_SINCE_CXX26 void __tree<_Tp, _Compare, _Allocator>::clear() _NOEXCEPT {
15681568
destroy(__root());
15691569
size() = 0;
15701570
__begin_node() = __end_node();

0 commit comments

Comments
 (0)