1 #ifndef RBIMPL_ATTR_NODISCARD_H
2 #define RBIMPL_ATTR_NODISCARD_H
32 #if RBIMPL_HAS_CPP_ATTRIBUTE(nodiscard)
33 # define RBIMPL_ATTR_NODISCARD() [[nodiscard]]
34 #elif RBIMPL_HAS_C_ATTRIBUTE(nodiscard)
35 # define RBIMPL_ATTR_NODISCARD() [[nodiscard]]
36 #elif RBIMPL_HAS_ATTRIBUTE(warn_unused_result)
37 # define RBIMPL_ATTR_NODISCARD() __attribute__((__warn_unused_result__))
38 #elif defined(_Check_return_)
40 # define RBIMPL_ATTR_NODISCARD() _Check_return_
42 # define RBIMPL_ATTR_NODISCARD()
Defines RBIMPL_HAS_ATTRIBUTE.
Defines RBIMPL_HAS_C_ATTRIBUTE.
Defines RBIMPL_HAS_CPP_ATTRIBUTE.