mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-06-22 00:20:59 +00:00
fix result unused attribute
This commit is contained in:
+7
-1
@@ -3,9 +3,15 @@
|
|||||||
#include <boost/outcome.hpp>
|
#include <boost/outcome.hpp>
|
||||||
#include <boost/outcome/success_failure.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,
|
// attribute because [[nodiscard]] isn't possible on using decls - if you wanna write a standards proposal,
|
||||||
// this is one to write.
|
// this is one to write.
|
||||||
template<typename T, typename EC>
|
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;
|
namespace outcome = boost::outcome_v2;
|
||||||
|
|||||||
Reference in New Issue
Block a user