Skip to content
Permalink
Browse files

Keep native nodiscard

  • Loading branch information
elpaso committed Apr 3, 2018
1 parent ecfbe8a commit e702bd4a11e0dd73ebb4b2a86cd1bbf5a13045f4
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/core/qgis.h
@@ -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

0 comments on commit e702bd4

Please sign in to comment.
You can’t perform that action at this time.