diff --git a/.gitignore b/.gitignore
index cb627492..870ab075 100644
--- a/.gitignore
+++ b/.gitignore
@@ -315,3 +315,6 @@ test/sanity-check/c++17/Makefile
test/vs2019/Debug LLVM
test/vs2019/DebugLLVMNoSTL
test/vs2019/DebugNoSTL
+test/vs2022/Debug LLVM
+test/vs2019/Debug MSVC - No STL - Built-ins/etl.exe
+test/vs2019/Debug-LLVM-NoSTL-Builtins/etl.exe
diff --git a/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvoptx b/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvoptx
index 52e14341..fb554746 100644
--- a/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvoptx
+++ b/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvoptx
@@ -103,7 +103,7 @@
1
0
0
- 5
+ 6
diff --git a/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvprojx b/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvprojx
index ab543f66..9991280c 100644
--- a/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvprojx
+++ b/examples/ArmTimerCallbacks - C++/ArmTimerCallbacks.uvprojx
@@ -16,7 +16,7 @@
STM32F401RETx
STMicroelectronics
- Keil.STM32F4xx_DFP.2.14.0
+ Keil.STM32F4xx_DFP.2.15.0
http://www.keil.com/pack/
IRAM(0x20000000,0x18000) IROM(0x08000000,0x80000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE
@@ -185,6 +185,7 @@
0
2
0
+ 0
0
0
8
@@ -351,7 +352,7 @@
0
0
0
- 0
+ 4
@@ -452,7 +453,7 @@
RTE\Device\STM32F401RETx\startup_stm32f401xe.s
-
+
@@ -460,7 +461,7 @@
RTE\Device\STM32F401RETx\system_stm32f4xx.c
-
+
@@ -468,4 +469,19 @@
+
+
+
+ <Project Info>
+
+
+
+
+
+ 0
+ 1
+
+
+
+
diff --git a/include/etl/bip_buffer_spsc_atomic.h b/include/etl/bip_buffer_spsc_atomic.h
index 4b2427aa..ed47b7cc 100644
--- a/include/etl/bip_buffer_spsc_atomic.h
+++ b/include/etl/bip_buffer_spsc_atomic.h
@@ -181,7 +181,7 @@ namespace etl
protected:
//*************************************************************************
- /// Construccts the buffer.
+ /// Constructs the buffer.
//*************************************************************************
bip_buffer_spsc_atomic_base(size_type reserved_)
: read(0)
diff --git a/include/etl/circular_buffer.h b/include/etl/circular_buffer.h
index ebd3a634..a002c15e 100644
--- a/include/etl/circular_buffer.h
+++ b/include/etl/circular_buffer.h
@@ -41,6 +41,10 @@ SOFTWARE.
#include "iterator.h"
#include "static_assert.h"
+#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && ETL_USING_STL
+ #include
+#endif
+
namespace etl
{
//***************************************************************************
diff --git a/include/etl/delegate.h b/include/etl/delegate.h
index 7fa1eaf7..867ef958 100644
--- a/include/etl/delegate.h
+++ b/include/etl/delegate.h
@@ -107,7 +107,7 @@ namespace etl
//*************************************************************************
// Constructor from lambda or functor.
//*************************************************************************
- template ::value, void>::type>
+ template ::value, void>>
delegate(const TLambda& instance)
{
assign((void*)(&instance), lambda_stub);
@@ -125,7 +125,7 @@ namespace etl
//*************************************************************************
/// Create from Lambda or Functor.
//*************************************************************************
- template ::value, void>::type>
+ template ::value, void>>
constexpr static delegate create(const TLambda& instance)
{
return delegate((void*)(&instance), lambda_stub);
@@ -210,7 +210,7 @@ namespace etl
//*************************************************************************
/// Create from Lambda or Functor.
//*************************************************************************
- template ::value, void>::type>
+ template ::value, void>>
delegate& operator =(const TLambda& instance)
{
assign((void*)(&instance), lambda_stub);
diff --git a/include/etl/delegate_service.h b/include/etl/delegate_service.h
index 1d02560e..3908d841 100644
--- a/include/etl/delegate_service.h
+++ b/include/etl/delegate_service.h
@@ -46,22 +46,70 @@ namespace etl
{
//***************************************************************************
/// An indexed delegate service.
- /// \tparam RANGE The number of delegates to handle.
- /// \tparam OFFSET The lowest delegate id value.
- /// The delegate ids must range between OFFSET and OFFSET + RANGE - 1.
+ /// \tparam Range The number of delegates to handle.
+ /// \tparam Offset The lowest delegate id value.
+ /// \tparam Delegates Pointer to an array of delegate pointers.
+ /// The delegate ids must range between Offset and Offset + Range - 1.
//***************************************************************************
- template
+ template * Delegates = nullptr>
class delegate_service
{
public:
//*************************************************************************
- /// Reset the delegate service.
+ /// Executes the delegate function for the index.
+ /// Compile time assert if the id is out of range.
+ /// \tparam Id The id of the delegate.
+ //*************************************************************************
+ template
+ void call() const
+ {
+ ETL_STATIC_ASSERT(Id < (Offset + Range), "Callback Id out of range");
+ ETL_STATIC_ASSERT(Id >= Offset, "Callback Id out of range");
+
+ Delegates[Id - Offset](Id);
+ }
+
+ //*************************************************************************
+ /// Executes the delegate function for the index.
+ /// \param id Id of the delegate.
+ //*************************************************************************
+ void call(const size_t id) const
+ {
+ if ((id >= Offset) && (id < (Offset + Range)))
+ {
+ // Call the delegate with the specified Id.
+ Delegates[id - Offset](id);
+ }
+ else
+ {
+ // Call the 'unhandled' delegate.
+ Delegates[Range](id);
+ }
+ }
+ };
+
+ //***************************************************************************
+ /// An indexed delegate service.
+ /// \tparam Range The number of delegates to handle.
+ /// \tparam Offset The lowest delegate id value.
+ /// The delegate ids must range between Offset and Offset + Range - 1.
+ //***************************************************************************
+ template
+ class delegate_service
+ {
+ public:
+
+ //*************************************************************************
+ /// Default constructor.
/// Sets all delegates to the internal default.
//*************************************************************************
delegate_service()
{
- etl::delegate default_delegate = etl::delegate::create, &delegate_service::unhandled>(*this);
+ etl::delegate default_delegate = etl::delegate::create, &delegate_service::unhandled>(*this);
lookup.fill(default_delegate);
}
@@ -69,16 +117,16 @@ namespace etl
//*************************************************************************
/// Registers a delegate for the specified id.
/// Compile time assert if the id is out of range.
- /// \tparam ID The id of the delegate.
+ /// \tparam Id The id of the delegate.
/// \param delegate Reference to the delegate.
//*************************************************************************
- template
+ template
void register_delegate(etl::delegate callback)
{
- ETL_STATIC_ASSERT(ID < (OFFSET + RANGE), "Callback Id out of range");
- ETL_STATIC_ASSERT(ID >= OFFSET, "Callback Id out of range");
+ ETL_STATIC_ASSERT(Id < (Offset + Range), "Callback Id out of range");
+ ETL_STATIC_ASSERT(Id >= Offset, "Callback Id out of range");
- lookup[ID - OFFSET] = callback;
+ lookup[Id - Offset] = callback;
}
//*************************************************************************
@@ -89,9 +137,9 @@ namespace etl
//*************************************************************************
void register_delegate(const size_t id, etl::delegate callback)
{
- if ((id >= OFFSET) && (id < (OFFSET + RANGE)))
+ if ((id >= Offset) && (id < (Offset + Range)))
{
- lookup[id - OFFSET] = callback;
+ lookup[id - Offset] = callback;
}
}
@@ -107,33 +155,32 @@ namespace etl
//*************************************************************************
/// Executes the delegate function for the index.
/// Compile time assert if the id is out of range.
- /// \tparam ID The id of the delegate.
+ /// \tparam Id The id of the delegate.
//*************************************************************************
- template
- void call()
+ template
+ void call() const
{
- ETL_STATIC_ASSERT(ID < (OFFSET + RANGE), "Callback Id out of range");
- ETL_STATIC_ASSERT(ID >= OFFSET, "Callback Id out of range");
+ ETL_STATIC_ASSERT(Id < (Offset + Range), "Callback Id out of range");
+ ETL_STATIC_ASSERT(Id >= Offset, "Callback Id out of range");
- lookup[ID - OFFSET](ID);
+ lookup[Id - Offset](Id);
}
//*************************************************************************
/// Executes the delegate function for the index.
/// \param id Id of the delegate.
//*************************************************************************
- void call(const size_t id)
+ void call(const size_t id) const
{
- if ((id >= OFFSET) && (id < (OFFSET + RANGE)))
+ if ((id >= Offset) && (id < (Offset + Range)))
{
- lookup[id - OFFSET](id);
+ // Call the delegate with the specified Id.
+ lookup[id - Offset](id);
}
else
{
- if (unhandled_delegate.is_valid())
- {
- unhandled_delegate(id);
- }
+ // Call the 'unhandled' delegate.
+ unhandled(id);
}
}
@@ -143,7 +190,7 @@ namespace etl
/// The default callback function.
/// Calls the user defined 'unhandled' callback if it exists.
//*************************************************************************
- void unhandled(size_t id)
+ void unhandled(size_t id) const
{
if (unhandled_delegate.is_valid())
{
@@ -155,7 +202,7 @@ namespace etl
etl::delegate unhandled_delegate;
/// Lookup table of delegates.
- etl::array, RANGE> lookup;
+ etl::array, Range> lookup;
};
}
diff --git a/include/etl/experimental/mem_cast.h b/include/etl/experimental/mem_cast.h
new file mode 100644
index 00000000..d5840321
--- /dev/null
+++ b/include/etl/experimental/mem_cast.h
@@ -0,0 +1,78 @@
+#pragma once
+template
+class uni_type
+{
+public:
+
+ static constexpr size_t Size = Size_;
+
+ //***********************************
+ template
+ T& get()
+ {
+ return *reinterpret_cast(buffer);
+ }
+
+ //***********************************
+ template
+ const T& get() const
+ {
+ return *reinterpret_cast(buffer);
+ }
+
+ template
+ operator T()
+ {
+ return *reinterpret_cast(buffer);
+ }
+
+ //***********************************
+ constexpr size_t size() const
+ {
+ return Size;
+ }
+
+private:
+
+ char buffer[Size]
+};
+
+
+
+template
+class uni_type_ptr
+{
+public:
+
+ static constexpr size_t Size = Size_;
+
+ //***********************************
+ template
+ T& get()
+ {
+ return *reinterpret_cast(pbuffer);
+ }
+
+ //***********************************
+ template
+ const T& get() const
+ {
+ return *reinterpret_cast(pbuffer);
+ }
+
+ template
+ operator T()
+ {
+ return *reinterpret_cast(pbuffer);
+ }
+
+ //***********************************
+ constexpr size_t size() const
+ {
+ return Size;
+ }
+
+private:
+
+ char* pbuffer;
+};
\ No newline at end of file
diff --git a/include/etl/functional.h b/include/etl/functional.h
index 0c3f0f2c..5f274af1 100644
--- a/include/etl/functional.h
+++ b/include/etl/functional.h
@@ -232,7 +232,6 @@ namespace etl
}
//***************************************************************************
-
template
class binder2nd : public etl::unary_function
{
diff --git a/include/etl/generators/largest_generator.h b/include/etl/generators/largest_generator.h
index 4f2512d1..0c3225a9 100644
--- a/include/etl/generators/largest_generator.h
+++ b/include/etl/generators/largest_generator.h
@@ -395,6 +395,14 @@ namespace etl
using largest_t = typename largest::type;
#endif
+#if ETL_CPP17_SUPPORTED
+ template
+ inline constexpr size_t largest_size_v = largest::size;
+
+ template
+ inline constexpr size_t largest_alignment_v = largest::alignment;
+#endif
+
#else
/*[[[cog
import cog
diff --git a/include/etl/generators/type_traits_generator.h b/include/etl/generators/type_traits_generator.h
index b2d405fe..24653e00 100644
--- a/include/etl/generators/type_traits_generator.h
+++ b/include/etl/generators/type_traits_generator.h
@@ -135,6 +135,9 @@ namespace etl
/// remove_reference
template struct remove_reference { typedef T type; };
template struct remove_reference { typedef T type; };
+#if ETL_CPP11_SUPPORTED
+ template struct remove_reference { typedef T type; };
+#endif
#if ETL_CPP11_SUPPORTED
template
@@ -449,61 +452,16 @@ namespace etl
inline constexpr bool is_pod_v = etl::is_pod::value;
#endif
- //***************************************************************************
- /// is_trivially_constructible
- /// Only POD types are recognised.
- template struct is_trivially_constructible : etl::is_pod {};
-
-#if ETL_CPP17_SUPPORTED
- template
- inline constexpr bool is_trivially_constructible_v = etl::is_trivially_constructible::value;
-#endif
-
- //***************************************************************************
- /// is_trivially_copy_constructible
- /// Only POD types are recognised.
- template struct is_trivially_copy_constructible : etl::is_pod {};
-
-#if ETL_CPP17_SUPPORTED
- template
- inline constexpr bool is_trivially_copy_constructible_v = etl::is_trivially_copy_constructible::value;
-#endif
-
- //***************************************************************************
- /// is_trivially_destructible
- /// Only POD types are recognised.
- template struct is_trivially_destructible : etl::is_pod {};
-
-#if ETL_CPP17_SUPPORTED
- template
- inline constexpr bool is_trivially_destructible_v = etl::is_trivially_destructible::value;
-#endif
-
- //***************************************************************************
- /// is_trivially_copy_assignable
- /// Only POD types are recognised.
- template struct is_trivially_copy_assignable : etl::is_pod {};
-
-#if ETL_CPP17_SUPPORTED
- template
- inline constexpr bool is_trivially_copy_assignable_v = etl::is_trivially_copy_assignable::value;
-#endif
-
- //***************************************************************************
- /// is_trivially_copyable
- /// Only POD types are recognised.
- template struct is_trivially_copyable : etl::is_pod {};
-
-#if ETL_CPP17_SUPPORTED
- template
- inline constexpr bool is_trivially_copyable_v = etl::is_trivially_copyable::value;
-#endif
-
//***************************************************************************
/// conditional
template struct conditional { typedef T type; };
template struct conditional { typedef F type; };
+#if ETL_CPP11_SUPPORTED
+ template
+ using conditional_t = typename conditional::type;
+#endif
+
//***************************************************************************
/// make_signed
template struct make_signed { typedef T type; };
@@ -645,7 +603,7 @@ namespace etl
/// is_base_of
template::value || etl::is_fundamental::value)>
+ const bool IsFundamental = (etl::is_fundamental::value || etl::is_fundamental::value || etl::is_array::value)>
struct is_base_of
{
private:
@@ -653,8 +611,10 @@ namespace etl
template struct dummy {};
struct internal: TDerived, dummy{};
- static TBase* check(TBase*);
- template static char check(dummy*);
+ static TBase* check(TBase*) { return (TBase*)0; }
+
+ template
+ static char check(dummy*) { return 0; }
public:
@@ -781,6 +741,7 @@ namespace etl
/// Specialisation of 'alignment_of' for 'void'.
///\ingroup type_traits
template <> struct alignment_of : integral_constant {};
+ template <> struct alignment_of : integral_constant {};
#if ETL_CPP17_SUPPORTED
template
@@ -1094,134 +1055,17 @@ namespace etl
#endif
#endif
-#if !defined(ARDUINO) && ETL_NOT_USING_STLPORT && defined(ETL_GCC_V5_TYPE_TRAITS_SUPPORTED)
- //***************************************************************************
- /// is_trivially_constructible
- ///\ingroup type_traits
- template struct is_trivially_constructible : std::is_trivially_constructible {};
-
-#if ETL_CPP17_SUPPORTED
- template
- inline constexpr bool is_trivially_constructible_v = std::is_trivially_constructible_v;
-#endif
-
- //***************************************************************************
- /// is_trivially_copy_constructible
- ///\ingroup type_traits
- template struct is_trivially_copy_constructible : std::is_trivially_copy_constructible {};
-
-#if ETL_CPP17_SUPPORTED
- template
- inline constexpr bool is_trivially_copy_constructible_v = std::is_trivially_copy_constructible_v;
-#endif
-
- //***************************************************************************
- /// is_trivially_destructible
- ///\ingroup type_traits
- template struct is_trivially_destructible : std::is_trivially_destructible {};
-
-#if ETL_CPP17_SUPPORTED
- template
- inline constexpr bool is_trivially_destructible_v = std::is_trivially_destructible_v;
-#endif
-
- //***************************************************************************
- /// is_trivially_copy_assignable
- ///\ingroup type_traits
- template struct is_trivially_copy_assignable : std::is_trivially_copy_assignable {};
-
-#if ETL_CPP17_SUPPORTED
- template
- inline constexpr bool is_trivially_copy_assignable_v = std::is_trivially_copy_assignable_v;
-#endif
-
- //***************************************************************************
- /// is_trivially_copyable
- ///\ingroup type_traits
- template struct is_trivially_copyable : std::is_trivially_copyable {};
-
-#if ETL_CPP17_SUPPORTED
- template
- inline constexpr bool is_trivially_copyable_v = std::is_trivially_copyable_v;
-#endif
-#else
- //***************************************************************************
- /// is_trivially_constructible
- ///\ingroup type_traits
-#if ETL_CPP11_SUPPORTED && ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
- template struct is_trivially_constructible : std::is_trivially_constructible {};
-#else
- template struct is_trivially_constructible : std::is_pod {};
-#endif
-
- #if ETL_CPP17_SUPPORTED
- template
- inline constexpr bool is_trivially_constructible_v = etl::is_trivially_constructible::value;
- #endif
-
- //***************************************************************************
- /// is_trivially_copy_constructible
- ///\ingroup type_traits
-#if ETL_CPP11_SUPPORTED && ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
- template struct is_trivially_copy_constructible : std::is_trivially_copy_constructible {};
-#else
- template struct is_trivially_copy_constructible : std::is_pod {};
-#endif
-
- #if ETL_CPP17_SUPPORTED
- template
- inline constexpr bool is_trivially_copy_constructible_v = etl::is_trivially_copy_constructible::value;
- #endif
-
- //***************************************************************************
- /// is_trivially_destructible
- ///\ingroup type_traits
-#if ETL_CPP11_SUPPORTED && ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
- template struct is_trivially_destructible : std::is_trivially_destructible {};
-#else
- template struct is_trivially_destructible : std::is_pod {};
-#endif
-
- #if ETL_CPP17_SUPPORTED
- template
- inline constexpr bool is_trivially_destructible_v = etl::is_trivially_destructible::value;
- #endif
-
- //***************************************************************************
- /// is_trivially_copy_assignable
- ///\ingroup type_traits
-#if ETL_CPP11_SUPPORTED && ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
- template struct is_trivially_copy_assignable : std::is_trivially_copy_assignable {};
-#else
- template struct is_trivially_copy_assignable : std::is_pod {};
-#endif
-
- #if ETL_CPP17_SUPPORTED
- template
- inline constexpr bool is_trivially_copy_assignable_v = etl::is_trivially_copy_assignable::value;
- #endif
-
- //***************************************************************************
- /// is_trivially_copyable
- ///\ingroup type_traits
-#if ETL_CPP11_SUPPORTED && ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
- template struct is_trivially_copyable : std::is_trivially_copyable {};
-#else
- template struct is_trivially_copyable : std::is_pod {};
-#endif
-
- #if ETL_CPP17_SUPPORTED
- template
- inline constexpr bool is_trivially_copyable_v = etl::is_trivially_copyable::value;
- #endif
-#endif
-
//***************************************************************************
/// conditional
///\ingroup type_traits
template struct conditional { typedef T type; };
template struct conditional { typedef F type; };
+#if ETL_CPP11_SUPPORTED
+ template
+ using conditional_t = typename conditional::type;
+#endif
+
//***************************************************************************
/// make_signed
///\ingroup type_traits
@@ -1617,6 +1461,506 @@ namespace etl
#if ETL_CPP17_SUPPORTED
template
inline constexpr bool are_all_same_v = are_all_same::value;
+#endif
+
+ //***************************************************************************
+ /// conjunction
+#if ETL_CPP11_SUPPORTED
+ template
+ struct conjunction : public etl::true_type
+ {
+ };
+
+ template
+ struct conjunction : public etl::conditional_t, T1>
+ {
+ };
+
+ template
+ struct conjunction : public T
+ {
+ };
+#endif
+
+#if ETL_CPP17_SUPPORTED
+ template
+ inline constexpr bool conjunction_v = conjunction::value;
+#endif
+
+ //***************************************************************************
+ /// disjunction
+#if ETL_CPP11_SUPPORTED
+ template
+ struct disjunction : public etl::false_type
+ {
+ };
+
+ template
+ struct disjunction : public etl::conditional_t>
+ {
+ };
+
+ template struct disjunction : public T1
+ {
+ };
+#endif
+
+#if ETL_CPP17_SUPPORTED
+ template
+ inline constexpr bool disjunction_v = etl::disjunction::value;
+#endif
+
+ //***************************************************************************
+#if ETL_CPP11_SUPPORTED && ETL_USING_STL && !defined(ETL_USE_TYPE_TRAITS_BUILTINS) && !defined(ETL_USER_DEFINED_TYPE_TRAITS) && ((!defined(ARDUINO) && ETL_NOT_USING_STLPORT) || defined(ETL_GCC_V5_TYPE_TRAITS_SUPPORTED))
+
+ //*********************************************
+ // Use the STL's definitions.
+ //*********************************************
+
+ //*********************************************
+ // is_assignable
+ template
+ struct is_assignable : public std::is_assignable
+ {
+ };
+
+ //*********************************************
+ // is_constructible
+ template
+ struct is_constructible : public std::is_constructible
+ {
+ };
+
+ //*********************************************
+ // is_copy_constructible
+ template
+ struct is_copy_constructible : public std::is_copy_constructible
+ {
+ };
+
+ //*********************************************
+ // is_move_constructible
+ template
+ struct is_move_constructible : public std::is_move_constructible
+ {
+ };
+
+ //*********************************************
+ // is_trivially_constructible
+#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
+ template
+ struct is_trivially_constructible : public std::is_trivially_constructible
+ {
+ };
+#else
+ template ::value || etl::is_pointer::value>
+ struct is_trivially_constructible;
+
+ template
+ struct is_trivially_constructible : public etl::true_type
+ {
+ };
+
+ template
+ struct is_trivially_constructible;
+#endif
+
+ //***************************************************************************
+ // is_trivially_copy_constructible
+#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
+ template
+ struct is_trivially_copy_constructible : public std::is_trivially_copy_constructible
+ {
+ };
+#else
+ template ::value || etl::is_pointer::value>
+ struct is_trivially_copy_constructible;
+
+ template
+ struct is_trivially_copy_constructible : public etl::true_type
+ {
+ };
+
+ template
+ struct is_trivially_copy_constructible;
+#endif
+
+ //***************************************************************************
+ // is_trivially_destructible
+#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
+ template
+ struct is_trivially_destructible : public std::is_trivially_destructible
+ {
+ };
+#else
+ template ::value || etl::is_pointer::value>
+ struct is_trivially_destructible;
+
+ template
+ struct is_trivially_destructible : public etl::true_type
+ {
+ };
+
+ template
+ struct is_trivially_destructible;
+#endif
+
+ //***************************************************************************
+ // is_trivially_copy_assignable
+#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
+ template
+ struct is_trivially_copy_assignable : public std::is_trivially_copy_assignable
+ {
+ };
+#else
+ template ::value || etl::is_pointer::value>
+ struct is_trivially_copy_assignable;
+
+ template
+ struct is_trivially_copy_assignable : public etl::true_type
+ {
+ };
+
+ template
+ struct is_trivially_copy_assignable;
+#endif
+
+ //***************************************************************************
+ // is_trivially_copyable
+#if ETL_CPP11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
+ template
+ struct is_trivially_copyable : public std::is_trivially_copyable
+ {
+ };
+#else
+ template ::value || etl::is_pointer::value>
+ struct is_trivially_copyable;
+
+ template
+ struct is_trivially_copyable : public etl::true_type
+ {
+ };
+
+ template
+ struct is_trivially_copyable;
+#endif
+
+#elif defined(ETL_USE_TYPE_TRAITS_BUILTINS)
+
+ //*********************************************
+ // Use the compiler's builtins.
+ //*********************************************
+
+ //*********************************************
+ // is_assignable
+ template
+ struct is_assignable : public etl::bool_constant<__is_assignable(T1, T2)>
+ {
+ };
+
+#if ETL_CPP11_SUPPORTED
+ //*********************************************
+ // is_constructible
+ template
+ struct is_constructible : public etl::bool_constant<__is_constructible(T, TArgs...)>
+ {
+ };
+#endif
+
+ //*********************************************
+ // is_copy_constructible
+ template
+ struct is_copy_constructible : public etl::is_constructible>
+ {
+ };
+
+ //*********************************************
+ // is_move_constructible
+ template
+ struct is_move_constructible : public etl::is_constructible
+ {
+ };
+
+ //*********************************************
+ // is_trivially_constructible
+ template
+ struct is_trivially_constructible : public etl::bool_constant<__is_trivially_constructible(T)>
+ {
+ };
+
+ //***************************************************************************
+ // is_trivially_copy_constructible
+ template
+ struct is_trivially_copy_constructible : public etl::bool_constant<__is_trivially_copyable(T)>
+ {
+ };
+
+ //***************************************************************************
+ // is_trivially_destructible
+ template
+ struct is_trivially_destructible : public etl::bool_constant<__is_trivially_destructible(T)>
+ {
+ };
+
+ //***************************************************************************
+ // is_trivially_copy_assignable
+ template
+ struct is_trivially_copy_assignable : public etl::bool_constant<__is_trivially_copyable(T)>
+ {
+ };
+
+ //***************************************************************************
+ // is_trivially_copyable
+ template
+ struct is_trivially_copyable : public etl::bool_constant<__is_trivially_copyable(T)>
+ {
+ };
+
+#elif defined(ETL_USER_DEFINED_TYPE_TRAITS)
+
+ //*********************************************
+ // Force the user to provide specialisations for
+ // anything other than arithmetics and pointers.
+ //*********************************************
+
+ //*********************************************
+ // is_assignable
+ template ::value || etl::is_pointer::value) && (etl::is_arithmetic::value || etl::is_pointer::value)>
+ struct is_assignable;
+
+ template
+ struct is_assignable : public etl::true_type
+ {
+ };
+
+ template
+ struct is_assignable;
+
+#if ETL_CPP11_SUPPORTED
+ //*********************************************
+ // is_constructible
+ template
+ struct is_constructible_helper;
+
+ template
+ struct is_constructible_helper : public etl::true_type
+ {
+ };
+
+ template
+ struct is_constructible_helper;
+
+ template
+ struct is_constructible : public is_constructible_helper::value || etl::is_pointer::value, TArgs...>
+ {
+ };
+#endif
+
+ //*********************************************
+ // is_copy_constructible
+ template