tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
unreachable.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_UTILITY_UNREACHABLE_HPP
4#define TETL_UTILITY_UNREACHABLE_HPP
5
6#include <etl/_config/all.hpp>
7
8namespace etl {
9
10[[noreturn]] inline auto unreachable() -> void
11{
12#if defined(_MSC_VER) and not defined(__clang__)
13 __assume(false);
14#else
15 __builtin_unreachable();
16#endif
17}
18
19} // namespace etl
20
21#endif // TETL_UTILITY_UNREACHABLE_HPP
Definition adjacent_find.hpp:8
auto unreachable() -> void
Definition unreachable.hpp:10