Embedded Template Library
1.0
Loading...
Searching...
No Matches
choose_namespace.h
Go to the documentation of this file.
1
2
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 John Wellbelove
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_CHOOSE_NAMESPACE_INCLUDED
32
#define ETL_CHOOSE_NAMESPACE_INCLUDED
33
34
#undef ETL_OR_STD
35
#undef ETL_OR_STD11
36
#undef ETL_OR_STD14
37
38
#if ETL_NOT_USING_STL && !defined(ETL_IN_UNIT_TEST)
39
// If we're not using the STL and we are not unit testing, then use the ETL's
40
// definitions under the etl namespace
41
#define ETL_OR_STD etl
42
#define ETL_USING_STD_NAMESPACE 0
43
#define ETL_USING_ETL_NAMESPACE 1
44
#else
45
// We will use the STL's definitions under the std namespace
46
#define ETL_OR_STD std
47
#define ETL_USING_STD_NAMESPACE 1
48
#define ETL_USING_ETL_NAMESPACE 0
49
#endif
50
51
#if (ETL_NOT_USING_STL && !defined(ETL_IN_UNIT_TEST)) || ETL_CPP11_NOT_SUPPORTED
52
// If we're not using the STL and we are not unit testing or C++11 is not
53
// supported, then use the ETL's definitions under the etl namespace
54
#define ETL_OR_STD11 etl
55
#define ETL_USING_STD11_NAMESPACE 0
56
#define ETL_USING_ETL11_NAMESPACE 1
57
#else
58
// We will use the STL's definitions under the std namespace
59
#define ETL_OR_STD11 std
60
#define ETL_USING_STD11_NAMESPACE 1
61
#define ETL_USING_ETL11_NAMESPACE 0
62
#endif
63
64
#if (ETL_NOT_USING_STL && !defined(ETL_IN_UNIT_TEST)) || ETL_CPP14_NOT_SUPPORTED
65
// If we're not using the STL and we are not unit testing or C++14 is not
66
// supported, then use the ETL's definitions under the etl namespace
67
#define ETL_OR_STD14 etl
68
#define ETL_USING_STD14_NAMESPACE 0
69
#define ETL_USING_ETL14_NAMESPACE 1
70
#else
71
// We will use the STL's definitions under the std namespace
72
#define ETL_OR_STD14 std
73
#define ETL_USING_STD14_NAMESPACE 1
74
#define ETL_USING_ETL14_NAMESPACE 0
75
#endif
76
77
#if (ETL_NOT_USING_STL && !defined(ETL_IN_UNIT_TEST)) || ETL_CPP17_NOT_SUPPORTED
78
// If we're not using the STL and we are not unit testing or C++17 is not
79
// supported, then use the ETL's definitions under the etl namespace
80
#define ETL_OR_STD17 etl
81
#define ETL_USING_STD17_NAMESPACE 0
82
#define ETL_USING_ETL17_NAMESPACE 1
83
#else
84
// We will use the STL's definitions under the std namespace
85
#define ETL_OR_STD17 std
86
#define ETL_USING_STD17_NAMESPACE 1
87
#define ETL_USING_ETL17_NAMESPACE 0
88
#endif
89
90
#endif
include
etl
private
choose_namespace.h
Generated on
for Embedded Template Library by
1.15.0