mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Device: Allow the suppression of disconnects from extensions
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user