guanaqo 1.0.0-alpha.26
Utilities for scientific software
Loading...
Searching...
No Matches
compiler.h
Go to the documentation of this file.
1#pragma once
2
3/// @file
4/// @ingroup macros
5/// Compiler feature detection helpers.
6
7#ifdef __clang__
8#define GUANAQO_CLANG_OLDER_THAN(maj) (__clang_maj__ < (maj))
9#else
10#define GUANAQO_CLANG_OLDER_THAN(maj) 0
11#endif
12
13#if defined(__GNUC__) && !defined(__clang__)
14#define GUANAQO_GCC_OLDER_THAN(maj) (__GNUC__ < (maj))
15#else
16#define GUANAQO_GCC_OLDER_THAN(maj) 0
17#endif
18
19#ifdef _MSC_VER
20#define GUANAQ_MSVC_OLDER_THAN(maj, min) (_MSC_VER < ((maj) * 100 + (min)))
21#else
22#define GUANAQ_MSVC_OLDER_THAN(maj, min) 0
23#endif