From 47d3d67a147404f268fd32e5c6cb5829d30aab31 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Thu, 18 Jan 2024 09:54:07 +0000 Subject: [PATCH] Modified definition of bitset::Storage_Type for compatibility with C++03 --- include/etl/private/bitset_new.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/etl/private/bitset_new.h b/include/etl/private/bitset_new.h index 8c341eba..6c6d2443 100644 --- a/include/etl/private/bitset_new.h +++ b/include/etl/private/bitset_new.h @@ -1820,7 +1820,11 @@ namespace etl static ETL_CONSTANT size_t Size = Active_Bits; static ETL_CONSTANT size_t Allocated_Bits = Number_Of_Elements * Bits_Per_Element; - static ETL_CONSTANT etl::bitset_storage_model Storage_Model = (Number_Of_Elements == 1U) ? etl::bitset_storage_model::Single : etl::bitset_storage_model::Multi; +#if ETL_USING_CPP11 + static ETL_CONSTANT etl::bitset_storage_model Storage_Model = (bitset_common::Number_Of_Elements == 1U) ? etl::bitset_storage_model::Single : etl::bitset_storage_model::Multi; +#else + static ETL_CONSTANT etl::bitset_storage_model Storage_Model; +#endif typedef etl::span span_type; typedef etl::span const_span_type; @@ -1841,8 +1845,13 @@ namespace etl template ETL_CONSTANT size_t bitset_common::Size; +#if ETL_USING_CPP11 template ETL_CONSTANT etl::bitset_storage_model bitset_common::Storage_Model; +#else + template + ETL_CONSTANT etl::bitset_storage_model bitset_common::Storage_Model = (bitset_common::Number_Of_Elements == 1U) ? etl::bitset_storage_model::Single : etl::bitset_storage_model::Multi; +#endif template ETL_CONSTANT size_t bitset_common::Top_Mask_Shift;