diff --git a/include/etl/mutex/mutex_std.h b/include/etl/mutex/mutex_std.h index ee467f19..30908f8c 100644 --- a/include/etl/mutex/mutex_std.h +++ b/include/etl/mutex/mutex_std.h @@ -37,7 +37,7 @@ namespace etl { //*************************************************************************** ///\ingroup mutex - ///\brief This mutex class is implemented using ETLSTD::mutex. + ///\brief This mutex class is implemented using std::mutex. //*************************************************************************** class mutex { diff --git a/include/etl/type_traits.h b/include/etl/type_traits.h index b4450d3f..404fe3fa 100644 --- a/include/etl/type_traits.h +++ b/include/etl/type_traits.h @@ -739,7 +739,7 @@ namespace etl inline constexpr size_t alignment_of_v = etl::alignment_of::value; #endif -#else // defined(ETL_NO_STL) || !ETL_CPP11_SUPPORTED +#else // Condition = !defined(ETL_NO_STL) && ETL_CPP11_SUPPORTED //***************************************************************************** // Traits are derived from the STL @@ -1006,11 +1006,11 @@ namespace etl ///\ingroup type_traits #if ETL_CPP11_SUPPORTED template struct is_rvalue_reference : std::is_rvalue_reference {}; -#endif #if ETL_CPP17_SUPPORTED template inline constexpr bool is_rvalue_reference_v = std::is_rvalue_reference_v; +#endif #endif //*************************************************************************** @@ -1273,7 +1273,7 @@ namespace etl inline constexpr size_t alignment_of_v = std::alignment_of_v; #endif -#endif // defined(ETL_NO_STL) || !ETL_CPP11_SUPPORTED +#endif // Condition = !defined(ETL_NO_STL) && ETL_CPP11_SUPPORTED //*************************************************************************** // ETL extended type traits. @@ -1308,7 +1308,7 @@ namespace etl struct is_one_of { static const bool value = etl::is_same::value || - etl::is_one_of::value; + etl::is_one_of::value; }; template @@ -1321,10 +1321,11 @@ namespace etl /// Template to determine if a type is one of a specified list. ///\ingroup types template + typename T1, typename T2 = void, typename T3 = void, typename T4 = void, + typename T5 = void, typename T6 = void, typename T7 = void, typename T8 = void, + typename T9 = void, typename T10 = void, typename T11 = void, typename T12 = void, + typename T13 = void, typename T14 = void, typename T15 = void, typename T16 = void, + typename T17 = void> struct is_one_of { static const bool value = diff --git a/include/etl/type_traits_generator.h b/include/etl/type_traits_generator.h index f2ea2da3..cb90ba6c 100644 --- a/include/etl/type_traits_generator.h +++ b/include/etl/type_traits_generator.h @@ -413,6 +413,7 @@ namespace etl inline constexpr bool is_lvalue_reference_v = etl::is_lvalue_reference::value; #endif +#if ETL_CPP11_SUPPORTED //*************************************************************************** /// is_rvalue_reference template struct is_rvalue_reference_helper : false_type {}; @@ -422,6 +423,7 @@ namespace etl #if ETL_CPP17_SUPPORTED template inline constexpr bool is_rvalue_reference_v = etl::is_rvalue_reference::value; +#endif #endif //*************************************************************************** @@ -749,7 +751,7 @@ namespace etl inline constexpr size_t alignment_of_v = etl::alignment_of::value; #endif -#else // defined(ETL_NO_STL) || !ETL_CPP11_SUPPORTED +#else // Condition = !defined(ETL_NO_STL) && ETL_CPP11_SUPPORTED //***************************************************************************** // Traits are derived from the STL @@ -1016,11 +1018,11 @@ namespace etl ///\ingroup type_traits #if ETL_CPP11_SUPPORTED template struct is_rvalue_reference : std::is_rvalue_reference {}; -#endif #if ETL_CPP17_SUPPORTED template inline constexpr bool is_rvalue_reference_v = std::is_rvalue_reference_v; +#endif #endif //*************************************************************************** @@ -1283,7 +1285,7 @@ namespace etl inline constexpr size_t alignment_of_v = std::alignment_of_v; #endif -#endif // defined(ETL_NO_STL) || !ETL_CPP11_SUPPORTED +#endif // Condition = !defined(ETL_NO_STL) && ETL_CPP11_SUPPORTED //*************************************************************************** // ETL extended type traits. @@ -1318,7 +1320,7 @@ namespace etl struct is_one_of { static const bool value = etl::is_same::value || - etl::is_one_of::value; + etl::is_one_of::value; }; template @@ -1345,8 +1347,8 @@ namespace etl cog.outl("{") cog.outl(" static const bool value = ") for n in range(1, int(IsOneOf)): - cog.outl(" etlstd::is_same::value ||" % n) - cog.outl(" etlstd::is_same::value;" % IsOneOf) + cog.outl(" etl::is_same::value ||" % n) + cog.outl(" etl::is_same::value;" % IsOneOf) cog.outl("};") ]]]*/ /*[[[end]]]*/ @@ -1377,6 +1379,10 @@ namespace etl typedef type_t* pointer; typedef const type_t* const_pointer; typedef const type_t* const const_pointer_const; + +#if ETL_CPP11_SUPPORTED + typedef type_t&& rvalue_reference; +#endif }; // Pointers. @@ -1395,6 +1401,10 @@ namespace etl typedef type_t* pointer; typedef const type_t* const_pointer; typedef const type_t* const const_pointer_const; + +#if ETL_CPP11_SUPPORTED + typedef type_t&& rvalue_reference; +#endif }; // Pointers. @@ -1413,6 +1423,10 @@ namespace etl typedef type_t* pointer; typedef const type_t* const_pointer; typedef const type_t* const const_pointer_const; + +#if ETL_CPP11_SUPPORTED + typedef type_t&& rvalue_reference; +#endif }; // References. @@ -1431,6 +1445,10 @@ namespace etl typedef type_t* pointer; typedef const type_t* const_pointer; typedef const type_t* const const_pointer_const; + +#if ETL_CPP11_SUPPORTED + typedef type_t&& rvalue_reference; +#endif }; #if ETL_CPP11_SUPPORTED @@ -1450,6 +1468,10 @@ namespace etl typedef type_t* pointer; typedef const type_t* const_pointer; typedef const type_t* const const_pointer_const; + +#if ETL_CPP11_SUPPORTED + typedef type_t&& rvalue_reference; +#endif }; #endif diff --git a/include/etl/version.h b/include/etl/version.h index 087d4943..271162b7 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -39,7 +39,7 @@ SOFTWARE. #define ETL_VERSION_MAJOR 16 #define ETL_VERSION_MINOR 5 -#define ETL_VERSION_PATCH 2 +#define ETL_VERSION_PATCH 3 #define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) "." ETL_STRINGIFY(ETL_VERSION_MINOR) "." ETL_STRINGIFY(ETL_VERSION_PATCH) #define ETL_VERSION_W ETL_STRINGIFY(ETL_VERSION_MAJOR) L"." ETL_STRINGIFY(ETL_VERSION_MINOR) L"." ETL_STRINGIFY(ETL_VERSION_PATCH) #define ETL_VERSION_U16 ETL_STRINGIFY(ETL_VERSION_MAJOR) u"." ETL_STRINGIFY(ETL_VERSION_MINOR) u"." ETL_STRINGIFY(ETL_VERSION_PATCH) diff --git a/library.json b/library.json index c7dfab77..cb497a50 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "Embedded Template Library", - "version": "16.5.2", + "version": "16.5.3", "authors": { "name": "John Wellbelove", "email": "john.wellbelove@etlcpp.com" diff --git a/library.properties b/library.properties index 3f96b5a8..bc1d9f2c 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Embedded Template Library -version=16.5.2 +version=16.5.3 author= John Wellbelove maintainer=John Wellbelove license=MIT diff --git a/support/Release notes.txt b/support/Release notes.txt index 5c3e4d89..69e794a1 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -1,3 +1,7 @@ +=============================================================================== +16.5.3 +type_traits.h is_one_of fix for C++03 + =============================================================================== 16.5.2 Modified nullptr.h for better cross compiler compatibility