From fd50e7e3856cd0c5ace3b4b3c4e18d96363e321d Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sat, 23 Feb 2019 08:30:46 +0100 Subject: [PATCH] Move C++03 force macros to profile --- include/etl/priority_queue.h | 2 -- include/etl/queue_mpmc_mutex.h | 2 -- include/etl/queue_spsc_atomic.h | 2 -- include/etl/variant.h | 2 -- include/etl/version.h | 2 +- support/Release notes.txt | 4 ++++ test/etl_profile.h | 6 +++++ test/test_function.cpp | 42 ++++++++++++++++----------------- 8 files changed, 32 insertions(+), 30 deletions(-) diff --git a/include/etl/priority_queue.h b/include/etl/priority_queue.h index 69d383b4..17c0118c 100644 --- a/include/etl/priority_queue.h +++ b/include/etl/priority_queue.h @@ -48,8 +48,6 @@ SOFTWARE. #undef ETL_FILE #define ETL_FILE "12" -#define ETL_PRIORITY_QUEUE_FORCE_CPP03 0 - //***************************************************************************** ///\defgroup queue queue /// A priority queue with the capacity defined at compile time, diff --git a/include/etl/queue_mpmc_mutex.h b/include/etl/queue_mpmc_mutex.h index 2c6c8a8b..75862fad 100644 --- a/include/etl/queue_mpmc_mutex.h +++ b/include/etl/queue_mpmc_mutex.h @@ -44,8 +44,6 @@ SOFTWARE. #undef ETL_FILE #define ETL_FILE "48" -#define ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03 0 - namespace etl { template diff --git a/include/etl/queue_spsc_atomic.h b/include/etl/queue_spsc_atomic.h index acbf8304..d2e5e861 100644 --- a/include/etl/queue_spsc_atomic.h +++ b/include/etl/queue_spsc_atomic.h @@ -44,8 +44,6 @@ SOFTWARE. #undef ETL_FILE #define ETL_FILE "47" -#define ETL_QUEUE_ATOMIC_FORCE_CPP03 0 - namespace etl { template diff --git a/include/etl/variant.h b/include/etl/variant.h index 82f19ba8..ce57f085 100644 --- a/include/etl/variant.h +++ b/include/etl/variant.h @@ -51,8 +51,6 @@ SOFTWARE. #undef ETL_FILE #define ETL_FILE "24" -#define ETL_VARIANT_FORCE_CPP03 0 - //***************************************************************************** ///\defgroup variant variant /// A class that can contain one a several specified types in a type safe manner. diff --git a/include/etl/version.h b/include/etl/version.h index 9cb4c071..16e785a7 100644 --- a/include/etl/version.h +++ b/include/etl/version.h @@ -39,7 +39,7 @@ SOFTWARE. #define ETL_VERSION_MAJOR 14 #define ETL_VERSION_MINOR 11 -#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_WIDE_STRING(ETL_CONCAT(ETL_CONCAT(ETL_VERSION_MAJOR, ETL_VERSION_MINOR), ETL_VERSION_PATCH)) diff --git a/support/Release notes.txt b/support/Release notes.txt index c9d15c8a..beac40ef 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -1,3 +1,7 @@ +=============================================================================== +14.11.3 +Moved C++03 force macros to test profile. + =============================================================================== 14.11.2 Fix inconsistent ETL_FILE definitions. diff --git a/test/etl_profile.h b/test/etl_profile.h index e5cc186b..a53e5cee 100644 --- a/test/etl_profile.h +++ b/test/etl_profile.h @@ -76,6 +76,12 @@ SOFTWARE. //#define ETL_NO_STL +#define ETL_FUNCTION_FORCE_CPP03 0 +#define ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03 0 +#define ETL_PRIORITY_QUEUE_FORCE_CPP03 0 +#define ETL_QUEUE_ATOMIC_FORCE_CPP03 0 +#define ETL_VARIANT_FORCE_CPP03 0 + #ifdef _MSC_VER #include "etl/profiles/msvc_x86.h" #else diff --git a/test/test_function.cpp b/test/test_function.cpp index f60cde88..35b7bf21 100644 --- a/test/test_function.cpp +++ b/test/test_function.cpp @@ -32,7 +32,7 @@ SOFTWARE. //***************************************************************************** const int VALUE = 1; -bool function_called = false; +bool function_called = false; bool parameter_correct = false; //***************************************************************************** @@ -108,7 +108,7 @@ void free_void() //***************************************************************************** void free_int(int i) { - function_called = true; + function_called = true; parameter_correct = (i == VALUE); } @@ -117,7 +117,7 @@ void free_int(int i) //***************************************************************************** void free_reference(const Data& data) { - function_called = true; + function_called = true; parameter_correct = (data.d == VALUE); } @@ -155,13 +155,13 @@ struct SetupFixture { SetupFixture() { - function_called = false; + function_called = false; parameter_correct = false; } }; namespace -{ +{ SUITE(test_function) { //************************************************************************* @@ -173,8 +173,8 @@ namespace CHECK(function_called); } - - //************************************************************************* + + //************************************************************************* TEST_FIXTURE(SetupFixture, test_const_free_void) { const etl::function function(free_void); @@ -194,7 +194,7 @@ namespace CHECK(function_called); CHECK(parameter_correct); } - + //************************************************************************* TEST_FIXTURE(SetupFixture, test_const_free_int) { @@ -216,7 +216,7 @@ namespace CHECK(function_called); CHECK(parameter_correct); } - + //************************************************************************* TEST_FIXTURE(SetupFixture, test_const_free_reference) { @@ -237,7 +237,7 @@ namespace CHECK(function_called); } - + //************************************************************************* TEST_FIXTURE(SetupFixture, test_const_free_void_compile_time) { @@ -258,7 +258,7 @@ namespace CHECK(function_called); CHECK(parameter_correct); } - + //************************************************************************* TEST_FIXTURE(SetupFixture, test_const_free_int_compile_time) { @@ -280,7 +280,7 @@ namespace CHECK(function_called); CHECK(parameter_correct); } - + //************************************************************************* TEST_FIXTURE(SetupFixture, test_const_free_reference_compile_time) { @@ -302,7 +302,7 @@ namespace CHECK(function_called); } - + //************************************************************************* TEST_FIXTURE(SetupFixture, test_const_member_void) { @@ -325,7 +325,7 @@ namespace CHECK(function_called); CHECK(parameter_correct); } - + //************************************************************************* TEST_FIXTURE(SetupFixture, test_const_member_int) { @@ -349,7 +349,7 @@ namespace CHECK(function_called); CHECK(parameter_correct); } - + //************************************************************************* TEST_FIXTURE(SetupFixture, test_const_member_reference) { @@ -372,7 +372,7 @@ namespace CHECK(function_called); } - + //************************************************************************* TEST_FIXTURE(SetupFixture, test_const_member_void_compile_time) { @@ -395,7 +395,7 @@ namespace CHECK(function_called); CHECK(parameter_correct); } - + //************************************************************************* TEST_FIXTURE(SetupFixture, test_const_member_int_compile_time) { @@ -419,7 +419,7 @@ namespace CHECK(function_called); CHECK(parameter_correct); } - + //************************************************************************* TEST_FIXTURE(SetupFixture, test_const_member_reference_compile_time) { @@ -443,7 +443,7 @@ namespace CHECK(function_called); } - + //************************************************************************* TEST_FIXTURE(SetupFixture, test_const_instance_member_void_compile_time) { @@ -467,7 +467,7 @@ namespace CHECK(function_called); } - + //************************************************************************* TEST_FIXTURE(SetupFixture, test_const_instance_member_parameter_compile_time) { @@ -491,7 +491,7 @@ namespace CHECK(function_called); } - + //************************************************************************* TEST_FIXTURE(SetupFixture, test_const_instance_member_reference_compile_time) {