LSH-Core
Deterministic firmware core for Controllino-based Labo Smart Home nodes
 
Loading...
Searching...
No Matches
cpp_features.hpp
Go to the documentation of this file.
1
24#ifndef LSH_CORE_INTERNAL_CPP_FEATURES_HPP
25#define LSH_CORE_INTERNAL_CPP_FEATURES_HPP
26
28#include <etl/platform.h>
30
31#define LSH_USING_CPP11 ETL_USING_CPP11
32#define LSH_USING_CPP14 ETL_USING_CPP14
33#define LSH_USING_CPP17 ETL_USING_CPP17
34#define LSH_USING_CPP20 ETL_USING_CPP20
35#define LSH_USING_CPP23 ETL_USING_CPP23
36
37#define LSH_CONSTEXPR ETL_CONSTEXPR
38#define LSH_CONSTEXPR11 ETL_CONSTEXPR11
39#define LSH_CONSTEXPR14 ETL_CONSTEXPR14
40#define LSH_CONSTEXPR17 ETL_CONSTEXPR17
41#define LSH_CONSTEXPR20 ETL_CONSTEXPR20
42
43// Optional constructors that can become constexpr on sufficiently modern
44// toolchains. The default keeps them enabled when the compiler exposes the
45// C++20 relaxed constexpr model, while still allowing explicit force on/off.
46#if defined(LSH_DISABLE_AGGRESSIVE_CONSTEXPR_CTORS)
47#define LSH_OPTIONAL_CONSTEXPR_CTOR
48#elif defined(LSH_ENABLE_AGGRESSIVE_CONSTEXPR_CTORS)
49#define LSH_OPTIONAL_CONSTEXPR_CTOR constexpr
50#elif defined(__cpp_constexpr) && (__cpp_constexpr >= 201907L)
51#define LSH_OPTIONAL_CONSTEXPR_CTOR constexpr
52#else
53#define LSH_OPTIONAL_CONSTEXPR_CTOR
54#endif
55
56#endif // LSH_CORE_INTERNAL_CPP_FEATURES_HPP
Restores Arduino-style min/max macros after ETL headers.
Temporarily removes Arduino-style min/max macros before ETL headers.