-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use intrinsics for unreachable to support C++20
- Loading branch information
1 parent
3c614bb
commit 75a090b
Showing
5 changed files
with
44 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
#ifndef BEMAN_ANY_VIEW_DETAIL_UTILITY_HPP | ||
#define BEMAN_ANY_VIEW_DETAIL_UTILITY_HPP | ||
|
||
namespace beman::any_view::detail { | ||
|
||
[[noreturn]] inline auto unreachable() -> void { | ||
#if defined(_MSC_VER) | ||
__assume(false); | ||
#elif defined(__GNUG__) | ||
__builtin_unreachable(); | ||
#endif | ||
} | ||
|
||
} // namespace beman::any_view::detail | ||
|
||
#endif // BEMAN_ANY_VIEW_DETAIL_UTILITY_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters