Merge remote-tracking branch 'origin/development'

This commit is contained in:
John Wellbelove 2018-07-28 21:58:30 +01:00
parent 75ecb0b411
commit 85e51ee375
145 changed files with 398 additions and 354 deletions

View File

@ -34,11 +34,8 @@ add_library(etl
)
target_include_directories(etl
PUBLIC
include/etl
include/etl/atomic
include
include/etl/profiles
PRIVATE
include/etl/private
)
if (${ETL_PROFILE} STREQUAL DEFAULT)

View File

@ -40,7 +40,7 @@ SOFTWARE.
#include "alignment.h"
#include "static_assert.h"
#include "type_lookup.h"
#include <pool.h>
#include "pool.h"
#if defined(ETL_COMPILER_GCC)
#warning THIS CLASS IS DEPRECATED!USE VARIANT_POOL INSTEAD.

View File

@ -101,13 +101,15 @@ namespace etl
bool operator ()(const value_type& element, key_type key) const
{
return key_compare()(element.first, key);
return comp(element.first, key);
}
bool operator ()(key_type key, const value_type& element) const
{
return key_compare()(key, element.first);
return comp(key, element.first);
}
key_compare comp;
};
public:
@ -300,7 +302,7 @@ namespace etl
std::pair<iterator, bool> result(i_element, false);
// Doesn't already exist?
if ((i_element == end()) || TKeyCompare()(i_element->first, value.first) || TKeyCompare()(value.first, i_element->first))
if ((i_element == end()) || compare(i_element->first, value.first) || compare(value.first, i_element->first))
{
ETL_ASSERT(!refmap_t::full(), ETL_ERROR(flat_map_full));
@ -764,6 +766,8 @@ namespace etl
storage_t& storage;
TKeyCompare compare;
/// Internal debugging.
ETL_DECLARE_DEBUG_COUNT;

View File

@ -103,13 +103,15 @@ namespace etl
bool operator ()(const value_type& element, key_type key) const
{
return key_compare()(element.first, key);
return comp(element.first, key);
}
bool operator ()(key_type key, const value_type& element) const
{
return key_compare()(key, element.first);
return comp(key, element.first);
}
key_compare comp;
};
public:

View File

@ -232,7 +232,7 @@ namespace etl
ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
iterator i_element = std::lower_bound(begin(), end(), value, TKeyCompare());
iterator i_element = std::lower_bound(begin(), end(), value, compare);
value_type* pvalue = storage.allocate<value_type>();
::new (pvalue) value_type(value);
@ -605,6 +605,8 @@ namespace etl
storage_t& storage;
TKeyCompare compare;
/// Internal debugging.
ETL_DECLARE_DEBUG_COUNT;

View File

@ -233,7 +233,7 @@ namespace etl
std::pair<iterator, bool> result(i_element, false);
// Doesn't already exist?
if ((i_element == end()) || TKeyCompare()(*i_element, value) || TKeyCompare()(value, *i_element))
if ((i_element == end()) || compare(*i_element, value) || compare(value, *i_element))
{
ETL_ASSERT(!refset_t::full(), ETL_ERROR(flat_set_full));
@ -671,6 +671,8 @@ namespace etl
storage_t& storage;
TKeyCompare compare;
/// Internal debugging.
ETL_DECLARE_DEBUG_COUNT;

View File

@ -236,17 +236,17 @@ namespace etl
//*************************************************************************
/// Get the head node.
//*************************************************************************
node_t& get_head()
node_t* get_head()
{
return *start_node.next;
return start_node.next;
}
//*************************************************************************
/// Get the head node.
//*************************************************************************
const node_t& get_head() const
const node_t* get_head() const
{
return *start_node.next;
return start_node.next;
}
//*************************************************************************
@ -329,8 +329,8 @@ namespace etl
{
}
iterator(node_t& node)
: p_node(&node)
iterator(node_t* node)
: p_node(node)
{
}
@ -417,13 +417,13 @@ namespace etl
{
}
const_iterator(node_t& node)
: p_node(&node)
const_iterator(node_t* node)
: p_node(node)
{
}
const_iterator(const node_t& node)
: p_node(&node)
const_iterator(const node_t* node)
: p_node(node)
{
}
@ -493,7 +493,7 @@ namespace etl
//*************************************************************************
iterator begin()
{
return iterator(data_cast(get_head()));
return iterator(get_head());
}
//*************************************************************************
@ -501,7 +501,7 @@ namespace etl
//*************************************************************************
const_iterator begin() const
{
return const_iterator(data_cast(get_head()));
return const_iterator(get_head());
}
//*************************************************************************
@ -509,7 +509,7 @@ namespace etl
//*************************************************************************
iterator before_begin()
{
return iterator(static_cast<data_node_t&>(start_node));
return iterator(&start_node);
}
//*************************************************************************
@ -517,7 +517,7 @@ namespace etl
//*************************************************************************
const_iterator before_begin() const
{
return const_iterator(static_cast<const data_node_t&>(start_node));
return const_iterator(&start_node);
}
//*************************************************************************
@ -565,7 +565,7 @@ namespace etl
//*************************************************************************
reference front()
{
return data_cast(get_head()).value;
return data_cast(*get_head()).value;
}
//*************************************************************************
@ -573,7 +573,7 @@ namespace etl
//*************************************************************************
const_reference front() const
{
return data_cast(get_head()).value;
return data_cast(*get_head()).value;
}
//*************************************************************************
@ -780,7 +780,7 @@ namespace etl
data_node_t& data_node = allocate_data_node(value);
insert_node_after(*position.p_node, data_node);
return iterator(data_node);
return iterator(&data_node);
}
//*************************************************************************
@ -796,7 +796,7 @@ namespace etl
ETL_INCREMENT_DEBUG_COUNT;
insert_node_after(*position.p_node, *p_data_node);
return iterator(*p_data_node);
return iterator(p_data_node);
}
//*************************************************************************
@ -812,7 +812,7 @@ namespace etl
ETL_INCREMENT_DEBUG_COUNT;
insert_node_after(*position.p_node, *p_data_node);
return iterator(*p_data_node);
return iterator(p_data_node);
}
//*************************************************************************
@ -828,7 +828,7 @@ namespace etl
ETL_INCREMENT_DEBUG_COUNT;
insert_node_after(*position.p_node, *p_data_node);
return iterator(*p_data_node);
return iterator(p_data_node);
}
//*************************************************************************
@ -844,7 +844,7 @@ namespace etl
ETL_INCREMENT_DEBUG_COUNT;
insert_node_after(*position.p_node, *p_data_node);
return iterator(*p_data_node);
return iterator(p_data_node);
}
//*************************************************************************
@ -931,7 +931,7 @@ namespace etl
}
else
{
return iterator(*p_last);
return iterator(p_last);
}
}
else
@ -1023,7 +1023,7 @@ namespace etl
return;
}
node_t* last = &get_head();
node_t* last = get_head();
node_t* current = last->next;
while (current != nullptr)

