IA_TRY_DISCARD

This commit is contained in:
2026-01-20 04:27:17 +05:30
parent 07dc604346
commit 71fc7ae581

View File

@ -353,6 +353,16 @@
std::move(*_ia_res); \ std::move(*_ia_res); \
}) })
#define IA_TRY_DISCARD(expr) \
{ \
auto _ia_res = (expr); \
if (!_ia_res) \
{ \
return tl::make_unexpected(std::move(_ia_res.error())); \
} \
UNUSED(*_ia_res); \
}
#define IA_CONCAT_IMPL(x, y) x##y #define IA_CONCAT_IMPL(x, y) x##y
#define IA_CONCAT(x, y) IA_CONCAT_IMPL(x, y) #define IA_CONCAT(x, y) IA_CONCAT_IMPL(x, y)
#define IA_UNIQUE_NAME(prefix) IA_CONCAT(prefix, __LINE__) #define IA_UNIQUE_NAME(prefix) IA_CONCAT(prefix, __LINE__)