diff --git a/include/etl/basic_string.h b/include/etl/basic_string.h index e2f76213..18df56ef 100644 --- a/include/etl/basic_string.h +++ b/include/etl/basic_string.h @@ -58,7 +58,7 @@ SOFTWARE. #include #endif -#if ETL_USING_STL +#if ETL_USING_STD_OSTREAM #include #endif diff --git a/include/etl/platform.h b/include/etl/platform.h index f493bec7..012a379b 100644 --- a/include/etl/platform.h +++ b/include/etl/platform.h @@ -457,6 +457,14 @@ SOFTWARE. //************************************* // Determine if the ETL can use libc's wchar.h +#if !defined(ETL_NO_LIBC_WCHAR_H) + #if defined(__has_include) + #if !__has_include() + #define ETL_NO_LIBC_WCHAR_H + #endif + #endif +#endif + #if defined(ETL_NO_LIBC_WCHAR_H) #define ETL_USING_LIBC_WCHAR_H 0 #define ETL_NOT_USING_LIBC_WCHAR_H 1 @@ -465,6 +473,24 @@ SOFTWARE. #define ETL_NOT_USING_LIBC_WCHAR_H 0 #endif +//************************************* +// Determine if the ETL can use STL ostream +#if !defined(ETL_NO_STD_OSTREAM) && ETL_USING_STL + #if defined(__has_include) + #if !__has_include() + #define ETL_NO_STD_OSTREAM + #endif + #endif +#endif + +#if defined(ETL_NO_STD_OSTREAM) || (ETL_NOT_USING_STL && !defined(ETL_IN_UNIT_TEST)) + #define ETL_USING_STD_OSTREAM 0 + #define ETL_NOT_USING_STD_OSTREAM 1 +#else + #define ETL_USING_STD_OSTREAM 1 + #define ETL_NOT_USING_STD_OSTREAM 0 +#endif + //************************************* // Determine if the ETL should support atomics. #if defined(ETL_NO_ATOMICS) || \ diff --git a/include/etl/string_view.h b/include/etl/string_view.h index f9519379..b16bcba4 100644 --- a/include/etl/string_view.h +++ b/include/etl/string_view.h @@ -47,7 +47,7 @@ SOFTWARE. #include #endif -#if ETL_USING_STL +#if ETL_USING_STD_OSTREAM #include #endif diff --git a/support/Release notes.txt b/support/Release notes.txt index 3120d61c..9c183c97 100644 --- a/support/Release notes.txt +++ b/support/Release notes.txt @@ -11,10 +11,12 @@ Fixes: #1171 optional of a const arary can't be emplaced with gcc-15 #1176 Fix GCC __builtin_memcpy errors when compiling with -O2 optimisation #1180 Duplicate definition of const_reference in etl::const_set_ext +#1181 Compilation errors on basic_string Pull Requests: #1169 Remove Unreachable Break Statements #1172 Make call interfaces in etl::delegate and etl::closure conditionally noexcept +#1177 Fix .clang-format =============================================================================== 20.43.0