6#ifndef MIMICPP_UTILITIES_CXX23_BACKPORTS_HPP
7#define MIMICPP_UTILITIES_CXX23_BACKPORTS_HPP
13#ifndef MIMICPP_DETAIL_IS_MODULE
14 #include <type_traits>
19#ifdef __cpp_lib_unreachable
21 #ifndef MIMICPP_DETAIL_IS_MODULE
27 using std::unreachable;
47 #if MIMICPP_DETAIL_IS_MSVC
50 __builtin_unreachable();
60 requires std::is_enum_v<T>
62 constexpr std::underlying_type_t<T>
to_underlying(T
const value)
noexcept
64 return static_cast<std::underlying_type_t<T>
>(value);
#define MIMICPP_ASSERT(condition, msg)
Definition Config.hpp:51
#define MIMICPP_DETAIL_MODULE_EXPORT
Definition Config.hpp:19
constexpr std::underlying_type_t< T > to_underlying(T const value) noexcept
Definition C++23Backports.hpp:62
void unreachable()
Invokes undefined behavior.
Definition C++23Backports.hpp:40