View File

@ -278,17 +278,17 @@ namespace etl
//*************************************************************************
/// Get the head link.
//*************************************************************************
link_type& get_head()
link_type* get_head()
{
return *start_link.etl_next;
return start_link.etl_next;
}
//*************************************************************************
/// Get the head link.
//*************************************************************************
const link_type& get_head() const
const link_type* get_head() const
{
return *start_link.etl_next;
return start_link.etl_next;
}
//*************************************************************************
@ -338,8 +338,8 @@ namespace etl
{
}
iterator(value_type& value)
: p_value(&value)
iterator(value_type* value)
: p_value(value)
{
}
@ -428,8 +428,8 @@ namespace etl
{
}
const_iterator(const value_type& value)
: p_value(&value)
const_iterator(const value_type* value)
: p_value(value)
{
}
@ -526,7 +526,7 @@ namespace etl
//*************************************************************************
iterator begin()
{
return iterator(static_cast<value_type&>(this->get_head()));
return iterator(static_cast<value_type*>(this->get_head()));
}
//*************************************************************************
@ -534,7 +534,7 @@ namespace etl
//*************************************************************************
const_iterator begin() const
{
return const_iterator(static_cast<const value_type&>(this->get_head()));
return const_iterator(static_cast<const value_type*>(this->get_head()));
}
//*************************************************************************
@ -542,7 +542,7 @@ namespace etl
//*************************************************************************
iterator before_begin()
{
return iterator(static_cast<value_type&>(this->start_link));
return iterator(&(static_cast<value_type&>(this->start_link)));
}
//*************************************************************************
@ -550,7 +550,7 @@ namespace etl
//*************************************************************************
const_iterator before_begin() const
{
return const_iterator(static_cast<const value_type&>(this->start_link));
return const_iterator(&(static_cast<const value_type&>(this->start_link)));
}
//*************************************************************************
@ -558,7 +558,7 @@ namespace etl
//*************************************************************************
const_iterator cbegin() const
{
return const_iterator(static_cast<const value_type&>(this->get_head()));
return const_iterator(static_cast<const value_type*>(this->get_head()));
}
//*************************************************************************
@ -590,7 +590,7 @@ namespace etl
//*************************************************************************
reference front()
{
return static_cast<value_type&>(this->get_head());
return static_cast<value_type&>(*(this->get_head()));
}
//*************************************************************************
@ -598,7 +598,7 @@ namespace etl
//*************************************************************************
const_reference front() const
{
return static_cast<const value_type&>(this->get_head());;
return static_cast<const value_type&>(*(this->get_head()));;
}
//*************************************************************************
@ -607,7 +607,7 @@ namespace etl
iterator insert_after(iterator position, value_type& value)
{
this->insert_link_after(*position.p_value, value);
return iterator(value);
return iterator(&value);
}
//*************************************************************************
@ -686,7 +686,7 @@ namespace etl
return;
}
link_type* last = &this->get_head();
link_type* last = this->get_head();
link_type* current = last->etl_next;
while (current != nullptr)
@ -886,7 +886,7 @@ namespace etl
{
if (!other.empty())
{
link_type& first = other.get_head();
link_type& first = *other.get_head();
if (&other != this)
{
@ -982,7 +982,7 @@ namespace etl
ETL_ASSERT(etl::is_sorted(begin(), end(), compare), ETL_ERROR(intrusive_forward_list_unsorted));
#endif
value_type* other_begin = static_cast<value_type*>(&other.get_head());
value_type* other_begin = static_cast<value_type*>(other.get_head());
value_type* other_terminal = nullptr;
value_type* before = static_cast<value_type*>(&this->start_link);

View File

@ -481,7 +481,7 @@ namespace etl
{
bool operator ()(const key_type& key1, const key_type& key2) const
{
return key_compare()(key1, key2);
return compare(key1, key2);
}
};
@ -492,7 +492,7 @@ namespace etl
{
bool operator ()(const value_type& value1, const value_type& value2) const
{
return key_compare()(value1.first, value2.first);
return compare(value1.first, value2.first);
}
};
@ -524,15 +524,15 @@ namespace etl
//*************************************************************************
bool node_comp(const Data_Node& node1, const Data_Node& node2) const
{
return key_compare()(node1.value.first, node2.value.first);
return compare(node1.value.first, node2.value.first);
}
bool node_comp(const Data_Node& node, key_parameter_t key) const
{
return key_compare()(node.value.first, key);
return compare(node.value.first, key);
}
bool node_comp(key_parameter_t key, const Data_Node& node) const
{
return key_compare()(key, node.value.first);
return compare(key, node.value.first);
}
private:
@ -540,6 +540,8 @@ namespace etl
/// The pool of data nodes used in the map.
ipool* p_node_pool;
key_compare compare;
//*************************************************************************
/// Downcast a Node* to a Data_Node*
//*************************************************************************

View File

@ -638,7 +638,7 @@ namespace etl
{
bool operator ()(const key_type& key1, const key_type& key2) const
{
return key_compare()(key1, key2);
return compare(key1, key2);
}
};
@ -649,7 +649,7 @@ namespace etl
{
bool operator ()(const value_type& value1, const value_type& value2) const
{
return key_compare()(value1.first, value2.first);
return compare(value1.first, value2.first);
}
};
@ -676,17 +676,17 @@ namespace etl
//*************************************************************************
bool node_comp(const Data_Node& node1, const Data_Node& node2) const
{
return key_compare()(node1.value.first, node2.value.first);
return compare(node1.value.first, node2.value.first);
}
bool node_comp(const Data_Node& node, key_parameter_t key) const
{
return key_compare()(node.value.first, key);
return compare(node.value.first, key);
}
bool node_comp(key_parameter_t key, const Data_Node& node) const
{
return key_compare()(key, node.value.first);
return compare(key, node.value.first);
}
private:
@ -694,6 +694,8 @@ namespace etl
/// The pool of data nodes used in the multimap.
ipool* p_node_pool;
key_compare compare;
//*************************************************************************
/// Downcast a Node* to a Data_Node*
//*************************************************************************

View File

@ -636,7 +636,7 @@ namespace etl
{
bool operator ()(key_type& key1, key_type& key2) const
{
return key_compare()(key1, key2);
return compare(key1, key2);
}
};
@ -647,7 +647,7 @@ namespace etl
{
bool operator ()(value_type& value1, value_type& value2) const
{
return value_compare()(value1, value2);
return compare(value1, value2);
}
};
@ -674,15 +674,15 @@ namespace etl
//*************************************************************************
bool node_comp(const Data_Node& node1, const Data_Node& node2) const
{
return key_compare()(node1.value, node2.value);
return compare(node1.value, node2.value);
}
bool node_comp(const Data_Node& node, key_parameter_t key) const
{
return key_compare()(node.value, key);
return compare(node.value, key);
}
bool node_comp(key_parameter_t key, const Data_Node& node) const
{
return key_compare()(key, node.value);
return compare(key, node.value);
}
private:
@ -690,6 +690,8 @@ namespace etl
/// The pool of data nodes used in the multiset.
ipool* p_node_pool;
key_compare compare;
//*************************************************************************
/// Downcast a Node* to a Data_Node*
//*************************************************************************

View File

@ -165,7 +165,7 @@ namespace etl
// Put element at end
container.push_back(value);
// Make elements in container into heap
std::push_heap(container.begin(), container.end(), TCompare());
std::push_heap(container.begin(), container.end(), compare);
}
//*************************************************************************
@ -182,7 +182,7 @@ namespace etl
// Put element at end
container.emplace_back(value1);
// Make elements in container into heap
std::push_heap(container.begin(), container.end(), TCompare());
std::push_heap(container.begin(), container.end(), compare);
}
//*************************************************************************
@ -199,7 +199,7 @@ namespace etl
// Put element at end
container.emplace_back(value1, value2);
// Make elements in container into heap
std::push_heap(container.begin(), container.end(), TCompare());
std::push_heap(container.begin(), container.end(), compare);
}
//*************************************************************************
@ -216,7 +216,7 @@ namespace etl
// Put element at end
container.emplace_back(value1, value2, value3);
// Make elements in container into heap
std::push_heap(container.begin(), container.end(), TCompare());
std::push_heap(container.begin(), container.end(), compare);
}
//*************************************************************************
@ -233,7 +233,7 @@ namespace etl
// Put element at end
container.emplace_back(value1, value2, value3, value4);
// Make elements in container into heap
std::push_heap(container.begin(), container.end(), TCompare());
std::push_heap(container.begin(), container.end(), compare);
}
//*************************************************************************
@ -256,7 +256,7 @@ namespace etl
clear();
container.assign(first, last);
std::make_heap(container.begin(), container.end(), TCompare());
std::make_heap(container.begin(), container.end(), compare);
}
//*************************************************************************
@ -266,7 +266,7 @@ namespace etl
void pop()
{
// Move largest element to end
std::pop_heap(container.begin(), container.end(), TCompare());
std::pop_heap(container.begin(), container.end(), compare);
// Actually remove largest element at end
container.pop_back();
}
@ -356,6 +356,8 @@ namespace etl
/// The container specified at instantiation of the priority_queue
TContainer container;
TCompare compare;
};
//***************************************************************************

