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 definitions under the etl namespace
40
#define ETL_OR_STD etl
41
#define ETL_USING_STD_NAMESPACE 0
42
#define ETL_USING_ETL_NAMESPACE 1
43
#else
44
// We will use the STL's definitions under the std namespace
45
#define ETL_OR_STD std
46
#define ETL_USING_STD_NAMESPACE 1
47
#define ETL_USING_ETL_NAMESPACE 0
48
#endif
49
50
#if (ETL_NOT_USING_STL && !defined(ETL_IN_UNIT_TEST)) || ETL_CPP11_NOT_SUPPORTED
51
// If we're not using the STL and we are not unit testing or C++11 is not supported, then use the ETL's definitions under the etl namespace
52
#define ETL_OR_STD11 etl
53
#define ETL_USING_STD11_NAMESPACE 0
54
#define ETL_USING_ETL11_NAMESPACE 1
55
#else
56
// We will use the STL's definitions under the std namespace
57
#define ETL_OR_STD11 std
58
#define ETL_USING_STD11_NAMESPACE 1
59
#define ETL_USING_ETL11_NAMESPACE 0
60
#endif
61
62
#if (ETL_NOT_USING_STL && !defined(ETL_IN_UNIT_TEST)) || ETL_CPP14_NOT_SUPPORTED
63
// If we're not using the STL and we are not unit testing or C++14 is not supported, then use the ETL's definitions under the etl namespace
64
#define ETL_OR_STD14 etl
65
#define ETL_USING_STD14_NAMESPACE 0
66
#define ETL_USING_ETL14_NAMESPACE 1
67
#else
68
// We will use the STL's definitions under the std namespace
69
#define ETL_OR_STD14 std
70
#define ETL_USING_STD14_NAMESPACE 1
71
#define ETL_USING_ETL14_NAMESPACE 0
72
#endif
73
74
#if (ETL_NOT_USING_STL && !defined(ETL_IN_UNIT_TEST)) || ETL_CPP17_NOT_SUPPORTED
75
// If we're not using the STL and we are not unit testing or C++17 is not supported, then use the ETL's definitions under the etl namespace
76
#define ETL_OR_STD17 etl
77
#define ETL_USING_STD17_NAMESPACE 0
78
#define ETL_USING_ETL17_NAMESPACE 1
79
#else
80
// We will use the STL's definitions under the std namespace
81
#define ETL_OR_STD17 std
82
#define ETL_USING_STD17_NAMESPACE 1
83
#define ETL_USING_ETL17_NAMESPACE 0
84
#endif
85
86
#endif
include
etl
private
choose_namespace.h
Generated on Sat Jan 11 2025 23:21:45 for Embedded Template Library by
1.9.8