Added flat_map & flat_set.

This commit is contained in:
jwellbelove 2015-02-23 21:13:55 +00:00
parent 124ce96b07
commit b84f507304
19 changed files with 2200 additions and 582 deletions

View File

@ -4,8 +4,9 @@
The MIT License(MIT)
Embedded Template Library.
https://github.com/ETLCPP/etl
Copyright(c) 2014 jwellbelove
Copyright(c) 2015 jwellbelove
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
@ -49,7 +50,9 @@ namespace etl
template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = std::less<TKey>>
//***************************************************************************
/// A flat_map implementation that uses a fixed size buffer.
///\tparam T The element type.
///\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 flat_map
//***************************************************************************

View File

@ -4,8 +4,9 @@
The MIT License(MIT)
Embedded Template Library.
https://github.com/ETLCPP/etl
Copyright(c) 2014 jwellbelove
Copyright(c) 2015 jwellbelove
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal

105
flat_set.h Normal file
View File

@ -0,0 +1,105 @@
///\file
/******************************************************************************
The MIT License(MIT)
Embedded Template Library.
https://github.com/ETLCPP/etl
Copyright(c) 2015 jwellbelove
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions :
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
******************************************************************************/
#ifndef __ETL_FLAT_SET__
#define __ETL_FLAT_SET__
#include <stddef.h>
#include <iterator>
#include <functional>
#include "iflat_set.h"
#include "vector.h"
//*****************************************************************************
///\defgroup flat_set flat_set
/// A flat_set with the capacity defined at compile time.
/// Has insertion of O(N) and flat_set of O(logN)
/// Duplicate entries and not allowed.
///\ingroup containers
//*****************************************************************************
namespace etl
{
template <typename T, const size_t MAX_SIZE_, typename TCompare = std::less<T>>
//***************************************************************************
/// A flat_set implementation that uses a fixed size buffer.
///\tparam T The value type.
///\tparam TCompare The type to compare keys. Default = std::less<T>
///\tparam MAX_SIZE_ The maximum number of elements that can be stored.
///\ingroup flat_set
//***************************************************************************
class flat_set : public iflat_set<T, TCompare>
{
public:
static const size_t MAX_SIZE = MAX_SIZE_;
//*************************************************************************
/// Constructor.
//*************************************************************************
flat_set()
: iflat_set<T, TCompare>(buffer)
{
}
//*************************************************************************
/// Constructor, from an iterator range.
///\tparam TIterator The iterator type.
///\param first The iterator to the first element.
///\param last The iterator to the last element + 1.
//*************************************************************************
template <typename TIterator>
flat_set(TIterator first, TIterator last)
: iflat_set<T, TCompare>(buffer)
{
iflat_set<T, TCompare>::insert(first, last);
}
//*************************************************************************
/// Assignment operator.
//*************************************************************************
flat_set& operator = (const flat_set& rhs)
{
if (&rhs != this)
{
iflat_set<T, TCompare>::clear();
iflat_set<T, TCompare>::insert(rhs.cbegin(), rhs.cend());
}
return *this;
}
private:
etl::vector<T, MAX_SIZE> buffer; ///<The vector that stores the elements.
};
}
#endif

182
flat_set_base.h Normal file
View File

@ -0,0 +1,182 @@
///\file
/******************************************************************************
The MIT License(MIT)
Embedded Template Library.
https://github.com/ETLCPP/etl
Copyright(c) 2015 jwellbelove
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions :
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
******************************************************************************/
#ifndef __ETL_IN_IFLAT_SET_H__
#error This header is a private element of etl::flat_set & etl::iflat_set
#endif
#ifndef __ETL_FLAT_SET_BASE__
#define __ETL_FLAT_SET_BASE__
#include <stddef.h>
#include "exception.h"
#include "ivector.h"
#ifndef ETL_THROW_EXCEPTIONS
#include "error_handler.h"
#endif
namespace etl
{
//***************************************************************************
///\ingroup flat_set
/// Exception base for flat_sets
//***************************************************************************
class flat_set_exception : public exception
{
public:
flat_set_exception(const char* what)
: exception(what)
{
}
};
//***************************************************************************
///\ingroup flat_set
/// Vector full exception.
//***************************************************************************
class flat_set_full : public flat_set_exception
{
public:
flat_set_full()
: flat_set_exception("flat_set: full")
{
}
};
//***************************************************************************
///\ingroup flat_set
/// Vector out of bounds exception.
//***************************************************************************
class flat_set_out_of_bounds : public flat_set_exception
{
public:
flat_set_out_of_bounds()
: flat_set_exception("flat_set: out of bounds")
{
}
};
//***************************************************************************
///\ingroup flat_set
/// Vector iterator exception.
//***************************************************************************
class flat_set_iterator : public flat_set_exception
{
public:
flat_set_iterator()
: flat_set_exception("flat_set: iterator error")
{
}
};
//***************************************************************************
///\ingroup flat_set
/// The base class for all templated flat_set types.
//***************************************************************************
class flat_set_base
{
public:
typedef size_t size_type;
//*************************************************************************
/// Gets the current size of the flat_set.
///\return The current size of the flat_set.
//*************************************************************************
size_type size() const
{
return vbase.size();
}
//*************************************************************************
/// Checks the 'empty' state of the flat_set.
///\return <b>true</b> if empty.
//*************************************************************************
bool empty() const
{
return vbase.empty();
}
//*************************************************************************
/// Checks the 'full' state of the flat_set.
///\return <b>true</b> if full.
//*************************************************************************
bool full() const
{
return vbase.full();
}
//*************************************************************************
/// Returns the capacity of the flat_set.
///\return The capacity of the flat_set.
//*************************************************************************
size_type capacity() const
{
return vbase.capacity();
}
//*************************************************************************
/// Returns the maximum possible size of the flat_set.
///\return The maximum size of the flat_set.
//*************************************************************************
size_type max_size() const
{
return vbase.max_size();
}
//*************************************************************************
/// Returns the remaining capacity.
///\return The remaining capacity.
//*************************************************************************
size_t available() const
{
return vbase.available();
}
protected:
//*************************************************************************
/// Constructor.
//*************************************************************************
flat_set_base(vector_base& vbase)
: vbase(vbase)
{
}
vector_base& vbase;
};
}
#endif

View File

