Kagome
Polkadot Runtime Engine in C++17
unreachable.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_UNREACHABLE_HPP
7 #define KAGOME_UNREACHABLE_HPP
8 
14 #if defined(__GNUC__)
15 #define UNREACHABLE __builtin_unreachable();
16 #elif defined(_MSC_VER)
17 #define UNREACHABLE __assume(false);
18 #else
19 template <unsigned int LINE>
21 #define UNREACHABLE throw Unreachable_At_Line<__LINE__>(); // NOLINT
22 #endif
23 
24 #undef GCC_VERSION
25 
26 #endif // KAGOME_UNREACHABLE_HPP
This file declares UNREACHABLE macro. Use it to prevent compiler warnings.
Definition: unreachable.hpp:20