Skip to content

Commit 10a356c

Browse files
committed
[libc++] Make __swap_allocator constexpr
Make `__swap_allocator` constexpr Reviewed By: Quuxplusone, ldionne, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D115719
1 parent ac60263 commit 10a356c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libcxx/include/memory

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -832,9 +832,9 @@ _LIBCPP_FUNC_VIS void* align(size_t __align, size_t __sz, void*& __ptr, size_t&
832832

833833
// --- Helper for container swap --
834834
template <typename _Alloc>
835-
_LIBCPP_INLINE_VISIBILITY
835+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
836836
void __swap_allocator(_Alloc & __a1, _Alloc & __a2, true_type)
837-
#if _LIBCPP_STD_VER >= 14
837+
#if _LIBCPP_STD_VER > 11
838838
_NOEXCEPT
839839
#else
840840
_NOEXCEPT_(__is_nothrow_swappable<_Alloc>::value)
@@ -845,13 +845,13 @@ void __swap_allocator(_Alloc & __a1, _Alloc & __a2, true_type)
845845
}
846846

847847
template <typename _Alloc>
848-
inline _LIBCPP_INLINE_VISIBILITY
848+
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
849849
void __swap_allocator(_Alloc &, _Alloc &, false_type) _NOEXCEPT {}
850850

851851
template <typename _Alloc>
852-
inline _LIBCPP_INLINE_VISIBILITY
852+
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
853853
void __swap_allocator(_Alloc & __a1, _Alloc & __a2)
854-
#if _LIBCPP_STD_VER >= 14
854+
#if _LIBCPP_STD_VER > 11
855855
_NOEXCEPT
856856
#else
857857
_NOEXCEPT_(__is_nothrow_swappable<_Alloc>::value)

0 commit comments

Comments
 (0)