View File

@ -329,19 +329,21 @@ namespace etl
//*********************************************************************
/// How to compare elements and keys.
//*********************************************************************
class compare
class Compare
{
public:
bool operator ()(const value_type& element, key_type key) const
{
return key_compare()(element.first, key);
return comp(element.first, key);
}
bool operator ()(key_type key, const value_type& element) const
{
return key_compare()(key, element.first);
return comp(key, element.first);
}
key_compare comp;
};
public:
@ -690,7 +692,7 @@ namespace etl
//*********************************************************************
iterator lower_bound(key_parameter_t key)
{
return std::lower_bound(begin(), end(), key, compare());
return std::lower_bound(begin(), end(), key, compare);
}
//*********************************************************************
@ -700,7 +702,7 @@ namespace etl
//*********************************************************************
const_iterator lower_bound(key_parameter_t key) const
{
return std::lower_bound(cbegin(), cend(), key, compare());
return std::lower_bound(cbegin(), cend(), key, compare);
}
//*********************************************************************
@ -710,7 +712,7 @@ namespace etl
//*********************************************************************
iterator upper_bound(key_parameter_t key)
{
return std::upper_bound(begin(), end(), key, compare());
return std::upper_bound(begin(), end(), key, compare);
}
//*********************************************************************
@ -720,7 +722,7 @@ namespace etl
//*********************************************************************
const_iterator upper_bound(key_parameter_t key) const
{
return std::upper_bound(begin(), end(), key, compare());
return std::upper_bound(begin(), end(), key, compare);
}
//*********************************************************************
@ -730,9 +732,9 @@ namespace etl
//*********************************************************************
std::pair<iterator, iterator> equal_range(key_parameter_t key)
{
iterator i_lower = std::lower_bound(begin(), end(), key, compare());
iterator i_lower = std::lower_bound(begin(), end(), key, compare);
return std::make_pair(i_lower, std::upper_bound(i_lower, end(), key, compare()));
return std::make_pair(i_lower, std::upper_bound(i_lower, end(), key, compare));
}
//*********************************************************************
@ -742,9 +744,9 @@ namespace etl
//*********************************************************************
std::pair<const_iterator, const_iterator> equal_range(key_parameter_t key) const
{
const_iterator i_lower = std::lower_bound(cbegin(), cend(), key, compare());
const_iterator i_lower = std::lower_bound(cbegin(), cend(), key, compare);
return std::make_pair(i_lower, std::upper_bound(i_lower, cend(), key, compare()));
return std::make_pair(i_lower, std::upper_bound(i_lower, cend(), key, compare));
}
//*************************************************************************
@ -855,6 +857,8 @@ namespace etl
lookup_t& lookup;
Compare compare;
//*************************************************************************
/// Destructor.
//*************************************************************************

View File

