mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-01 23:46:59 +00:00
fix result unused attribute
This commit is contained in:
parent
d11262f38d
commit
2d5f95cf4d
@ -3,9 +3,15 @@
|
||||
#include <boost/outcome.hpp>
|
||||
#include <boost/outcome/success_failure.hpp>
|
||||
|
||||
#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<typename T, typename EC>
|
||||
using Result __attribute__((warn_unused_result)) = boost::outcome_v2::result<T, EC>;
|
||||
using Result BEAMMP_WARN_UNUSED = boost::outcome_v2::result<T, EC>;
|
||||
|
||||
namespace outcome = boost::outcome_v2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user