mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Merge remote-tracking branch 'origin/memcpy_containers' into development
# Conflicts: # test/test_string_char.cpp # test/test_string_u16.cpp # test/test_string_u32.cpp # test/test_string_wchar_t.cpp
This commit is contained in:
commit
bc7c3e4426
@ -1890,6 +1890,13 @@ namespace etl
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifdef ETL_ISTRING_REPAIR_ENABLE
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
virtual void repair() = 0;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
//*********************************************************************
|
||||
@ -1910,6 +1917,14 @@ namespace etl
|
||||
p_buffer[0] = 0;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair(T* p_buffer_)
|
||||
{
|
||||
p_buffer = p_buffer_;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -73,7 +73,6 @@ namespace etl
|
||||
string(const etl::string<MAX_SIZE_>& other)
|
||||
: istring(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
istring::initialise();
|
||||
istring::assign(other.begin(), other.end());
|
||||
}
|
||||
|
||||
@ -91,7 +90,6 @@ namespace etl
|
||||
// Set the length to the exact amount.
|
||||
length = (length > MAX_SIZE_) ? MAX_SIZE_ : length;
|
||||
|
||||
istring::initialise();
|
||||
istring::assign(other.begin() + position, other.begin() + position + length);
|
||||
}
|
||||
|
||||
@ -102,7 +100,6 @@ namespace etl
|
||||
string(const value_type* text)
|
||||
: istring(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
istring::initialise();
|
||||
istring::assign(text, text + etl::char_traits<value_type>::length(text));
|
||||
}
|
||||
|
||||
@ -114,7 +111,6 @@ namespace etl
|
||||
string(const value_type* text, size_t count)
|
||||
: istring(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
istring::initialise();
|
||||
istring::assign(text, text + count);
|
||||
}
|
||||
|
||||
@ -177,6 +173,14 @@ namespace etl
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
{
|
||||
etl::istring::repair(buffer);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
value_type buffer[MAX_SIZE + 1];
|
||||
|
||||
46
src/deque.h
46
src/deque.h
@ -113,6 +113,20 @@ namespace etl
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
///\ingroup vector
|
||||
/// Deque incompatible type exception.
|
||||
//***************************************************************************
|
||||
class deque_incompatible_type : public deque_exception
|
||||
{
|
||||
public:
|
||||
|
||||
deque_incompatible_type(string_type file_name, numeric_type line_number)
|
||||
: deque_exception(ETL_ERROR_TEXT("deque:type", ETL_FILE"D"), file_name, line_number)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// The base class for all templated deque types.
|
||||
///\ingroup deque
|
||||
@ -1358,6 +1372,13 @@ namespace etl
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifdef ETL_IDEQUE_REPAIR_ENABLE
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
virtual void repair() = 0;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
//*************************************************************************
|
||||
@ -1380,7 +1401,18 @@ namespace etl
|
||||
}
|
||||
|
||||
_begin = iterator(0, *this, p_buffer);
|
||||
_end = iterator(0, *this, p_buffer);
|
||||
_end = iterator(0, *this, p_buffer);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair(pointer p_buffer_)
|
||||
{
|
||||
p_buffer = p_buffer_;
|
||||
|
||||
_begin = iterator(_begin.index, *this, p_buffer);
|
||||
_end = iterator(_end.index, *this, p_buffer);
|
||||
}
|
||||
|
||||
iterator _begin; ///Iterator to the _begin item in the deque.
|
||||
@ -1613,6 +1645,18 @@ namespace etl
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
{
|
||||
#ifdef ETL_C11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
|
||||
ETL_ASSERT(std::is_trivially_copyable<T>::value, ETL_ERROR(etl::deque_incompatible_type));
|
||||
#endif
|
||||
|
||||
etl::ideque<T>::repair(reinterpret_cast<T*>(&buffer[0]));
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
/// The uninitialised buffer of T used in the deque.
|
||||
|
||||
@ -1,339 +0,0 @@
|
||||
|
||||
#ifndef __ETL_FSM__
|
||||
#define __ETL_FSM__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "../array.h"
|
||||
#include "../nullptr.h"
|
||||
#include "../error_handler.h"
|
||||
#include "../exception.h"
|
||||
|
||||
#undef ETL_FILE
|
||||
#define ETL_FILE "34"
|
||||
|
||||
namespace etl
|
||||
{
|
||||
#if !defined(ETL_FSM_STATE_ID_TYPE)
|
||||
typedef uint_least8_t fsm_state_id_t;
|
||||
#else
|
||||
typedef ETL_FSM_STATE_ID_TYPE fsm_state_id_t;
|
||||
#endif
|
||||
|
||||
#if !defined(ETL_FSM_EVENT_ID_TYPE)
|
||||
typedef uint_least8_t fsm_event_id_t;
|
||||
#else
|
||||
typedef ETL_FSM_STATE_ID_TYPE fsm_event_id_t;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// Base exception class for FSM.
|
||||
//***************************************************************************
|
||||
class fsm_exception : public etl::exception
|
||||
{
|
||||
public:
|
||||
|
||||
fsm_exception(string_type what, string_type file_name, numeric_type line_number)
|
||||
: etl::exception(what, file_name, line_number)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// Exception for null state pointer.
|
||||
//***************************************************************************
|
||||
class fsm_nullstate_exception : public etl::fsm_exception
|
||||
{
|
||||
public:
|
||||
|
||||
fsm_nullstate_exception(string_type file_name, numeric_type line_number)
|
||||
: etl::fsm_exception(ETL_ERROR_TEXT("fsm:null state", ETL_FILE"A"), file_name, line_number)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// Exception for invalid state id.
|
||||
//***************************************************************************
|
||||
class fsm_state_id_exception : public etl::fsm_exception
|
||||
{
|
||||
public:
|
||||
|
||||
fsm_state_id_exception(string_type file_name, numeric_type line_number)
|
||||
: etl::fsm_exception(ETL_ERROR_TEXT("fsm:state id", ETL_FILE"B"), file_name, line_number)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// Interface class for FSM events.
|
||||
//***************************************************************************
|
||||
class ifsm_event
|
||||
{
|
||||
public:
|
||||
|
||||
//*******************************************
|
||||
/// Gets the id for this event.
|
||||
//*******************************************
|
||||
etl::fsm_event_id_t get_event_id() const
|
||||
{
|
||||
return event_id;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
//*******************************************
|
||||
/// Constructor.
|
||||
//*******************************************
|
||||
ifsm_event(etl::fsm_event_id_t event_id_)
|
||||
: event_id(event_id_)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
// The event id.
|
||||
const etl::fsm_event_id_t event_id;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// Base class for FSM events.
|
||||
//***************************************************************************
|
||||
template <const etl::fsm_event_id_t EVENT_ID_>
|
||||
class fsm_event : public etl::ifsm_event
|
||||
{
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
EVENT_ID = EVENT_ID_
|
||||
};
|
||||
|
||||
//*******************************************
|
||||
/// Constructor.
|
||||
//*******************************************
|
||||
fsm_event()
|
||||
: ifsm_event(EVENT_ID)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// Interface class for FSM states.
|
||||
//***************************************************************************
|
||||
class ifsm_state
|
||||
{
|
||||
public:
|
||||
|
||||
//*******************************************
|
||||
/// Gets the id for this state.
|
||||
//*******************************************
|
||||
etl::fsm_state_id_t get_state_id() const
|
||||
{
|
||||
return state_id;
|
||||
}
|
||||
|
||||
virtual etl::fsm_state_id_t on_event(const etl::ifsm_event& event) = 0;
|
||||
|
||||
protected:
|
||||
|
||||
//*******************************************
|
||||
/// Constructor.
|
||||
//*******************************************
|
||||
ifsm_state(etl::fsm_state_id_t state_id_)
|
||||
: state_id(state_id_)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void on_enter_state() {}; // By default, do nothing.
|
||||
virtual void on_exit_state() {}; // By default, do nothing.
|
||||
|
||||
private:
|
||||
|
||||
// The state id.
|
||||
const etl::fsm_state_id_t state_id;
|
||||
|
||||
// Disabled.
|
||||
ifsm_state(const ifsm_state&);
|
||||
ifsm_state& operator =(const ifsm_state&);
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
// To be COG generated.
|
||||
/// Base class for FSM states.
|
||||
//***************************************************************************
|
||||
template <typename TState, const etl::fsm_state_id_t STATE_ID_, typename T1, typename T2 = void>
|
||||
class fsm_state : public ifsm_state
|
||||
{
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
STATE_ID = STATE_ID_
|
||||
};
|
||||
|
||||
//*******************************************
|
||||
/// Constructor.
|
||||
//*******************************************
|
||||
fsm_state()
|
||||
: ifsm_state(STATE_ID)
|
||||
{
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
/// Top level event handler for the state.
|
||||
//*******************************************
|
||||
etl::fsm_state_id_t on_event(const etl::ifsm_event& event)
|
||||
{
|
||||
etl::fsm_state_id_t new_state_id;
|
||||
etl::fsm_event_id_t id = event.get_event_id();
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case T1::EVENT_ID: new_state_id = static_cast<TState&>(*this).on_event(static_cast<const T1&>(event)); break;
|
||||
case T2::EVENT_ID: new_state_id = static_cast<TState&>(*this).on_event(static_cast<const T2&>(event)); break;
|
||||
default: new_state_id = static_cast<TState&>(*this).on_unknown_event(event); break;
|
||||
}
|
||||
|
||||
return new_state_id;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
// Disabled.
|
||||
fsm_state(const fsm_state&);
|
||||
fsm_state& operator =(const fsm_state&);
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
template <const etl::fsm_state_id_t MAX_STATES>
|
||||
class fsm
|
||||
{
|
||||
public:
|
||||
|
||||
//*******************************************
|
||||
/// Constructor.
|
||||
//*******************************************
|
||||
fsm()
|
||||
: p_state(nullptr)
|
||||
{
|
||||
state_list.fill(nullptr);
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
/// Starts the FSM.
|
||||
/// Can only be called once.
|
||||
/// Subsequent calls will do nothing.
|
||||
//*******************************************
|
||||
void start()
|
||||
{
|
||||
// Can only be started once.
|
||||
if (p_state == nullptr)
|
||||
{
|
||||
p_state = state_list[0];
|
||||
ETL_ASSERT(p_state != nullptr, ETL_ERROR(etl::fsm_nullstate_exception));
|
||||
|
||||
p_state->on_enter_state();
|
||||
}
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
/// Adds a state to the FSM.
|
||||
/// If the state has the same id as one already added
|
||||
/// then the current state will be overwritten.
|
||||
//*******************************************
|
||||
void add_state(etl::ifsm_state& state)
|
||||
{
|
||||
ETL_ASSERT(state.get_state_id() < MAX_STATES, ETL_ERROR(etl::fsm_state_id_exception));
|
||||
state_list[state.get_state_id()] = &state;
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
/// Top level event handler for the FSM.
|
||||
//*******************************************
|
||||
void on_event(const etl::ifsm_event& event)
|
||||
{
|
||||
etl::fsm_state_id_t next_state_id = p_state->on_event(event);
|
||||
ETL_ASSERT(next_state_id < MAX_STATES, ETL_ERROR(etl::fsm_state_id_exception));
|
||||
|
||||
// Have we changed state?
|
||||
if (next_state_id != p_state->get_state_id())
|
||||
{
|
||||
p_state->on_exit_state();
|
||||
|
||||
p_state = state_list[next_state_id];
|
||||
ETL_ASSERT(p_state != nullptr, ETL_ERROR(etl::fsm_nullstate_exception));
|
||||
|
||||
p_state->on_enter_state();
|
||||
}
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
/// Gets the current state id.
|
||||
//*******************************************
|
||||
etl::fsm_state_id_t get_state_id() const
|
||||
{
|
||||
return p_state->get_state_id();
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
/// Gets a reference to the current state interface.
|
||||
//*******************************************
|
||||
ifsm_state& get_state()
|
||||
{
|
||||
return *p_state;
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
/// Gets a const reference to the current state interface.
|
||||
//*******************************************
|
||||
const ifsm_state& get_state() const
|
||||
{
|
||||
return *p_state;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
etl::ifsm_state* p_state; ///< A pointer to the current state.
|
||||
etl::array<etl::ifsm_state*, MAX_STATES> state_list; ///< The list of added states.
|
||||
|
||||
// Disabled.
|
||||
fsm(const fsm&);
|
||||
fsm& operator =(const fsm&);
|
||||
};
|
||||
}
|
||||
|
||||
#undef ETL_FILE
|
||||
|
||||
// class Start : public etl::fsm_event<0>
|
||||
// {
|
||||
|
||||
// };
|
||||
|
||||
// class Idle : public etl::fsm_state<Idle, 0, Start>
|
||||
// {
|
||||
// public:
|
||||
|
||||
// etl::fsm_state_id_t on_event(const Start& event)
|
||||
// {
|
||||
// return 1;
|
||||
// }
|
||||
|
||||
// etl::fsm_state_id_t on_unknown_event(const etl::ifsm_event& event)
|
||||
// {
|
||||
// return THIS_STATE_ID;
|
||||
// }
|
||||
// };
|
||||
|
||||
// etl::fsm<3> machine;
|
||||
|
||||
// void F()
|
||||
// {
|
||||
// Idle idle;
|
||||
|
||||
// machine.add_state(idle);
|
||||
// machine.start();
|
||||
// machine.on_event(Start());
|
||||
// }
|
||||
|
||||
#endif
|
||||
@ -309,7 +309,7 @@ namespace etl
|
||||
ETL_ASSERT(!refmap_t::full(), ETL_ERROR(flat_map_full));
|
||||
|
||||
value_type* pvalue = storage.allocate<value_type>();
|
||||
::new (pvalue) value_type(value);
|
||||
::new (pvalue) value_type(value);
|
||||
++construct_count;
|
||||
result = refmap_t::insert_at(i_element, *pvalue);
|
||||
}
|
||||
@ -686,7 +686,7 @@ namespace etl
|
||||
|
||||
/// The pool of nodes.
|
||||
etl::pool<node_t, MAX_SIZE> storage;
|
||||
|
||||
|
||||
/// The vector that stores pointers to the nodes.
|
||||
etl::vector<node_t*, MAX_SIZE> lookup;
|
||||
};
|
||||
|
||||
68
src/memory.h
68
src/memory.h
@ -55,7 +55,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename T>
|
||||
typename etl::enable_if<etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_fill(TOutputIterator o_begin, TOutputIterator o_end, const T& value)
|
||||
{
|
||||
std::fill(o_begin, o_end, value);
|
||||
@ -68,7 +68,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename T>
|
||||
typename etl::enable_if<!etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_fill(TOutputIterator o_begin, TOutputIterator o_end, const T& value)
|
||||
{
|
||||
typedef typename std::iterator_traits<TOutputIterator>::value_type value_type;
|
||||
@ -88,7 +88,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename T, typename TCounter>
|
||||
typename etl::enable_if<etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_fill(TOutputIterator o_begin, TOutputIterator o_end, const T& value, TCounter& count)
|
||||
{
|
||||
count += std::distance(o_begin, o_end);
|
||||
@ -104,7 +104,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename T, typename TCounter>
|
||||
typename etl::enable_if<!etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_fill(TOutputIterator o_begin, TOutputIterator o_end, const T& value, TCounter& count)
|
||||
{
|
||||
count += std::distance(o_begin, o_end);
|
||||
@ -142,7 +142,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TInputIterator, typename TOutputIterator>
|
||||
typename etl::enable_if<etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_copy(TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin)
|
||||
{
|
||||
return std::copy(i_begin, i_end, o_begin);
|
||||
@ -153,7 +153,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TInputIterator, typename TOutputIterator>
|
||||
typename etl::enable_if<!etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_copy(TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin)
|
||||
{
|
||||
typedef typename std::iterator_traits<TOutputIterator>::value_type value_type;
|
||||
@ -176,7 +176,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TInputIterator, typename TOutputIterator, typename TCounter>
|
||||
typename etl::enable_if<etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_copy(TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin, TCounter& count)
|
||||
{
|
||||
TOutputIterator o_end = std::copy(i_begin, i_end, o_begin);
|
||||
@ -191,7 +191,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TInputIterator, typename TOutputIterator, typename TCounter>
|
||||
typename etl::enable_if<!etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_copy(TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin, TCounter& count)
|
||||
{
|
||||
TOutputIterator o_end = etl::uninitialized_copy(i_begin, i_end, o_begin);
|
||||
@ -229,7 +229,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T>
|
||||
typename etl::enable_if<etl::has_trivial_constructor<T>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<T>::value, void>::type
|
||||
create_default_at(T* /*p*/)
|
||||
{
|
||||
}
|
||||
@ -239,7 +239,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T, typename TCounter>
|
||||
typename etl::enable_if<etl::has_trivial_constructor<T>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<T>::value, void>::type
|
||||
create_default_at(T* /*p*/, TCounter& count)
|
||||
{
|
||||
++count;
|
||||
@ -250,7 +250,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T>
|
||||
typename etl::enable_if<!etl::has_trivial_constructor<T>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<T>::value, void>::type
|
||||
create_default_at(T* p)
|
||||
{
|
||||
::new (p) T;
|
||||
@ -261,7 +261,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T, typename TCounter>
|
||||
typename etl::enable_if<!etl::has_trivial_constructor<T>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<T>::value, void>::type
|
||||
create_default_at(T* p, TCounter& count)
|
||||
{
|
||||
::new (p) T;
|
||||
@ -273,7 +273,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator>
|
||||
typename etl::enable_if<etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
uninitialized_default_construct(TOutputIterator /*o_begin*/, TOutputIterator /*o_end*/)
|
||||
{
|
||||
}
|
||||
@ -283,7 +283,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator>
|
||||
typename etl::enable_if<!etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
uninitialized_default_construct(TOutputIterator o_begin, TOutputIterator o_end)
|
||||
{
|
||||
typedef typename std::iterator_traits<TOutputIterator>::value_type value_type;
|
||||
@ -301,7 +301,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename TCounter>
|
||||
typename etl::enable_if<etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
uninitialized_default_construct(TOutputIterator o_begin, TOutputIterator o_end, TCounter& count)
|
||||
{
|
||||
count = std::distance(o_begin, o_end);
|
||||
@ -313,7 +313,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename TCounter>
|
||||
typename etl::enable_if<!etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
uninitialized_default_construct(TOutputIterator o_begin, TOutputIterator o_end, TCounter& count)
|
||||
{
|
||||
count += std::distance(o_begin, o_end);
|
||||
@ -326,7 +326,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename TSize>
|
||||
typename etl::enable_if<etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_default_construct_n(TOutputIterator o_begin, TSize n)
|
||||
{
|
||||
TOutputIterator o_end = o_begin + n;
|
||||
@ -339,7 +339,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename TSize>
|
||||
typename etl::enable_if<!etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_default_construct_n(TOutputIterator o_begin, TSize n)
|
||||
{
|
||||
TOutputIterator o_end = o_begin + n;
|
||||
@ -355,7 +355,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename TSize, typename TCounter>
|
||||
typename etl::enable_if<etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_default_construct_n(TOutputIterator o_begin, TSize n, TCounter& count)
|
||||
{
|
||||
TOutputIterator o_end = o_begin + n;
|
||||
@ -371,7 +371,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename TSize, typename TCounter>
|
||||
typename etl::enable_if<!etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_default_construct_n(TOutputIterator o_begin, TSize n, TCounter& count)
|
||||
{
|
||||
TOutputIterator o_end = o_begin + n;
|
||||
@ -430,7 +430,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator>
|
||||
typename etl::enable_if<etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
uninitialized_value_construct(TOutputIterator o_begin, TOutputIterator o_end)
|
||||
{
|
||||
typedef typename std::iterator_traits<TOutputIterator>::value_type value_type;
|
||||
@ -443,7 +443,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator>
|
||||
typename etl::enable_if<!etl::has_trivial_constructor<typename std::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename std::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
uninitialized_value_construct(TOutputIterator o_begin, TOutputIterator o_end)
|
||||
{
|
||||
typedef typename std::iterator_traits<TOutputIterator>::value_type value_type;
|
||||
@ -504,7 +504,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T>
|
||||
typename etl::enable_if<etl::has_trivial_destructor<T>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_destructible<T>::value, void>::type
|
||||
destroy_at(T* /*p*/)
|
||||
{
|
||||
}
|
||||
@ -514,7 +514,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T>
|
||||
typename etl::enable_if<!etl::has_trivial_destructor<T>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_destructible<T>::value, void>::type
|
||||
destroy_at(T* p)
|
||||
{
|
||||
p->~T();
|
||||
@ -526,7 +526,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T, typename TCounter>
|
||||
typename etl::enable_if<etl::has_trivial_destructor<T>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_destructible<T>::value, void>::type
|
||||
destroy_at(T* /*p*/, TCounter& count)
|
||||
{
|
||||
--count;
|
||||
@ -538,7 +538,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T, typename TCounter>
|
||||
typename etl::enable_if<!etl::has_trivial_destructor<T>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_destructible<T>::value, void>::type
|
||||
destroy_at(T* p, TCounter& count)
|
||||
{
|
||||
p->~T();
|
||||
@ -550,7 +550,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TIterator>
|
||||
typename etl::enable_if<etl::has_trivial_destructor<typename std::iterator_traits<TIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_destructible<typename std::iterator_traits<TIterator>::value_type>::value, void>::type
|
||||
destroy(TIterator /*i_begin*/, TIterator /*i_end*/)
|
||||
{
|
||||
}
|
||||
@ -560,7 +560,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TIterator>
|
||||
typename etl::enable_if<!etl::has_trivial_destructor<typename std::iterator_traits<TIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_destructible<typename std::iterator_traits<TIterator>::value_type>::value, void>::type
|
||||
destroy(TIterator i_begin, TIterator i_end)
|
||||
{
|
||||
while (i_begin != i_end)
|
||||
@ -576,7 +576,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TIterator, typename TCounter>
|
||||
typename etl::enable_if<etl::has_trivial_destructor<typename std::iterator_traits<TIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_destructible<typename std::iterator_traits<TIterator>::value_type>::value, void>::type
|
||||
destroy(TIterator i_begin, TIterator i_end, TCounter& count)
|
||||
{
|
||||
count -= std::distance(i_begin, i_end);
|
||||
@ -588,7 +588,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TIterator, typename TCounter>
|
||||
typename etl::enable_if<!etl::has_trivial_destructor<typename std::iterator_traits<TIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_destructible<typename std::iterator_traits<TIterator>::value_type>::value, void>::type
|
||||
destroy(TIterator i_begin, TIterator i_end, TCounter& count)
|
||||
{
|
||||
count -= std::distance(i_begin, i_end);
|
||||
@ -605,7 +605,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TIterator, typename TSize>
|
||||
typename etl::enable_if<etl::has_trivial_destructor<typename std::iterator_traits<TIterator>::value_type>::value, TIterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_destructible<typename std::iterator_traits<TIterator>::value_type>::value, TIterator>::type
|
||||
destroy_n(TIterator i_begin, TSize n)
|
||||
{
|
||||
return i_begin + n;
|
||||
@ -616,7 +616,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TIterator, typename TSize>
|
||||
typename etl::enable_if<!etl::has_trivial_destructor<typename std::iterator_traits<TIterator>::value_type>::value, TIterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_destructible<typename std::iterator_traits<TIterator>::value_type>::value, TIterator>::type
|
||||
destroy_n(TIterator i_begin, TSize n)
|
||||
{
|
||||
while (n > 0)
|
||||
@ -635,7 +635,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TIterator, typename TSize, typename TCounter>
|
||||
typename etl::enable_if<etl::has_trivial_destructor<typename std::iterator_traits<TIterator>::value_type>::value, TIterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_destructible<typename std::iterator_traits<TIterator>::value_type>::value, TIterator>::type
|
||||
destroy_n(TIterator i_begin, TSize n, TCounter& count)
|
||||
{
|
||||
count -= n;
|
||||
@ -648,7 +648,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TIterator, typename TSize, typename TCounter>
|
||||
typename etl::enable_if<!etl::has_trivial_destructor<typename std::iterator_traits<TIterator>::value_type>::value, TIterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_destructible<typename std::iterator_traits<TIterator>::value_type>::value, TIterator>::type
|
||||
destroy_n(TIterator i_begin, TSize n, TCounter& count)
|
||||
{
|
||||
count -= n;
|
||||
|
||||
@ -83,6 +83,17 @@ SOFTWARE.
|
||||
#define ETL_STATIC_ASSERT_SUPPORTED
|
||||
#endif
|
||||
|
||||
// Check to see if the compiler supports C++11 type traits.
|
||||
#if (defined(ETL_COMPILER_MICROSOFT) && (_MSC_VER >= 1600)) || \
|
||||
(defined(ETL_COMPILER_GCC) && (__cplusplus >= 201103L))
|
||||
#define ETL_C11_TYPE_TRAITS_SUPPORTED
|
||||
#endif
|
||||
|
||||
#if (defined(ETL_COMPILER_MICROSOFT) && (_MSC_VER >= 1600)) || \
|
||||
(defined(ETL_COMPILER_GCC) && (__cplusplus >= 201402L))
|
||||
#define ETL_C11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
|
||||
#endif
|
||||
|
||||
// Some targets do not support 8bit types.
|
||||
#define ETL_8BIT_SUPPORT (CHAR_BIT == 8)
|
||||
|
||||
|
||||
@ -464,7 +464,7 @@ namespace etl
|
||||
std::copy(first, last, position);
|
||||
p_end += count;
|
||||
}
|
||||
|
||||
|
||||
//*********************************************************************
|
||||
/// Erases an element.
|
||||
///\param i_element Iterator to the element.
|
||||
@ -566,6 +566,17 @@ namespace etl
|
||||
p_end = p_buffer;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair(void** p_buffer_)
|
||||
{
|
||||
uintptr_t length = p_end - p_buffer;
|
||||
|
||||
p_buffer = p_buffer_;
|
||||
p_end = p_buffer_ + length;
|
||||
}
|
||||
|
||||
void** p_buffer;
|
||||
void** p_end;
|
||||
|
||||
|
||||
@ -101,6 +101,20 @@ namespace etl
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
///\ingroup vector
|
||||
/// Vector incompatible type exception.
|
||||
//***************************************************************************
|
||||
class vector_incompatible_type : public vector_exception
|
||||
{
|
||||
public:
|
||||
|
||||
vector_incompatible_type(string_type file_name, numeric_type line_number)
|
||||
: vector_exception(ETL_ERROR_TEXT("vector:type", ETL_FILE"D"), file_name, line_number)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
///\ingroup vector
|
||||
/// The base class for all templated vector types.
|
||||
|
||||
@ -47,15 +47,15 @@ namespace etl
|
||||
template <typename T, const T VALUE>
|
||||
struct integral_constant
|
||||
{
|
||||
static const T value = VALUE;
|
||||
static const T value = VALUE;
|
||||
|
||||
typedef T value_type;
|
||||
typedef T value_type;
|
||||
typedef integral_constant<T, VALUE> type;
|
||||
|
||||
operator value_type() const
|
||||
{
|
||||
return value;
|
||||
}
|
||||
operator value_type() const
|
||||
{
|
||||
return value;
|
||||
}
|
||||
};
|
||||
|
||||
/// integral_constant specialisations
|
||||
@ -238,25 +238,25 @@ namespace etl
|
||||
template <typename T> struct is_pod : etl::integral_constant<bool, etl::is_fundamental<T>::value ||
|
||||
etl::is_pointer<T>::value> {};
|
||||
|
||||
/// has_trivial_constructor
|
||||
/// is_trivially_constructible
|
||||
/// For C++03, only POD types are recognised.
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct has_trivial_constructor : etl::is_pod<T> {};
|
||||
template <typename T> struct is_trivially_constructible : etl::is_pod<T> {};
|
||||
|
||||
/// has_trivial_copy_constructor
|
||||
/// is_trivially_copy_constructible
|
||||
/// For C++03, only POD types are recognised.
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct has_trivial_copy_constructor : etl::is_pod<T> {};
|
||||
template <typename T> struct is_trivially_copy_constructible : etl::is_pod<T> {};
|
||||
|
||||
/// has_trivial_destructor
|
||||
/// is_trivially_destructible
|
||||
/// For C++03, only POD types are recognised.
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct has_trivial_destructor : etl::is_pod<T> {};
|
||||
template <typename T> struct is_trivially_destructible : etl::is_pod<T> {};
|
||||
|
||||
/// has_trivial_assignment
|
||||
/// is_trivially_copy_assignable
|
||||
/// For C++03, only POD types are recognised.
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct has_trivial_assignment : etl::is_pod<T> {};
|
||||
template <typename T> struct is_trivially_copy_assignable : etl::is_pod<T> {};
|
||||
|
||||
/// conditional
|
||||
///\ingroup type_traits
|
||||
|
||||
@ -177,6 +177,14 @@ namespace etl
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
{
|
||||
etl::iu16string::repair(buffer);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
value_type buffer[MAX_SIZE + 1];
|
||||
|
||||
@ -177,6 +177,14 @@ namespace etl
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
{
|
||||
etl::iu32string::repair(buffer);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
value_type buffer[MAX_SIZE + 1];
|
||||
|
||||
73
src/vector.h
73
src/vector.h
@ -33,6 +33,10 @@ SOFTWARE.
|
||||
|
||||
#define __ETL_IN_VECTOR_H__
|
||||
|
||||
#ifdef ETL_C11_TYPE_TRAITS_SUPPORTED
|
||||
#include <type_traits>
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <iterator>
|
||||
@ -220,7 +224,7 @@ namespace etl
|
||||
///\param value The value to fill new elements with. Default = default constructed value.
|
||||
//*********************************************************************
|
||||
template <typename U = T>
|
||||
typename etl::enable_if<etl::has_trivial_constructor<U>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<U>::value, void>::type
|
||||
resize(size_t new_size, T value)
|
||||
{
|
||||
ETL_ASSERT(new_size <= MAX_SIZE, ETL_ERROR(vector_full));
|
||||
@ -254,7 +258,7 @@ namespace etl
|
||||
///\param value The value to fill new elements with. Default = default constructed value.
|
||||
//*********************************************************************
|
||||
template <typename U = T>
|
||||
typename etl::enable_if<!etl::has_trivial_constructor<U>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<U>::value, void>::type
|
||||
resize(size_t new_size, T value)
|
||||
{
|
||||
ETL_ASSERT(new_size <= MAX_SIZE, ETL_ERROR(vector_full));
|
||||
@ -395,6 +399,8 @@ namespace etl
|
||||
template <typename TIterator>
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
STATIC_ASSERT((etl::is_same<typename etl::remove_cv<T>::type, typename etl::remove_cv<typename std::iterator_traits<TIterator>::value_type>::type>::value), "Iterator type does not match container type");
|
||||
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type count = std::distance(first, last);
|
||||
ETL_ASSERT(static_cast<size_t>(count) <= MAX_SIZE, ETL_ERROR(vector_full));
|
||||
@ -402,7 +408,7 @@ namespace etl
|
||||
|
||||
initialise();
|
||||
|
||||
#if defined(ETL_DEBUG)
|
||||
#if defined(ETL_DEBUG)
|
||||
p_end = etl::uninitialized_copy(first, last, p_buffer, construct_count);
|
||||
#else
|
||||
p_end = etl::uninitialized_copy(first, last, p_buffer);
|
||||
@ -421,7 +427,7 @@ namespace etl
|
||||
|
||||
initialise();
|
||||
|
||||
#if defined(ETL_DEBUG)
|
||||
#if defined(ETL_DEBUG)
|
||||
p_end = etl::uninitialized_fill_n(p_buffer, n, value, construct_count);
|
||||
#else
|
||||
p_end = etl::uninitialized_fill_n(p_buffer, n, value);
|
||||
@ -506,7 +512,7 @@ namespace etl
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
template <typename U = T>
|
||||
typename etl::enable_if<etl::has_trivial_constructor<U>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<U>::value, void>::type
|
||||
insert(iterator position, size_t n, parameter_t value)
|
||||
{
|
||||
ETL_ASSERT((size() + n) <= MAX_SIZE, ETL_ERROR(vector_full));
|
||||
@ -526,7 +532,7 @@ namespace etl
|
||||
///\param value The value to insert.
|
||||
//*********************************************************************
|
||||
template <typename U = T>
|
||||
typename etl::enable_if<!etl::has_trivial_constructor<U>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<U>::value, void>::type
|
||||
insert(iterator position, size_t n, parameter_t value)
|
||||
{
|
||||
ETL_ASSERT((size() + n) <= MAX_SIZE, ETL_ERROR(vector_full));
|
||||
@ -594,7 +600,7 @@ namespace etl
|
||||
///\param last The last + 1 element to add.
|
||||
//*********************************************************************
|
||||
template <class TIterator, typename U = T>
|
||||
typename etl::enable_if<etl::has_trivial_constructor<U>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<U>::value, void>::type
|
||||
insert(iterator position, TIterator first, TIterator last)
|
||||
{
|
||||
size_t count = std::distance(first, last);
|
||||
@ -624,7 +630,7 @@ namespace etl
|
||||
///\param last The last + 1 element to add.
|
||||
//*********************************************************************
|
||||
template <class TIterator, typename U = T>
|
||||
typename etl::enable_if<!etl::has_trivial_constructor<U>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<U>::value, void>::type
|
||||
insert(iterator position, TIterator first, TIterator last)
|
||||
{
|
||||
size_t count = std::distance(first, last);
|
||||
@ -707,7 +713,7 @@ namespace etl
|
||||
///\return An iterator pointing to the element that followed the erased element.
|
||||
//*********************************************************************
|
||||
template <typename U = T>
|
||||
typename etl::enable_if<etl::has_trivial_constructor<U>::value, iterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<U>::value, iterator>::type
|
||||
erase(iterator first, iterator last)
|
||||
{
|
||||
if (first == begin() && last == end())
|
||||
@ -734,7 +740,7 @@ namespace etl
|
||||
///\return An iterator pointing to the element that followed the erased element.
|
||||
//*********************************************************************
|
||||
template <typename U = T>
|
||||
typename etl::enable_if<!etl::has_trivial_constructor<U>::value, iterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<U>::value, iterator>::type
|
||||
erase(iterator first, iterator last)
|
||||
{
|
||||
if (first == begin() && last == end())
|
||||
@ -751,7 +757,7 @@ namespace etl
|
||||
etl::destroy(p_end - n_delete, p_end, construct_count);
|
||||
#else
|
||||
etl::destroy(p_end - n_delete, p_end);
|
||||
#endif
|
||||
#endif
|
||||
p_end -= n_delete;
|
||||
}
|
||||
|
||||
@ -807,6 +813,13 @@ namespace etl
|
||||
return max_size() - size();
|
||||
}
|
||||
|
||||
#ifdef ETL_IVECTOR_REPAIR_ENABLE
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
virtual void repair() = 0;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
//*********************************************************************
|
||||
@ -833,14 +846,24 @@ namespace etl
|
||||
p_end = p_buffer;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair(T* p_buffer_)
|
||||
{
|
||||
uintptr_t length = p_end - p_buffer;
|
||||
p_buffer = p_buffer_;
|
||||
p_end = p_buffer_ + length;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
pointer p_buffer; ///< Pointer to the start of the buffer.
|
||||
pointer p_end; ///< Pointer to one past the last element in the buffer.
|
||||
|
||||
//*********************************************************************
|
||||
/// Create a new element with a default value at the back.
|
||||
//*********************************************************************
|
||||
//*********************************************************************
|
||||
/// Create a new element with a default value at the back.
|
||||
//*********************************************************************
|
||||
inline void create_back()
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
@ -1048,11 +1071,23 @@ namespace etl
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
{
|
||||
#ifdef ETL_C11_TYPE_TRAITS_IS_TRIVIAL_SUPPORTED
|
||||
ETL_ASSERT(std::is_trivially_copyable<T>::value, ETL_ERROR(etl::vector_incompatible_type));
|
||||
#endif
|
||||
|
||||
etl::ivector<T>::repair(buffer);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
typename etl::aligned_storage<sizeof(T) * MAX_SIZE, etl::alignment_of<T>::value>::type buffer;
|
||||
};
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
/// A vector implementation that uses a fixed size buffer.
|
||||
///\tparam T The element type.
|
||||
@ -1133,6 +1168,14 @@ namespace etl
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
{
|
||||
etl::ivector<T*>::repair(buffer);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
typename etl::aligned_storage<sizeof(T*) * MAX_SIZE, etl::alignment_of<T*>::value>::type buffer;
|
||||
|
||||
@ -178,6 +178,14 @@ namespace etl
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Fix the internal pointers after a low level memory copy.
|
||||
//*************************************************************************
|
||||
void repair()
|
||||
{
|
||||
etl::iwstring::repair(buffer);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
value_type buffer[MAX_SIZE + 1];
|
||||
|
||||
BIN
support/Class diagrams.docx
Normal file
BIN
support/Class diagrams.docx
Normal file
Binary file not shown.
13
support/Flat_map_class_diagram.doc
Normal file
13
support/Flat_map_class_diagram.doc
Normal file
File diff suppressed because one or more lines are too long
17
support/List_class_diagram.doc
Normal file
17
support/List_class_diagram.doc
Normal file
File diff suppressed because one or more lines are too long
@ -52,6 +52,9 @@
|
||||
<Add option="-std=c++11" />
|
||||
<Add option="-g" />
|
||||
<Add option="-fexceptions" />
|
||||
<Add option="-DETL_IVECTOR_REPAIR_ENABLE" />
|
||||
<Add option="-DETL_ISTRING_REPAIR_ENABLE" />
|
||||
<Add option="-DETL_IDEQUE_REPAIR_ENABLE" />
|
||||
<Add option="-DETL_THROW_EXCEPTIONS" />
|
||||
<Add option="-DETL_VERBOSE_ERRORS" />
|
||||
<Add option="-DETL_CHECK_PUSH_POP" />
|
||||
|
||||
@ -3289,7 +3289,7 @@
|
||||
"CurrentTest.h"
|
||||
"ReportAssertImpl.h"
|
||||
|
||||
1494283539 source:d:\users\john\documents\programming\github\etl\test\test_algorithm.cpp
|
||||
1497706369 source:d:\users\john\documents\programming\github\etl\test\test_algorithm.cpp
|
||||
"UnitTest++.h"
|
||||
"algorithm.h"
|
||||
"container.h"
|
||||
@ -3315,7 +3315,7 @@
|
||||
<stddef.h>
|
||||
<iterator>
|
||||
|
||||
1494277861 source:d:\users\john\documents\programming\github\etl\test\test_alignment.cpp
|
||||
1496992773 source:d:\users\john\documents\programming\github\etl\test\test_alignment.cpp
|
||||
"UnitTest++.h"
|
||||
"alignment.h"
|
||||
"type_traits.h"
|
||||
@ -3423,7 +3423,7 @@
|
||||
"exception.h"
|
||||
"error_handler.h"
|
||||
|
||||
1494277861 source:d:\users\john\documents\programming\github\etl\test\test_bitset.cpp
|
||||
1497713623 source:d:\users\john\documents\programming\github\etl\test\test_bitset.cpp
|
||||
"UnitTest++.h"
|
||||
<limits>
|
||||
<type_traits>
|
||||
@ -3538,7 +3538,7 @@
|
||||
"static_assert.h"
|
||||
"exception.h"
|
||||
|
||||
1494277861 source:d:\users\john\documents\programming\github\etl\test\test_deque.cpp
|
||||
1497713693 source:d:\users\john\documents\programming\github\etl\test\test_deque.cpp
|
||||
"UnitTest++.h"
|
||||
"ExtraCheckMacros.h"
|
||||
"deque.h"
|
||||
@ -3548,6 +3548,7 @@
|
||||
<algorithm>
|
||||
<iostream>
|
||||
<numeric>
|
||||
<cstring>
|
||||
|
||||
1494277861 d:\users\john\documents\programming\github\etl\test\extracheckmacros.h
|
||||
"../unittest-cpp/UnitTest++/HelperMacros.h"
|
||||
@ -3582,7 +3583,7 @@
|
||||
<stddef.h>
|
||||
"exception.h"
|
||||
|
||||
1488104217 d:\users\john\documents\programming\github\etl\test\data.h
|
||||
1497713618 d:\users\john\documents\programming\github\etl\test\data.h
|
||||
<ostream>
|
||||
|
||||
1494277861 source:d:\users\john\documents\programming\github\etl\test\test_endian.cpp
|
||||
@ -3612,7 +3613,7 @@
|
||||
<string>
|
||||
"exception.h"
|
||||
|
||||
1494277861 source:d:\users\john\documents\programming\github\etl\test\test_flat_map.cpp
|
||||
1497306512 source:d:\users\john\documents\programming\github\etl\test\test_flat_map.cpp
|
||||
"UnitTest++.h"
|
||||
<map>
|
||||
<array>
|
||||
@ -3726,7 +3727,7 @@
|
||||
|
||||
1482623723 v_1.h"
|
||||
|
||||
1494283539 source:d:\users\john\documents\programming\github\etl\test\test_forward_list.cpp
|
||||
1497713618 source:d:\users\john\documents\programming\github\etl\test\test_forward_list.cpp
|
||||
"UnitTest++.h"
|
||||
"ExtraCheckMacros.h"
|
||||
"data.h"
|
||||
@ -3736,6 +3737,7 @@
|
||||
<forward_list>
|
||||
<vector>
|
||||
<string>
|
||||
<list>
|
||||
|
||||
1452796556 d:\users\john\documents\programming\github\etl\forward_list.h
|
||||
<stddef.h>
|
||||
@ -3783,7 +3785,7 @@
|
||||
|
||||
1479511692 nction.h"
|
||||
|
||||
1494277861 source:d:\users\john\documents\programming\github\etl\test\test_functional.cpp
|
||||
1497685058 source:d:\users\john\documents\programming\github\etl\test\test_functional.cpp
|
||||
"UnitTest++.h"
|
||||
"functional.h"
|
||||
<list>
|
||||
@ -3843,7 +3845,7 @@
|
||||
1450265856 d:\users\john\documents\programming\github\etl\largest.h
|
||||
"type_traits.h"
|
||||
|
||||
1494283539 source:d:\users\john\documents\programming\github\etl\test\test_list.cpp
|
||||
1497713618 source:d:\users\john\documents\programming\github\etl\test\test_list.cpp
|
||||
"UnitTest++.h"
|
||||
"ExtraCheckMacros.h"
|
||||
"list.h"
|
||||
@ -3968,11 +3970,12 @@
|
||||
<stddef.h>
|
||||
"exception.h"
|
||||
|
||||
1494277861 source:d:\users\john\documents\programming\github\etl\test\test_vector.cpp
|
||||
1497713693 source:d:\users\john\documents\programming\github\etl\test\test_vector.cpp
|
||||
"UnitTest++.h"
|
||||
<vector>
|
||||
<array>
|
||||
<algorithm>
|
||||
<cstring>
|
||||
"vector.h"
|
||||
|
||||
1479511692 ctor.h"
|
||||
@ -5230,7 +5233,7 @@
|
||||
|
||||
1452516033 /home/jwellbelove/Programming/etl/visitor.h
|
||||
|
||||
1494283539 source:d:\users\john\documents\programming\github\etl\test\test_intrusive_forward_list.cpp
|
||||
1497713618 source:d:\users\john\documents\programming\github\etl\test\test_intrusive_forward_list.cpp
|
||||
"UnitTest++.h"
|
||||
"ExtraCheckMacros.h"
|
||||
"data.h"
|
||||
@ -5309,7 +5312,7 @@
|
||||
"iterator.h"
|
||||
"type_traits.h"
|
||||
|
||||
1494277861 d:\users\john\documents\programming\github\etl\src\type_traits.h
|
||||
1497713693 d:\users\john\documents\programming\github\etl\src\type_traits.h
|
||||
<stddef.h>
|
||||
"platform.h"
|
||||
"nullptr.h"
|
||||
@ -5318,7 +5321,7 @@
|
||||
<stddef.h>
|
||||
<iterator>
|
||||
|
||||
1492164295 d:\users\john\documents\programming\github\etl\src\alignment.h
|
||||
1496993010 d:\users\john\documents\programming\github\etl\src\alignment.h
|
||||
<stdint.h>
|
||||
"type_traits.h"
|
||||
"static_assert.h"
|
||||
@ -5326,7 +5329,7 @@
|
||||
1482948766 d:\users\john\documents\programming\github\etl\src\static_assert.h
|
||||
"platform.h"
|
||||
|
||||
1494277860 d:\users\john\documents\programming\github\etl\src\array.h
|
||||
1497306512 d:\users\john\documents\programming\github\etl\src\array.h
|
||||
<iterator>
|
||||
<functional>
|
||||
<algorithm>
|
||||
@ -5370,7 +5373,7 @@
|
||||
<stdint.h>
|
||||
"integral_limits.h"
|
||||
|
||||
1494277860 d:\users\john\documents\programming\github\etl\src\bitset.h
|
||||
1497685058 d:\users\john\documents\programming\github\etl\src\bitset.h
|
||||
<algorithm>
|
||||
<iterator>
|
||||
<string.h>
|
||||
@ -5480,7 +5483,7 @@
|
||||
"static_assert.h"
|
||||
"exception.h"
|
||||
|
||||
1494277860 d:\users\john\documents\programming\github\etl\src\deque.h
|
||||
1497713692 d:\users\john\documents\programming\github\etl\src\deque.h
|
||||
<stddef.h>
|
||||
<stdint.h>
|
||||
<iterator>
|
||||
@ -5512,22 +5515,9 @@
|
||||
1482948766 d:\users\john\documents\programming\github\etl\src\fixed_iterator.h
|
||||
<iterator>
|
||||
|
||||
1494277860 d:\users\john\documents\programming\github\etl\src\flat_map.h
|
||||
<stddef.h>
|
||||
<iterator>
|
||||
<functional>
|
||||
<algorithm>
|
||||
<functional>
|
||||
<utility>
|
||||
"platform.h"
|
||||
"vector.h"
|
||||
1497713623 d:\users\john\documents\programming\github\etl\src\flat_map.h
|
||||
"reference_flat_map.h"
|
||||
"pool.h"
|
||||
"exception.h"
|
||||
"vector.h"
|
||||
"error_handler.h"
|
||||
"debug_count.h"
|
||||
"type_traits.h"
|
||||
"parameter_type.h"
|
||||
|
||||
1482748252 d:\users\john\documents\programming\github\etl\src\iflat_map.h
|
||||
<iterator>
|
||||
@ -5562,13 +5552,14 @@
|
||||
|
||||
1482748239 vectorpointer.h"
|
||||
|
||||
1494277860 d:\users\john\documents\programming\github\etl\src\private\vector_base.h
|
||||
1497713693 d:\users\john\documents\programming\github\etl\src\private\vector_base.h
|
||||
<stddef.h>
|
||||
"../exception.h"
|
||||
"../error_handler.h"
|
||||
"../debug_count.h"
|
||||
|
||||
1494277861 d:\users\john\documents\programming\github\etl\src\vector.h
|
||||
1497713693 d:\users\john\documents\programming\github\etl\src\vector.h
|
||||
<type_traits>
|
||||
<stddef.h>
|
||||
<stdint.h>
|
||||
<iterator>
|
||||
@ -5624,7 +5615,7 @@
|
||||
"../ivector.h"
|
||||
"../error_handler.h"
|
||||
|
||||
1494277860 d:\users\john\documents\programming\github\etl\src\forward_list.h
|
||||
1497713617 d:\users\john\documents\programming\github\etl\src\forward_list.h
|
||||
<iterator>
|
||||
<algorithm>
|
||||
<functional>
|
||||
@ -5680,7 +5671,7 @@
|
||||
"../exception.h"
|
||||
"../error_handler.h"
|
||||
|
||||
1479515290 d:\users\john\documents\programming\github\etl\src\functional.h
|
||||
1494763312 d:\users\john\documents\programming\github\etl\src\functional.h
|
||||
|
||||
1482948766 d:\users\john\documents\programming\github\etl\src\hash.h
|
||||
<stdint.h>
|
||||
@ -5691,7 +5682,7 @@
|
||||
|
||||
1479515290 d:\users\john\documents\programming\github\etl\src\instance_count.h
|
||||
|
||||
1488104217 d:\users\john\documents\programming\github\etl\src\intrusive_forward_list.h
|
||||
1497713617 d:\users\john\documents\programming\github\etl\src\intrusive_forward_list.h
|
||||
"platform.h"
|
||||
<iterator>
|
||||
<algorithm>
|
||||
@ -5715,7 +5706,7 @@
|
||||
"exception.h"
|
||||
"error_handler.h"
|
||||
|
||||
1494277860 d:\users\john\documents\programming\github\etl\src\io_port.h
|
||||
1497308571 d:\users\john\documents\programming\github\etl\src\io_port.h
|
||||
<stdint.h>
|
||||
<iterator>
|
||||
"nullptr.h"
|
||||
@ -5724,7 +5715,7 @@
|
||||
1485905321 d:\users\john\documents\programming\github\etl\src\largest.h
|
||||
"type_traits.h"
|
||||
|
||||
1494277860 d:\users\john\documents\programming\github\etl\src\list.h
|
||||
1497713617 d:\users\john\documents\programming\github\etl\src\list.h
|
||||
<iterator>
|
||||
<algorithm>
|
||||
<functional>
|
||||
@ -5757,7 +5748,7 @@
|
||||
"../exception.h"
|
||||
"../error_handler.h"
|
||||
|
||||
1494277860 d:\users\john\documents\programming\github\etl\src\map.h
|
||||
1497306512 d:\users\john\documents\programming\github\etl\src\map.h
|
||||
<stddef.h>
|
||||
<iterator>
|
||||
<functional>
|
||||
@ -5835,7 +5826,7 @@
|
||||
"../exception.h"
|
||||
"../error_handler.h"
|
||||
|
||||
1494277861 d:\users\john\documents\programming\github\etl\src\set.h
|
||||
1497685058 d:\users\john\documents\programming\github\etl\src\set.h
|
||||
<stddef.h>
|
||||
<iterator>
|
||||
<functional>
|
||||
@ -5908,7 +5899,7 @@
|
||||
|
||||
1482624915 ordered_map.h"
|
||||
|
||||
1494277861 d:\users\john\documents\programming\github\etl\src\unordered_map.h
|
||||
1497306512 d:\users\john\documents\programming\github\etl\src\unordered_map.h
|
||||
<stddef.h>
|
||||
<iterator>
|
||||
<functional>
|
||||
@ -5961,7 +5952,7 @@
|
||||
|
||||
1479515291 d:\users\john\documents\programming\github\etl\src\visitor.h
|
||||
|
||||
1494277860 d:\users\john\documents\programming\github\etl\src\platform.h
|
||||
1497713692 d:\users\john\documents\programming\github\etl\src\platform.h
|
||||
<stdint.h>
|
||||
<limits.h>
|
||||
|
||||
@ -5997,7 +5988,7 @@
|
||||
|
||||
1479511691 at_multimap.h"
|
||||
|
||||
1494277860 d:\users\john\documents\programming\github\etl\src\flat_multimap.h
|
||||
1497306512 d:\users\john\documents\programming\github\etl\src\flat_multimap.h
|
||||
<stddef.h>
|
||||
<iterator>
|
||||
<algorithm>
|
||||
@ -6087,7 +6078,7 @@
|
||||
|
||||
1482358550 trusive_links.h"
|
||||
|
||||
1494283539 source:d:\users\john\documents\programming\github\etl\test\test_intrusive_list.cpp
|
||||
1497713618 source:d:\users\john\documents\programming\github\etl\test\test_intrusive_list.cpp
|
||||
"UnitTest++.h"
|
||||
"ExtraCheckMacros.h"
|
||||
"data.h"
|
||||
@ -6098,7 +6089,7 @@
|
||||
<vector>
|
||||
<string>
|
||||
|
||||
1488104217 d:\users\john\documents\programming\github\etl\src\intrusive_list.h
|
||||
1497713617 d:\users\john\documents\programming\github\etl\src\intrusive_list.h
|
||||
"platform.h"
|
||||
<iterator>
|
||||
<algorithm>
|
||||
@ -6144,7 +6135,7 @@
|
||||
|
||||
1479511692 ltimap.h"
|
||||
|
||||
1494277860 d:\users\john\documents\programming\github\etl\src\multimap.h
|
||||
1497306512 d:\users\john\documents\programming\github\etl\src\multimap.h
|
||||
<stddef.h>
|
||||
<iterator>
|
||||
<functional>
|
||||
@ -6189,7 +6180,7 @@
|
||||
|
||||
1479511692 ltiset.h"
|
||||
|
||||
1494277860 d:\users\john\documents\programming\github\etl\src\multiset.h
|
||||
1497306512 d:\users\john\documents\programming\github\etl\src\multiset.h
|
||||
<stddef.h>
|
||||
<iterator>
|
||||
<functional>
|
||||
@ -6301,7 +6292,7 @@
|
||||
|
||||
1482625301 ordered_multimap.h"
|
||||
|
||||
1494277861 d:\users\john\documents\programming\github\etl\src\unordered_multimap.h
|
||||
1497306512 d:\users\john\documents\programming\github\etl\src\unordered_multimap.h
|
||||
<stddef.h>
|
||||
<iterator>
|
||||
<functional>
|
||||
@ -6354,7 +6345,7 @@
|
||||
"unordered_multiset.h"
|
||||
"checksum.h"
|
||||
|
||||
1494277861 d:\users\john\documents\programming\github\etl\src\unordered_multiset.h
|
||||
1497306512 d:\users\john\documents\programming\github\etl\src\unordered_multiset.h
|
||||
<stddef.h>
|
||||
<iterator>
|
||||
<functional>
|
||||
@ -6404,7 +6395,7 @@
|
||||
"unordered_set.h"
|
||||
"checksum.h"
|
||||
|
||||
1494277861 d:\users\john\documents\programming\github\etl\src\unordered_set.h
|
||||
1497306512 d:\users\john\documents\programming\github\etl\src\unordered_set.h
|
||||
<stddef.h>
|
||||
<iterator>
|
||||
<functional>
|
||||
@ -6480,7 +6471,7 @@
|
||||
|
||||
1482079098 or.h"
|
||||
|
||||
1494277861 d:\users\john\documents\programming\github\etl\src\private\pvoidvector.h
|
||||
1497713692 d:\users\john\documents\programming\github\etl\src\private\pvoidvector.h
|
||||
<iterator>
|
||||
<algorithm>
|
||||
<functional>
|
||||
@ -6530,21 +6521,22 @@
|
||||
"error_handler.h"
|
||||
"intrusive_links.h"
|
||||
|
||||
1494277861 source:d:\users\john\documents\programming\github\etl\test\test_string_char.cpp
|
||||
1497713753 source:d:\users\john\documents\programming\github\etl\test\test_string_char.cpp
|
||||
"UnitTest++.h"
|
||||
<string>
|
||||
<array>
|
||||
<algorithm>
|
||||
"cstring.h"
|
||||
"fnv_1.h"
|
||||
|
||||
1482181573 tring.h"
|
||||
|
||||
1494277860 d:\users\john\documents\programming\github\etl\src\cstring.h
|
||||
1497713693 d:\users\john\documents\programming\github\etl\src\cstring.h
|
||||
"platform.h"
|
||||
"basic_string.h"
|
||||
"hash.h"
|
||||
|
||||
1494277860 d:\users\john\documents\programming\github\etl\src\basic_string.h
|
||||
1497713692 d:\users\john\documents\programming\github\etl\src\basic_string.h
|
||||
<stddef.h>
|
||||
<stdint.h>
|
||||
<iterator>
|
||||
@ -6583,7 +6575,7 @@
|
||||
"../exception.h"
|
||||
"../error_handler.h"
|
||||
|
||||
1494277861 source:d:\users\john\documents\programming\github\etl\test\test_string_u16.cpp
|
||||
1497713788 source:d:\users\john\documents\programming\github\etl\test\test_string_u16.cpp
|
||||
"UnitTest++.h"
|
||||
<string>
|
||||
<array>
|
||||
@ -6592,12 +6584,12 @@
|
||||
|
||||
1482099557 6string.h"
|
||||
|
||||
1482948766 d:\users\john\documents\programming\github\etl\src\u16string.h
|
||||
1497713693 d:\users\john\documents\programming\github\etl\src\u16string.h
|
||||
"platform.h"
|
||||
"basic_string.h"
|
||||
"hash.h"
|
||||
|
||||
1494277861 source:d:\users\john\documents\programming\github\etl\test\test_string_u32.cpp
|
||||
1497713815 source:d:\users\john\documents\programming\github\etl\test\test_string_u32.cpp
|
||||
"UnitTest++.h"
|
||||
<string>
|
||||
<array>
|
||||
@ -6606,19 +6598,19 @@
|
||||
|
||||
1482099666 2string.h"
|
||||
|
||||
1482948766 d:\users\john\documents\programming\github\etl\src\u32string.h
|
||||
1497713693 d:\users\john\documents\programming\github\etl\src\u32string.h
|
||||
"platform.h"
|
||||
"basic_string.h"
|
||||
"hash.h"
|
||||
|
||||
1494277861 source:d:\users\john\documents\programming\github\etl\test\test_string_wchar_t.cpp
|
||||
1497713864 source:d:\users\john\documents\programming\github\etl\test\test_string_wchar_t.cpp
|
||||
"UnitTest++.h"
|
||||
<string>
|
||||
<array>
|
||||
<algorithm>
|
||||
"wstring.h"
|
||||
|
||||
1482948766 d:\users\john\documents\programming\github\etl\src\wstring.h
|
||||
1497713693 d:\users\john\documents\programming\github\etl\src\wstring.h
|
||||
"platform.h"
|
||||
"basic_string.h"
|
||||
"hash.h"
|
||||
@ -6641,11 +6633,12 @@
|
||||
1482948766 d:\users\john\documents\programming\github\etl\src\utility.h
|
||||
"type_traits.h"
|
||||
|
||||
1494277861 source:d:\users\john\documents\programming\github\etl\test\test_vector_pointer.cpp
|
||||
1497713693 source:d:\users\john\documents\programming\github\etl\test\test_vector_pointer.cpp
|
||||
"UnitTest++.h"
|
||||
<vector>
|
||||
<array>
|
||||
<algorithm>
|
||||
<cstring>
|
||||
"vector.h"
|
||||
|
||||
1482076051 source:/mnt/hgfs/Programming/GitHub/unittest-cpp/UnitTest++/RequiredCheckException.cpp
|
||||
@ -7862,7 +7855,7 @@
|
||||
<iterator>
|
||||
"type_traits.h"
|
||||
|
||||
1488104217 d:\users\john\documents\programming\github\etl\src\memory.h
|
||||
1497713692 d:\users\john\documents\programming\github\etl\src\memory.h
|
||||
<iterator>
|
||||
<algorithm>
|
||||
"type_traits.h"
|
||||
@ -7981,7 +7974,7 @@
|
||||
<stdint.h>
|
||||
<vector>
|
||||
|
||||
1494277861 source:d:\users\john\documents\programming\github\etl\test\test_random.cpp
|
||||
1497713618 source:d:\users\john\documents\programming\github\etl\test\test_random.cpp
|
||||
"UnitTest++.h"
|
||||
<stdint.h>
|
||||
"random.h"
|
||||
@ -7989,7 +7982,7 @@
|
||||
<algorithm>
|
||||
<fstream>
|
||||
|
||||
1494277861 source:d:\users\john\documents\programming\github\etl\test\test_vector_non_trivial.cpp
|
||||
1497685854 source:d:\users\john\documents\programming\github\etl\test\test_vector_non_trivial.cpp
|
||||
"UnitTest++.h"
|
||||
<vector>
|
||||
<array>
|
||||
@ -8173,7 +8166,7 @@
|
||||
"HelperMacros.h"
|
||||
<csetjmp>
|
||||
|
||||
1494362778 source:d:\users\john\documents\programming\github\etl\test\test_reference_flat_map.cpp
|
||||
1497308006 source:d:\users\john\documents\programming\github\etl\test\test_reference_flat_map.cpp
|
||||
"UnitTest++.h"
|
||||
<map>
|
||||
<array>
|
||||
@ -8186,13 +8179,18 @@
|
||||
"data.h"
|
||||
"reference_flat_map.h"
|
||||
|
||||
1494362778 d:\users\john\documents\programming\github\etl\src\reference_flat_map.h
|
||||
1497308006 d:\users\john\documents\programming\github\etl\src\reference_flat_map.h
|
||||
<stddef.h>
|
||||
"exception.h"
|
||||
"platform.h"
|
||||
"vector.h"
|
||||
"error_handler.h"
|
||||
"debug_count.h"
|
||||
"type_traits.h"
|
||||
"parameter_type.h"
|
||||
"exception.h"
|
||||
"static_assert.h"
|
||||
|
||||
1494362778 source:d:\users\john\documents\programming\github\etl\test\test_reference_flat_multimap.cpp
|
||||
1494363271 source:d:\users\john\documents\programming\github\etl\test\test_reference_flat_multimap.cpp
|
||||
"UnitTest++.h"
|
||||
<map>
|
||||
<array>
|
||||
@ -8204,14 +8202,14 @@
|
||||
"data.h"
|
||||
"reference_flat_multimap.h"
|
||||
|
||||
1494362778 d:\users\john\documents\programming\github\etl\src\reference_flat_multimap.h
|
||||
1497685058 d:\users\john\documents\programming\github\etl\src\reference_flat_multimap.h
|
||||
<stddef.h>
|
||||
"exception.h"
|
||||
"error_handler.h"
|
||||
"debug_count.h"
|
||||
"vector.h"
|
||||
|
||||
1494362778 source:d:\users\john\documents\programming\github\etl\test\test_reference_flat_multiset.cpp
|
||||
1494363271 source:d:\users\john\documents\programming\github\etl\test\test_reference_flat_multiset.cpp
|
||||
"UnitTest++.h"
|
||||
<set>
|
||||
<array>
|
||||
@ -8223,7 +8221,7 @@
|
||||
"data.h"
|
||||
"reference_flat_multiset.h"
|
||||
|
||||
1494362778 d:\users\john\documents\programming\github\etl\src\reference_flat_multiset.h
|
||||
1494363271 d:\users\john\documents\programming\github\etl\src\reference_flat_multiset.h
|
||||
<iterator>
|
||||
<algorithm>
|
||||
<functional>
|
||||
@ -8236,7 +8234,7 @@
|
||||
"error_handler.h"
|
||||
"exception.h"
|
||||
|
||||
1494362778 source:d:\users\john\documents\programming\github\etl\test\test_reference_flat_set.cpp
|
||||
1494363271 source:d:\users\john\documents\programming\github\etl\test\test_reference_flat_set.cpp
|
||||
"UnitTest++.h"
|
||||
<set>
|
||||
<array>
|
||||
@ -8248,7 +8246,7 @@
|
||||
"data.h"
|
||||
"reference_flat_set.h"
|
||||
|
||||
1494362778 d:\users\john\documents\programming\github\etl\src\reference_flat_set.h
|
||||
1494363271 d:\users\john\documents\programming\github\etl\src\reference_flat_set.h
|
||||
<iterator>
|
||||
<algorithm>
|
||||
<functional>
|
||||
|
||||
@ -2,29 +2,9 @@
|
||||
<CodeBlocks_layout_file>
|
||||
<FileVersion major="1" minor="0" />
|
||||
<ActiveTarget name="Windows" />
|
||||
<File name="..\test_flat_multimap.cpp" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="..\..\src\static_assert.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3425" topLine="85" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_iterator.cpp" open="0" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6722" topLine="118" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\TestRunner.h" open="0" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="156" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\intrusive_flat_map.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4065" topLine="242" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\CurrentTest.cpp" open="0" top="0" tabpos="26" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="368" topLine="0" />
|
||||
<Cursor1 position="1477" topLine="19" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\Config.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
@ -32,24 +12,44 @@
|
||||
<Cursor1 position="792" topLine="7" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_intrusive_list.cpp" open="0" top="0" tabpos="24" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="..\..\src\error_handler.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="27580" topLine="735" />
|
||||
<Cursor1 position="4288" topLine="86" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_flat_set.cpp" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="..\..\src\deque.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="11541" topLine="359" />
|
||||
<Cursor1 position="54765" topLine="1632" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\ExecuteTest.h" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="..\test_algorithm.cpp" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="426" topLine="0" />
|
||||
<Cursor1 position="11590" topLine="274" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\intrusive_flat_set.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="..\..\src\flat_map.h" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7487" topLine="243" />
|
||||
<Cursor1 position="2722" topLine="51" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\CurrentTest.cpp" open="0" top="0" tabpos="26" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="368" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_map.cpp" open="0" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6368" topLine="164" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_vector_pointer.cpp" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1450" topLine="13" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\private\pvoidvector.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="18115" topLine="443" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\TestResults.cpp" open="0" top="0" tabpos="24" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
@ -57,24 +57,104 @@
|
||||
<Cursor1 position="537" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\forward_list.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="31509" topLine="979" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_intrusive_list.cpp" open="0" top="0" tabpos="24" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="27580" topLine="735" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\TestRunner.cpp" open="0" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2279" topLine="25" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\intrusive_flat_multimap.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3269" topLine="248" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_forward_list.cpp" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="9321" topLine="239" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\ExecuteTest.h" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="426" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\main.cpp" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="141" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_intrusive_forward_list.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="29068" topLine="732" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\unordered_multiset.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="22451" topLine="619" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\TestRunner.h" open="0" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="156" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_flat_map.cpp" open="0" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="18781" topLine="559" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\binary.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="..\test_list.cpp" open="0" top="0" tabpos="27" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="14624" topLine="373" />
|
||||
<Cursor1 position="17914" topLine="493" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\list.h" open="0" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="..\..\src\unordered_multimap.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="35098" topLine="1063" />
|
||||
<Cursor1 position="22871" topLine="625" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\unordered_set.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="22041" topLine="620" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\Test.cpp" open="0" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="699" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\Checks.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="469" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_iterator.cpp" open="0" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6722" topLine="118" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_deque.cpp" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1445" topLine="14" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\intrusive_flat_map.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4065" topLine="242" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\variant.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="36839" topLine="839" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_memory.cpp" open="0" top="0" tabpos="25" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
@ -87,39 +167,9 @@
|
||||
<Cursor1 position="883" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_list.cpp" open="0" top="0" tabpos="27" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="..\..\src\binary.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="17914" topLine="493" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_flat_multiset.cpp" open="0" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3011" topLine="58" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\main.cpp" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="141" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\Win32\TimeHelpers.cpp" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="103" topLine="6" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_io_port.cpp" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1452" topLine="3" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\integral_limits.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7252" topLine="152" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_intrusive_forward_list.cpp" open="0" top="0" tabpos="26" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="27667" topLine="693" />
|
||||
<Cursor1 position="14624" topLine="373" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\TestMacros.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
@ -127,29 +177,19 @@
|
||||
<Cursor1 position="1865" topLine="28" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_map.cpp" open="0" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="..\test_flat_set.cpp" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6368" topLine="164" />
|
||||
<Cursor1 position="11541" topLine="359" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\TestRunner.cpp" open="0" top="0" tabpos="20" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="..\..\src\vector.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2279" topLine="25" />
|
||||
<Cursor1 position="15560" topLine="381" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\Test.cpp" open="0" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="..\..\src\intrusive_flat_set.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="699" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_algorithm.cpp" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="11590" topLine="274" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\..\unittest-cpp\UnitTest++\Checks.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="469" topLine="0" />
|
||||
<Cursor1 position="7487" topLine="243" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\iterator.h" open="0" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
@ -157,9 +197,24 @@
|
||||
<Cursor1 position="1557" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\algorithm.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<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="0" topLine="0" />
|
||||
<Cursor1 position="103" topLine="6" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_flat_multiset.cpp" open="0" top="0" tabpos="21" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3011" topLine="58" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\integral_limits.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7252" topLine="152" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_io_port.cpp" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1452" topLine="3" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\intrusive_flat_multiset.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
@ -167,9 +222,24 @@
|
||||
<Cursor1 position="7605" topLine="248" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_forward_list.cpp" open="0" top="0" tabpos="23" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="..\..\src\algorithm.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="8440" topLine="209" />
|
||||
<Cursor1 position="0" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\..\src\list.h" open="0" top="0" tabpos="22" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="35098" topLine="1063" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_vector.cpp" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1450" topLine="13" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="..\test_flat_multimap.cpp" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3425" topLine="85" />
|
||||
</Cursor>
|
||||
</File>
|
||||
</CodeBlocks_layout_file>
|
||||
|
||||
16384
test/codeblocks/random.csv
Normal file
16384
test/codeblocks/random.csv
Normal file
File diff suppressed because it is too large
Load Diff
@ -32,8 +32,6 @@ SOFTWARE.
|
||||
#include <type_traits>
|
||||
#include <bitset>
|
||||
|
||||
#define ETL_IN_UNIT_TEST
|
||||
|
||||
#include "bitset.h"
|
||||
|
||||
#undef min
|
||||
|
||||
@ -38,6 +38,7 @@ SOFTWARE.
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <numeric>
|
||||
#include <cstring>
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -48,6 +49,8 @@ namespace
|
||||
typedef TestDataDC<std::string> DC;
|
||||
typedef TestDataNDC<std::string> NDC;
|
||||
|
||||
typedef etl::deque<int, SIZE> DataInt;
|
||||
typedef etl::ideque<int> IDataInt;
|
||||
typedef etl::deque<DC, SIZE> DataDC;
|
||||
typedef etl::deque<NDC, SIZE> DataNDC;
|
||||
typedef etl::ideque<NDC> IDataNDC;
|
||||
@ -82,6 +85,9 @@ namespace
|
||||
std::vector<NDC> initial_data_small = { N0, N1, N2, N3, N4, N5, N6, N7, N8, N9 };
|
||||
std::vector<NDC> insert_data = { N10, N11, N12, N13, N14 };
|
||||
std::vector<DC> initial_data_dc = { DC("0"), DC("1"), DC("2"), DC("3"), DC("4"), DC("5"), DC("6"), DC("7"), DC("8"), DC("9"), DC("10"), DC("11"), DC("12"), DC("13") };
|
||||
std::vector<int> int_data1 = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 };
|
||||
std::vector<int> int_data2 = { 15, 16, 17, 18 };
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_constructor)
|
||||
@ -1514,5 +1520,81 @@ namespace
|
||||
CHECK(data.rbegin() == data.rend());
|
||||
CHECK(data.crbegin() == data.crend());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_memcpy_repair)
|
||||
{
|
||||
DataInt data(int_data1.begin(), int_data1.end());
|
||||
data.pop_front();
|
||||
data.pop_front();
|
||||
data.pop_front();
|
||||
data.pop_front();
|
||||
data.insert(data.end(), int_data2.begin(), int_data2.end());
|
||||
|
||||
char buffer[sizeof(DataInt)];
|
||||
|
||||
memcpy(&buffer, &data, sizeof(data));
|
||||
|
||||
DataInt& rdata(*reinterpret_cast<DataInt*>(buffer));
|
||||
rdata.repair();
|
||||
|
||||
// Check that the memcpy'd vector is the same.
|
||||
CHECK_EQUAL(data.size(), rdata.size());
|
||||
CHECK(!rdata.empty());
|
||||
CHECK(rdata.full());
|
||||
|
||||
bool is_equal = std::equal(rdata.begin(),
|
||||
rdata.end(),
|
||||
data.begin());
|
||||
|
||||
CHECK(is_equal);
|
||||
|
||||
// Modify the original and check that the memcpy'd vector is not the same.
|
||||
std::reverse(data.begin(), data.end());
|
||||
|
||||
is_equal = std::equal(rdata.begin(),
|
||||
rdata.end(),
|
||||
data.begin());
|
||||
|
||||
CHECK(!is_equal);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_memcpy_repair_virtual)
|
||||
{
|
||||
DataInt data(int_data1.begin(), int_data1.end());
|
||||
data.pop_front();
|
||||
data.pop_front();
|
||||
data.pop_front();
|
||||
data.pop_front();
|
||||
data.insert(data.end(), int_data2.begin(), int_data2.end());
|
||||
|
||||
char buffer[sizeof(DataInt)];
|
||||
|
||||
memcpy(&buffer, &data, sizeof(data));
|
||||
|
||||
IDataInt& idata(*reinterpret_cast<DataInt*>(buffer));
|
||||
idata.repair();
|
||||
|
||||
// Check that the memcpy'd vector is the same.
|
||||
CHECK_EQUAL(data.size(), idata.size());
|
||||
CHECK(!idata.empty());
|
||||
CHECK(idata.full());
|
||||
|
||||
bool is_equal = std::equal(idata.begin(),
|
||||
idata.end(),
|
||||
data.begin());
|
||||
|
||||
CHECK(is_equal);
|
||||
|
||||
// Modify the original and check that the memcpy'd vector is not the same.
|
||||
std::reverse(data.begin(), data.end());
|
||||
|
||||
is_equal = std::equal(idata.begin(),
|
||||
idata.end(),
|
||||
data.begin());
|
||||
|
||||
CHECK(!is_equal);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -3033,5 +3033,54 @@ namespace
|
||||
hash = etl::hash<IText>()(itext);
|
||||
CHECK_EQUAL(compare_hash, hash);
|
||||
}
|
||||
|
||||
TEST_FIXTURE(SetupFixture, test_memcpy_repair)
|
||||
{
|
||||
Text text;
|
||||
|
||||
text.assign(STR("ABCDEF"));
|
||||
|
||||
char buffer[sizeof(Text)];
|
||||
|
||||
memcpy(&buffer, &text, sizeof(text));
|
||||
|
||||
Text& rtext(*reinterpret_cast<Text*>(buffer));
|
||||
rtext.repair();
|
||||
|
||||
CHECK(!rtext.empty());
|
||||
CHECK(!rtext.full());
|
||||
|
||||
bool is_equal = Equal(text, rtext);
|
||||
CHECK(is_equal);
|
||||
|
||||
text = STR("GHIJKL");
|
||||
is_equal = Equal(text, rtext);
|
||||
CHECK(!is_equal);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_memcpy_repair_virtual)
|
||||
{
|
||||
Text text;
|
||||
|
||||
text.assign(STR("ABCDEF"));
|
||||
|
||||
char buffer[sizeof(Text)];
|
||||
|
||||
memcpy(&buffer, &text, sizeof(text));
|
||||
|
||||
IText& itext(*reinterpret_cast<IText*>(buffer));
|
||||
itext.repair();
|
||||
|
||||
CHECK(!itext.empty());
|
||||
CHECK(!itext.full());
|
||||
|
||||
bool is_equal = Equal(text, itext);
|
||||
CHECK(is_equal);
|
||||
|
||||
text = STR("GHIJKL");
|
||||
is_equal = Equal(text, itext);
|
||||
CHECK(!is_equal);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -3032,5 +3032,54 @@ namespace
|
||||
hash = etl::hash<IText>()(itext);
|
||||
CHECK_EQUAL(compare_hash, hash);
|
||||
}
|
||||
|
||||
TEST_FIXTURE(SetupFixture, test_memcpy_repair)
|
||||
{
|
||||
Text text;
|
||||
|
||||
text.assign(STR("ABCDEF"));
|
||||
|
||||
char buffer[sizeof(Text)];
|
||||
|
||||
memcpy(&buffer, &text, sizeof(text));
|
||||
|
||||
Text& rtext(*reinterpret_cast<Text*>(buffer));
|
||||
rtext.repair();
|
||||
|
||||
CHECK(!rtext.empty());
|
||||
CHECK(!rtext.full());
|
||||
|
||||
bool is_equal = Equal(text, rtext);
|
||||
CHECK(is_equal);
|
||||
|
||||
text = STR("GHIJKL");
|
||||
is_equal = Equal(text, rtext);
|
||||
CHECK(!is_equal);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_memcpy_repair_virtual)
|
||||
{
|
||||
Text text;
|
||||
|
||||
text.assign(STR("ABCDEF"));
|
||||
|
||||
char buffer[sizeof(Text)];
|
||||
|
||||
memcpy(&buffer, &text, sizeof(text));
|
||||
|
||||
IText& itext(*reinterpret_cast<IText*>(buffer));
|
||||
itext.repair();
|
||||
|
||||
CHECK(!itext.empty());
|
||||
CHECK(!itext.full());
|
||||
|
||||
bool is_equal = Equal(text, itext);
|
||||
CHECK(is_equal);
|
||||
|
||||
text = STR("GHIJKL");
|
||||
is_equal = Equal(text, itext);
|
||||
CHECK(!is_equal);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -3032,5 +3032,54 @@ namespace
|
||||
hash = etl::hash<IText>()(itext);
|
||||
CHECK_EQUAL(compare_hash, hash);
|
||||
}
|
||||
|
||||
TEST_FIXTURE(SetupFixture, test_memcpy_repair)
|
||||
{
|
||||
Text text;
|
||||
|
||||
text.assign(STR("ABCDEF"));
|
||||
|
||||
char buffer[sizeof(Text)];
|
||||
|
||||
memcpy(&buffer, &text, sizeof(text));
|
||||
|
||||
Text& rtext(*reinterpret_cast<Text*>(buffer));
|
||||
rtext.repair();
|
||||
|
||||
CHECK(!rtext.empty());
|
||||
CHECK(!rtext.full());
|
||||
|
||||
bool is_equal = Equal(text, rtext);
|
||||
CHECK(is_equal);
|
||||
|
||||
text = STR("GHIJKL");
|
||||
is_equal = Equal(text, rtext);
|
||||
CHECK(!is_equal);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_memcpy_repair_virtual)
|
||||
{
|
||||
Text text;
|
||||
|
||||
text.assign(STR("ABCDEF"));
|
||||
|
||||
char buffer[sizeof(Text)];
|
||||
|
||||
memcpy(&buffer, &text, sizeof(text));
|
||||
|
||||
IText& itext(*reinterpret_cast<IText*>(buffer));
|
||||
itext.repair();
|
||||
|
||||
CHECK(!itext.empty());
|
||||
CHECK(!itext.full());
|
||||
|
||||
bool is_equal = Equal(text, itext);
|
||||
CHECK(is_equal);
|
||||
|
||||
text = STR("GHIJKL");
|
||||
is_equal = Equal(text, itext);
|
||||
CHECK(!is_equal);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -3032,5 +3032,55 @@ namespace
|
||||
hash = etl::hash<IText>()(itext);
|
||||
CHECK_EQUAL(compare_hash, hash);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_memcpy_repair)
|
||||
{
|
||||
Text text;
|
||||
|
||||
text.assign(STR("ABCDEF"));
|
||||
|
||||
char buffer[sizeof(Text)];
|
||||
|
||||
memcpy(&buffer, &text, sizeof(text));
|
||||
|
||||
Text& rtext(*reinterpret_cast<Text*>(buffer));
|
||||
rtext.repair();
|
||||
|
||||
CHECK(!rtext.empty());
|
||||
CHECK(!rtext.full());
|
||||
|
||||
bool is_equal = Equal(text, rtext);
|
||||
CHECK(is_equal);
|
||||
|
||||
text = STR("GHIJKL");
|
||||
is_equal = Equal(text, rtext);
|
||||
CHECK(!is_equal);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_memcpy_repair_virtual)
|
||||
{
|
||||
Text text;
|
||||
|
||||
text.assign(STR("ABCDEF"));
|
||||
|
||||
char buffer[sizeof(Text)];
|
||||
|
||||
memcpy(&buffer, &text, sizeof(text));
|
||||
|
||||
IText& itext(*reinterpret_cast<IText*>(buffer));
|
||||
itext.repair();
|
||||
|
||||
CHECK(!itext.empty());
|
||||
CHECK(!itext.full());
|
||||
|
||||
bool is_equal = Equal(text, itext);
|
||||
CHECK(is_equal);
|
||||
|
||||
text = STR("GHIJKL");
|
||||
is_equal = Equal(text, itext);
|
||||
CHECK(!is_equal);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -31,11 +31,12 @@ SOFTWARE.
|
||||
#include <vector>
|
||||
#include <array>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
||||
#include "vector.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
{
|
||||
SUITE(test_vector)
|
||||
{
|
||||
static const size_t SIZE = 10;
|
||||
@ -146,7 +147,7 @@ namespace
|
||||
Data data(initial_data.begin(), initial_data.end());
|
||||
Data data2(data);
|
||||
CHECK(data2 == data);
|
||||
|
||||
|
||||
data2[2] = -1;
|
||||
CHECK(data2 != data);
|
||||
}
|
||||
@ -624,7 +625,7 @@ namespace
|
||||
const size_t INITIAL_SIZE = 5;
|
||||
const size_t INSERT_SIZE = 3;
|
||||
const int INITIAL_VALUE = 11;
|
||||
|
||||
|
||||
for (size_t offset = 0; offset <= INITIAL_SIZE; ++offset)
|
||||
{
|
||||
Compare_Data compare_data;
|
||||
@ -718,7 +719,7 @@ namespace
|
||||
offset = 4;
|
||||
|
||||
CHECK_THROW(data.insert(data.begin() + offset, initial_data.begin(), initial_data.end()), etl::vector_full);
|
||||
|
||||
|
||||
offset = data.size();
|
||||
|
||||
CHECK_THROW(data.insert(data.begin() + offset, initial_data.begin(), initial_data.end()), etl::vector_full);
|
||||
@ -762,7 +763,7 @@ namespace
|
||||
|
||||
CHECK(is_equal);
|
||||
}
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_clear)
|
||||
{
|
||||
@ -955,5 +956,71 @@ namespace
|
||||
const Data initial2(initial_data.begin(), initial_data.end());
|
||||
CHECK((initial >= initial2) == (initial_data >= initial_data));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_memcpy_repair)
|
||||
{
|
||||
Data data(initial_data.begin(), initial_data.end());
|
||||
|
||||
char buffer[sizeof(Data)];
|
||||
|
||||
memcpy(&buffer, &data, sizeof(data));
|
||||
|
||||
Data& rdata(*reinterpret_cast<Data*>(buffer));
|
||||
rdata.repair();
|
||||
|
||||
// Check that the memcpy'd vector is the same.
|
||||
CHECK_EQUAL(data.size(), rdata.size());
|
||||
CHECK(!rdata.empty());
|
||||
CHECK(rdata.full());
|
||||
|
||||
bool is_equal = std::equal(rdata.begin(),
|
||||
rdata.end(),
|
||||
data.begin());
|
||||
|
||||
CHECK(is_equal);
|
||||
|
||||
// Modify the original and check that the memcpy'd vector is not the same.
|
||||
std::reverse(data.begin(), data.end());
|
||||
|
||||
is_equal = std::equal(rdata.begin(),
|
||||
rdata.end(),
|
||||
data.begin());
|
||||
|
||||
CHECK(!is_equal);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_memcpy_repair_virtual)
|
||||
{
|
||||
Data data(initial_data.begin(), initial_data.end());
|
||||
|
||||
char buffer[sizeof(Data)];
|
||||
|
||||
memcpy(&buffer, &data, sizeof(data));
|
||||
|
||||
IData& idata(*reinterpret_cast<Data*>(buffer));
|
||||
idata.repair();
|
||||
|
||||
// Check that the memcpy'd vector is the same.
|
||||
CHECK_EQUAL(data.size(), idata.size());
|
||||
CHECK(!idata.empty());
|
||||
CHECK(idata.full());
|
||||
|
||||
bool is_equal = std::equal(idata.begin(),
|
||||
idata.end(),
|
||||
data.begin());
|
||||
|
||||
CHECK(is_equal);
|
||||
|
||||
// Modify the original and check that the memcpy'd vector is not the same.
|
||||
std::reverse(data.begin(), data.end());
|
||||
|
||||
is_equal = std::equal(idata.begin(),
|
||||
idata.end(),
|
||||
data.begin());
|
||||
|
||||
CHECK(!is_equal);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -31,11 +31,12 @@ SOFTWARE.
|
||||
#include <vector>
|
||||
#include <array>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
||||
#include "vector.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
{
|
||||
SUITE(test_vector_pointer)
|
||||
{
|
||||
static const size_t SIZE = 10;
|
||||
@ -159,7 +160,7 @@ namespace
|
||||
Data data(initial_data.begin(), initial_data.end());
|
||||
Data data2(data);
|
||||
CHECK(data2 == data);
|
||||
|
||||
|
||||
data2[2] = nullptr;
|
||||
CHECK(data2 != data);
|
||||
}
|
||||
@ -612,7 +613,7 @@ namespace
|
||||
const size_t INITIAL_SIZE = 5;
|
||||
const size_t INSERT_SIZE = 3;
|
||||
int INITIAL_VALUE = 11;
|
||||
|
||||
|
||||
for (size_t offset = 0; offset <= INITIAL_SIZE; ++offset)
|
||||
{
|
||||
Compare_Data compare_data;
|
||||
@ -700,7 +701,7 @@ namespace
|
||||
offset = 4;
|
||||
|
||||
CHECK_THROW(data.insert(data.begin() + offset, initial_data.begin(), initial_data.end()), etl::vector_full);
|
||||
|
||||
|
||||
offset = data.size();
|
||||
|
||||
CHECK_THROW(data.insert(data.begin() + offset, initial_data.begin(), initial_data.end()), etl::vector_full);
|
||||
@ -740,7 +741,7 @@ namespace
|
||||
|
||||
CHECK(is_equal);
|
||||
}
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_clear)
|
||||
{
|
||||
@ -933,5 +934,38 @@ namespace
|
||||
const Data initial2(initial_data.begin(), initial_data.end());
|
||||
CHECK((initial >= initial2) == (initial_data >= initial_data));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_memcpy_repair)
|
||||
{
|
||||
Data data(initial_data.begin(), initial_data.end());
|
||||
|
||||
char buffer[sizeof(Data)];
|
||||
|
||||
memcpy(&buffer, &data, sizeof(data));
|
||||
|
||||
Data& rdata(*reinterpret_cast<Data*>(buffer));
|
||||
rdata.repair();
|
||||
|
||||
// Check that the memcpy'd vector is the same.
|
||||
CHECK_EQUAL(data.size(), rdata.size());
|
||||
CHECK(!rdata.empty());
|
||||
CHECK(rdata.full());
|
||||
|
||||
bool is_equal = std::equal(rdata.begin(),
|
||||
rdata.end(),
|
||||
data.begin());
|
||||
|
||||
CHECK(is_equal);
|
||||
|
||||
// Modify the original and check that the memcpy'd vector is not the same.
|
||||
std::reverse(data.begin(), data.end());
|
||||
|
||||
is_equal = std::equal(rdata.begin(),
|
||||
rdata.end(),
|
||||
data.begin());
|
||||
|
||||
CHECK(!is_equal);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_THROW_EXCEPTIONS;ETL_VERBOSE_ERRORS;ETL_CHECK_PUSH_POP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_IVECTOR_REPAIR_ENABLE;ETL_ISTRING_REPAIR_ENABLE;ETL_IDEQUE_REPAIR_ENABLE;ETL_IN_UNIT_TEST;ETL_THROW_EXCEPTIONS;ETL_VERBOSE_ERRORS;ETL_CHECK_PUSH_POP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../../unittest-cpp/UnitTest++/;../../src</AdditionalIncludeDirectories>
|
||||
<UndefinePreprocessorDefinitions>
|
||||
</UndefinePreprocessorDefinitions>
|
||||
@ -91,7 +91,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_THROW_EXCEPTIONS;ETL_VERBOSE_ERRORS;ETL_CHECK_PUSH_POP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_IN_UNIT_TEST;ETL_THROW_EXCEPTIONS;ETL_VERBOSE_ERRORS;ETL_CHECK_PUSH_POP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../../unittest-cpp/UnitTest++/;../../src</AdditionalIncludeDirectories>
|
||||
<UndefinePreprocessorDefinitions>
|
||||
</UndefinePreprocessorDefinitions>
|
||||
|
||||
@ -37,6 +37,9 @@
|
||||
<Filter Include="ETL\Private">
|
||||
<UniqueIdentifier>{7028012c-30c4-4993-b2d9-3b1521a610ae}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ETL\Frameworks">
|
||||
<UniqueIdentifier>{5de50c3d-4679-4eb3-9b76-e43e1aad6a66}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\doxygen.h">
|
||||
@ -336,12 +339,6 @@
|
||||
<ClInclude Include="..\..\src\memory.h">
|
||||
<Filter>ETL\Utilities</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\message_processor.h">
|
||||
<Filter>ETL\Patterns</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\message_processor_generator.h">
|
||||
<Filter>ETL\Patterns</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\reference_flat_map.h">
|
||||
<Filter>ETL\Containers</Filter>
|
||||
</ClInclude>
|
||||
@ -441,6 +438,12 @@
|
||||
<ClInclude Include="..\..\unittest-cpp\UnitTest++\XmlTestReporter.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\message_processor.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\message_processor_generator.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\main.cpp">
|
||||
@ -773,7 +776,7 @@
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="..\..\src\CreateMessageProcessor.bat">
|
||||
<Filter>ETL\Patterns</Filter>
|
||||
<Filter>Source Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
32768
test/vs2017/random.csv
32768
test/vs2017/random.csv
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user