@ -304,19 +304,21 @@ namespace etl
//*********************************************************************
/// How to compare elements and keys.
//*********************************************************************
class compare
class Compare
{
public:
bool operator ()(const value_type& element, key_type key) const
{
return key_compare()(element.first, key);
return comp(element.first, key);
}
bool operator ()(key_type key, const value_type& element) const
{
return key_compare()(key, element.first);
return comp(key, element.first);
}
key_compare comp;
};
public:
@ -612,7 +614,7 @@ namespace etl
//*********************************************************************
iterator lower_bound(key_parameter_t key)
{
return std::lower_bound(begin(), end(), key, compare());
return std::lower_bound(begin(), end(), key, compare);
}
//*********************************************************************
@ -622,7 +624,7 @@ namespace etl
//*********************************************************************
const_iterator lower_bound(key_parameter_t key) const
{
return std::lower_bound(cbegin(), cend(), key, compare());
return std::lower_bound(cbegin(), cend(), key, compare);
}
//*********************************************************************
@ -632,7 +634,7 @@ namespace etl
//*********************************************************************
iterator upper_bound(key_parameter_t key)
{
return std::upper_bound(begin(), end(), key, compare());
return std::upper_bound(begin(), end(), key, compare);
}
//*********************************************************************
@ -642,7 +644,7 @@ namespace etl
//*********************************************************************
const_iterator upper_bound(key_parameter_t key) const
{
return std::upper_bound(begin(), end(), key, compare());
return std::upper_bound(begin(), end(), key, compare);
}
//*********************************************************************
@ -652,9 +654,9 @@ namespace etl
//*********************************************************************
std::pair<iterator, iterator> equal_range(key_parameter_t key)
{
iterator i_lower = std::lower_bound(begin(), end(), key, compare());
iterator i_lower = std::lower_bound(begin(), end(), key, compare);
return std::make_pair(i_lower, std::upper_bound(i_lower, end(), key, compare()));
return std::make_pair(i_lower, std::upper_bound(i_lower, end(), key, compare));
}
//*********************************************************************
@ -664,9 +666,9 @@ namespace etl
//*********************************************************************
std::pair<const_iterator, const_iterator> equal_range(key_parameter_t key) const
{
const_iterator i_lower = std::lower_bound(cbegin(), cend(), key, compare());
const_iterator i_lower = std::lower_bound(cbegin(), cend(), key, compare);
return std::make_pair(i_lower, std::upper_bound(i_lower, cend(), key, compare()));
return std::make_pair(i_lower, std::upper_bound(i_lower, cend(), key, compare));
}
//*************************************************************************
@ -768,6 +770,8 @@ namespace etl
lookup_t& lookup;
Compare compare;
//*************************************************************************
/// Destructor.
//*************************************************************************

View File

