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;