14#ifndef IOX2_BB_REPORTING_ERROR_REPORTING_ERROR_FORWARDING_HPP
15#define IOX2_BB_REPORTING_ERROR_REPORTING_ERROR_FORWARDING_HPP
36template <
typename Message>
38 panic(location, std::forward<Message>(
msg));
45template <
typename T1,
typename T2,
typename Message>
47 if (std::is_same<T1, T2>::value) {
58template <
typename Error,
typename Kind>
63 using K =
typename std::remove_const<typename std::remove_reference<Kind>::type>::type;
76template <
typename Error,
typename Kind>
81 using K =
typename std::remove_const<typename std::remove_reference<Kind>::type>::type;
93template <
typename Error,
typename Kind,
typename Message>
100 using K =
typename std::remove_const<typename std::remove_reference<Kind>::type>::type;
104 std::forward<Kind>(
kind),
105 std::forward<Error>(
error),
107 std::forward<Message>(
msg));
constexpr void unreachable_wrapped(const bb::detail::SourceLocation &location, Message &&msg)
void forwardNonFatalError(Error &&error, Kind &&kind, const bb::detail::SourceLocation &location, const char *stringifiedCondition)
Forwards a non-fatal error.
void forwardPanic(const bb::detail::SourceLocation &location, Message &&msg)
Forwards that a panic state was encountered and does not return.
void forwardFatalError(Error &&error, Kind &&kind, const bb::detail::SourceLocation &location, const char *stringifiedCondition)
Forwards a fatal error and does not return.
void report(const bb::detail::SourceLocation &location, Kind, const Error &error, const char *stringifiedCondition)
constexpr bool always_false_v
Helper value to bind a static_assert to a type.
helper struct to create an expected which is signalling an error more easily