Skip to content

Commit

Permalink
Keep native nodiscard
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Apr 3, 2018
1 parent ecfbe8a commit e702bd4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/qgis.h
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,9 @@ typedef unsigned long long qgssize;
#elif defined(_MSC_VER)
#define NODISCARD // no support
#elif defined(__has_cpp_attribute)
#if __has_cpp_attribute(gnu::warn_unused_result)
#if __has_cpp_attribute(nodiscard)
#define NODISCARD [[nodiscard]]
#elif __has_cpp_attribute(gnu::warn_unused_result)
#define NODISCARD [[gnu::warn_unused_result]]
#else
#define NODISCARD Q_REQUIRED_RESULT
Expand Down

0 comments on commit e702bd4

Please sign in to comment.