@ -4,8 +4,9 @@
The MIT License(MIT)
Embedded Template Library.
https://github.com/ETLCPP/etl
Copyright(c) 2014 jwellbelove
Copyright(c) 2015 jwellbelove
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
@ -52,7 +53,7 @@ namespace etl
/// Can be used as a reference type for all flat_maps containing a specific type.
///\ingroup flat_map
//***************************************************************************
template <typename TKey, typename TMapped, typename TKeyCompare>
template <typename TKey, typename TMapped, typename TKeyCompare = std::less<TKey>>
class iflat_map : public flat_map_base
{
public:
@ -80,17 +81,26 @@ namespace etl
typedef typename std::iterator_traits<iterator>::difference_type difference_type;
protected:
typedef typename parameter_type<TKey>::type key_value_parameter_t;
//*************************************************************************
/// How to compare elements.
//*************************************************************************
struct compare_element
private:
//*********************************************************************
/// How to compare elements and keys.
//*********************************************************************
class compare
{
bool operator ()(const value_type& value1, const value_type& value2) const
public:
bool operator ()(const value_type& element, key_type key) const
{
return key_compare()(value1.first, value2.first);
return key_compare()(element.first, key);
}
bool operator ()(key_type key, const value_type& element) const
{
return key_compare()(key, element.first);
}
};
@ -224,12 +234,12 @@ namespace etl
//*********************************************************************
mapped_type& operator [](key_value_parameter_t key)
{
iterator i_element = std::lower_bound(begin(), end(), value_type(key, TMapped()), compare_element());
iterator i_element = lower_bound(key);
if (i_element->first != key)
{
// Doesn't exist, so create a new one.
i_element = insert(std::make_pair(key, mapped_type()));
i_element = insert(std::make_pair(key, mapped_type())).first;
}
return i_element->second;
@ -243,7 +253,7 @@ namespace etl
//*********************************************************************
mapped_type& at(key_value_parameter_t key)
{
iterator i_element = std::lower_bound(begin(), end(), value_type(key, TMapped()), compare_element());
iterator i_element = lower_bound(key);
if (i_element == end())
{
@ -267,7 +277,7 @@ namespace etl
//*********************************************************************
const mapped_type& at(key_value_parameter_t key) const
{
typename buffer_t::const_iterator i_element = std::lower_bound(begin(), end(), value_type(key, TMapped()), compare_element());
typename buffer_t::const_iterator i_element = lower_bound(key);
if (i_element == end())
{
@ -304,12 +314,13 @@ namespace etl
//*********************************************************************
/// Inserts a value to the flat_map.
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_map_full if the flat_map is already full.
///\param position The position to insert at.
///\param value The value to insert.
//*********************************************************************
iterator insert(const value_type& value)
std::pair<iterator, bool> insert(const value_type& value)
{
iterator i_element = std::lower_bound(begin(), end(), value, compare_element());
std::pair<iterator, bool> result(end(), false);
iterator i_element = lower_bound(value.first);
if (i_element == end())
{
@ -325,6 +336,8 @@ namespace etl
else
{
buffer.push_back(value);
result.first = end() - 1;
result.second = true;
}
}
else
@ -335,6 +348,8 @@ namespace etl
{
// Yes.
i_element->second = value.second;
result.first = i_element;
result.second = false;
}
else
{
@ -350,11 +365,24 @@ namespace etl
else
{
buffer.insert(i_element, value);
result.first = i_element;
result.second = true;
}
}
}
return i_element;
return result;
}
//*********************************************************************
/// Inserts a value to the flat_set.
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_set_full if the flat_set is already full.
///\param position The position to insert at.
///\param value The value to insert.
//*********************************************************************
iterator insert(iterator position, const value_type& value)
{
return insert(value).first;
}
//*********************************************************************
@ -375,12 +403,31 @@ namespace etl
//*********************************************************************
/// Erases an element.
///\param i_element Iterator to the element.
///\return An iterator pointing to the element that followed the erased element.
///\param key The key to erase.
///\return The number of elements erased. 0 or 1.
//*********************************************************************
iterator erase(iterator i_element)
size_t erase(key_value_parameter_t key)
{
return buffer.erase(i_element);
iterator i_element = find(key);
if (i_element == end())
{
return 0;
}
else
{
buffer.erase(i_element);
return 1;
}
}
//*********************************************************************
/// Erases an element.
///\param i_element Iterator to the element.
//*********************************************************************
void erase(iterator i_element)
{
buffer.erase(i_element);
}
//*********************************************************************
@ -389,11 +436,10 @@ namespace etl
/// element pointed by first, but not the one pointed by last.
///\param first Iterator to the first element.
///\param last Iterator to the last element.
///\return An iterator pointing to the element that followed the erased element.
//*********************************************************************
iterator erase(iterator first, iterator last)
void erase(iterator first, iterator last)
{
return buffer.erase(first, last);
buffer.erase(first, last);
}
//*************************************************************************
@ -411,7 +457,7 @@ namespace etl
//*********************************************************************
iterator find(key_value_parameter_t key)
{
return std::lower_bound(begin(), end(), value_type(key, TMapped()), compare_element());
return lower_bound(key);
}
//*********************************************************************
@ -421,7 +467,81 @@ namespace etl
//*********************************************************************
const_iterator find(key_value_parameter_t key) const
{
return std::lower_bound(begin(), end(), value_type(key, TMapped()), compare_element());
return lower_bound(key);
}
//*********************************************************************
/// Counts an element.
///\param key The key to search for.
///\return 1 if the key exists, otherwise 0.
//*********************************************************************
size_t count(key_value_parameter_t key) const
{
return (find(key == end()) ? 0 : 1);
}
//*********************************************************************
/// Finds the lower bound of a key
///\param key The key to search for.
///\return An iterator.
//*********************************************************************
iterator lower_bound(key_value_parameter_t key)
{
return std::lower_bound(begin(), end(), key, compare());
}
//*********************************************************************
/// Finds the lower bound of a key
///\param key The key to search for.
///\return An iterator.
//*********************************************************************
const_iterator lower_bound(key_value_parameter_t key) const
{
return std::lower_bound(cbegin(), cend(), key, compare());
}
//*********************************************************************
/// Finds the upper bound of a key
///\param key The key to search for.
///\return An iterator.
//*********************************************************************
iterator upper_bound(key_value_parameter_t key)
{
return std::upper_bound(begin(), end(), key, compare());
}
//*********************************************************************
/// Finds the upper bound of a key
///\param key The key to search for.
///\return An iterator.
//*********************************************************************
const_iterator upper_bound(key_value_parameter_t key) const
{
return std::upper_bound(begin(), end(), key, compare());
}
//*********************************************************************
/// Finds the range of equal elements of a key
///\param key The key to search for.
///\return An iterator pair.
//*********************************************************************
std::pair<iterator, iterator> equal_range(key_value_parameter_t key)
{
iterator i_lower = std::lower_bound(begin(), end(), key, compare());
return std::make_pair(i_lower, std::upper_bound(i_lower, end(), key, compare()));
}
//*********************************************************************
/// Finds the range of equal elements of a key
///\param key The key to search for.
///\return An iterator pair.
//*********************************************************************
std::pair<const_iterator, const_iterator> equal_range(key_value_parameter_t key) const
{
const_iterator i_lower = std::lower_bound(cbegin(), cend(), key, compare());
return std::make_pair(i_lower, std::upper_bound(i_lower, cend(), key, compare()));
}
protected:

496
iflat_set.h Normal file
View File

@ -0,0 +1,496 @@
///\file
/******************************************************************************
The MIT License(MIT)
Embedded Template Library.
https://github.com/ETLCPP/etl
Copyright(c) 2015 jwellbelove
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions :
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
******************************************************************************/
#ifndef __ETL_IFLAT_SET__
#define __ETL_IFLAT_SET__
#define __ETL_IN_IFLAT_SET_H__
#include <iterator>
#include <algorithm>
#include <functional>
#include <utility>
#include <stddef.h>
#include "flat_set_base.h"
#include "type_traits.h"
#include "parameter_type.h"
#include "ivector.h"
#ifndef ETL_THROW_EXCEPTIONS
#include "error_handler.h"
#endif
namespace etl
{
//***************************************************************************
/// The base class for specifically sized flat_sets.
/// Can be used as a reference type for all flat_sets containing a specific type.
///\ingroup flat_set
//***************************************************************************
template <typename T, typename TKeyCompare = std::less<T>>
class iflat_set : public flat_set_base
{
private:
typedef etl::ivector<T> buffer_t;
public:
typedef T key_type;
typedef T value_type;
typedef TKeyCompare key_compare;
typedef value_type& reference;
typedef const value_type& const_reference;
typedef value_type* pointer;
typedef const value_type* const_pointer;
typedef typename buffer_t::iterator iterator;
typedef typename buffer_t::const_iterator const_iterator;
typedef typename buffer_t::reverse_iterator reverse_iterator;
typedef typename buffer_t::const_reverse_iterator const_reverse_iterator;
typedef size_t size_type;
typedef typename std::iterator_traits<iterator>::difference_type difference_type;
protected:
typedef typename parameter_type<T>::type parameter_t;
public:
//*********************************************************************
/// Assignment operator.
/// The source flat_set can be larger than the destination, but
/// only the elements that will fit in the destination will be copied.
///\param other The other flat_set.
//*********************************************************************
iflat_set& operator = (iflat_set& other)
{
buffer.operator=(other.buffer);
return *this;
}
//*********************************************************************
/// Returns an iterator to the beginning of the flat_set.
///\return An iterator to the beginning of the flat_set.
//*********************************************************************
iterator begin()
{
return buffer.begin();
}
//*********************************************************************
/// Returns a const_iterator to the beginning of the flat_set.
///\return A const iterator to the beginning of the flat_set.
//*********************************************************************
const_iterator begin() const
{
return buffer.begin();
}
//*********************************************************************
/// Returns an iterator to the end of the flat_set.
///\return An iterator to the end of the flat_set.
//*********************************************************************
iterator end()
{
return buffer.end();
}
//*********************************************************************
/// Returns a const_iterator to the end of the flat_set.
///\return A const iterator to the end of the flat_set.
//*********************************************************************
const_iterator end() const
{
return buffer.end();
}
//*********************************************************************
/// Returns a const_iterator to the beginning of the flat_set.
///\return A const iterator to the beginning of the flat_set.
//*********************************************************************
const_iterator cbegin() const
{
return buffer.cbegin();
}
//*********************************************************************
/// Returns a const_iterator to the end of the flat_set.
///\return A const iterator to the end of the flat_set.
//*********************************************************************
const_iterator cend() const
{
return buffer.cend();
}
//*********************************************************************
/// Returns an reverse iterator to the reverse beginning of the flat_set.
///\return Iterator to the reverse beginning of the flat_set.
//*********************************************************************
reverse_iterator rbegin()
{
return buffer.rbegin();
}
//*********************************************************************
/// Returns a const reverse iterator to the reverse beginning of the flat_set.
///\return Const iterator to the reverse beginning of the flat_set.
//*********************************************************************
const_reverse_iterator rbegin() const
{
return buffer.rbegin();
}
//*********************************************************************
/// Returns a reverse iterator to the end + 1 of the flat_set.
///\return Reverse iterator to the end + 1 of the flat_set.
//*********************************************************************
reverse_iterator rend()
{
return buffer.rend();
}
//*********************************************************************
/// Returns a const reverse iterator to the end + 1 of the flat_set.
///\return Const reverse iterator to the end + 1 of the flat_set.
//*********************************************************************
const_reverse_iterator rend() const
{
return buffer.rend();
}
//*********************************************************************
/// Returns a const reverse iterator to the reverse beginning of the flat_set.
///\return Const reverse iterator to the reverse beginning of the flat_set.
//*********************************************************************
const_reverse_iterator crbegin() const
{
return buffer.crbegin();
}
//*********************************************************************
/// Returns a const reverse iterator to the end + 1 of the flat_set.
///\return Const reverse iterator to the end + 1 of the flat_set.
//*********************************************************************
const_reverse_iterator crend() const
{
return buffer.crend();
}
//*********************************************************************
/// Assigns values to the flat_set.
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_set_full if the flat_set does not have enough free space.
/// If ETL_THROW_EXCEPTIONS is defined, emits 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.
//*********************************************************************
template <typename TIterator>
void assign(TIterator first, TIterator last)
{
clear();
while (first != last)
{
insert(*first++);
}
}
//*********************************************************************
/// Inserts a value to the flat_set.
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_set_full if the flat_set is already full.
///\param value The value to insert.
//*********************************************************************
std::pair<iterator, bool> insert(parameter_t value)
{
std::pair<iterator, bool> result(end(), false);
iterator i_element = std::lower_bound(begin(), end(), value, TKeyCompare());
if (i_element == end())
{
// At the end.
if (buffer.full())
{
#ifdef ETL_THROW_EXCEPTIONS
throw flat_set_full();
#else
error_handler::error(flat_set_full());
#endif
}
else
{
buffer.push_back(value);
result.first = end() - 1;
result.second = true;
}
}
else
{
// Not at the end.
// Existing element?
if (value == *i_element)
{
// Yes.
result.first = i_element;
result.second = false;
}
else
{
// A new one.
if (buffer.full())
{
#ifdef ETL_THROW_EXCEPTIONS
throw flat_set_full();
#else
error_handler::error(flat_set_full());
#endif
}
else
{
buffer.insert(i_element, value);
result.first = i_element;
result.second = true;
}
}
}
return result;
}
//*********************************************************************
/// Inserts a value to the flat_set.
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_set_full if the flat_set is already full.
///\param position The position to insert at.
///\param value The value to insert.
//*********************************************************************
iterator insert(iterator position, parameter_t value)
{
return insert(value).first;
}
//*********************************************************************
/// Inserts a range of values to the flat_set.
/// If ETL_THROW_EXCEPTIONS is defined, emits flat_set_full if the 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.
//*********************************************************************
template <class TIterator>
void insert(TIterator first, TIterator last)
{
while (first != last)
{
insert(*first++);
}
}
//*********************************************************************
/// Erases an element.
///\param key The key to erase.
///\return The number of elements erased. 0 or 1.
//*********************************************************************
size_t erase(parameter_t key)
{
iterator i_element = find(key);
if (i_element == end())
{
return 0;
}
else
{
buffer.erase(i_element);
return 1;
}
}
//*********************************************************************
/// Erases an element.
///\param i_element Iterator to the element.
//*********************************************************************
void erase(iterator i_element)
{
buffer.erase(i_element);
}
//*********************************************************************
/// Erases a range of elements.
/// The range includes all the elements between first and last, including the
/// element pointed by first, but not the one pointed by last.
///\param first Iterator to the first element.
///\param last Iterator to the last element.
//*********************************************************************
void erase(iterator first, iterator last)
{
buffer.erase(first, last);
}
//*************************************************************************
/// Clears the flat_set.
//*************************************************************************
void clear()
{
buffer.clear();
}
//*********************************************************************
/// Finds an element.
///\param key The key to search for.
///\return An iterator pointing to the element or end() if not found.
//*********************************************************************
iterator find(parameter_t key)
{
return std::lower_bound(begin(), end(), key, TKeyCompare());
}
//*********************************************************************
/// Finds an element.
///\param key The key to search for.
///\return An iterator pointing to the element or end() if not found.
//*********************************************************************
const_iterator find(parameter_t key) const
{
return std::lower_bound(begin(), end(), key, TKeyCompare());
}
//*********************************************************************
/// Counts an element.
///\param key The key to search for.
///\return 1 if the key exists, otherwise 0.
//*********************************************************************
size_t count(parameter_t key) const
{
return (find(key == end()) ? 0 : 1);
}
//*********************************************************************
/// Finds the lower bound of a key
///\param key The key to search for.
///\return An iterator.
//*********************************************************************
iterator lower_bound(parameter_t key)
{
return std::lower_bound(begin(), end(), key, TKeyCompare());
}
//*********************************************************************
/// Finds the lower bound of a key
///\param key The key to search for.
///\return An iterator.
//*********************************************************************
const_iterator lower_bound(parameter_t key) const
{
return std::lower_bound(cbegin(), cend(), key, TKeyCompare());
}
//*********************************************************************
/// Finds the upper bound of a key
///\param key The key to search for.
///\return An iterator.
//*********************************************************************
iterator upper_bound(parameter_t key)
{
return std::upper_bound(begin(), end(), key, TKeyCompare());
}
//*********************************************************************
/// Finds the upper bound of a key
///\param key The key to search for.
///\return An iterator.
//*********************************************************************
const_iterator upper_bound(parameter_t key) const
{
return std::upper_bound(cbegin(), cend(), key, TKeyCompare());
}
//*********************************************************************
/// Finds the range of equal elements of a key
///\param key The key to search for.
///\return An iterator pair.
//*********************************************************************
std::pair<iterator, iterator> equal_range(parameter_t key)
{
return std::equal_range(begin(), end(), key, TKeyCompare());
}
//*********************************************************************
/// Finds the range of equal elements of a key
///\param key The key to search for.
///\return An iterator pair.
//*********************************************************************
std::pair<const_iterator, const_iterator> equal_range(parameter_t key) const
{
return std::upper_bound(cbegin(), cend(), key, TKeyCompare());
}
protected:
//*********************************************************************
/// Constructor.
//*********************************************************************
iflat_set(buffer_t& buffer)
: flat_set_base(buffer),
buffer(buffer)
{
}
private:
buffer_t& buffer;
};
//***************************************************************************
/// Equal operator.
///\param lhs Reference to the first flat_set.
///\param rhs Reference to the second flat_set.
///\return <b>true</b> if the arrays are equal, otherwise <b>false</b>
///\ingroup flat_set
//***************************************************************************
template <typename T, typename TKeyCompare>
bool operator ==(const etl::iflat_set<T, TKeyCompare>& lhs, const etl::iflat_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 flat_set.
///\param rhs Reference to the second flat_set.
///\return <b>true</b> if the arrays are not equal, otherwise <b>false</b>
///\ingroup flat_set
//***************************************************************************
template <typename T, typename TKeyCompare>
bool operator !=(const etl::iflat_set<T, TKeyCompare>& lhs, const etl::iflat_set<T, TKeyCompare>& rhs)
{
return !(lhs == rhs);
}
}
#undef __ETL_IN_IFLAT_SET_H__
#endif

View File

@ -142,14 +142,20 @@
<Unit filename="../../exception.h" />
<Unit filename="../../factorial.h" />
<Unit filename="../../fibonacci.h" />
<Unit filename="../../flat_map.h" />
<Unit filename="../../flat_map_base.h" />
<Unit filename="../../flat_set.h" />
<Unit filename="../../flat_set_base.h" />
<Unit filename="../../forward_list.h" />
<Unit filename="../../forward_list_base.h" />
<Unit filename="../../function.h" />
<Unit filename="../../functional.h" />
<Unit filename="../../ideque.h" />
<Unit filename="../../iflat_map.h" />
<Unit filename="../../iflat_set.h" />
<Unit filename="../../iforward_list.h" />
<Unit filename="../../ihash.h" />
<Unit filename="../../ilist.h" />
<Unit filename="../../ilookup.h" />
<Unit filename="../../imap.h" />
<Unit filename="../../instance_count.h" />
<Unit filename="../../integral_limits.h" />
@ -199,6 +205,8 @@
<Unit filename="../test_error_handler.cpp" />
<Unit filename="../test_exception.cpp" />
<Unit filename="../test_fixed_iterator.cpp" />
<Unit filename="../test_flat_map.cpp" />
<Unit filename="../test_flat_set.cpp" />
<Unit filename="../test_fnv_1.cpp" />
<Unit filename="../test_forward_list.cpp" />
<Unit filename="../test_function.cpp" />
@ -208,7 +216,6 @@
<Unit filename="../test_integral_limits.cpp" />
<Unit filename="../test_largest.cpp" />
<Unit filename="../test_list.cpp" />
<Unit filename="../test_lookup.cpp" />
<Unit filename="../test_map.cpp" />
<Unit filename="../test_maths.cpp" />
<Unit filename="../test_numeric.cpp" />

View File

@ -161,7 +161,7 @@
1414845610 u:\users\john\documents\programming\github\unittest-cpp\unittest++\reportassert.h
"HelperMacros.h"
1423601008 source:u:\users\john\documents\programming\github\etl\test\test_array.cpp
1424300009 source:u:\users\john\documents\programming\github\etl\test\test_array.cpp
<UnitTest++/UnitTest++.h>
"../array.h"
<array>
@ -211,41 +211,47 @@
1414929413 ecma.h"
1423387319 u:\users\john\documents\programming\github\etl\crc8_ccitt.h
1424592745 u:\users\john\documents\programming\github\etl\crc8_ccitt.h
<stdint.h>
"static_assert.h"
"type_traits.h"
"endian.h"
"ihash.h"
1423387319 u:\users\john\documents\programming\github\etl\crc16.h
1424592745 u:\users\john\documents\programming\github\etl\crc16.h
<stdint.h>
"static_assert.h"
"type_traits.h"
"endian.h"
"ihash.h"
1423387319 u:\users\john\documents\programming\github\etl\crc16_ccitt.h
1424592745 u:\users\john\documents\programming\github\etl\crc16_ccitt.h
<stdint.h>
"static_assert.h"
"type_traits.h"
"endian.h"
"ihash.h"
1423387319 u:\users\john\documents\programming\github\etl\crc16_kermit.h
1424592745 u:\users\john\documents\programming\github\etl\crc16_kermit.h
<stdint.h>
"static_assert.h"
"type_traits.h"
"endian.h"
"ihash.h"
1423387319 u:\users\john\documents\programming\github\etl\crc32.h
1424592745 u:\users\john\documents\programming\github\etl\crc32.h
<stdint.h>
"static_assert.h"
"type_traits.h"
"endian.h"
"ihash.h"
1423387319 u:\users\john\documents\programming\github\etl\crc64_ecma.h
1424592745 u:\users\john\documents\programming\github\etl\crc64_ecma.h
<stdint.h>
"static_assert.h"
"type_traits.h"
"endian.h"
"ihash.h"
1418906587 source:u:\users\john\documents\programming\github\etl\test\test_cyclic_value.cpp
<UnitTest++/UnitTest++.h>
@ -261,9 +267,10 @@
1418906586 u:\users\john\documents\programming\github\etl\static_assert.h
1423602443 source:u:\users\john\documents\programming\github\etl\test\test_deque.cpp
1424031255 source:u:\users\john\documents\programming\github\etl\test\test_deque.cpp
<UnitTest++/UnitTest++.h>
"../deque.h"
"data.h"
<vector>
<deque>
<algorithm>
@ -280,7 +287,7 @@
"alignment.h"
"array.h"
1423602443 u:\users\john\documents\programming\github\etl\ideque.h
1424031255 u:\users\john\documents\programming\github\etl\ideque.h
<stddef.h>
<iterator>
"algorithm.h"
@ -447,7 +454,7 @@
"exception.h"
"error_handler.h"
1423387319 u:\users\john\documents\programming\github\etl\vector.h
1424300125 u:\users\john\documents\programming\github\etl\vector.h
<stddef.h>
<stdint.h>
<iterator>
@ -481,7 +488,7 @@
1415139315 h"
1423602443 u:\users\john\documents\programming\github\etl\queue.h
1424300125 u:\users\john\documents\programming\github\etl\queue.h
<stddef.h>
<stdint.h>
"iqueue.h"
@ -1061,7 +1068,7 @@
<bitset>
"../bitset.h"
1423602443 u:\users\john\documents\programming\github\etl\bitset.h
1424287554 u:\users\john\documents\programming\github\etl\bitset.h
<algorithm>
<iterator>
<string.h>
@ -1244,7 +1251,7 @@
1418906586 u:\users\john\documents\programming\github\etl\instance_count.h
1418906587 source:u:\users\john\documents\programming\github\etl\test\test_checksum.cpp
1424592745 source:u:\users\john\documents\programming\github\etl\test\test_checksum.cpp
<UnitTest++/UnitTest++.h>
<iterator>
<string>
@ -1253,11 +1260,12 @@
"../checksum.h"
"../endian.h"
1418906586 u:\users\john\documents\programming\github\etl\checksum.h
1424592745 u:\users\john\documents\programming\github\etl\checksum.h
<stdint.h>
"static_assert.h"
"type_traits.h"
"endian.h"
"ihash.h"
1418906587 source:u:\users\john\documents\programming\github\etl\test\test_fnv_1.cpp
<UnitTest++/UnitTest++.h>
@ -1268,11 +1276,12 @@
"../fnv_1.h"
"../endian.h"
1418906586 u:\users\john\documents\programming\github\etl\fnv_1.h
1424592745 u:\users\john\documents\programming\github\etl\fnv_1.h
<stdint.h>
"static_assert.h"
"type_traits.h"
"endian.h"
"ihash.h"
1418906587 source:u:\users\john\documents\programming\github\etl\test\test_endian.cpp
<UnitTest++/UnitTest++.h>
@ -1376,3 +1385,57 @@
1423602443 u:\users\john\documents\programming\github\etl\fixed_iterator.h
<iterator>
1424592745 u:\users\john\documents\programming\github\etl\ihash.h
<stdint.h>
<utility>
"exception.h"
"endian.h"
1424299637 source:u:\users\john\documents\programming\github\etl\test\test_binary.cpp
<UnitTest++/UnitTest++.h>
<cstdint>
"../binary.h"
"../bitset.h"
"../fnv_1.h"
1424286616 u:\users\john\documents\programming\github\etl\binary.h
"type_traits.h"
"integral_limits.h"
"static_assert.h"
1424383830 source:u:\users\john\documents\programming\github\etl\test\test_flat_map.cpp
<UnitTest++/UnitTest++.h>
<map>
<array>
<algorithm>
<utility>
<iterator>
<string>
<vector>
"../flat_map.h"
1424380279 u:\users\john\documents\programming\github\etl\flat_map.h
<stddef.h>
<iterator>
<functional>
"iflat_map.h"
"vector.h"
1424383918 u:\users\john\documents\programming\github\etl\iflat_map.h
<iterator>
<algorithm>
<functional>
<utility>
<stddef.h>
"flat_map_base.h"
"type_traits.h"
"parameter_type.h"
"ivector.h"
"error_handler.h"
1424299331 u:\users\john\documents\programming\github\etl\flat_map_base.h
<stddef.h>
"exception.h"
"ivector.h"
"error_handler.h"

View File

@ -1,99 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Windows" />
<File name="..\test_hash.cpp" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\static_assert.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4733" topLine="114" />
<Cursor1 position="1356" topLine="10" />
</Cursor>
</File>
<File name="..\test_integral_limits.cpp" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\test_deque.cpp" open="1" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1416" topLine="13" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\Config.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="773" topLine="0" />
</Cursor>
</File>
<File name="..\test_array.cpp" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2123" topLine="55" />
</Cursor>
</File>
<File name="..\..\deque.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4670" topLine="110" />
</Cursor>
</File>
<File name="..\test_type_traits.cpp" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="34843" topLine="428" />
</Cursor>
</File>
<File name="..\..\lookup.h" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3734" topLine="55" />
</Cursor>
</File>
<File name="..\..\map.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5955" topLine="137" />
</Cursor>
</File>
<File name="..\..\nullptr.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="560" topLine="78" />
</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">
<Cursor>
<Cursor1 position="257" topLine="0" />
</Cursor>
</File>
<File name="..\..\observer.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5579" topLine="130" />
</Cursor>
</File>
<File name="..\..\pool.h" open="1" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2334" topLine="35" />
</Cursor>
</File>
<File name="..\..\queue.h" open="1" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2984" topLine="48" />
</Cursor>
</File>
<File name="..\..\Doxyfile" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="56760" topLine="1251" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\Posix\SignalTranslator.h" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="616" topLine="0" />
</Cursor>
</File>
<File name="..\..\ilookup.h" open="1" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10573" topLine="244" />
</Cursor>
</File>
<File name="..\..\type_traits.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5782" topLine="136" />
</Cursor>
</File>
<File name="..\..\binary.h" open="1" top="1" tabpos="23" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4123" topLine="90" />
</Cursor>
</File>
<File name="..\..\bloom_filter.h" open="1" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3055" topLine="57" />
<Cursor1 position="21475" topLine="641" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\Test.cpp" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -101,14 +16,9 @@
<Cursor1 position="200" topLine="0" />
</Cursor>
</File>
<File name="..\main.cpp" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\deque.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="277" topLine="0" />
</Cursor>
</File>
<File name="..\test_lookup.cpp" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3867" topLine="101" />
<Cursor1 position="4670" topLine="110" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\TestMacros.h" open="1" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -116,14 +26,74 @@
<Cursor1 position="1865" topLine="28" />
</Cursor>
</File>
<File name="..\test_bloom_filter.cpp" open="1" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\test_array.cpp" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6035" topLine="180" />
<Cursor1 position="2123" topLine="55" />
</Cursor>
</File>
<File name="..\test_queue.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\imap.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1603" topLine="28" />
<Cursor1 position="60526" topLine="1708" />
</Cursor>
</File>
<File name="..\..\integral_limits.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2272" topLine="36" />
</Cursor>
</File>
<File name="..\..\lookup.h" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3734" topLine="55" />
</Cursor>
</File>
<File name="..\..\binary.h" open="1" top="1" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="12327" topLine="338" />
</Cursor>
</File>
<File name="..\..\map.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5955" topLine="137" />
</Cursor>
</File>
<File name="..\..\bloom_filter.h" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3055" topLine="57" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\Win32\TimeHelpers.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="245" topLine="0" />
</Cursor>
</File>
<File name="..\..\nullptr.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="560" topLine="78" />
</Cursor>
</File>
<File name="..\test_type_traits.cpp" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="34843" topLine="428" />
</Cursor>
</File>
<File name="..\..\observer.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5579" topLine="130" />
</Cursor>
</File>
<File name="..\..\pool.h" open="1" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2334" topLine="35" />
</Cursor>
</File>
<File name="..\..\queue.h" open="1" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2984" topLine="48" />
</Cursor>
</File>
<File name="..\..\type_traits.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5782" topLine="136" />
</Cursor>
</File>
<File name="..\test_cyclic_value.cpp" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -136,9 +106,9 @@
<Cursor1 position="3578" topLine="85" />
</Cursor>
</File>
<File name="..\..\list.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\..\unittest-cpp\UnitTest++\ExecuteTest.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5955" topLine="137" />
<Cursor1 position="355" topLine="0" />
</Cursor>
</File>
<File name="..\..\endian.h" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -146,14 +116,29 @@
<Cursor1 position="2235" topLine="37" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\Win32\TimeHelpers.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\main.cpp" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="245" topLine="0" />
<Cursor1 position="277" topLine="0" />
</Cursor>
</File>
<File name="..\test_deque.cpp" open="1" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\..\..\unittest-cpp\UnitTest++\Config.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="21475" topLine="641" />
<Cursor1 position="773" topLine="0" />
</Cursor>
</File>
<File name="..\test_bloom_filter.cpp" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6035" topLine="180" />
</Cursor>
</File>
<File name="..\test_hash.cpp" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4733" topLine="114" />
</Cursor>
</File>
<File name="..\test_integral_limits.cpp" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1416" topLine="13" />
</Cursor>
</File>
<File name="..\..\function.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -161,49 +146,39 @@
<Cursor1 position="3693" topLine="67" />
</Cursor>
</File>
<File name="..\..\list.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5955" topLine="137" />
</Cursor>
</File>
<File name="..\..\ideque.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="39747" topLine="1281" />
</Cursor>
</File>
<File name="..\..\stack.h" open="1" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3203" topLine="57" />
</Cursor>
</File>
<File name="..\..\ilist.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="17660" topLine="539" />
</Cursor>
</File>
<File name="..\..\static_assert.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1356" topLine="10" />
</Cursor>
</File>
<File name="..\..\array.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1998" topLine="258" />
</Cursor>
</File>
<File name="..\..\imap.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="60526" topLine="1708" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\ExecuteTest.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="355" topLine="0" />
</Cursor>
</File>
<File name="..\..\bitset.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4838" topLine="145" />
</Cursor>
</File>
<File name="..\..\integral_limits.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="..\test_queue.cpp" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2272" topLine="36" />
<Cursor1 position="1603" topLine="28" />
</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">
<Cursor>
<Cursor1 position="257" topLine="0" />
</Cursor>
</File>
<File name="..\..\ilist.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="17660" topLine="539" />
</Cursor>
</File>
<File name="..\..\container.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -211,4 +186,19 @@
<Cursor1 position="2523" topLine="42" />
</Cursor>
</File>
<File name="..\..\Doxyfile" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="56760" topLine="1251" />
</Cursor>
</File>
<File name="..\..\..\unittest-cpp\UnitTest++\Posix\SignalTranslator.h" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="616" topLine="0" />
</Cursor>
</File>
<File name="..\..\stack.h" open="1" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3203" topLine="57" />
</Cursor>
</File>
</CodeBlocks_layout_file>

View File

@ -61,6 +61,12 @@ bool operator == (const TestDataDC<T>& lhs, const TestDataDC<T>& rhs)
return lhs.value == rhs.value;
}
template <typename T>
bool operator != (const TestDataDC<T>& lhs, const TestDataDC<T>& rhs)
{
return lhs.value != rhs.value;
}
template <typename T>
std::ostream& operator << (std::ostream& s, const TestDataDC<T>& rhs)
{
@ -94,6 +100,12 @@ bool operator == (const TestDataNDC<T>& lhs, const TestDataNDC<T>& rhs)
return lhs.value == rhs.value;
}
template <typename T>
bool operator != (const TestDataNDC<T>& lhs, const TestDataNDC<T>& rhs)
{
return lhs.value != rhs.value;
}
template <typename T>
std::ostream& operator << (std::ostream& s, const TestDataNDC<T>& rhs)
{

View File

@ -2,7 +2,7 @@
<project>
<fileVersion>2</fileVersion>
<fileChecksum>3263002611</fileChecksum>
<fileChecksum>4054523468</fileChecksum>
<configuration>
<name>Debug</name>
<outputs>
@ -16,75 +16,6 @@
<file>$PROJ_DIR$\..\..\crc16.h</file>
<file>$PROJ_DIR$\..\..\crc16_ccitt.cpp</file>
<file>$PROJ_DIR$\..\..\crc16_kermit.cpp</file>
<file>$PROJ_DIR$\..\..\crc32.cpp</file>
<file>$PROJ_DIR$\..\..\crc16_kermit.h</file>
<file>$PROJ_DIR$\..\..\crc64_ecma.h</file>
<file>$PROJ_DIR$\..\..\crc32.h</file>
<file>$PROJ_DIR$\..\..\crc64_ecma.cpp</file>
<file>$PROJ_DIR$\..\..\crc8_ccitt.cpp</file>
<file>$PROJ_DIR$\..\..\crc8_ccitt.h</file>
<file>$PROJ_DIR$\..\..\cyclic_value.h</file>
<file>$PROJ_DIR$\..\..\doxygen.h</file>
<file>$PROJ_DIR$\..\..\deque.h</file>
<file>$PROJ_DIR$\..\..\deque_base.h</file>
<file>$PROJ_DIR$\..\..\exception.h</file>
<file>$PROJ_DIR$\..\..\endian.h</file>
<file>$PROJ_DIR$\..\..\enum_type.h</file>
<file>$PROJ_DIR$\..\..\error_handler.cpp</file>
<file>$PROJ_DIR$\..\..\error_handler.h</file>
<file>$PROJ_DIR$\..\..\factorial.h</file>
<file>$PROJ_DIR$\..\..\fibonacci.h</file>
<file>$PROJ_DIR$\..\..\forward_list.h</file>
<file>$PROJ_DIR$\..\..\functional.h</file>
<file>$PROJ_DIR$\..\..\forward_list_base.h</file>
<file>$PROJ_DIR$\..\..\function.h</file>
<file>$TOOLKIT_DIR$\inc\c\ymath.h</file>
<file>$PROJ_DIR$\..\..\ideque.h</file>
<file>$PROJ_DIR$\..\..\iforward_list.h</file>
<file>$PROJ_DIR$\..\..\ilist.h</file>
<file>$PROJ_DIR$\..\..\imap.h</file>
<file>$PROJ_DIR$\..\..\ipool.h</file>
<file>$PROJ_DIR$\..\..\integral_limits.h</file>
<file>$PROJ_DIR$\..\..\iqueue.h</file>
<file>$PROJ_DIR$\..\..\istack.h</file>
<file>$PROJ_DIR$\..\..\largest.h</file>
<file>$PROJ_DIR$\..\..\ivector.h</file>
<file>$PROJ_DIR$\..\..\numeric.h</file>
<file>$PROJ_DIR$\..\..\list.h</file>
<file>$PROJ_DIR$\..\..\list_base.h</file>
<file>$PROJ_DIR$\..\..\log.h</file>
<file>$PROJ_DIR$\..\..\map.h</file>
<file>$PROJ_DIR$\..\..\map_base.h</file>
<file>$PROJ_DIR$\..\..\nullptr.h</file>
<file>$PROJ_DIR$\..\..\observer.h</file>
<file>$PROJ_DIR$\..\..\parameter_type.h</file>
<file>$PROJ_DIR$\..\..\power.h</file>
<file>$PROJ_DIR$\..\..\pool.h</file>
<file>$PROJ_DIR$\..\..\queue.h</file>
<file>$PROJ_DIR$\..\..\smallest.h</file>
<file>$PROJ_DIR$\..\..\queue_base.h</file>
<file>$PROJ_DIR$\..\..\static_assert.h</file>
<file>$PROJ_DIR$\..\..\stack.h</file>
<file>$PROJ_DIR$\..\..\stack_base.h</file>
<file>$PROJ_DIR$\..\..\type_traits.h</file>
<file>$PROJ_DIR$\..\..\variant.h</file>
<file>$PROJ_DIR$\..\..\visitor.h</file>
<file>$PROJ_DIR$\..\..\vector.h</file>
<file>$PROJ_DIR$\..\..\vector_base.h</file>
<file>$TOOLKIT_DIR$\inc\c\xtgmath.h</file>
<file>$PROJ_DIR$\..\test_compile.cpp</file>
<file>$TOOLKIT_DIR$\inc\c\xencoding_limits.h</file>
<file>$PROJ_DIR$\main.cpp</file>
<file>$PROJ_DIR$\Debug\Obj\etl.pbd</file>
<file>$PROJ_DIR$\Debug\Obj\crc64_ecma.o</file>
<file>$PROJ_DIR$\Debug\Obj\crc16.o</file>
<file>$PROJ_DIR$\Debug\Obj\crc32.o</file>
<file>$PROJ_DIR$\Debug\Obj\main.pbi</file>
<file>$PROJ_DIR$\Debug\Obj\crc16_ccitt.o</file>
<file>$PROJ_DIR$\Debug\Obj\crc16_ccitt.pbi</file>
<file>$PROJ_DIR$\Debug\Obj\crc16_kermit.o</file>
<file>$PROJ_DIR$\Debug\Obj\crc8_ccitt.o</file>
<file>$PROJ_DIR$\Debug\Obj\main.o</file>
<file>$PROJ_DIR$\Debug\Exe\cpp.out</file>
<file>$PROJ_DIR$\Debug\Obj\crc16.pbi</file>
<file>$PROJ_DIR$\Debug\Obj\crc16_kermit.pbi</file>
@ -162,27 +93,94 @@
<file>$PROJ_DIR$\Debug\Obj\error_handler.o</file>
<file>$PROJ_DIR$\..\..\ibitset.h</file>
<file>$PROJ_DIR$\Debug\List\cpp.map</file>
<file>$PROJ_DIR$\..\..\crc32.cpp</file>
<file>$PROJ_DIR$\..\..\crc16_kermit.h</file>
<file>$PROJ_DIR$\..\..\crc64_ecma.h</file>
<file>$PROJ_DIR$\..\..\crc32.h</file>
<file>$PROJ_DIR$\..\..\crc64_ecma.cpp</file>
<file>$PROJ_DIR$\..\..\crc8_ccitt.h</file>
<file>$PROJ_DIR$\..\..\crc8_ccitt.cpp</file>
<file>$PROJ_DIR$\..\..\cyclic_value.h</file>
<file>$PROJ_DIR$\..\..\doxygen.h</file>
<file>$PROJ_DIR$\..\..\deque.h</file>
<file>$PROJ_DIR$\..\..\deque_base.h</file>
<file>$PROJ_DIR$\..\..\exception.h</file>
<file>$PROJ_DIR$\..\..\endian.h</file>
<file>$PROJ_DIR$\..\..\enum_type.h</file>
<file>$PROJ_DIR$\..\..\error_handler.cpp</file>
<file>$PROJ_DIR$\..\..\error_handler.h</file>
<file>$PROJ_DIR$\..\..\factorial.h</file>
<file>$PROJ_DIR$\..\..\forward_list.h</file>
<file>$PROJ_DIR$\..\..\fibonacci.h</file>
<file>$PROJ_DIR$\..\..\functional.h</file>
<file>$PROJ_DIR$\..\..\forward_list_base.h</file>
<file>$PROJ_DIR$\..\..\function.h</file>
<file>$PROJ_DIR$\..\..\imap.h</file>
<file>$PROJ_DIR$\..\..\ideque.h</file>
<file>$PROJ_DIR$\..\..\iforward_list.h</file>
<file>$PROJ_DIR$\..\..\ilist.h</file>
<file>$PROJ_DIR$\..\..\integral_limits.h</file>
<file>$PROJ_DIR$\..\..\ipool.h</file>
<file>$PROJ_DIR$\..\..\iqueue.h</file>
<file>$PROJ_DIR$\..\..\istack.h</file>
<file>$PROJ_DIR$\..\..\largest.h</file>
<file>$PROJ_DIR$\..\..\ivector.h</file>
<file>$PROJ_DIR$\..\..\list.h</file>
<file>$PROJ_DIR$\..\..\list_base.h</file>
<file>$PROJ_DIR$\..\..\map.h</file>
<file>$PROJ_DIR$\..\..\map_base.h</file>
<file>$PROJ_DIR$\..\..\log.h</file>
<file>$PROJ_DIR$\..\..\nullptr.h</file>
<file>$PROJ_DIR$\..\..\observer.h</file>
<file>$PROJ_DIR$\..\..\numeric.h</file>
<file>$PROJ_DIR$\..\..\parameter_type.h</file>
<file>$PROJ_DIR$\..\..\power.h</file>
<file>$PROJ_DIR$\..\..\pool.h</file>
<file>$PROJ_DIR$\..\..\queue.h</file>
<file>$PROJ_DIR$\..\..\smallest.h</file>
<file>$PROJ_DIR$\..\..\queue_base.h</file>
<file>$PROJ_DIR$\..\..\static_assert.h</file>
<file>$PROJ_DIR$\..\..\stack.h</file>
<file>$PROJ_DIR$\..\..\stack_base.h</file>
<file>$PROJ_DIR$\..\..\type_traits.h</file>
<file>$PROJ_DIR$\..\..\variant.h</file>
<file>$PROJ_DIR$\..\..\vector.h</file>
<file>$PROJ_DIR$\..\..\vector_base.h</file>
<file>$PROJ_DIR$\..\..\visitor.h</file>
<file>$PROJ_DIR$\..\test_compile.cpp</file>
<file>$TOOLKIT_DIR$\inc\c\ymath.h</file>
<file>$TOOLKIT_DIR$\inc\c\xtgmath.h</file>
<file>$TOOLKIT_DIR$\inc\c\xencoding_limits.h</file>
<file>$PROJ_DIR$\Debug\Obj\crc64_ecma.o</file>
<file>$PROJ_DIR$\Debug\Obj\crc32.o</file>
<file>$PROJ_DIR$\Debug\Obj\crc16.o</file>
<file>$PROJ_DIR$\Debug\Obj\crc16_ccitt.o</file>
<file>$PROJ_DIR$\Debug\Obj\etl.pbd</file>
<file>$PROJ_DIR$\Debug\Obj\crc16_ccitt.pbi</file>
<file>$PROJ_DIR$\Debug\Obj\crc16_kermit.o</file>
<file>$PROJ_DIR$\Debug\Obj\crc8_ccitt.o</file>
<file>$PROJ_DIR$\..\..\ihash.h</file>
</outputs>
<file>
<name>$PROJ_DIR$\..\..\crc16.cpp</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 68</file>
<file> 147</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 77</file>
<file> 11</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 87 83 82 84 85 86 64 149</file>
<file> 21 17 16 18 19 20 144 83</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 83 82 87 64 84 149 85 86</file>
<file> 17 16 21 144 18 83 19 20</file>
</tool>
</inputs>
</file>
@ -191,21 +189,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 71</file>
<file> 148</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 72</file>
<file> 150</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 87 83 82 84 85 86 64 149</file>
<file> 21 17 16 18 19 20 144 83</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 83 82 87 64 84 149 85 86</file>
<file> 17 16 21 144 18 83 19 20</file>
</tool>
</inputs>
</file>
@ -214,21 +212,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 73</file>
<file> 151</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 78</file>
<file> 12</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 87 83 82 84 85 86 64 149</file>
<file> 21 17 16 18 19 20 144 83</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 83 82 87 64 84 149 85 86</file>
<file> 17 16 21 144 18 83 19 20</file>
</tool>
</inputs>
</file>
@ -237,135 +235,7 @@
<outputs>
<tool>
<name>ILINK</name>
<file> 76 152</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\crc32.cpp</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 69</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 79</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 87 83 82 84 85 86 64 149</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 83 82 87 64 84 149 85 86</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\crc64_ecma.cpp</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 67</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 80</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 87 83 82 84 85 86 64 149</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 83 82 87 64 84 149 85 86</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\crc8_ccitt.cpp</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 74</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 81</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 87 83 82 84 85 86 64 149</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 83 82 87 64 84 149 85 86</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\error_handler.cpp</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 150</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 148</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 25 21 31 46</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 31 46 21 25</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\test_compile.cpp</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 92</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 93</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 1 129 128 124 90 83 82 84 85 86 64 149 88 95 131 100 130 132 109 108 99 133 111 134 135 101 112 89 136 98 97 106 96 137 102 113 138 94 120 32 62 139 140 141 114 107 103 115 91 142 104 125 126 127 105 144 123 145 146 143 147 110 57 46 0 3 21 48 54 25 31 2 87 37 52 45 151 5 16 22 23 7 6 11 13 12 17 19 33 20</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 146 82 64 83 107 57 112 106 141 21 11 113 32 109 5 19 96 108 149 85 99 140 144 88 54 48 3 7 12 111 128 90 86 95 89 97 120 145 46 22 87 0 2 16 6 13 17 129 110 124 131 84 100 130 132 133 134 135 101 102 94 142 143 147 136 37 45 33 1 98 137 138 139 62 114 103 115 91 123 104 125 126 105 127 25 31 52 151 23 20</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\main.cpp</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 75</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 70</file>
<file> 10 86</file>
</tool>
</outputs>
</file>
@ -374,13 +244,128 @@
<outputs>
<tool>
<name>ILINK</name>
<file> 152</file>
<file> 86</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ILINK</name>
<file> 116 68 71 73 69 67 74 150 92 119 121 122 118 117</file>
<file> 50 147 148 151 146 145 152 84 26 53 55 56 52 51</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\crc32.cpp</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 146</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 13</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 21 17 16 18 19 20 144 83</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 17 16 21 144 18 83 19 20</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\crc64_ecma.cpp</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 145</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 14</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 21 17 16 18 19 20 144 83</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 17 16 21 144 18 83 19 20</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\crc8_ccitt.cpp</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 152</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 15</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 21 17 16 18 19 20 144 83</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 17 16 21 144 18 83 19 20</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\error_handler.cpp</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 84</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 82</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 102 98 108 124</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 108 124 98 102</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\test_compile.cpp</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 26</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 27</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 1 63 62 58 24 17 16 18 19 20 144 83 22 29 65 34 64 66 43 42 33 67 45 68 69 35 46 23 70 32 31 40 30 71 36 47 72 28 54 142 143 73 74 75 48 41 37 49 25 76 38 59 60 61 39 78 57 79 80 77 81 44 136 124 0 3 98 127 133 102 108 2 21 113 131 123 85 5 92 99 100 153 7 6 88 90 89 94 96 110 97</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 41 153 98 65 66 17 36 23 88 63 35 76 44 43 133 136 5 96 58 18 29 34 45 16 81 21 3 7 89 64 67 68 69 28 77 99 127 0 2 92 6 90 94 30 62 24 42 22 144 83 19 20 33 31 46 40 47 54 142 74 75 78 79 80 124 70 123 85 113 1 32 71 72 73 143 48 37 49 25 57 38 59 60 39 61 102 108 131 100 110 97</file>
</tool>
</inputs>
</file>
@ -392,6 +377,9 @@
<name>[MULTI_TOOL]</name>
<tool>ILINK</tool>
</forcedrebuild>
<forcedrebuild>
<name>[REBUILD_ALL]</name>
</forcedrebuild>
</configuration>
</project>

View File

@ -24,7 +24,7 @@
<Windows>
<Wnd1>
<Wnd0>
<Tabs>
<Tab>
<Identity>TabID-10727-29778</Identity>
@ -36,7 +36,7 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd1><Wnd3>
<SelectedTab>0</SelectedTab></Wnd0><Wnd2>
<Tabs>
<Tab>
<Identity>TabID-15390-31123</Identity>
@ -46,20 +46,20 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd3></Windows>
<SelectedTab>0</SelectedTab></Wnd2></Windows>
<Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\algorithm.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>255</YPos2><SelStart2>2932</SelStart2><SelEnd2>2932</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\test_compile.cpp</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>59</YPos2><SelStart2>3192</SelStart2><SelEnd2>3192</SelEnd2></Tab><ActiveTab>1</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\inc\cpp\xlocnum</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>647</YPos2><SelStart2>22438</SelStart2><SelEnd2>22438</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\alignment.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>56</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\type_traits.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>183</YPos2><SelStart2>8753</SelStart2><SelEnd2>8753</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\log.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>29</YPos2><SelStart2>2196</SelStart2><SelEnd2>2196</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\nullptr.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>1327</SelStart2><SelEnd2>1327</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\variant.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>939</YPos2><SelStart2>39362</SelStart2><SelEnd2>39362</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\algorithm.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>255</YPos2><SelStart2>2932</SelStart2><SelEnd2>2932</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\test_compile.cpp</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>68</YPos2><SelStart2>3284</SelStart2><SelEnd2>3284</SelEnd2></Tab><ActiveTab>1</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\arm\inc\cpp\xlocnum</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>647</YPos2><SelStart2>22438</SelStart2><SelEnd2>22438</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\alignment.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>96</YPos2><SelStart2>3503</SelStart2><SelEnd2>3503</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\type_traits.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>183</YPos2><SelStart2>8753</SelStart2><SelEnd2>8753</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\log.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>29</YPos2><SelStart2>2196</SelStart2><SelEnd2>2196</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\nullptr.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>1327</SelStart2><SelEnd2>1327</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\variant.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>939</YPos2><SelStart2>39362</SelStart2><SelEnd2>39362</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\crc16.cpp</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>645</SelStart2><SelEnd2>645</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\ideque.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>954</YPos2><SelStart2>31011</SelStart2><SelEnd2>31011</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\deque.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>79</YPos2><SelStart2>4728</SelStart2><SelEnd2>4736</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top><Row0><Sizes><Toolbar-02878198><key>iaridepm.enu1</key></Toolbar-02878198></Sizes></Row0></Top><Left><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>953</Bottom><Right>333</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>104167</sizeHorzCX><sizeHorzCY>200401</sizeHorzCY><sizeVertCX>174479</sizeVertCX><sizeVertCY>956914</sizeVertCY></Rect></Wnd1></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes/></Row0></Bottom><Float><Sizes><Wnd3><Rect><Top>0</Top><Left>0</Left><Bottom>0</Bottom><Right>0</Right><x>-2</x><y>-2</y><FloatX>1938</FloatX><FloatY>25</FloatY><FloatWidth>1240</FloatWidth><FloatHeight>968</FloatHeight><xscreen>1924</xscreen><yscreen>200</yscreen><sizeHorzCX>1002083</sizeHorzCX><sizeHorzCY>200401</sizeHorzCY><sizeVertCX>104167</sizeVertCX><sizeVertCY>200401</sizeVertCY></Rect></Wnd3></Sizes></Float></Positions>
<Top><Row0><Sizes><Toolbar-027B8198><key>iaridepm.enu1</key></Toolbar-027B8198></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>953</Bottom><Right>333</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>104167</sizeHorzCX><sizeHorzCY>200401</sizeHorzCY><sizeVertCX>174479</sizeVertCX><sizeVertCY>956914</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes/></Row0></Bottom><Float><Sizes><Wnd2><Rect><Top>0</Top><Left>0</Left><Bottom>0</Bottom><Right>0</Right><x>-2</x><y>-2</y><FloatX>1938</FloatX><FloatY>25</FloatY><FloatWidth>1240</FloatWidth><FloatHeight>968</FloatHeight><xscreen>1924</xscreen><yscreen>200</yscreen><sizeHorzCX>1002083</sizeHorzCX><sizeHorzCY>200401</sizeHorzCY><sizeVertCX>104167</sizeVertCX><sizeVertCY>200401</sizeVertCY></Rect></Wnd2></Sizes></Float></Positions>
</Desktop>
</Workspace>

View File

@ -90,8 +90,8 @@
<MDIClientArea>
<RegID>0</RegID>
<MDITabState>
<Len>786</Len>
<Data>01000000040000000100000001000000000000000100000000000000020000000000000001000000010000000000000028000000280000000100000007000000060000000100000037553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C6964657175652E6800000000086964657175652E6800000000FFFFFFFFFFFFFFFF36553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C64657175652E68000000000764657175652E6800000000FFFFFFFFFFFFFFFF3A553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C6669626F6E616363692E68000000000B6669626F6E616363692E6800000000FFFFFFFFFFFFFFFF3A553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C666163746F7269616C2E68000000000B666163746F7269616C2E6800000000FFFFFFFFFFFFFFFF3D553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C6379636C69635F76616C75652E68000000000E6379636C69635F76616C75652E6800000000FFFFFFFFFFFFFFFF44553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C746573745C746573745F636F6D70696C652E6370700000000010746573745F636F6D70696C652E63707000000000FFFFFFFFFFFFFFFF39553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C66756E6374696F6E2E68000000000A66756E6374696F6E2E6800000000FFFFFFFFFFFFFFFF0000000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000940100006500000080070000FD030000</Data>
<Len>1549</Len>
<Data>010000000400000001000000010000000000000001000000000000000200000000000000010000000100000000000000280000002800000001000000100000000C000000010000003B553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C63726336345F65636D612E68000000000C63726336345F65636D612E6800000000FFFFFFFFFFFFFFFF36553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C63726333322E68000000000763726333322E6800000000FFFFFFFFFFFFFFFF3D553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C63726331365F6B65726D69742E68000000000E63726331365F6B65726D69742E6800000000FFFFFFFFFFFFFFFF3C553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C63726331365F63636974742E68000000000D63726331365F63636974742E6800000000FFFFFFFFFFFFFFFF36553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C63726331362E68000000000763726331362E6800000000FFFFFFFFFFFFFFFF36553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C69686173682E68000000000769686173682E6800000000FFFFFFFFFFFFFFFF38553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C696269747365742E680000000009696269747365742E6800000000FFFFFFFFFFFFFFFF37553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C6964657175652E6800000000086964657175652E6800000000FFFFFFFFFFFFFFFF36553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C64657175652E68000000000764657175652E6800000000FFFFFFFFFFFFFFFF3A553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C6669626F6E616363692E68000000000B6669626F6E616363692E6800000000FFFFFFFFFFFFFFFF3A553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C666163746F7269616C2E68000000000B666163746F7269616C2E6800000000FFFFFFFFFFFFFFFF3D553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C6379636C69635F76616C75652E68000000000E6379636C69635F76616C75652E6800000000FFFFFFFFFFFFFFFF44553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C746573745C746573745F636F6D70696C652E6370700000000010746573745F636F6D70696C652E63707000000000FFFFFFFFFFFFFFFF39553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C66756E6374696F6E2E68000000000A66756E6374696F6E2E6800000000FFFFFFFFFFFFFFFF37553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C6269747365742E6800000000086269747365742E6800000000FFFFFFFFFFFFFFFF3B553A5C55736572735C4A6F686E5C446F63756D656E74735C50726F6772616D6D696E675C4769744875625C65746C5C637263385F63636974742E68000000000C637263385F63636974742E6800000000FFFFFFFFFFFFFFFF0000000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000940100006500000080070000FD030000</Data>
</MDITabState>
</MDIClientArea>
<ViewEx>
@ -1285,8 +1285,8 @@
<RegID>59392</RegID>
<Name>File</Name>
<Buttons>
<Len>2245</Len>
<Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE80300000000000000000000000000000000000000000000000100000001000000960000000200205000000000086F70657261746F7296000000000000000F0010766F6964206F70657261746F72202829096966756E6374696F6E086F70657261746F7208456E756D547970650A5374727563744E616D65077479706564656608547970654E616D65114445434C4152455F454E554D5F545950451A72657475726E2028544261736526292A2854426173652A29303B0C504C4154464F524D5F41524D09696E745F6C65617374057374643A3A09434F4D50494C45525F0A53797374656D496E69740641737369676E000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020000001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F50726F6A6563742057696E646F7773000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65AC030000</Data>
<Len>2261</Len>
<Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE8030000000000000000000000000000000000000000000000010000000100000096000000020020500000000010766F6964206F70657261746F72202829960000000000000010000373657410766F6964206F70657261746F72202829096966756E6374696F6E086F70657261746F7208456E756D547970650A5374727563744E616D65077479706564656608547970654E616D65114445434C4152455F454E554D5F545950451A72657475726E2028544261736526292A2854426173652A29303B0C504C4154464F524D5F41524D09696E745F6C65617374057374643A3A09434F4D50494C45525F0A53797374656D496E69740641737369676E00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020000001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F50726F6A6563742057696E646F7773000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65AC030000</Data>
</Buttons>
<OriginalItems>
<Len>1423</Len>
@ -1302,7 +1302,7 @@
<Name>Build</Name>
<Buttons>
<Len>678</Len>
<Data>00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000004001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E00000000000000000000000000000000010000000100000001809E8A0000000004001F0000000000000000000000000000000001000000010000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000004002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA000000000000000000000000000000000000000000000000010000000100000096000000030020500000000008546172676574203196000000000000000100085461726765742031000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000400240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C64CF010000</Data>
<Data>00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000000001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E00000000000000000000000000000000010000000100000001809E8A0000000004001F0000000000000000000000000000000001000000010000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000004002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA000000000000000000000000000000000000000000000000010000000100000096000000030020500000000008546172676574203196000000000000000100085461726765742031000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000400240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C64CF010000</Data>
</Buttons>
<OriginalItems>
<Len>583</Len>
@ -1318,7 +1318,7 @@
<Name>Debug</Name>
<Buttons>
<Len>2220</Len>
<Data>00200000000000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000000002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000000000002D0000000000000000000000000000000001000000010000000180F07F0000000000002E0000000000000000000000000000000001000000010000000180E8880000000000003700000000000000000000000000000000010000000100000001803B010000000000002F0000000000000000000000000000000001000000010000000180BB8A00000000000030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000000000000310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000002001380D88B000000000000310000000757617463682031000000000000000000000000010000000100000000000000000000000100000000001380D98B0000000000003100000007576174636820320000000000000000000000000100000001000000000000000000000001000000000013800F01000000000000320000000E4D656D6F72792057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000084D656D6F72792031000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000084D656D6F72792032000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000084D656D6F72792033000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000084D656D6F727920340000000000000000000000000100000001000000000000000000000001000000000013801001000000000000330000000E53657269616C2057696E646F77730000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000755415254202331000000000000000000000000010000000100000000000000000000000100000000001380940700000000000033000000075541525420233200000000000000000000000001000000010000000000000000000000010000000000138095070000000000003300000007554152542023330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000000E49544D2F525441205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000003400000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380658A000000000000340000000E4C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E00000014506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000D436F646520436F76657261676500000000000000000000000001000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720000000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720000000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000138001890000000000003600000007546F6F6C626F7800000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730000000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72000000000000000001000000000000000100000000000000000000000100000000000000000005446562756764020000</Data>
<Data>00200000000000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000000002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000000000002D0000000000000000000000000000000001000000010000000180F07F0000000000002E0000000000000000000000000000000001000000010000000180E8880000000000003700000000000000000000000000000000010000000100000001803B010000000000002F0000000000000000000000000000000001000000010000000180BB8A00000000000030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000000000000310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000002001380D88B000000000000310000000757617463682031000000000000000000000000010000000100000000000000000000000100000000001380D98B0000000000003100000007576174636820320000000000000000000000000100000001000000000000000000000001000000000013800F01000000000000320000000E4D656D6F72792057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000084D656D6F72792031000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000084D656D6F72792032000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000084D656D6F72792033000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000084D656D6F727920340000000000000000000000000100000001000000000000000000000001000000000013801001000000000000330000000E53657269616C2057696E646F77730000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000755415254202331000000000000000000000000010000000100000000000000000000000100000000001380940700000000000033000000075541525420233200000000000000000000000001000000010000000000000000000000010000000000138095070000000000003300000007554152542023330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000000E49544D2F525441205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000003400000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380658A000000000000340000000E4C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E00000014506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000D436F646520436F76657261676500000000000000000000000001000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720100000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720100000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000138001890000000000003600000007546F6F6C626F7800000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730100000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72010000000000000001000000000000000100000000000000000000000100000000000000000005446562756764020000</Data>
</Buttons>
<OriginalItems>
<Len>898</Len>
@ -2583,11 +2583,74 @@
<ActiveMDIGroup>0</ActiveMDIGroup>
<MDIGroup>
<Size>100</Size>
<ActiveTab>6</ActiveTab>
<ActiveTab>12</ActiveTab>
<Doc>
<Name>..\..\crc64_ecma.h</Name>
<ColumnNumber>26</ColumnNumber>
<TopLine>17</TopLine>
<CurrentLine>39</CurrentLine>
<Folding>0</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>..\..\crc32.h</Name>
<ColumnNumber>6</ColumnNumber>
<TopLine>1</TopLine>
<CurrentLine>41</CurrentLine>
<Folding>0</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>..\..\crc16_kermit.h</Name>
<ColumnNumber>6</ColumnNumber>
<TopLine>1</TopLine>
<CurrentLine>41</CurrentLine>
<Folding>0</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>..\..\crc16_ccitt.h</Name>
<ColumnNumber>6</ColumnNumber>
<TopLine>1</TopLine>
<CurrentLine>41</CurrentLine>
<Folding>0</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>..\..\crc16.h</Name>
<ColumnNumber>6</ColumnNumber>
<TopLine>1</TopLine>
<CurrentLine>41</CurrentLine>
<Folding>0</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>..\..\ihash.h</Name>
<ColumnNumber>0</ColumnNumber>
<TopLine>145</TopLine>
<CurrentLine>1</CurrentLine>
<Folding>0</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>..\..\ibitset.h</Name>
<ColumnNumber>36</ColumnNumber>
<TopLine>44</TopLine>
<CurrentLine>59</CurrentLine>
<Folding>0</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>..\..\ideque.h</Name>
<ColumnNumber>57</ColumnNumber>
<TopLine>509</TopLine>
<TopLine>510</TopLine>
<CurrentLine>517</CurrentLine>
<Folding>0</Folding>
<ContractedFolders></ContractedFolders>
@ -2623,7 +2686,7 @@
<Doc>
<Name>..\..\cyclic_value.h</Name>
<ColumnNumber>5</ColumnNumber>
<TopLine>173</TopLine>
<TopLine>174</TopLine>
<CurrentLine>223</CurrentLine>
<Folding>0</Folding>
<ContractedFolders></ContractedFolders>
@ -2632,17 +2695,35 @@
<Doc>
<Name>..\test_compile.cpp</Name>
<ColumnNumber>2</ColumnNumber>
<TopLine>181</TopLine>
<CurrentLine>225</CurrentLine>
<TopLine>184</TopLine>
<CurrentLine>227</CurrentLine>
<Folding>0</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>..\..\function.h</Name>
<ColumnNumber>35</ColumnNumber>
<TopLine>57</TopLine>
<CurrentLine>73</CurrentLine>
<ColumnNumber>79</ColumnNumber>
<TopLine>58</TopLine>
<CurrentLine>81</CurrentLine>
<Folding>0</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>..\..\bitset.h</Name>
<ColumnNumber>0</ColumnNumber>
<TopLine>8</TopLine>
<CurrentLine>49</CurrentLine>
<Folding>0</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>..\..\crc8_ccitt.h</Name>
<ColumnNumber>6</ColumnNumber>
<TopLine>1</TopLine>
<CurrentLine>41</CurrentLine>
<Folding>0</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>

View File

@ -1089,6 +1089,32 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>70</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\ibitset.h</PathWithFileName>
<FilenameWithoutPath>ibitset.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>71</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\ihash.h</PathWithFileName>
<FilenameWithoutPath>ihash.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
</ProjectOpt>

View File

@ -763,6 +763,16 @@
<FileType>8</FileType>
<FilePath>..\..\crc64_ecma.cpp</FilePath>
</File>
<File>
<FileName>ibitset.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\ibitset.h</FilePath>
</File>
<File>
<FileName>ihash.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\ihash.h</FilePath>
</File>
</Files>
</Group>
</Groups>

View File

@ -35,6 +35,8 @@ SOFTWARE.
#include <string>
#include <vector>
#include "data.h"
#include "../flat_map.h"
namespace
@ -43,12 +45,42 @@ namespace
{
static const size_t SIZE = 10;
typedef etl::flat_map<std::string, int, SIZE> Data;
typedef std::map<std::string, int> Compare_Data;
typedef TestDataDC<std::string> DC;
typedef TestDataNDC<std::string> NDC;
std::vector<Data::value_type> initial_data;
std::vector<Data::value_type> excess_data;
std::vector<Data::value_type> different_data;
typedef std::pair<int, DC> ElementDC;
typedef std::pair<int, NDC> ElementNDC;
typedef etl::flat_map<int, DC, SIZE> DataDC;
typedef etl::flat_map<int, NDC, SIZE> DataNDC;
typedef std::map<int, DC> Compare_DataDC;
typedef std::map<int, NDC> Compare_DataNDC;
NDC N0 = NDC("A");
NDC N1 = NDC("B");
NDC N2 = NDC("C");
NDC N3 = NDC("D");
NDC N4 = NDC("E");
NDC N5 = NDC("F");
NDC N6 = NDC("G");
NDC N7 = NDC("H");
NDC N8 = NDC("I");
NDC N9 = NDC("J");
NDC N10 = NDC("K");
NDC N11 = NDC("L");
NDC N12 = NDC("M");
NDC N13 = NDC("N");
NDC N14 = NDC("O");
NDC N15 = NDC("P");
NDC N16 = NDC("Q");
NDC N17 = NDC("R");
NDC N18 = NDC("S");
NDC N19 = NDC("T");
std::vector<ElementNDC> initial_data;
std::vector<ElementNDC> excess_data;
std::vector<ElementNDC> different_data;
//*************************************************************************
template <typename T1, typename T2>
@ -73,47 +105,23 @@ namespace
{
SetupFixture()
{
Data::value_type n[] =
ElementNDC n[] =
{
{ std::string("0"), 0 },
{ std::string("1"), 1 },
{ std::string("2"), 2 },
{ std::string("3"), 3 },
{ std::string("4"), 4 },
{ std::string("5"), 5 },
{ std::string("6"), 6 },
{ std::string("7"), 7 },
{ std::string("8"), 8 },
{ std::string("9"), 9 },
ElementNDC(0, N0), ElementNDC(1, N1), ElementNDC(2, N2), ElementNDC(3, N3), ElementNDC(4, N4),
ElementNDC(5, N5), ElementNDC(6, N6), ElementNDC(7, N7), ElementNDC(8, N8), ElementNDC(9, N9)
};
Data::value_type n2[] =
ElementNDC n2[] =
{
{ std::string("0"), 0 },
{ std::string("1"), 1 },
{ std::string("2"), 2 },
{ std::string("3"), 3 },
{ std::string("4"), 4 },
{ std::string("5"), 5 },
{ std::string("6"), 6 },
{ std::string("7"), 7 },
{ std::string("8"), 8 },
{ std::string("9"), 9 },
{ std::string("10"), 10 },
ElementNDC(0, N0), ElementNDC(1, N1), ElementNDC(2, N2), ElementNDC(3, N3), ElementNDC(4, N4),
ElementNDC(5, N5), ElementNDC(6, N6), ElementNDC(7, N7), ElementNDC(8, N8), ElementNDC(9, N9),
ElementNDC(10, N10)
};
Data::value_type n3[] =
ElementNDC n3[] =
{
{ std::string("10"), 10 },
{ std::string("11"), 11 },
{ std::string("12"), 12 },
{ std::string("13"), 13 },
{ std::string("14"), 14 },
{ std::string("15"), 15 },
{ std::string("16"), 16 },
{ std::string("17"), 17 },
{ std::string("18"), 18 },
{ std::string("19"), 19 },
ElementNDC(10, N10), ElementNDC(11, N11), ElementNDC(12, N12), ElementNDC(13, N13), ElementNDC(14, N14),
ElementNDC(15, N15), ElementNDC(16, N16), ElementNDC(17, N17), ElementNDC(18, N18), ElementNDC(19, N19)
};
initial_data.assign(std::begin(n), std::end(n));
@ -125,7 +133,7 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_default_constructor)
{
Data data;
DataDC data;
CHECK_EQUAL(data.size(), size_t(0));
CHECK(data.empty());
@ -136,9 +144,9 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_constructor_range)
{
Compare_Data compare_data(initial_data.begin(), initial_data.end());
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
Data data(compare_data.begin(), compare_data.end());
DataNDC data(compare_data.begin(), compare_data.end());
CHECK(data.size() == SIZE);
CHECK(!data.empty());
@ -147,8 +155,8 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_assignment)
{
Data data(initial_data.begin(), initial_data.end());
Data other_data;
DataNDC data(initial_data.begin(), initial_data.end());
DataNDC other_data;
other_data = data;
@ -162,8 +170,8 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_self_assignment)
{
Data data(initial_data.begin(), initial_data.end());
Data other_data(data);
DataNDC data(initial_data.begin(), initial_data.end());
DataNDC other_data(data);
other_data = other_data;
@ -177,8 +185,8 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_begin)
{
Data data(initial_data.begin(), initial_data.end());
const Data constData(data);
DataNDC data(initial_data.begin(), initial_data.end());
const DataNDC constData(data);
CHECK_EQUAL(data.begin(), std::begin(data));
CHECK_EQUAL(constData.begin(), std::begin(constData));
@ -187,8 +195,8 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_end)
{
Data data(initial_data.begin(), initial_data.end());
const Data constData(data);
DataNDC data(initial_data.begin(), initial_data.end());
const DataNDC constData(data);
CHECK_EQUAL(data.end(), std::end(data));
CHECK_EQUAL(constData.end(), std::end(constData));
@ -197,7 +205,7 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_empty)
{
Data data;
DataNDC data;
data.insert(initial_data.begin(), initial_data.end());
CHECK(data.full());
@ -207,7 +215,7 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_full)
{
Data data;
DataDC data;
CHECK(!data.full());
CHECK(data.empty());
@ -216,64 +224,64 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_index)
{
Compare_Data compare_data(initial_data.begin(), initial_data.end());
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
Data data(compare_data.begin(), compare_data.end());
DataNDC data(compare_data.begin(), compare_data.end());
CHECK_EQUAL(data["0"], compare_data["0"]);
CHECK_EQUAL(data["1"], compare_data["1"]);
CHECK_EQUAL(data["2"], compare_data["2"]);
CHECK_EQUAL(data["3"], compare_data["3"]);
CHECK_EQUAL(data["4"], compare_data["4"]);
CHECK_EQUAL(data["5"], compare_data["5"]);
CHECK_EQUAL(data["6"], compare_data["6"]);
CHECK_EQUAL(data["7"], compare_data["7"]);
CHECK_EQUAL(data["8"], compare_data["8"]);
CHECK_EQUAL(data["9"], compare_data["9"]);
//CHECK_EQUAL(data[0], compare_data[0]);
//CHECK_EQUAL(data[1], compare_data[1]);
//CHECK_EQUAL(data[2], compare_data[2]);
//CHECK_EQUAL(data[3], compare_data[3]);
//CHECK_EQUAL(data[4], compare_data[4]);
//CHECK_EQUAL(data[5], compare_data[5]);
//CHECK_EQUAL(data[6], compare_data[6]);
//CHECK_EQUAL(data[7], compare_data[7]);
//CHECK_EQUAL(data[8], compare_data[8]);
//CHECK_EQUAL(data[9], compare_data[9]);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_at)
{
Compare_Data compare_data(initial_data.begin(), initial_data.end());
Data data(initial_data.begin(), initial_data.end());
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(initial_data.begin(), initial_data.end());
CHECK_EQUAL(data.at("0"), compare_data.at("0"));
CHECK_EQUAL(data.at("1"), compare_data.at("1"));
CHECK_EQUAL(data.at("2"), compare_data.at("2"));
CHECK_EQUAL(data.at("3"), compare_data.at("3"));
CHECK_EQUAL(data.at("4"), compare_data.at("4"));
CHECK_EQUAL(data.at("5"), compare_data.at("5"));
CHECK_EQUAL(data.at("6"), compare_data.at("6"));
CHECK_EQUAL(data.at("7"), compare_data.at("7"));
CHECK_EQUAL(data.at("8"), compare_data.at("8"));
CHECK_EQUAL(data.at("9"), compare_data.at("9"));
CHECK_EQUAL(data.at(0), compare_data.at(0));
CHECK_EQUAL(data.at(1), compare_data.at(1));
CHECK_EQUAL(data.at(2), compare_data.at(2));
CHECK_EQUAL(data.at(3), compare_data.at(3));
CHECK_EQUAL(data.at(4), compare_data.at(4));
CHECK_EQUAL(data.at(5), compare_data.at(5));
CHECK_EQUAL(data.at(6), compare_data.at(6));
CHECK_EQUAL(data.at(7), compare_data.at(7));
CHECK_EQUAL(data.at(8), compare_data.at(8));
CHECK_EQUAL(data.at(9), compare_data.at(9));
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_at_const)
{
const Compare_Data compare_data(initial_data.begin(), initial_data.end());
const Data data(initial_data.begin(), initial_data.end());
const Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
const DataNDC data(initial_data.begin(), initial_data.end());
CHECK_EQUAL(data.at("0"), compare_data.at("0"));
CHECK_EQUAL(data.at("1"), compare_data.at("1"));
CHECK_EQUAL(data.at("2"), compare_data.at("2"));
CHECK_EQUAL(data.at("3"), compare_data.at("3"));
CHECK_EQUAL(data.at("4"), compare_data.at("4"));
CHECK_EQUAL(data.at("5"), compare_data.at("5"));
CHECK_EQUAL(data.at("6"), compare_data.at("6"));
CHECK_EQUAL(data.at("7"), compare_data.at("7"));
CHECK_EQUAL(data.at("8"), compare_data.at("8"));
CHECK_EQUAL(data.at("9"), compare_data.at("9"));
CHECK_EQUAL(data.at(0), compare_data.at(0));
CHECK_EQUAL(data.at(1), compare_data.at(1));
CHECK_EQUAL(data.at(2), compare_data.at(2));
CHECK_EQUAL(data.at(3), compare_data.at(3));
CHECK_EQUAL(data.at(4), compare_data.at(4));
CHECK_EQUAL(data.at(5), compare_data.at(5));
CHECK_EQUAL(data.at(6), compare_data.at(6));
CHECK_EQUAL(data.at(7), compare_data.at(7));
CHECK_EQUAL(data.at(8), compare_data.at(8));
CHECK_EQUAL(data.at(9), compare_data.at(9));
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_assign_range)
{
Compare_Data compare_data(initial_data.begin(), initial_data.end());
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
Data data;
DataNDC data;
data.assign(compare_data.begin(), compare_data.end());
@ -287,11 +295,11 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_insert_value)
{
Compare_Data compare_data;
Data data;
Compare_DataNDC compare_data;
DataNDC data;
data.insert(Data::value_type(std::string("0"), 0));
compare_data.insert(std::make_pair(std::string("0"), 0));
data.insert(DataNDC::value_type(0, N0));
compare_data.insert(std::make_pair(0, N0));
bool isEqual = Check_Equal(data.begin(),
data.end(),
@ -299,8 +307,8 @@ namespace
CHECK(isEqual);
data.insert(std::make_pair(std::string("2"), 2));
compare_data.insert(std::make_pair(std::string("2"), 2));
data.insert(std::make_pair(2, N2));
compare_data.insert(std::make_pair(2, N2));
isEqual = Check_Equal(data.begin(),
data.end(),
@ -308,8 +316,8 @@ namespace
CHECK(isEqual);
data.insert(std::make_pair(std::string("1"), 1));
compare_data.insert(std::make_pair(std::string("1"), 1));
data.insert(std::make_pair(1, N1));
compare_data.insert(std::make_pair(1, N1));
isEqual = Check_Equal(data.begin(),
data.end(),
@ -321,16 +329,16 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_insert_value_excess)
{
Data data(initial_data.begin(), initial_data.end());
DataNDC data(initial_data.begin(), initial_data.end());
CHECK_THROW(data.insert(std::make_pair(std::string("10"), 10)), etl::flat_map_full);
CHECK_THROW(data.insert(std::make_pair(10, N10)), etl::flat_map_full);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_insert_range)
{
Compare_Data compare_data;
Data data;
Compare_DataNDC compare_data;
DataNDC data;
data.insert(initial_data.begin(), initial_data.end());
compare_data.insert(initial_data.begin(), initial_data.end());
@ -345,7 +353,7 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_insert_range_excess)
{
Data data;
DataNDC data;
CHECK_THROW(data.insert(excess_data.begin(), excess_data.end()), etl::flat_map_full);
}
@ -353,14 +361,14 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_erase_key)
{
Compare_Data compare_data(initial_data.begin(), initial_data.end());
Data data(initial_data.begin(), initial_data.end());
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(initial_data.begin(), initial_data.end());
Compare_Data::iterator i_compare = compare_data.begin();
Data::iterator i_data = data.begin();
Compare_DataNDC::iterator i_compare = compare_data.begin();
DataNDC::iterator i_data = data.begin();
size_t count_compare = compare_data.erase("5");
size_t count = data.erase("5");
size_t count_compare = compare_data.erase(5);
size_t count = data.erase(5);
CHECK_EQUAL(count_compare, count);
@ -374,11 +382,11 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_erase_single)
{
Compare_Data compare_data(initial_data.begin(), initial_data.end());
Data data(initial_data.begin(), initial_data.end());
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(initial_data.begin(), initial_data.end());
Compare_Data::iterator i_compare = compare_data.begin();
Data::iterator i_data = data.begin();
Compare_DataNDC::iterator i_compare = compare_data.begin();
DataNDC::iterator i_data = data.begin();
std::advance(i_compare, 2);
std::advance(i_data, 2);
@ -396,14 +404,14 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_erase_range)
{
Compare_Data compare_data(initial_data.begin(), initial_data.end());
Data data(initial_data.begin(), initial_data.end());
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(initial_data.begin(), initial_data.end());
Compare_Data::iterator i_compare = compare_data.begin();
Data::iterator i_data = data.begin();
Compare_DataNDC::iterator i_compare = compare_data.begin();
DataNDC::iterator i_data = data.begin();
Compare_Data::iterator i_compare_end = compare_data.begin();
Data::iterator i_data_end = data.begin();
Compare_DataNDC::iterator i_compare_end = compare_data.begin();
DataNDC::iterator i_data_end = data.begin();
std::advance(i_compare, 2);
std::advance(i_data, 2);
@ -424,9 +432,9 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_clear)
{
Compare_Data compare_data(initial_data.begin(), initial_data.end());
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
Data data(compare_data.begin(), compare_data.end());
DataNDC data(compare_data.begin(), compare_data.end());
data.clear();
CHECK_EQUAL(data.size(), size_t(0));
@ -435,9 +443,9 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_iterator)
{
Compare_Data compare_data(initial_data.begin(), initial_data.end());
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
Data data(compare_data.begin(), compare_data.end());
DataNDC data(compare_data.begin(), compare_data.end());
bool isEqual = Check_Equal(data.begin(),
data.end(),
@ -449,9 +457,9 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_const_iterator)
{
Compare_Data compare_data(initial_data.begin(), initial_data.end());
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
Data data(compare_data.begin(), compare_data.end());
DataNDC data(compare_data.begin(), compare_data.end());
bool isEqual = Check_Equal(data.cbegin(),
data.cend(),
@ -463,9 +471,9 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_reverse_iterator)
{
Compare_Data compare_data(initial_data.begin(), initial_data.end());
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
Data data(compare_data.begin(), compare_data.end());
DataNDC data(compare_data.begin(), compare_data.end());
bool isEqual = Check_Equal(data.rbegin(),
data.rend(),
@ -477,9 +485,9 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_const_reverse_iterator)
{
Compare_Data compare_data(initial_data.begin(), initial_data.end());
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
Data data(compare_data.begin(), compare_data.end());
DataNDC data(compare_data.begin(), compare_data.end());
bool isEqual = Check_Equal(data.crbegin(),
data.crend(),
@ -491,35 +499,35 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_find)
{
Data data(initial_data.begin(), initial_data.end());
DataNDC data(initial_data.begin(), initial_data.end());
Data::iterator it = data.find("3");
CHECK_EQUAL(3, it->second);
DataNDC::iterator it = data.find(3);
CHECK_EQUAL(N3, it->second);
it = data.find("A");
it = data.find(19);
CHECK_EQUAL(data.end(), it);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_find_const)
{
const Data data(initial_data.begin(), initial_data.end());
const DataNDC data(initial_data.begin(), initial_data.end());
Data::const_iterator it = data.find("3");
CHECK_EQUAL(3, it->second);
DataNDC::const_iterator it = data.find(3);
CHECK_EQUAL(N3, it->second);
it = data.find("A");
it = data.find(19);
CHECK_EQUAL(data.end(), it);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_lower_bound)
{
Compare_Data compare_data(initial_data.begin(), initial_data.end());
Data data(initial_data.begin(), initial_data.end());
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(initial_data.begin(), initial_data.end());
Compare_Data::iterator i_compare = compare_data.lower_bound("5");
Data::iterator i_data = data.lower_bound("5");
Compare_DataNDC::iterator i_compare = compare_data.lower_bound(5);
DataNDC::iterator i_data = data.lower_bound(5);
CHECK_EQUAL(std::distance(compare_data.begin(), i_compare), std::distance(data.begin(), i_data));
}
@ -527,11 +535,11 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_upper_bound)
{
Compare_Data compare_data(initial_data.begin(), initial_data.end());
Data data(initial_data.begin(), initial_data.end());
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(initial_data.begin(), initial_data.end());
Compare_Data::iterator i_compare = compare_data.upper_bound("5");
Data::iterator i_data = data.upper_bound("5");
Compare_DataNDC::iterator i_compare = compare_data.upper_bound(5);
DataNDC::iterator i_data = data.upper_bound(5);
CHECK_EQUAL(std::distance(compare_data.begin(), i_compare), std::distance(data.begin(), i_data));
}
@ -539,11 +547,11 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_equal_range)
{
Compare_Data compare_data(initial_data.begin(), initial_data.end());
Data data(initial_data.begin(), initial_data.end());
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(initial_data.begin(), initial_data.end());
std::pair<Compare_Data::iterator, Compare_Data::iterator> i_compare = compare_data.equal_range("5");
std::pair<Data::iterator, Data::iterator> i_data = data.equal_range("5");
std::pair<Compare_DataNDC::iterator, Compare_DataNDC::iterator> i_compare = compare_data.equal_range(5);
std::pair<DataNDC::iterator, DataNDC::iterator> i_data = data.equal_range(5);
CHECK_EQUAL(std::distance(compare_data.begin(), i_compare.first), std::distance(data.begin(), i_data.first));
CHECK_EQUAL(std::distance(compare_data.begin(), i_compare.second), std::distance(data.begin(), i_data.second));
@ -552,12 +560,12 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_equal)
{
const Data initial1(initial_data.begin(), initial_data.end());
const Data initial2(initial_data.begin(), initial_data.end());
const DataNDC initial1(initial_data.begin(), initial_data.end());
const DataNDC initial2(initial_data.begin(), initial_data.end());
CHECK(initial1 == initial2);
const Data different(different_data.begin(), different_data.end());
const DataNDC different(different_data.begin(), different_data.end());
CHECK(!(initial1 == different));
}
@ -565,12 +573,12 @@ namespace
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_not_equal)
{
const Data initial1(initial_data.begin(), initial_data.end());
const Data initial2(initial_data.begin(), initial_data.end());
const DataNDC initial1(initial_data.begin(), initial_data.end());
const DataNDC initial2(initial_data.begin(), initial_data.end());
CHECK(!(initial1 != initial2));
const Data different(different_data.begin(), different_data.end());
const DataNDC different(different_data.begin(), different_data.end());
CHECK(initial1 != different);
}

506
test/test_flat_set.cpp Normal file
View File

@ -0,0 +1,506 @@
/******************************************************************************
The MIT License(MIT)
Embedded Template Library.
https://github.com/ETLCPP/etl
Copyright(c) 2015 jwellbelove
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions :
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
******************************************************************************/
#include <UnitTest++/UnitTest++.h>
#include <set>
#include <array>
#include <algorithm>
#include <utility>
#include <iterator>
#include <string>
#include <vector>
#include "data.h"
#include "../flat_set.h"
namespace
{
SUITE(test_flat_set)
{
static const size_t SIZE = 10;
typedef TestDataDC<std::string> DC;
typedef TestDataNDC<std::string> NDC;
typedef etl::flat_set<DC, SIZE> DataDC;
typedef etl::flat_set<NDC, SIZE> DataNDC;
typedef std::set<DC> Compare_DataDC;
typedef std::set<NDC> Compare_DataNDC;
NDC N0 = NDC("A");
NDC N1 = NDC("B");
NDC N2 = NDC("C");
NDC N3 = NDC("D");
NDC N4 = NDC("E");
NDC N5 = NDC("F");
NDC N6 = NDC("G");
NDC N7 = NDC("H");
NDC N8 = NDC("I");
NDC N9 = NDC("J");
NDC N10 = NDC("K");
NDC N11 = NDC("L");
NDC N12 = NDC("M");
NDC N13 = NDC("N");
NDC N14 = NDC("O");
NDC N15 = NDC("P");
NDC N16 = NDC("Q");
NDC N17 = NDC("R");
NDC N18 = NDC("S");
NDC N19 = NDC("T");
std::vector<NDC> initial_data;
std::vector<NDC> excess_data;
std::vector<NDC> different_data;
//*************************************************************************
struct SetupFixture
{
SetupFixture()
{
NDC n[] =
{
N0, N1, N2, N3, N4, N5, N6, N7, N8, N9
};
NDC n2[] =
{
N0, N1, N2, N3, N4, N5, N6, N7, N8, N9, N10
};
NDC n3[] =
{
N10, N11, N12, N13, N14, N15, N16, N17, N18, N19
};
initial_data.assign(std::begin(n), std::end(n));
excess_data.assign(std::begin(n2), std::end(n2));
different_data.assign(std::begin(n3), std::end(n3));
}
};
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_default_constructor)
{
DataDC data;
CHECK_EQUAL(data.size(), size_t(0));
CHECK(data.empty());
CHECK_EQUAL(data.capacity(), SIZE);
CHECK_EQUAL(data.max_size(), SIZE);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_constructor_range)
{
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(compare_data.begin(), compare_data.end());
CHECK(data.size() == SIZE);
CHECK(!data.empty());
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_assignment)
{
DataNDC data(initial_data.begin(), initial_data.end());
DataNDC other_data;
other_data = data;
bool isEqual = std::equal(data.begin(),
data.end(),
other_data.begin());
CHECK(isEqual);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_self_assignment)
{
DataNDC data(initial_data.begin(), initial_data.end());
DataNDC other_data(data);
other_data = other_data;
bool isEqual = std::equal(data.begin(),
data.end(),
other_data.begin());
CHECK(isEqual);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_begin)
{
DataNDC data(initial_data.begin(), initial_data.end());
const DataNDC constData(data);
CHECK_EQUAL(data.begin(), std::begin(data));
CHECK_EQUAL(constData.begin(), std::begin(constData));
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_end)
{
DataNDC data(initial_data.begin(), initial_data.end());
const DataNDC constData(data);
CHECK_EQUAL(data.end(), std::end(data));
CHECK_EQUAL(constData.end(), std::end(constData));
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_empty)
{
DataNDC data;
data.insert(initial_data.begin(), initial_data.end());
CHECK(data.full());
CHECK(!data.empty());
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_full)
{
DataNDC data;
CHECK(!data.full());
CHECK(data.empty());
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_assign_range)
{
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data;
data.assign(compare_data.begin(), compare_data.end());
bool isEqual = std::equal(data.begin(),
data.end(),
compare_data.begin());
CHECK(isEqual);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_insert_value)
{
Compare_DataNDC compare_data;
DataNDC data;
data.insert(N0);
compare_data.insert(N0);
bool isEqual = std::equal(data.begin(),
data.end(),
compare_data.begin());
CHECK(isEqual);
data.insert(N2);
compare_data.insert(N2);
isEqual = std::equal(data.begin(),
data.end(),
compare_data.begin());
CHECK(isEqual);
data.insert(N1);
compare_data.insert(N1);
isEqual = std::equal(data.begin(),
data.end(),
compare_data.begin());
CHECK(isEqual);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_insert_value_excess)
{
DataNDC data(initial_data.begin(), initial_data.end());
CHECK_THROW(data.insert(N10), etl::flat_set_full);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_insert_range)
{
Compare_DataNDC compare_data;
DataNDC data;
data.insert(initial_data.begin(), initial_data.end());
compare_data.insert(initial_data.begin(), initial_data.end());
bool isEqual = std::equal(data.begin(),
data.end(),
compare_data.begin());
CHECK(isEqual);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_insert_range_excess)
{
DataNDC data;
CHECK_THROW(data.insert(excess_data.begin(), excess_data.end()), etl::flat_set_full);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_erase_key)
{
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(initial_data.begin(), initial_data.end());
Compare_DataNDC::iterator i_compare = compare_data.begin();
DataNDC::iterator i_data = data.begin();
size_t count_compare = compare_data.erase(N5);
size_t count = data.erase(N5);
CHECK_EQUAL(count_compare, count);
bool isEqual = std::equal(data.begin(),
data.end(),
compare_data.begin());
CHECK(isEqual);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_erase_single)
{
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(initial_data.begin(), initial_data.end());
Compare_DataNDC::iterator i_compare = compare_data.begin();
DataNDC::iterator i_data = data.begin();
std::advance(i_compare, 2);
std::advance(i_data, 2);
compare_data.erase(i_compare);
data.erase(i_data);
bool isEqual = std::equal(data.begin(),
data.end(),
compare_data.begin());
CHECK(isEqual);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_erase_range)
{
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(initial_data.begin(), initial_data.end());
Compare_DataNDC::iterator i_compare = compare_data.begin();
DataNDC::iterator i_data = data.begin();
Compare_DataNDC::iterator i_compare_end = compare_data.begin();
DataNDC::iterator i_data_end = data.begin();
std::advance(i_compare, 2);
std::advance(i_data, 2);
std::advance(i_compare_end, 4);
std::advance(i_data_end, 4);
compare_data.erase(i_compare, i_compare_end);
data.erase(i_data, i_data_end);
bool isEqual = std::equal(data.begin(),
data.end(),
compare_data.begin());
CHECK(isEqual);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_clear)
{
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(compare_data.begin(), compare_data.end());
data.clear();
CHECK_EQUAL(data.size(), size_t(0));
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_iterator)
{
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(compare_data.begin(), compare_data.end());
bool isEqual = std::equal(data.begin(),
data.end(),
compare_data.begin());
CHECK(isEqual);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_const_iterator)
{
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(compare_data.begin(), compare_data.end());
bool isEqual = std::equal(data.cbegin(),
data.cend(),
compare_data.cbegin());
CHECK(isEqual);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_reverse_iterator)
{
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(compare_data.begin(), compare_data.end());
bool isEqual = std::equal(data.rbegin(),
data.rend(),
compare_data.rbegin());
CHECK(isEqual);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_const_reverse_iterator)
{
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(compare_data.begin(), compare_data.end());
bool isEqual = std::equal(data.crbegin(),
data.crend(),
compare_data.crbegin());
CHECK(isEqual);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_find)
{
DataNDC data(initial_data.begin(), initial_data.end());
DataNDC::iterator it = data.find(N3);
CHECK_EQUAL(N3, *it);
it = data.find(N19);
CHECK_EQUAL(data.end(), it);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_find_const)
{
const DataNDC data(initial_data.begin(), initial_data.end());
DataNDC::const_iterator it = data.find(N3);
CHECK_EQUAL(N3, *it);
it = data.find(N19);
CHECK_EQUAL(data.end(), it);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_lower_bound)
{
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(initial_data.begin(), initial_data.end());
Compare_DataNDC::iterator i_compare = compare_data.lower_bound(N5);
DataNDC::iterator i_data = data.lower_bound(N5);
CHECK_EQUAL(std::distance(compare_data.begin(), i_compare), std::distance(data.begin(), i_data));
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_upper_bound)
{
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(initial_data.begin(), initial_data.end());
Compare_DataNDC::iterator i_compare = compare_data.upper_bound(N5);
DataNDC::iterator i_data = data.upper_bound(N5);
CHECK_EQUAL(std::distance(compare_data.begin(), i_compare), std::distance(data.begin(), i_data));
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_equal_range)
{
Compare_DataNDC compare_data(initial_data.begin(), initial_data.end());
DataNDC data(initial_data.begin(), initial_data.end());
std::pair<Compare_DataNDC::iterator, Compare_DataNDC::iterator> i_compare = compare_data.equal_range(N5);
std::pair<DataNDC::iterator, DataNDC::iterator> i_data = data.equal_range(N5);
CHECK_EQUAL(std::distance(compare_data.begin(), i_compare.first), std::distance(data.begin(), i_data.first));
CHECK_EQUAL(std::distance(compare_data.begin(), i_compare.second), std::distance(data.begin(), i_data.second));
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_equal)
{
const DataNDC initial1(initial_data.begin(), initial_data.end());
const DataNDC initial2(initial_data.begin(), initial_data.end());
CHECK(initial1 == initial2);
const DataNDC different(different_data.begin(), different_data.end());
CHECK(!(initial1 == different));
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_not_equal)
{
const DataNDC initial1(initial_data.begin(), initial_data.end());
const DataNDC initial2(initial_data.begin(), initial_data.end());
CHECK(!(initial1 != initial2));
const DataNDC different(different_data.begin(), different_data.end());
CHECK(initial1 != different);
}
};
}

View File

@ -137,6 +137,8 @@
<ClInclude Include="..\..\factorial.h" />
<ClInclude Include="..\..\fibonacci.h" />
<ClInclude Include="..\..\fixed_iterator.h" />
<ClInclude Include="..\..\flat_set.h" />
<ClInclude Include="..\..\flat_set_base.h" />
<ClInclude Include="..\..\fnv_1.h" />
<ClInclude Include="..\..\forward_list.h" />
<ClInclude Include="..\..\forward_list_base.h" />
@ -145,9 +147,11 @@
<ClInclude Include="..\..\hash.h" />
<ClInclude Include="..\..\ibitset.h" />
<ClInclude Include="..\..\ideque.h" />
<ClInclude Include="..\..\iflat_set.h" />
<ClInclude Include="..\..\iforward_list.h" />
<ClInclude Include="..\..\ihash.h" />
<ClInclude Include="..\..\ilist.h" />
<ClInclude Include="..\..\ilookup.h" />
<ClInclude Include="..\..\iflat_map.h" />
<ClInclude Include="..\..\imap.h" />
<ClInclude Include="..\..\instance_count.h" />
<ClInclude Include="..\..\integral_limits.h" />
@ -160,8 +164,8 @@
<ClInclude Include="..\..\list.h" />
<ClInclude Include="..\..\list_base.h" />
<ClInclude Include="..\..\log.h" />
<ClInclude Include="..\..\lookup.h" />
<ClInclude Include="..\..\lookup_base.h" />
<ClInclude Include="..\..\flat_map.h" />
<ClInclude Include="..\..\flat_map_base.h" />
<ClInclude Include="..\..\map.h" />
<ClInclude Include="..\..\map_base.h" />
<ClInclude Include="..\..\nullptr.h" />
@ -232,6 +236,7 @@
<ClCompile Include="..\test_error_handler.cpp" />
<ClCompile Include="..\test_exception.cpp" />
<ClCompile Include="..\test_fixed_iterator.cpp" />
<ClCompile Include="..\test_flat_set.cpp" />
<ClCompile Include="..\test_fnv_1.cpp" />
<ClCompile Include="..\test_forward_list.cpp" />
<ClCompile Include="..\test_function.cpp" />
@ -241,7 +246,7 @@
<ClCompile Include="..\test_integral_limits.cpp" />
<ClCompile Include="..\test_largest.cpp" />
<ClCompile Include="..\test_list.cpp" />
<ClCompile Include="..\test_lookup.cpp" />
<ClCompile Include="..\test_flat_map.cpp" />
<ClCompile Include="..\test_map.cpp" />
<ClCompile Include="..\test_maths.cpp" />
<ClCompile Include="..\test_numeric.cpp" />

View File

@ -315,15 +315,6 @@
<ClInclude Include="..\..\radix.h">
<Filter>ETL\Maths</Filter>
</ClInclude>
<ClInclude Include="..\..\ilookup.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
<ClInclude Include="..\..\lookup.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
<ClInclude Include="..\..\lookup_base.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
<ClInclude Include="..\..\ibitset.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
@ -339,6 +330,27 @@
<ClInclude Include="..\..\binary.h">
<Filter>ETL\Utilities</Filter>
</ClInclude>
<ClInclude Include="..\..\flat_map.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
<ClInclude Include="..\..\iflat_map.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
<ClInclude Include="..\..\flat_map_base.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
<ClInclude Include="..\..\ihash.h">
<Filter>ETL\Maths</Filter>
</ClInclude>
<ClInclude Include="..\..\flat_set.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
<ClInclude Include="..\..\flat_set_base.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
<ClInclude Include="..\..\iflat_set.h">
<Filter>ETL\Containers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\unittest-cpp\UnitTest++\AssertException.cpp">
@ -518,9 +530,6 @@
<ClCompile Include="..\test_endian.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test_lookup.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test_bloom_filter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@ -533,6 +542,12 @@
<ClCompile Include="..\test_binary.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test_flat_map.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\test_flat_set.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\..\Doxyfile">