Ruby  3.4.0dev (2024-11-05 revision e440268d51fe02b303e3817a7a733a0dac1c5091)
Macros
compiler_since.h File Reference

(e440268d51fe02b303e3817a7a733a0dac1c5091)

Defines RBIMPL_COMPILER_SINCE. More...

#include "ruby/internal/compiler_is.h"
Include dependency graph for compiler_since.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RBIMPL_COMPILER_SINCE(cc, x, y, z)
 Checks if the compiler is of given brand and is newer than or equal to the passed version. More...
 
#define RBIMPL_COMPILER_BEFORE(cc, x, y, z)
 Checks if the compiler is of given brand and is older than the passed version. More...
 

Detailed Description

Defines RBIMPL_COMPILER_SINCE.

Author
Ruby developers ruby-.nosp@m.core.nosp@m.@ruby.nosp@m.-lan.nosp@m.g.org
Warning
Symbols prefixed with either RBIMPL or rbimpl are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will.
Note
To ruby-core: remember that this header can be possibly recursively included from extension libraries written in C++. Do not expect for instance __VA_ARGS__ is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98.

Definition in file compiler_since.h.

Macro Definition Documentation

◆ RBIMPL_COMPILER_BEFORE

#define RBIMPL_COMPILER_BEFORE (   cc,
  x,
  y,
 
)
Value:
((RBIMPL_COMPILER_VERSION_MAJOR < (x)) || \
((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && \
((RBIMPL_COMPILER_VERSION_MINOR < (y)) || \
((RBIMPL_COMPILER_VERSION_MINOR == (y)) && \
(RBIMPL_COMPILER_VERSION_PATCH < (z)))))))
#define RBIMPL_COMPILER_IS(cc)
Checks if the compiler is of given brand.
Definition: compiler_is.h:30

Checks if the compiler is of given brand and is older than the passed version.

Parameters
ccCompiler brand, like MSVC.
xMajor version.
yMinor version.
zPatchlevel.
Return values
truecc < x.y.z.
falseotherwise.

Definition at line 53 of file compiler_since.h.

◆ RBIMPL_COMPILER_SINCE

#define RBIMPL_COMPILER_SINCE (   cc,
  x,
  y,
 
)
Value:
((RBIMPL_COMPILER_VERSION_MAJOR > (x)) || \
((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && \
((RBIMPL_COMPILER_VERSION_MINOR > (y)) || \
((RBIMPL_COMPILER_VERSION_MINOR == (y)) && \
(RBIMPL_COMPILER_VERSION_PATCH >= (z)))))))

Checks if the compiler is of given brand and is newer than or equal to the passed version.

Parameters
ccCompiler brand, like MSVC.
xMajor version.
yMinor version.
zPatchlevel.
Return values
truecc >= x.y.z.
falseotherwise.

Definition at line 35 of file compiler_since.h.