Embedded Template Library
1.0
determine_compiler_language_support.h
Go to the documentation of this file.
1
3
/******************************************************************************
4
The MIT License(MIT)
5
6
Embedded Template Library.
7
https://github.com/ETLCPP/etl
8
https://www.etlcpp.com
9
10
Copyright(c) 2019 jwellbelove
11
12
Permission is hereby granted, free of charge, to any person obtaining a copy
13
of this software and associated documentation files(the "Software"), to deal
14
in the Software without restriction, including without limitation the rights
15
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
16
copies of the Software, and to permit persons to whom the Software is
17
furnished to do so, subject to the following conditions :
18
19
The above copyright notice and this permission notice shall be included in all
20
copies or substantial portions of the Software.
21
22
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
25
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
SOFTWARE.
29
******************************************************************************/
30
31
#ifndef ETL_DETERMINE_COMPILER_LANGUAGE_SUPPORT_H_INCLUDED
32
#define ETL_DETERMINE_COMPILER_LANGUAGE_SUPPORT_H_INCLUDED
33
34
#include <math.h>
35
36
#include "
determine_compiler.h
"
37
38
#if !defined(ETL_CPP11_SUPPORTED) && !defined(ETL_CPP14_SUPPORTED) && !defined(ETL_CPP17_SUPPORTED)
39
#if defined(__cplusplus)
40
#if defined(ETL_COMPILER_MICROSOFT)
41
#define ETL_CPP11_SUPPORTED (_MSC_VER >= 1600)
42
#define ETL_CPP14_SUPPORTED (_MSC_VER >= 1900)
43
#define ETL_CPP17_SUPPORTED (_MSC_VER >= 1914)
44
#define ETL_CPP20_SUPPORTED 0
45
#elif defined(ETL_COMPILER_ARM5)
46
#define ETL_CPP11_SUPPORTED 0
47
#define ETL_CPP14_SUPPORTED 0
48
#define ETL_CPP17_SUPPORTED 0
49
#define ETL_CPP20_SUPPORTED 0
50
#else
51
#define ETL_CPP11_SUPPORTED (__cplusplus >= 201103L)
52
#define ETL_CPP14_SUPPORTED (__cplusplus >= 201402L)
53
#define ETL_CPP17_SUPPORTED (__cplusplus >= 201703L)
54
#define ETL_CPP20_SUPPORTED 0
55
#endif
56
#else
57
#define ETL_CPP11_SUPPORTED 0
58
#define ETL_CPP14_SUPPORTED 0
59
#define ETL_CPP17_SUPPORTED 0
60
#define ETL_CPP20_SUPPORTED 0
61
#endif
62
#endif
63
64
// Helper macros
65
#define ETL_CPP11_NOT_SUPPORTED !ETL_CPP11_SUPPORTED
66
#define ETL_CPP14_NOT_SUPPORTED !ETL_CPP14_SUPPORTED
67
#define ETL_CPP17_NOT_SUPPORTED !ETL_CPP17_SUPPORTED
68
69
#if !defined(ETL_NO_NULLPTR_SUPPORT)
70
#define ETL_NO_NULLPTR_SUPPORT ETL_CPP11_NOT_SUPPORTED
71
#endif
72
73
#if !defined(ETL_NO_LARGE_CHAR_SUPPORT)
74
#define ETL_NO_LARGE_CHAR_SUPPORT ETL_CPP11_NOT_SUPPORTED
75
#endif
76
77
#if !defined(ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED)
78
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED ETL_CPP14_SUPPORTED
79
#endif
80
81
// NAN not defined or Rowley CrossWorks
82
#if !defined(NAN) || defined(__CROSSWORKS_ARM) || defined(ETL_COMPILER_ARM5)
83
#define ETL_NO_CPP_NAN_SUPPORT
84
#endif
85
86
#endif
determine_compiler.h
include
etl
profiles
determine_compiler_language_support.h
Generated on Sat Jan 23 2021 10:04:37 for Embedded Template Library by
1.9.1