From 2d5f95cf4deaaf6e183aecca73d9245e86f3f974 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Wed, 27 Mar 2024 16:31:11 +0100 Subject: [PATCH] fix result unused attribute --- src/Result.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Result.h b/src/Result.h index dc1af81..1d5f776 100644 --- a/src/Result.h +++ b/src/Result.h @@ -3,9 +3,15 @@ #include #include +#ifdef WIN32 +#define BEAMMP_WARN_UNUSED +#else +#define BEAMMP_WARN_UNUSED __attribute__((warn_unused_result)) +#endif + // attribute because [[nodiscard]] isn't possible on using decls - if you wanna write a standards proposal, // this is one to write. template -using Result __attribute__((warn_unused_result)) = boost::outcome_v2::result; +using Result BEAMMP_WARN_UNUSED = boost::outcome_v2::result; namespace outcome = boost::outcome_v2;