C++ Client-Side SDK
LaunchDarkly SDK
Loading...
Searching...
No Matches
common
include
launchdarkly
detail
unreachable.hpp
1
#pragma once
2
3
namespace
launchdarkly::detail {
4
5
// This may be replaced with a standard routine when C++23 is available.
6
[[noreturn]]
inline
void
unreachable() {
7
// Uses compiler specific extensions if possible.
8
// Even if no extension is used, undefined behavior is still raised by
9
// an empty function body and the noreturn attribute.
10
#if defined(__GNUC__)
// GCC, Clang, ICC
11
__builtin_unreachable();
12
#elif defined(_MSC_VER)
// MSVC
13
__assume(
false
);
14
#endif
15
}
16
}
// namespace launchdarkly::detail
Generated by
1.9.8