Device: Allow the suppression of disconnects from extensions

This commit is contained in:
Paul Hollinsky
2021-04-23 20:04:02 -04:00
parent 6c1cbc9db8
commit 4cd7bafca7
4 changed files with 68 additions and 2 deletions
+15
View File
@@ -0,0 +1,15 @@
#ifndef __ICSNEO_NODISCARD_H_
#define __ICSNEO_NODISCARD_H_
/**
* Allow the use of the nodiscard attribute where it is supported.
*/
#if __cplusplus > 201703L // C++20 and above
#define NODISCARD(str) [[nodiscard(str)]]
#elif __cplusplus > 201402L // C++17 and above
#define NODISCARD(str) [[nodiscard]]
#else
#define NODISCARD(str)
#endif
#endif