Ruby: include/ruby/internal/attr/noexcept.h Source File

Ruby 3.4.9p82 (2026-03-11 revision 76cca827ab52ab1d346a728f068d5b8da3e2952b)

noexcept.h
Go to the documentation of this file.
1#ifndef RBIMPL_ATTR_NOEXCEPT_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_ATTR_NOEXCEPT_H
64#include "ruby/internal/compiler_since.h"
65#include "ruby/internal/has/feature.h"
66
68#if ! defined(__cplusplus)
69# /* Doesn't make sense. */
70# define RBIMPL_ATTR_NOEXCEPT(_) /* void */
71
72#elif RBIMPL_HAS_FEATURE(cxx_noexcept)
73# define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
74
75#elif defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__
76# define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
77
78#elif defined(__INTEL_CXX11_MODE__)
79# define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
80
81#elif RBIMPL_COMPILER_SINCE(MSVC, 19, 0, 0)
82# define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
83
84#elif __cplusplus >= 201103L
85# define RBIMPL_ATTR_NOEXCEPT(_) noexcept(noexcept(_))
86
87#else
88# define RBIMPL_ATTR_NOEXCEPT(_) /* void */
89#endif
90
91#endif /* RBIMPL_ATTR_NOEXCEPT_H */
compiler_since.h
Defines RBIMPL_COMPILER_SINCE.
feature.h
Defines RBIMPL_HAS_FEATURE.