Skip to content

Commit

Permalink
Annotate some functions _MSVC_CONSTEXPR (#2658)
Browse files Browse the repository at this point in the history
  • Loading branch information
CaseyCarter committed Apr 19, 2022
1 parent 9bf8f3f commit 0349ce1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stl/inc/memory
Expand Up @@ -474,7 +474,7 @@ namespace ranges {
noexcept(noexcept(::new (const_cast<void*>(static_cast<const volatile void*>(_Location)))
_Ty(_STD forward<_Types>(_Args)...))) /* strengthened */ {
// clang-format on
return ::new (const_cast<void*>(static_cast<const volatile void*>(_Location)))
_MSVC_CONSTEXPR return ::new (const_cast<void*>(static_cast<const volatile void*>(_Location)))
_Ty(_STD forward<_Types>(_Args)...);
}
};
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/xutility
Expand Up @@ -222,7 +222,7 @@ template <class _Ty, class... _Types,
class = void_t<decltype(::new (_STD declval<void*>()) _Ty(_STD declval<_Types>()...))>>
constexpr _Ty* construct_at(_Ty* const _Location, _Types&&... _Args) noexcept(
noexcept(::new (_Voidify_iter(_Location)) _Ty(_STD forward<_Types>(_Args)...))) /* strengthened */ {
return ::new (_Voidify_iter(_Location)) _Ty(_STD forward<_Types>(_Args)...);
_MSVC_CONSTEXPR return ::new (_Voidify_iter(_Location)) _Ty(_STD forward<_Types>(_Args)...);
}
#endif // _HAS_CXX20

Expand Down
4 changes: 4 additions & 0 deletions stl/inc/yvals_core.h
Expand Up @@ -1546,5 +1546,9 @@ compiler option, or define _ALLOW_RTCc_IN_STL to acknowledge that you have recei
#define _STL_INTERNAL_STATIC_ASSERT(...)
#endif // _ENABLE_STL_INTERNAL_CHECK

#ifndef _MSVC_CONSTEXPR // TRANSITION, VS2022v17.3p2
#define _MSVC_CONSTEXPR
#endif

#endif // _STL_COMPILER_PREPROCESSOR
#endif // _YVALS_CORE_H_

0 comments on commit 0349ce1

Please sign in to comment.