Skip to content

Commit

Permalink
add __forceinline to std::unreachable instead of inline (#3055)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Bessonov <[email protected]>
  • Loading branch information
fsb4000 and AlexBAV authored Aug 27, 2022
1 parent 05e5e68 commit c23bbd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stl/inc/utility
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ _NODISCARD constexpr underlying_type_t<_Ty> to_underlying(_Ty _Value) noexcept {
return static_cast<underlying_type_t<_Ty>>(_Value);
}

[[noreturn]] inline void unreachable() noexcept /* strengthened */ {
[[noreturn]] __forceinline void unreachable() noexcept /* strengthened */ {
_STL_UNREACHABLE;
#ifdef _DEBUG
_CSTD abort(); // likely to be called in debug mode, but can't be relied upon - already entered the UB territory
Expand Down

0 comments on commit c23bbd8

Please sign in to comment.