Changed #if ETL_USING_STL to #if ETL_USING_STD_OSTREAM around std::basic_ostream

Fixed warnings when using ETL_DEBUG_COUNT in non debug build
This commit is contained in:
John Wellbelove 2025-09-06 20:49:39 +01:00
parent 1b65c4ec91
commit 97cd7e90dc
4 changed files with 14 additions and 14 deletions

View File

@ -3173,7 +3173,7 @@ namespace etl
///\return Reference to the output stream, for chaining write operations.
///\ingroup string
//***************************************************************************
#if ETL_USING_STL
#if ETL_USING_STD_OSTREAM
template <typename T>
std::basic_ostream<T, std::char_traits<T> > &operator<<(std::basic_ostream<T, std::char_traits<T> > &os,
const etl::ibasic_string<T>& str)

View File

@ -158,16 +158,16 @@ inline void swap(etl::debug_count& lhs, etl::debug_count& rhs)
}
#else
#define ETL_DECLARE_DEBUG_COUNT
#define ETL_SET_DEBUG_COUNT(n)
#define ETL_GET_DEBUG_COUNT
#define ETL_INCREMENT_DEBUG_COUNT
#define ETL_DECREMENT_DEBUG_COUNT
#define ETL_ADD_DEBUG_COUNT(n)
#define ETL_SUBTRACT_DEBUG_COUNT(n)
#define ETL_RESET_DEBUG_COUNT
#define ETL_OBJECT_RESET_DEBUG_COUNT(object)
#define ETL_OBJECT_GET_DEBUG_COUNT(object)
#define ETL_DECLARE_DEBUG_COUNT enum { etl_debug_count_suppressed__ = 0 }
#define ETL_SET_DEBUG_COUNT(n) ((void)0)
#define ETL_GET_DEBUG_COUNT 0
#define ETL_INCREMENT_DEBUG_COUNT ((void)0)
#define ETL_DECREMENT_DEBUG_COUNT ((void)0)
#define ETL_ADD_DEBUG_COUNT(n) ((void)0)
#define ETL_SUBTRACT_DEBUG_COUNT(n) ((void)0)
#define ETL_RESET_DEBUG_COUNT ((void)0)
#define ETL_OBJECT_RESET_DEBUG_COUNT(object) ((void)0)
#define ETL_OBJECT_GET_DEBUG_COUNT(object) 0
#endif // ETL_DEBUG_COUNT
#endif

View File

@ -352,7 +352,7 @@ namespace etl
etl::ipool* p_node_pool; ///< The pool of data nodes used in the list.
size_type MAX_SIZE; ///< The maximum size of the forward_list.
bool pool_is_shared; ///< If <b>true</b> then the pool is shared between lists.
ETL_DECLARE_DEBUG_COUNT; ///< Internal debugging.
ETL_DECLARE_DEBUG_COUNT; ///< Internal debugging.
};
//***************************************************************************
@ -745,7 +745,7 @@ namespace etl
data_node_t* p_data_node = allocate_data_node();
::new (&(p_data_node->value)) T();
ETL_INCREMENT_DEBUG_COUNT;
insert_node_after(start_node, *p_data_node);
insert_node_after(start_node, *p_data_node);
return front();
}

View File

@ -982,7 +982,7 @@ void swap(etl::basic_string_view<T, etl::char_traits<T> >& lhs, etl::basic_strin
//*************************************************************************
/// Operator overload to write to std basic_ostream
//*************************************************************************
#if ETL_USING_STL
#if ETL_USING_STD_OSTREAM
template <typename T>
std::basic_ostream<T, std::char_traits<T> > &operator<<(std::basic_ostream<T, std::char_traits<T> > &os,
etl::basic_string_view<T, etl::char_traits<T> > text)