Skip to content

Commit 7760d51

Browse files
Redundant check
1 parent 2edf9ac commit 7760d51

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

libcxx/include/__tree

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,14 +1601,7 @@ __tree<_Tp, _Compare, _Allocator>::operator=(__tree&& __t)
16011601
template <class _Tp, class _Compare, class _Allocator>
16021602
_LIBCPP_CONSTEXPR_SINCE_CXX26 __tree<_Tp, _Compare, _Allocator>::~__tree() {
16031603
static_assert(is_copy_constructible<value_compare>::value, "Comparator must be copy-constructible.");
1604-
// TODO: get this verified
1605-
// without this check, constexpr evaluation goes into infinite recursion, for
1606-
// insert_range.pass.cpp:EmptyContainer_EmptyRange
1607-
1608-
// not sure if this is UB ?, if not, we need to add is_constant_evaluated()
1609-
if (size() > 0) {
1610-
destroy(__root());
1611-
}
1604+
destroy(__root());
16121605
}
16131606

16141607
template <class _Tp, class _Compare, class _Allocator>

0 commit comments

Comments
 (0)