File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,10 @@ typedef unsigned long long qgssize;
213
213
214
214
215
215
216
+
217
+
218
+
219
+
216
220
/************************************************************************
217
221
* This file has been generated automatically from *
218
222
* *
Original file line number Diff line number Diff line change @@ -548,4 +548,29 @@ typedef unsigned long long qgssize;
548
548
#define FALLTHROUGH
549
549
#endif
550
550
551
+ // see https://infektor.net/posts/2017-01-19-using-cpp17-attributes-today.html#using-the-nodiscard-attribute
552
+ #if __cplusplus >= 201703L
553
+ #define NODISCARD [[nodiscard]]
554
+ #elif defined(__clang__)
555
+ #define NODISCARD [[nodiscard]]
556
+ #elif __has_cpp_attribute(nodiscard)
557
+ #define NODISCARD [[nodiscard]]
558
+ #elif __has_cpp_attribute(gnu::warn_unused_result)
559
+ #define NODISCARD [[gnu::warn_unused_result]]
560
+ #else
561
+ #define NODISCARD Q_REQUIRED_RESULT
562
+ #endif
563
+
564
+ #if __cplusplus >= 201703L
565
+ #define MAYBE_UNUSED [[maybe_unused]]
566
+ #elif defined(__clang__)
567
+ #define MAYBE_UNUSED [[maybe_unused]]
568
+ #elif __has_cpp_attribute(gnu::unused)
569
+ #define NODISCARD [[gnu::unused]]
570
+ #else
571
+ #define NODISCARD
572
+ #endif
573
+
574
+
575
+
551
576
You can’t perform that action at this time.
0 commit comments