diff --git a/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvprojx b/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvprojx
index d92ef376..497bc1bd 100644
--- a/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvprojx
+++ b/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvprojx
@@ -10,8 +10,8 @@
Target 1
0x4
ARM-ADS
- 5060750::V5.06 update 6 (build 750)::ARMCC
- 0
+ 6090000::V6.9::.\ARMCLANG
+ 1
STM32F401RETx
diff --git a/examples/ArmTimerCallbacks - C++/etl_profile.h b/examples/ArmTimerCallbacks - C++/etl_profile.h
index 0e874e1e..6362a416 100644
--- a/examples/ArmTimerCallbacks - C++/etl_profile.h
+++ b/examples/ArmTimerCallbacks - C++/etl_profile.h
@@ -12,10 +12,18 @@
#if (__CC_ARM == 1)
// ARM5 compiler
+ #if defined(ETL_NO_STL)
+ #include "etl/profiles/armv5_no_stl.h"
+ #else
#include "etl/profiles/armv5.h"
+ #endif
#else
// ARM6 compiler
+ #if defined(ETL_NO_STL)
+ #include "etl/profiles/armv6_no_stl.h"
+ #else
#include "etl/profiles/armv6.h"
+ #endif
#endif
#endif
diff --git a/examples/ArmTimerCallbacks - C++/main.cpp b/examples/ArmTimerCallbacks - C++/main.cpp
index d2d0e5a3..9a25db0d 100644
--- a/examples/ArmTimerCallbacks - C++/main.cpp
+++ b/examples/ArmTimerCallbacks - C++/main.cpp
@@ -1,13 +1,17 @@
#include
+//#if (__cplusplus < 201103L)
extern "C"
{
- #include "Board_LED.h" // ::Board Support:LED
- #include "Board_Buttons.h" // ::Board Support:Buttons
-
- #include "stm32f4xx.h" // Device header
+//#endif
+#include "Board_LED.h" // ::Board Support:LED
+#include "Board_Buttons.h" // ::Board Support:Buttons
+//#if (__cplusplus < 201103L)
}
+//#endif
+
+#include "stm32f4xx.h" // Device header
#include "etl/function.h"
#include "etl/callback_timer.h"
@@ -124,6 +128,12 @@ int main()
LED_Initialize();
Buttons_Initialize();
+ long int v = __cplusplus;
+
+ char16_t c16;
+
+ int* p = nullptr;
+
// The LEDs will start flashing fast after 2 seconds.
// After another 5 seconds they will start flashing slower.
short_toggle = callback_timer.register_timer(LedToggle, 50, etl::timer::mode::REPEATING);
diff --git a/include/etl/nullptr.h b/include/etl/nullptr.h
index 99dfc2f5..1ee34149 100644
--- a/include/etl/nullptr.h
+++ b/include/etl/nullptr.h
@@ -37,7 +37,7 @@ SOFTWARE.
/// A definition of nullptr for compilers that don't support it as standard.
///\ingroup utilities
-#if (ETL_NO_NULLPTR_SUPPORT && !defined(ARDUINO))
+#if (ETL_NO_NULLPTR_SUPPORT && !defined(ARDUINO)) || defined(ETL_COMPILER_ARM5)
namespace std
{
//*****************************************************************************
@@ -73,7 +73,7 @@ namespace std
/// A null pointer.
///\ingroup nullptr
//*****************************************************************************
-#if !defined(ETL_STLPORT) || !defined(ETL_COMPILER_ARM5)
+#if !defined(ETL_STLPORT) && (defined(ETL_COMPILER_ARM5) && (__cplusplus < 201103L))
const std::nullptr_t nullptr = {};
#endif
diff --git a/include/etl/profiles/armv5.h b/include/etl/profiles/armv5.h
index 07918cda..b17f64dd 100644
--- a/include/etl/profiles/armv5.h
+++ b/include/etl/profiles/armv5.h
@@ -41,8 +41,8 @@ SOFTWARE.
#define ETL_CPP11_SUPPORTED 0
#define ETL_CPP14_SUPPORTED 0
#define ETL_CPP17_SUPPORTED 0
-#define ETL_NO_NULLPTR_SUPPORT 1
-#define ETL_NO_LARGE_CHAR_SUPPORT 1
+#define ETL_NO_NULLPTR_SUPPORT (__cplusplus < 201103L)
+#define ETL_NO_LARGE_CHAR_SUPPORT (__cplusplus < 201103L)
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0
#endif
diff --git a/include/etl/profiles/armv5_no_stl.h b/include/etl/profiles/armv5_no_stl.h
index cc8fabb3..4da2cbb5 100644
--- a/include/etl/profiles/armv5_no_stl.h
+++ b/include/etl/profiles/armv5_no_stl.h
@@ -41,8 +41,8 @@ SOFTWARE.
#define ETL_CPP11_SUPPORTED 0
#define ETL_CPP14_SUPPORTED 0
#define ETL_CPP17_SUPPORTED 0
-#define ETL_NO_NULLPTR_SUPPORT 1
-#define ETL_NO_LARGE_CHAR_SUPPORT 1
+#define ETL_NO_NULLPTR_SUPPORT (__cplusplus < 201103L)
+#define ETL_NO_LARGE_CHAR_SUPPORT (__cplusplus < 201103L)
#define ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED 0
#define ETL_NO_STL
diff --git a/include/etl/stl/alternate/utility.h b/include/etl/stl/alternate/utility.h
index 947b9109..41cf3dec 100644
--- a/include/etl/stl/alternate/utility.h
+++ b/include/etl/stl/alternate/utility.h
@@ -45,6 +45,7 @@ SOFTWARE.
namespace std
#endif
{
+#if !defined(ETL_COMPILER_ARM6)
//******************************************************************************
template
struct pair
@@ -90,7 +91,7 @@ SOFTWARE.
other.second = temp2;
}
};
-
+#endif
//******************************************************************************
template
inline pair make_pair(T1 a, T2 b)
@@ -98,6 +99,7 @@ SOFTWARE.
return pair(a, b);
}
+#if !defined(ETL_COMPILER_ARM6)
//******************************************************************************
template
inline void swap(pair& a, pair& b)
@@ -107,7 +109,7 @@ SOFTWARE.
//******************************************************************************
template
- inline bool operator ==(const pair& a, const pair& b)
+ inline bool operator ==(const pair& a, const pair& b)
{
return (a.first == b.first) && (a.second == b.second);
}
@@ -142,6 +144,7 @@ SOFTWARE.
{
return !(a < b);
}
+#endif
}
#endif