We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a94acdf commit 178532bCopy full SHA for 178532b
1 file changed
include/pcg_random.hpp
@@ -113,6 +113,8 @@
113
114
#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
115
#define PCG_NODISCARD [[nodiscard]]
116
+#elif defined(__GNUC__) || defined(__clang__)
117
+ #define PCG_NODISCARD __attribute__((warn_unused_result))
118
#else
119
#define PCG_NODISCARD
120
#endif
@@ -1310,7 +1312,7 @@ class PCG_EBO extended : public baseclass {
1310
1312
return baseclass::period_pow2() + table_size*extvalclass::period_pow2();
1311
1313
}
1314
- PCG_ALWAYS_INLINE PCG_NODISCARD result_type operator()()
1315
+ PCG_NODISCARD PCG_ALWAYS_INLINE result_type operator()()
1316
{
1317
result_type rhs = get_extended_value();
1318
result_type lhs = this->baseclass::operator()();
0 commit comments