mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 14:49:53 +08:00
Merge remote-tracking branch 'origin/hot-fix/macros' into development
This commit is contained in:
commit
0db4f32522
@ -976,7 +976,7 @@ namespace etl
|
||||
/// If asserts or exceptions are enabled, throws an etl::deque_full if the deque is full.
|
||||
///\param insert_position>The insert position.
|
||||
//*************************************************************************
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
template <typename ... Args>
|
||||
iterator emplace(const_iterator insert_position, Args && ... args)
|
||||
{
|
||||
@ -1298,7 +1298,7 @@ namespace etl
|
||||
|
||||
return position;
|
||||
}
|
||||
#endif // ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
/// Inserts 'n' copies of a value into the deque.
|
||||
@ -1647,7 +1647,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
//*************************************************************************
|
||||
/// Emplaces an item to the back of the deque.
|
||||
/// If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full.
|
||||
@ -1734,7 +1734,7 @@ namespace etl
|
||||
++current_size;
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
}
|
||||
#endif // ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
/// Removes the oldest item from the deque.
|
||||
@ -1775,7 +1775,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
//*************************************************************************
|
||||
/// Emplaces an item to the front of the deque.
|
||||
/// If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full.
|
||||
@ -1862,7 +1862,7 @@ namespace etl
|
||||
++current_size;
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
}
|
||||
#endif // ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
/// Removes the oldest item from the deque.
|
||||
|
||||
@ -338,7 +338,7 @@ namespace etl
|
||||
return emplace(value.first, value.second);
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
//*************************************************************************
|
||||
/// Emplaces a value to the map.
|
||||
//*************************************************************************
|
||||
@ -501,7 +501,7 @@ namespace etl
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#endif
|
||||
|
||||
//*********************************************************************
|
||||
/// Erases an element.
|
||||
|
||||
@ -320,7 +320,7 @@ namespace etl
|
||||
return refmap_t::insert_at(i_element, *pvalue);
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
//*************************************************************************
|
||||
/// Emplaces a value to the map.
|
||||
//*************************************************************************
|
||||
@ -412,7 +412,7 @@ namespace etl
|
||||
return refmap_t::insert_at(i_element, *pvalue);
|
||||
}
|
||||
|
||||
#endif // ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#endif
|
||||
|
||||
//*********************************************************************
|
||||
/// Erases an element.
|
||||
|
||||
@ -281,7 +281,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Emplaces a value to the set.
|
||||
//*************************************************************************
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
template <typename ... Args>
|
||||
std::pair<iterator, bool> emplace(Args && ... args)
|
||||
{
|
||||
@ -368,7 +368,7 @@ namespace etl
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
return std::pair<iterator, bool>(refset_t::insert_at(i_element, *pvalue));
|
||||
}
|
||||
#endif // ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#endif
|
||||
|
||||
//*********************************************************************
|
||||
/// Erases an element.
|
||||
|
||||
@ -284,7 +284,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Emplaces a value to the set.
|
||||
//*************************************************************************
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
template <typename ... Args>
|
||||
std::pair<iterator, bool> emplace(Args && ... args)
|
||||
{
|
||||
@ -446,7 +446,7 @@ namespace etl
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif // ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#endif
|
||||
|
||||
//*********************************************************************
|
||||
/// Erases an element.
|
||||
|
||||
@ -867,7 +867,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
//*************************************************************************
|
||||
/// Emplaces a value to the front of the list.
|
||||
//*************************************************************************
|
||||
@ -952,7 +952,7 @@ namespace etl
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
insert_node(get_head(), *p_data_node);
|
||||
}
|
||||
#endif // ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
/// Removes a value from the front of the list.
|
||||
@ -993,7 +993,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Emplaces a value to the back of the list.
|
||||
//*************************************************************************
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
template <typename ... Args>
|
||||
void emplace_back(Args && ... args)
|
||||
{
|
||||
@ -1063,7 +1063,7 @@ namespace etl
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
insert_node(terminal_node, *p_data_node);
|
||||
}
|
||||
#endif // ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
/// Removes a value from the back of the list.
|
||||
@ -1108,7 +1108,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Emplaces a value to the list at the specified position.
|
||||
//*************************************************************************
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
template <typename ... Args>
|
||||
iterator emplace(iterator position, Args && ... args)
|
||||
{
|
||||
@ -1178,7 +1178,7 @@ namespace etl
|
||||
|
||||
return iterator(*p_data_node);
|
||||
}
|
||||
#endif // ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
/// Inserts 'n' copies of a value to the list at the specified position.
|
||||
|
||||
@ -168,7 +168,7 @@ namespace etl
|
||||
std::push_heap(container.begin(), container.end(), compare);
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL) && !ETL_PRIORITY_QUEUE_FORCE_CPP03
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_PRIORITY_QUEUE_FORCE_CPP03)
|
||||
//*************************************************************************
|
||||
/// Emplaces a value to the queue.
|
||||
/// If asserts or exceptions are enabled, throws an etl::priority_queue_full
|
||||
@ -253,7 +253,7 @@ namespace etl
|
||||
// Make elements in container into heap
|
||||
std::push_heap(container.begin(), container.end(), compare);
|
||||
}
|
||||
#endif // ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
/// Assigns values to the priority queue.
|
||||
|
||||
@ -49,8 +49,6 @@ SOFTWARE.
|
||||
#undef ETL_FILE
|
||||
#define ETL_FILE "13"
|
||||
|
||||
#define ETL_QUEUE_FORCE_CPP03 0
|
||||
|
||||
//*****************************************************************************
|
||||
///\defgroup queue queue
|
||||
/// A First-in / first-out queue with the capacity defined at compile time,
|
||||
@ -318,7 +316,7 @@ namespace etl
|
||||
add_in();
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL) && !ETL_QUEUE_FORCE_CPP03
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_QUEUE_FORCE_CPP03)
|
||||
//*************************************************************************
|
||||
/// Constructs a value in the queue 'in place'.
|
||||
/// If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
|
||||
@ -393,7 +391,7 @@ namespace etl
|
||||
::new (&p_buffer[in]) T(value1, value2, value3, value4);
|
||||
add_in();
|
||||
}
|
||||
#endif // ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
/// Clears the queue to the empty state.
|
||||
|
||||
@ -162,7 +162,7 @@ namespace etl
|
||||
return result;
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL) && !ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03)
|
||||
//*************************************************************************
|
||||
/// Constructs a value in the queue 'in place'.
|
||||
/// If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
|
||||
@ -376,7 +376,7 @@ namespace etl
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL) && !ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03)
|
||||
//*************************************************************************
|
||||
/// Constructs a value in the queue 'in place'.
|
||||
//*************************************************************************
|
||||
|
||||
@ -222,7 +222,7 @@ namespace etl
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL) && !ETL_QUEUE_ATOMIC_FORCE_CPP03
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_QUEUE_ATOMIC_FORCE_CPP03)
|
||||
//*************************************************************************
|
||||
/// Constructs a value in the queue 'in place'.
|
||||
/// If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
|
||||
|
||||
@ -43,8 +43,6 @@ SOFTWARE.
|
||||
#undef ETL_FILE
|
||||
#define ETL_FILE "46"
|
||||
|
||||
#define ETL_QUEUE_ISR_FORCE_CPP03 0
|
||||
|
||||
namespace etl
|
||||
{
|
||||
template <typename T, const size_t MEMORY_MODEL = etl::memory_model::MEMORY_MODEL_LARGE>
|
||||
@ -76,7 +74,7 @@ namespace etl
|
||||
/// If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
|
||||
///\param value The value to use to construct the item to push to the queue.
|
||||
//*************************************************************************
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL) && !ETL_QUEUE_ISR_FORCE_CPP03
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !ETL_QUEUE_ISR_FORCE_CPP03
|
||||
template <typename ... Args>
|
||||
bool emplace_from_isr(Args&&... args)
|
||||
{
|
||||
@ -194,7 +192,7 @@ namespace etl
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL) && !ETL_QUEUE_ISR_FORCE_CPP03
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !ETL_QUEUE_ISR_FORCE_CPP03
|
||||
//*************************************************************************
|
||||
/// Constructs a value in the queue 'in place'.
|
||||
/// If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
|
||||
@ -432,7 +430,7 @@ namespace etl
|
||||
/// Constructs a value in the queue 'in place'.
|
||||
/// If asserts or exceptions are enabled, throws an etl::queue_full if the queue if already full.
|
||||
//*************************************************************************
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL) && !ETL_QUEUE_ISR_FORCE_CPP03
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !ETL_QUEUE_ISR_FORCE_CPP03
|
||||
template <typename ... Args>
|
||||
bool emplace(Args&&... args)
|
||||
{
|
||||
|
||||
@ -263,7 +263,7 @@ namespace etl
|
||||
::new (&p_buffer[top_index]) T(value);
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
//*************************************************************************
|
||||
/// Constructs a value in the stack place'.
|
||||
/// If asserts or exceptions are enabled, throws an etl::stack_full if the stack is already full.
|
||||
@ -338,7 +338,7 @@ namespace etl
|
||||
base_t::add_in();
|
||||
::new (&p_buffer[top_index]) T(value1, value2, value3, value4);
|
||||
}
|
||||
#endif // ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets a const reference to the value at the top of the stack.<br>
|
||||
|
||||
@ -711,7 +711,7 @@ namespace etl
|
||||
type_id = other.type_id;
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL) && !ETL_VARIANT_FORCE_CPP03
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_VARIANT_FORCE_CPP03)
|
||||
//*************************************************************************
|
||||
/// Emplace with variadic constructor parameters.
|
||||
//*************************************************************************
|
||||
|
||||
@ -62,8 +62,6 @@ SOFTWARE.
|
||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#endif
|
||||
|
||||
#define ETL_VECTOR_FORCE_CPP03 0
|
||||
|
||||
//*****************************************************************************
|
||||
///\defgroup vector vector
|
||||
/// A vector with the capacity defined at compile time.
|
||||
@ -430,7 +428,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL) && !ETL_VECTOR_FORCE_CPP03
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_VECTOR_FORCE_CPP03)
|
||||
//*********************************************************************
|
||||
/// Constructs a value at the end of the vector.
|
||||
/// If asserts or exceptions are enabled, emits vector_full if the vector is already full.
|
||||
@ -510,7 +508,7 @@ namespace etl
|
||||
++p_end;
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
}
|
||||
#endif // ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL) && !ETL_VECTOR_FORCE_CPP03
|
||||
#endif
|
||||
|
||||
//*************************************************************************
|
||||
/// Removes an element from the end of the vector.
|
||||
@ -577,7 +575,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Emplaces a value to the vextor at the specified position.
|
||||
//*************************************************************************
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT)
|
||||
template <typename ... Args>
|
||||
iterator emplace(iterator position, Args && ... args)
|
||||
{
|
||||
@ -702,7 +700,7 @@ namespace etl
|
||||
|
||||
return position;
|
||||
}
|
||||
#endif // ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#endif
|
||||
|
||||
//*********************************************************************
|
||||
/// Inserts 'n' values to the vector.
|
||||
|
||||
@ -38,8 +38,8 @@ SOFTWARE.
|
||||
///\ingroup utilities
|
||||
|
||||
#define ETL_VERSION_MAJOR 14
|
||||
#define ETL_VERSION_MINOR 11
|
||||
#define ETL_VERSION_PATCH 3
|
||||
#define ETL_VERSION_MINOR 12
|
||||
#define ETL_VERSION_PATCH 0
|
||||
|
||||
#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))
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
===============================================================================
|
||||
14.12.0
|
||||
Enabled emplace functions for C++03.
|
||||
|
||||
===============================================================================
|
||||
14.11.3
|
||||
Moved C++03 force macros to test profile.
|
||||
|
||||
@ -76,11 +76,14 @@ 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
|
||||
//#define ETL_FUNCTION_FORCE_CPP03
|
||||
//#define ETL_PRIORITY_QUEUE_FORCE_CPP03
|
||||
//#define ETL_QUEUE_ATOMIC_FORCE_CPP03
|
||||
//#define ETL_VARIANT_FORCE_CPP03
|
||||
//#define ETL_VECTOR_FORCE_CPP03
|
||||
//#define ETL_QUEUE_FORCE_CPP03
|
||||
//#define ETL_QUEUE_MPMC_MUTEX_FORCE_CPP03
|
||||
//#define ETL_QUEUE_ISR_FORCE_CPP03
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include "etl/profiles/msvc_x86.h"
|
||||
|
||||
@ -800,7 +800,7 @@ namespace
|
||||
// So this is only tested on C++11 onwards
|
||||
TEST_FIXTURE(SetupFixture, test_emplace_back_non_const_references)
|
||||
{
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL) && !ETL_VECTOR_FORCE_CPP03
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_VECTOR_FORCE_CPP03)
|
||||
class Data
|
||||
{
|
||||
public:
|
||||
@ -835,7 +835,7 @@ namespace
|
||||
compare_data.begin());
|
||||
|
||||
CHECK(is_equal);
|
||||
#endif // ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_NO_STL)
|
||||
#endif
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user