Skip to content

Commit 629e007

Browse files
author
Advenam Tacet
committed
if constexpr since C++17
1 parent 418cdd7 commit 629e007

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

libcxx/include/deque

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,7 @@ private:
10121012
_LIBCPP_HIDE_FROM_ABI void __annotate_delete() const _NOEXCEPT {
10131013
#ifndef _LIBCPP_HAS_NO_ASAN
10141014
// The default allocator does not require unpoisoning before returning memory.
1015-
if _LIBCPP_CONSTEXPR (is_same<allocator_type, allocator<_Tp> >::value)
1015+
if _LIBCPP_CONSTEXPR_SINCE_CXX17 (is_same<allocator_type, allocator<_Tp> >::value)
10161016
return;
10171017
if (empty()) {
10181018
for (size_t __i = 0; __i < __map_.size(); ++__i) {

libcxx/include/string

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1913,7 +1913,7 @@ private:
19131913
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void __annotate_delete() const _NOEXCEPT {
19141914
#if !defined(_LIBCPP_HAS_NO_ASAN) && defined(_LIBCPP_INSTRUMENTED_WITH_ASAN)
19151915
// The default allocator does not require unpoisoning before returning memory.
1916-
if _LIBCPP_CONSTEXPR (!is_same<allocator_type, allocator<__default_allocator_type> >::value)
1916+
if _LIBCPP_CONSTEXPR_SINCE_CXX17 (!is_same<allocator_type, allocator<__default_allocator_type> >::value)
19171917
if (!__libcpp_is_constant_evaluated() && (__asan_short_string_is_annotated() || __is_long()))
19181918
__annotate_contiguous_container(data() + size() + 1, data() + capacity() + 1);
19191919
#endif

libcxx/include/vector

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ private:
854854
_LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __annotate_delete() const _NOEXCEPT {
855855
#ifndef _LIBCPP_HAS_NO_ASAN
856856
// The default allocator does not require unpoisoning before returning memory.
857-
if _LIBCPP_CONSTEXPR (!is_same<allocator_type, __default_allocator_type>::value)
857+
if _LIBCPP_CONSTEXPR_SINCE_CXX17 (!is_same<allocator_type, __default_allocator_type>::value)
858858
__annotate_contiguous_container(data(), data() + capacity(), data() + size(), data() + capacity());
859859
#endif
860860
}

0 commit comments

Comments
 (0)