Ruby
4.1.0dev (2026-09-29 revision 58b42841dde0834f4bd01a6793ef8aaa68ed2631)
prism
compiler
nodiscard.h
Go to the documentation of this file.
1
4
#ifndef PRISM_COMPILER_NODISCARD_H
5
#define PRISM_COMPILER_NODISCARD_H
6
12
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
13
# define PRISM_NODISCARD [[nodiscard]]
14
#elif defined(__GNUC__) || defined(__clang__)
15
# define PRISM_NODISCARD __attribute__((__warn_unused_result__))
16
#elif defined(_MSC_VER)
17
# define PRISM_NODISCARD _Check_return_
18
#else
19
# define PRISM_NODISCARD
20
#endif
21
22
#endif
Generated by
1.9.8