File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -780,8 +780,13 @@ class _LIBCPP_TEMPLATE_VIS vector {
780780
781781 _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI void __move_assign_alloc (vector&, false_type) _NOEXCEPT {}
782782
783- _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pointer __add_alignment_assumption (pointer __p) const _NOEXCEPT {
784- return static_cast <pointer>(__builtin_assume_aligned (__p, alignof (decltype (*__p))));
783+ static _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI pointer __add_alignment_assumption (pointer __p) _NOEXCEPT {
784+ if constexpr (is_pointer<pointer>::value) {
785+ if (!__libcpp_is_constant_evaluated ()) {
786+ return static_cast <pointer>(__builtin_assume_aligned (__p, alignof (decltype (*__p))));
787+ }
788+ }
789+ return __p;
785790 }
786791};
787792
You can’t perform that action at this time.
0 commit comments