xtd 0.2.0
Loading...
Searching...
No Matches
__compiler_version.h
Go to the documentation of this file.
1
3#pragma once
5#if !defined(__XTD_CORE_INTERNAL__)
6#error "Do not include this file: Internal use only"
7#endif
9#include "../version.h"
10
12#if defined(_MSC_FULL_VER) && defined(_MSC_BUILD) && _MSC_BUILD != 0
13# define __compiler_version xtd::version {_MSC_FULL_VER / 10000000, _MSC_FULL_VER % 10000000 / 100000, _MSC_FULL_VER % 100000, _MSC_BUILD}
14#elif defined(_MSC_FULL_VER)
15# define __compiler_version xtd::version {_MSC_FULL_VER / 10000000, _MSC_FULL_VER % 10000000 / 100000, _MSC_FULL_VER % 100000}
16#elif defined(_MSC_VER)
17# define __compiler_version xtd::version {_MSC_VER / 100, _MSC_VER % 100}
18#elif defined(__clang__)
19# define __compiler_version xtd::version {__clang_major__, __clang_minor__, __clang_patchlevel__}
20#elif defined(__GNUC__)
21# define __compiler_version xtd::version {__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__}
22#else
23# define __compiler_version xtd::version {}
24#endif