Skip to content

Commit

Permalink
<functional>: add noreturn for !_HAS_STATIC_RTTI (#3882)
Browse files Browse the repository at this point in the history
Co-authored-by: Stephan T. Lavavej <[email protected]>
  • Loading branch information
ferhatgec and StephanTLavavej authored Jul 20, 2023
1 parent c1c9691 commit 34f86c5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions stl/inc/functional
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,11 @@ private:
}
}

const type_info& _Target_type() const noexcept override {
#if !_HAS_STATIC_RTTI
[[noreturn]]
#endif // !_HAS_STATIC_RTTI
const type_info&
_Target_type() const noexcept override {
#if _HAS_STATIC_RTTI
return typeid(_Callable);
#else // _HAS_STATIC_RTTI
Expand Down Expand Up @@ -810,7 +814,11 @@ private:
}
}

const type_info& _Target_type() const noexcept override {
#if !_HAS_STATIC_RTTI
[[noreturn]]
#endif // !_HAS_STATIC_RTTI
const type_info&
_Target_type() const noexcept override {
#if _HAS_STATIC_RTTI
return typeid(_Callable);
#else // _HAS_STATIC_RTTI
Expand Down

0 comments on commit 34f86c5

Please sign in to comment.