Merge remote-tracking branch 'origin/development'

This commit is contained in:
John Wellbelove 2017-05-09 20:54:31 +01:00
commit 383525aa4e
14 changed files with 617 additions and 547 deletions

View File

@ -27,7 +27,7 @@
27 string_base
28 intrusive_stack
29 intrusive_queue
30 intrusive_flat_map
31 intrusive_flat_multimap
32 intrusive_flat_set
33 intrusive_flat_multiset
30 reference_flat_map
31 reference_flat_multimap
32 reference_flat_set
33 reference_flat_multiset

View File

@ -28,8 +28,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
******************************************************************************/
#ifndef __ETL_INTRUSIVE_FLAT_MAP__
#define __ETL_INTRUSIVE_FLAT_MAP__
#ifndef __ETL_REFERENCE_FLAT_MAP__
#define __ETL_REFERENCE_FLAT_MAP__
#include <stddef.h>
@ -41,8 +41,8 @@ SOFTWARE.
#define ETL_FILE "30"
//*****************************************************************************
///\defgroup intrusive_flat_map intrusive_flat_map
/// An intrusive_flat_map with the capacity defined at compile time.
///\defgroup reference_flat_map reference_flat_map
/// An reference_flat_map with the capacity defined at compile time.
/// Has insertion of O(N) and search of O(logN)
/// Duplicate entries are not allowed.
///\ingroup containers
@ -51,54 +51,54 @@ SOFTWARE.
namespace etl
{
//***************************************************************************
///\ingroup intrusive_flat_map
/// Exception base for intrusive_flat_maps
///\ingroup reference_flat_map
/// Exception base for reference_flat_maps
//***************************************************************************
class intrusive_flat_map_exception : public exception
class reference_flat_map_exception : public exception
{
public:
intrusive_flat_map_exception(string_type what, string_type file_name, numeric_type line_number)
reference_flat_map_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
{
}
};
//***************************************************************************
///\ingroup intrusive_flat_map
///\ingroup reference_flat_map
/// Vector full exception.
//***************************************************************************
class intrusive_flat_map_full : public intrusive_flat_map_exception
class reference_flat_map_full : public reference_flat_map_exception
{
public:
intrusive_flat_map_full(string_type file_name, numeric_type line_number)
: intrusive_flat_map_exception(ETL_ERROR_TEXT("intrusive_flat_map: full", ETL_FILE"A"), file_name, line_number)
reference_flat_map_full(string_type file_name, numeric_type line_number)
: reference_flat_map_exception(ETL_ERROR_TEXT("reference_flat_map: full", ETL_FILE"A"), file_name, line_number)
{
}
};
//***************************************************************************
///\ingroup intrusive_flat_map
///\ingroup reference_flat_map
/// Vector out of bounds exception.
//***************************************************************************
class intrusive_flat_map_out_of_bounds : public intrusive_flat_map_exception
class reference_flat_map_out_of_bounds : public reference_flat_map_exception
{
public:
intrusive_flat_map_out_of_bounds(string_type file_name, numeric_type line_number)
: intrusive_flat_map_exception(ETL_ERROR_TEXT("intrusive_flat_map:bounds", ETL_FILE"B"), file_name, line_number)
reference_flat_map_out_of_bounds(string_type file_name, numeric_type line_number)
: reference_flat_map_exception(ETL_ERROR_TEXT("reference_flat_map:bounds", ETL_FILE"B"), file_name, line_number)
{
}
};
//***************************************************************************
/// The base class for specifically sized intrusive_flat_maps.
/// Can be used as a reference type for all intrusive_flat_maps containing a specific type.
///\ingroup intrusive_flat_map
/// The base class for specifically sized reference_flat_maps.
/// Can be used as a reference type for all reference_flat_maps containing a specific type.
///\ingroup reference_flat_map
//***************************************************************************
template <typename TKey, typename TMapped, typename TKeyCompare = std::less<TKey> >
class iintrusive_flat_map
class ireference_flat_map
{
public:
@ -124,7 +124,7 @@ namespace etl
{
public:
friend class iintrusive_flat_map;
friend class ireference_flat_map;
iterator()
{
@ -222,7 +222,7 @@ namespace etl
{
public:
friend class iintrusive_flat_map;
friend class ireference_flat_map;
const_iterator()
{
@ -342,8 +342,8 @@ namespace etl
public:
//*********************************************************************
/// Returns an iterator to the beginning of the intrusive_flat_map.
///\return An iterator to the beginning of the intrusive_flat_map.
/// Returns an iterator to the beginning of the reference_flat_map.
///\return An iterator to the beginning of the reference_flat_map.
//*********************************************************************
iterator begin()
{
@ -351,8 +351,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const_iterator to the beginning of the intrusive_flat_map.
///\return A const iterator to the beginning of the intrusive_flat_map.
/// Returns a const_iterator to the beginning of the reference_flat_map.
///\return A const iterator to the beginning of the reference_flat_map.
//*********************************************************************
const_iterator begin() const
{
@ -360,8 +360,8 @@ namespace etl
}
//*********************************************************************
/// Returns an iterator to the end of the intrusive_flat_map.
///\return An iterator to the end of the intrusive_flat_map.
/// Returns an iterator to the end of the reference_flat_map.
///\return An iterator to the end of the reference_flat_map.
//*********************************************************************
iterator end()
{
@ -369,8 +369,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const_iterator to the end of the intrusive_flat_map.
///\return A const iterator to the end of the intrusive_flat_map.
/// Returns a const_iterator to the end of the reference_flat_map.
///\return A const iterator to the end of the reference_flat_map.
//*********************************************************************
const_iterator end() const
{
@ -378,8 +378,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const_iterator to the beginning of the intrusive_flat_map.
///\return A const iterator to the beginning of the intrusive_flat_map.
/// Returns a const_iterator to the beginning of the reference_flat_map.
///\return A const iterator to the beginning of the reference_flat_map.
//*********************************************************************
const_iterator cbegin() const
{
@ -387,8 +387,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const_iterator to the end of the intrusive_flat_map.
///\return A const iterator to the end of the intrusive_flat_map.
/// Returns a const_iterator to the end of the reference_flat_map.
///\return A const iterator to the end of the reference_flat_map.
//*********************************************************************
const_iterator cend() const
{
@ -396,8 +396,8 @@ namespace etl
}
//*********************************************************************
/// Returns an reverse iterator to the reverse beginning of the intrusive_flat_map.
///\return Iterator to the reverse beginning of the intrusive_flat_map.
/// Returns an reverse iterator to the reverse beginning of the reference_flat_map.
///\return Iterator to the reverse beginning of the reference_flat_map.
//*********************************************************************
reverse_iterator rbegin()
{
@ -405,8 +405,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const reverse iterator to the reverse beginning of the intrusive_flat_map.
///\return Const iterator to the reverse beginning of the intrusive_flat_map.
/// Returns a const reverse iterator to the reverse beginning of the reference_flat_map.
///\return Const iterator to the reverse beginning of the reference_flat_map.
//*********************************************************************
const_reverse_iterator rbegin() const
{
@ -414,8 +414,8 @@ namespace etl
}
//*********************************************************************
/// Returns a reverse iterator to the end + 1 of the intrusive_flat_map.
///\return Reverse iterator to the end + 1 of the intrusive_flat_map.
/// Returns a reverse iterator to the end + 1 of the reference_flat_map.
///\return Reverse iterator to the end + 1 of the reference_flat_map.
//*********************************************************************
reverse_iterator rend()
{
@ -423,8 +423,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const reverse iterator to the end + 1 of the intrusive_flat_map.
///\return Const reverse iterator to the end + 1 of the intrusive_flat_map.
/// Returns a const reverse iterator to the end + 1 of the reference_flat_map.
///\return Const reverse iterator to the end + 1 of the reference_flat_map.
//*********************************************************************
const_reverse_iterator rend() const
{
@ -432,8 +432,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const reverse iterator to the reverse beginning of the intrusive_flat_map.
///\return Const reverse iterator to the reverse beginning of the intrusive_flat_map.
/// Returns a const reverse iterator to the reverse beginning of the reference_flat_map.
///\return Const reverse iterator to the reverse beginning of the reference_flat_map.
//*********************************************************************
const_reverse_iterator crbegin() const
{
@ -441,8 +441,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const reverse iterator to the end + 1 of the intrusive_flat_map.
///\return Const reverse iterator to the end + 1 of the intrusive_flat_map.
/// Returns a const reverse iterator to the end + 1 of the reference_flat_map.
///\return Const reverse iterator to the end + 1 of the reference_flat_map.
//*********************************************************************
const_reverse_iterator crend() const
{
@ -458,7 +458,7 @@ namespace etl
{
iterator i_element = lower_bound(key);
ETL_ASSERT(i_element != end(), ETL_ERROR(intrusive_flat_map_out_of_bounds));
ETL_ASSERT(i_element != end(), ETL_ERROR(reference_flat_map_out_of_bounds));
return i_element->second;
}
@ -472,7 +472,7 @@ namespace etl
{
iterator i_element = lower_bound(key);
ETL_ASSERT(i_element != end(), ETL_ERROR(intrusive_flat_map_out_of_bounds));
ETL_ASSERT(i_element != end(), ETL_ERROR(reference_flat_map_out_of_bounds));
return i_element->second;
}
@ -487,7 +487,7 @@ namespace etl
{
iterator i_element = lower_bound(key);
ETL_ASSERT(i_element != end(), ETL_ERROR(intrusive_flat_map_out_of_bounds));
ETL_ASSERT(i_element != end(), ETL_ERROR(reference_flat_map_out_of_bounds));
return i_element->second;
}
@ -502,14 +502,14 @@ namespace etl
{
const_iterator i_element = lower_bound(key);
ETL_ASSERT(i_element != end(), ETL_ERROR(intrusive_flat_map_out_of_bounds));
ETL_ASSERT(i_element != end(), ETL_ERROR(reference_flat_map_out_of_bounds));
return i_element->second;
}
//*********************************************************************
/// Assigns values to the intrusive_flat_map.
/// If ETL_THROW_EXCEPTIONS & _DEBUG are defined, emits flat_map_full if the intrusive_flat_map does not have enough free space.
/// Assigns values to the reference_flat_map.
/// If ETL_THROW_EXCEPTIONS & _DEBUG are defined, emits flat_map_full if the reference_flat_map does not have enough free space.
/// If ETL_THROW_EXCEPTIONS & _DEBUG are defined, emits flat_map_iterator if the iterators are reversed.
///\param first The iterator to the first element.
///\param last The iterator to the last element + 1.
@ -519,7 +519,7 @@ namespace etl
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(intrusive_flat_map_full));
ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(reference_flat_map_full));
#endif
clear();
@ -531,8 +531,8 @@ namespace etl
}
//*********************************************************************
/// Inserts a value to the intrusive_flat_map.
/// If asserts or exceptions are enabled, emits flat_map_full if the intrusive_flat_map is already full.
/// Inserts a value to the reference_flat_map.
/// If asserts or exceptions are enabled, emits flat_map_full if the reference_flat_map is already full.
///\param value The value to insert.
//*********************************************************************
std::pair<iterator, bool> insert(value_type& value)
@ -543,8 +543,8 @@ namespace etl
}
//*********************************************************************
/// Inserts a value to the intrusive_flat_map.
/// If asserts or exceptions are enabled, emits flat_map_full if the intrusive_flat_map is already full.
/// Inserts a value to the reference_flat_map.
/// If asserts or exceptions are enabled, emits flat_map_full if the reference_flat_map is already full.
///\param position The position to insert at.
///\param value The value to insert.
//*********************************************************************
@ -554,8 +554,8 @@ namespace etl
}
//*********************************************************************
/// Inserts a range of values to the intrusive_flat_map.
/// If asserts or exceptions are enabled, emits flat_map_full if the intrusive_flat_map does not have enough free space.
/// Inserts a range of values to the reference_flat_map.
/// If asserts or exceptions are enabled, emits flat_map_full if the reference_flat_map does not have enough free space.
///\param position The position to insert at.
///\param first The first element to add.
///\param last The last + 1 element to add.
@ -611,7 +611,7 @@ namespace etl
}
//*************************************************************************
/// Clears the intrusive_flat_map.
/// Clears the reference_flat_map.
//*************************************************************************
void clear()
{
@ -741,8 +741,8 @@ namespace etl
}
//*************************************************************************
/// Gets the current size of the intrusive_flat_map.
///\return The current size of the intrusive_flat_map.
/// Gets the current size of the reference_flat_map.
///\return The current size of the reference_flat_map.
//*************************************************************************
size_type size() const
{
@ -750,7 +750,7 @@ namespace etl
}
//*************************************************************************
/// Checks the 'empty' state of the intrusive_flat_map.
/// Checks the 'empty' state of the reference_flat_map.
///\return <b>true</b> if empty.
//*************************************************************************
bool empty() const
@ -759,7 +759,7 @@ namespace etl
}
//*************************************************************************
/// Checks the 'full' state of the intrusive_flat_map.
/// Checks the 'full' state of the reference_flat_map.
///\return <b>true</b> if full.
//*************************************************************************
bool full() const
@ -768,8 +768,8 @@ namespace etl
}
//*************************************************************************
/// Returns the capacity of the intrusive_flat_map.
///\return The capacity of the intrusive_flat_map.
/// Returns the capacity of the reference_flat_map.
///\return The capacity of the reference_flat_map.
//*************************************************************************
size_type capacity() const
{
@ -777,8 +777,8 @@ namespace etl
}
//*************************************************************************
/// Returns the maximum possible size of the intrusive_flat_map.
///\return The maximum size of the intrusive_flat_map.
/// Returns the maximum possible size of the reference_flat_map.
///\return The maximum size of the reference_flat_map.
//*************************************************************************
size_type max_size() const
{
@ -799,7 +799,7 @@ namespace etl
//*********************************************************************
/// Constructor.
//*********************************************************************
iintrusive_flat_map(lookup_t& lookup_)
ireference_flat_map(lookup_t& lookup_)
: lookup(lookup_)
{
}
@ -807,7 +807,7 @@ namespace etl
private:
//*********************************************************************
/// Inserts a value to the intrusive_flat_map.
/// Inserts a value to the reference_flat_map.
///\param i_element The place to insert.
///\param value The value to insert.
//*********************************************************************
@ -818,7 +818,7 @@ namespace etl
if (i_element == end())
{
// At the end.
ETL_ASSERT(!lookup.full(), ETL_ERROR(intrusive_flat_map_full));
ETL_ASSERT(!lookup.full(), ETL_ERROR(reference_flat_map_full));
lookup.push_back(&value);
result.first = --end();
@ -833,7 +833,7 @@ namespace etl
if (value.first != i_element->first)
{
// A new one.
ETL_ASSERT(!lookup.full(), ETL_ERROR(intrusive_flat_map_full));
ETL_ASSERT(!lookup.full(), ETL_ERROR(reference_flat_map_full));
lookup.insert(i_element.ilookup, &value);
result.second = true;
}
@ -843,48 +843,48 @@ namespace etl
}
// Disable copy construction and assignment.
iintrusive_flat_map(const iintrusive_flat_map&);
iintrusive_flat_map& operator = (const iintrusive_flat_map&);
ireference_flat_map(const ireference_flat_map&);
ireference_flat_map& operator = (const ireference_flat_map&);
lookup_t& lookup;
};
//***************************************************************************
/// Equal operator.
///\param lhs Reference to the first intrusive_flat_map.
///\param rhs Reference to the second intrusive_flat_map.
///\param lhs Reference to the first reference_flat_map.
///\param rhs Reference to the second reference_flat_map.
///\return <b>true</b> if the arrays are equal, otherwise <b>false</b>
///\ingroup intrusive_flat_map
///\ingroup reference_flat_map
//***************************************************************************
template <typename TKey, typename TMapped, typename TKeyCompare>
bool operator ==(const etl::iintrusive_flat_map<TKey, TMapped, TKeyCompare>& lhs, const etl::iintrusive_flat_map<TKey, TMapped, TKeyCompare>& rhs)
bool operator ==(const etl::ireference_flat_map<TKey, TMapped, TKeyCompare>& lhs, const etl::ireference_flat_map<TKey, TMapped, TKeyCompare>& rhs)
{
return (lhs.size() == rhs.size()) && std::equal(lhs.begin(), lhs.end(), rhs.begin());
}
//***************************************************************************
/// Not equal operator.
///\param lhs Reference to the first intrusive_flat_map.
///\param rhs Reference to the second intrusive_flat_map.
///\param lhs Reference to the first reference_flat_map.
///\param rhs Reference to the second reference_flat_map.
///\return <b>true</b> if the arrays are not equal, otherwise <b>false</b>
///\ingroup intrusive_flat_map
///\ingroup reference_flat_map
//***************************************************************************
template <typename TKey, typename TMapped, typename TKeyCompare>
bool operator !=(const etl::iintrusive_flat_map<TKey, TMapped, TKeyCompare>& lhs, const etl::iintrusive_flat_map<TKey, TMapped, TKeyCompare>& rhs)
bool operator !=(const etl::ireference_flat_map<TKey, TMapped, TKeyCompare>& lhs, const etl::ireference_flat_map<TKey, TMapped, TKeyCompare>& rhs)
{
return !(lhs == rhs);
}
//***************************************************************************
/// A intrusive_flat_map implementation that uses a fixed size buffer.
/// A reference_flat_map implementation that uses a fixed size buffer.
///\tparam TKey The key type.
///\tparam TValue The value type.
///\tparam TCompare The type to compare keys. Default = std::less<TKey>
///\tparam MAX_SIZE_ The maximum number of elements that can be stored.
///\ingroup intrusive_flat_map
///\ingroup reference_flat_map
//***************************************************************************
template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = std::less<TKey> >
class intrusive_flat_map : public iintrusive_flat_map<TKey, TValue, TCompare>
class reference_flat_map : public ireference_flat_map<TKey, TValue, TCompare>
{
public:
@ -893,8 +893,8 @@ namespace etl
//*************************************************************************
/// Constructor.
//*************************************************************************
intrusive_flat_map()
: iintrusive_flat_map<TKey, TValue, TCompare>(lookup)
reference_flat_map()
: ireference_flat_map<TKey, TValue, TCompare>(lookup)
{
}
@ -905,28 +905,28 @@ namespace etl
///\param last The iterator to the last element + 1.
//*************************************************************************
template <typename TIterator>
intrusive_flat_map(TIterator first, TIterator last)
: iintrusive_flat_map<TKey, TValue, TCompare>(lookup)
reference_flat_map(TIterator first, TIterator last)
: ireference_flat_map<TKey, TValue, TCompare>(lookup)
{
iintrusive_flat_map<TKey, TValue, TCompare>::assign(first, last);
ireference_flat_map<TKey, TValue, TCompare>::assign(first, last);
}
//*************************************************************************
/// Destructor.
//*************************************************************************
~intrusive_flat_map()
~reference_flat_map()
{
iintrusive_flat_map<TKey, TValue, TCompare>::clear();
ireference_flat_map<TKey, TValue, TCompare>::clear();
}
//*************************************************************************
/// Assignment operator.
//*************************************************************************
intrusive_flat_map& operator = (const intrusive_flat_map& rhs)
reference_flat_map& operator = (const reference_flat_map& rhs)
{
if (&rhs != this)
{
iintrusive_flat_map<TKey, TValue, TCompare>::assign(rhs.cbegin(), rhs.cend());
ireference_flat_map<TKey, TValue, TCompare>::assign(rhs.cbegin(), rhs.cend());
}
return *this;
@ -934,9 +934,9 @@ namespace etl
private:
intrusive_flat_map(const intrusive_flat_map&);
reference_flat_map(const reference_flat_map&);
typedef typename iintrusive_flat_map<TKey, TValue, TCompare>::value_type node_t;
typedef typename ireference_flat_map<TKey, TValue, TCompare>::value_type node_t;
// The vector that stores pointers to the nodes.
etl::vector<node_t*, MAX_SIZE> lookup;

View File

@ -28,8 +28,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
******************************************************************************/
#ifndef __ETL_INTRUSIVE_FLAT_MULTIMAP_BASE__
#define __ETL_INTRUSIVE_FLAT_MULTIMAP_BASE__
#ifndef __ETL_REFERENCE_FLAT_MULTIMAP_BASE__
#define __ETL_REFERENCE_FLAT_MULTIMAP_BASE__
#include <stddef.h>
@ -44,40 +44,40 @@ SOFTWARE.
namespace etl
{
//***************************************************************************
///\ingroup intrusive_flat_multimap
/// Exception base for intrusive_flat_multimaps
///\ingroup reference_flat_multimap
/// Exception base for reference_flat_multimaps
//***************************************************************************
class intrusive_flat_multimap_exception : public exception
class reference_flat_multimap_exception : public exception
{
public:
intrusive_flat_multimap_exception(string_type what, string_type file_name, numeric_type line_number)
reference_flat_multimap_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
{
}
};
//***************************************************************************
///\ingroup intrusive_flat_multimap
///\ingroup reference_flat_multimap
/// Vector full exception.
//***************************************************************************
class intrusive_flat_multimap_full : public intrusive_flat_multimap_exception
class reference_flat_multimap_full : public reference_flat_multimap_exception
{
public:
intrusive_flat_multimap_full(string_type file_name, numeric_type line_number)
: intrusive_flat_multimap_exception(ETL_ERROR_TEXT("intrusive_flat_multimap:full", ETL_FILE"A"), file_name, line_number)
reference_flat_multimap_full(string_type file_name, numeric_type line_number)
: reference_flat_multimap_exception(ETL_ERROR_TEXT("reference_flat_multimap:full", ETL_FILE"A"), file_name, line_number)
{
}
};
//***************************************************************************
/// The base class for specifically sized intrusive_flat_multimaps.
/// Can be used as a reference type for all intrusive_flat_multimaps containing a specific type.
///\ingroup intrusive_flat_multimap
/// The base class for specifically sized reference_flat_multimaps.
/// Can be used as a reference type for all reference_flat_multimaps containing a specific type.
///\ingroup reference_flat_multimap
//***************************************************************************
template <typename TKey, typename TMapped, typename TKeyCompare = std::less<TKey> >
class iintrusive_flat_multimap
class ireference_flat_multimap
{
public:
@ -103,7 +103,7 @@ namespace etl
{
public:
friend class iintrusive_flat_multimap;
friend class ireference_flat_multimap;
iterator()
{
@ -201,7 +201,7 @@ namespace etl
{
public:
friend class iintrusive_flat_multimap;
friend class ireference_flat_multimap;
const_iterator()
{
@ -321,8 +321,8 @@ namespace etl
public:
//*********************************************************************
/// Returns an iterator to the beginning of the intrusive_flat_multimap.
///\return An iterator to the beginning of the intrusive_flat_multimap.
/// Returns an iterator to the beginning of the reference_flat_multimap.
///\return An iterator to the beginning of the reference_flat_multimap.
//*********************************************************************
iterator begin()
{
@ -330,8 +330,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const_iterator to the beginning of the intrusive_flat_multimap.
///\return A const iterator to the beginning of the intrusive_flat_multimap.
/// Returns a const_iterator to the beginning of the reference_flat_multimap.
///\return A const iterator to the beginning of the reference_flat_multimap.
//*********************************************************************
const_iterator begin() const
{
@ -339,8 +339,8 @@ namespace etl
}
//*********************************************************************
/// Returns an iterator to the end of the intrusive_flat_multimap.
///\return An iterator to the end of the intrusive_flat_multimap.
/// Returns an iterator to the end of the reference_flat_multimap.
///\return An iterator to the end of the reference_flat_multimap.
//*********************************************************************
iterator end()
{
@ -348,8 +348,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const_iterator to the end of the intrusive_flat_multimap.
///\return A const iterator to the end of the intrusive_flat_multimap.
/// Returns a const_iterator to the end of the reference_flat_multimap.
///\return A const iterator to the end of the reference_flat_multimap.
//*********************************************************************
const_iterator end() const
{
@ -357,8 +357,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const_iterator to the beginning of the intrusive_flat_multimap.
///\return A const iterator to the beginning of the intrusive_flat_multimap.
/// Returns a const_iterator to the beginning of the reference_flat_multimap.
///\return A const iterator to the beginning of the reference_flat_multimap.
//*********************************************************************
const_iterator cbegin() const
{
@ -366,8 +366,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const_iterator to the end of the intrusive_flat_multimap.
///\return A const iterator to the end of the intrusive_flat_multimap.
/// Returns a const_iterator to the end of the reference_flat_multimap.
///\return A const iterator to the end of the reference_flat_multimap.
//*********************************************************************
const_iterator cend() const
{
@ -375,8 +375,8 @@ namespace etl
}
//*********************************************************************
/// Returns an reverse iterator to the reverse beginning of the intrusive_flat_multimap.
///\return Iterator to the reverse beginning of the intrusive_flat_multimap.
/// Returns an reverse iterator to the reverse beginning of the reference_flat_multimap.
///\return Iterator to the reverse beginning of the reference_flat_multimap.
//*********************************************************************
reverse_iterator rbegin()
{
@ -384,8 +384,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const reverse iterator to the reverse beginning of the intrusive_flat_multimap.
///\return Const iterator to the reverse beginning of the intrusive_flat_multimap.
/// Returns a const reverse iterator to the reverse beginning of the reference_flat_multimap.
///\return Const iterator to the reverse beginning of the reference_flat_multimap.
//*********************************************************************
const_reverse_iterator rbegin() const
{
@ -393,8 +393,8 @@ namespace etl
}
//*********************************************************************
/// Returns a reverse iterator to the end + 1 of the intrusive_flat_multimap.
///\return Reverse iterator to the end + 1 of the intrusive_flat_multimap.
/// Returns a reverse iterator to the end + 1 of the reference_flat_multimap.
///\return Reverse iterator to the end + 1 of the reference_flat_multimap.
//*********************************************************************
reverse_iterator rend()
{
@ -402,8 +402,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const reverse iterator to the end + 1 of the intrusive_flat_multimap.
///\return Const reverse iterator to the end + 1 of the intrusive_flat_multimap.
/// Returns a const reverse iterator to the end + 1 of the reference_flat_multimap.
///\return Const reverse iterator to the end + 1 of the reference_flat_multimap.
//*********************************************************************
const_reverse_iterator rend() const
{
@ -411,8 +411,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const reverse iterator to the reverse beginning of the intrusive_flat_multimap.
///\return Const reverse iterator to the reverse beginning of the intrusive_flat_multimap.
/// Returns a const reverse iterator to the reverse beginning of the reference_flat_multimap.
///\return Const reverse iterator to the reverse beginning of the reference_flat_multimap.
//*********************************************************************
const_reverse_iterator crbegin() const
{
@ -420,8 +420,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const reverse iterator to the end + 1 of the intrusive_flat_multimap.
///\return Const reverse iterator to the end + 1 of the intrusive_flat_multimap.
/// Returns a const reverse iterator to the end + 1 of the reference_flat_multimap.
///\return Const reverse iterator to the end + 1 of the reference_flat_multimap.
//*********************************************************************
const_reverse_iterator crend() const
{
@ -429,9 +429,9 @@ namespace etl
}
//*********************************************************************
/// Assigns values to the intrusive_flat_multimap.
/// If asserts or exceptions are enabled, emits intrusive_flat_multimap_full if the intrusive_flat_multimap does not have enough free space.
/// If asserts or exceptions are enabled, emits intrusive_flat_multimap_iterator if the iterators are reversed.
/// Assigns values to the reference_flat_multimap.
/// If asserts or exceptions are enabled, emits reference_flat_multimap_full if the reference_flat_multimap does not have enough free space.
/// If asserts or exceptions are enabled, emits reference_flat_multimap_iterator if the iterators are reversed.
///\param first The iterator to the first element.
///\param last The iterator to the last element + 1.
//*********************************************************************
@ -440,7 +440,7 @@ namespace etl
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(intrusive_flat_multimap_full));
ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(reference_flat_multimap_full));
#endif
clear();
@ -452,13 +452,13 @@ namespace etl
}
//*********************************************************************
/// Inserts a value to the intrusive_flat_multimap.
/// If asserts or exceptions are enabled, emits intrusive_flat_multimap_full if the intrusive_flat_multimap is already full.
/// Inserts a value to the reference_flat_multimap.
/// If asserts or exceptions are enabled, emits reference_flat_multimap_full if the reference_flat_multimap is already full.
///\param value The value to insert.
//*********************************************************************
std::pair<iterator, bool> insert(value_type& value)
{
ETL_ASSERT(!lookup.full(), ETL_ERROR(intrusive_flat_multimap_full));
ETL_ASSERT(!lookup.full(), ETL_ERROR(reference_flat_multimap_full));
std::pair<iterator, bool> result(end(), false);
@ -479,8 +479,8 @@ namespace etl
}
//*********************************************************************
/// Inserts a range of values to the intrusive_flat_multimap.
/// If asserts or exceptions are enabled, emits intrusive_flat_multimap_full if the intrusive_flat_multimap does not have enough free space.
/// Inserts a range of values to the reference_flat_multimap.
/// If asserts or exceptions are enabled, emits reference_flat_multimap_full if the reference_flat_multimap does not have enough free space.
///\param position The position to insert at.
///\param first The first element to add.
///\param last The last + 1 element to add.
@ -537,7 +537,7 @@ namespace etl
}
//*************************************************************************
/// Clears the intrusive_flat_multimap.
/// Clears the reference_flat_multimap.
//*************************************************************************
void clear()
{
@ -727,7 +727,7 @@ namespace etl
//*********************************************************************
/// Constructor.
//*********************************************************************
iintrusive_flat_multimap(lookup_t& lookup_)
ireference_flat_multimap(lookup_t& lookup_)
: lookup(lookup_)
{
}
@ -735,7 +735,7 @@ namespace etl
private:
//*********************************************************************
/// Inserts a value to the intrusive_flat_multimap.
/// Inserts a value to the reference_flat_multimap.
///\param i_element The place to insert.
///\param value The value to insert.
//*********************************************************************
@ -762,48 +762,48 @@ namespace etl
}
// Disable copy construction and assignment.
iintrusive_flat_multimap(const iintrusive_flat_multimap&);
iintrusive_flat_multimap& operator = (const iintrusive_flat_multimap&);
ireference_flat_multimap(const ireference_flat_multimap&);
ireference_flat_multimap& operator = (const ireference_flat_multimap&);
lookup_t& lookup;
};
//***************************************************************************
/// Equal operator.
///\param lhs Reference to the first intrusive_flat_multimap.
///\param rhs Reference to the second intrusive_flat_multimap.
///\param lhs Reference to the first reference_flat_multimap.
///\param rhs Reference to the second reference_flat_multimap.
///\return <b>true</b> if the arrays are equal, otherwise <b>false</b>
///\ingroup intrusive_flat_multimap
///\ingroup reference_flat_multimap
//***************************************************************************
template <typename TKey, typename TMapped, typename TKeyCompare>
bool operator ==(const etl::iintrusive_flat_multimap<TKey, TMapped, TKeyCompare>& lhs, const etl::iintrusive_flat_multimap<TKey, TMapped, TKeyCompare>& rhs)
bool operator ==(const etl::ireference_flat_multimap<TKey, TMapped, TKeyCompare>& lhs, const etl::ireference_flat_multimap<TKey, TMapped, TKeyCompare>& rhs)
{
return (lhs.size() == rhs.size()) && std::equal(lhs.begin(), lhs.end(), rhs.begin());
}
//***************************************************************************
/// Not equal operator.
///\param lhs Reference to the first intrusive_flat_multimap.
///\param rhs Reference to the second intrusive_flat_multimap.
///\param lhs Reference to the first reference_flat_multimap.
///\param rhs Reference to the second reference_flat_multimap.
///\return <b>true</b> if the arrays are not equal, otherwise <b>false</b>
///\ingroup intrusive_flat_multimap
///\ingroup reference_flat_multimap
//***************************************************************************
template <typename TKey, typename TMapped, typename TKeyCompare>
bool operator !=(const etl::iintrusive_flat_multimap<TKey, TMapped, TKeyCompare>& lhs, const etl::iintrusive_flat_multimap<TKey, TMapped, TKeyCompare>& rhs)
bool operator !=(const etl::ireference_flat_multimap<TKey, TMapped, TKeyCompare>& lhs, const etl::ireference_flat_multimap<TKey, TMapped, TKeyCompare>& rhs)
{
return !(lhs == rhs);
}
template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = std::less<TKey> >
//***************************************************************************
/// A intrusive_flat_multimap implementation that uses a fixed size buffer.
/// A reference_flat_multimap implementation that uses a fixed size buffer.
///\tparam TKey The key type.
///\tparam TValue The value type.
///\tparam TCompare The type to compare keys. Default = std::less<TKey>
///\tparam MAX_SIZE_ The maximum number of elements that can be stored.
///\ingroup intrusive_flat_multimap
///\ingroup reference_flat_multimap
//***************************************************************************
class intrusive_flat_multimap : public iintrusive_flat_multimap<TKey, TValue, TCompare>
class reference_flat_multimap : public ireference_flat_multimap<TKey, TValue, TCompare>
{
public:
@ -812,18 +812,18 @@ namespace etl
//*************************************************************************
/// Constructor.
//*************************************************************************
intrusive_flat_multimap()
: iintrusive_flat_multimap<TKey, TValue, TCompare>(lookup)
reference_flat_multimap()
: ireference_flat_multimap<TKey, TValue, TCompare>(lookup)
{
}
//*************************************************************************
/// Copy constructor.
//*************************************************************************
intrusive_flat_multimap(const intrusive_flat_multimap& other)
: iintrusive_flat_multimap<TKey, TValue, TCompare>(lookup)
reference_flat_multimap(const reference_flat_multimap& other)
: ireference_flat_multimap<TKey, TValue, TCompare>(lookup)
{
iintrusive_flat_multimap<TKey, TValue, TCompare>::assign(other.cbegin(), other.cend());
ireference_flat_multimap<TKey, TValue, TCompare>::assign(other.cbegin(), other.cend());
}
//*************************************************************************
@ -833,23 +833,23 @@ namespace etl
///\param last The iterator to the last element + 1.
//*************************************************************************
template <typename TIterator>
intrusive_flat_multimap(TIterator first, TIterator last)
: iintrusive_flat_multimap<TKey, TValue, TCompare>(lookup)
reference_flat_multimap(TIterator first, TIterator last)
: ireference_flat_multimap<TKey, TValue, TCompare>(lookup)
{
iintrusive_flat_multimap<TKey, TValue, TCompare>::assign(first, last);
ireference_flat_multimap<TKey, TValue, TCompare>::assign(first, last);
}
//*************************************************************************
/// Destructor.
//*************************************************************************
~intrusive_flat_multimap()
~reference_flat_multimap()
{
iintrusive_flat_multimap<TKey, TValue, TCompare>::clear();
ireference_flat_multimap<TKey, TValue, TCompare>::clear();
}
private:
typedef typename iintrusive_flat_multimap<TKey, TValue, TCompare>::value_type node_t;
typedef typename ireference_flat_multimap<TKey, TValue, TCompare>::value_type node_t;
// The vector that stores pointers to the nodes.
etl::vector<node_t*, MAX_SIZE> lookup;

View File

@ -28,8 +28,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
******************************************************************************/
#ifndef __ETL_INTRUSIVE_FLAT_MULTISET__
#define __ETL_INTRUSIVE_FLAT_MULTISET__
#ifndef __ETL_REFERENCE_FLAT_MULTISET__
#define __ETL_REFERENCE_FLAT_MULTISET__
#include <iterator>
#include <algorithm>
@ -50,54 +50,54 @@ SOFTWARE.
namespace etl
{
//***************************************************************************
///\ingroup intrusive_flat_multiset
/// Exception base for intrusive_flat_multisets
///\ingroup reference_flat_multiset
/// Exception base for reference_flat_multisets
//***************************************************************************
class intrusive_flat_multiset_exception : public exception
class reference_flat_multiset_exception : public exception
{
public:
intrusive_flat_multiset_exception(string_type what, string_type file_name, numeric_type line_number)
reference_flat_multiset_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
{
}
};
//***************************************************************************
///\ingroup intrusive_flat_multiset
///\ingroup reference_flat_multiset
/// Vector full exception.
//***************************************************************************
class intrusive_flat_multiset_full : public intrusive_flat_multiset_exception
class reference_flat_multiset_full : public reference_flat_multiset_exception
{
public:
intrusive_flat_multiset_full(string_type file_name, numeric_type line_number)
: intrusive_flat_multiset_exception(ETL_ERROR_TEXT("intrusive_flat_multiset:full", ETL_FILE"A"), file_name, line_number)
reference_flat_multiset_full(string_type file_name, numeric_type line_number)
: reference_flat_multiset_exception(ETL_ERROR_TEXT("reference_flat_multiset:full", ETL_FILE"A"), file_name, line_number)
{
}
};
//***************************************************************************
///\ingroup intrusive_flat_multiset
///\ingroup reference_flat_multiset
/// Vector iterator exception.
//***************************************************************************
class intrusive_flat_multiset_iterator : public intrusive_flat_multiset_exception
class reference_flat_multiset_iterator : public reference_flat_multiset_exception
{
public:
intrusive_flat_multiset_iterator(string_type file_name, numeric_type line_number)
: intrusive_flat_multiset_exception(ETL_ERROR_TEXT("intrusive_flat_multiset:iterator", ETL_FILE"C"), file_name, line_number)
reference_flat_multiset_iterator(string_type file_name, numeric_type line_number)
: reference_flat_multiset_exception(ETL_ERROR_TEXT("reference_flat_multiset:iterator", ETL_FILE"C"), file_name, line_number)
{
}
};
//***************************************************************************
/// The base class for specifically sized intrusive_flat_multisets.
/// Can be used as a reference type for all intrusive_flat_multisets containing a specific type.
///\ingroup intrusive_flat_multiset
/// The base class for specifically sized reference_flat_multisets.
/// Can be used as a reference type for all reference_flat_multisets containing a specific type.
///\ingroup reference_flat_multiset
//***************************************************************************
template <typename T, typename TKeyCompare = std::less<T> >
class iintrusive_flat_multiset
class ireference_flat_multiset
{
public:
@ -121,7 +121,7 @@ namespace etl
{
public:
friend class iintrusive_flat_multiset;
friend class ireference_flat_multiset;
iterator()
{
@ -219,7 +219,7 @@ namespace etl
{
public:
friend class iintrusive_flat_multiset;
friend class ireference_flat_multiset;
const_iterator()
{
@ -315,8 +315,8 @@ namespace etl
typedef typename std::iterator_traits<iterator>::difference_type difference_type;
//*********************************************************************
/// Returns an iterator to the beginning of the intrusive_flat_multiset.
///\return An iterator to the beginning of the intrusive_flat_multiset.
/// Returns an iterator to the beginning of the reference_flat_multiset.
///\return An iterator to the beginning of the reference_flat_multiset.
//*********************************************************************
iterator begin()
{
@ -324,8 +324,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const_iterator to the beginning of the intrusive_flat_multiset.
///\return A const iterator to the beginning of the intrusive_flat_multiset.
/// Returns a const_iterator to the beginning of the reference_flat_multiset.
///\return A const iterator to the beginning of the reference_flat_multiset.
//*********************************************************************
const_iterator begin() const
{
@ -333,8 +333,8 @@ namespace etl
}
//*********************************************************************
/// Returns an iterator to the end of the intrusive_flat_multiset.
///\return An iterator to the end of the intrusive_flat_multiset.
/// Returns an iterator to the end of the reference_flat_multiset.
///\return An iterator to the end of the reference_flat_multiset.
//*********************************************************************
iterator end()
{
@ -342,8 +342,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const_iterator to the end of the intrusive_flat_multiset.
///\return A const iterator to the end of the intrusive_flat_multiset.
/// Returns a const_iterator to the end of the reference_flat_multiset.
///\return A const iterator to the end of the reference_flat_multiset.
//*********************************************************************
const_iterator end() const
{
@ -351,8 +351,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const_iterator to the beginning of the intrusive_flat_multiset.
///\return A const iterator to the beginning of the intrusive_flat_multiset.
/// Returns a const_iterator to the beginning of the reference_flat_multiset.
///\return A const iterator to the beginning of the reference_flat_multiset.
//*********************************************************************
const_iterator cbegin() const
{
@ -360,8 +360,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const_iterator to the end of the intrusive_flat_multiset.
///\return A const iterator to the end of the intrusive_flat_multiset.
/// Returns a const_iterator to the end of the reference_flat_multiset.
///\return A const iterator to the end of the reference_flat_multiset.
//*********************************************************************
const_iterator cend() const
{
@ -369,8 +369,8 @@ namespace etl
}
//*********************************************************************
/// Returns an reverse iterator to the reverse beginning of the intrusive_flat_multiset.
///\return Iterator to the reverse beginning of the intrusive_flat_multiset.
/// Returns an reverse iterator to the reverse beginning of the reference_flat_multiset.
///\return Iterator to the reverse beginning of the reference_flat_multiset.
//*********************************************************************
reverse_iterator rbegin()
{
@ -378,8 +378,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const reverse iterator to the reverse beginning of the intrusive_flat_multiset.
///\return Const iterator to the reverse beginning of the intrusive_flat_multiset.
/// Returns a const reverse iterator to the reverse beginning of the reference_flat_multiset.
///\return Const iterator to the reverse beginning of the reference_flat_multiset.
//*********************************************************************
const_reverse_iterator rbegin() const
{
@ -387,8 +387,8 @@ namespace etl
}
//*********************************************************************
/// Returns a reverse iterator to the end + 1 of the intrusive_flat_multiset.
///\return Reverse iterator to the end + 1 of the intrusive_flat_multiset.
/// Returns a reverse iterator to the end + 1 of the reference_flat_multiset.
///\return Reverse iterator to the end + 1 of the reference_flat_multiset.
//*********************************************************************
reverse_iterator rend()
{
@ -396,8 +396,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const reverse iterator to the end + 1 of the intrusive_flat_multiset.
///\return Const reverse iterator to the end + 1 of the intrusive_flat_multiset.
/// Returns a const reverse iterator to the end + 1 of the reference_flat_multiset.
///\return Const reverse iterator to the end + 1 of the reference_flat_multiset.
//*********************************************************************
const_reverse_iterator rend() const
{
@ -405,8 +405,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const reverse iterator to the reverse beginning of the intrusive_flat_multiset.
///\return Const reverse iterator to the reverse beginning of the intrusive_flat_multiset.
/// Returns a const reverse iterator to the reverse beginning of the reference_flat_multiset.
///\return Const reverse iterator to the reverse beginning of the reference_flat_multiset.
//*********************************************************************
const_reverse_iterator crbegin() const
{
@ -414,8 +414,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const reverse iterator to the end + 1 of the intrusive_flat_multiset.
///\return Const reverse iterator to the end + 1 of the intrusive_flat_multiset.
/// Returns a const reverse iterator to the end + 1 of the reference_flat_multiset.
///\return Const reverse iterator to the end + 1 of the reference_flat_multiset.
//*********************************************************************
const_reverse_iterator crend() const
{
@ -423,9 +423,9 @@ namespace etl
}
//*********************************************************************
/// Assigns values to the intrusive_flat_multiset.
/// If asserts or exceptions are enabled, emits intrusive_flat_multiset_full if the intrusive_flat_multiset does not have enough free space.
/// If asserts or exceptions are enabled, emits intrusive_flat_multiset_iterator if the iterators are reversed.
/// Assigns values to the reference_flat_multiset.
/// If asserts or exceptions are enabled, emits reference_flat_multiset_full if the reference_flat_multiset does not have enough free space.
/// If asserts or exceptions are enabled, emits reference_flat_multiset_iterator if the iterators are reversed.
///\param first The iterator to the first element.
///\param last The iterator to the last element + 1.
//*********************************************************************
@ -434,7 +434,7 @@ namespace etl
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(intrusive_flat_multiset_full));
ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(reference_flat_multiset_full));
#endif
clear();
@ -446,15 +446,15 @@ namespace etl
}
//*********************************************************************
/// Inserts a value to the intrusive_flat_multiset.
/// If asserts or exceptions are enabled, emits intrusive_flat_multiset_full if the intrusive_flat_multiset is already full.
/// Inserts a value to the reference_flat_multiset.
/// If asserts or exceptions are enabled, emits reference_flat_multiset_full if the reference_flat_multiset is already full.
///\param value The value to insert.
//*********************************************************************
std::pair<iterator, bool> insert(value_type& value)
{
std::pair<iterator, bool> result(end(), false);
ETL_ASSERT(!lookup.full(), ETL_ERROR(intrusive_flat_multiset_full));
ETL_ASSERT(!lookup.full(), ETL_ERROR(reference_flat_multiset_full));
iterator i_element = std::lower_bound(begin(), end(), value, TKeyCompare());
@ -477,8 +477,8 @@ namespace etl
}
//*********************************************************************
/// Inserts a value to the intrusive_flat_multiset.
/// If asserts or exceptions are enabled, emits intrusive_flat_multiset_full if the intrusive_flat_multiset is already full.
/// Inserts a value to the reference_flat_multiset.
/// If asserts or exceptions are enabled, emits reference_flat_multiset_full if the reference_flat_multiset is already full.
///\param position The position to insert at.
///\param value The value to insert.
//*********************************************************************
@ -488,8 +488,8 @@ namespace etl
}
//*********************************************************************
/// Inserts a range of values to the intrusive_flat_multiset.
/// If asserts or exceptions are enabled, emits intrusive_flat_multiset_full if the intrusive_flat_multiset does not have enough free space.
/// Inserts a range of values to the reference_flat_multiset.
/// If asserts or exceptions are enabled, emits reference_flat_multiset_full if the reference_flat_multiset does not have enough free space.
///\param position The position to insert at.
///\param first The first element to add.
///\param last The last + 1 element to add.
@ -546,7 +546,7 @@ namespace etl
}
//*************************************************************************
/// Clears the intrusive_flat_multiset.
/// Clears the reference_flat_multiset.
//*************************************************************************
void clear()
{
@ -674,8 +674,8 @@ namespace etl
}
//*************************************************************************
/// Gets the current size of the intrusive_flat_multiset.
///\return The current size of the intrusive_flat_multiset.
/// Gets the current size of the reference_flat_multiset.
///\return The current size of the reference_flat_multiset.
//*************************************************************************
size_type size() const
{
@ -683,7 +683,7 @@ namespace etl
}
//*************************************************************************
/// Checks the 'empty' state of the intrusive_flat_multiset.
/// Checks the 'empty' state of the reference_flat_multiset.
///\return <b>true</b> if empty.
//*************************************************************************
bool empty() const
@ -692,7 +692,7 @@ namespace etl
}
//*************************************************************************
/// Checks the 'full' state of the intrusive_flat_multiset.
/// Checks the 'full' state of the reference_flat_multiset.
///\return <b>true</b> if full.
//*************************************************************************
bool full() const
@ -701,8 +701,8 @@ namespace etl
}
//*************************************************************************
/// Returns the capacity of the intrusive_flat_multiset.
///\return The capacity of the intrusive_flat_multiset.
/// Returns the capacity of the reference_flat_multiset.
///\return The capacity of the reference_flat_multiset.
//*************************************************************************
size_type capacity() const
{
@ -710,8 +710,8 @@ namespace etl
}
//*************************************************************************
/// Returns the maximum possible size of the intrusive_flat_multiset.
///\return The maximum size of the intrusive_flat_multiset.
/// Returns the maximum possible size of the reference_flat_multiset.
///\return The maximum size of the reference_flat_multiset.
//*************************************************************************
size_type max_size() const
{
@ -732,7 +732,7 @@ namespace etl
//*********************************************************************
/// Constructor.
//*********************************************************************
iintrusive_flat_multiset(lookup_t& lookup_)
ireference_flat_multiset(lookup_t& lookup_)
: lookup(lookup_)
{
}
@ -740,18 +740,18 @@ namespace etl
private:
// Disable copy construction.
iintrusive_flat_multiset(const iintrusive_flat_multiset&);
iintrusive_flat_multiset& operator =(const iintrusive_flat_multiset&);
ireference_flat_multiset(const ireference_flat_multiset&);
ireference_flat_multiset& operator =(const ireference_flat_multiset&);
lookup_t& lookup;
};
//***************************************************************************
/// An intrusive flat set
///\ingroup intrusive_flat_multiset
/// An reference flat set
///\ingroup reference_flat_multiset
//***************************************************************************
template <typename TKey, const size_t MAX_SIZE_, typename TKeyCompare = std::less<TKey> >
class intrusive_flat_multiset : public iintrusive_flat_multiset<TKey, TKeyCompare>
class reference_flat_multiset : public ireference_flat_multiset<TKey, TKeyCompare>
{
public:
@ -760,18 +760,18 @@ namespace etl
//*************************************************************************
/// Constructor.
//*************************************************************************
intrusive_flat_multiset()
: iintrusive_flat_multiset<TKey, TKeyCompare>(lookup)
reference_flat_multiset()
: ireference_flat_multiset<TKey, TKeyCompare>(lookup)
{
}
//*************************************************************************
/// Copy constructor.
//*************************************************************************
intrusive_flat_multiset(const intrusive_flat_multiset& other)
: iintrusive_flat_multiset<TKey, TKeyCompare>(lookup)
reference_flat_multiset(const reference_flat_multiset& other)
: ireference_flat_multiset<TKey, TKeyCompare>(lookup)
{
iintrusive_flat_multiset<TKey, TKeyCompare>::assign(other.cbegin(), other.cend());
ireference_flat_multiset<TKey, TKeyCompare>::assign(other.cbegin(), other.cend());
}
//*************************************************************************
@ -781,18 +781,18 @@ namespace etl
///\param last The iterator to the last element + 1.
//*************************************************************************
template <typename TIterator>
intrusive_flat_multiset(TIterator first, TIterator last)
: iintrusive_flat_multiset<TKey, TKeyCompare>(lookup)
reference_flat_multiset(TIterator first, TIterator last)
: ireference_flat_multiset<TKey, TKeyCompare>(lookup)
{
iintrusive_flat_multiset<TKey, TKeyCompare>::assign(first, last);
ireference_flat_multiset<TKey, TKeyCompare>::assign(first, last);
}
//*************************************************************************
/// Destructor.
//*************************************************************************
~intrusive_flat_multiset()
~reference_flat_multiset()
{
iintrusive_flat_multiset<TKey, TKeyCompare>::clear();
ireference_flat_multiset<TKey, TKeyCompare>::clear();
}
private:
@ -805,26 +805,26 @@ namespace etl
//***************************************************************************
/// Equal operator.
///\param lhs Reference to the first intrusive_flat_multiset.
///\param rhs Reference to the second intrusive_flat_multiset.
///\param lhs Reference to the first reference_flat_multiset.
///\param rhs Reference to the second reference_flat_multiset.
///\return <b>true</b> if the arrays are equal, otherwise <b>false</b>
///\ingroup intrusive_flat_multiset
///\ingroup reference_flat_multiset
//***************************************************************************
template <typename T, typename TKeyCompare>
bool operator ==(const etl::iintrusive_flat_multiset<T, TKeyCompare>& lhs, const etl::iintrusive_flat_multiset<T, TKeyCompare>& rhs)
bool operator ==(const etl::ireference_flat_multiset<T, TKeyCompare>& lhs, const etl::ireference_flat_multiset<T, TKeyCompare>& rhs)
{
return (lhs.size() == rhs.size()) && std::equal(lhs.begin(), lhs.end(), rhs.begin());
}
//***************************************************************************
/// Not equal operator.
///\param lhs Reference to the first intrusive_flat_multiset.
///\param rhs Reference to the second intrusive_flat_multiset.
///\param lhs Reference to the first reference_flat_multiset.
///\param rhs Reference to the second reference_flat_multiset.
///\return <b>true</b> if the arrays are not equal, otherwise <b>false</b>
///\ingroup intrusive_flat_multiset
///\ingroup reference_flat_multiset
//***************************************************************************
template <typename T, typename TKeyCompare>
bool operator !=(const etl::iintrusive_flat_multiset<T, TKeyCompare>& lhs, const etl::iintrusive_flat_multiset<T, TKeyCompare>& rhs)
bool operator !=(const etl::ireference_flat_multiset<T, TKeyCompare>& lhs, const etl::ireference_flat_multiset<T, TKeyCompare>& rhs)
{
return !(lhs == rhs);
}

View File

@ -28,8 +28,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
******************************************************************************/
#ifndef __ETL_INTRUSIVE_FLAT_SET__
#define __ETL_INTRUSIVE_FLAT_SET__
#ifndef __ETL_REFERENCE_FLAT_SET__
#define __ETL_REFERENCE_FLAT_SET__
#include <iterator>
#include <algorithm>
@ -50,54 +50,54 @@ SOFTWARE.
namespace etl
{
//***************************************************************************
///\ingroup intrusive_flat_set
/// Exception base for intrusive_flat_sets
///\ingroup reference_flat_set
/// Exception base for reference_flat_sets
//***************************************************************************
class intrusive_flat_set_exception : public exception
class reference_flat_set_exception : public exception
{
public:
intrusive_flat_set_exception(string_type what, string_type file_name, numeric_type line_number)
reference_flat_set_exception(string_type what, string_type file_name, numeric_type line_number)
: exception(what, file_name, line_number)
{
}
};
//***************************************************************************
///\ingroup intrusive_flat_set
///\ingroup reference_flat_set
/// Vector full exception.
//***************************************************************************
class intrusive_flat_set_full : public intrusive_flat_set_exception
class reference_flat_set_full : public reference_flat_set_exception
{
public:
intrusive_flat_set_full(string_type file_name, numeric_type line_number)
: intrusive_flat_set_exception(ETL_ERROR_TEXT("intrusive_flat_set:full", ETL_FILE"A"), file_name, line_number)
reference_flat_set_full(string_type file_name, numeric_type line_number)
: reference_flat_set_exception(ETL_ERROR_TEXT("reference_flat_set:full", ETL_FILE"A"), file_name, line_number)
{
}
};
//***************************************************************************
///\ingroup intrusive_flat_set
///\ingroup reference_flat_set
/// Vector iterator exception.
//***************************************************************************
class intrusive_flat_set_iterator : public intrusive_flat_set_exception
class reference_flat_set_iterator : public reference_flat_set_exception
{
public:
intrusive_flat_set_iterator(string_type file_name, numeric_type line_number)
: intrusive_flat_set_exception(ETL_ERROR_TEXT("intrusive_flat_set:iterator", ETL_FILE"C"), file_name, line_number)
reference_flat_set_iterator(string_type file_name, numeric_type line_number)
: reference_flat_set_exception(ETL_ERROR_TEXT("reference_flat_set:iterator", ETL_FILE"C"), file_name, line_number)
{
}
};
//***************************************************************************
/// The base class for specifically sized intrusive_flat_sets.
/// Can be used as a reference type for all intrusive_flat_sets containing a specific type.
///\ingroup intrusive_flat_set
/// The base class for specifically sized reference_flat_sets.
/// Can be used as a reference type for all reference_flat_sets containing a specific type.
///\ingroup reference_flat_set
//***************************************************************************
template <typename T, typename TKeyCompare = std::less<T> >
class iintrusive_flat_set
class ireference_flat_set
{
public:
@ -121,7 +121,7 @@ namespace etl
{
public:
friend class iintrusive_flat_set;
friend class ireference_flat_set;
iterator()
{
@ -219,7 +219,7 @@ namespace etl
{
public:
friend class iintrusive_flat_set;
friend class ireference_flat_set;
const_iterator()
{
@ -319,8 +319,8 @@ namespace etl
typedef typename std::iterator_traits<iterator>::difference_type difference_type;
//*********************************************************************
/// Returns an iterator to the beginning of the intrusive_flat_set.
///\return An iterator to the beginning of the intrusive_flat_set.
/// Returns an iterator to the beginning of the reference_flat_set.
///\return An iterator to the beginning of the reference_flat_set.
//*********************************************************************
iterator begin()
{
@ -328,8 +328,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const_iterator to the beginning of the intrusive_flat_set.
///\return A const iterator to the beginning of the intrusive_flat_set.
/// Returns a const_iterator to the beginning of the reference_flat_set.
///\return A const iterator to the beginning of the reference_flat_set.
//*********************************************************************
const_iterator begin() const
{
@ -337,8 +337,8 @@ namespace etl
}
//*********************************************************************
/// Returns an iterator to the end of the intrusive_flat_set.
///\return An iterator to the end of the intrusive_flat_set.
/// Returns an iterator to the end of the reference_flat_set.
///\return An iterator to the end of the reference_flat_set.
//*********************************************************************
iterator end()
{
@ -346,8 +346,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const_iterator to the end of the intrusive_flat_set.
///\return A const iterator to the end of the intrusive_flat_set.
/// Returns a const_iterator to the end of the reference_flat_set.
///\return A const iterator to the end of the reference_flat_set.
//*********************************************************************
const_iterator end() const
{
@ -355,8 +355,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const_iterator to the beginning of the intrusive_flat_set.
///\return A const iterator to the beginning of the intrusive_flat_set.
/// Returns a const_iterator to the beginning of the reference_flat_set.
///\return A const iterator to the beginning of the reference_flat_set.
//*********************************************************************
const_iterator cbegin() const
{
@ -364,8 +364,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const_iterator to the end of the intrusive_flat_set.
///\return A const iterator to the end of the intrusive_flat_set.
/// Returns a const_iterator to the end of the reference_flat_set.
///\return A const iterator to the end of the reference_flat_set.
//*********************************************************************
const_iterator cend() const
{
@ -373,8 +373,8 @@ namespace etl
}
//*********************************************************************
/// Returns an reverse iterator to the reverse beginning of the intrusive_flat_set.
///\return Iterator to the reverse beginning of the intrusive_flat_set.
/// Returns an reverse iterator to the reverse beginning of the reference_flat_set.
///\return Iterator to the reverse beginning of the reference_flat_set.
//*********************************************************************
reverse_iterator rbegin()
{
@ -382,8 +382,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const reverse iterator to the reverse beginning of the intrusive_flat_set.
///\return Const iterator to the reverse beginning of the intrusive_flat_set.
/// Returns a const reverse iterator to the reverse beginning of the reference_flat_set.
///\return Const iterator to the reverse beginning of the reference_flat_set.
//*********************************************************************
const_reverse_iterator rbegin() const
{
@ -391,8 +391,8 @@ namespace etl
}
//*********************************************************************
/// Returns a reverse iterator to the end + 1 of the intrusive_flat_set.
///\return Reverse iterator to the end + 1 of the intrusive_flat_set.
/// Returns a reverse iterator to the end + 1 of the reference_flat_set.
///\return Reverse iterator to the end + 1 of the reference_flat_set.
//*********************************************************************
reverse_iterator rend()
{
@ -400,8 +400,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const reverse iterator to the end + 1 of the intrusive_flat_set.
///\return Const reverse iterator to the end + 1 of the intrusive_flat_set.
/// Returns a const reverse iterator to the end + 1 of the reference_flat_set.
///\return Const reverse iterator to the end + 1 of the reference_flat_set.
//*********************************************************************
const_reverse_iterator rend() const
{
@ -409,8 +409,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const reverse iterator to the reverse beginning of the intrusive_flat_set.
///\return Const reverse iterator to the reverse beginning of the intrusive_flat_set.
/// Returns a const reverse iterator to the reverse beginning of the reference_flat_set.
///\return Const reverse iterator to the reverse beginning of the reference_flat_set.
//*********************************************************************
const_reverse_iterator crbegin() const
{
@ -418,8 +418,8 @@ namespace etl
}
//*********************************************************************
/// Returns a const reverse iterator to the end + 1 of the intrusive_flat_set.
///\return Const reverse iterator to the end + 1 of the intrusive_flat_set.
/// Returns a const reverse iterator to the end + 1 of the reference_flat_set.
///\return Const reverse iterator to the end + 1 of the reference_flat_set.
//*********************************************************************
const_reverse_iterator crend() const
{
@ -427,9 +427,9 @@ namespace etl
}
//*********************************************************************
/// Assigns values to the intrusive_flat_set.
/// If asserts or exceptions are enabled, emits intrusive_flat_set_full if the intrusive_flat_set does not have enough free space.
/// If asserts or exceptions are enabled, emits intrusive_flat_set_iterator if the iterators are reversed.
/// Assigns values to the reference_flat_set.
/// If asserts or exceptions are enabled, emits reference_flat_set_full if the reference_flat_set does not have enough free space.
/// If asserts or exceptions are enabled, emits reference_flat_set_iterator if the iterators are reversed.
///\param first The iterator to the first element.
///\param last The iterator to the last element + 1.
//*********************************************************************
@ -438,7 +438,7 @@ namespace etl
{
#if defined(ETL_DEBUG)
difference_type count = std::distance(first, last);
ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(intrusive_flat_set_full));
ETL_ASSERT(count <= difference_type(capacity()), ETL_ERROR(reference_flat_set_full));
#endif
clear();
@ -450,15 +450,15 @@ namespace etl
}
//*********************************************************************
/// Inserts a value to the intrusive_flat_set.
/// If asserts or exceptions are enabled, emits intrusive_flat_set_full if the intrusive_flat_set is already full.
/// Inserts a value to the reference_flat_set.
/// If asserts or exceptions are enabled, emits reference_flat_set_full if the reference_flat_set is already full.
///\param value The value to insert.
//*********************************************************************
std::pair<iterator, bool> insert(value_type& value)
{
std::pair<iterator, bool> result(end(), false);
ETL_ASSERT(!lookup.full(), ETL_ERROR(intrusive_flat_set_full));
ETL_ASSERT(!lookup.full(), ETL_ERROR(reference_flat_set_full));
iterator i_element = std::lower_bound(begin(), end(), value, TKeyCompare());
@ -490,8 +490,8 @@ namespace etl
}
//*********************************************************************
/// Inserts a value to the intrusive_flat_set.
/// If asserts or exceptions are enabled, emits intrusive_flat_set_full if the intrusive_flat_set is already full.
/// Inserts a value to the reference_flat_set.
/// If asserts or exceptions are enabled, emits reference_flat_set_full if the reference_flat_set is already full.
///\param position The position to insert at.
///\param value The value to insert.
//*********************************************************************
@ -501,8 +501,8 @@ namespace etl
}
//*********************************************************************
/// Inserts a range of values to the intrusive_flat_set.
/// If asserts or exceptions are enabled, emits intrusive_flat_set_full if the intrusive_flat_set does not have enough free space.
/// Inserts a range of values to the reference_flat_set.
/// If asserts or exceptions are enabled, emits reference_flat_set_full if the reference_flat_set does not have enough free space.
///\param position The position to insert at.
///\param first The first element to add.
///\param last The last + 1 element to add.
@ -558,7 +558,7 @@ namespace etl
}
//*************************************************************************
/// Clears the intrusive_flat_set.
/// Clears the reference_flat_set.
//*************************************************************************
void clear()
{
@ -684,8 +684,8 @@ namespace etl
}
//*************************************************************************
/// Gets the current size of the intrusive_flat_set.
///\return The current size of the intrusive_flat_set.
/// Gets the current size of the reference_flat_set.
///\return The current size of the reference_flat_set.
//*************************************************************************
size_type size() const
{
@ -693,7 +693,7 @@ namespace etl
}
//*************************************************************************
/// Checks the 'empty' state of the intrusive_flat_set.
/// Checks the 'empty' state of the reference_flat_set.
///\return <b>true</b> if empty.
//*************************************************************************
bool empty() const
@ -702,7 +702,7 @@ namespace etl
}
//*************************************************************************
/// Checks the 'full' state of the intrusive_flat_set.
/// Checks the 'full' state of the reference_flat_set.
///\return <b>true</b> if full.
//*************************************************************************
bool full() const
@ -711,8 +711,8 @@ namespace etl
}
//*************************************************************************
/// Returns the capacity of the intrusive_flat_set.
///\return The capacity of the intrusive_flat_set.
/// Returns the capacity of the reference_flat_set.
///\return The capacity of the reference_flat_set.
//*************************************************************************
size_type capacity() const
{
@ -720,8 +720,8 @@ namespace etl
}
//*************************************************************************
/// Returns the maximum possible size of the intrusive_flat_set.
///\return The maximum size of the intrusive_flat_set.
/// Returns the maximum possible size of the reference_flat_set.
///\return The maximum size of the reference_flat_set.
//*************************************************************************
size_type max_size() const
{
@ -742,7 +742,7 @@ namespace etl
//*********************************************************************
/// Constructor.
//*********************************************************************
iintrusive_flat_set(lookup_t& lookup_)
ireference_flat_set(lookup_t& lookup_)
: lookup(lookup_)
{
}
@ -750,18 +750,18 @@ namespace etl
private:
// Disable copy construction.
iintrusive_flat_set(const iintrusive_flat_set&);
iintrusive_flat_set& operator =(const iintrusive_flat_set&);
ireference_flat_set(const ireference_flat_set&);
ireference_flat_set& operator =(const ireference_flat_set&);
lookup_t& lookup;
};
//***************************************************************************
/// An intrusive flat set
///\ingroup intrusive_flat_set
/// An reference flat set
///\ingroup reference_flat_set
//***************************************************************************
template <typename TKey, const size_t MAX_SIZE_, typename TKeyCompare = std::less<TKey> >
class intrusive_flat_set : public iintrusive_flat_set<TKey, TKeyCompare>
class reference_flat_set : public ireference_flat_set<TKey, TKeyCompare>
{
public:
@ -770,18 +770,18 @@ namespace etl
//*************************************************************************
/// Constructor.
//*************************************************************************
intrusive_flat_set()
: iintrusive_flat_set<TKey, TKeyCompare>(lookup)
reference_flat_set()
: ireference_flat_set<TKey, TKeyCompare>(lookup)
{
}
//*************************************************************************
/// Copy constructor.
//*************************************************************************
intrusive_flat_set(const intrusive_flat_set& other)
: iintrusive_flat_set<TKey, TKeyCompare>(lookup)
reference_flat_set(const reference_flat_set& other)
: ireference_flat_set<TKey, TKeyCompare>(lookup)
{
iintrusive_flat_set<TKey, TKeyCompare>::assign(other.cbegin(), other.cend());
ireference_flat_set<TKey, TKeyCompare>::assign(other.cbegin(), other.cend());
}
//*************************************************************************
@ -791,18 +791,18 @@ namespace etl
///\param last The iterator to the last element + 1.
//*************************************************************************
template <typename TIterator>
intrusive_flat_set(TIterator first, TIterator last)
: iintrusive_flat_set<TKey, TKeyCompare>(lookup)
reference_flat_set(TIterator first, TIterator last)
: ireference_flat_set<TKey, TKeyCompare>(lookup)
{
iintrusive_flat_set<TKey, TKeyCompare>::assign(first, last);
ireference_flat_set<TKey, TKeyCompare>::assign(first, last);
}
//*************************************************************************
/// Destructor.
//*************************************************************************
~intrusive_flat_set()
~reference_flat_set()
{
iintrusive_flat_set<TKey, TKeyCompare>::clear();
ireference_flat_set<TKey, TKeyCompare>::clear();
}
private:
@ -815,26 +815,26 @@ namespace etl
//***************************************************************************
/// Equal operator.
///\param lhs Reference to the first intrusive_flat_set.
///\param rhs Reference to the second intrusive_flat_set.
///\param lhs Reference to the first reference_flat_set.
///\param rhs Reference to the second reference_flat_set.
///\return <b>true</b> if the arrays are equal, otherwise <b>false</b>
///\ingroup intrusive_flat_set
///\ingroup reference_flat_set
//***************************************************************************
template <typename T, typename TKeyCompare>
bool operator ==(const etl::iintrusive_flat_set<T, TKeyCompare>& lhs, const etl::iintrusive_flat_set<T, TKeyCompare>& rhs)
bool operator ==(const etl::ireference_flat_set<T, TKeyCompare>& lhs, const etl::ireference_flat_set<T, TKeyCompare>& rhs)
{
return (lhs.size() == rhs.size()) && std::equal(lhs.begin(), lhs.end(), rhs.begin());
}
//***************************************************************************
/// Not equal operator.
///\param lhs Reference to the first intrusive_flat_set.
///\param rhs Reference to the second intrusive_flat_set.
///\param lhs Reference to the first reference_flat_set.
///\param rhs Reference to the second reference_flat_set.
///\return <b>true</b> if the arrays are not equal, otherwise <b>false</b>
///\ingroup intrusive_flat_set
///\ingroup reference_flat_set
//***************************************************************************
template <typename T, typename TKeyCompare>
bool operator !=(const etl::iintrusive_flat_set<T, TKeyCompare>& lhs, const etl::iintrusive_flat_set<T, TKeyCompare>& rhs)
bool operator !=(const etl::ireference_flat_set<T, TKeyCompare>& lhs, const etl::ireference_flat_set<T, TKeyCompare>& rhs)
{
return !(lhs == rhs);
}

View File

@ -219,6 +219,10 @@
<Unit filename="../../src/random.cpp" />
<Unit filename="../../src/random.h" />
<Unit filename="../../src/ratio.h" />
<Unit filename="../../src/reference_flat_map.h" />
<Unit filename="../../src/reference_flat_multimap.h" />
<Unit filename="../../src/reference_flat_multiset.h" />
<Unit filename="../../src/reference_flat_set.h" />
<Unit filename="../../src/set.h" />
<Unit filename="../../src/smallest.h" />
<Unit filename="../../src/stack.h" />
@ -271,10 +275,6 @@
<Unit filename="../test_hash.cpp" />
<Unit filename="../test_instance_count.cpp" />
<Unit filename="../test_integral_limits.cpp" />
<Unit filename="../test_intrusive_flat_map.cpp" />
<Unit filename="../test_intrusive_flat_multimap.cpp" />
<Unit filename="../test_intrusive_flat_multiset.cpp" />
<Unit filename="../test_intrusive_flat_set.cpp" />
<Unit filename="../test_intrusive_forward_list.cpp" />
<Unit filename="../test_intrusive_links.cpp" />
<Unit filename="../test_intrusive_list.cpp" />
@ -299,6 +299,10 @@
<Unit filename="../test_priority_queue.cpp" />
<Unit filename="../test_queue.cpp" />
<Unit filename="../test_random.cpp" />
<Unit filename="../test_reference_flat_map.cpp" />
<Unit filename="../test_reference_flat_multimap.cpp" />
<Unit filename="../test_reference_flat_multiset.cpp" />
<Unit filename="../test_reference_flat_set.cpp" />
<Unit filename="../test_set.cpp" />
<Unit filename="../test_smallest.cpp" />
<Unit filename="../test_stack.cpp" />

View File

@ -3289,7 +3289,7 @@
"CurrentTest.h"
"ReportAssertImpl.h"
1494277861 source:d:\users\john\documents\programming\github\etl\test\test_algorithm.cpp
1494283539 source:d:\users\john\documents\programming\github\etl\test\test_algorithm.cpp
"UnitTest++.h"
"algorithm.h"
"container.h"
@ -3726,7 +3726,7 @@
1482623723 v_1.h"
1494279862 source:d:\users\john\documents\programming\github\etl\test\test_forward_list.cpp
1494283539 source:d:\users\john\documents\programming\github\etl\test\test_forward_list.cpp
"UnitTest++.h"
"ExtraCheckMacros.h"
"data.h"
@ -3843,7 +3843,7 @@
1450265856 d:\users\john\documents\programming\github\etl\largest.h
"type_traits.h"
1494279862 source:d:\users\john\documents\programming\github\etl\test\test_list.cpp
1494283539 source:d:\users\john\documents\programming\github\etl\test\test_list.cpp
"UnitTest++.h"
"ExtraCheckMacros.h"
"list.h"
@ -5230,7 +5230,7 @@
1452516033 /home/jwellbelove/Programming/etl/visitor.h
1494279862 source:d:\users\john\documents\programming\github\etl\test\test_intrusive_forward_list.cpp
1494283539 source:d:\users\john\documents\programming\github\etl\test\test_intrusive_forward_list.cpp
"UnitTest++.h"
"ExtraCheckMacros.h"
"data.h"
@ -6087,7 +6087,7 @@
1482358550 trusive_links.h"
1494278815 source:d:\users\john\documents\programming\github\etl\test\test_intrusive_list.cpp
1494283539 source:d:\users\john\documents\programming\github\etl\test\test_intrusive_list.cpp
"UnitTest++.h"
"ExtraCheckMacros.h"
"data.h"
@ -7970,7 +7970,7 @@
"UnitTest++.h"
"iterator.h"
1494278993 source:d:\users\john\documents\programming\github\etl\test\test_memory.cpp
1494283539 source:d:\users\john\documents\programming\github\etl\test\test_memory.cpp
"UnitTest++.h"
"memory.h"
"debug_count.h"
@ -8173,3 +8173,91 @@
"HelperMacros.h"
<csetjmp>
1494362778 source:d:\users\john\documents\programming\github\etl\test\test_reference_flat_map.cpp
"UnitTest++.h"
<map>
<array>
<algorithm>
<utility>
<iterator>
<string>
<vector>
<iostream>
"data.h"
"reference_flat_map.h"
1494362778 d:\users\john\documents\programming\github\etl\src\reference_flat_map.h
<stddef.h>
"exception.h"
"vector.h"
"error_handler.h"
1494362778 source:d:\users\john\documents\programming\github\etl\test\test_reference_flat_multimap.cpp
"UnitTest++.h"
<map>
<array>
<algorithm>
<utility>
<iterator>
<string>
<vector>
"data.h"
"reference_flat_multimap.h"
1494362778 d:\users\john\documents\programming\github\etl\src\reference_flat_multimap.h
<stddef.h>
"exception.h"
"error_handler.h"
"debug_count.h"
"vector.h"
1494362778 source:d:\users\john\documents\programming\github\etl\test\test_reference_flat_multiset.cpp
"UnitTest++.h"
<set>
<array>
<algorithm>
<utility>
<iterator>
<string>
<vector>
"data.h"
"reference_flat_multiset.h"
1494362778 d:\users\john\documents\programming\github\etl\src\reference_flat_multiset.h
<iterator>
<algorithm>
<functional>
<utility>
<stddef.h>
"platform.h"
"type_traits.h"
"vector.h"
"pool.h"
"error_handler.h"
"exception.h"
1494362778 source:d:\users\john\documents\programming\github\etl\test\test_reference_flat_set.cpp
"UnitTest++.h"
<set>
<array>
<algorithm>
<utility>
<iterator>
<string>
<vector>
"data.h"
"reference_flat_set.h"
1494362778 d:\users\john\documents\programming\github\etl\src\reference_flat_set.h
<iterator>
<algorithm>
<functional>
<utility>
<stddef.h>
"platform.h"
"type_traits.h"
"pool.h"
"error_handler.h"
"exception.h"
"vector.h"

View File

@ -2,134 +2,24 @@
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Windows" />
<File name="..\..\..\unittest-cpp\UnitTest++\TestReporterStdout.cpp" open="0" top="0" tabpos="25" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="883" topLine="0" />
</Cursor>
</File>
<File name="..\test_intrusive_forward_list.cpp" open="1" top="0" tabpos="26" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="27667" topLine="693" />
</Cursor>
</File>
<File name="..\test_intrusive_flat_map.cpp" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2984" topLine="53" />
</Cursor>
</File>
<File name="..\test_forward_list.cpp" open="1" top="0" tabpos="23" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8440" topLine="209" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\TestRunner.cpp" open="0" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2279" topLine="25" />
</Cursor>
</File>
<File name="..\test_flat_multiset.cpp" open="1" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3011" topLine="58" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\ExecuteTest.h" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="426" topLine="0" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\Test.cpp" open="0" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="699" topLine="0" />
</Cursor>
</File>
<File name="..\test_list.cpp" open="1" top="1" tabpos="27" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="17369" topLine="487" />
</Cursor>
</File>
<File name="..\test_algorithm.cpp" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11590" topLine="274" />
</Cursor>
</File>
<File name="..\..\src\binary.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14624" topLine="373" />
</Cursor>
</File>
<File name="..\test_intrusive_flat_set.cpp" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9812" topLine="311" />
</Cursor>
</File>
<File name="..\test_flat_set.cpp" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11541" topLine="359" />
</Cursor>
</File>
<File name="..\test_io_port.cpp" open="1" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1452" topLine="3" />
</Cursor>
</File>
<File name="..\test_map.cpp" open="1" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6368" topLine="164" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\Checks.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="469" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\algorithm.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\Config.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="792" topLine="7" />
</Cursor>
</File>
<File name="..\..\src\intrusive_flat_map.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4065" topLine="242" />
</Cursor>
</File>
<File name="..\test_memory.cpp" open="1" top="0" tabpos="25" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="15446" topLine="391" />
</Cursor>
</File>
<File name="..\test_flat_multimap.cpp" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\test_flat_multimap.cpp" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3425" topLine="85" />
</Cursor>
</File>
<File name="..\test_intrusive_flat_multimap.cpp" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11909" topLine="350" />
</Cursor>
</File>
<File name="..\test_iterator.cpp" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\test_iterator.cpp" open="0" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6722" topLine="118" />
</Cursor>
</File>
<File name="..\..\src\intrusive_flat_set.h" open="1" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7487" topLine="243" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\TestRunner.h" open="0" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="156" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\intrusive_flat_multimap.h" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\intrusive_flat_map.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3269" topLine="248" />
<Cursor1 position="4065" topLine="242" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\CurrentTest.cpp" open="0" top="0" tabpos="26" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -137,24 +27,29 @@
<Cursor1 position="368" topLine="0" />
</Cursor>
</File>
<File name="..\main.cpp" open="1" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\..\unittest-cpp\UnitTest++\Config.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="141" topLine="0" />
<Cursor1 position="792" topLine="7" />
</Cursor>
</File>
<File name="..\test_flat_map.cpp" open="1" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\test_intrusive_list.cpp" open="0" top="0" tabpos="24" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="18781" topLine="559" />
<Cursor1 position="27580" topLine="735" />
</Cursor>
</File>
<File name="..\test_intrusive_flat_multiset.cpp" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\test_flat_set.cpp" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3073" topLine="66" />
<Cursor1 position="11541" topLine="359" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\TestMacros.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\..\unittest-cpp\UnitTest++\ExecuteTest.h" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1865" topLine="28" />
<Cursor1 position="426" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\intrusive_flat_set.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7487" topLine="243" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\TestResults.cpp" open="0" top="0" tabpos="24" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -162,9 +57,49 @@
<Cursor1 position="537" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\iterator.h" open="1" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\intrusive_flat_multimap.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1557" topLine="0" />
<Cursor1 position="3269" topLine="248" />
</Cursor>
</File>
<File name="..\test_flat_map.cpp" open="0" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="18781" topLine="559" />
</Cursor>
</File>
<File name="..\..\src\binary.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14624" topLine="373" />
</Cursor>
</File>
<File name="..\..\src\list.h" open="0" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="35098" topLine="1063" />
</Cursor>
</File>
<File name="..\test_memory.cpp" open="0" top="0" tabpos="25" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="15446" topLine="391" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\TestReporterStdout.cpp" open="0" top="0" tabpos="25" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="883" topLine="0" />
</Cursor>
</File>
<File name="..\test_list.cpp" open="0" top="0" tabpos="27" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="17914" topLine="493" />
</Cursor>
</File>
<File name="..\test_flat_multiset.cpp" open="0" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3011" topLine="58" />
</Cursor>
</File>
<File name="..\main.cpp" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="141" topLine="0" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\Win32\TimeHelpers.cpp" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -172,24 +107,69 @@
<Cursor1 position="103" topLine="6" />
</Cursor>
</File>
<File name="..\test_intrusive_list.cpp" open="1" top="0" tabpos="24" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\test_io_port.cpp" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="27580" topLine="735" />
<Cursor1 position="1452" topLine="3" />
</Cursor>
</File>
<File name="..\..\src\integral_limits.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\src\integral_limits.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7252" topLine="152" />
</Cursor>
</File>
<File name="..\..\src\list.h" open="1" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\test_intrusive_forward_list.cpp" open="0" top="0" tabpos="26" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="35098" topLine="1063" />
<Cursor1 position="27667" topLine="693" />
</Cursor>
</File>
<File name="..\..\src\intrusive_flat_multiset.h" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\..\unittest-cpp\UnitTest++\TestMacros.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1865" topLine="28" />
</Cursor>
</File>
<File name="..\test_map.cpp" open="0" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6368" topLine="164" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\TestRunner.cpp" open="0" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2279" topLine="25" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\Test.cpp" open="0" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="699" topLine="0" />
</Cursor>
</File>
<File name="..\test_algorithm.cpp" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11590" topLine="274" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\Checks.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="469" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\iterator.h" open="0" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1557" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\algorithm.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="..\..\src\intrusive_flat_multiset.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7605" topLine="248" />
</Cursor>
</File>
<File name="..\test_forward_list.cpp" open="0" top="0" tabpos="23" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8440" topLine="209" />
</Cursor>
</File>
</CodeBlocks_layout_file>

View File

@ -40,7 +40,7 @@ SOFTWARE.
#include "data.h"
#include "intrusive_flat_map.h"
#include "reference_flat_map.h"
namespace
{
@ -52,10 +52,10 @@ namespace
typedef std::pair<int, DC> ElementDC;
typedef std::pair<int, NDC> ElementNDC;
typedef etl::intrusive_flat_map<int, DC, SIZE> DataDC;
typedef etl::intrusive_flat_map<int, NDC, SIZE> DataNDC;
typedef etl::iintrusive_flat_map<int, DC> IDataDC;
typedef etl::iintrusive_flat_map<int, NDC> IDataNDC;
typedef etl::reference_flat_map<int, DC, SIZE> DataDC;
typedef etl::reference_flat_map<int, NDC, SIZE> DataNDC;
typedef etl::ireference_flat_map<int, DC> IDataDC;
typedef etl::ireference_flat_map<int, NDC> IDataNDC;
typedef std::map<int, DC> Compare_DataDC;
typedef std::map<int, NDC> Compare_DataNDC;
@ -344,7 +344,7 @@ namespace
{
DataNDC data(initial_data.begin(), initial_data.end());
CHECK_THROW(data.at(10), etl::intrusive_flat_map_out_of_bounds);
CHECK_THROW(data.at(10), etl::reference_flat_map_out_of_bounds);
}
//*************************************************************************
@ -370,7 +370,7 @@ namespace
{
const DataNDC data(initial_data.begin(), initial_data.end());
CHECK_THROW(data.at(10), etl::intrusive_flat_map_out_of_bounds);
CHECK_THROW(data.at(10), etl::reference_flat_map_out_of_bounds);
}
@ -514,7 +514,7 @@ namespace
DataNDC data(initial_data.begin(), initial_data.end());
DataNDC::value_type item10(10, N10);
CHECK_THROW(data.insert(item10), etl::intrusive_flat_map_full);
CHECK_THROW(data.insert(item10), etl::reference_flat_map_full);
}
//*************************************************************************
@ -538,7 +538,7 @@ namespace
{
DataNDC data;
CHECK_THROW(data.insert(excess_data.begin(), excess_data.end()), etl::intrusive_flat_map_full);
CHECK_THROW(data.insert(excess_data.begin(), excess_data.end()), etl::reference_flat_map_full);
}
//*************************************************************************

View File

@ -38,7 +38,7 @@ SOFTWARE.
#include "data.h"
#include "intrusive_flat_multimap.h"
#include "reference_flat_multimap.h"
namespace
{
@ -50,10 +50,10 @@ namespace
typedef std::pair<int, DC> ElementDC;
typedef std::pair<int, NDC> ElementNDC;
typedef etl::intrusive_flat_multimap<int, DC, SIZE> DataDC;
typedef etl::intrusive_flat_multimap<int, NDC, SIZE> DataNDC;
typedef etl::iintrusive_flat_multimap<int, DC> IDataDC;
typedef etl::iintrusive_flat_multimap<int, NDC> IDataNDC;
typedef etl::reference_flat_multimap<int, DC, SIZE> DataDC;
typedef etl::reference_flat_multimap<int, NDC, SIZE> DataNDC;
typedef etl::ireference_flat_multimap<int, DC> IDataDC;
typedef etl::ireference_flat_multimap<int, NDC> IDataNDC;
typedef std::multimap<int, DC> Compare_DataDC;
typedef std::multimap<int, NDC> Compare_DataNDC;
@ -134,7 +134,7 @@ namespace
return os;
}
SUITE(test_intrusive_flat_multimap)
SUITE(test_reference_flat_multimap)
{
//*************************************************************************
struct SetupFixture
@ -336,7 +336,7 @@ namespace
DataNDC data(initial_data.begin(), initial_data.end());
DataNDC::value_type item10(10, N10);
CHECK_THROW(data.insert(item10), etl::intrusive_flat_multimap_full);
CHECK_THROW(data.insert(item10), etl::reference_flat_multimap_full);
CHECK(std::is_sorted(data.begin(), data.end()));
}
@ -364,7 +364,7 @@ namespace
{
DataNDC data;
CHECK_THROW(data.insert(excess_data.begin(), excess_data.end()), etl::intrusive_flat_multimap_full);
CHECK_THROW(data.insert(excess_data.begin(), excess_data.end()), etl::reference_flat_multimap_full);
CHECK(std::is_sorted(data.begin(), data.end()));
}

View File

@ -38,7 +38,7 @@ SOFTWARE.
#include "data.h"
#include "intrusive_flat_multiset.h"
#include "reference_flat_multiset.h"
namespace
{
@ -47,9 +47,9 @@ namespace
typedef TestDataDC<std::string> DC;
typedef TestDataNDC<std::string> NDC;
typedef etl::intrusive_flat_multiset<DC, SIZE> DataDC;
typedef etl::intrusive_flat_multiset<NDC, SIZE> DataNDC;
typedef etl::iintrusive_flat_multiset<NDC> IDataNDC;
typedef etl::reference_flat_multiset<DC, SIZE> DataDC;
typedef etl::reference_flat_multiset<NDC, SIZE> DataNDC;
typedef etl::ireference_flat_multiset<NDC> IDataNDC;
typedef std::multiset<DC> Compare_DataDC;
typedef std::multiset<NDC> Compare_DataNDC;
@ -305,7 +305,7 @@ namespace
{
DataNDC data(initial_data.begin(), initial_data.end());
CHECK_THROW(data.insert(N10), etl::intrusive_flat_multiset_full);
CHECK_THROW(data.insert(N10), etl::reference_flat_multiset_full);
CHECK(std::is_sorted(data.begin(), data.end()));
}
@ -333,7 +333,7 @@ namespace
{
DataNDC data;
CHECK_THROW(data.insert(excess_data.begin(), excess_data.end()), etl::intrusive_flat_multiset_full);
CHECK_THROW(data.insert(excess_data.begin(), excess_data.end()), etl::reference_flat_multiset_full);
CHECK(std::is_sorted(data.begin(), data.end()));
}

View File

@ -38,7 +38,7 @@ SOFTWARE.
#include "data.h"
#include "intrusive_flat_set.h"
#include "reference_flat_set.h"
namespace
{
@ -47,9 +47,9 @@ namespace
typedef TestDataDC<std::string> DC;
typedef TestDataNDC<std::string> NDC;
typedef etl::intrusive_flat_set<DC, SIZE> DataDC;
typedef etl::intrusive_flat_set<NDC, SIZE> DataNDC;
typedef etl::iintrusive_flat_set<NDC> IDataNDC;
typedef etl::reference_flat_set<DC, SIZE> DataDC;
typedef etl::reference_flat_set<NDC, SIZE> DataNDC;
typedef etl::ireference_flat_set<NDC> IDataNDC;
typedef std::set<DC> Compare_DataDC;
typedef std::set<NDC> Compare_DataNDC;
@ -297,7 +297,7 @@ namespace
{
DataNDC data(initial_data.begin(), initial_data.end());
CHECK_THROW(data.insert(N10), etl::intrusive_flat_set_full);
CHECK_THROW(data.insert(N10), etl::reference_flat_set_full);
CHECK(std::is_sorted(data.begin(), data.end()));
}
@ -325,7 +325,7 @@ namespace
{
DataNDC data;
CHECK_THROW(data.insert(excess_data.begin(), excess_data.end()), etl::intrusive_flat_set_full);
CHECK_THROW(data.insert(excess_data.begin(), excess_data.end()), etl::reference_flat_set_full);
CHECK(std::is_sorted(data.begin(), data.end()));
}

View File

@ -197,10 +197,6 @@
<ClInclude Include="..\..\src\ihash.h" />
<ClInclude Include="..\..\src\instance_count.h" />
<ClInclude Include="..\..\src\integral_limits.h" />
<ClInclude Include="..\..\src\intrusive_flat_map.h" />
<ClInclude Include="..\..\src\intrusive_flat_multimap.h" />
<ClInclude Include="..\..\src\intrusive_flat_multiset.h" />
<ClInclude Include="..\..\src\intrusive_flat_set.h" />
<ClInclude Include="..\..\src\intrusive_forward_list.h" />
<ClInclude Include="..\..\src\intrusive_links.h" />
<ClInclude Include="..\..\src\intrusive_list.h" />
@ -238,6 +234,10 @@
<ClInclude Include="..\..\src\queue.h" />
<ClInclude Include="..\..\src\radix.h" />
<ClInclude Include="..\..\src\random.h" />
<ClInclude Include="..\..\src\reference_flat_map.h" />
<ClInclude Include="..\..\src\reference_flat_multimap.h" />
<ClInclude Include="..\..\src\reference_flat_multiset.h" />
<ClInclude Include="..\..\src\reference_flat_set.h" />
<ClInclude Include="..\..\src\rr_cache.h" />
<ClInclude Include="..\..\src\set.h" />
<ClInclude Include="..\..\src\smallest.h" />
@ -336,12 +336,6 @@
<ClCompile Include="..\test_hash.cpp" />
<ClCompile Include="..\test_instance_count.cpp" />
<ClCompile Include="..\test_integral_limits.cpp" />
<ClCompile Include="..\test_intrusive_flat_map.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\test_intrusive_flat_multimap.cpp" />
<ClCompile Include="..\test_intrusive_flat_multiset.cpp" />
<ClCompile Include="..\test_intrusive_flat_set.cpp" />
<ClCompile Include="..\test_intrusive_forward_list.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
</ClCompile>
@ -388,6 +382,10 @@
<ClCompile Include="..\test_random.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\test_reference_flat_map.cpp" />
<ClCompile Include="..\test_reference_flat_multimap.cpp" />
<ClCompile Include="..\test_reference_flat_multiset.cpp" />
<ClCompile Include="..\test_reference_flat_set.cpp" />
<ClCompile Include="..\test_set.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>

View File

@ -423,24 +423,24 @@
<ClInclude Include="..\..\src\memory.h">
<Filter>ETL\Utilities</Filter>
</ClInclude>
<ClInclude Include="..\..\src\intrusive_flat_map.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
<ClInclude Include="..\..\src\intrusive_flat_multimap.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
<ClInclude Include="..\..\src\intrusive_flat_multiset.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
<ClInclude Include="..\..\src\intrusive_flat_set.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
<ClInclude Include="..\..\src\message_processor.h">
<Filter>ETL\Patterns</Filter>
</ClInclude>
<ClInclude Include="..\..\src\message_processor_generator.h">
<Filter>ETL\Patterns</Filter>
</ClInclude>
<ClInclude Include="..\..\src\reference_flat_map.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
<ClInclude Include="..\..\src\reference_flat_multimap.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
<ClInclude Include="..\..\src\reference_flat_multiset.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
<ClInclude Include="..\..\src\reference_flat_set.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\unittest-cpp\UnitTest++\AssertException.cpp">
@ -752,16 +752,16 @@
<ClCompile Include="..\test_vector_non_trivial.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test_intrusive_flat_map.cpp">
<ClCompile Include="..\test_reference_flat_map.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test_intrusive_flat_multimap.cpp">
<ClCompile Include="..\test_reference_flat_multimap.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test_intrusive_flat_set.cpp">
<ClCompile Include="..\test_reference_flat_multiset.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test_intrusive_flat_multiset.cpp">
<ClCompile Include="..\test_reference_flat_set.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>