41 static constexpr bool ret_is_bool = std::is_same_v<TRet, bool>;
43 if constexpr (!ret_is_bool) {
44 static_assert (std::is_same_v<TRet, TValue>,
"Both TRet and TValue must be the same type unless TValue is 'bool'");
47 if (ret != error_value) {
48 if constexpr (ret_is_bool) {
55#if defined (NCPP_EXCEPTIONS_PLEASE)
56 throw call_error (
"Call returned an error value");
58 if constexpr (ret_is_bool) {
69 static constexpr bool ret_is_bool = std::is_same_v<TRet, bool>;
71 if constexpr (!ret_is_bool) {
72 static_assert (std::is_same_v<TRet, TValue>,
"Both TRet and TValue must be the same type unless TValue is 'bool'");
76 if constexpr (ret_is_bool) {
83#if defined (NCPP_EXCEPTIONS_PLEASE)
84 throw call_error (
"Call returned an error value");
86 if constexpr (ret_is_bool) {