diff --git a/.gitignore b/.gitignore index 4bb62e0c..1c467992 100644 --- a/.gitignore +++ b/.gitignore @@ -256,3 +256,4 @@ build-test-Desktop_x86_windows_msvc2017_pe_32bit-Debug test/Logs build-test-Desktop_x86_windows_msvc2019_pe_32bit-Debug test/vs2019/.vs +Corel Auto-Preserve diff --git a/README.md b/README.md index c18db1b0..bfa2ac0f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Embedded Template Library (ETL) ------------------------- [![Build status](https://ci.appveyor.com/api/projects/status/b7jgecv7unqjw4u0/branch/master?svg=true)](https://ci.appveyor.com/project/jwellbelove/etl/branch/master) -[![ETLCPP](https://circleci.com/gh/ETLCPP/etl.svg?style=svg)](https://app.circleci.com/pipelines/github/ETLCPP/etl) +[![ETLCPP](https://circleci.com/gh/ETLCPP/etl.svg?style=shield)](https://app.circleci.com/pipelines/github/ETLCPP/etl) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/3c14cd918ccf40008d0bcd7b083d5946)](https://www.codacy.com/manual/jwellbelove/etl?utm_source=github.com&utm_medium=referral&utm_content=ETLCPP/etl&utm_campaign=Badge_Grade) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/jwellbelove/etl) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) diff --git a/etl-patreon.png b/etl-patreon.png new file mode 100644 index 00000000..5f2a68c3 Binary files /dev/null and b/etl-patreon.png differ diff --git a/etl-social.png b/etl-social.png new file mode 100644 index 00000000..a9082edb Binary files /dev/null and b/etl-social.png differ diff --git a/include/etl/generators/type_traits_generator.h b/include/etl/generators/type_traits_generator.h index 81196e02..77aec58a 100644 --- a/include/etl/generators/type_traits_generator.h +++ b/include/etl/generators/type_traits_generator.h @@ -114,6 +114,9 @@ namespace etl #if ETL_CPP11_SUPPORTED template using bool_constant = integral_constant; +#else + template + struct bool_constant : etl::integral_constant { }; #endif //*************************************************************************** @@ -799,6 +802,9 @@ namespace etl #if ETL_CPP17_SUPPORTED template using bool_constant = std::bool_constant; +#else + template + struct bool_constant : std::integral_constant { }; #endif //*************************************************************************** diff --git a/include/etl/type_traits.h b/include/etl/type_traits.h index b4475a5a..753f8122 100644 --- a/include/etl/type_traits.h +++ b/include/etl/type_traits.h @@ -102,6 +102,9 @@ namespace etl #if ETL_CPP11_SUPPORTED template using bool_constant = integral_constant; +#else + template + struct bool_constant : etl::integral_constant { }; #endif //*************************************************************************** @@ -787,6 +790,9 @@ namespace etl #if ETL_CPP17_SUPPORTED template using bool_constant = std::bool_constant; +#else + template + struct bool_constant : std::integral_constant { }; #endif //*************************************************************************** diff --git a/include/etl/version.h b/include/etl/version.h index 129be118..8ac0d3ae 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -39,7 +39,7 @@ SOFTWARE. #define ETL_VERSION_MAJOR 18 #define ETL_VERSION_MINOR 3 -#define ETL_VERSION_PATCH 0 +#define ETL_VERSION_PATCH 1 #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 3cc77423..c4b2d56f 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "Embedded Template Library", - "version": "18.3.0", + "version": "18.3.1", "authors": { "name": "John Wellbelove", "email": "john.wellbelove@etlcpp.com" diff --git a/library.properties b/library.properties index 50f72707..2b0093c5 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Embedded Template Library -version=18.3.0 +version=18.3.1 author= John Wellbelove maintainer=John Wellbelove license=MIT diff --git a/support/Release notes.txt b/support/Release notes.txt index 8c07ddce..11160bb0 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -1,3 +1,7 @@ +=============================================================================== +18.3.1 +C++03 compatibility fix for type_traits.h + =============================================================================== 18.3.0 Added etl::parameter_pack to easily extract information about the types in a diff --git a/test/test_type_traits.cpp b/test/test_type_traits.cpp index 28127d17..db25c33c 100644 --- a/test/test_type_traits.cpp +++ b/test/test_type_traits.cpp @@ -737,7 +737,7 @@ namespace }; //************************************************************************* - TEST(conditional_integral_constant) + TEST(test_conditional_integral_constant) { int v1 = etl::conditional_integral_constant::value; int v2 = etl::conditional_integral_constant::value; @@ -747,7 +747,7 @@ namespace } //************************************************************************* - TEST(size_of) + TEST(test_size_of) { CHECK_EQUAL(1, etl::size_of::value); CHECK_EQUAL(1, etl::size_of::value); @@ -763,7 +763,7 @@ namespace } //************************************************************************* - TEST(is_convertible) + TEST(test_is_convertible) { CHECK((etl::is_convertible::value)); CHECK((etl::is_convertible::value)); @@ -779,7 +779,7 @@ namespace } //************************************************************************* - TEST(add_lvalue_reference) + TEST(test_add_lvalue_reference) { CHECK(!std::is_lvalue_reference_v::type>); CHECK(std::is_lvalue_reference_v::type>); @@ -789,7 +789,7 @@ namespace } //************************************************************************* - TEST(add_rvalue_reference) + TEST(test_add_rvalue_reference) { CHECK(!std::is_rvalue_reference_v::type>); CHECK(std::is_rvalue_reference_v::type>); @@ -799,7 +799,7 @@ namespace } //************************************************************************* - TEST(is_lvalue_reference) + TEST(test_is_lvalue_reference) { CHECK_EQUAL(std::is_lvalue_reference_v, etl::is_lvalue_reference_v); CHECK_EQUAL(std::is_lvalue_reference_v, etl::is_lvalue_reference_v); @@ -809,7 +809,7 @@ namespace } //************************************************************************* - TEST(is_rvalue_reference) + TEST(test_is_rvalue_reference) { CHECK_EQUAL(std::is_rvalue_reference_v, etl::is_rvalue_reference_v); CHECK_EQUAL(std::is_rvalue_reference_v, etl::is_rvalue_reference_v); @@ -817,4 +817,19 @@ namespace CHECK_EQUAL(std::is_rvalue_reference_v, etl::is_rvalue_reference_v); CHECK_EQUAL(std::is_rvalue_reference_v, etl::is_rvalue_reference_v); } + + //************************************************************************* + TEST(test_integral_constants) + { + CHECK_EQUAL(1, (etl::integral_constant::value)); + CHECK((std::is_same_v::value_type>)); + + CHECK_EQUAL(false, (etl::bool_constant::value)); + CHECK_EQUAL(true, (etl::bool_constant::value)); + CHECK((std::is_same_v::value_type>)); + + CHECK_EQUAL(true, etl::negation_v>); + CHECK_EQUAL(false, etl::negation_v>); + CHECK((std::is_same_v::value_type>)); + } }