@ -460,9 +460,9 @@ namespace etl
{
std::pair<iterator, bool> result(end(), false);
ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_multiset_full));
ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_multiset_full));
iterator i_element = std::lower_bound(begin(), end(), value, TKeyCompare());
iterator i_element = std::lower_bound(begin(), end(), value, compare);
if (i_element == end())
{
@ -566,7 +566,7 @@ namespace etl
//*********************************************************************
iterator find(parameter_t key)
{
iterator itr = std::lower_bound(begin(), end(), key, TKeyCompare());
iterator itr = std::lower_bound(begin(), end(), key, compare);
if (itr != end())
{
@ -590,7 +590,7 @@ namespace etl
//*********************************************************************
const_iterator find(parameter_t key) const
{
const_iterator itr = std::lower_bound(begin(), end(), key, TKeyCompare());
const_iterator itr = std::lower_bound(begin(), end(), key, compare);
if (itr != end())
{
@ -626,7 +626,7 @@ namespace etl
//*********************************************************************
iterator lower_bound(parameter_t key)
{
return std::lower_bound(begin(), end(), key, TKeyCompare());
return std::lower_bound(begin(), end(), key, compare);
}
//*********************************************************************
@ -636,7 +636,7 @@ namespace etl
//*********************************************************************
const_iterator lower_bound(parameter_t key) const
{
return std::lower_bound(cbegin(), cend(), key, TKeyCompare());
return std::lower_bound(cbegin(), cend(), key, compare);
}
//*********************************************************************
@ -646,7 +646,7 @@ namespace etl
//*********************************************************************
iterator upper_bound(parameter_t key)
{
return std::upper_bound(begin(), end(), key, TKeyCompare());
return std::upper_bound(begin(), end(), key, compare);
}
//*********************************************************************
@ -656,7 +656,7 @@ namespace etl
//*********************************************************************
const_iterator upper_bound(parameter_t key) const
{
return std::upper_bound(cbegin(), cend(), key, TKeyCompare());
return std::upper_bound(cbegin(), cend(), key, compare);
}
//*********************************************************************
@ -666,7 +666,7 @@ namespace etl
//*********************************************************************
std::pair<iterator, iterator> equal_range(parameter_t key)
{
return std::equal_range(begin(), end(), key, TKeyCompare());
return std::equal_range(begin(), end(), key, compare);
}
//*********************************************************************
@ -676,7 +676,7 @@ namespace etl
//*********************************************************************
std::pair<const_iterator, const_iterator> equal_range(parameter_t key) const
{
return std::equal_range(begin(), end(), key, TKeyCompare());
return std::equal_range(begin(), end(), key, compare);
}
//*************************************************************************
@ -783,6 +783,8 @@ namespace etl
lookup_t& lookup;
TKeyCompare compare;
//*************************************************************************
/// Destructor.
//*************************************************************************

View File

@ -546,7 +546,7 @@ namespace etl
//*********************************************************************
iterator find(parameter_t key)
{
iterator itr = std::lower_bound(begin(), end(), key, TKeyCompare());
iterator itr = std::lower_bound(begin(), end(), key, compare);
if (itr != end())
{
@ -570,7 +570,7 @@ namespace etl
//*********************************************************************
const_iterator find(parameter_t key) const
{
const_iterator itr = std::lower_bound(begin(), end(), key, TKeyCompare());
const_iterator itr = std::lower_bound(begin(), end(), key, compare);
if (itr != end())
{
@ -604,7 +604,7 @@ namespace etl
//*********************************************************************
iterator lower_bound(parameter_t key)
{
return std::lower_bound(begin(), end(), key, TKeyCompare());
return std::lower_bound(begin(), end(), key, compare);
}
//*********************************************************************
@ -614,7 +614,7 @@ namespace etl
//*********************************************************************
const_iterator lower_bound(parameter_t key) const
{
return std::lower_bound(cbegin(), cend(), key, TKeyCompare());
return std::lower_bound(cbegin(), cend(), key, compare);
}
//*********************************************************************
@ -624,7 +624,7 @@ namespace etl
//*********************************************************************
iterator upper_bound(parameter_t key)
{
return std::upper_bound(begin(), end(), key, TKeyCompare());
return std::upper_bound(begin(), end(), key, compare);
}
//*********************************************************************
@ -634,7 +634,7 @@ namespace etl
//*********************************************************************
const_iterator upper_bound(parameter_t key) const
{
return std::upper_bound(cbegin(), cend(), key, TKeyCompare());
return std::upper_bound(cbegin(), cend(), key, compare);
}
//*********************************************************************
@ -644,7 +644,7 @@ namespace etl
//*********************************************************************
std::pair<iterator, iterator> equal_range(parameter_t key)
{
return std::equal_range(begin(), end(), key, TKeyCompare());
return std::equal_range(begin(), end(), key, compare);
}
//*********************************************************************
@ -654,7 +654,7 @@ namespace etl
//*********************************************************************
std::pair<const_iterator, const_iterator> equal_range(parameter_t key) const
{
return std::upper_bound(cbegin(), cend(), key, TKeyCompare());
return std::upper_bound(cbegin(), cend(), key, compare);
}
//*************************************************************************
@ -745,7 +745,7 @@ namespace etl
result.first = i_element;
// Existing element?
if (TKeyCompare()(value, *i_element) || TKeyCompare()(*i_element, value))
if (compare(value, *i_element) || compare(*i_element, value))
{
// A new one.
ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_set_full));
@ -765,6 +765,8 @@ namespace etl
lookup_t& lookup;
TKeyCompare compare;
//*************************************************************************
/// Destructor.
//*************************************************************************

View File

@ -474,7 +474,7 @@ namespace etl
{
bool operator ()(key_type& key1, key_type& key2) const
{
return key_compare()(key1, key2);
return compare(key1, key2);
}
};
@ -485,7 +485,7 @@ namespace etl
{
bool operator ()(value_type& value1, value_type& value2) const
{
return value_compare()(value1, value2);
return compare(value1, value2);
}
};
@ -512,17 +512,17 @@ namespace etl
//*************************************************************************
bool node_comp(const Data_Node& node1, const Data_Node& node2) const
{
return key_compare()(node1.value, node2.value);
return compare(node1.value, node2.value);
}
bool node_comp(const Data_Node& node, key_parameter_t key) const
{
return key_compare()(node.value, key);
return compare(node.value, key);
}
bool node_comp(key_parameter_t key, const Data_Node& node) const
{
return key_compare()(key, node.value);
return compare(key, node.value);
}
private:
@ -530,6 +530,8 @@ namespace etl
/// The pool of data nodes used in the set.
etl::ipool* p_node_pool;
key_compare compare;
//*************************************************************************
/// Downcast a Node* to a Data_Node*
//*************************************************************************

View File

@ -34,6 +34,7 @@ SOFTWARE.
#include "../../platform.h"
#include "../../type_traits.h"
#include "../../char_traits.h"
#include "../../integral_limits.h"
#include <limits.h>
#include <stdint.h>

View File

@ -874,18 +874,18 @@ namespace etl
/// Calls the supplied reader instance.
/// The 'read' function appropriate to the current type is called with the stored value.
//***************************************************************************
void call(reader& reader)
void call(reader& r)
{
switch (type_id)
{
case 0: reader.read(static_cast<T1&>(data)); break;
case 1: reader.read(static_cast<T2&>(data)); break;
case 2: reader.read(static_cast<T3&>(data)); break;
case 3: reader.read(static_cast<T4&>(data)); break;
case 4: reader.read(static_cast<T5&>(data)); break;
case 5: reader.read(static_cast<T6&>(data)); break;
case 6: reader.read(static_cast<T7&>(data)); break;
case 7: reader.read(static_cast<T8&>(data)); break;
case 0: r.read(static_cast<T1&>(data)); break;
case 1: r.read(static_cast<T2&>(data)); break;
case 2: r.read(static_cast<T3&>(data)); break;
case 3: r.read(static_cast<T4&>(data)); break;
case 4: r.read(static_cast<T5&>(data)); break;
case 5: r.read(static_cast<T6&>(data)); break;
case 6: r.read(static_cast<T7&>(data)); break;
case 7: r.read(static_cast<T8&>(data)); break;
default: break;
}
}

View File

@ -64,7 +64,7 @@ SOFTWARE.
#include "alignment.h"
#include "static_assert.h"
#include "type_lookup.h"
#include <pool.h>
#include "pool.h"
#undef ETL_FILE
#define ETL_FILE "40"

View File

@ -37,13 +37,13 @@ SOFTWARE.
/// Definitions of the ETL version
///\ingroup utilities
#define ETL_VERSION "11.14.2"
#define ETL_VERSION_W L"11.14.2"
#define ETL_VERSION_U16 u"11.14.2"
#define ETL_VERSION_U32 U"11.14.2"
#define ETL_VERSION "11.14.3"
#define ETL_VERSION_W L"11.14.3"
#define ETL_VERSION_U16 u"11.14.3"
#define ETL_VERSION_U32 U"11.14.3"
#define ETL_VERSION_MAJOR 11
#define ETL_VERSION_MINOR 14
#define ETL_VERSION_PATCH 2
#define ETL_VERSION_PATCH 3
#define ETL_VERSION_VALUE ((ETL_VERSION_MAJOR * 10000) + (ETL_VERSION_MINOR * 100) + ETL_VERSION_PATCH)
#endif

View File

@ -28,8 +28,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
******************************************************************************/
#include "platform.h"
#include "binary.h"
#include "etl/platform.h"
#include "etl/binary.h"
namespace etl
{

View File

@ -30,7 +30,7 @@ SOFTWARE.
#include <stdint.h>
#include "platform.h"
#include "etl/platform.h"
namespace etl
{

View File

@ -30,7 +30,7 @@ SOFTWARE.
#include <stdint.h>
#include "platform.h"
#include "etl/platform.h"
namespace etl
{

View File

@ -30,7 +30,7 @@ SOFTWARE.
#include <stdint.h>
#include "platform.h"
#include "etl/platform.h"
namespace etl
{

View File

@ -30,7 +30,7 @@ SOFTWARE.
#include <stdint.h>
#include "platform.h"
#include "etl/platform.h"
namespace etl
{

View File

@ -30,7 +30,7 @@ SOFTWARE.
#include <stdint.h>
#include "platform.h"
#include "etl/platform.h"
namespace etl
{

View File

@ -30,7 +30,7 @@ SOFTWARE.
#include <stdint.h>
#include "platform.h"
#include "etl/platform.h"
namespace etl
{

View File

@ -30,8 +30,8 @@ SOFTWARE.
#include <stdint.h>
#include "platform.h"
#include "static_assert.h"
#include "etl/platform.h"
#include "etl/static_assert.h"
ETL_STATIC_ASSERT(ETL_8BIT_SUPPORT, "This file does not currently support targets with no 8bit type");

View File

@ -28,9 +28,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
******************************************************************************/
#include "platform.h"
#include "error_handler.h"
#include "nullptr.h"
#include "etl/platform.h"
#include "etl/error_handler.h"
#include "etl/nullptr.h"
//*****************************************************************************
/// The error function callback pointer.

View File

@ -30,8 +30,8 @@ SOFTWARE.
#include <stdint.h>
#include "platform.h"
#include "static_assert.h"
#include "etl/platform.h"
#include "etl/static_assert.h"
ETL_STATIC_ASSERT(ETL_8BIT_SUPPORT, "This file does not currently support targets with no 8bit type");

View File

@ -28,8 +28,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
******************************************************************************/
#include "platform.h"
#include "random.h"
#include "etl/platform.h"
#include "etl/random.h"
namespace etl
{

View File

@ -61,18 +61,18 @@
</Target>
</Build>
<Compiler>
<Add option="-Wshadow" />
<Add option="-Wundef" />
<Add option="-std=c++11" />
<Add option="-Wall" />
<Add option="-Wunused-parameter" />
<Add option="-Wstrict-aliasing" />
<Add option="-Wshadow" />
<Add option="-Wundef" />
<Add option="-Wall" />
<Add option="-std=c++11" />
<Add option="-fexceptions" />
<Add directory="../../../unittest-cpp/UnitTest++/" />
<Add directory="../../src" />
<Add directory="../" />
<Add directory="../../src/c" />
<Add directory="../../include/etl" />
<Add directory="../../include" />
</Compiler>
<Unit filename="../../../unittest-cpp/UnitTest++/AssertException.cpp" />
<Unit filename="../../../unittest-cpp/UnitTest++/AssertException.h" />

View File

@ -31,7 +31,7 @@ SOFTWARE.
#include <ostream>
#include "instance_count.h"
#include "etl/instance_count.h"
//*****************************************************************************
// Default constructor.

View File

@ -77,9 +77,9 @@ SOFTWARE.
//#define ETL_NO_STL
#ifdef _MSC_VER
#include "profiles/msvc_x86.h"
#include "etl/profiles/msvc_x86.h"
#else
#include "profiles/gcc_windows_x86.h"
#include "etl/profiles/gcc_windows_x86.h"
#endif
#endif

View File

@ -7,7 +7,7 @@
// compile and run any of them on any platform, but your performance with the
// non-native version will be less than optimal.
#include "platform.h"
#include "etl/platform.h"
#ifdef ETL_COMPILER_GCC
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"

View File

@ -10,7 +10,7 @@
// Microsoft Visual Studio
#include "platform.h"
#include "etl/platform.h"
#if defined(ETL_COMPILER_MICROSOFT) && (_MSC_VER < 1600)

View File

@ -28,8 +28,8 @@ SOFTWARE.
#include "UnitTest++.h"
#include "algorithm.h"
#include "container.h"
#include "etl/algorithm.h"
#include "etl/container.h"
#include <vector>
#include <list>

View File

@ -28,8 +28,8 @@ SOFTWARE.
#include "UnitTest++.h"
#include "alignment.h"
#include "type_traits.h"
#include "etl/alignment.h"
#include "etl/type_traits.h"
#include <type_traits>
#include <utility>

View File

@ -28,13 +28,13 @@ SOFTWARE.
#include "UnitTest++.h"
#include "array.h"
#include "etl/array.h"
#include <array>
#include <algorithm>
#include <iterator>
#include "integral_limits.h"
#include "etl/integral_limits.h"
namespace
{

View File

@ -28,8 +28,8 @@ SOFTWARE.
#include "UnitTest++.h"
#include "array_view.h"
#include "array.h"
#include "etl/array_view.h"
#include "etl/array.h"
#include <array>
#include <vector>

View File

@ -28,7 +28,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include "array_wrapper.h"
#include "etl/array_wrapper.h"
namespace
{

View File

@ -28,8 +28,8 @@ SOFTWARE.
#include "UnitTest++.h"
#include "platform.h"
#include "atomic/atomic_std.h"
#include "etl/platform.h"
#include "etl/atomic/atomic_std.h"
#include <atomic>

View File

@ -28,8 +28,8 @@ SOFTWARE.
#include "UnitTest++.h"
#include "platform.h"
#include "atomic/atomic_std.h"
#include "etl/platform.h"
#include "etl/atomic/atomic_std.h"
#include <atomic>

View File

@ -31,10 +31,10 @@ SOFTWARE.
#include <cstdint>
#include <type_traits>
#include "binary.h"
#include "bitset.h"
#include "fnv_1.h"
#include "integral_limits.h"
#include "etl/binary.h"
#include "etl/bitset.h"
#include "etl/fnv_1.h"
#include "etl/integral_limits.h"
// Count bits the easy way.
template <typename T>

View File

@ -32,7 +32,7 @@ SOFTWARE.
#include <type_traits>
#include <bitset>
#include "bitset.h"
#include "etl/bitset.h"
namespace
{

View File

@ -31,14 +31,14 @@ SOFTWARE.
#include <vector>
#include <string.h>
#include "bloom_filter.h"
#include "etl/bloom_filter.h"
#include "fnv_1.h"
#include "crc16.h"
#include "crc16_ccitt.h"
#include "crc32.h"
#include "etl/fnv_1.h"
#include "etl/crc16.h"
#include "etl/crc16_ccitt.h"
#include "etl/crc32.h"
#include "char_traits.h"
#include "etl/char_traits.h"
struct hash1_t
{

View File

@ -33,7 +33,7 @@ SOFTWARE.
#include <vector>
#include <stdint.h>
#include "checksum.h"
#include "etl/checksum.h"
namespace
{

View File

@ -29,7 +29,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include "ExtraCheckMacros.h"
#include "platform.h"
#include "etl/platform.h"
extern "C"
{

View File

@ -29,8 +29,8 @@ SOFTWARE.
#include "UnitTest++.h"
#include "ExtraCheckMacros.h"
#include "callback_timer.h"
#include "function.h"
#include "etl/callback_timer.h"
#include "etl/function.h"
#include <iostream>
#include <vector>

View File

@ -33,7 +33,7 @@ SOFTWARE.
#include <vector>
#include <stdint.h>
#include "checksum.h"
#include "etl/checksum.h"
namespace
{

View File

@ -28,7 +28,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include "compare.h"
#include "etl/compare.h"
namespace
{

View File

@ -28,8 +28,8 @@ SOFTWARE.
#include "UnitTest++.h"
#include "constant.h"
#include "integral_limits.h"
#include "etl/constant.h"
#include "etl/integral_limits.h"
#include <stdint.h>
#include <type_traits>

View File

@ -28,7 +28,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include "container.h"
#include "etl/container.h"
#include <list>

View File

@ -33,12 +33,12 @@ SOFTWARE.
#include <vector>
#include <stdint.h>
#include "crc8_ccitt.h"
#include "crc16.h"
#include "crc16_ccitt.h"
#include "crc16_kermit.h"
#include "crc32.h"
#include "crc64_ecma.h"
#include "etl/crc8_ccitt.h"
#include "etl/crc16.h"
#include "etl/crc16_ccitt.h"
#include "etl/crc16_kermit.h"
#include "etl/crc32.h"
#include "etl/crc64_ecma.h"
namespace
{

View File

@ -30,7 +30,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include "cyclic_value.h"
#include "etl/cyclic_value.h"
namespace
{

View File

@ -28,7 +28,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include "debounce.h"
#include "etl/debounce.h"
namespace
{

View File

@ -29,7 +29,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include "ExtraCheckMacros.h"
#include "deque.h"
#include "etl/deque.h"
#include "data.h"

View File

@ -1,30 +1,30 @@
#include "algorithm.h"
#include "alignment.h"
#include "array.h"
#include "bitset.h"
#include "container.h"
#include "crc8_ccitt.h"
#include "crc16.h"
#include "crc16_ccitt.h"
#include "crc16_kermit.h"
#include "crc32.h"
#include "crc64_ecma.h"
#include "cyclic_value.h"
#include "deque.h"
#include "io_port.h"
#include "vector.h"
#include "variant.h"
#include "list.h"
#include "map.h"
#include "integral_limits.h"
#include "constant.h"
#include "etl/algorithm.h"
#include "etl/alignment.h"
#include "etl/array.h"
#include "etl/bitset.h"
#include "etl/container.h"
#include "etl/crc8_ccitt.h"
#include "etl/crc16.h"
#include "etl/crc16_ccitt.h"
#include "etl/crc16_kermit.h"
#include "etl/crc32.h"
#include "etl/crc64_ecma.h"
#include "etl/cyclic_value.h"
#include "etl/deque.h"
#include "etl/io_port.h"
#include "etl/vector.h"
#include "etl/variant.h"
#include "etl/list.h"
#include "etl/map.h"
#include "etl/integral_limits.h"
#include "etl/constant.h"
#include <algorithm>
#if !defined(ETL_COMPILER_IAR) & !defined(ETL_COMPILER_TI)
#include "stm32f4xx.h"
#include "etl/stm32f4xx.h"
#endif
#if defined(COMPILER_KEIL)

View File

@ -29,7 +29,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include <string>
#include "endianness.h"
#include "etl/endianness.h"
namespace
{

View File

@ -29,7 +29,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include <string>
#include "enum_type.h"
#include "etl/enum_type.h"
struct enum_test
{

View File

@ -33,8 +33,8 @@ SOFTWARE.
#include <sstream>
#include <string>
#include "error_handler.h"
#include "exception.h"
#include "etl/error_handler.h"
#include "etl/exception.h"
bool error_received;

View File

@ -29,7 +29,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include <string>
#include "exception.h"
#include "etl/exception.h"
namespace
{

View File

@ -29,7 +29,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include "ExtraCheckMacros.h"
#include "factory.h"
#include "etl/factory.h"
#include <string>
#include <type_traits>

View File

@ -30,7 +30,7 @@ SOFTWARE.
#include <vector>
#include <ostream>
#include "fixed_iterator.h"
#include "etl/fixed_iterator.h"
template <typename TIterator>
std::ostream& operator << (std::ostream& os, const etl::fixed_iterator<TIterator>& fi)

View File

@ -40,7 +40,7 @@ SOFTWARE.
#include "data.h"
#include "flat_map.h"
#include "etl/flat_map.h"
namespace
{
@ -309,6 +309,7 @@ namespace
CHECK(data.empty());
CHECK_EQUAL(data.capacity(), SIZE);
CHECK_EQUAL(data.max_size(), SIZE);
CHECK(data.begin() == data.end());
}
//*************************************************************************

View File

@ -38,7 +38,7 @@ SOFTWARE.
#include "data.h"
#include "flat_multimap.h"
#include "etl/flat_multimap.h"
namespace
{
@ -286,6 +286,7 @@ namespace
CHECK(data.empty());
CHECK_EQUAL(data.capacity(), SIZE);
CHECK_EQUAL(data.max_size(), SIZE);
CHECK(data.begin() == data.end());
}
//*************************************************************************

View File

@ -38,7 +38,7 @@ SOFTWARE.
#include "data.h"
#include "flat_multiset.h"
#include "etl/flat_multiset.h"
namespace
{
@ -255,6 +255,7 @@ namespace
CHECK(data.empty());
CHECK_EQUAL(data.capacity(), SIZE);
CHECK_EQUAL(data.max_size(), SIZE);
CHECK(data.begin() == data.end());
}
//*************************************************************************

View File

@ -38,7 +38,7 @@ SOFTWARE.
#include "data.h"
#include "flat_set.h"
#include "etl/flat_set.h"
namespace
{
@ -267,6 +267,7 @@ namespace
CHECK(data.empty());
CHECK_EQUAL(data.capacity(), SIZE);
CHECK_EQUAL(data.max_size(), SIZE);
CHECK(data.begin() == data.end());
}
//*************************************************************************

View File

@ -33,7 +33,7 @@ SOFTWARE.
#include <vector>
#include <stdint.h>
#include "fnv_1.h"
#include "etl/fnv_1.h"
namespace
{

View File

@ -31,7 +31,7 @@ SOFTWARE.
#include "data.h"
#include "forward_list.h"
#include "etl/forward_list.h"
#include <algorithm>
#include <array>
@ -87,6 +87,7 @@ namespace
CHECK(data.empty());
CHECK_EQUAL(data.max_size(), SIZE);
CHECK(data.begin() == data.end());
}
//*************************************************************************

View File

@ -28,11 +28,11 @@ SOFTWARE.
#include "UnitTest++.h"
#include "fsm.h"
#include "enum_type.h"
#include "container.h"
#include "packet.h"
#include "queue.h"
#include "etl/fsm.h"
#include "etl/enum_type.h"
#include "etl/container.h"
#include "etl/packet.h"
#include "etl/queue.h"
#include <iostream>

View File

@ -28,7 +28,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include "function.h"
#include "etl/function.h"
//*****************************************************************************
const int VALUE = 1;

View File

@ -28,7 +28,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include "functional.h"
#include "etl/functional.h"
#include <list>
#include <vector>

View File

@ -33,7 +33,7 @@ SOFTWARE.
#include <vector>
#include <stdint.h>
#include "hash.h"
#include "etl/hash.h"
namespace
{

View File

@ -28,7 +28,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include "instance_count.h"
#include "etl/instance_count.h"
#include <list>
#include <vector>

View File

@ -32,7 +32,7 @@ SOFTWARE.
#include <type_traits>
#include <bitset>
#include "integral_limits.h"
#include "etl/integral_limits.h"
namespace
{

View File

@ -31,7 +31,7 @@ SOFTWARE.
#include "data.h"
#include "intrusive_forward_list.h"
#include "etl/intrusive_forward_list.h"
#include <algorithm>
#include <array>

View File

@ -31,7 +31,7 @@ SOFTWARE.
#include "data.h"
#include "intrusive_links.h"
#include "etl/intrusive_links.h"
namespace
{

View File

@ -31,7 +31,7 @@ SOFTWARE.
#include "data.h"
#include "intrusive_list.h"
#include "etl/intrusive_list.h"
#include <algorithm>
#include <array>

View File

@ -28,8 +28,8 @@ SOFTWARE.
#include "UnitTest++.h"
#include "intrusive_queue.h"
#include "intrusive_links.h"
#include "etl/intrusive_queue.h"
#include "etl/intrusive_links.h"
#include <vector>

View File

@ -28,8 +28,8 @@ SOFTWARE.
#include "UnitTest++.h"
#include "intrusive_stack.h"
#include "intrusive_links.h"
#include "etl/intrusive_stack.h"
#include "etl/intrusive_links.h"
#include <vector>

View File

@ -28,7 +28,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include "io_port.h"
#include "etl/io_port.h"
#include <stdint.h>
#include <array>

View File

@ -28,7 +28,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include "iterator.h"
#include "etl/iterator.h"
//#include <iterator>

View File

@ -33,7 +33,7 @@ SOFTWARE.
#include <vector>
#include <stdint.h>
#include "jenkins.h"
#include "etl/jenkins.h"
template <typename TIterator>
uint32_t jenkins(TIterator begin, TIterator end)

View File

@ -28,7 +28,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include "largest.h"
#include "etl/largest.h"
#include <type_traits>

View File

@ -29,7 +29,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include "ExtraCheckMacros.h"
#include "list.h"
#include "etl/list.h"
#include "data.h"
@ -98,6 +98,7 @@ namespace
CHECK_EQUAL(data.size(), size_t(0));
CHECK(data.empty());
CHECK_EQUAL(data.max_size(), SIZE);
CHECK(data.begin() == data.end());
}
//*************************************************************************

View File

@ -36,7 +36,7 @@ SOFTWARE.
#include <string>
#include <vector>
#include "map.h"
#include "etl/map.h"
static const size_t MAX_SIZE = 10;
@ -181,6 +181,7 @@ namespace
CHECK(data.empty());
CHECK_EQUAL(data.capacity(), MAX_SIZE);
CHECK_EQUAL(data.max_size(), MAX_SIZE);
CHECK(data.begin() == data.end());
}
//*************************************************************************

View File

@ -28,13 +28,13 @@ SOFTWARE.
#include "UnitTest++.h"
#include "log.h"
#include "power.h"
#include "fibonacci.h"
#include "factorial.h"
#include "sqrt.h"
#include "permutations.h"
#include "combinations.h"
#include "etl/log.h"
#include "etl/power.h"
#include "etl/fibonacci.h"
#include "etl/factorial.h"
#include "etl/sqrt.h"
#include "etl/permutations.h"
#include "etl/combinations.h"
namespace
{

View File

@ -28,8 +28,8 @@ SOFTWARE.
#include "UnitTest++.h"
#include "memory.h"
#include "debug_count.h"
#include "etl/memory.h"
#include "etl/debug_count.h"
#include <string>
#include <array>

View File

@ -29,11 +29,11 @@ SOFTWARE.
#include "UnitTest++.h"
#include "ExtraCheckMacros.h"
#include "message_router.h"
#include "message_bus.h"
#include "queue.h"
#include "largest.h"
#include "packet.h"
#include "etl/message_router.h"
#include "etl/message_bus.h"
#include "etl/queue.h"
#include "etl/largest.h"
#include "etl/packet.h"
//***************************************************************************
// The set of messages.

View File

@ -29,10 +29,10 @@ SOFTWARE.
#include "UnitTest++.h"
#include "ExtraCheckMacros.h"
#include "message_router.h"
#include "queue.h"
#include "largest.h"
#include "packet.h"
#include "etl/message_router.h"
#include "etl/queue.h"
#include "etl/largest.h"
#include "etl/packet.h"
//***************************************************************************
// The set of messages.

View File

@ -29,9 +29,9 @@ SOFTWARE.
#include "UnitTest++.h"
#include "ExtraCheckMacros.h"
#include "message_router.h"
#include "message_bus.h"
#include "message_timer.h"
#include "etl/message_router.h"
#include "etl/message_bus.h"
#include "etl/message_timer.h"
#include <iostream>
#include <vector>

View File

@ -35,7 +35,7 @@ SOFTWARE.
#include <iterator>
#include <string>
#include "multimap.h"
#include "etl/multimap.h"
static const size_t MAX_SIZE = 10;
@ -181,6 +181,7 @@ namespace
CHECK(data.empty());
CHECK_EQUAL(data.capacity(), MAX_SIZE);
CHECK_EQUAL(data.max_size(), MAX_SIZE);
CHECK(data.begin() == data.end());
}
//*************************************************************************

View File

@ -35,7 +35,7 @@ SOFTWARE.
#include <iterator>
#include <string>
#include "multiset.h"
#include "etl/multiset.h"
static const size_t MAX_SIZE = 10;
@ -173,6 +173,7 @@ namespace
CHECK(data.empty());
CHECK_EQUAL(data.capacity(), MAX_SIZE);
CHECK_EQUAL(data.max_size(), MAX_SIZE);
CHECK(data.begin() == data.end());
}
//*************************************************************************

View File

@ -35,7 +35,7 @@ SOFTWARE.
#include <vector>
#include <stdint.h>
#include "murmur3.h"
#include "etl/murmur3.h"
namespace
{

View File

@ -31,7 +31,7 @@ SOFTWARE.
#undef min
#undef max
#include "../include/etl/stl/alternate/algorithm.h"
#include "etl/stl/alternate/algorithm.h"
#include <algorithm>
#include <vector>

View File

@ -31,7 +31,7 @@ SOFTWARE.
#undef min
#undef max
#include "../include/etl/stl/alternate/functional.h"
#include "etl/stl/alternate/functional.h"
namespace
{

View File

@ -28,7 +28,7 @@ SOFTWARE.
#include "UnitTest++.h"
#include "../include/etl/stl/alternate/limits.h"
#include "etl/stl/alternate/limits.h"
#include <limits>

View File

@ -31,7 +31,7 @@ SOFTWARE.
#undef min
#undef max
#include "../include/etl/stl/alternate/utility.h"
#include "etl/stl/alternate/utility.h"
namespace
{

Some files were not shown because too many files have changed in this diff Show More