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

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

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.