Merge remote-tracking branch 'origin/feature/rvalue-references' into development

This commit is contained in:
John Wellbelove 2018-12-17 19:11:56 +00:00
commit 5e7b85284c
6 changed files with 14 additions and 30 deletions

View File

@ -15,23 +15,10 @@ set(ETL_PROFILE "DEFAULT" CACHE STRING "Defines what profile header to include.
option(BUILD_TESTS "Build unit tests" OFF)
add_library(etl INTERFACE)
# Note: this will not compile src/c/ecl_timer.c as that c file has a dependence
# on ecl_user.h which is provided by clients of this library
add_library(etl STATIC
src/binary.cpp
src/crc16.cpp
src/crc16_ccitt.cpp
src/crc16_kermit.cpp
src/crc32.cpp
src/crc64_ecma.cpp
src/crc8_ccitt.cpp
src/error_handler.cpp
src/pearson.cpp
src/random.cpp
)
target_include_directories(etl
PUBLIC
INTERFACE
include
include/etl/profiles
)
@ -60,7 +47,7 @@ endif()
message(STATUS "Compiling with ETL profile set to: ${ETL_PROFILE}")
target_compile_definitions(etl
PUBLIC
INTERFACE
${ETL_PROFILE}
)

View File

@ -238,8 +238,6 @@ namespace etl
protected:
typedef typename etl::parameter_type<T>::type parameter_t;
//*************************************************************************
/// Test for an iterator.
//*************************************************************************
@ -1624,7 +1622,7 @@ namespace etl
/// If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full.
///\param item The item to push to the deque.
//*************************************************************************
void push_back(parameter_t item)
void push_back(const T& item)
{
#if defined(ETL_CHECK_PUSH_POP)
ETL_ASSERT(!full(), ETL_ERROR(deque_full));
@ -1752,7 +1750,7 @@ namespace etl
/// If asserts or exceptions are enabled, throws an etl::deque_full if the deque is already full.
///\param item The item to push to the deque.
//*************************************************************************
void push_front(parameter_t item)
void push_front(const T& item)
{
#if defined(ETL_CHECK_PUSH_POP)
ETL_ASSERT(!full(), ETL_ERROR(deque_full));
@ -2065,7 +2063,7 @@ namespace etl
//*********************************************************************
/// Create a new element with a default value at the front.
//*********************************************************************
void create_element_front(parameter_t value)
void create_element_front(const T& value)
{
--_begin;
::new (&(*_begin)) T(value);
@ -2076,7 +2074,7 @@ namespace etl
//*********************************************************************
/// Create a new element with a value at the back
//*********************************************************************
void create_element_back(parameter_t value)
void create_element_back(const T& value)
{
::new (&(*_end)) T(value);
++_end;
@ -2274,7 +2272,7 @@ namespace etl
//*************************************************************************
/// Assigns data to the deque.
//*************************************************************************
explicit deque(size_t n, typename etl::ideque<T>::parameter_t value = value_type())
explicit deque(size_t n, const T& value = value_type())
: etl::ideque<T>(reinterpret_cast<T*>(&buffer[0]), MAX_SIZE, BUFFER_SIZE)
{
this->assign(n, value);

View File

@ -45,7 +45,6 @@ SOFTWARE.
#include "../stl/iterator.h"
#ifdef ETL_COMPILER_GCC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-variable"
#endif
@ -647,10 +646,6 @@ namespace etl
#include "minmax_pop.h"
#ifdef ETL_COMPILER_GCC
#pragma GCC diagnostic pop
#endif
#undef ETL_IN_PVOIDVECTOR
#endif

View File

@ -242,7 +242,7 @@ namespace etl
}
//*************************************************************************
///
///
//*************************************************************************
void start(const bool on_entry_initial = true)
{

View File

@ -39,7 +39,7 @@ SOFTWARE.
#define ETL_VERSION_MAJOR 14
#define ETL_VERSION_MINOR 5
#define ETL_VERSION_PATCH 0
#define ETL_VERSION_PATCH 1
#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))

View File

@ -1,3 +1,7 @@
===============================================================================
14.5.1
Fixed deque pushes for literals.
===============================================================================
14.5.0
Added move algorithms and utility to 'alternate' STL.