mirror of
https://github.com/ETLCPP/etl.git
synced 2026-10-28 18:07:10 +08:00
Work in progress
This commit is contained in:
parent
b99be4b249
commit
83347ccfdd
@ -11,7 +11,7 @@
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>6130001::V6.13.1::.\ARMCLANG</pCCUsed>
|
||||
<uAC6>1</uAC6>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
<Device>STM32F401RETx</Device>
|
||||
@ -312,7 +312,7 @@
|
||||
</ArmAdsMisc>
|
||||
<Cads>
|
||||
<interw>1</interw>
|
||||
<Optim>7</Optim>
|
||||
<Optim>1</Optim>
|
||||
<oTime>0</oTime>
|
||||
<SplitLS>0</SplitLS>
|
||||
<OneElfS>1</OneElfS>
|
||||
@ -321,7 +321,7 @@
|
||||
<PlainCh>1</PlainCh>
|
||||
<Ropi>0</Ropi>
|
||||
<Rwpi>0</Rwpi>
|
||||
<wLevel>3</wLevel>
|
||||
<wLevel>2</wLevel>
|
||||
<uThumb>0</uThumb>
|
||||
<uSurpInc>0</uSurpInc>
|
||||
<uC99>1</uC99>
|
||||
|
||||
@ -39,7 +39,7 @@ namespace etl
|
||||
// For signed types.
|
||||
//***************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::enable_if<etlstd::is_signed<T>::value, T>::type
|
||||
typename etl::enable_if<etl::is_signed<T>::value, T>::type
|
||||
absolute(T value)
|
||||
{
|
||||
return (value < T(0)) ? -value : value;
|
||||
@ -49,7 +49,7 @@ namespace etl
|
||||
// For unsigned types.
|
||||
//***************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::enable_if<etlstd::is_unsigned<T>::value, T>::type
|
||||
typename etl::enable_if<etl::is_unsigned<T>::value, T>::type
|
||||
absolute(T value)
|
||||
{
|
||||
return value;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -66,7 +66,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename type_with_alignment_matcher<ALIGNMENT <= etlstd::alignment_of<T2>::value, ALIGNMENT, T2, T3, T4, T5, T6, T7, T8, void>::type type;
|
||||
typedef typename type_with_alignment_matcher<ALIGNMENT <= etl::alignment_of<T2>::value, ALIGNMENT, T2, T3, T4, T5, T6, T7, T8, void>::type type;
|
||||
};
|
||||
|
||||
// Non-matching alignment, none left.
|
||||
@ -86,7 +86,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename type_with_alignment_matcher<ALIGNMENT <= etlstd::alignment_of<T1>::value, ALIGNMENT, T1, T2, T3, T4, T5, T6, T7, T8>::type type;
|
||||
typedef typename type_with_alignment_matcher<ALIGNMENT <= etl::alignment_of<T1>::value, ALIGNMENT, T1, T2, T3, T4, T5, T6, T7, T8>::type type;
|
||||
};
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ namespace etl
|
||||
template <typename T>
|
||||
operator T& ()
|
||||
{
|
||||
ETL_STATIC_ASSERT((etlstd::is_same<T*, void*>:: value || ((ALIGNMENT % etlstd::alignment_of<T>::value) == 0)), "Incompatible alignment");
|
||||
ETL_STATIC_ASSERT((etl::is_same<T*, void*>:: value || ((ALIGNMENT % etl::alignment_of<T>::value) == 0)), "Incompatible alignment");
|
||||
T* t = *this;
|
||||
return *t;
|
||||
}
|
||||
@ -125,7 +125,7 @@ namespace etl
|
||||
template <typename T>
|
||||
operator const T& () const
|
||||
{
|
||||
ETL_STATIC_ASSERT((etlstd::is_same<T*, void*>:: value || ((ALIGNMENT % etlstd::alignment_of<T>::value) == 0)), "Incompatible alignment");
|
||||
ETL_STATIC_ASSERT((etl::is_same<T*, void*>:: value || ((ALIGNMENT % etl::alignment_of<T>::value) == 0)), "Incompatible alignment");
|
||||
const T* t = *this;
|
||||
return *t;
|
||||
}
|
||||
@ -134,7 +134,7 @@ namespace etl
|
||||
template <typename T>
|
||||
operator T* ()
|
||||
{
|
||||
ETL_STATIC_ASSERT((etlstd::is_same<T*, void*>:: value || ((ALIGNMENT % etlstd::alignment_of<T>::value) == 0)), "Incompatible alignment");
|
||||
ETL_STATIC_ASSERT((etl::is_same<T*, void*>:: value || ((ALIGNMENT % etl::alignment_of<T>::value) == 0)), "Incompatible alignment");
|
||||
return reinterpret_cast<T*>(data);
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ namespace etl
|
||||
template <typename T>
|
||||
operator const T* () const
|
||||
{
|
||||
ETL_STATIC_ASSERT((etlstd::is_same<T*, void*>:: value || ((ALIGNMENT % etlstd::alignment_of<T>::value) == 0)), "Incompatible alignment");
|
||||
ETL_STATIC_ASSERT((etl::is_same<T*, void*>:: value || ((ALIGNMENT % etl::alignment_of<T>::value) == 0)), "Incompatible alignment");
|
||||
return reinterpret_cast<const T*>(data);
|
||||
}
|
||||
|
||||
@ -150,7 +150,7 @@ namespace etl
|
||||
template <typename T>
|
||||
T& get_reference()
|
||||
{
|
||||
ETL_STATIC_ASSERT((etlstd::is_same<T*, void*>:: value || ((ALIGNMENT % etlstd::alignment_of<T>::value) == 0)), "Incompatible alignment");
|
||||
ETL_STATIC_ASSERT((etl::is_same<T*, void*>:: value || ((ALIGNMENT % etl::alignment_of<T>::value) == 0)), "Incompatible alignment");
|
||||
T* t = *this;
|
||||
return *t;
|
||||
}
|
||||
@ -159,7 +159,7 @@ namespace etl
|
||||
template <typename T>
|
||||
const T& get_reference() const
|
||||
{
|
||||
ETL_STATIC_ASSERT((etlstd::is_same<T*, void*>:: value || ((ALIGNMENT % etlstd::alignment_of<T>::value) == 0)), "Incompatible alignment");
|
||||
ETL_STATIC_ASSERT((etl::is_same<T*, void*>:: value || ((ALIGNMENT % etl::alignment_of<T>::value) == 0)), "Incompatible alignment");
|
||||
const T* t = *this;
|
||||
return *t;
|
||||
}
|
||||
@ -168,7 +168,7 @@ namespace etl
|
||||
template <typename T>
|
||||
T* get_address()
|
||||
{
|
||||
ETL_STATIC_ASSERT((etlstd::is_same<T*, void*>:: value || ((ALIGNMENT % etlstd::alignment_of<T>::value) == 0)), "Incompatible alignment");
|
||||
ETL_STATIC_ASSERT((etl::is_same<T*, void*>:: value || ((ALIGNMENT % etl::alignment_of<T>::value) == 0)), "Incompatible alignment");
|
||||
return reinterpret_cast<T*>(data);
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ namespace etl
|
||||
template <typename T>
|
||||
const T* get_address() const
|
||||
{
|
||||
ETL_STATIC_ASSERT((etlstd::is_same<T*, void*>:: value || ((ALIGNMENT % etlstd::alignment_of<T>::value) == 0)), "Incompatible alignment");
|
||||
ETL_STATIC_ASSERT((etl::is_same<T*, void*>:: value || ((ALIGNMENT % etl::alignment_of<T>::value) == 0)), "Incompatible alignment");
|
||||
return reinterpret_cast<const T*>(data);
|
||||
}
|
||||
|
||||
@ -197,7 +197,7 @@ namespace etl
|
||||
///\ingroup alignment
|
||||
//***************************************************************************
|
||||
template <const size_t LENGTH, typename T>
|
||||
struct aligned_storage_as : public etl::aligned_storage<LENGTH, etlstd::alignment_of<T>::value>
|
||||
struct aligned_storage_as : public etl::aligned_storage<LENGTH, etl::alignment_of<T>::value>
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
@ -342,7 +342,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void fill(parameter_t value)
|
||||
{
|
||||
etlstd::fill(begin(), end(), value);
|
||||
etl::fill(begin(), end(), value);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -351,11 +351,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void swap(array& other)
|
||||
{
|
||||
#if defined(ETL_NO_STL)
|
||||
using etlstd::swap;
|
||||
#else
|
||||
using std::swap;
|
||||
#endif
|
||||
using ETL_OR_STD::swap; // Allow ADL
|
||||
|
||||
for (size_t i = 0; i < SIZE; ++i)
|
||||
{
|
||||
@ -373,7 +369,7 @@ namespace etl
|
||||
template <typename TIterator>
|
||||
void assign(TIterator first, const TIterator last)
|
||||
{
|
||||
etlstd::copy(first, last, begin(), end());
|
||||
etl::copy_s(first, last, begin(), end());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -387,10 +383,10 @@ namespace etl
|
||||
void assign(TIterator first, const TIterator last, parameter_t value)
|
||||
{
|
||||
// Copy from the range.
|
||||
iterator p = etlstd::copy(first, last, begin(), end());
|
||||
iterator p = etl::copy_s(first, last, begin(), end());
|
||||
|
||||
// Default initialise any that are left.
|
||||
etlstd::fill(p, end(), value);
|
||||
etl::fill(p, end(), value);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -412,7 +408,7 @@ namespace etl
|
||||
{
|
||||
iterator p = const_cast<iterator>(position);
|
||||
|
||||
etlstd::copy_backward(p, end() - 1, end());
|
||||
etl::copy_backward(p, end() - 1, end());
|
||||
*p = value;
|
||||
|
||||
return p;
|
||||
@ -442,18 +438,18 @@ namespace etl
|
||||
iterator p = const_cast<iterator>(position);
|
||||
iterator result(p);
|
||||
|
||||
size_t source_size = etlstd::distance(first, last);
|
||||
size_t destination_space = etlstd::distance(position, cend());
|
||||
size_t source_size = etl::distance(first, last);
|
||||
size_t destination_space = etl::distance(position, cend());
|
||||
|
||||
// Do we need to move anything?
|
||||
if (source_size < destination_space)
|
||||
{
|
||||
size_t length = SIZE - (etlstd::distance(begin(), p) + source_size);
|
||||
etlstd::copy_backward(p, p + length, end());
|
||||
size_t length = SIZE - (etl::distance(begin(), p) + source_size);
|
||||
etl::copy_backward(p, p + length, end());
|
||||
}
|
||||
|
||||
// Copy from the range.
|
||||
etlstd::copy(first, last, p, end());
|
||||
etl::copy_s(first, last, p, end());
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -476,7 +472,7 @@ namespace etl
|
||||
iterator erase(const_iterator position)
|
||||
{
|
||||
iterator p = const_cast<iterator>(position);
|
||||
etlstd::copy(p + 1, end(), p);
|
||||
etl::copy(p + 1, end(), p);
|
||||
|
||||
return p;
|
||||
}
|
||||
@ -501,7 +497,7 @@ namespace etl
|
||||
iterator erase(const_iterator first, const_iterator last)
|
||||
{
|
||||
iterator p = const_cast<iterator>(first);
|
||||
etlstd::copy(last, cend(), p);
|
||||
etl::copy(last, cend(), p);
|
||||
return p;
|
||||
}
|
||||
|
||||
@ -524,7 +520,7 @@ namespace etl
|
||||
{
|
||||
iterator p = const_cast<iterator>(position);
|
||||
|
||||
etlstd::copy(p + 1, end(), p);
|
||||
etl::copy(p + 1, end(), p);
|
||||
back() = value;
|
||||
|
||||
return p;
|
||||
@ -550,8 +546,8 @@ namespace etl
|
||||
{
|
||||
iterator p = const_cast<iterator>(first);
|
||||
|
||||
p = etlstd::copy(last, cend(), p);
|
||||
etlstd::fill(p, end(), value);
|
||||
p = etl::copy(last, cend(), p);
|
||||
etl::fill(p, end(), value);
|
||||
|
||||
return const_cast<iterator>(first);
|
||||
}
|
||||
@ -580,7 +576,7 @@ namespace etl
|
||||
template <typename T, size_t SIZE>
|
||||
bool operator ==(const etl::array<T, SIZE>& lhs, const etl::array<T, SIZE>& rhs)
|
||||
{
|
||||
return etlstd::equal(lhs.cbegin(), lhs.cend(), rhs.cbegin());
|
||||
return etl::equal(lhs.cbegin(), lhs.cend(), rhs.cbegin());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -604,7 +600,7 @@ namespace etl
|
||||
template <typename T, size_t SIZE>
|
||||
bool operator <(const etl::array<T, SIZE>& lhs, const etl::array<T, SIZE>& rhs)
|
||||
{
|
||||
return etlstd::lexicographical_compare(lhs.cbegin(),
|
||||
return etl::lexicographical_compare(lhs.cbegin(),
|
||||
lhs.cend(),
|
||||
rhs.cbegin(),
|
||||
rhs.cend());
|
||||
|
||||
@ -137,7 +137,7 @@ namespace etl
|
||||
template <typename TIterator>
|
||||
ETL_CONSTEXPR array_view(const TIterator begin_, const TIterator end_)
|
||||
: mbegin(etl::addressof(*begin_)),
|
||||
mend(etl::addressof(*begin_) + etlstd::distance(begin_, end_))
|
||||
mend(etl::addressof(*begin_) + etl::distance(begin_, end_))
|
||||
{
|
||||
}
|
||||
|
||||
@ -356,7 +356,7 @@ namespace etl
|
||||
void assign(const TIterator begin_, const TIterator end_)
|
||||
{
|
||||
mbegin = etl::addressof(*begin_);
|
||||
mend = etl::addressof(*begin_) + etlstd::distance(begin_, end_);
|
||||
mend = etl::addressof(*begin_) + etl::distance(begin_, end_);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -411,11 +411,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void swap(array_view& other)
|
||||
{
|
||||
#if defined(ETL_NO_STL)
|
||||
using etlstd::swap;
|
||||
#else
|
||||
using std::swap;
|
||||
#endif
|
||||
using ETL_OR_STD::swap; // Allow ADL
|
||||
|
||||
swap(mbegin, other.mbegin);
|
||||
swap(mend, other.mend);
|
||||
@ -443,7 +439,7 @@ namespace etl
|
||||
friend bool operator == (const array_view<T>& lhs, const array_view<T>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) &&
|
||||
etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -459,7 +455,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
friend bool operator < (const array_view<T>& lhs, const array_view<T>& rhs)
|
||||
{
|
||||
return etlstd::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -310,21 +310,17 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void fill(parameter_t value)
|
||||
{
|
||||
etlstd::fill(begin(), end(), value);
|
||||
etl::fill(begin(), end(), value);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Swaps the contents of arrays.
|
||||
//*************************************************************************
|
||||
template <typename U, U(&ARRAYOTHER)[SIZE_]>
|
||||
typename etlstd::enable_if<etlstd::is_same<T, U>::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<T, U>::value, void>::type
|
||||
swap(etl::array_wrapper<U, SIZE_, ARRAYOTHER>& other)
|
||||
{
|
||||
#if defined(ETL_NO_STL)
|
||||
using etlstd::swap;
|
||||
#else
|
||||
using std::swap;
|
||||
#endif
|
||||
using ETL_OR_STD::swap; // Allow ADL
|
||||
|
||||
for (size_t i = 0; i < SIZE; ++i)
|
||||
{
|
||||
@ -340,7 +336,7 @@ namespace etl
|
||||
bool operator == (const etl::array_wrapper<TL, SIZEL, ARRAYL>& lhs,
|
||||
const etl::array_wrapper<TR, SIZER, ARRAYR>& rhs)
|
||||
{
|
||||
return (SIZEL == SIZER) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (SIZEL == SIZER) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -360,7 +356,7 @@ namespace etl
|
||||
bool operator < (const etl::array_wrapper<TL, SIZEL, ARRAYL>& lhs,
|
||||
const etl::array_wrapper<TR, SIZER, ARRAYR>& rhs)
|
||||
{
|
||||
return etlstd::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -66,7 +66,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Only integral types are supported");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Only integral types are supported");
|
||||
|
||||
atomic()
|
||||
: value(0)
|
||||
|
||||
@ -59,7 +59,7 @@ SOFTWARE.
|
||||
// {
|
||||
// public:
|
||||
//
|
||||
// ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Only integral types are supported");
|
||||
// ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Only integral types are supported");
|
||||
//
|
||||
// atomic()
|
||||
// : value(0)
|
||||
|
||||
@ -40,7 +40,6 @@ SOFTWARE.
|
||||
#include "algorithm.h"
|
||||
#include "iterator.h"
|
||||
#include "functional.h"
|
||||
|
||||
#include "char_traits.h"
|
||||
#include "container.h"
|
||||
#include "alignment.h"
|
||||
@ -286,7 +285,7 @@ namespace etl
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
typedef size_t size_type;
|
||||
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns an iterator to the beginning of the string.
|
||||
@ -418,12 +417,12 @@ namespace etl
|
||||
is_truncated = true;
|
||||
}
|
||||
|
||||
new_size = etlstd::min(new_size, CAPACITY);
|
||||
new_size = etl::min(new_size, CAPACITY);
|
||||
|
||||
// Size up?
|
||||
if (new_size > current_size)
|
||||
{
|
||||
etlstd::fill(p_buffer + current_size, p_buffer + new_size, value);
|
||||
etl::fill(p_buffer + current_size, p_buffer + new_size, value);
|
||||
}
|
||||
|
||||
current_size = new_size;
|
||||
@ -596,7 +595,7 @@ namespace etl
|
||||
|
||||
is_truncated = (length_ > CAPACITY);
|
||||
|
||||
length_ = etlstd::min(length_, CAPACITY);
|
||||
length_ = etl::min(length_, CAPACITY);
|
||||
|
||||
etl::copy_n(other, length_, begin());
|
||||
|
||||
@ -615,7 +614,7 @@ namespace etl
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first, last);
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(d >= 0, ETL_ERROR(string_iterator));
|
||||
#endif
|
||||
|
||||
@ -643,9 +642,9 @@ namespace etl
|
||||
|
||||
is_truncated = (n > CAPACITY);
|
||||
|
||||
n = etlstd::min(n, CAPACITY);
|
||||
n = etl::min(n, CAPACITY);
|
||||
|
||||
etlstd::fill_n(begin(), n, value);
|
||||
etl::fill_n(begin(), n, value);
|
||||
current_size = n;
|
||||
p_buffer[current_size] = 0;
|
||||
}
|
||||
@ -780,7 +779,7 @@ namespace etl
|
||||
{
|
||||
// Insert in the middle.
|
||||
++current_size;
|
||||
etlstd::copy_backward(insert_position, end() - 1, end());
|
||||
etl::copy_backward(insert_position, end() - 1, end());
|
||||
*insert_position = value;
|
||||
}
|
||||
else
|
||||
@ -796,7 +795,7 @@ namespace etl
|
||||
if (position != end())
|
||||
{
|
||||
// Insert in the middle.
|
||||
etlstd::copy_backward(insert_position, end() - 1, end());
|
||||
etl::copy_backward(insert_position, end() - 1, end());
|
||||
*insert_position = value;
|
||||
}
|
||||
|
||||
@ -823,7 +822,7 @@ namespace etl
|
||||
|
||||
// Quick hack, as iterators are pointers.
|
||||
iterator insert_position = const_cast<iterator>(position);
|
||||
const size_t start = etlstd::distance(cbegin(), position);
|
||||
const size_t start = etl::distance(cbegin(), position);
|
||||
|
||||
// No effect.
|
||||
if (start >= CAPACITY)
|
||||
@ -841,7 +840,7 @@ namespace etl
|
||||
}
|
||||
|
||||
current_size = CAPACITY;
|
||||
etlstd::fill(insert_position, end(), value);
|
||||
etl::fill(insert_position, end(), value);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -850,7 +849,7 @@ namespace etl
|
||||
const size_t to_position = start + shift_amount;
|
||||
const size_t remaining_characters = current_size - start;
|
||||
const size_t max_shift_characters = CAPACITY - start - shift_amount;
|
||||
const size_t characters_to_shift = etlstd::min(max_shift_characters, remaining_characters);
|
||||
const size_t characters_to_shift = etl::min(max_shift_characters, remaining_characters);
|
||||
|
||||
// Will the string truncate?
|
||||
if ((start + shift_amount + remaining_characters) > CAPACITY)
|
||||
@ -863,8 +862,8 @@ namespace etl
|
||||
current_size += shift_amount;
|
||||
}
|
||||
|
||||
etlstd::copy_backward(insert_position, insert_position + characters_to_shift, begin() + to_position + characters_to_shift);
|
||||
etlstd::fill(insert_position, insert_position + shift_amount, value);
|
||||
etl::copy_backward(insert_position, insert_position + characters_to_shift, begin() + to_position + characters_to_shift);
|
||||
etl::fill(insert_position, insert_position + shift_amount, value);
|
||||
}
|
||||
|
||||
p_buffer[current_size] = 0;
|
||||
@ -885,8 +884,8 @@ namespace etl
|
||||
return;
|
||||
}
|
||||
|
||||
const size_t start = etlstd::distance(begin(), position);
|
||||
const size_t n = etlstd::distance(first, last);
|
||||
const size_t start = etl::distance(begin(), position);
|
||||
const size_t n = etl::distance(first, last);
|
||||
|
||||
// No effect.
|
||||
if (start >= CAPACITY)
|
||||
@ -917,7 +916,7 @@ namespace etl
|
||||
const size_t to_position = start + shift_amount;
|
||||
const size_t remaining_characters = current_size - start;
|
||||
const size_t max_shift_characters = CAPACITY - start - shift_amount;
|
||||
const size_t characters_to_shift = etlstd::min(max_shift_characters, remaining_characters);
|
||||
const size_t characters_to_shift = etl::min(max_shift_characters, remaining_characters);
|
||||
|
||||
// Will the string truncate?
|
||||
if ((start + shift_amount + remaining_characters) > CAPACITY)
|
||||
@ -930,7 +929,7 @@ namespace etl
|
||||
current_size += shift_amount;
|
||||
}
|
||||
|
||||
etlstd::copy_backward(position, position + characters_to_shift, begin() + to_position + characters_to_shift);
|
||||
etl::copy_backward(position, position + characters_to_shift, begin() + to_position + characters_to_shift);
|
||||
|
||||
while (first != last)
|
||||
{
|
||||
@ -1037,7 +1036,7 @@ namespace etl
|
||||
etl::ibasic_string<T>& erase(size_t position, size_t length_ = npos)
|
||||
{
|
||||
// Limit the length.
|
||||
length_ = etlstd::min(length_, size() - position);
|
||||
length_ = etl::min(length_, size() - position);
|
||||
|
||||
erase(begin() + position, begin() + position + length_);
|
||||
|
||||
@ -1051,7 +1050,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
iterator erase(iterator i_element)
|
||||
{
|
||||
etlstd::copy(i_element + 1, end(), i_element);
|
||||
etl::copy(i_element + 1, end(), i_element);
|
||||
p_buffer[--current_size] = 0;
|
||||
|
||||
return i_element;
|
||||
@ -1067,8 +1066,8 @@ namespace etl
|
||||
//*********************************************************************
|
||||
iterator erase(iterator first, iterator last)
|
||||
{
|
||||
etlstd::copy(last, end(), first);
|
||||
size_t n_delete = etlstd::distance(first, last);
|
||||
etl::copy(last, end(), first);
|
||||
size_t n_delete = etl::distance(first, last);
|
||||
|
||||
current_size -= n_delete;
|
||||
p_buffer[current_size] = 0;
|
||||
@ -1098,7 +1097,7 @@ namespace etl
|
||||
is_truncated = true;
|
||||
}
|
||||
|
||||
size_t endpos = etlstd::min(pos + len, size());
|
||||
size_t endpos = etl::min(pos + len, size());
|
||||
|
||||
for (size_t i = pos; i < endpos; ++i)
|
||||
{
|
||||
@ -1120,7 +1119,7 @@ namespace etl
|
||||
return npos;
|
||||
}
|
||||
|
||||
const_iterator iposition = etlstd::search(begin() + pos, end(), str.begin(), str.end());
|
||||
const_iterator iposition = etl::search(begin() + pos, end(), str.begin(), str.end());
|
||||
|
||||
if (iposition == end())
|
||||
{
|
||||
@ -1128,7 +1127,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
return etlstd::distance(begin(), iposition);
|
||||
return etl::distance(begin(), iposition);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1146,7 +1145,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
const_iterator iposition = etlstd::search(begin() + pos, end(), s, s + etl::strlen(s));
|
||||
const_iterator iposition = etl::search(begin() + pos, end(), s, s + etl::strlen(s));
|
||||
|
||||
if (iposition == end())
|
||||
{
|
||||
@ -1154,7 +1153,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
return etlstd::distance(begin(), iposition);
|
||||
return etl::distance(begin(), iposition);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1173,7 +1172,7 @@ namespace etl
|
||||
}
|
||||
#endif
|
||||
|
||||
const_iterator iposition = etlstd::search(begin() + pos, end(), s, s + n);
|
||||
const_iterator iposition = etl::search(begin() + pos, end(), s, s + n);
|
||||
|
||||
if (iposition == end())
|
||||
{
|
||||
@ -1181,7 +1180,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
return etlstd::distance(begin(), iposition);
|
||||
return etl::distance(begin(), iposition);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1192,11 +1191,11 @@ namespace etl
|
||||
//*********************************************************************
|
||||
size_t find(T c, size_t position = 0) const
|
||||
{
|
||||
const_iterator i = etlstd::find(begin() + position, end(), c);
|
||||
const_iterator i = etl::find(begin() + position, end(), c);
|
||||
|
||||
if (i != end())
|
||||
{
|
||||
return etlstd::distance(begin(), i);
|
||||
return etl::distance(begin(), i);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1223,7 +1222,7 @@ namespace etl
|
||||
|
||||
position = size() - position;
|
||||
|
||||
const_reverse_iterator iposition = etlstd::search(rbegin() + position, rend(), str.rbegin(), str.rend());
|
||||
const_reverse_iterator iposition = etl::search(rbegin() + position, rend(), str.rbegin(), str.rend());
|
||||
|
||||
if (iposition == rend())
|
||||
{
|
||||
@ -1231,7 +1230,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
return size() - str.size() - etlstd::distance(rbegin(), iposition);
|
||||
return size() - str.size() - etl::distance(rbegin(), iposition);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1259,7 +1258,7 @@ namespace etl
|
||||
const_reverse_iterator srbegin(s + len);
|
||||
const_reverse_iterator srend(s);
|
||||
|
||||
const_reverse_iterator iposition = etlstd::search(rbegin() + position, rend(), srbegin, srend);
|
||||
const_reverse_iterator iposition = etl::search(rbegin() + position, rend(), srbegin, srend);
|
||||
|
||||
if (iposition == rend())
|
||||
{
|
||||
@ -1267,7 +1266,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
return size() - len - etlstd::distance(rbegin(), iposition);
|
||||
return size() - len - etl::distance(rbegin(), iposition);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1293,7 +1292,7 @@ namespace etl
|
||||
const_reverse_iterator srbegin(s + length_);
|
||||
const_reverse_iterator srend(s);
|
||||
|
||||
const_reverse_iterator iposition = etlstd::search(rbegin() + position, rend(), srbegin, srend);
|
||||
const_reverse_iterator iposition = etl::search(rbegin() + position, rend(), srbegin, srend);
|
||||
|
||||
if (iposition == rend())
|
||||
{
|
||||
@ -1301,7 +1300,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
return size() - length_ - etlstd::distance(rbegin(), iposition);
|
||||
return size() - length_ - etl::distance(rbegin(), iposition);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1319,11 +1318,11 @@ namespace etl
|
||||
|
||||
position = size() - position;
|
||||
|
||||
const_reverse_iterator i = etlstd::find(rbegin() + position, rend(), c);
|
||||
const_reverse_iterator i = etl::find(rbegin() + position, rend(), c);
|
||||
|
||||
if (i != rend())
|
||||
{
|
||||
return size() - etlstd::distance(rbegin(), i) - 1;
|
||||
return size() - etl::distance(rbegin(), i) - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1342,7 +1341,7 @@ namespace etl
|
||||
ETL_ASSERT(position <= size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
// Limit the length.
|
||||
length_ = etlstd::min(length_, size() - position);
|
||||
length_ = etl::min(length_, size() - position);
|
||||
|
||||
// Erase the bit we want to replace.
|
||||
erase(position, length_);
|
||||
@ -1388,8 +1387,8 @@ namespace etl
|
||||
ETL_ASSERT(subposition <= str.size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
// Limit the lengths.
|
||||
length_ = etlstd::min(length_, size() - position);
|
||||
sublength = etlstd::min(sublength, str.size() - subposition);
|
||||
length_ = etl::min(length_, size() - position);
|
||||
sublength = etl::min(sublength, str.size() - subposition);
|
||||
|
||||
// Erase the bit we want to replace.
|
||||
erase(position, length_);
|
||||
@ -1413,7 +1412,7 @@ namespace etl
|
||||
ETL_ASSERT(position <= size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
// Limit the length.
|
||||
length_ = etlstd::min(length_, size() - position);
|
||||
length_ = etl::min(length_, size() - position);
|
||||
|
||||
// Erase the bit we want to replace.
|
||||
erase(position, length_);
|
||||
@ -1450,7 +1449,7 @@ namespace etl
|
||||
ETL_ASSERT(position <= size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
// Limit the length.
|
||||
length_ = etlstd::min(length_, size() - position);
|
||||
length_ = etl::min(length_, size() - position);
|
||||
|
||||
// Erase the bit we want to replace.
|
||||
erase(position, length_);
|
||||
@ -1487,7 +1486,7 @@ namespace etl
|
||||
ETL_ASSERT(position <= size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
// Limit the length.
|
||||
length_ = etlstd::min(length_, size() - position);
|
||||
length_ = etl::min(length_, size() - position);
|
||||
|
||||
// Erase the bit we want to replace.
|
||||
erase(position, length_);
|
||||
@ -1554,7 +1553,7 @@ namespace etl
|
||||
ETL_ASSERT(position <= size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
// Limit the length.
|
||||
length_ = etlstd::min(length_, size() - position);
|
||||
length_ = etl::min(length_, size() - position);
|
||||
|
||||
return compare(p_buffer + position,
|
||||
p_buffer + position + length_,
|
||||
@ -1571,8 +1570,8 @@ namespace etl
|
||||
ETL_ASSERT(subposition <= str.size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
// Limit the lengths.
|
||||
length_ = etlstd::min(length_, size() - position);
|
||||
sublength = etlstd::min(sublength, str.size() - subposition);
|
||||
length_ = etl::min(length_, size() - position);
|
||||
sublength = etl::min(sublength, str.size() - subposition);
|
||||
|
||||
return compare(p_buffer + position,
|
||||
p_buffer + position + length_,
|
||||
@ -1712,7 +1711,7 @@ namespace etl
|
||||
return npos;
|
||||
}
|
||||
|
||||
position = etlstd::min(position, size() - 1);
|
||||
position = etl::min(position, size() - 1);
|
||||
|
||||
const_reverse_iterator it = rbegin() + size() - position - 1;
|
||||
|
||||
@ -1745,7 +1744,7 @@ namespace etl
|
||||
return npos;
|
||||
}
|
||||
|
||||
position = etlstd::min(position, size() - 1);
|
||||
position = etl::min(position, size() - 1);
|
||||
|
||||
const_reverse_iterator it = rbegin() + size() - position - 1;
|
||||
|
||||
@ -1869,7 +1868,7 @@ namespace etl
|
||||
return npos;
|
||||
}
|
||||
|
||||
position = etlstd::min(position, size() - 1);
|
||||
position = etl::min(position, size() - 1);
|
||||
|
||||
const_reverse_iterator it = rbegin() + size() - position - 1;
|
||||
|
||||
@ -1907,7 +1906,7 @@ namespace etl
|
||||
return npos;
|
||||
}
|
||||
|
||||
position = etlstd::min(position, size() - 1);
|
||||
position = etl::min(position, size() - 1);
|
||||
|
||||
const_reverse_iterator it = rbegin() + size() - position - 1;
|
||||
|
||||
@ -2106,7 +2105,7 @@ namespace etl
|
||||
template <typename T>
|
||||
bool operator ==(const etl::ibasic_string<T>& lhs, const etl::ibasic_string<T>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -2119,7 +2118,7 @@ namespace etl
|
||||
template <typename T>
|
||||
bool operator ==(const etl::ibasic_string<T>& lhs, const T* rhs)
|
||||
{
|
||||
return (lhs.size() == etl::strlen(rhs)) && etlstd::equal(lhs.begin(), lhs.end(), rhs);
|
||||
return (lhs.size() == etl::strlen(rhs)) && etl::equal(lhs.begin(), lhs.end(), rhs);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -2132,7 +2131,7 @@ namespace etl
|
||||
template <typename T>
|
||||
bool operator ==(const T* lhs, const etl::ibasic_string<T>& rhs)
|
||||
{
|
||||
return (rhs.size() == etl::strlen(lhs)) && etlstd::equal(rhs.begin(), rhs.end(), lhs);
|
||||
return (rhs.size() == etl::strlen(lhs)) && etl::equal(rhs.begin(), rhs.end(), lhs);
|
||||
}
|
||||
|
||||
|
||||
@ -2185,7 +2184,7 @@ namespace etl
|
||||
template <typename T>
|
||||
bool operator <(const etl::ibasic_string<T>& lhs, const etl::ibasic_string<T>& rhs)
|
||||
{
|
||||
return etlstd::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -2198,7 +2197,7 @@ namespace etl
|
||||
template <typename T>
|
||||
bool operator <(const etl::ibasic_string<T>& lhs, const T* rhs)
|
||||
{
|
||||
return etlstd::lexicographical_compare(lhs.begin(), lhs.end(), rhs, rhs + etl::strlen(rhs));
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs, rhs + etl::strlen(rhs));
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -2211,7 +2210,7 @@ namespace etl
|
||||
template <typename T>
|
||||
bool operator <(const T* lhs, const etl::ibasic_string<T>& rhs)
|
||||
{
|
||||
return etlstd::lexicographical_compare(lhs, lhs + etl::strlen(lhs), rhs.begin(), rhs.end());
|
||||
return etl::lexicographical_compare(lhs, lhs + etl::strlen(lhs), rhs.begin(), rhs.end());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -110,7 +110,7 @@ namespace etl
|
||||
template <typename T>
|
||||
T rotate_left(T value)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
|
||||
|
||||
const size_t SHIFT = etl::integral_limits<typename etl::make_unsigned<T>::type>::bits - 1;
|
||||
|
||||
@ -124,7 +124,7 @@ namespace etl
|
||||
template <typename T>
|
||||
T rotate_left(T value, size_t distance)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
|
||||
|
||||
const size_t BITS = etl::integral_limits<typename etl::make_unsigned<T>::type>::bits;
|
||||
distance %= BITS;
|
||||
@ -140,7 +140,7 @@ namespace etl
|
||||
template <typename T>
|
||||
T rotate_right(T value)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
|
||||
|
||||
const size_t SHIFT = etl::integral_limits<typename etl::make_unsigned<T>::type>::bits - 1;
|
||||
|
||||
@ -154,7 +154,7 @@ namespace etl
|
||||
template <typename T>
|
||||
T rotate_right(T value, size_t distance)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
|
||||
|
||||
const size_t BITS = etl::integral_limits<typename etl::make_unsigned<T>::type>::bits;
|
||||
distance %= BITS;
|
||||
@ -171,7 +171,7 @@ namespace etl
|
||||
template <typename T>
|
||||
T rotate(T value, typename etl::make_signed<size_t>::type distance)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
|
||||
|
||||
T result;
|
||||
|
||||
@ -194,7 +194,7 @@ namespace etl
|
||||
template <typename T>
|
||||
T binary_to_gray(T value)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
|
||||
|
||||
return (value >> 1) ^ value;
|
||||
}
|
||||
@ -235,10 +235,10 @@ namespace etl
|
||||
template <typename TReturn, const size_t NBITS, typename TValue>
|
||||
TReturn sign_extend(TValue value)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<TValue>::value, "TValue not an integral type");
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<TReturn>::value, "TReturn not an integral type");
|
||||
ETL_STATIC_ASSERT(etlstd::is_signed<TReturn>::value, "TReturn not a signed type");
|
||||
ETL_STATIC_ASSERT(NBITS <= etlstd::numeric_limits<TReturn>::digits, "NBITS too large for return type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<TValue>::value, "TValue not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<TReturn>::value, "TReturn not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_signed<TReturn>::value, "TReturn not a signed type");
|
||||
ETL_STATIC_ASSERT(NBITS <= etl::numeric_limits<TReturn>::digits, "NBITS too large for return type");
|
||||
|
||||
struct S
|
||||
{
|
||||
@ -257,11 +257,11 @@ namespace etl
|
||||
template <typename TReturn, const size_t NBITS, const size_t SHIFT, typename TValue>
|
||||
TReturn sign_extend(TValue value)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<TValue>::value, "TValue not an integral type");
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<TReturn>::value, "TReturn not an integral type");
|
||||
ETL_STATIC_ASSERT(etlstd::is_signed<TReturn>::value, "TReturn not a signed type");
|
||||
ETL_STATIC_ASSERT(NBITS <= etlstd::numeric_limits<TReturn>::digits, "NBITS too large for return type");
|
||||
ETL_STATIC_ASSERT(SHIFT <= etlstd::numeric_limits<TReturn>::digits, "SHIFT too large");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<TValue>::value, "TValue not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<TReturn>::value, "TReturn not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_signed<TReturn>::value, "TReturn not a signed type");
|
||||
ETL_STATIC_ASSERT(NBITS <= etl::numeric_limits<TReturn>::digits, "NBITS too large for return type");
|
||||
ETL_STATIC_ASSERT(SHIFT <= etl::numeric_limits<TReturn>::digits, "SHIFT too large");
|
||||
|
||||
struct S
|
||||
{
|
||||
@ -279,11 +279,11 @@ namespace etl
|
||||
template <typename TReturn, typename TValue>
|
||||
TReturn sign_extend(TValue value, const size_t NBITS)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<TValue>::value, "TValue not an integral type");
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<TReturn>::value, "TReturn not an integral type");
|
||||
ETL_STATIC_ASSERT(etlstd::is_signed<TReturn>::value, "TReturn not a signed type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<TValue>::value, "TValue not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<TReturn>::value, "TReturn not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_signed<TReturn>::value, "TReturn not a signed type");
|
||||
|
||||
ETL_ASSERT((NBITS <= etlstd::numeric_limits<TReturn>::digits), ETL_ERROR(binary_out_of_range));
|
||||
ETL_ASSERT((NBITS <= etl::numeric_limits<TReturn>::digits), ETL_ERROR(binary_out_of_range));
|
||||
|
||||
TReturn mask = TReturn(1) << (NBITS - 1);
|
||||
value = value & static_cast<TValue>((TReturn(1) << NBITS) - 1);
|
||||
@ -300,11 +300,11 @@ namespace etl
|
||||
template <typename TReturn, typename TValue>
|
||||
TReturn sign_extend(TValue value, const size_t NBITS, const size_t SHIFT)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<TValue>::value, "TValue not an integral type");
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<TReturn>::value, "TReturn not an integral type");
|
||||
ETL_STATIC_ASSERT(etlstd::is_signed<TReturn>::value, "TReturn not a signed type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<TValue>::value, "TValue not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<TReturn>::value, "TReturn not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_signed<TReturn>::value, "TReturn not a signed type");
|
||||
|
||||
ETL_ASSERT((NBITS <= etlstd::numeric_limits<TReturn>::digits), ETL_ERROR(binary_out_of_range));
|
||||
ETL_ASSERT((NBITS <= etl::numeric_limits<TReturn>::digits), ETL_ERROR(binary_out_of_range));
|
||||
|
||||
TReturn mask = TReturn(1) << (NBITS - 1);
|
||||
value = (value >> SHIFT) & static_cast<TValue>((TReturn(1) << NBITS) - 1);
|
||||
@ -1207,7 +1207,7 @@ namespace etl
|
||||
///\ingroup binary
|
||||
//***************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::enable_if<etlstd::is_integral<T>::value, bool>::type
|
||||
typename etl::enable_if<etl::is_integral<T>::value, bool>::type
|
||||
is_odd(const T value)
|
||||
{
|
||||
return ((static_cast<typename etl::make_unsigned<T>::type>(value) & 1U) != 0U);
|
||||
@ -1218,7 +1218,7 @@ namespace etl
|
||||
///\ingroup binary
|
||||
//***************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::enable_if<etlstd::is_integral<T>::value, bool>::type
|
||||
typename etl::enable_if<etl::is_integral<T>::value, bool>::type
|
||||
is_even(const T value)
|
||||
{
|
||||
return ((static_cast<typename etl::make_unsigned<T>::type>(value) & 1U) == 0U);
|
||||
|
||||
@ -67,7 +67,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
bit_stream(char* begin_, char* end_)
|
||||
: pdata(reinterpret_cast<unsigned char*>(begin_)),
|
||||
length(etlstd::distance(begin_, end_))
|
||||
length(etl::distance(begin_, end_))
|
||||
{
|
||||
restart();
|
||||
}
|
||||
@ -77,7 +77,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
bit_stream(unsigned char* begin_, unsigned char* end_)
|
||||
: pdata(begin_),
|
||||
length(etlstd::distance(begin_, end_))
|
||||
length(etl::distance(begin_, end_))
|
||||
{
|
||||
restart();
|
||||
}
|
||||
@ -127,7 +127,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
void set_stream(char* begin_, char* end_)
|
||||
{
|
||||
set_stream(begin_, etlstd::distance(begin_, end_));
|
||||
set_stream(begin_, etl::distance(begin_, end_));
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -135,7 +135,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
void set_stream(unsigned char* begin_, unsigned char* end_)
|
||||
{
|
||||
set_stream(begin_, etlstd::distance(begin_, end_));
|
||||
set_stream(begin_, etl::distance(begin_, end_));
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -180,7 +180,7 @@ namespace etl
|
||||
/// For integral types
|
||||
//***************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::enable_if<etlstd::is_integral<T>::value, bool>::type
|
||||
typename etl::enable_if<etl::is_integral<T>::value, bool>::type
|
||||
put(T value, uint_least8_t width = CHAR_BIT * sizeof(T))
|
||||
{
|
||||
return put_integral(static_cast<uint32_t>(value), width);
|
||||
@ -206,7 +206,7 @@ namespace etl
|
||||
/// For floating point types
|
||||
//***************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::enable_if<etlstd::is_floating_point<T>::value, bool>::type
|
||||
typename etl::enable_if<etl::is_floating_point<T>::value, bool>::type
|
||||
put(T value)
|
||||
{
|
||||
bool success = true;
|
||||
@ -249,7 +249,7 @@ namespace etl
|
||||
/// For integral types
|
||||
//***************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::enable_if<etlstd::is_integral<T>::value, bool>::type
|
||||
typename etl::enable_if<etl::is_integral<T>::value, bool>::type
|
||||
get(T& value, uint_least8_t width = CHAR_BIT * sizeof(T))
|
||||
{
|
||||
bool success = false;
|
||||
@ -265,7 +265,7 @@ namespace etl
|
||||
// Get the bits from the stream.
|
||||
while (width != 0)
|
||||
{
|
||||
unsigned char mask_width = static_cast<unsigned char>(etlstd::min(width, bits_in_byte));
|
||||
unsigned char mask_width = static_cast<unsigned char>(etl::min(width, bits_in_byte));
|
||||
unsigned char chunk = get_chunk(mask_width);
|
||||
|
||||
width -= mask_width;
|
||||
@ -277,7 +277,7 @@ namespace etl
|
||||
}
|
||||
|
||||
// Sign extend if signed type and not already full bit width.
|
||||
if (etlstd::is_signed<T>::value && (bits != (CHAR_BIT * sizeof(T))))
|
||||
if (etl::is_signed<T>::value && (bits != (CHAR_BIT * sizeof(T))))
|
||||
{
|
||||
typedef typename etl::make_signed<T>::type ST;
|
||||
value = etl::sign_extend<ST, ST>(value, bits);
|
||||
@ -290,7 +290,7 @@ namespace etl
|
||||
/// For floating point types
|
||||
//***************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::enable_if<etlstd::is_floating_point<T>::value, bool>::type
|
||||
typename etl::enable_if<etl::is_floating_point<T>::value, bool>::type
|
||||
get(T& value)
|
||||
{
|
||||
bool success = false;
|
||||
@ -378,7 +378,7 @@ namespace etl
|
||||
// Send the bits to the stream.
|
||||
while (width != 0)
|
||||
{
|
||||
unsigned char mask_width = static_cast<unsigned char>(etlstd::min(width, bits_in_byte));
|
||||
unsigned char mask_width = static_cast<unsigned char>(etl::min(width, bits_in_byte));
|
||||
width -= mask_width;
|
||||
uint32_t mask = ((uint32_t(1U) << mask_width) - 1U) << width;
|
||||
|
||||
@ -411,7 +411,7 @@ namespace etl
|
||||
// Send the bits to the stream.
|
||||
while (width != 0)
|
||||
{
|
||||
unsigned char mask_width = static_cast<unsigned char>(etlstd::min(width, bits_in_byte));
|
||||
unsigned char mask_width = static_cast<unsigned char>(etl::min(width, bits_in_byte));
|
||||
width -= mask_width;
|
||||
uint64_t mask = ((uint64_t(1U) << mask_width) - 1U) << width;
|
||||
|
||||
@ -494,11 +494,11 @@ namespace etl
|
||||
// Network to host.
|
||||
if (etl::endianness::value() == etl::endian::little)
|
||||
{
|
||||
etlstd::reverse_copy(data, data + sizeof(T), temp);
|
||||
etl::reverse_copy(data, data + sizeof(T), temp);
|
||||
}
|
||||
else
|
||||
{
|
||||
etlstd::copy(data, data + sizeof(T), temp);
|
||||
etl::copy(data, data + sizeof(T), temp);
|
||||
}
|
||||
|
||||
value = *reinterpret_cast<T*>(temp);
|
||||
@ -515,11 +515,11 @@ namespace etl
|
||||
// Host to network.
|
||||
if (etl::endianness::value() == etl::endian::little)
|
||||
{
|
||||
etlstd::reverse_copy(pf, pf + sizeof(T), data);
|
||||
etl::reverse_copy(pf, pf + sizeof(T), data);
|
||||
}
|
||||
else
|
||||
{
|
||||
etlstd::copy(pf, pf + sizeof(T), data);
|
||||
etl::copy(pf, pf + sizeof(T), data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -312,7 +312,7 @@ namespace etl
|
||||
{
|
||||
reset();
|
||||
|
||||
size_t i = etlstd::min(NBITS, etl::strlen(text));
|
||||
size_t i = etl::min(NBITS, etl::strlen(text));
|
||||
|
||||
while (i > 0)
|
||||
{
|
||||
@ -329,7 +329,7 @@ namespace etl
|
||||
{
|
||||
reset();
|
||||
|
||||
size_t i = etlstd::min(NBITS, etl::strlen(text));
|
||||
size_t i = etl::min(NBITS, etl::strlen(text));
|
||||
|
||||
while (i > 0)
|
||||
{
|
||||
@ -346,7 +346,7 @@ namespace etl
|
||||
{
|
||||
reset();
|
||||
|
||||
size_t i = etlstd::min(NBITS, etl::strlen(text));
|
||||
size_t i = etl::min(NBITS, etl::strlen(text));
|
||||
|
||||
while (i > 0)
|
||||
{
|
||||
@ -363,7 +363,7 @@ namespace etl
|
||||
{
|
||||
reset();
|
||||
|
||||
size_t i = etlstd::min(NBITS, etl::strlen(text));
|
||||
size_t i = etl::min(NBITS, etl::strlen(text));
|
||||
|
||||
while (i > 0)
|
||||
{
|
||||
@ -380,7 +380,7 @@ namespace etl
|
||||
{
|
||||
reset();
|
||||
|
||||
size_t i = etlstd::min(NBITS, etl::strlen(text));
|
||||
size_t i = etl::min(NBITS, etl::strlen(text));
|
||||
|
||||
while (i > 0)
|
||||
{
|
||||
@ -394,7 +394,7 @@ namespace etl
|
||||
/// Put to a value.
|
||||
//*************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::enable_if<etlstd::is_integral<T>::value, T>::type
|
||||
typename etl::enable_if<etl::is_integral<T>::value, T>::type
|
||||
value() const
|
||||
{
|
||||
T v = T(0);
|
||||
@ -818,7 +818,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
static bool is_equal(const ibitset& lhs, const ibitset&rhs)
|
||||
{
|
||||
return etlstd::equal(lhs.pdata, lhs.pdata + lhs.SIZE, rhs.pdata);
|
||||
return etl::equal(lhs.pdata, lhs.pdata + lhs.SIZE, rhs.pdata);
|
||||
}
|
||||
|
||||
element_t TOP_MASK;
|
||||
@ -976,7 +976,7 @@ namespace etl
|
||||
/// Put to a value.
|
||||
//*************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::enable_if<etlstd::is_integral<T>::value, T>::type
|
||||
typename etl::enable_if<etl::is_integral<T>::value, T>::type
|
||||
value() const
|
||||
{
|
||||
ETL_STATIC_ASSERT((sizeof(T) * CHAR_BIT) >= (ARRAY_SIZE * BITS_PER_ELEMENT), "Type too small");
|
||||
|
||||
@ -104,12 +104,12 @@ namespace etl
|
||||
{
|
||||
flags.set(get_hash<THash1>(key));
|
||||
|
||||
if (!etlstd::is_same<THash2, null_hash>::value)
|
||||
if (!etl::is_same<THash2, null_hash>::value)
|
||||
{
|
||||
flags.set(get_hash<THash2>(key));
|
||||
}
|
||||
|
||||
if (!etlstd::is_same<THash3, null_hash>::value)
|
||||
if (!etl::is_same<THash3, null_hash>::value)
|
||||
{
|
||||
flags.set(get_hash<THash3>(key));
|
||||
}
|
||||
@ -127,13 +127,13 @@ namespace etl
|
||||
bool exists3 = true;
|
||||
|
||||
// Do we have a second hash?
|
||||
if (!etlstd::is_same<THash2, null_hash>::value)
|
||||
if (!etl::is_same<THash2, null_hash>::value)
|
||||
{
|
||||
exists2 = flags[get_hash<THash2>(key)];
|
||||
}
|
||||
|
||||
// Do we have a third hash?
|
||||
if (!etlstd::is_same<THash3, null_hash>::value)
|
||||
if (!etl::is_same<THash3, null_hash>::value)
|
||||
{
|
||||
exists3 = flags[get_hash<THash3>(key)];
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ namespace etl
|
||||
{
|
||||
if (p != 0)
|
||||
{
|
||||
etlstd::fill_n(p, n, c);
|
||||
etl::fill_n(p, n, c);
|
||||
}
|
||||
|
||||
return p;
|
||||
|
||||
@ -47,7 +47,7 @@ namespace etl
|
||||
/// Defines <=, >, >= interms of <
|
||||
/// Default
|
||||
//***************************************************************************
|
||||
template <typename T, typename TLess = etlstd::less<T> >
|
||||
template <typename T, typename TLess = etl::less<T> >
|
||||
struct compare
|
||||
{
|
||||
typedef typename etl::parameter_type<T>::type first_argument_type;
|
||||
|
||||
@ -273,7 +273,7 @@ namespace etl
|
||||
char(&array_size(T(&array)[ARRAY_SIZE]))[ARRAY_SIZE];
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_FORCE_NO_ADVANCED_CPP)
|
||||
#define ETL_ARRAY_SIZE(a) (etl::size(a))
|
||||
#else
|
||||
#define ETL_ARRAY_SIZE(a) sizeof(etl::array_size(a))
|
||||
|
||||
@ -191,7 +191,7 @@ namespace etl
|
||||
{
|
||||
ETL_ASSERT(position < this->size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
length_ = etlstd::min(length_, this->size() - position);
|
||||
length_ = etl::min(length_, this->size() - position);
|
||||
|
||||
new_string.assign(buffer + position, buffer + position + length_);
|
||||
}
|
||||
|
||||
@ -44,8 +44,8 @@ namespace etl
|
||||
template <typename T,
|
||||
const size_t SAMPLE_SIZE,
|
||||
const size_t SCALING = 1U,
|
||||
const bool IsIntegral = etlstd::is_integral<T>::value,
|
||||
const bool IsFloat = etlstd::is_floating_point<T>::value>
|
||||
const bool IsIntegral = etl::is_integral<T>::value,
|
||||
const bool IsFloat = etl::is_floating_point<T>::value>
|
||||
class cumulative_moving_average;
|
||||
|
||||
//***************************************************************************
|
||||
@ -58,8 +58,8 @@ namespace etl
|
||||
template <typename T, const size_t SAMPLE_SIZE_, const size_t SCALING_>
|
||||
class cumulative_moving_average<T, SAMPLE_SIZE_, SCALING_, true, false>
|
||||
{
|
||||
typedef typename etlstd::conditional<etlstd::is_signed<T>::value, int32_t, uint32_t>::type scale_t;
|
||||
typedef typename etlstd::conditional<etlstd::is_signed<T>::value, int32_t, uint32_t>::type sample_t;
|
||||
typedef typename etl::conditional<etl::is_signed<T>::value, int32_t, uint32_t>::type scale_t;
|
||||
typedef typename etl::conditional<etl::is_signed<T>::value, int32_t, uint32_t>::type sample_t;
|
||||
|
||||
static const sample_t SAMPLES = static_cast<sample_t>(SAMPLE_SIZE_);
|
||||
static const scale_t SCALE = static_cast<scale_t>(SCALING_);
|
||||
@ -121,8 +121,8 @@ namespace etl
|
||||
template <typename T, const size_t SCALING_>
|
||||
class cumulative_moving_average<T, 0, SCALING_, true, false>
|
||||
{
|
||||
typedef typename etlstd::conditional<etlstd::is_signed<T>::value, int32_t, uint32_t>::type scale_t;
|
||||
typedef typename etlstd::conditional<etlstd::is_signed<T>::value, int32_t, uint32_t>::type sample_t;
|
||||
typedef typename etl::conditional<etl::is_signed<T>::value, int32_t, uint32_t>::type scale_t;
|
||||
typedef typename etl::conditional<etl::is_signed<T>::value, int32_t, uint32_t>::type sample_t;
|
||||
|
||||
static const scale_t SCALE = static_cast<scale_t>(SCALING_);
|
||||
|
||||
|
||||
@ -257,11 +257,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void swap(cyclic_value<T, FIRST, LAST>& other)
|
||||
{
|
||||
#if defined(ETL_NO_STL)
|
||||
using etlstd::swap;
|
||||
#else
|
||||
using std::swap;
|
||||
#endif
|
||||
using ETL_OR_STD::swap; // Allow ADL
|
||||
|
||||
swap(value, other.value);
|
||||
}
|
||||
@ -304,7 +300,7 @@ namespace etl
|
||||
///\ingroup cyclic_value
|
||||
//***************************************************************************
|
||||
template <typename T, const T FIRST, const T LAST>
|
||||
class cyclic_value<T, FIRST, LAST, typename etlstd::enable_if<(FIRST == 0) && (LAST == 0)>::type>
|
||||
class cyclic_value<T, FIRST, LAST, typename etl::enable_if<(FIRST == 0) && (LAST == 0)>::type>
|
||||
{
|
||||
public:
|
||||
|
||||
@ -537,11 +533,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void swap(cyclic_value<T, FIRST, LAST>& other)
|
||||
{
|
||||
#if defined(ETL_NO_STL)
|
||||
using etlstd::swap;
|
||||
#else
|
||||
using std::swap;
|
||||
#endif
|
||||
using ETL_OR_STD::swap; // Allow ADL
|
||||
|
||||
swap(first_value, other.first_value);
|
||||
swap(last_value, other.last_value);
|
||||
|
||||
@ -239,7 +239,7 @@ namespace etl
|
||||
#endif
|
||||
typedef T* pointer;
|
||||
typedef const T* const_pointer;
|
||||
typedef typename etlstd::iterator_traits<pointer>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<pointer>::difference_type difference_type;
|
||||
|
||||
protected:
|
||||
|
||||
@ -247,7 +247,7 @@ namespace etl
|
||||
/// Test for an iterator.
|
||||
//*************************************************************************
|
||||
template <typename TIterator>
|
||||
struct is_iterator : public etl::integral_constant<bool, !etlstd::is_integral<TIterator>::value && !etlstd::is_floating_point<TIterator>::value>
|
||||
struct is_iterator : public etl::integral_constant<bool, !etl::is_integral<TIterator>::value && !etl::is_floating_point<TIterator>::value>
|
||||
{
|
||||
};
|
||||
|
||||
@ -421,11 +421,7 @@ namespace etl
|
||||
//***************************************************
|
||||
void swap(iterator& other)
|
||||
{
|
||||
#if defined(ETL_NO_STL)
|
||||
using etlstd::swap;
|
||||
#else
|
||||
using std::swap;
|
||||
#endif
|
||||
using ETL_OR_STD::swap; // Allow ADL
|
||||
|
||||
swap(index, other.index);
|
||||
}
|
||||
@ -647,7 +643,7 @@ namespace etl
|
||||
/// Assigns a range to the deque.
|
||||
//*************************************************************************
|
||||
template<typename TIterator>
|
||||
typename etlstd::enable_if<is_iterator<TIterator>::value, void>::type
|
||||
typename etl::enable_if<is_iterator<TIterator>::value, void>::type
|
||||
assign(TIterator range_begin, TIterator range_end)
|
||||
{
|
||||
initialise();
|
||||
@ -899,13 +895,13 @@ namespace etl
|
||||
else
|
||||
{
|
||||
// Are we closer to the front?
|
||||
if (etlstd::distance(_begin, position) < etlstd::distance(position, _end - 1))
|
||||
if (etl::distance(_begin, position) < etl::distance(position, _end - 1))
|
||||
{
|
||||
// Construct the _begin.
|
||||
create_element_front(*_begin);
|
||||
|
||||
// Move the values.
|
||||
etlstd::copy(_begin + 1, position, _begin);
|
||||
etl::copy(_begin + 1, position, _begin);
|
||||
|
||||
// Write the new value.
|
||||
*--position = value;
|
||||
@ -916,7 +912,7 @@ namespace etl
|
||||
create_element_back(*(_end - 1));
|
||||
|
||||
// Move the values.
|
||||
etlstd::copy_backward(position, _end - 2, _end - 1);
|
||||
etl::copy_backward(position, _end - 2, _end - 1);
|
||||
|
||||
// Write the new value.
|
||||
*position = value;
|
||||
@ -941,38 +937,38 @@ namespace etl
|
||||
|
||||
if (insert_position == begin())
|
||||
{
|
||||
create_element_front(etlstd::move(value));
|
||||
create_element_front(etl::move(value));
|
||||
position = _begin;
|
||||
}
|
||||
else if (insert_position == end())
|
||||
{
|
||||
create_element_back(etlstd::move(value));
|
||||
create_element_back(etl::move(value));
|
||||
position = _end - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Are we closer to the front?
|
||||
if (etlstd::distance(_begin, position) < etlstd::distance(position, _end - 1))
|
||||
if (etl::distance(_begin, position) < etl::distance(position, _end - 1))
|
||||
{
|
||||
// Construct the _begin.
|
||||
create_element_front(etlstd::move(*_begin));
|
||||
create_element_front(etl::move(*_begin));
|
||||
|
||||
// Move the values.
|
||||
etlstd::move(_begin + 1, position, _begin);
|
||||
etl::move(_begin + 1, position, _begin);
|
||||
|
||||
// Write the new value.
|
||||
*--position = etlstd::move(value);
|
||||
*--position = etl::move(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Construct the _end.
|
||||
create_element_back(etlstd::move(*(_end - 1)));
|
||||
create_element_back(etl::move(*(_end - 1)));
|
||||
|
||||
// Move the values.
|
||||
etlstd::move_backward(position, _end - 2, _end - 1);
|
||||
etl::move_backward(position, _end - 2, _end - 1);
|
||||
|
||||
// Write the new value.
|
||||
*position = etlstd::move(value);
|
||||
*position = etl::move(value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1014,13 +1010,13 @@ namespace etl
|
||||
else
|
||||
{
|
||||
// Are we closer to the front?
|
||||
if (etlstd::distance(_begin, position) < etlstd::distance(position, _end - 1))
|
||||
if (etl::distance(_begin, position) < etl::distance(position, _end - 1))
|
||||
{
|
||||
// Construct the _begin.
|
||||
create_element_front(*_begin);
|
||||
|
||||
// Move the values.
|
||||
etlstd::copy(_begin + 1, position, _begin);
|
||||
etl::copy(_begin + 1, position, _begin);
|
||||
|
||||
// Write the new value.
|
||||
--position;
|
||||
@ -1033,7 +1029,7 @@ namespace etl
|
||||
create_element_back(*(_end - 1));
|
||||
|
||||
// Move the values.
|
||||
etlstd::copy_backward(position, _end - 2, _end - 1);
|
||||
etl::copy_backward(position, _end - 2, _end - 1);
|
||||
|
||||
// Write the new value.
|
||||
(*position).~T();
|
||||
@ -1041,7 +1037,7 @@ namespace etl
|
||||
}
|
||||
}
|
||||
|
||||
::new (p) T(etlstd::forward<Args>(args)...);
|
||||
::new (p) T(etl::forward<Args>(args)...);
|
||||
|
||||
return position;
|
||||
}
|
||||
@ -1081,13 +1077,13 @@ namespace etl
|
||||
else
|
||||
{
|
||||
// Are we closer to the front?
|
||||
if (etlstd::distance(_begin, position) < etlstd::distance(position, _end - 1))
|
||||
if (etl::distance(_begin, position) < etl::distance(position, _end - 1))
|
||||
{
|
||||
// Construct the _begin.
|
||||
create_element_front(*_begin);
|
||||
|
||||
// Move the values.
|
||||
etlstd::copy(_begin + 1, position, _begin);
|
||||
etl::copy(_begin + 1, position, _begin);
|
||||
|
||||
// Write the new value.
|
||||
--position;
|
||||
@ -1100,7 +1096,7 @@ namespace etl
|
||||
create_element_back(*(_end - 1));
|
||||
|
||||
// Move the values.
|
||||
etlstd::copy_backward(position, _end - 2, _end - 1);
|
||||
etl::copy_backward(position, _end - 2, _end - 1);
|
||||
|
||||
// Write the new value.
|
||||
(*position).~T();
|
||||
@ -1146,13 +1142,13 @@ namespace etl
|
||||
else
|
||||
{
|
||||
// Are we closer to the front?
|
||||
if (etlstd::distance(_begin, position) < etlstd::distance(position, _end - 1))
|
||||
if (etl::distance(_begin, position) < etl::distance(position, _end - 1))
|
||||
{
|
||||
// Construct the _begin.
|
||||
create_element_front(*_begin);
|
||||
|
||||
// Move the values.
|
||||
etlstd::copy(_begin + 1, position, _begin);
|
||||
etl::copy(_begin + 1, position, _begin);
|
||||
|
||||
// Write the new value.
|
||||
--position;
|
||||
@ -1165,7 +1161,7 @@ namespace etl
|
||||
create_element_back(*(_end - 1));
|
||||
|
||||
// Move the values.
|
||||
etlstd::copy_backward(position, _end - 2, _end - 1);
|
||||
etl::copy_backward(position, _end - 2, _end - 1);
|
||||
|
||||
// Write the new value.
|
||||
(*position).~T();
|
||||
@ -1211,13 +1207,13 @@ namespace etl
|
||||
else
|
||||
{
|
||||
// Are we closer to the front?
|
||||
if (etlstd::distance(_begin, position) < etlstd::distance(position, _end - 1))
|
||||
if (etl::distance(_begin, position) < etl::distance(position, _end - 1))
|
||||
{
|
||||
// Construct the _begin.
|
||||
create_element_front(*_begin);
|
||||
|
||||
// Move the values.
|
||||
etlstd::copy(_begin + 1, position, _begin);
|
||||
etl::copy(_begin + 1, position, _begin);
|
||||
|
||||
// Write the new value.
|
||||
--position;
|
||||
@ -1230,7 +1226,7 @@ namespace etl
|
||||
create_element_back(*(_end - 1));
|
||||
|
||||
// Move the values.
|
||||
etlstd::copy_backward(position, _end - 2, _end - 1);
|
||||
etl::copy_backward(position, _end - 2, _end - 1);
|
||||
|
||||
// Write the new value.
|
||||
(*position).~T();
|
||||
@ -1276,13 +1272,13 @@ namespace etl
|
||||
else
|
||||
{
|
||||
// Are we closer to the front?
|
||||
if (etlstd::distance(_begin, position) < etlstd::distance(position, _end - 1))
|
||||
if (etl::distance(_begin, position) < etl::distance(position, _end - 1))
|
||||
{
|
||||
// Construct the _begin.
|
||||
create_element_front(*_begin);
|
||||
|
||||
// Move the values.
|
||||
etlstd::copy(_begin + 1, position, _begin);
|
||||
etl::copy(_begin + 1, position, _begin);
|
||||
|
||||
// Write the new value.
|
||||
--position;
|
||||
@ -1295,7 +1291,7 @@ namespace etl
|
||||
create_element_back(*(_end - 1));
|
||||
|
||||
// Move the values.
|
||||
etlstd::copy_backward(position, _end - 2, _end - 1);
|
||||
etl::copy_backward(position, _end - 2, _end - 1);
|
||||
|
||||
// Write the new value.
|
||||
(*position).~T();
|
||||
@ -1349,8 +1345,8 @@ namespace etl
|
||||
if (distance(_begin, insert_position) <= difference_type(current_size / 2))
|
||||
{
|
||||
size_t n_insert = n;
|
||||
size_t n_move = etlstd::distance(begin(), position);
|
||||
size_t n_create_copy = etlstd::min(n_insert, n_move);
|
||||
size_t n_move = etl::distance(begin(), position);
|
||||
size_t n_create_copy = etl::min(n_insert, n_move);
|
||||
size_t n_create_new = (n_insert > n_create_copy) ? n_insert - n_create_copy : 0;
|
||||
size_t n_copy_new = (n_insert > n_create_new) ? n_insert - n_create_new : 0;
|
||||
size_t n_copy_old = n_move - n_create_copy;
|
||||
@ -1378,15 +1374,15 @@ namespace etl
|
||||
|
||||
// Copy new.
|
||||
to = position - n_create_copy;
|
||||
etlstd::fill_n(to, n_copy_new, value);
|
||||
etl::fill_n(to, n_copy_new, value);
|
||||
|
||||
position = _begin + n_move;
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t n_insert = n;
|
||||
size_t n_move = etlstd::distance(position, end());
|
||||
size_t n_create_copy = etlstd::min(n_insert, n_move);
|
||||
size_t n_move = etl::distance(position, end());
|
||||
size_t n_create_copy = etl::min(n_insert, n_move);
|
||||
size_t n_create_new = (n_insert > n_create_copy) ? n_insert - n_create_copy : 0;
|
||||
size_t n_copy_new = (n_insert > n_create_new) ? n_insert - n_create_new : 0;
|
||||
size_t n_copy_old = n_move - n_create_copy;
|
||||
@ -1406,10 +1402,10 @@ namespace etl
|
||||
}
|
||||
|
||||
// Copy old.
|
||||
etlstd::copy_backward(position, position + n_copy_old, position + n_insert + n_copy_old);
|
||||
etl::copy_backward(position, position + n_copy_old, position + n_insert + n_copy_old);
|
||||
|
||||
// Copy new.
|
||||
etlstd::fill_n(position, n_copy_new, value);
|
||||
etl::fill_n(position, n_copy_new, value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1429,7 +1425,7 @@ namespace etl
|
||||
{
|
||||
iterator position;
|
||||
|
||||
difference_type n = etlstd::distance(range_begin, range_end);
|
||||
difference_type n = etl::distance(range_begin, range_end);
|
||||
|
||||
ETL_ASSERT((current_size + n) <= CAPACITY, ETL_ERROR(deque_full));
|
||||
|
||||
@ -1457,8 +1453,8 @@ namespace etl
|
||||
if (distance(_begin, insert_position) < difference_type(current_size / 2))
|
||||
{
|
||||
size_t n_insert = n;
|
||||
size_t n_move = etlstd::distance(begin(), position);
|
||||
size_t n_create_copy = etlstd::min(n_insert, n_move);
|
||||
size_t n_move = etl::distance(begin(), position);
|
||||
size_t n_create_copy = etl::min(n_insert, n_move);
|
||||
size_t n_create_new = (n_insert > n_create_copy) ? n_insert - n_create_copy : 0;
|
||||
size_t n_copy_new = (n_insert > n_create_new) ? n_insert - n_create_new : 0;
|
||||
size_t n_copy_old = n_move - n_create_copy;
|
||||
@ -1488,8 +1484,8 @@ namespace etl
|
||||
else
|
||||
{
|
||||
size_t n_insert = n;
|
||||
size_t n_move = etlstd::distance(position, end());
|
||||
size_t n_create_copy = etlstd::min(n_insert, n_move);
|
||||
size_t n_move = etl::distance(position, end());
|
||||
size_t n_create_copy = etl::min(n_insert, n_move);
|
||||
size_t n_create_new = (n_insert > n_create_copy) ? n_insert - n_create_copy : 0;
|
||||
size_t n_copy_new = (n_insert > n_create_new) ? n_insert - n_create_new : 0;
|
||||
size_t n_copy_old = n_move - n_create_copy;
|
||||
@ -1510,7 +1506,7 @@ namespace etl
|
||||
}
|
||||
|
||||
// Copy old.
|
||||
etlstd::copy_backward(position, position + n_copy_old, position + n_insert + n_copy_old);
|
||||
etl::copy_backward(position, position + n_copy_old, position + n_insert + n_copy_old);
|
||||
|
||||
// Copy new.
|
||||
item = range_begin;
|
||||
@ -1547,13 +1543,13 @@ namespace etl
|
||||
// Are we closer to the front?
|
||||
if (distance(_begin, position) < difference_type(current_size / 2))
|
||||
{
|
||||
etlstd::copy_backward(_begin, position, position + 1);
|
||||
etl::copy_backward(_begin, position, position + 1);
|
||||
destroy_element_front();
|
||||
++position;
|
||||
}
|
||||
else
|
||||
{
|
||||
etlstd::copy(position + 1, _end, position);
|
||||
etl::copy(position + 1, _end, position);
|
||||
destroy_element_back();
|
||||
}
|
||||
}
|
||||
@ -1574,7 +1570,7 @@ namespace etl
|
||||
ETL_ASSERT((distance(range_begin) <= difference_type(current_size)) && (distance(range_end) <= difference_type(current_size)), ETL_ERROR(deque_out_of_bounds));
|
||||
|
||||
// How many to erase?
|
||||
size_t length = etlstd::distance(range_begin, range_end);
|
||||
size_t length = etl::distance(range_begin, range_end);
|
||||
|
||||
// At the beginning?
|
||||
if (position == _begin)
|
||||
@ -1603,7 +1599,7 @@ namespace etl
|
||||
if (distance(_begin, position) < difference_type(current_size / 2))
|
||||
{
|
||||
// Move the items.
|
||||
etlstd::copy_backward(_begin, position, position + length);
|
||||
etl::copy_backward(_begin, position, position + length);
|
||||
|
||||
for (size_t i = 0; i < length; ++i)
|
||||
{
|
||||
@ -1616,7 +1612,7 @@ namespace etl
|
||||
// Must be closer to the back.
|
||||
{
|
||||
// Move the items.
|
||||
etlstd::copy(position + length, _end, position);
|
||||
etl::copy(position + length, _end, position);
|
||||
|
||||
for (size_t i = 0; i < length; ++i)
|
||||
{
|
||||
@ -1652,7 +1648,7 @@ namespace etl
|
||||
#if defined(ETL_CHECK_PUSH_POP)
|
||||
ETL_ASSERT(!full(), ETL_ERROR(deque_full));
|
||||
#endif
|
||||
create_element_back(etlstd::move(item));
|
||||
create_element_back(etl::move(item));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1668,7 +1664,7 @@ namespace etl
|
||||
ETL_ASSERT(!full(), ETL_ERROR(deque_full));
|
||||
#endif
|
||||
|
||||
::new (&(*_end)) T(etlstd::forward<Args>(args)...);
|
||||
::new (&(*_end)) T(etl::forward<Args>(args)...);
|
||||
++_end;
|
||||
++current_size;
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
@ -1780,7 +1776,7 @@ namespace etl
|
||||
#if defined(ETL_CHECK_PUSH_POP)
|
||||
ETL_ASSERT(!full(), ETL_ERROR(deque_full));
|
||||
#endif
|
||||
create_element_front(etlstd::move(item));
|
||||
create_element_front(etl::move(item));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1797,7 +1793,7 @@ namespace etl
|
||||
#endif
|
||||
|
||||
--_begin;
|
||||
::new (&(*_begin)) T(etlstd::forward<Args>(args)...);
|
||||
::new (&(*_begin)) T(etl::forward<Args>(args)...);
|
||||
++current_size;
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
}
|
||||
@ -1971,7 +1967,7 @@ namespace etl
|
||||
iterator itr = rhs.begin();
|
||||
while (itr != rhs.end())
|
||||
{
|
||||
push_back(etlstd::move(*itr));
|
||||
push_back(etl::move(*itr));
|
||||
++itr;
|
||||
}
|
||||
|
||||
@ -2123,7 +2119,7 @@ namespace etl
|
||||
void create_element_front(rvalue_reference value)
|
||||
{
|
||||
--_begin;
|
||||
::new (&(*_begin)) T(etlstd::move(value));
|
||||
::new (&(*_begin)) T(etl::move(value));
|
||||
++current_size;
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
}
|
||||
@ -2133,7 +2129,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
void create_element_back(rvalue_reference value)
|
||||
{
|
||||
::new (&(*_end)) T(etlstd::move(value));
|
||||
::new (&(*_end)) T(etl::move(value));
|
||||
++_end;
|
||||
++current_size;
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
@ -2239,7 +2235,7 @@ namespace etl
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
typedef size_t size_type;
|
||||
typedef typename etlstd::iterator_traits<pointer>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<pointer>::difference_type difference_type;
|
||||
|
||||
//*************************************************************************
|
||||
/// Default constructor.
|
||||
@ -2284,7 +2280,7 @@ namespace etl
|
||||
typename etl::ideque<T>::iterator itr = other.begin();
|
||||
while (itr != other.end())
|
||||
{
|
||||
this->push_back(etlstd::move(*itr));
|
||||
this->push_back(etl::move(*itr));
|
||||
++itr;
|
||||
}
|
||||
|
||||
@ -2348,7 +2344,7 @@ namespace etl
|
||||
typename etl::ideque<T>::iterator itr = rhs.begin();
|
||||
while (itr != rhs.end())
|
||||
{
|
||||
this->push_back(etlstd::move(*itr));
|
||||
this->push_back(etl::move(*itr));
|
||||
++itr;
|
||||
}
|
||||
|
||||
@ -2377,7 +2373,7 @@ namespace etl
|
||||
private:
|
||||
|
||||
/// The uninitialised buffer of T used in the deque.
|
||||
typename etl::aligned_storage<sizeof(T), etlstd::alignment_of<T>::value>::type buffer[BUFFER_SIZE];
|
||||
typename etl::aligned_storage<sizeof(T), etl::alignment_of<T>::value>::type buffer[BUFFER_SIZE];
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
@ -2390,7 +2386,7 @@ namespace etl
|
||||
template <typename T>
|
||||
bool operator ==(const etl::ideque<T>& lhs, const etl::ideque<T>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -2416,7 +2412,7 @@ namespace etl
|
||||
template <typename T>
|
||||
bool operator <(const etl::ideque<T>& lhs, const etl::ideque<T>& rhs)
|
||||
{
|
||||
return etlstd::lexicographical_compare(lhs.begin(),
|
||||
return etl::lexicographical_compare(lhs.begin(),
|
||||
lhs.end(),
|
||||
rhs.begin(),
|
||||
rhs.end());
|
||||
|
||||
@ -45,7 +45,7 @@ namespace etl
|
||||
/// This can be useful when using STL algorithms to interact with fixed memory locations such as registers.
|
||||
///\ingroup iterator
|
||||
template <typename TIterator>
|
||||
class fixed_iterator : etl::iterator<typename etlstd::iterator_traits<TIterator>::iterator_category, typename etlstd::iterator_traits<TIterator>::value_type>
|
||||
class fixed_iterator : etl::iterator<typename etl::iterator_traits<TIterator>::iterator_category, typename etl::iterator_traits<TIterator>::value_type>
|
||||
{
|
||||
public:
|
||||
|
||||
@ -100,7 +100,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// Dereference operator.
|
||||
//***************************************************************************
|
||||
typename etlstd::iterator_traits<TIterator>::value_type operator *()
|
||||
typename etl::iterator_traits<TIterator>::value_type operator *()
|
||||
{
|
||||
return *it;
|
||||
}
|
||||
@ -108,7 +108,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// Dereference operator.
|
||||
//***************************************************************************
|
||||
const typename etlstd::iterator_traits<TIterator>::value_type operator *() const
|
||||
const typename etl::iterator_traits<TIterator>::value_type operator *() const
|
||||
{
|
||||
return *it;
|
||||
}
|
||||
@ -140,7 +140,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// += operator.
|
||||
//***************************************************************************
|
||||
fixed_iterator& operator +=(typename etlstd::iterator_traits<TIterator>::difference_type /*offset*/)
|
||||
fixed_iterator& operator +=(typename etl::iterator_traits<TIterator>::difference_type /*offset*/)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
@ -148,7 +148,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// -= operator.
|
||||
//***************************************************************************
|
||||
fixed_iterator& operator -=(typename etlstd::iterator_traits<TIterator>::difference_type /*offset*/)
|
||||
fixed_iterator& operator -=(typename etl::iterator_traits<TIterator>::difference_type /*offset*/)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
@ -181,7 +181,7 @@ namespace etl
|
||||
//*****************************************************************************
|
||||
template <typename TIterator>
|
||||
etl::fixed_iterator<TIterator>& operator +(etl::fixed_iterator<TIterator>& lhs,
|
||||
typename etlstd::iterator_traits<TIterator>::difference_type /*rhs*/)
|
||||
typename etl::iterator_traits<TIterator>::difference_type /*rhs*/)
|
||||
{
|
||||
return lhs;
|
||||
}
|
||||
@ -191,7 +191,7 @@ namespace etl
|
||||
//*****************************************************************************
|
||||
template <typename TIterator>
|
||||
etl::fixed_iterator<TIterator>& operator -(etl::fixed_iterator<TIterator>& lhs,
|
||||
typename etlstd::iterator_traits<TIterator>::difference_type /*rhs*/)
|
||||
typename etl::iterator_traits<TIterator>::difference_type /*rhs*/)
|
||||
{
|
||||
return lhs;
|
||||
}
|
||||
@ -200,7 +200,7 @@ namespace etl
|
||||
/// - fixed_iterator operator.
|
||||
//*****************************************************************************
|
||||
template <typename TIterator>
|
||||
typename etlstd::iterator_traits<TIterator>::difference_type operator -(etl::fixed_iterator<TIterator>& lhs,
|
||||
typename etl::iterator_traits<TIterator>::difference_type operator -(etl::fixed_iterator<TIterator>& lhs,
|
||||
etl::fixed_iterator<TIterator>& rhs)
|
||||
{
|
||||
return TIterator(lhs) - TIterator(rhs);
|
||||
|
||||
@ -60,7 +60,7 @@ namespace etl
|
||||
/// Can be used as a reference type for all flat_maps containing a specific type.
|
||||
///\ingroup flat_map
|
||||
//***************************************************************************
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare = etlstd::less<TKey> >
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare = etl::less<TKey> >
|
||||
class iflat_map : private etl::ireference_flat_map<TKey, TMapped, TKeyCompare>
|
||||
{
|
||||
private:
|
||||
@ -87,7 +87,7 @@ namespace etl
|
||||
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
protected:
|
||||
|
||||
@ -232,7 +232,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
mapped_type& operator [](key_parameter_t key)
|
||||
{
|
||||
return insert(ETL_MAKE_PAIR(key, mapped_type())).first->second;
|
||||
return insert(ETL_OR_STD::make_pair(key, mapped_type())).first->second;
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -268,7 +268,7 @@ namespace etl
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first, last);
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_map_full));
|
||||
#endif
|
||||
|
||||
@ -352,7 +352,7 @@ namespace etl
|
||||
// Create it.
|
||||
value_type* pvalue = storage.allocate<value_type>();
|
||||
::new ((void*)etl::addressof(pvalue->first)) key_type(key);
|
||||
::new ((void*)etl::addressof(pvalue->second)) mapped_type(etlstd::forward<Args>(args)...);
|
||||
::new ((void*)etl::addressof(pvalue->second)) mapped_type(etl::forward<Args>(args)...);
|
||||
|
||||
iterator i_element = lower_bound(key);
|
||||
|
||||
@ -793,7 +793,7 @@ namespace etl
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare>
|
||||
bool operator ==(const etl::iflat_map<TKey, TMapped, TKeyCompare>& lhs, const etl::iflat_map<TKey, TMapped, TKeyCompare>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -813,11 +813,11 @@ namespace etl
|
||||
/// A flat_map implementation that uses a fixed size buffer.
|
||||
///\tparam TKey The key type.
|
||||
///\tparam TValue The value type.
|
||||
///\tparam TCompare The type to compare keys. Default = etlstd::less<TKey>
|
||||
///\tparam TCompare The type to compare keys. Default = etl::less<TKey>
|
||||
///\tparam MAX_SIZE_ The maximum number of elements that can be stored.
|
||||
///\ingroup flat_map
|
||||
//***************************************************************************
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = etlstd::less<TKey> >
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = etl::less<TKey> >
|
||||
class flat_map : public etl::iflat_map<TKey, TValue, TCompare>
|
||||
{
|
||||
public:
|
||||
|
||||
@ -59,7 +59,7 @@ namespace etl
|
||||
/// Can be used as a reference type for all flat_multimaps containing a specific type.
|
||||
///\ingroup flat_multimap
|
||||
//***************************************************************************
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare = etlstd::less<TKey> >
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare = etl::less<TKey> >
|
||||
class iflat_multimap : public etl::ireference_flat_multimap<TKey, TMapped, TKeyCompare>
|
||||
{
|
||||
public:
|
||||
@ -88,7 +88,7 @@ namespace etl
|
||||
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
protected:
|
||||
|
||||
@ -237,7 +237,7 @@ namespace etl
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first, last);
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_multimap_full));
|
||||
#endif
|
||||
|
||||
@ -334,7 +334,7 @@ namespace etl
|
||||
// Create it.
|
||||
value_type* pvalue = storage.allocate<value_type>();
|
||||
::new ((void*)etl::addressof(pvalue->first)) key_type(key);
|
||||
::new ((void*)etl::addressof(pvalue->second)) mapped_type(etlstd::forward<Args>(args)...);
|
||||
::new ((void*)etl::addressof(pvalue->second)) mapped_type(etl::forward<Args>(args)...);
|
||||
iterator i_element = lower_bound(key);
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
|
||||
@ -431,7 +431,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t d = etlstd::distance(range.first, range.second);
|
||||
size_t d = etl::distance(range.first, range.second);
|
||||
erase(range.first, range.second);
|
||||
return d;
|
||||
}
|
||||
@ -700,7 +700,7 @@ namespace etl
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare>
|
||||
bool operator ==(const etl::iflat_multimap<TKey, TMapped, TKeyCompare>& lhs, const etl::iflat_multimap<TKey, TMapped, TKeyCompare>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -720,11 +720,11 @@ namespace etl
|
||||
/// A flat_multimap implementation that uses a fixed size buffer.
|
||||
///\tparam TKey The key type.
|
||||
///\tparam TValue The value type.
|
||||
///\tparam TCompare The type to compare keys. Default = etlstd::less<TKey>
|
||||
///\tparam TCompare The type to compare keys. Default = etl::less<TKey>
|
||||
///\tparam MAX_SIZE_ The maximum number of elements that can be stored.
|
||||
///\ingroup flat_multimap
|
||||
//***************************************************************************
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = etlstd::less<TKey> >
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = etl::less<TKey> >
|
||||
class flat_multimap : public etl::iflat_multimap<TKey, TValue, TCompare>
|
||||
{
|
||||
public:
|
||||
|
||||
@ -57,7 +57,7 @@ namespace etl
|
||||
/// Can be used as a reference type for all flat_multisets containing a specific type.
|
||||
///\ingroup flat_multiset
|
||||
//***************************************************************************
|
||||
template <typename T, typename TKeyCompare = etlstd::less<T> >
|
||||
template <typename T, typename TKeyCompare = etl::less<T> >
|
||||
class iflat_multiset : private etl::ireference_flat_multiset<T, TKeyCompare>
|
||||
{
|
||||
private:
|
||||
@ -82,7 +82,7 @@ namespace etl
|
||||
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
protected:
|
||||
|
||||
@ -209,7 +209,7 @@ namespace etl
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first, last);
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_multiset_full));
|
||||
#endif
|
||||
|
||||
@ -232,7 +232,7 @@ namespace etl
|
||||
|
||||
ETL_ASSERT(!full(), ETL_ERROR(flat_multiset_full));
|
||||
|
||||
iterator i_element = etlstd::lower_bound(begin(), end(), value, compare);
|
||||
iterator i_element = etl::lower_bound(begin(), end(), value, compare);
|
||||
|
||||
value_type* pvalue = storage.allocate<value_type>();
|
||||
::new (pvalue) value_type(value);
|
||||
@ -289,7 +289,7 @@ namespace etl
|
||||
|
||||
// Create it.
|
||||
value_type* pvalue = storage.allocate<value_type>();
|
||||
::new (pvalue) value_type(etlstd::forward<Args>(args)...);
|
||||
::new (pvalue) value_type(etl::forward<Args>(args)...);
|
||||
|
||||
iterator i_element = lower_bound(*pvalue);
|
||||
|
||||
@ -385,7 +385,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t d = etlstd::distance(range.first, range.second);
|
||||
size_t d = etl::distance(range.first, range.second);
|
||||
erase(range.first, range.second);
|
||||
return d;
|
||||
}
|
||||
@ -656,7 +656,7 @@ namespace etl
|
||||
template <typename T, typename TKeyCompare>
|
||||
bool operator ==(const etl::iflat_multiset<T, TKeyCompare>& lhs, const etl::iflat_multiset<T, TKeyCompare>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -675,11 +675,11 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// A flat_multiset implementation that uses a fixed size buffer.
|
||||
///\tparam T The value type.
|
||||
///\tparam TCompare The type to compare keys. Default = etlstd::less<T>
|
||||
///\tparam TCompare The type to compare keys. Default = etl::less<T>
|
||||
///\tparam MAX_SIZE_ The maximum number of elements that can be stored.
|
||||
///\ingroup flat_multiset
|
||||
//***************************************************************************
|
||||
template <typename T, const size_t MAX_SIZE_, typename TCompare = etlstd::less<T> >
|
||||
template <typename T, const size_t MAX_SIZE_, typename TCompare = etl::less<T> >
|
||||
class flat_multiset : public etl::iflat_multiset<T, TCompare>
|
||||
{
|
||||
public:
|
||||
|
||||
@ -59,7 +59,7 @@ namespace etl
|
||||
/// Can be used as a reference type for all flat_sets containing a specific type.
|
||||
///\ingroup flat_set
|
||||
//***************************************************************************
|
||||
template <typename T, typename TKeyCompare = etlstd::less<T> >
|
||||
template <typename T, typename TKeyCompare = etl::less<T> >
|
||||
class iflat_set : private etl::ireference_flat_set<T, TKeyCompare>
|
||||
{
|
||||
private:
|
||||
@ -84,7 +84,7 @@ namespace etl
|
||||
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
protected:
|
||||
|
||||
@ -211,7 +211,7 @@ namespace etl
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first, last);
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_set_full));
|
||||
#endif
|
||||
|
||||
@ -296,7 +296,7 @@ namespace etl
|
||||
|
||||
// Create it.
|
||||
value_type* pvalue = storage.allocate<value_type>();
|
||||
::new (pvalue) value_type(etlstd::forward<Args>(args)...);
|
||||
::new (pvalue) value_type(etl::forward<Args>(args)...);
|
||||
|
||||
iterator i_element = lower_bound(*pvalue);
|
||||
|
||||
@ -739,7 +739,7 @@ namespace etl
|
||||
template <typename T, typename TKeyCompare>
|
||||
bool operator ==(const etl::iflat_set<T, TKeyCompare>& lhs, const etl::iflat_set<T, TKeyCompare>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -758,11 +758,11 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// A flat_set implementation that uses a fixed size buffer.
|
||||
///\tparam T The value type.
|
||||
///\tparam TCompare The type to compare keys. Default = etlstd::less<T>
|
||||
///\tparam TCompare The type to compare keys. Default = etl::less<T>
|
||||
///\tparam MAX_SIZE_ The maximum number of elements that can be stored.
|
||||
///\ingroup flat_set
|
||||
//***************************************************************************
|
||||
template <typename T, const size_t MAX_SIZE_, typename TCompare = etlstd::less<T> >
|
||||
template <typename T, const size_t MAX_SIZE_, typename TCompare = etl::less<T> >
|
||||
class flat_set : public etl::iflat_set<T, TCompare>
|
||||
{
|
||||
public:
|
||||
|
||||
@ -572,7 +572,7 @@ namespace etl
|
||||
const node_t* p_node;
|
||||
};
|
||||
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
//*************************************************************************
|
||||
/// Gets the beginning of the forward_list.
|
||||
@ -671,7 +671,7 @@ namespace etl
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first, last);
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(d >= 0, ETL_ERROR(forward_list_iterator));
|
||||
#endif
|
||||
|
||||
@ -735,7 +735,7 @@ namespace etl
|
||||
ETL_ASSERT(!full(), ETL_ERROR(forward_list_full));
|
||||
#endif
|
||||
|
||||
data_node_t& data_node = allocate_data_node(etlstd::move(value));
|
||||
data_node_t& data_node = allocate_data_node(etl::move(value));
|
||||
insert_node_after(start_node, data_node);
|
||||
}
|
||||
#endif
|
||||
@ -751,7 +751,7 @@ namespace etl
|
||||
ETL_ASSERT(!full(), ETL_ERROR(forward_list_full));
|
||||
#endif
|
||||
data_node_t* p_data_node = p_node_pool->allocate<data_node_t>();
|
||||
::new (&(p_data_node->value)) T(etlstd::forward<Args>(args)...);
|
||||
::new (&(p_data_node->value)) T(etl::forward<Args>(args)...);
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
insert_node_after(start_node, *p_data_node);
|
||||
}
|
||||
@ -907,7 +907,7 @@ namespace etl
|
||||
ETL_ASSERT(!full(), ETL_ERROR(forward_list_full));
|
||||
|
||||
data_node_t* p_data_node = p_node_pool->allocate<data_node_t>();
|
||||
::new (&(p_data_node->value)) T(etlstd::forward<Args>(args)...);
|
||||
::new (&(p_data_node->value)) T(etl::forward<Args>(args)...);
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
insert_node_after(*position.p_node, *p_data_node);
|
||||
|
||||
@ -1001,7 +1001,7 @@ namespace etl
|
||||
void insert_after(iterator position, TIterator first, TIterator last)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first, last);
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT((d + size()) <= MAX_SIZE, ETL_ERROR(forward_list_full));
|
||||
#endif
|
||||
|
||||
@ -1141,7 +1141,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void unique()
|
||||
{
|
||||
unique(etlstd::equal_to<T>());
|
||||
unique(etl::equal_to<T>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -1182,7 +1182,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void sort()
|
||||
{
|
||||
sort(etlstd::less<T>());
|
||||
sort(etl::less<T>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -1386,7 +1386,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
iforward_list& operator = (iforward_list&& rhs)
|
||||
{
|
||||
move_container(etlstd::move(rhs));
|
||||
move_container(etl::move(rhs));
|
||||
|
||||
return *this;
|
||||
}
|
||||
@ -1460,7 +1460,7 @@ namespace etl
|
||||
data_node_t& allocate_data_node(rvalue_reference value)
|
||||
{
|
||||
data_node_t* p_node = p_node_pool->allocate<data_node_t>();
|
||||
::new (&(p_node->value)) T(etlstd::move(value));
|
||||
::new (&(p_node->value)) T(etl::move(value));
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
|
||||
return *p_node;
|
||||
@ -1487,7 +1487,7 @@ namespace etl
|
||||
{
|
||||
ETL_ASSERT(!full(), ETL_ERROR(forward_list_full));
|
||||
|
||||
data_node_t& data_node = this->allocate_data_node(etlstd::move(*first++));
|
||||
data_node_t& data_node = this->allocate_data_node(etl::move(*first++));
|
||||
join(p_last_node, &data_node);
|
||||
data_node.next = nullptr;
|
||||
p_last_node = &data_node;
|
||||
@ -1633,7 +1633,7 @@ namespace etl
|
||||
forward_list(forward_list&& other)
|
||||
: etl::iforward_list<T>(node_pool, MAX_SIZE, false)
|
||||
{
|
||||
this->move_container(etlstd::move(other));
|
||||
this->move_container(etl::move(other));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1686,7 +1686,7 @@ namespace etl
|
||||
forward_list& operator = (forward_list&& rhs)
|
||||
{
|
||||
|
||||
this->move_container(etlstd::move(rhs));
|
||||
this->move_container(etl::move(rhs));
|
||||
|
||||
return *this;
|
||||
}
|
||||
@ -1774,7 +1774,7 @@ namespace etl
|
||||
typename etl::iforward_list<T>::iterator itr = other.begin();
|
||||
while (itr != other.end())
|
||||
{
|
||||
this->push_back(etlstd::move(*itr));
|
||||
this->push_back(etl::move(*itr));
|
||||
++itr;
|
||||
}
|
||||
|
||||
@ -1831,7 +1831,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
forward_list& operator = (forward_list&& rhs)
|
||||
{
|
||||
this->move_container(etlstd::move(rhs));
|
||||
this->move_container(etl::move(rhs));
|
||||
|
||||
return *this;
|
||||
}
|
||||
@ -1862,7 +1862,7 @@ namespace etl
|
||||
bool operator ==(const etl::iforward_list<T>& lhs, const etl::iforward_list<T>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) &&
|
||||
etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -1887,7 +1887,7 @@ namespace etl
|
||||
template <typename T>
|
||||
bool operator <(const etl::iforward_list<T>& lhs, const etl::iforward_list<T>& rhs)
|
||||
{
|
||||
return etlstd::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -56,7 +56,7 @@ namespace etl
|
||||
typedef TPolicy policy_type;
|
||||
typedef typename policy_type::value_type value_type;
|
||||
|
||||
ETL_STATIC_ASSERT(etlstd::is_unsigned<value_type>::value, "Signed frame check type not supported");
|
||||
ETL_STATIC_ASSERT(etl::is_unsigned<value_type>::value, "Signed frame check type not supported");
|
||||
|
||||
//*************************************************************************
|
||||
/// Default constructor.
|
||||
@ -74,7 +74,7 @@ namespace etl
|
||||
template<typename TIterator>
|
||||
frame_check_sequence(TIterator begin, const TIterator end)
|
||||
{
|
||||
ETL_STATIC_ASSERT(sizeof(typename etlstd::iterator_traits<TIterator>::value_type) == 1, "Type not supported");
|
||||
ETL_STATIC_ASSERT(sizeof(typename etl::iterator_traits<TIterator>::value_type) == 1, "Type not supported");
|
||||
|
||||
reset();
|
||||
add(begin, end);
|
||||
@ -96,7 +96,7 @@ namespace etl
|
||||
template<typename TIterator>
|
||||
void add(TIterator begin, const TIterator end)
|
||||
{
|
||||
ETL_STATIC_ASSERT(sizeof(typename etlstd::iterator_traits<TIterator>::value_type) == 1, "Type not supported");
|
||||
ETL_STATIC_ASSERT(sizeof(typename etl::iterator_traits<TIterator>::value_type) == 1, "Type not supported");
|
||||
|
||||
while (begin != end)
|
||||
{
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
///\defgroup reference_wrapper reference_wrapper
|
||||
///\ingroup functional
|
||||
|
||||
namespace etlstd
|
||||
namespace etl
|
||||
{
|
||||
//***************************************************************************
|
||||
/// A definition of reference_wrapper for those that don't have C++ 0x11 support.
|
||||
@ -110,6 +110,8 @@ namespace etlstd
|
||||
template <typename T = void>
|
||||
struct less
|
||||
{
|
||||
typedef T value_type;
|
||||
|
||||
ETL_CONSTEXPR bool operator()(const T &lhs, const T &rhs) const
|
||||
{
|
||||
return lhs < rhs;
|
||||
@ -120,6 +122,8 @@ namespace etlstd
|
||||
template <typename T = void>
|
||||
struct greater
|
||||
{
|
||||
typedef T value_type;
|
||||
|
||||
ETL_CONSTEXPR bool operator()(const T &lhs, const T &rhs) const
|
||||
{
|
||||
return lhs > rhs;
|
||||
@ -130,6 +134,8 @@ namespace etlstd
|
||||
template <typename T = void>
|
||||
struct equal_to
|
||||
{
|
||||
typedef T value_type;
|
||||
|
||||
ETL_CONSTEXPR bool operator()(const T &lhs, const T &rhs) const
|
||||
{
|
||||
return lhs == rhs;
|
||||
@ -140,6 +146,8 @@ namespace etlstd
|
||||
template <typename T = void>
|
||||
struct not_equal_to
|
||||
{
|
||||
typedef T value_type;
|
||||
|
||||
ETL_CONSTEXPR bool operator()(const T &lhs, const T &rhs) const
|
||||
{
|
||||
return lhs != rhs;
|
||||
@ -168,7 +176,7 @@ namespace etlstd
|
||||
//***************************************************************************
|
||||
|
||||
template <typename TFunction>
|
||||
class binder1st : public etlstd::unary_function<typename TFunction::second_argument_type, typename TFunction::result_type>
|
||||
class binder1st : public etl::unary_function<typename TFunction::second_argument_type, typename TFunction::result_type>
|
||||
{
|
||||
protected:
|
||||
|
||||
@ -202,7 +210,7 @@ namespace etlstd
|
||||
//***************************************************************************
|
||||
|
||||
template <typename TFunction >
|
||||
class binder2nd : public etlstd::unary_function<typename TFunction::first_argument_type, typename TFunction::result_type>
|
||||
class binder2nd : public etl::unary_function<typename TFunction::first_argument_type, typename TFunction::result_type>
|
||||
{
|
||||
protected:
|
||||
TFunction operation;
|
||||
|
||||
@ -1 +1 @@
|
||||
python -m cogapp -d -e -otype_traits.h -DIsOneOf=17 type_traits_generator.h
|
||||
python -m cogapp -d -e -otype_traits.h -DIsOneOf=16 type_traits_generator.h
|
||||
|
||||
@ -716,10 +716,10 @@ namespace etl
|
||||
template <typename TIterator>
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
ETL_STATIC_ASSERT((etlstd::is_same<typename etlstd::remove_cv<T>::type, typename etlstd::remove_cv<typename etlstd::iterator_traits<TIterator>::value_type>::type>::value), "Iterator type does not match container type");
|
||||
ETL_STATIC_ASSERT((etl::is_same<typename etl::remove_cv<T>::type, typename etl::remove_cv<typename etl::iterator_traits<TIterator>::value_type>::type>::value), "Iterator type does not match container type");
|
||||
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first, last);
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(static_cast<size_t>(d) <= capacity(), ETL_ERROR(vector_full));
|
||||
#endif
|
||||
|
||||
@ -785,7 +785,7 @@ namespace etl
|
||||
#if defined(ETL_CHECK_PUSH_POP)
|
||||
ETL_ASSERT(size() != capacity(), ETL_ERROR(vector_full));
|
||||
#endif
|
||||
T* p = storage.create<T>(etlstd::move(value));
|
||||
T* p = storage.create<T>(etl::move(value));
|
||||
lookup.push_back(p);
|
||||
}
|
||||
#endif
|
||||
@ -799,7 +799,7 @@ namespace etl
|
||||
template <typename ... Args>
|
||||
void emplace_back(Args && ... args)
|
||||
{
|
||||
T* p = storage.create<T>(etlstd::forward<Args>(args)...);
|
||||
T* p = storage.create<T>(etl::forward<Args>(args)...);
|
||||
lookup.push_back(p);
|
||||
}
|
||||
#else
|
||||
@ -891,7 +891,7 @@ namespace etl
|
||||
{
|
||||
ETL_ASSERT(size() + 1 <= capacity(), ETL_ERROR(vector_full));
|
||||
|
||||
T* p = storage.create<T>(T(etlstd::move(value)));
|
||||
T* p = storage.create<T>(T(etl::move(value)));
|
||||
position = iterator(lookup.insert(position.lookup_itr, p));
|
||||
|
||||
return position;
|
||||
@ -907,7 +907,7 @@ namespace etl
|
||||
{
|
||||
ETL_ASSERT(!full(), ETL_ERROR(vector_full));
|
||||
|
||||
T* p = storage.create<T>(T(etlstd::forward<Args>(args)...));
|
||||
T* p = storage.create<T>(T(etl::forward<Args>(args)...));
|
||||
position = iterator(lookup.insert(position.lookup_itr, p));
|
||||
|
||||
return position;
|
||||
@ -990,7 +990,7 @@ namespace etl
|
||||
template <class TIterator>
|
||||
void insert(iterator position, TIterator first, TIterator last)
|
||||
{
|
||||
size_t count = size_t(etlstd::distance(first, last));
|
||||
size_t count = size_t(etl::distance(first, last));
|
||||
|
||||
ETL_ASSERT((size() + count) <= capacity(), ETL_ERROR(vector_full));
|
||||
|
||||
@ -1066,7 +1066,7 @@ namespace etl
|
||||
iterator itr = rhs.begin();
|
||||
while (itr != rhs.end())
|
||||
{
|
||||
push_back(etlstd::move(*itr));
|
||||
push_back(etl::move(*itr));
|
||||
++itr;
|
||||
}
|
||||
|
||||
@ -1171,7 +1171,7 @@ namespace etl
|
||||
|
||||
while (itr != other.end())
|
||||
{
|
||||
push_back(etlstd::move(*itr));
|
||||
push_back(etl::move(*itr));
|
||||
++itr;
|
||||
}
|
||||
|
||||
@ -1212,7 +1212,7 @@ namespace etl
|
||||
template <typename T>
|
||||
bool operator ==(const etl::iindirect_vector<T>& lhs, const etl::iindirect_vector<T>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -1238,7 +1238,7 @@ namespace etl
|
||||
template <typename T>
|
||||
bool operator <(const etl::iindirect_vector<T>& lhs, const etl::iindirect_vector<T>& rhs)
|
||||
{
|
||||
return etlstd::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -1375,7 +1375,7 @@ namespace etl
|
||||
indirect_vector(indirect_vector&& other)
|
||||
: etl::iindirect_vector<T>(lookup_vector, storage_pool)
|
||||
{
|
||||
this->move_container(etlstd::move(other));
|
||||
this->move_container(etl::move(other));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -1383,7 +1383,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
indirect_vector& operator = (indirect_vector&& rhs)
|
||||
{
|
||||
this->move_container(etlstd::move(rhs));
|
||||
this->move_container(etl::move(rhs));
|
||||
|
||||
return *this;
|
||||
}
|
||||
@ -1503,7 +1503,7 @@ namespace etl
|
||||
: etl::iindirect_vector<T>(lookup_, pool_)
|
||||
{
|
||||
ETL_ASSERT(lookup_.capacity() <= pool_.capacity(), ETL_ERROR(indirect_vector_buffer_missmatch));
|
||||
this->move_container(etlstd::move(other));
|
||||
this->move_container(etl::move(other));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -1511,7 +1511,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
indirect_vector& operator = (indirect_vector&& rhs)
|
||||
{
|
||||
this->move_container(etlstd::move(rhs));
|
||||
this->move_container(etl::move(rhs));
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -31,7 +31,6 @@ SOFTWARE.
|
||||
#ifndef ETL_INTEGRAL_LIMITS_INCLUDED
|
||||
#define ETL_INTEGRAL_LIMITS_INCLUDED
|
||||
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "platform.h"
|
||||
@ -74,7 +73,7 @@ namespace etl
|
||||
static const signed char min = SCHAR_MIN;
|
||||
static const signed char max = SCHAR_MAX;
|
||||
static const int bits = CHAR_BIT;
|
||||
static const bool is_signed = etlstd::is_signed<signed char>::value;
|
||||
static const bool is_signed = etl::is_signed<signed char>::value;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
@ -86,7 +85,7 @@ namespace etl
|
||||
static const unsigned char min = 0;
|
||||
static const unsigned char max = UCHAR_MAX;
|
||||
static const int bits = CHAR_BIT;
|
||||
static const bool is_signed = etlstd::is_signed<unsigned char>::value;
|
||||
static const bool is_signed = etl::is_signed<unsigned char>::value;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
@ -95,10 +94,10 @@ namespace etl
|
||||
template <>
|
||||
struct integral_limits<char>
|
||||
{
|
||||
static const char min = (etlstd::is_signed<char>::value) ? SCHAR_MIN : 0;
|
||||
static const char max = (etlstd::is_signed<char>::value) ? SCHAR_MAX : char(UCHAR_MAX);
|
||||
static const char min = (etl::is_signed<char>::value) ? SCHAR_MIN : 0;
|
||||
static const char max = (etl::is_signed<char>::value) ? SCHAR_MAX : char(UCHAR_MAX);
|
||||
static const int bits = CHAR_BIT;
|
||||
static const bool is_signed = etlstd::is_signed<char>::value;
|
||||
static const bool is_signed = etl::is_signed<char>::value;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
@ -110,7 +109,7 @@ namespace etl
|
||||
static const short min = SHRT_MIN;
|
||||
static const short max = SHRT_MAX;
|
||||
static const int bits = CHAR_BIT * (sizeof(short) / sizeof(char));
|
||||
static const bool is_signed = etlstd::is_signed<short>::value;
|
||||
static const bool is_signed = etl::is_signed<short>::value;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
@ -122,7 +121,7 @@ namespace etl
|
||||
static const unsigned short min = 0;
|
||||
static const unsigned short max = USHRT_MAX;
|
||||
static const int bits = CHAR_BIT * (sizeof(unsigned short) / sizeof(char));
|
||||
static const bool is_signed = etlstd::is_signed<unsigned short>::value;
|
||||
static const bool is_signed = etl::is_signed<unsigned short>::value;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
@ -134,7 +133,7 @@ namespace etl
|
||||
static const int min = INT_MIN;
|
||||
static const int max = INT_MAX;
|
||||
static const int bits = CHAR_BIT * (sizeof(int) / sizeof(char));
|
||||
static const bool is_signed = etlstd::is_signed<int>::value;
|
||||
static const bool is_signed = etl::is_signed<int>::value;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
@ -146,7 +145,7 @@ namespace etl
|
||||
static const unsigned int min = 0;
|
||||
static const unsigned int max = UINT_MAX;
|
||||
static const int bits = CHAR_BIT * (sizeof(unsigned int) / sizeof(char));
|
||||
static const bool is_signed = etlstd::is_signed<unsigned int>::value;
|
||||
static const bool is_signed = etl::is_signed<unsigned int>::value;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
@ -158,7 +157,7 @@ namespace etl
|
||||
static const long min = LONG_MIN;
|
||||
static const long max = LONG_MAX;
|
||||
static const int bits = CHAR_BIT * (sizeof(long) / sizeof(char));
|
||||
static const bool is_signed = etlstd::is_signed<long>::value;
|
||||
static const bool is_signed = etl::is_signed<long>::value;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
@ -170,7 +169,7 @@ namespace etl
|
||||
static const unsigned long min = 0;
|
||||
static const unsigned long max = ULONG_MAX;
|
||||
static const int bits = CHAR_BIT * (sizeof(unsigned long) / sizeof(char));
|
||||
static const bool is_signed = etlstd::is_signed<unsigned long>::value;
|
||||
static const bool is_signed = etl::is_signed<unsigned long>::value;
|
||||
};
|
||||
|
||||
#ifndef LLONG_MAX
|
||||
@ -194,7 +193,7 @@ namespace etl
|
||||
static const long long min = LLONG_MIN;
|
||||
static const long long max = LLONG_MAX;
|
||||
static const int bits = CHAR_BIT * (sizeof(long long) / sizeof(char));
|
||||
static const bool is_signed = etlstd::is_signed<long long>::value;
|
||||
static const bool is_signed = etl::is_signed<long long>::value;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
@ -206,7 +205,7 @@ namespace etl
|
||||
static const unsigned long long min = 0;
|
||||
static const unsigned long long max = ULLONG_MAX;
|
||||
static const int bits = CHAR_BIT * (sizeof(unsigned long long) / sizeof(char));
|
||||
static const bool is_signed = etlstd::is_signed<unsigned long long>::value;
|
||||
static const bool is_signed = etl::is_signed<unsigned long long>::value;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -153,7 +153,7 @@ namespace etl
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
intmax_t d = etlstd::distance(first, last);
|
||||
intmax_t d = etl::distance(first, last);
|
||||
ETL_ASSERT(d >= 0, ETL_ERROR(intrusive_forward_list_iterator_exception));
|
||||
#endif
|
||||
|
||||
@ -495,7 +495,7 @@ namespace etl
|
||||
const value_type* p_value;
|
||||
};
|
||||
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
//*************************************************************************
|
||||
/// Constructor.
|
||||
@ -651,7 +651,7 @@ namespace etl
|
||||
{
|
||||
if (first != end() && (first != last))
|
||||
{
|
||||
this->current_size -= etlstd::distance(first, last) - 1;
|
||||
this->current_size -= etl::distance(first, last) - 1;
|
||||
|
||||
link_type* p_first = first.p_value;
|
||||
link_type* p_last = last.p_value;
|
||||
@ -712,7 +712,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void sort()
|
||||
{
|
||||
sort(etlstd::less<value_type>());
|
||||
sort(etl::less<value_type>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -958,7 +958,7 @@ namespace etl
|
||||
{
|
||||
if (&other != this)
|
||||
{
|
||||
size_t n = etlstd::distance(begin_, end_) - 1;
|
||||
size_t n = etl::distance(begin_, end_) - 1;
|
||||
this->current_size += n;
|
||||
other.current_size -= n;
|
||||
}
|
||||
@ -987,7 +987,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void merge(list_type& other)
|
||||
{
|
||||
merge(other, etlstd::less<value_type>());
|
||||
merge(other, etl::less<value_type>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -110,7 +110,7 @@ namespace etl
|
||||
|
||||
// Reference, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
link(TLink& lhs, TLink& rhs)
|
||||
{
|
||||
lhs.etl_next = &rhs;
|
||||
@ -118,7 +118,7 @@ namespace etl
|
||||
|
||||
// Reference, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
link_splice(TLink& lhs, TLink& rhs)
|
||||
{
|
||||
rhs.etl_next = lhs.etl_next;
|
||||
@ -127,7 +127,7 @@ namespace etl
|
||||
|
||||
// Pointer, Pointer
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
link(TLink* lhs, TLink* rhs)
|
||||
{
|
||||
if (lhs != nullptr)
|
||||
@ -138,7 +138,7 @@ namespace etl
|
||||
|
||||
// Pointer, Pointer
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
link_splice(TLink* lhs, TLink* rhs)
|
||||
{
|
||||
if (lhs != nullptr)
|
||||
@ -154,7 +154,7 @@ namespace etl
|
||||
|
||||
// Reference, Pointer
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
link(TLink& lhs, TLink* rhs)
|
||||
{
|
||||
lhs.etl_next = rhs;
|
||||
@ -162,7 +162,7 @@ namespace etl
|
||||
|
||||
// Reference, Pointer
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
link_splice(TLink& lhs, TLink* rhs)
|
||||
{
|
||||
if (rhs != nullptr)
|
||||
@ -175,7 +175,7 @@ namespace etl
|
||||
|
||||
// Pointer, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
link(TLink* lhs, TLink& rhs)
|
||||
{
|
||||
if (lhs != nullptr)
|
||||
@ -186,7 +186,7 @@ namespace etl
|
||||
|
||||
// Pointer, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
link_splice(TLink* lhs, TLink& rhs)
|
||||
{
|
||||
if (lhs != nullptr)
|
||||
@ -198,7 +198,7 @@ namespace etl
|
||||
|
||||
// Reference, Reference, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
link_splice(TLink& lhs, TLink& first, TLink& last)
|
||||
{
|
||||
last.etl_next = lhs.etl_next;
|
||||
@ -207,7 +207,7 @@ namespace etl
|
||||
|
||||
// Pointer, Reference, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
link_splice(TLink* lhs, TLink& first, TLink& last)
|
||||
{
|
||||
if (lhs != nullptr)
|
||||
@ -223,7 +223,7 @@ namespace etl
|
||||
|
||||
// Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
unlink_after(TLink& node)
|
||||
{
|
||||
if (node.etl_next != nullptr)
|
||||
@ -235,7 +235,7 @@ namespace etl
|
||||
|
||||
// Reference, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::forward_link<TLink::ID> >::value, void>::type
|
||||
unlink_after(TLink& before, TLink& last)
|
||||
{
|
||||
before.etl_next = last.etl_next;
|
||||
@ -265,11 +265,7 @@ namespace etl
|
||||
|
||||
void reverse()
|
||||
{
|
||||
#if defined(ETL_NO_STL)
|
||||
using etlstd::swap;
|
||||
#else
|
||||
using std::swap;
|
||||
#endif
|
||||
using ETL_OR_STD::swap; // Allow ADL
|
||||
|
||||
swap(etl_previous, etl_next);
|
||||
}
|
||||
@ -295,7 +291,7 @@ namespace etl
|
||||
|
||||
// Reference, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
link(TLink& lhs, TLink& rhs)
|
||||
{
|
||||
lhs.etl_next = &rhs;
|
||||
@ -304,7 +300,7 @@ namespace etl
|
||||
|
||||
// Reference, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
link_splice(TLink& lhs, TLink& rhs)
|
||||
{
|
||||
rhs.etl_next = lhs.etl_next;
|
||||
@ -320,7 +316,7 @@ namespace etl
|
||||
|
||||
// Pointer, Pointer
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
link(TLink* lhs, TLink* rhs)
|
||||
{
|
||||
if (lhs != nullptr)
|
||||
@ -336,7 +332,7 @@ namespace etl
|
||||
|
||||
// Pointer, Pointer
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
link_splice(TLink* lhs, TLink* rhs)
|
||||
{
|
||||
if (rhs != nullptr)
|
||||
@ -362,7 +358,7 @@ namespace etl
|
||||
|
||||
// Reference, Pointer
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
link(TLink& lhs, TLink* rhs)
|
||||
{
|
||||
lhs.etl_next = rhs;
|
||||
@ -375,7 +371,7 @@ namespace etl
|
||||
|
||||
// Reference, Pointer
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
link_splice(TLink& lhs, TLink* rhs)
|
||||
{
|
||||
if (rhs != nullptr)
|
||||
@ -394,7 +390,7 @@ namespace etl
|
||||
|
||||
// Pointer, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
link(TLink* lhs, TLink& rhs)
|
||||
{
|
||||
if (lhs != nullptr)
|
||||
@ -407,7 +403,7 @@ namespace etl
|
||||
|
||||
// Pointer, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
link_splice(TLink* lhs, TLink& rhs)
|
||||
{
|
||||
if (lhs != nullptr)
|
||||
@ -430,7 +426,7 @@ namespace etl
|
||||
|
||||
// Reference, Reference, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
link_splice(TLink& lhs, TLink& first, TLink& last)
|
||||
{
|
||||
last.etl_next = lhs.etl_next;
|
||||
@ -446,7 +442,7 @@ namespace etl
|
||||
|
||||
// Pointer, Reference, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
link_splice(TLink* lhs, TLink& first, TLink& last)
|
||||
{
|
||||
if (lhs != nullptr)
|
||||
@ -473,7 +469,7 @@ namespace etl
|
||||
|
||||
// Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
unlink(TLink& node)
|
||||
{
|
||||
node.unlink();
|
||||
@ -481,7 +477,7 @@ namespace etl
|
||||
|
||||
// Reference Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::bidirectional_link<TLink::ID> >::value, void>::type
|
||||
unlink(TLink& first, TLink& last)
|
||||
{
|
||||
if (&first == &last)
|
||||
@ -532,7 +528,7 @@ namespace etl
|
||||
|
||||
// Reference, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_left(TLink& parent, TLink& leaf)
|
||||
{
|
||||
parent.etl_left = &leaf;
|
||||
@ -540,7 +536,7 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_right(TLink& parent, TLink& leaf)
|
||||
{
|
||||
parent.etl_right = &leaf;
|
||||
@ -549,7 +545,7 @@ namespace etl
|
||||
|
||||
// Pointer, Pointer
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_left(TLink* parent, TLink* leaf)
|
||||
{
|
||||
if (parent != nullptr)
|
||||
@ -564,7 +560,7 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_right(TLink* parent, TLink* leaf)
|
||||
{
|
||||
if (parent != nullptr)
|
||||
@ -580,7 +576,7 @@ namespace etl
|
||||
|
||||
// Reference, Pointer
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_left(TLink& parent, TLink* leaf)
|
||||
{
|
||||
parent.etl_left = leaf;
|
||||
@ -592,7 +588,7 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_right(TLink& parent, TLink* leaf)
|
||||
{
|
||||
parent.etl_right = leaf;
|
||||
@ -605,7 +601,7 @@ namespace etl
|
||||
|
||||
// Pointer, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_left(TLink* parent, TLink& leaf)
|
||||
{
|
||||
if (parent != nullptr)
|
||||
@ -617,7 +613,7 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_right(TLink* parent, TLink& leaf)
|
||||
{
|
||||
if (parent != nullptr)
|
||||
@ -630,7 +626,7 @@ namespace etl
|
||||
|
||||
// Reference, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_rotate_left(TLink& parent, TLink& leaf)
|
||||
{
|
||||
parent.etl_right = leaf.etl_left;
|
||||
@ -646,7 +642,7 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_rotate_right(TLink& parent, TLink& leaf)
|
||||
{
|
||||
parent.etl_left = leaf.etl_right;
|
||||
@ -663,7 +659,7 @@ namespace etl
|
||||
|
||||
// Pointer, Pointer
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_rotate_left(TLink* parent, TLink* leaf)
|
||||
{
|
||||
if ((parent != nullptr) && (leaf != nullptr))
|
||||
@ -673,7 +669,7 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_rotate_right(TLink* parent, TLink* leaf)
|
||||
{
|
||||
if ((parent != nullptr) && (leaf != nullptr))
|
||||
@ -684,7 +680,7 @@ namespace etl
|
||||
|
||||
// Reference, Pointer
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_rotate_left(TLink& parent, TLink* leaf)
|
||||
{
|
||||
if (leaf != nullptr)
|
||||
@ -694,7 +690,7 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_rotate_right(TLink& parent, TLink* leaf)
|
||||
{
|
||||
if (leaf != nullptr)
|
||||
@ -705,7 +701,7 @@ namespace etl
|
||||
|
||||
// Pointer, Reference
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_rotate_left(TLink* parent, TLink& leaf)
|
||||
{
|
||||
if (parent != nullptr)
|
||||
@ -715,7 +711,7 @@ namespace etl
|
||||
}
|
||||
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_rotate_right(TLink* parent, TLink& leaf)
|
||||
{
|
||||
if (parent != nullptr)
|
||||
@ -727,7 +723,7 @@ namespace etl
|
||||
// Reference, Reference
|
||||
/// Automatically detects whether a left or right rotate is expected.
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_rotate(TLink& parent, TLink& leaf)
|
||||
{
|
||||
if (parent.etl_left == &leaf)
|
||||
@ -743,7 +739,7 @@ namespace etl
|
||||
// Pointer, Pointer
|
||||
/// Automatically detects whether a left or right rotate is expected.
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_rotate(TLink* parent, TLink* leaf)
|
||||
{
|
||||
if ((parent != nullptr) && (leaf != nullptr))
|
||||
@ -762,7 +758,7 @@ namespace etl
|
||||
// Reference, Pointer
|
||||
/// Automatically detects whether a left or right rotate is expected.
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_rotate(TLink& parent, TLink* leaf)
|
||||
{
|
||||
if (leaf != nullptr)
|
||||
@ -781,7 +777,7 @@ namespace etl
|
||||
// Pointer, Reference
|
||||
/// Automatically detects whether a left or right rotate is expected.
|
||||
template <typename TLink>
|
||||
typename etlstd::enable_if<etlstd::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
typename etl::enable_if<etl::is_same<TLink, etl::tree_link<TLink::ID> >::value, void>::type
|
||||
link_rotate(TLink* parent, TLink& leaf)
|
||||
{
|
||||
if (parent != nullptr)
|
||||
|
||||
@ -133,7 +133,7 @@ namespace etl
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
intmax_t d = etlstd::distance(first, last);
|
||||
intmax_t d = etl::distance(first, last);
|
||||
ETL_ASSERT(d >= 0, ETL_ERROR(intrusive_list_iterator_exception));
|
||||
#endif
|
||||
|
||||
@ -580,7 +580,7 @@ namespace etl
|
||||
const value_type* p_value;
|
||||
};
|
||||
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
//*************************************************************************
|
||||
/// Constructor.
|
||||
@ -734,7 +734,7 @@ namespace etl
|
||||
// Join the ends.
|
||||
etl::link<link_type>(p_first->etl_previous, p_last);
|
||||
|
||||
this->current_size -= etlstd::distance(first, last);
|
||||
this->current_size -= etl::distance(first, last);
|
||||
|
||||
if (p_last == &this->terminal_link)
|
||||
{
|
||||
@ -781,7 +781,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void sort()
|
||||
{
|
||||
sort(etlstd::less<value_type>());
|
||||
sort(etl::less<value_type>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -1013,7 +1013,7 @@ namespace etl
|
||||
{
|
||||
if (&other != this)
|
||||
{
|
||||
size_t n = etlstd::distance(begin_, end_);
|
||||
size_t n = etl::distance(begin_, end_);
|
||||
this->current_size += n;
|
||||
other.current_size -= n;
|
||||
}
|
||||
@ -1036,7 +1036,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void merge(list_type& other)
|
||||
{
|
||||
merge(other, etlstd::less<value_type>());
|
||||
merge(other, etl::less<value_type>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -41,7 +41,7 @@ SOFTWARE.
|
||||
///\defgroup iterator iterator
|
||||
///\ingroup utilities
|
||||
|
||||
namespace etlstd
|
||||
namespace etl
|
||||
{
|
||||
//***************************************************************************
|
||||
// iterator tags
|
||||
@ -133,7 +133,7 @@ namespace etlstd
|
||||
template <typename TIterator, typename TDistance>
|
||||
ETL_CONSTEXPR17 void advance(TIterator& itr, TDistance n)
|
||||
{
|
||||
typedef typename etlstd::iterator_traits<TIterator>::iterator_category tag;
|
||||
typedef typename etl::iterator_traits<TIterator>::iterator_category tag;
|
||||
|
||||
advance_helper(itr, n, tag());
|
||||
}
|
||||
@ -152,9 +152,9 @@ namespace etlstd
|
||||
// distance
|
||||
#if defined(ETL_NO_STL)
|
||||
template<typename TIterator>
|
||||
ETL_CONSTEXPR17 typename etlstd::iterator_traits<TIterator>::difference_type distance_helper(TIterator first, TIterator last, ETL_OR_STD::input_iterator_tag)
|
||||
ETL_CONSTEXPR17 typename etl::iterator_traits<TIterator>::difference_type distance_helper(TIterator first, TIterator last, ETL_OR_STD::input_iterator_tag)
|
||||
{
|
||||
typename etlstd::iterator_traits<TIterator>::difference_type d = 0;
|
||||
typename etl::iterator_traits<TIterator>::difference_type d = 0;
|
||||
|
||||
while (first != last)
|
||||
{
|
||||
@ -166,9 +166,9 @@ namespace etlstd
|
||||
}
|
||||
|
||||
template<typename TIterator>
|
||||
ETL_CONSTEXPR17 typename etlstd::iterator_traits<TIterator>::difference_type distance_helper(TIterator first, TIterator last, ETL_OR_STD::forward_iterator_tag)
|
||||
ETL_CONSTEXPR17 typename etl::iterator_traits<TIterator>::difference_type distance_helper(TIterator first, TIterator last, ETL_OR_STD::forward_iterator_tag)
|
||||
{
|
||||
typename etlstd::iterator_traits<TIterator>::difference_type d = 0;
|
||||
typename etl::iterator_traits<TIterator>::difference_type d = 0;
|
||||
|
||||
while (first != last)
|
||||
{
|
||||
@ -180,9 +180,9 @@ namespace etlstd
|
||||
}
|
||||
|
||||
template<typename TIterator>
|
||||
ETL_CONSTEXPR17 typename etlstd::iterator_traits<TIterator>::difference_type distance_helper(TIterator first, TIterator last, ETL_OR_STD::bidirectional_iterator_tag)
|
||||
ETL_CONSTEXPR17 typename etl::iterator_traits<TIterator>::difference_type distance_helper(TIterator first, TIterator last, ETL_OR_STD::bidirectional_iterator_tag)
|
||||
{
|
||||
typename etlstd::iterator_traits<TIterator>::difference_type d = 0;
|
||||
typename etl::iterator_traits<TIterator>::difference_type d = 0;
|
||||
|
||||
while (first != last)
|
||||
{
|
||||
@ -194,15 +194,15 @@ namespace etlstd
|
||||
}
|
||||
|
||||
template<typename TIterator>
|
||||
ETL_CONSTEXPR17 typename etlstd::iterator_traits<TIterator>::difference_type distance_helper(TIterator first, TIterator last, ETL_OR_STD::random_access_iterator_tag)
|
||||
ETL_CONSTEXPR17 typename etl::iterator_traits<TIterator>::difference_type distance_helper(TIterator first, TIterator last, ETL_OR_STD::random_access_iterator_tag)
|
||||
{
|
||||
return last - first;
|
||||
}
|
||||
|
||||
template<typename TIterator>
|
||||
ETL_CONSTEXPR17 typename etlstd::iterator_traits<TIterator>::difference_type distance(TIterator first, TIterator last)
|
||||
ETL_CONSTEXPR17 typename etl::iterator_traits<TIterator>::difference_type distance(TIterator first, TIterator last)
|
||||
{
|
||||
typedef typename etlstd::iterator_traits<TIterator>::iterator_category tag;
|
||||
typedef typename etl::iterator_traits<TIterator>::iterator_category tag;
|
||||
|
||||
return distance_helper(first, last, tag());
|
||||
}
|
||||
@ -220,10 +220,10 @@ namespace etlstd
|
||||
//***************************************************************************
|
||||
// Previous
|
||||
template<typename TIterator>
|
||||
ETL_CONSTEXPR17 TIterator prev(TIterator itr, typename etlstd::iterator_traits<TIterator>::difference_type n = 1)
|
||||
ETL_CONSTEXPR17 TIterator prev(TIterator itr, typename etl::iterator_traits<TIterator>::difference_type n = 1)
|
||||
{
|
||||
#if defined(ETL_NO_STL) || !ETL_CPP11_SUPPORTED
|
||||
etlstd::advance(itr, -n);
|
||||
etl::advance(itr, -n);
|
||||
#else
|
||||
std::advance(itr, -n);
|
||||
#endif
|
||||
@ -233,10 +233,10 @@ namespace etlstd
|
||||
//***************************************************************************
|
||||
// Next
|
||||
template<typename TIterator>
|
||||
ETL_CONSTEXPR17 TIterator next(TIterator itr, typename etlstd::iterator_traits<TIterator>::difference_type n = 1)
|
||||
ETL_CONSTEXPR17 TIterator next(TIterator itr, typename etl::iterator_traits<TIterator>::difference_type n = 1)
|
||||
{
|
||||
#if defined(ETL_NO_STL) || !ETL_CPP11_SUPPORTED
|
||||
etlstd::advance(itr, n);
|
||||
etl::advance(itr, n);
|
||||
#else
|
||||
std::advance(itr, n);
|
||||
#endif
|
||||
@ -436,31 +436,31 @@ namespace etl
|
||||
template <typename T>
|
||||
struct is_input_iterator
|
||||
{
|
||||
static ETL_CONST_OR_CONSTEXPR bool value = etlstd::is_same<typename etlstd::iterator_traits<T>::iterator_category, ETL_OR_STD::input_iterator_tag>::value;
|
||||
static ETL_CONST_OR_CONSTEXPR bool value = etl::is_same<typename etl::iterator_traits<T>::iterator_category, ETL_OR_STD::input_iterator_tag>::value;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct is_output_iterator
|
||||
{
|
||||
static ETL_CONST_OR_CONSTEXPR bool value = etlstd::is_same<typename etlstd::iterator_traits<T>::iterator_category, ETL_OR_STD::output_iterator_tag>::value;
|
||||
static ETL_CONST_OR_CONSTEXPR bool value = etl::is_same<typename etl::iterator_traits<T>::iterator_category, ETL_OR_STD::output_iterator_tag>::value;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct is_forward_iterator
|
||||
{
|
||||
static ETL_CONST_OR_CONSTEXPR bool value = etlstd::is_same<typename etlstd::iterator_traits<T>::iterator_category, ETL_OR_STD::forward_iterator_tag>::value;
|
||||
static ETL_CONST_OR_CONSTEXPR bool value = etl::is_same<typename etl::iterator_traits<T>::iterator_category, ETL_OR_STD::forward_iterator_tag>::value;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct is_bidirectional_iterator
|
||||
{
|
||||
static ETL_CONST_OR_CONSTEXPR bool value = etlstd::is_same<typename etlstd::iterator_traits<T>::iterator_category, ETL_OR_STD::bidirectional_iterator_tag>::value;
|
||||
static ETL_CONST_OR_CONSTEXPR bool value = etl::is_same<typename etl::iterator_traits<T>::iterator_category, ETL_OR_STD::bidirectional_iterator_tag>::value;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct is_random_iterator
|
||||
{
|
||||
static ETL_CONST_OR_CONSTEXPR bool value = etlstd::is_same<typename etlstd::iterator_traits<T>::iterator_category, ETL_OR_STD::random_access_iterator_tag>::value;
|
||||
static ETL_CONST_OR_CONSTEXPR bool value = etl::is_same<typename etl::iterator_traits<T>::iterator_category, ETL_OR_STD::random_access_iterator_tag>::value;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
||||
@ -82,7 +82,7 @@ namespace etl
|
||||
|
||||
// Set 'type' to be the largest of the first parameter and any of the others.
|
||||
// This is recursive.
|
||||
using type = typename etlstd::conditional<(etl::size_of<T1>::value > etl::size_of<largest_other>::value), // Boolean
|
||||
using type = typename etl::conditional<(etl::size_of<T1>::value > etl::size_of<largest_other>::value), // Boolean
|
||||
T1, // TrueType
|
||||
largest_other> // FalseType
|
||||
::type; // The largest type of the two.
|
||||
@ -128,7 +128,7 @@ namespace etl
|
||||
|
||||
// Set 'type' to be the largest of the first parameter and any of the others.
|
||||
// This is recursive.
|
||||
typedef typename etlstd::conditional<(sizeof(T1) > sizeof(largest_other)), // Boolean
|
||||
typedef typename etl::conditional<(sizeof(T1) > sizeof(largest_other)), // Boolean
|
||||
T1, // TrueType
|
||||
largest_other> // FalseType
|
||||
::type type; // The largest type of the two.
|
||||
@ -170,7 +170,7 @@ namespace etl
|
||||
|
||||
// Set 'type' to be the largest of the first parameter and any of the others.
|
||||
// This is recursive.
|
||||
using type = typename etlstd::conditional<(etlstd::alignment_of<T1>::value > etlstd::alignment_of<largest_other>::value), // Boolean
|
||||
using type = typename etl::conditional<(etl::alignment_of<T1>::value > etl::alignment_of<largest_other>::value), // Boolean
|
||||
T1, // TrueType
|
||||
largest_other> // FalseType
|
||||
::type; // The largest type of the two.
|
||||
@ -178,7 +178,7 @@ namespace etl
|
||||
// The largest alignment.
|
||||
enum
|
||||
{
|
||||
value = etlstd::alignment_of<type>::value
|
||||
value = etl::alignment_of<type>::value
|
||||
};
|
||||
};
|
||||
|
||||
@ -192,7 +192,7 @@ namespace etl
|
||||
|
||||
enum
|
||||
{
|
||||
value = etlstd::alignment_of<type>::value
|
||||
value = etl::alignment_of<type>::value
|
||||
};
|
||||
};
|
||||
#else
|
||||
@ -213,7 +213,7 @@ namespace etl
|
||||
|
||||
// Set 'type' to be the largest of the first parameter and any of the others.
|
||||
// This is recursive.
|
||||
typedef typename etlstd::conditional<(etlstd::alignment_of<T1>::value > etlstd::alignment_of<largest_other>::value), // Boolean
|
||||
typedef typename etl::conditional<(etl::alignment_of<T1>::value > etl::alignment_of<largest_other>::value), // Boolean
|
||||
T1, // TrueType
|
||||
largest_other> // FalseType
|
||||
::type type; // The largest type of the two.
|
||||
@ -221,7 +221,7 @@ namespace etl
|
||||
// The largest alignment.
|
||||
enum
|
||||
{
|
||||
value = etlstd::alignment_of<type>::value
|
||||
value = etl::alignment_of<type>::value
|
||||
};
|
||||
};
|
||||
|
||||
@ -236,7 +236,7 @@ namespace etl
|
||||
|
||||
enum
|
||||
{
|
||||
value = etlstd::alignment_of<type>::value
|
||||
value = etl::alignment_of<type>::value
|
||||
};
|
||||
};
|
||||
#endif
|
||||
@ -249,7 +249,7 @@ namespace etl
|
||||
template <typename T>
|
||||
struct larger_int_type
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Must be an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Must be an integral type");
|
||||
|
||||
typedef typename etl::smallest_int_for_bits<etl::integral_limits<typename etl::make_signed<T>::type>::bits + 1>::type type;
|
||||
};
|
||||
@ -262,7 +262,7 @@ namespace etl
|
||||
template <typename T>
|
||||
struct larger_uint_type
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Must be an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Must be an integral type");
|
||||
|
||||
typedef typename etl::smallest_uint_for_bits<etl::integral_limits<typename etl::make_unsigned<T>::type>::bits + 1>::type type;
|
||||
};
|
||||
@ -273,13 +273,13 @@ namespace etl
|
||||
/// The returned type will be of the same sign.
|
||||
///\ingroup largest
|
||||
//***************************************************************************
|
||||
template <typename T, bool IS_SIGNED = etlstd::is_signed<T>::value>
|
||||
template <typename T, bool IS_SIGNED = etl::is_signed<T>::value>
|
||||
struct larger_type;
|
||||
|
||||
template <typename T>
|
||||
struct larger_type<T, false>
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Must be an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Must be an integral type");
|
||||
|
||||
typedef typename etl::smallest_uint_for_bits<etl::integral_limits<T>::bits + 1>::type type;
|
||||
};
|
||||
@ -287,7 +287,7 @@ namespace etl
|
||||
template <typename T>
|
||||
struct larger_type<T, true>
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Must be an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Must be an integral type");
|
||||
|
||||
typedef typename etl::smallest_int_for_bits<etl::integral_limits<T>::bits + 1>::type type;
|
||||
};
|
||||
|
||||
@ -94,7 +94,7 @@ namespace etl
|
||||
|
||||
// Set 'type' to be the largest of the first parameter and any of the others.
|
||||
// This is recursive.
|
||||
using type = typename etlstd::conditional<(etl::size_of<T1>::value > etl::size_of<largest_other>::value), // Boolean
|
||||
using type = typename etl::conditional<(etl::size_of<T1>::value > etl::size_of<largest_other>::value), // Boolean
|
||||
T1, // TrueType
|
||||
largest_other> // FalseType
|
||||
::type; // The largest type of the two.
|
||||
@ -151,7 +151,7 @@ namespace etl
|
||||
cog.outl("")
|
||||
cog.outl(" // Set 'type' to be the largest of the first parameter and any of the others.")
|
||||
cog.outl(" // This is recursive.")
|
||||
cog.outl(" typedef typename etlstd::conditional<(sizeof(T1) > sizeof(largest_other)), // Boolean")
|
||||
cog.outl(" typedef typename etl::conditional<(sizeof(T1) > sizeof(largest_other)), // Boolean")
|
||||
cog.outl(" T1, // TrueType")
|
||||
cog.outl(" largest_other> // FalseType")
|
||||
cog.outl(" ::type type; // The largest type of the two.")
|
||||
@ -200,7 +200,7 @@ namespace etl
|
||||
|
||||
// Set 'type' to be the largest of the first parameter and any of the others.
|
||||
// This is recursive.
|
||||
using type = typename etlstd::conditional<(etlstd::alignment_of<T1>::value > etlstd::alignment_of<largest_other>::value), // Boolean
|
||||
using type = typename etl::conditional<(etl::alignment_of<T1>::value > etl::alignment_of<largest_other>::value), // Boolean
|
||||
T1, // TrueType
|
||||
largest_other> // FalseType
|
||||
::type; // The largest type of the two.
|
||||
@ -208,7 +208,7 @@ namespace etl
|
||||
// The largest alignment.
|
||||
enum
|
||||
{
|
||||
value = etlstd::alignment_of<type>::value
|
||||
value = etl::alignment_of<type>::value
|
||||
};
|
||||
};
|
||||
|
||||
@ -222,7 +222,7 @@ namespace etl
|
||||
|
||||
enum
|
||||
{
|
||||
value = etlstd::alignment_of<type>::value
|
||||
value = etl::alignment_of<type>::value
|
||||
};
|
||||
};
|
||||
#else
|
||||
@ -254,7 +254,7 @@ namespace etl
|
||||
cog.outl("")
|
||||
cog.outl(" // Set 'type' to be the largest of the first parameter and any of the others.")
|
||||
cog.outl(" // This is recursive.")
|
||||
cog.outl(" typedef typename etlstd::conditional<(etlstd::alignment_of<T1>::value > etlstd::alignment_of<largest_other>::value), // Boolean")
|
||||
cog.outl(" typedef typename etl::conditional<(etl::alignment_of<T1>::value > etl::alignment_of<largest_other>::value), // Boolean")
|
||||
cog.outl(" T1, // TrueType")
|
||||
cog.outl(" largest_other> // FalseType")
|
||||
cog.outl(" ::type type; // The largest type of the two.")
|
||||
@ -262,7 +262,7 @@ namespace etl
|
||||
cog.outl(" // The largest alignment.")
|
||||
cog.outl(" enum")
|
||||
cog.outl(" {")
|
||||
cog.outl(" value = etlstd::alignment_of<type>::value")
|
||||
cog.outl(" value = etl::alignment_of<type>::value")
|
||||
cog.outl(" };")
|
||||
cog.outl("};")
|
||||
cog.outl("")
|
||||
@ -282,7 +282,7 @@ namespace etl
|
||||
cog.outl("")
|
||||
cog.outl(" enum")
|
||||
cog.outl(" {")
|
||||
cog.outl(" value = etlstd::alignment_of<type>::value")
|
||||
cog.outl(" value = etl::alignment_of<type>::value")
|
||||
cog.outl(" };")
|
||||
cog.outl("};")
|
||||
]]]*/
|
||||
@ -297,7 +297,7 @@ namespace etl
|
||||
template <typename T>
|
||||
struct larger_int_type
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Must be an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Must be an integral type");
|
||||
|
||||
typedef typename etl::smallest_int_for_bits<etl::integral_limits<typename etl::make_signed<T>::type>::bits + 1>::type type;
|
||||
};
|
||||
@ -310,7 +310,7 @@ namespace etl
|
||||
template <typename T>
|
||||
struct larger_uint_type
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Must be an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Must be an integral type");
|
||||
|
||||
typedef typename etl::smallest_uint_for_bits<etl::integral_limits<typename etl::make_unsigned<T>::type>::bits + 1>::type type;
|
||||
};
|
||||
@ -321,13 +321,13 @@ namespace etl
|
||||
/// The returned type will be of the same sign.
|
||||
///\ingroup largest
|
||||
//***************************************************************************
|
||||
template <typename T, bool IS_SIGNED = etlstd::is_signed<T>::value>
|
||||
template <typename T, bool IS_SIGNED = etl::is_signed<T>::value>
|
||||
struct larger_type;
|
||||
|
||||
template <typename T>
|
||||
struct larger_type<T, false>
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Must be an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Must be an integral type");
|
||||
|
||||
typedef typename etl::smallest_uint_for_bits<etl::integral_limits<T>::bits + 1>::type type;
|
||||
};
|
||||
@ -335,7 +335,7 @@ namespace etl
|
||||
template <typename T>
|
||||
struct larger_type<T, true>
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Must be an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Must be an integral type");
|
||||
|
||||
typedef typename etl::smallest_int_for_bits<etl::integral_limits<T>::bits + 1>::type type;
|
||||
};
|
||||
|
||||
1404
include/etl/limits.h
1404
include/etl/limits.h
File diff suppressed because it is too large
Load Diff
@ -182,6 +182,8 @@ namespace etl
|
||||
//***********************************************************************
|
||||
inline void reverse()
|
||||
{
|
||||
using ETL_OR_STD::swap; // Allow ADL
|
||||
|
||||
swap(previous, next);
|
||||
}
|
||||
|
||||
@ -676,7 +678,7 @@ namespace etl
|
||||
const node_t* p_node;
|
||||
};
|
||||
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
@ -810,7 +812,7 @@ namespace etl
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first, last);
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(d >= 0, ETL_ERROR(list_iterator));
|
||||
ETL_ASSERT(size_t(d) <= MAX_SIZE, ETL_ERROR(list_full));
|
||||
#endif
|
||||
@ -866,7 +868,7 @@ namespace etl
|
||||
#if defined(ETL_CHECK_PUSH_POP)
|
||||
ETL_ASSERT(!full(), ETL_ERROR(list_full));
|
||||
#endif
|
||||
insert_node(get_head(), allocate_data_node(etlstd::move(value)));
|
||||
insert_node(get_head(), allocate_data_node(etl::move(value)));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -883,7 +885,7 @@ namespace etl
|
||||
ETL_ASSERT(p_node_pool != nullptr, ETL_ERROR(list_no_pool));
|
||||
|
||||
data_node_t* p_data_node = p_node_pool->allocate<data_node_t>();
|
||||
::new (&(p_data_node->value)) T(etlstd::forward<Args>(args)...);
|
||||
::new (&(p_data_node->value)) T(etl::forward<Args>(args)...);
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
insert_node(get_head(), *p_data_node);
|
||||
}
|
||||
@ -989,7 +991,7 @@ namespace etl
|
||||
#if defined(ETL_CHECK_PUSH_POP)
|
||||
ETL_ASSERT(!full(), ETL_ERROR(list_full));
|
||||
#endif
|
||||
insert_node(terminal_node, allocate_data_node(etlstd::move(value)));
|
||||
insert_node(terminal_node, allocate_data_node(etl::move(value)));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1006,7 +1008,7 @@ namespace etl
|
||||
ETL_ASSERT(p_node_pool != nullptr, ETL_ERROR(list_no_pool));
|
||||
|
||||
data_node_t* p_data_node = p_node_pool->allocate<data_node_t>();
|
||||
::new (&(p_data_node->value)) T(etlstd::forward<Args>(args)...);
|
||||
::new (&(p_data_node->value)) T(etl::forward<Args>(args)...);
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
insert_node(terminal_node, *p_data_node);
|
||||
}
|
||||
@ -1101,7 +1103,7 @@ namespace etl
|
||||
{
|
||||
ETL_ASSERT(!full(), ETL_ERROR(list_full));
|
||||
|
||||
data_node_t& data_node = allocate_data_node(etlstd::move(value));
|
||||
data_node_t& data_node = allocate_data_node(etl::move(value));
|
||||
insert_node(*position.p_node, data_node);
|
||||
|
||||
return iterator(data_node);
|
||||
@ -1119,7 +1121,7 @@ namespace etl
|
||||
ETL_ASSERT(p_node_pool != nullptr, ETL_ERROR(list_no_pool));
|
||||
|
||||
data_node_t* p_data_node = p_node_pool->allocate<data_node_t>();
|
||||
::new (&(p_data_node->value)) T(etlstd::forward<Args>(args)...);
|
||||
::new (&(p_data_node->value)) T(etl::forward<Args>(args)...);
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
insert_node(*position.p_node, *p_data_node);
|
||||
|
||||
@ -1269,7 +1271,7 @@ namespace etl
|
||||
else if (n < size())
|
||||
{
|
||||
iterator i_start = end();
|
||||
etlstd::advance(i_start, -difference_type(size() - n));
|
||||
etl::advance(i_start, -difference_type(size() - n));
|
||||
erase(i_start, end());
|
||||
}
|
||||
// Larger?
|
||||
@ -1334,7 +1336,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void unique()
|
||||
{
|
||||
unique(etlstd::equal_to<T>());
|
||||
unique(etl::equal_to<T>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -1390,7 +1392,7 @@ namespace etl
|
||||
typename ilist<T>::iterator itr = other.begin();
|
||||
while (itr != other.end())
|
||||
{
|
||||
to = insert(to, etlstd::move(*itr++));
|
||||
to = insert(to, etl::move(*itr++));
|
||||
}
|
||||
|
||||
other.erase(other.begin(), other.end());
|
||||
@ -1430,7 +1432,7 @@ namespace etl
|
||||
else
|
||||
{
|
||||
// From another list.
|
||||
insert(to, etlstd::move(*from));
|
||||
insert(to, etl::move(*from));
|
||||
other.erase(from);
|
||||
}
|
||||
}
|
||||
@ -1471,7 +1473,7 @@ namespace etl
|
||||
ilist::iterator itr = first;
|
||||
while (itr != last)
|
||||
{
|
||||
to = insert(to, etlstd::move(*itr++));
|
||||
to = insert(to, etl::move(*itr++));
|
||||
++to;
|
||||
}
|
||||
|
||||
@ -1485,7 +1487,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void merge(ilist& other)
|
||||
{
|
||||
merge(other, etlstd::less<value_type>());
|
||||
merge(other, etl::less<value_type>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -1542,7 +1544,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void merge(ilist&& other)
|
||||
{
|
||||
merge(etlstd::move(other), etlstd::less<value_type>());
|
||||
merge(etl::move(other), etl::less<value_type>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -1577,7 +1579,7 @@ namespace etl
|
||||
{
|
||||
while ((other_begin != other_end) && (compare(*other_begin, *this_begin)))
|
||||
{
|
||||
insert(this_begin, etlstd::move(*other_begin));
|
||||
insert(this_begin, etl::move(*other_begin));
|
||||
++other_begin;
|
||||
}
|
||||
}
|
||||
@ -1588,7 +1590,7 @@ namespace etl
|
||||
{
|
||||
while (other_begin != other_end)
|
||||
{
|
||||
insert(this_end, etlstd::move(*other_begin++));
|
||||
insert(this_end, etl::move(*other_begin++));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1603,7 +1605,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void sort()
|
||||
{
|
||||
sort(etlstd::less<T>());
|
||||
sort(etl::less<T>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -1765,7 +1767,7 @@ namespace etl
|
||||
iterator itr = rhs.begin();
|
||||
while (itr != rhs.end())
|
||||
{
|
||||
push_back(etlstd::move(*itr));
|
||||
push_back(etl::move(*itr));
|
||||
++itr;
|
||||
}
|
||||
|
||||
@ -1917,7 +1919,7 @@ namespace etl
|
||||
ETL_ASSERT(p_node_pool != nullptr, ETL_ERROR(list_no_pool));
|
||||
|
||||
data_node_t* p_data_node = p_node_pool->allocate<data_node_t>();
|
||||
::new (&(p_data_node->value)) T(etlstd::move(value));
|
||||
::new (&(p_data_node->value)) T(etl::move(value));
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
|
||||
return *p_data_node;
|
||||
@ -2033,7 +2035,7 @@ namespace etl
|
||||
typename etl::ilist<T>::iterator itr = other.begin();
|
||||
while (itr != other.end())
|
||||
{
|
||||
this->push_back(etlstd::move(*itr));
|
||||
this->push_back(etl::move(*itr));
|
||||
++itr;
|
||||
}
|
||||
|
||||
@ -2089,7 +2091,7 @@ namespace etl
|
||||
typename etl::ilist<T>::iterator itr = rhs.begin();
|
||||
while (itr != rhs.end())
|
||||
{
|
||||
this->push_back(etlstd::move(*itr));
|
||||
this->push_back(etl::move(*itr));
|
||||
++itr;
|
||||
}
|
||||
|
||||
@ -2191,7 +2193,7 @@ namespace etl
|
||||
typename etl::ilist<T>::iterator itr = other.begin();
|
||||
while (itr != other.end())
|
||||
{
|
||||
this->push_back(etlstd::move(*itr));
|
||||
this->push_back(etl::move(*itr));
|
||||
++itr;
|
||||
}
|
||||
|
||||
@ -2247,7 +2249,7 @@ namespace etl
|
||||
typename etl::ilist<T>::iterator itr = rhs.begin();
|
||||
while (itr != rhs.end())
|
||||
{
|
||||
this->push_back(etlstd::move(*itr));
|
||||
this->push_back(etl::move(*itr));
|
||||
++itr;
|
||||
}
|
||||
|
||||
@ -2282,7 +2284,7 @@ namespace etl
|
||||
template <typename T>
|
||||
bool operator ==(const etl::ilist<T>& lhs, const etl::ilist<T>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -2307,7 +2309,7 @@ namespace etl
|
||||
template <typename T>
|
||||
bool operator <(const etl::ilist<T>& lhs, const etl::ilist<T>& rhs)
|
||||
{
|
||||
return etlstd::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -462,7 +462,7 @@ namespace etl
|
||||
/// A templated base for all etl::map types.
|
||||
///\ingroup map
|
||||
//***************************************************************************
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare = etlstd::less<TKey> >
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare = etl::less<TKey> >
|
||||
class imap : public etl::map_base
|
||||
{
|
||||
public:
|
||||
@ -804,7 +804,7 @@ namespace etl
|
||||
|
||||
friend class const_iterator;
|
||||
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
@ -917,7 +917,7 @@ namespace etl
|
||||
if (!i_element.p_node)
|
||||
{
|
||||
// Doesn't exist, so create a new one.
|
||||
i_element = insert(ETL_MAKE_PAIR(key, mapped_type())).first;
|
||||
i_element = insert(ETL_OR_STD::make_pair(key, mapped_type())).first;
|
||||
}
|
||||
|
||||
return i_element->second;
|
||||
@ -991,7 +991,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
ETL_OR_STD::pair<iterator, iterator> equal_range(key_parameter_t key)
|
||||
{
|
||||
return ETL_MAKE_PAIR<iterator, iterator>(
|
||||
return ETL_OR_STD::make_pair<iterator, iterator>(
|
||||
iterator(*this, find_lower_node(root_node, key)),
|
||||
iterator(*this, find_upper_node(root_node, key)));
|
||||
}
|
||||
@ -1002,7 +1002,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(key_parameter_t key) const
|
||||
{
|
||||
return ETL_MAKE_PAIR<const_iterator, const_iterator>(
|
||||
return ETL_OR_STD::make_pair<const_iterator, const_iterator>(
|
||||
const_iterator(*this, find_lower_node(root_node, key)),
|
||||
const_iterator(*this, find_upper_node(root_node, key)));
|
||||
}
|
||||
@ -1109,7 +1109,7 @@ namespace etl
|
||||
inserted = inserted_node == &node;
|
||||
|
||||
// Insert node into tree and return iterator to new node location in tree
|
||||
return ETL_MAKE_PAIR(iterator(*this, inserted_node), inserted);
|
||||
return ETL_OR_STD::make_pair(iterator(*this, inserted_node), inserted);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -2042,7 +2042,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// A templated map implementation that uses a fixed size buffer.
|
||||
//*************************************************************************
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = etlstd::less<TKey> >
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = etl::less<TKey> >
|
||||
class map : public etl::imap<TKey, TValue, TCompare>
|
||||
{
|
||||
public:
|
||||
@ -2129,7 +2129,7 @@ namespace etl
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare>
|
||||
bool operator ==(const etl::imap<TKey, TMapped, TKeyCompare>& lhs, const etl::imap<TKey, TMapped, TKeyCompare>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -2155,7 +2155,7 @@ namespace etl
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare>
|
||||
bool operator <(const etl::imap<TKey, TMapped, TKeyCompare>& lhs, const etl::imap<TKey, TMapped, TKeyCompare>& rhs)
|
||||
{
|
||||
return etlstd::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -48,9 +48,9 @@ SOFTWARE.
|
||||
#endif
|
||||
|
||||
///\defgroup memory memory
|
||||
///\ingroup etlstd
|
||||
///\ingroup etl
|
||||
|
||||
namespace etlstd
|
||||
namespace etl
|
||||
{
|
||||
//*****************************************************************************
|
||||
/// Gets the address of an object.
|
||||
@ -74,10 +74,10 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename T>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_fill(TOutputIterator o_begin, TOutputIterator o_end, const T& value)
|
||||
{
|
||||
etlstd::fill(o_begin, o_end, value);
|
||||
etl::fill(o_begin, o_end, value);
|
||||
|
||||
return o_end;
|
||||
}
|
||||
@ -88,10 +88,10 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename T>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_fill(TOutputIterator o_begin, TOutputIterator o_end, const T& value)
|
||||
{
|
||||
typedef typename etlstd::iterator_traits<TOutputIterator>::value_type value_type;
|
||||
typedef typename etl::iterator_traits<TOutputIterator>::value_type value_type;
|
||||
|
||||
while (o_begin != o_end)
|
||||
{
|
||||
@ -109,12 +109,12 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename T, typename TCounter>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_fill(TOutputIterator o_begin, TOutputIterator o_end, const T& value, TCounter& count)
|
||||
{
|
||||
count += int32_t(etlstd::distance(o_begin, o_end));
|
||||
count += int32_t(etl::distance(o_begin, o_end));
|
||||
|
||||
etlstd::fill(o_begin, o_end, value);
|
||||
etl::fill(o_begin, o_end, value);
|
||||
|
||||
return o_end;
|
||||
}
|
||||
@ -126,12 +126,12 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename T, typename TCounter>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_fill(TOutputIterator o_begin, TOutputIterator o_end, const T& value, TCounter& count)
|
||||
{
|
||||
count += int32_t(etlstd::distance(o_begin, o_end));
|
||||
count += int32_t(etl::distance(o_begin, o_end));
|
||||
|
||||
etlstd::uninitialized_fill(o_begin, o_end, value);
|
||||
etl::uninitialized_fill(o_begin, o_end, value);
|
||||
|
||||
return o_end;
|
||||
}
|
||||
@ -159,7 +159,7 @@ namespace etlstd
|
||||
template <typename TOutputIterator, typename T, typename TCounter>
|
||||
TOutputIterator uninitialized_fill(TOutputIterator o_begin, TOutputIterator o_end, const T& value, TCounter& count)
|
||||
{
|
||||
count += int32_t(etlstd::distance(o_begin, o_end));
|
||||
count += int32_t(etl::distance(o_begin, o_end));
|
||||
|
||||
std::uninitialized_fill(o_begin, o_end, value);
|
||||
|
||||
@ -176,7 +176,7 @@ namespace etlstd
|
||||
template <typename TOutputIterator, typename TSize, typename T>
|
||||
TOutputIterator uninitialized_fill_n(TOutputIterator o_begin, TSize n, const T& value)
|
||||
{
|
||||
return etlstd::uninitialized_fill(o_begin, o_begin + n, value);
|
||||
return etl::uninitialized_fill(o_begin, o_begin + n, value);
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
@ -190,7 +190,7 @@ namespace etlstd
|
||||
{
|
||||
count += n;
|
||||
|
||||
return etlstd::uninitialized_fill(o_begin, o_begin + n, value);
|
||||
return etl::uninitialized_fill(o_begin, o_begin + n, value);
|
||||
}
|
||||
#else
|
||||
//*****************************************************************************
|
||||
@ -226,10 +226,10 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TInputIterator, typename TOutputIterator>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_copy(TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin)
|
||||
{
|
||||
return etlstd::copy(i_begin, i_end, o_begin);
|
||||
return etl::copy(i_begin, i_end, o_begin);
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
@ -238,10 +238,10 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TInputIterator, typename TOutputIterator>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_copy(TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin)
|
||||
{
|
||||
typedef typename etlstd::iterator_traits<TOutputIterator>::value_type value_type;
|
||||
typedef typename etl::iterator_traits<TOutputIterator>::value_type value_type;
|
||||
|
||||
TOutputIterator o_end = o_begin;
|
||||
|
||||
@ -262,11 +262,11 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TInputIterator, typename TOutputIterator, typename TCounter>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_copy(TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin, TCounter& count)
|
||||
{
|
||||
TOutputIterator o_end = etlstd::copy(i_begin, i_end, o_begin);
|
||||
count += int32_t(etlstd::distance(o_begin, o_end));
|
||||
TOutputIterator o_end = etl::copy(i_begin, i_end, o_begin);
|
||||
count += int32_t(etl::distance(o_begin, o_end));
|
||||
|
||||
return o_end;
|
||||
}
|
||||
@ -278,12 +278,12 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TInputIterator, typename TOutputIterator, typename TCounter>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_copy(TInputIterator i_begin, TInputIterator i_end, TOutputIterator o_begin, TCounter& count)
|
||||
{
|
||||
TOutputIterator o_end = etlstd::uninitialized_copy(i_begin, i_end, o_begin);
|
||||
TOutputIterator o_end = etl::uninitialized_copy(i_begin, i_end, o_begin);
|
||||
|
||||
count += int32_t(etlstd::distance(o_begin, o_end));
|
||||
count += int32_t(etl::distance(o_begin, o_end));
|
||||
|
||||
return o_end;
|
||||
}
|
||||
@ -321,7 +321,7 @@ namespace etlstd
|
||||
template <typename TInputIterator, typename TSize, typename TOutputIterator>
|
||||
TOutputIterator uninitialized_copy_n(TInputIterator i_begin, TSize n, TOutputIterator o_begin)
|
||||
{
|
||||
return etlstd::uninitialized_copy(i_begin, i_begin + n, o_begin);
|
||||
return etl::uninitialized_copy(i_begin, i_begin + n, o_begin);
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
@ -335,7 +335,7 @@ namespace etlstd
|
||||
{
|
||||
count += n;
|
||||
|
||||
return etlstd::uninitialized_copy(i_begin, i_begin + n, o_begin);
|
||||
return etl::uninitialized_copy(i_begin, i_begin + n, o_begin);
|
||||
}
|
||||
#else
|
||||
//*****************************************************************************
|
||||
@ -371,7 +371,7 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
uninitialized_default_construct(TOutputIterator /*o_begin*/, TOutputIterator /*o_end*/)
|
||||
{
|
||||
// Do nothing
|
||||
@ -383,11 +383,11 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
uninitialized_default_construct(TOutputIterator o_begin, TOutputIterator o_end)
|
||||
{
|
||||
|
||||
typedef typename etlstd::iterator_traits<TOutputIterator>::value_type value_type;
|
||||
typedef typename etl::iterator_traits<TOutputIterator>::value_type value_type;
|
||||
|
||||
while (o_begin != o_end)
|
||||
{
|
||||
@ -403,10 +403,10 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename TCounter>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
uninitialized_default_construct(TOutputIterator o_begin, TOutputIterator o_end, TCounter& count)
|
||||
{
|
||||
count = int32_t(etlstd::distance(o_begin, o_end));
|
||||
count = int32_t(etl::distance(o_begin, o_end));
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
@ -416,12 +416,12 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename TCounter>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
uninitialized_default_construct(TOutputIterator o_begin, TOutputIterator o_end, TCounter& count)
|
||||
{
|
||||
count += int32_t(etlstd::distance(o_begin, o_end));
|
||||
count += int32_t(etl::distance(o_begin, o_end));
|
||||
|
||||
etlstd::uninitialized_default_construct(o_begin, o_end);
|
||||
etl::uninitialized_default_construct(o_begin, o_end);
|
||||
}
|
||||
#else
|
||||
//*****************************************************************************
|
||||
@ -430,7 +430,7 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
uninitialized_default_construct(TOutputIterator o_begin, TOutputIterator o_end)
|
||||
{
|
||||
std::uninitialized_default_construct(o_begin, o_end);
|
||||
@ -443,10 +443,10 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename TCounter>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
uninitialized_default_construct(TOutputIterator o_begin, TOutputIterator o_end, TCounter& count)
|
||||
{
|
||||
count = int32_t(etlstd::distance(o_begin, o_end));
|
||||
count = int32_t(etl::distance(o_begin, o_end));
|
||||
|
||||
std::uninitialized_default_construct(o_begin, o_end);
|
||||
}
|
||||
@ -459,7 +459,7 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename TSize>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_default_construct_n(TOutputIterator o_begin, TSize n)
|
||||
{
|
||||
TOutputIterator o_end = o_begin + n;
|
||||
@ -472,12 +472,12 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename TSize>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_default_construct_n(TOutputIterator o_begin, TSize n)
|
||||
{
|
||||
TOutputIterator o_end = o_begin + n;
|
||||
|
||||
etlstd::uninitialized_default_construct(o_begin, o_end);
|
||||
etl::uninitialized_default_construct(o_begin, o_end);
|
||||
|
||||
return o_end;
|
||||
}
|
||||
@ -489,7 +489,7 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename TSize, typename TCounter>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename etl::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;
|
||||
@ -506,12 +506,12 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename TSize, typename TCounter>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename etl::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;
|
||||
|
||||
etlstd::uninitialized_default_construct(o_begin, o_end);
|
||||
etl::uninitialized_default_construct(o_begin, o_end);
|
||||
|
||||
count += n;
|
||||
|
||||
@ -524,13 +524,11 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename TSize>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_default_construct_n(TOutputIterator o_begin, TSize n)
|
||||
TOutputIterator uninitialized_default_construct_n(TOutputIterator o_begin, TSize n)
|
||||
{
|
||||
return std::uninitialized_default_construct_n(o_begin, n);
|
||||
}
|
||||
|
||||
|
||||
//*****************************************************************************
|
||||
/// Default initialises N objects to uninitialised memory.
|
||||
/// https://en.cppreference.com/w/cpp/memory/uninitialized_default_construct_n
|
||||
@ -538,8 +536,7 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator, typename TSize, typename TCounter>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, TOutputIterator>::type
|
||||
uninitialized_default_construct_n(TOutputIterator o_begin, TSize n, TCounter& count)
|
||||
TOutputIterator uninitialized_default_construct_n(TOutputIterator o_begin, TSize n, TCounter& count)
|
||||
{
|
||||
count += n;
|
||||
|
||||
@ -554,12 +551,12 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
uninitialized_value_construct(TOutputIterator o_begin, TOutputIterator o_end)
|
||||
{
|
||||
typedef typename etlstd::iterator_traits<TOutputIterator>::value_type value_type;
|
||||
typedef typename etl::iterator_traits<TOutputIterator>::value_type value_type;
|
||||
|
||||
etlstd::fill(o_begin, o_end, value_type());
|
||||
etl::fill(o_begin, o_end, value_type());
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
@ -568,10 +565,10 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TOutputIterator>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_constructible<typename etlstd::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<typename etl::iterator_traits<TOutputIterator>::value_type>::value, void>::type
|
||||
uninitialized_value_construct(TOutputIterator o_begin, TOutputIterator o_end)
|
||||
{
|
||||
typedef typename etlstd::iterator_traits<TOutputIterator>::value_type value_type;
|
||||
typedef typename etl::iterator_traits<TOutputIterator>::value_type value_type;
|
||||
|
||||
while (o_begin != o_end)
|
||||
{
|
||||
@ -589,9 +586,9 @@ namespace etlstd
|
||||
template <typename TOutputIterator, typename TCounter>
|
||||
void uninitialized_value_construct(TOutputIterator o_begin, TOutputIterator o_end, TCounter& count)
|
||||
{
|
||||
count += int32_t(etlstd::distance(o_begin, o_end));
|
||||
count += int32_t(etl::distance(o_begin, o_end));
|
||||
|
||||
etlstd::uninitialized_value_construct(o_begin, o_end);
|
||||
etl::uninitialized_value_construct(o_begin, o_end);
|
||||
}
|
||||
#else
|
||||
//*****************************************************************************
|
||||
@ -614,7 +611,7 @@ namespace etlstd
|
||||
template <typename TOutputIterator, typename TCounter>
|
||||
void uninitialized_value_construct(TOutputIterator o_begin, TOutputIterator o_end, TCounter& count)
|
||||
{
|
||||
count += int32_t(etlstd::distance(o_begin, o_end));
|
||||
count += int32_t(etl::distance(o_begin, o_end));
|
||||
|
||||
std::uninitialized_value_construct(o_begin, o_end);
|
||||
}
|
||||
@ -632,7 +629,7 @@ namespace etlstd
|
||||
{
|
||||
TOutputIterator o_end = o_begin + n;
|
||||
|
||||
etlstd::uninitialized_value_construct(o_begin, o_end);
|
||||
etl::uninitialized_value_construct(o_begin, o_end);
|
||||
|
||||
return o_end;
|
||||
}
|
||||
@ -648,7 +645,7 @@ namespace etlstd
|
||||
{
|
||||
TOutputIterator o_end = o_begin + n;
|
||||
|
||||
etlstd::uninitialized_value_construct(o_begin, o_end);
|
||||
etl::uninitialized_value_construct(o_begin, o_end);
|
||||
|
||||
count += n;
|
||||
|
||||
@ -688,7 +685,7 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_destructible<T>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_destructible<T>::value, void>::type
|
||||
destroy_at(T* /*p*/)
|
||||
{
|
||||
}
|
||||
@ -699,7 +696,7 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_destructible<T>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_destructible<T>::value, void>::type
|
||||
destroy_at(T* p)
|
||||
{
|
||||
p->~T();
|
||||
@ -712,7 +709,7 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T, typename TCounter>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_destructible<T>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_destructible<T>::value, void>::type
|
||||
destroy_at(T* /*p*/, TCounter& count)
|
||||
{
|
||||
--count;
|
||||
@ -725,7 +722,7 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T, typename TCounter>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_destructible<T>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_destructible<T>::value, void>::type
|
||||
destroy_at(T* p, TCounter& count)
|
||||
{
|
||||
p->~T();
|
||||
@ -750,7 +747,7 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T, typename TCounter>
|
||||
void destroy_at(T* /*p*/, TCounter& count)
|
||||
void destroy_at(T* p, TCounter& count)
|
||||
{
|
||||
--count;
|
||||
std::destroy_at(p);
|
||||
@ -764,7 +761,7 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TIterator>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_destructible<typename etlstd::iterator_traits<TIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_destructible<typename etl::iterator_traits<TIterator>::value_type>::value, void>::type
|
||||
destroy(TIterator /*i_begin*/, TIterator /*i_end*/)
|
||||
{
|
||||
}
|
||||
@ -775,12 +772,12 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TIterator>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_destructible<typename etlstd::iterator_traits<TIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_destructible<typename etl::iterator_traits<TIterator>::value_type>::value, void>::type
|
||||
destroy(TIterator i_begin, TIterator i_end)
|
||||
{
|
||||
while (i_begin != i_end)
|
||||
{
|
||||
etlstd::destroy_at(etl::addressof(*i_begin));
|
||||
etl::destroy_at(etl::addressof(*i_begin));
|
||||
++i_begin;
|
||||
}
|
||||
}
|
||||
@ -792,10 +789,10 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TIterator, typename TCounter>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_destructible<typename etlstd::iterator_traits<TIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_destructible<typename etl::iterator_traits<TIterator>::value_type>::value, void>::type
|
||||
destroy(TIterator i_begin, TIterator i_end, TCounter& count)
|
||||
{
|
||||
count -= int32_t(etlstd::distance(i_begin, i_end));
|
||||
count -= int32_t(etl::distance(i_begin, i_end));
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
@ -805,14 +802,14 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TIterator, typename TCounter>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_destructible<typename etlstd::iterator_traits<TIterator>::value_type>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_destructible<typename etl::iterator_traits<TIterator>::value_type>::value, void>::type
|
||||
destroy(TIterator i_begin, TIterator i_end, TCounter& count)
|
||||
{
|
||||
count -= int32_t(etlstd::distance(i_begin, i_end));
|
||||
count -= int32_t(etl::distance(i_begin, i_end));
|
||||
|
||||
while (i_begin != i_end)
|
||||
{
|
||||
etlstd::destroy_at(etl::addressof(*i_begin));
|
||||
etl::destroy_at(etl::addressof(*i_begin));
|
||||
++i_begin;
|
||||
}
|
||||
}
|
||||
@ -837,7 +834,7 @@ namespace etlstd
|
||||
template <typename TIterator, typename TCounter>
|
||||
void destroy(TIterator i_begin, TIterator i_end, TCounter& count)
|
||||
{
|
||||
count -= int32_t(etlstd::distance(i_begin, i_end));
|
||||
count -= int32_t(etl::distance(i_begin, i_end));
|
||||
|
||||
std::destroy(i_begin, i_end);
|
||||
}
|
||||
@ -850,7 +847,7 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TIterator, typename TSize>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_destructible<typename etlstd::iterator_traits<TIterator>::value_type>::value, TIterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_destructible<typename etl::iterator_traits<TIterator>::value_type>::value, TIterator>::type
|
||||
destroy_n(TIterator i_begin, TSize n)
|
||||
{
|
||||
return i_begin + n;
|
||||
@ -862,7 +859,7 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TIterator, typename TSize>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_destructible<typename etlstd::iterator_traits<TIterator>::value_type>::value, TIterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_destructible<typename etl::iterator_traits<TIterator>::value_type>::value, TIterator>::type
|
||||
destroy_n(TIterator i_begin, TSize n)
|
||||
{
|
||||
while (n > 0)
|
||||
@ -882,7 +879,7 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TIterator, typename TSize, typename TCounter>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_destructible<typename etlstd::iterator_traits<TIterator>::value_type>::value, TIterator>::type
|
||||
typename etl::enable_if<etl::is_trivially_destructible<typename etl::iterator_traits<TIterator>::value_type>::value, TIterator>::type
|
||||
destroy_n(TIterator i_begin, TSize n, TCounter& count)
|
||||
{
|
||||
count -= n;
|
||||
@ -896,7 +893,7 @@ namespace etlstd
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename TIterator, typename TSize, typename TCounter>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_destructible<typename etlstd::iterator_traits<TIterator>::value_type>::value, TIterator>::type
|
||||
typename etl::enable_if<!etl::is_trivially_destructible<typename etl::iterator_traits<TIterator>::value_type>::value, TIterator>::type
|
||||
destroy_n(TIterator i_begin, TSize n, TCounter& count)
|
||||
{
|
||||
count -= n;
|
||||
@ -974,7 +971,7 @@ namespace etlstd
|
||||
/// https://en.cppreference.com/w/cpp/memory/unique_ptr
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T, typename TDeleter = etlstd::default_delete<T> >
|
||||
template <typename T, typename TDeleter = etl::default_delete<T> >
|
||||
class unique_ptr
|
||||
{
|
||||
public:
|
||||
@ -1247,7 +1244,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_constructible<T>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<T>::value, void>::type
|
||||
create_default_at(T* /*p*/)
|
||||
{
|
||||
}
|
||||
@ -1257,7 +1254,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T, typename TCounter>
|
||||
typename etlstd::enable_if<etlstd::is_trivially_constructible<T>::value, void>::type
|
||||
typename etl::enable_if<etl::is_trivially_constructible<T>::value, void>::type
|
||||
create_default_at(T* /*p*/, TCounter& count)
|
||||
{
|
||||
++count;
|
||||
@ -1268,7 +1265,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_constructible<T>::value, void>::type
|
||||
typename etl::enable_if<!etl::is_trivially_constructible<T>::value, void>::type
|
||||
create_default_at(T* p)
|
||||
{
|
||||
::new (p) T;
|
||||
@ -1279,7 +1276,7 @@ namespace etl
|
||||
///\ingroup memory
|
||||
//*****************************************************************************
|
||||
template <typename T, typename TCounter>
|
||||
typename etlstd::enable_if<!etlstd::is_trivially_constructible<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;
|
||||
@ -1325,7 +1322,7 @@ namespace etl
|
||||
template <typename T>
|
||||
void create_copy_at(T* p, T&& value)
|
||||
{
|
||||
::new (p) T(etlstd::move(value));
|
||||
::new (p) T(etl::move(value));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1382,7 +1379,7 @@ namespace etl
|
||||
template <typename T>
|
||||
T& make_copy_at(T* p, T&& other)
|
||||
{
|
||||
::new (p) T(etlstd::move(other));
|
||||
::new (p) T(etl::move(other));
|
||||
return *reinterpret_cast<T*>(p);
|
||||
}
|
||||
#endif
|
||||
@ -1418,7 +1415,7 @@ namespace etl
|
||||
template <typename T, typename TParameter>
|
||||
T& make_value_at(T* p, TParameter&& value)
|
||||
{
|
||||
::new (p) T(etlstd::move(value));
|
||||
::new (p) T(etl::move(value));
|
||||
return *reinterpret_cast<T*>(p);
|
||||
}
|
||||
#endif
|
||||
@ -1519,7 +1516,7 @@ namespace etl
|
||||
template <typename T>
|
||||
void memory_clear_range(volatile T* begin, volatile T* end)
|
||||
{
|
||||
const size_t n = static_cast<size_t>(etlstd::distance(begin, end));
|
||||
const size_t n = static_cast<size_t>(etl::distance(begin, end));
|
||||
|
||||
memory_clear_range(begin, n);
|
||||
}
|
||||
@ -1577,7 +1574,7 @@ namespace etl
|
||||
template <typename T>
|
||||
void memory_set_range(volatile T* begin, volatile T* end, const char value)
|
||||
{
|
||||
const size_t n = static_cast<size_t>(etlstd::distance(begin, end));
|
||||
const size_t n = static_cast<size_t>(etl::distance(begin, end));
|
||||
|
||||
memory_set_range(begin, n, value);
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ namespace etl
|
||||
|
||||
if (ok)
|
||||
{
|
||||
router_list_t::iterator irouter = etlstd::upper_bound(router_list.begin(),
|
||||
router_list_t::iterator irouter = etl::upper_bound(router_list.begin(),
|
||||
router_list.end(),
|
||||
router.get_message_router_id(),
|
||||
compare_router_id());
|
||||
@ -125,7 +125,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
ETL_OR_STD::pair<router_list_t::iterator, router_list_t::iterator> range = etlstd::equal_range(router_list.begin(),
|
||||
ETL_OR_STD::pair<router_list_t::iterator, router_list_t::iterator> range = etl::equal_range(router_list.begin(),
|
||||
router_list.end(),
|
||||
id,
|
||||
compare_router_id());
|
||||
@ -137,7 +137,7 @@ namespace etl
|
||||
//*******************************************
|
||||
void unsubscribe(etl::imessage_router& router)
|
||||
{
|
||||
router_list_t::iterator irouter = etlstd::find(router_list.begin(),
|
||||
router_list_t::iterator irouter = etl::find(router_list.begin(),
|
||||
router_list.end(),
|
||||
&router);
|
||||
|
||||
@ -212,7 +212,7 @@ namespace etl
|
||||
router_list_t::iterator irouter = router_list.begin();
|
||||
|
||||
// Find routers with the id.
|
||||
ETL_OR_STD::pair<router_list_t::iterator, router_list_t::iterator> range = etlstd::equal_range(router_list.begin(),
|
||||
ETL_OR_STD::pair<router_list_t::iterator, router_list_t::iterator> range = etl::equal_range(router_list.begin(),
|
||||
router_list.end(),
|
||||
destination_router_id,
|
||||
compare_router_id());
|
||||
@ -230,7 +230,7 @@ namespace etl
|
||||
|
||||
// Do any message buses.
|
||||
// These are always at the end of the list.
|
||||
irouter = etlstd::lower_bound(router_list.begin(),
|
||||
irouter = etl::lower_bound(router_list.begin(),
|
||||
router_list.end(),
|
||||
etl::imessage_bus::MESSAGE_BUS,
|
||||
compare_router_id());
|
||||
|
||||
@ -624,7 +624,7 @@ namespace etl
|
||||
/// A templated base for all etl::multimap types.
|
||||
///\ingroup map
|
||||
//***************************************************************************
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare = etlstd::less<TKey> >
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare = etl::less<TKey> >
|
||||
class imultimap : public etl::multimap_base
|
||||
{
|
||||
public:
|
||||
@ -960,7 +960,7 @@ namespace etl
|
||||
};
|
||||
friend class const_iterator;
|
||||
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
@ -1099,7 +1099,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
ETL_OR_STD::pair<iterator, iterator> equal_range(key_parameter_t key)
|
||||
{
|
||||
return ETL_MAKE_PAIR<iterator, iterator>(
|
||||
return ETL_OR_STD::make_pair<iterator, iterator>(
|
||||
iterator(*this, find_lower_node(root_node, key)),
|
||||
iterator(*this, find_upper_node(root_node, key)));
|
||||
}
|
||||
@ -1110,7 +1110,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(key_parameter_t key) const
|
||||
{
|
||||
return ETL_MAKE_PAIR<const_iterator, const_iterator>(
|
||||
return ETL_OR_STD::make_pair<const_iterator, const_iterator>(
|
||||
const_iterator(*this, find_lower_node(root_node, key)),
|
||||
const_iterator(*this, find_upper_node(root_node, key)));
|
||||
}
|
||||
@ -1931,7 +1931,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// A templated multimap implementation that uses a fixed size buffer.
|
||||
//*************************************************************************
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = etlstd::less<TKey> >
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = etl::less<TKey> >
|
||||
class multimap : public etl::imultimap<TKey, TValue, TCompare>
|
||||
{
|
||||
public:
|
||||
@ -2018,7 +2018,7 @@ namespace etl
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare>
|
||||
bool operator ==(const etl::imultimap<TKey, TMapped, TKeyCompare>& lhs, const etl::imultimap<TKey, TMapped, TKeyCompare>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -2044,7 +2044,7 @@ namespace etl
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare>
|
||||
bool operator <(const etl::imultimap<TKey, TMapped, TKeyCompare>& lhs, const etl::imultimap<TKey, TMapped, TKeyCompare>& rhs)
|
||||
{
|
||||
return etlstd::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -925,7 +925,7 @@ namespace etl
|
||||
};
|
||||
friend class const_iterator;
|
||||
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
@ -1064,7 +1064,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
ETL_OR_STD::pair<iterator, iterator> equal_range(const value_type& key)
|
||||
{
|
||||
return ETL_MAKE_PAIR<iterator, iterator>(
|
||||
return ETL_OR_STD::make_pair<iterator, iterator>(
|
||||
iterator(*this, find_lower_node(root_node, key)),
|
||||
iterator(*this, find_upper_node(root_node, key)));
|
||||
}
|
||||
@ -1075,7 +1075,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(const value_type& key) const
|
||||
{
|
||||
return ETL_MAKE_PAIR<const_iterator, const_iterator>(
|
||||
return ETL_OR_STD::make_pair<const_iterator, const_iterator>(
|
||||
const_iterator(*this, find_lower_node(root_node, key)),
|
||||
const_iterator(*this, find_upper_node(root_node, key)));
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ namespace etl
|
||||
{
|
||||
public:
|
||||
|
||||
ETL_STATIC_ASSERT((etlstd::is_same<THash, uint32_t>::value || etlstd::is_same<THash, uint64_t>::value), "Only 32 & 64 bit types supported");
|
||||
ETL_STATIC_ASSERT((etl::is_same<THash, uint32_t>::value || etl::is_same<THash, uint64_t>::value), "Only 32 & 64 bit types supported");
|
||||
|
||||
typedef THash value_type;
|
||||
|
||||
@ -81,7 +81,7 @@ namespace etl
|
||||
murmur3(TIterator begin, const TIterator end, value_type seed_ = 0)
|
||||
: seed(seed_)
|
||||
{
|
||||
ETL_STATIC_ASSERT(sizeof(typename etlstd::iterator_traits<TIterator>::value_type) == 1, "Incompatible type");
|
||||
ETL_STATIC_ASSERT(sizeof(typename etl::iterator_traits<TIterator>::value_type) == 1, "Incompatible type");
|
||||
|
||||
reset();
|
||||
while (begin != end)
|
||||
@ -119,7 +119,7 @@ namespace etl
|
||||
template<typename TIterator>
|
||||
void add(TIterator begin, const TIterator end)
|
||||
{
|
||||
ETL_STATIC_ASSERT(sizeof(typename etlstd::iterator_traits<TIterator>::value_type) == 1, "Incompatible type");
|
||||
ETL_STATIC_ASSERT(sizeof(typename etl::iterator_traits<TIterator>::value_type) == 1, "Incompatible type");
|
||||
ETL_ASSERT(!is_finalised, ETL_ERROR(hash_finalised));
|
||||
|
||||
while (begin != end)
|
||||
|
||||
@ -39,7 +39,7 @@ namespace etl
|
||||
// For signed types.
|
||||
//***************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::enable_if<etlstd::is_signed<T>::value, bool>::type
|
||||
typename etl::enable_if<etl::is_signed<T>::value, bool>::type
|
||||
is_negative(const T value)
|
||||
{
|
||||
return (value < T(0));
|
||||
@ -49,7 +49,7 @@ namespace etl
|
||||
// For unsigned types.
|
||||
//***************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::enable_if<etlstd::is_unsigned<T>::value, T>::type
|
||||
typename etl::enable_if<etl::is_unsigned<T>::value, T>::type
|
||||
is_negative(const T)
|
||||
{
|
||||
return false;
|
||||
|
||||
@ -115,7 +115,7 @@ namespace etl
|
||||
void add_observer(TObserver& observer)
|
||||
{
|
||||
// See if we already have it in our list.
|
||||
typename Observer_List::const_iterator i_observer = etlstd::find(observer_list.begin(),
|
||||
typename Observer_List::const_iterator i_observer = etl::find(observer_list.begin(),
|
||||
observer_list.end(),
|
||||
&observer);
|
||||
|
||||
@ -138,7 +138,7 @@ namespace etl
|
||||
bool remove_observer(TObserver& observer)
|
||||
{
|
||||
// See if we have it in our list.
|
||||
typename Observer_List::iterator i_observer = etlstd::find(observer_list.begin(),
|
||||
typename Observer_List::iterator i_observer = etl::find(observer_list.begin(),
|
||||
observer_list.end(),
|
||||
&observer);
|
||||
|
||||
|
||||
@ -64,9 +64,9 @@ namespace etl
|
||||
template <typename T>
|
||||
explicit packet(const T& value)
|
||||
{
|
||||
ETL_STATIC_ASSERT((etlstd::is_base_of<TBase, T>::value), "Unsupported type");
|
||||
ETL_STATIC_ASSERT((etl::is_base_of<TBase, T>::value), "Unsupported type");
|
||||
ETL_STATIC_ASSERT(sizeof(T) <= SIZE, "Unsupported size");
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<T>::value <= ALIGNMENT, "Unsupported alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<T>::value <= ALIGNMENT, "Unsupported alignment");
|
||||
|
||||
::new (static_cast<T*>(data)) T(value);
|
||||
}
|
||||
@ -86,9 +86,9 @@ namespace etl
|
||||
template <typename T>
|
||||
packet& operator =(const T& value)
|
||||
{
|
||||
ETL_STATIC_ASSERT((etlstd::is_base_of<TBase, T>::value), "Unsupported type");
|
||||
ETL_STATIC_ASSERT((etl::is_base_of<TBase, T>::value), "Unsupported type");
|
||||
ETL_STATIC_ASSERT(sizeof(T) <= SIZE, "Unsupported size");
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<T>::value <= ALIGNMENT, "Unsupported alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<T>::value <= ALIGNMENT, "Unsupported alignment");
|
||||
|
||||
static_cast<TBase*>(data)->~TBase();
|
||||
::new (static_cast<T*>(data)) T(value);
|
||||
|
||||
@ -43,7 +43,7 @@ namespace etl
|
||||
struct parameter_type
|
||||
{
|
||||
/// By default fundamental and pointer types are passed by value.
|
||||
typedef typename etlstd::conditional<etlstd::is_fundamental<T>::value || is_pointer<T>::value,
|
||||
typedef typename etl::conditional<etl::is_fundamental<T>::value || etl::is_pointer<T>::value,
|
||||
T,
|
||||
const T&>::type type;
|
||||
};
|
||||
|
||||
@ -81,7 +81,7 @@ namespace etl
|
||||
pearson(TIterator begin, const TIterator end)
|
||||
: first(true)
|
||||
{
|
||||
ETL_STATIC_ASSERT(sizeof(typename etlstd::iterator_traits<TIterator>::value_type) == 1, "Type not supported");
|
||||
ETL_STATIC_ASSERT(sizeof(typename etl::iterator_traits<TIterator>::value_type) == 1, "Type not supported");
|
||||
|
||||
reset();
|
||||
add(begin, end);
|
||||
@ -103,7 +103,7 @@ namespace etl
|
||||
template<typename TIterator>
|
||||
void add(TIterator begin, const TIterator end)
|
||||
{
|
||||
ETL_STATIC_ASSERT(sizeof(typename etlstd::iterator_traits<TIterator>::value_type) == 1, "Type not supported");
|
||||
ETL_STATIC_ASSERT(sizeof(typename etl::iterator_traits<TIterator>::value_type) == 1, "Type not supported");
|
||||
|
||||
while (begin != end)
|
||||
{
|
||||
|
||||
@ -72,7 +72,7 @@ SOFTWARE.
|
||||
#endif
|
||||
|
||||
// The macros below are dependent on the profile.
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_FORCE_NO_ADVANCED_CPP)
|
||||
#define ETL_CONSTEXPR constexpr
|
||||
#define ETL_CONST_OR_CONSTEXPR constexpr
|
||||
#define ETL_DELETE = delete
|
||||
@ -86,7 +86,7 @@ SOFTWARE.
|
||||
#define ETL_NOEXCEPT_EXPR(expression)
|
||||
#endif
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
#if ETL_CPP17_SUPPORTED && !defined(ETL_FORCE_NO_ADVANCED_CPP)
|
||||
#define ETL_CONSTEXPR17 constexpr
|
||||
#define ETL_IF_CONSTEXPR constexpr
|
||||
#define ETL_NODISCARD [[nodiscard]]
|
||||
@ -102,7 +102,7 @@ SOFTWARE.
|
||||
#define ETL_EXPLICIT_STRING_FROM_CHAR
|
||||
#endif
|
||||
|
||||
// Sort out names for STL/No STL options.
|
||||
// Sort out namespaces for STL/No STL options.
|
||||
#include "private/choose_namespace.h"
|
||||
|
||||
#endif
|
||||
|
||||
@ -224,7 +224,7 @@ namespace etl
|
||||
|
||||
if (p)
|
||||
{
|
||||
::new (p) T(etlstd::forward<Args>(args)...);
|
||||
::new (p) T(etl::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
return p;
|
||||
@ -492,7 +492,7 @@ namespace etl
|
||||
template <typename U>
|
||||
U* allocate()
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(sizeof(U) <= TYPE_SIZE, "Type too large for pool");
|
||||
return ipool::allocate<U>();
|
||||
}
|
||||
@ -506,7 +506,7 @@ namespace etl
|
||||
template <typename U>
|
||||
U* create()
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(sizeof(U) <= TYPE_SIZE, "Type too large for pool");
|
||||
return ipool::create<U>();
|
||||
}
|
||||
@ -519,7 +519,7 @@ namespace etl
|
||||
template <typename U, typename T1>
|
||||
U* create(const T1& value1)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(sizeof(U) <= TYPE_SIZE, "Type too large for pool");
|
||||
return ipool::create<U>(value1);
|
||||
}
|
||||
@ -532,7 +532,7 @@ namespace etl
|
||||
template <typename U, typename T1, typename T2>
|
||||
U* create(const T1& value1, const T2& value2)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(sizeof(U) <= TYPE_SIZE, "Type too large for pool");
|
||||
return ipool::create<U>(value1, value2);
|
||||
}
|
||||
@ -545,7 +545,7 @@ namespace etl
|
||||
template <typename U, typename T1, typename T2, typename T3>
|
||||
U* create(const T1& value1, const T2& value2, const T3& value3)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(sizeof(U) <= TYPE_SIZE, "Type too large for pool");
|
||||
return ipool::create<U>(value1, value2, value3);
|
||||
}
|
||||
@ -558,7 +558,7 @@ namespace etl
|
||||
template <typename U, typename T1, typename T2, typename T3, typename T4>
|
||||
U* create(const T1& value1, const T2& value2, const T3& value3, const T4& value4)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(sizeof(U) <= TYPE_SIZE, "Type too large for pool");
|
||||
return ipool::create<U>(value1, value2, value3, value4);
|
||||
}
|
||||
@ -569,9 +569,9 @@ namespace etl
|
||||
template <typename U, typename... Args>
|
||||
U* create(Args&&... args)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(sizeof(U) <= TYPE_SIZE, "Type too large for pool");
|
||||
return ipool::create<U>(etlstd::forward<Args>(args)...);
|
||||
return ipool::create<U>(etl::forward<Args>(args)...);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -583,7 +583,7 @@ namespace etl
|
||||
template <typename U>
|
||||
void destroy(const void* const p_object)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(sizeof(U) <= TYPE_SIZE, "Type too large for pool");
|
||||
reinterpret_cast<U*>((const_cast<void*>(p_object)))->~U();
|
||||
ipool::release(p_object);
|
||||
@ -600,7 +600,7 @@ namespace etl
|
||||
};
|
||||
|
||||
///< The memory for the pool of objects.
|
||||
typename etl::aligned_storage<sizeof(Element), etlstd::alignment_of<Element>::value>::type buffer[SIZE];
|
||||
typename etl::aligned_storage<sizeof(Element), etl::alignment_of<Element>::value>::type buffer[SIZE];
|
||||
|
||||
static const uint32_t ELEMENT_SIZE = sizeof(Element);
|
||||
|
||||
@ -614,11 +614,11 @@ namespace etl
|
||||
///\ingroup pool
|
||||
//*************************************************************************
|
||||
template <typename T, const size_t SIZE_>
|
||||
class pool : public etl::generic_pool<sizeof(T), etlstd::alignment_of<T>::value, SIZE_>
|
||||
class pool : public etl::generic_pool<sizeof(T), etl::alignment_of<T>::value, SIZE_>
|
||||
{
|
||||
private:
|
||||
|
||||
typedef etl::generic_pool<sizeof(T), etlstd::alignment_of<T>::value, SIZE_> base_t;
|
||||
typedef etl::generic_pool<sizeof(T), etl::alignment_of<T>::value, SIZE_> base_t;
|
||||
|
||||
public:
|
||||
|
||||
@ -643,7 +643,7 @@ namespace etl
|
||||
template <typename U>
|
||||
U* allocate()
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<U>::value <= ALIGNMENT, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(sizeof(U) <= TYPE_SIZE, "Type too large for pool");
|
||||
return base_t::template allocate<U>();
|
||||
}
|
||||
@ -657,7 +657,7 @@ namespace etl
|
||||
template <typename U>
|
||||
U* create()
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<U>::value <= ALIGNMENT, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(sizeof(U) <= TYPE_SIZE, "Type too large for pool");
|
||||
return base_t::template create<U>();
|
||||
}
|
||||
@ -670,7 +670,7 @@ namespace etl
|
||||
template <typename U, typename T1>
|
||||
U* create(const T1& value1)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<U>::value <= ALIGNMENT, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(sizeof(U) <= TYPE_SIZE, "Type too large for pool");
|
||||
return base_t::template create<U>(value1);
|
||||
}
|
||||
@ -683,7 +683,7 @@ namespace etl
|
||||
template <typename U, typename T1, typename T2>
|
||||
U* create(const T1& value1, const T2& value2)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<U>::value <= ALIGNMENT, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(sizeof(U) <= TYPE_SIZE, "Type too large for pool");
|
||||
return base_t::template create<U>(value1, value2);
|
||||
}
|
||||
@ -696,7 +696,7 @@ namespace etl
|
||||
template <typename U, typename T1, typename T2, typename T3>
|
||||
U* create(const T1& value1, const T2& value2, const T3& value3)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<U>::value <= ALIGNMENT, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(sizeof(U) <= TYPE_SIZE, "Type too large for pool");
|
||||
return base_t::template create<U>(value1, value2, value3);
|
||||
}
|
||||
@ -709,7 +709,7 @@ namespace etl
|
||||
template <typename U, typename T1, typename T2, typename T3, typename T4>
|
||||
U* create(const T1& value1, const T2& value2, const T3& value3, const T4& value4)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<U>::value <= ALIGNMENT, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(sizeof(U) <= TYPE_SIZE, "Type too large for pool");
|
||||
return base_t::template create<U>(value1, value2, value3, value4);
|
||||
}
|
||||
@ -722,9 +722,9 @@ namespace etl
|
||||
template <typename U, typename... Args>
|
||||
U* create(Args&&... args)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<U>::value <= ALIGNMENT, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(sizeof(U) <= TYPE_SIZE, "Type too large for pool");
|
||||
return base_t::template create<U>(etlstd::forward<Args>(args)...);
|
||||
return base_t::template create<U>(etl::forward<Args>(args)...);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -736,7 +736,7 @@ namespace etl
|
||||
template <typename U>
|
||||
void destroy(const void* const p_object)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::alignment_of<U>::value <= ALIGNMENT, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT, "Type has incompatible alignment");
|
||||
ETL_STATIC_ASSERT(sizeof(U) <= TYPE_SIZE, "Type too large for pool");
|
||||
reinterpret_cast<U*>((const_cast<void*>(p_object)))->~U();
|
||||
base_t::release(p_object);
|
||||
|
||||
@ -115,7 +115,7 @@ namespace etl
|
||||
/// \tparam TContainer to hold the T queue values
|
||||
/// \tparam TCompare to use in comparing T values
|
||||
//***************************************************************************
|
||||
template <typename T, typename TContainer, typename TCompare = etlstd::less<T> >
|
||||
template <typename T, typename TContainer, typename TCompare = etl::less<T> >
|
||||
class ipriority_queue
|
||||
{
|
||||
public:
|
||||
@ -126,7 +126,7 @@ namespace etl
|
||||
typedef T& reference; ///< A reference to the type used in the queue.
|
||||
typedef const T& const_reference; ///< A const reference to the type used in the queue.
|
||||
typedef typename TContainer::size_type size_type; ///< The type used for determining the size of the queue.
|
||||
typedef typename etlstd::iterator_traits<typename TContainer::iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<typename TContainer::iterator>::difference_type difference_type;
|
||||
|
||||
private:
|
||||
|
||||
@ -165,7 +165,7 @@ namespace etl
|
||||
// Put element at end
|
||||
container.push_back(value);
|
||||
// Make elements in container into heap
|
||||
etlstd::push_heap(container.begin(), container.end(), compare);
|
||||
etl::push_heap(container.begin(), container.end(), compare);
|
||||
}
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_STLPORT) && !defined(ETL_PRIORITY_QUEUE_FORCE_CPP03)
|
||||
@ -181,9 +181,9 @@ namespace etl
|
||||
ETL_ASSERT(!full(), ETL_ERROR(etl::priority_queue_full));
|
||||
|
||||
// Put element at end
|
||||
container.emplace_back(etlstd::forward<Args>(args)...);
|
||||
container.emplace_back(etl::forward<Args>(args)...);
|
||||
// Make elements in container into heap
|
||||
etlstd::push_heap(container.begin(), container.end(), compare);
|
||||
etl::push_heap(container.begin(), container.end(), compare);
|
||||
}
|
||||
#else
|
||||
//*************************************************************************
|
||||
@ -200,7 +200,7 @@ namespace etl
|
||||
// Put element at end
|
||||
container.emplace_back(value1);
|
||||
// Make elements in container into heap
|
||||
etlstd::push_heap(container.begin(), container.end(), compare);
|
||||
etl::push_heap(container.begin(), container.end(), compare);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -217,7 +217,7 @@ namespace etl
|
||||
// Put element at end
|
||||
container.emplace_back(value1, value2);
|
||||
// Make elements in container into heap
|
||||
etlstd::push_heap(container.begin(), container.end(), compare);
|
||||
etl::push_heap(container.begin(), container.end(), compare);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -234,7 +234,7 @@ namespace etl
|
||||
// Put element at end
|
||||
container.emplace_back(value1, value2, value3);
|
||||
// Make elements in container into heap
|
||||
etlstd::push_heap(container.begin(), container.end(), compare);
|
||||
etl::push_heap(container.begin(), container.end(), compare);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -251,7 +251,7 @@ namespace etl
|
||||
// Put element at end
|
||||
container.emplace_back(value1, value2, value3, value4);
|
||||
// Make elements in container into heap
|
||||
etlstd::push_heap(container.begin(), container.end(), compare);
|
||||
etl::push_heap(container.begin(), container.end(), compare);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -268,14 +268,14 @@ namespace etl
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first, last);
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(d >= 0, ETL_ERROR(etl::priority_queue_iterator));
|
||||
ETL_ASSERT(static_cast<size_t>(d) <= max_size(), ETL_ERROR(etl::priority_queue_full));
|
||||
#endif
|
||||
|
||||
clear();
|
||||
container.assign(first, last);
|
||||
etlstd::make_heap(container.begin(), container.end(), compare);
|
||||
etl::make_heap(container.begin(), container.end(), compare);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -285,7 +285,7 @@ namespace etl
|
||||
void pop()
|
||||
{
|
||||
// Move largest element to end
|
||||
etlstd::pop_heap(container.begin(), container.end(), compare);
|
||||
etl::pop_heap(container.begin(), container.end(), compare);
|
||||
// Actually remove largest element at end
|
||||
container.pop_back();
|
||||
}
|
||||
@ -386,7 +386,7 @@ namespace etl
|
||||
/// \tparam T The type this queue should support.
|
||||
/// \tparam SIZE The maximum capacity of the queue.
|
||||
//***************************************************************************
|
||||
template <typename T, const size_t SIZE, typename TContainer = etl::vector<T, SIZE>, typename TCompare = etlstd::less<typename TContainer::value_type> >
|
||||
template <typename T, const size_t SIZE, typename TContainer = etl::vector<T, SIZE>, typename TCompare = etl::less<typename TContainer::value_type> >
|
||||
class priority_queue : public etl::ipriority_queue<T, TContainer, TCompare>
|
||||
{
|
||||
public:
|
||||
|
||||
@ -36,8 +36,8 @@ SOFTWARE.
|
||||
#undef ETL_OR_STD
|
||||
|
||||
#if defined(ETL_NO_STL) && !defined(ETL_IN_UNIT_TEST)
|
||||
// If we're not using the STL and we are not unit testing, then use the ETL's definitions under the etlstd namespace
|
||||
#define ETL_OR_STD etlstd
|
||||
// If we're not using the STL and we are not unit testing, then use the ETL's definitions under the etl namespace
|
||||
#define ETL_OR_STD etl
|
||||
#else
|
||||
// We will use the STL's definitions under the std namespace
|
||||
#define ETL_OR_STD std
|
||||
|
||||
@ -59,7 +59,7 @@ namespace etl
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
typedef size_t size_type;
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
protected:
|
||||
|
||||
@ -441,7 +441,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
void initialise_source_external_buffer_after_move()
|
||||
{
|
||||
ETL_SUBTRACT_DEBUG_COUNT(int32_t(etlstd::distance(p_buffer, p_end)))
|
||||
ETL_SUBTRACT_DEBUG_COUNT(int32_t(etl::distance(p_buffer, p_end)))
|
||||
|
||||
p_end = p_buffer;
|
||||
}
|
||||
@ -451,7 +451,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
void initialise_destination_external_buffer_after_move()
|
||||
{
|
||||
ETL_ADD_DEBUG_COUNT(int32_t(etlstd::distance(p_buffer, p_end)))
|
||||
ETL_ADD_DEBUG_COUNT(int32_t(etl::distance(p_buffer, p_end)))
|
||||
}
|
||||
};
|
||||
|
||||
@ -470,7 +470,7 @@ namespace etl
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
typedef size_t size_type;
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
protected:
|
||||
|
||||
@ -852,7 +852,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
void initialise_source_external_buffer_after_move()
|
||||
{
|
||||
ETL_SUBTRACT_DEBUG_COUNT(int32_t(etlstd::distance(p_buffer, p_end)))
|
||||
ETL_SUBTRACT_DEBUG_COUNT(int32_t(etl::distance(p_buffer, p_end)))
|
||||
|
||||
p_end = p_buffer;
|
||||
}
|
||||
@ -862,7 +862,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
void initialise_destination_external_buffer_after_move()
|
||||
{
|
||||
ETL_ADD_DEBUG_COUNT(int32_t(etlstd::distance(p_buffer, p_end)))
|
||||
ETL_ADD_DEBUG_COUNT(int32_t(etl::distance(p_buffer, p_end)))
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ SOFTWARE.
|
||||
* This file is intended to evaluated multiple times by design.
|
||||
*/
|
||||
|
||||
#ifdef ETL_COMPILER_MICROSOFT
|
||||
#pragma pop_macro("min")
|
||||
#pragma pop_macro("max")
|
||||
#if defined(ETL_COMPILER_MICROSOFT)
|
||||
#pragma pop_macro("min")
|
||||
#pragma pop_macro("max")
|
||||
#endif
|
||||
|
||||
@ -33,9 +33,9 @@ SOFTWARE.
|
||||
* This file is intended to evaluated multiple times by design.
|
||||
*/
|
||||
|
||||
#ifdef ETL_COMPILER_MICROSOFT
|
||||
#pragma push_macro("min")
|
||||
#pragma push_macro("max")
|
||||
#undef min
|
||||
#undef max
|
||||
#if defined(ETL_COMPILER_MICROSOFT)
|
||||
#pragma push_macro("min")
|
||||
#pragma push_macro("max")
|
||||
#undef min
|
||||
#undef max
|
||||
#endif
|
||||
|
||||
@ -70,7 +70,7 @@ namespace etl
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
typedef size_t size_type;
|
||||
typedef etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
public:
|
||||
|
||||
@ -211,7 +211,7 @@ namespace etl
|
||||
// Size up if necessary.
|
||||
if (p_end < p_new_end)
|
||||
{
|
||||
etlstd::fill(p_end, p_new_end, value);
|
||||
etl::fill(p_end, p_new_end, value);
|
||||
}
|
||||
|
||||
p_end = p_new_end;
|
||||
@ -326,7 +326,7 @@ namespace etl
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first, last);
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(static_cast<size_t>(d) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
#endif
|
||||
|
||||
@ -402,7 +402,7 @@ namespace etl
|
||||
if (position != end())
|
||||
{
|
||||
++p_end;
|
||||
etlstd::copy_backward(position, end() - 1, end());
|
||||
etl::copy_backward(position, end() - 1, end());
|
||||
*position = value;
|
||||
}
|
||||
else
|
||||
@ -424,8 +424,8 @@ namespace etl
|
||||
{
|
||||
ETL_ASSERT((size() + 1) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
|
||||
etlstd::copy_backward(position, p_end, p_end + n);
|
||||
etlstd::fill_n(position, n, value);
|
||||
etl::copy_backward(position, p_end, p_end + n);
|
||||
etl::fill_n(position, n, value);
|
||||
|
||||
p_end += n;
|
||||
}
|
||||
@ -441,12 +441,12 @@ namespace etl
|
||||
template <typename TIterator>
|
||||
void insert(iterator position, TIterator first, TIterator last)
|
||||
{
|
||||
size_t count = etlstd::distance(first, last);
|
||||
size_t count = etl::distance(first, last);
|
||||
|
||||
ETL_ASSERT((size() + count) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
|
||||
etlstd::copy_backward(position, p_end, p_end + count);
|
||||
etlstd::copy(first, last, position);
|
||||
etl::copy_backward(position, p_end, p_end + count);
|
||||
etl::copy(first, last, position);
|
||||
p_end += count;
|
||||
}
|
||||
|
||||
@ -457,7 +457,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
iterator erase(iterator i_element)
|
||||
{
|
||||
etlstd::copy(i_element + 1, end(), i_element);
|
||||
etl::copy(i_element + 1, end(), i_element);
|
||||
--p_end;
|
||||
|
||||
return i_element;
|
||||
@ -473,8 +473,8 @@ namespace etl
|
||||
//*********************************************************************
|
||||
iterator erase(iterator first, iterator last)
|
||||
{
|
||||
etlstd::copy(last, end(), first);
|
||||
size_t n_delete = etlstd::distance(first, last);
|
||||
etl::copy(last, end(), first);
|
||||
size_t n_delete = etl::distance(first, last);
|
||||
|
||||
// Just adjust the count.
|
||||
p_end -= n_delete;
|
||||
@ -580,7 +580,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
inline bool operator ==(const etl::pvoidvector& lhs, const etl::pvoidvector& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -604,7 +604,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
inline bool operator <(const etl::pvoidvector& lhs, const etl::pvoidvector& rhs)
|
||||
{
|
||||
return etlstd::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
|
||||
@ -56,7 +56,7 @@ namespace etl
|
||||
template <typename TIString>
|
||||
void add_alignment(TIString& str, typename TIString::iterator position, const etl::basic_format_spec<TIString>& format)
|
||||
{
|
||||
uint32_t length = static_cast<uint32_t>(etlstd::distance(position, str.end()));
|
||||
uint32_t length = static_cast<uint32_t>(etl::distance(position, str.end()));
|
||||
|
||||
if (length < format.get_width())
|
||||
{
|
||||
@ -165,7 +165,7 @@ namespace etl
|
||||
}
|
||||
|
||||
// Reverse the string we appended.
|
||||
etlstd::reverse(start, str.end());
|
||||
etl::reverse(start, str.end());
|
||||
}
|
||||
|
||||
etl::private_to_string::add_alignment(str, start, format);
|
||||
@ -241,7 +241,7 @@ namespace etl
|
||||
else
|
||||
{
|
||||
// Make sure we format the two halves correctly.
|
||||
uint32_t max_precision = etlstd::numeric_limits<T>::digits10;
|
||||
uint32_t max_precision = etl::numeric_limits<T>::digits10;
|
||||
|
||||
etl::basic_format_spec<TIString> integral_format = format;
|
||||
integral_format.decimal().width(0).precision(format.get_precision() > max_precision ? max_precision : format.get_precision());
|
||||
@ -354,10 +354,10 @@ namespace etl
|
||||
/// For signed integrals less than 64 bits. Default format spec.
|
||||
//***************************************************************************
|
||||
template <typename T, typename TIString>
|
||||
typename etlstd::enable_if<etlstd::is_integral<T>::value &&
|
||||
etlstd::is_signed<T>::value &&
|
||||
!etlstd::is_same<T, bool>::value &&
|
||||
!etlstd::is_same<T, int64_t>::value, const TIString&>::type
|
||||
typename etl::enable_if<etl::is_integral<T>::value &&
|
||||
etl::is_signed<T>::value &&
|
||||
!etl::is_same<T, bool>::value &&
|
||||
!etl::is_same<T, int64_t>::value, const TIString&>::type
|
||||
to_string(const T value, TIString& str, const bool append = false)
|
||||
{
|
||||
etl::basic_format_spec<TIString> format;
|
||||
@ -371,10 +371,10 @@ namespace etl
|
||||
/// For signed integrals less than 64 bits. Supplied format spec.
|
||||
//***************************************************************************
|
||||
template <typename T, typename TIString>
|
||||
typename etlstd::enable_if<etlstd::is_integral<T>::value &&
|
||||
etlstd::is_signed<T>::value &&
|
||||
!etlstd::is_same<T, bool>::value &&
|
||||
!etlstd::is_same<T, int64_t>::value, const TIString&>::type
|
||||
typename etl::enable_if<etl::is_integral<T>::value &&
|
||||
etl::is_signed<T>::value &&
|
||||
!etl::is_same<T, bool>::value &&
|
||||
!etl::is_same<T, int64_t>::value, const TIString&>::type
|
||||
to_string(const T value, TIString& str, const etl::basic_format_spec<TIString>& format, const bool append = false)
|
||||
{
|
||||
etl::private_to_string::add_integral(int32_t(value), str, format, append);
|
||||
@ -386,10 +386,10 @@ namespace etl
|
||||
/// For unsigned integrals less then 64 bits. Default format spec.
|
||||
//***************************************************************************
|
||||
template <typename T, typename TIString>
|
||||
typename etlstd::enable_if<etlstd::is_integral<T>::value &&
|
||||
etlstd::is_unsigned<T>::value &&
|
||||
!etlstd::is_same<T, bool>::value &&
|
||||
!etlstd::is_same<T, uint64_t>::value, const TIString&>::type
|
||||
typename etl::enable_if<etl::is_integral<T>::value &&
|
||||
etl::is_unsigned<T>::value &&
|
||||
!etl::is_same<T, bool>::value &&
|
||||
!etl::is_same<T, uint64_t>::value, const TIString&>::type
|
||||
to_string(const T value, TIString& str, const bool append = false)
|
||||
{
|
||||
etl::basic_format_spec<TIString> format;
|
||||
@ -403,10 +403,10 @@ namespace etl
|
||||
/// For unsigned integrals less than 64 bits. Supplied format spec.
|
||||
//***************************************************************************
|
||||
template <typename T, typename TIString>
|
||||
typename etlstd::enable_if<etlstd::is_integral<T>::value &&
|
||||
etlstd::is_unsigned<T>::value &&
|
||||
!etlstd::is_same<T, bool>::value &&
|
||||
!etlstd::is_same<T, uint64_t>::value, const TIString&>::type
|
||||
typename etl::enable_if<etl::is_integral<T>::value &&
|
||||
etl::is_unsigned<T>::value &&
|
||||
!etl::is_same<T, bool>::value &&
|
||||
!etl::is_same<T, uint64_t>::value, const TIString&>::type
|
||||
to_string(const T value, TIString& str, const etl::basic_format_spec<TIString>& format, const bool append = false)
|
||||
{
|
||||
etl::private_to_string::add_integral(uint32_t(value), str, format, append);
|
||||
@ -418,10 +418,10 @@ namespace etl
|
||||
/// For signed 64 bit integrals. Default format spec.
|
||||
//***************************************************************************
|
||||
template <typename T, typename TIString>
|
||||
typename etlstd::enable_if<etlstd::is_integral<T>::value &&
|
||||
etlstd::is_signed<T>::value &&
|
||||
!etlstd::is_same<T, bool>::value &&
|
||||
etlstd::is_same<T, int64_t>::value, const TIString&>::type
|
||||
typename etl::enable_if<etl::is_integral<T>::value &&
|
||||
etl::is_signed<T>::value &&
|
||||
!etl::is_same<T, bool>::value &&
|
||||
etl::is_same<T, int64_t>::value, const TIString&>::type
|
||||
to_string(const T value, TIString& str, const bool append = false)
|
||||
{
|
||||
etl::basic_format_spec<TIString> format;
|
||||
@ -435,10 +435,10 @@ namespace etl
|
||||
/// For signed 64 bit integrals. Supplied format spec.
|
||||
//***************************************************************************
|
||||
template <typename T, typename TIString>
|
||||
typename etlstd::enable_if<etlstd::is_integral<T>::value &&
|
||||
etlstd::is_signed<T>::value &&
|
||||
!etlstd::is_same<T, bool>::value &&
|
||||
etlstd::is_same<T, int64_t>::value, const TIString&>::type
|
||||
typename etl::enable_if<etl::is_integral<T>::value &&
|
||||
etl::is_signed<T>::value &&
|
||||
!etl::is_same<T, bool>::value &&
|
||||
etl::is_same<T, int64_t>::value, const TIString&>::type
|
||||
to_string(const T value, TIString& str, const etl::basic_format_spec<TIString>& format, const bool append = false)
|
||||
{
|
||||
etl::private_to_string::add_integral(int64_t(value), str, format, append);
|
||||
@ -450,10 +450,10 @@ namespace etl
|
||||
/// For unsigned 64 bit integrals. Default format spec.
|
||||
//***************************************************************************
|
||||
template <typename T, typename TIString>
|
||||
typename etlstd::enable_if<etlstd::is_integral<T>::value &&
|
||||
etlstd::is_unsigned<T>::value &&
|
||||
!etlstd::is_same<T, bool>::value &&
|
||||
etlstd::is_same<T, uint64_t>::value, const TIString&>::type
|
||||
typename etl::enable_if<etl::is_integral<T>::value &&
|
||||
etl::is_unsigned<T>::value &&
|
||||
!etl::is_same<T, bool>::value &&
|
||||
etl::is_same<T, uint64_t>::value, const TIString&>::type
|
||||
to_string(const T value, TIString& str, const bool append = false)
|
||||
{
|
||||
etl::basic_format_spec<TIString> format;
|
||||
@ -467,10 +467,10 @@ namespace etl
|
||||
/// For unsigned 64 bit integrals. Supplied format spec.
|
||||
//***************************************************************************
|
||||
template <typename T, typename TIString>
|
||||
typename etlstd::enable_if<etlstd::is_integral<T>::value &&
|
||||
etlstd::is_unsigned<T>::value &&
|
||||
!etlstd::is_same<T, bool>::value &&
|
||||
etlstd::is_same<T, uint64_t>::value, const TIString&>::type
|
||||
typename etl::enable_if<etl::is_integral<T>::value &&
|
||||
etl::is_unsigned<T>::value &&
|
||||
!etl::is_same<T, bool>::value &&
|
||||
etl::is_same<T, uint64_t>::value, const TIString&>::type
|
||||
to_string(const T value, TIString& str, const etl::basic_format_spec<TIString>& format, const bool append = false)
|
||||
{
|
||||
etl::private_to_string::add_integral(uint64_t(value), str, format, append);
|
||||
@ -482,7 +482,7 @@ namespace etl
|
||||
/// For floating point. Default format spec.
|
||||
//***************************************************************************
|
||||
template <typename T, typename TIString>
|
||||
typename etlstd::enable_if<etlstd::is_floating_point<T>::value, const TIString&>::type
|
||||
typename etl::enable_if<etl::is_floating_point<T>::value, const TIString&>::type
|
||||
to_string(const T value, TIString& str, const bool append = false)
|
||||
{
|
||||
etl::basic_format_spec<TIString> format;
|
||||
@ -496,7 +496,7 @@ namespace etl
|
||||
/// For floating point. Supplied format spec.
|
||||
//***************************************************************************
|
||||
template <typename T, typename TIString>
|
||||
typename etlstd::enable_if<etlstd::is_floating_point<T>::value, const TIString&>::type
|
||||
typename etl::enable_if<etl::is_floating_point<T>::value, const TIString&>::type
|
||||
to_string(const T value, TIString& str, const etl::basic_format_spec<TIString>& format, const bool append = false)
|
||||
{
|
||||
etl::private_to_string::add_floating_point(value, str, format, append);
|
||||
|
||||
@ -330,7 +330,7 @@ namespace etl
|
||||
#if defined(ETL_CHECK_PUSH_POP)
|
||||
ETL_ASSERT(!full(), ETL_ERROR(queue_full));
|
||||
#endif
|
||||
::new (&p_buffer[in]) T(etlstd::forward<Args>(args)...);
|
||||
::new (&p_buffer[in]) T(etl::forward<Args>(args)...);
|
||||
add_in();
|
||||
}
|
||||
#else
|
||||
@ -582,7 +582,7 @@ namespace etl
|
||||
private:
|
||||
|
||||
/// The uninitialised buffer of T used in the stack.
|
||||
typename etl::aligned_storage<sizeof(T), etlstd::alignment_of<T>::value>::type buffer[SIZE];
|
||||
typename etl::aligned_storage<sizeof(T), etl::alignment_of<T>::value>::type buffer[SIZE];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -179,7 +179,7 @@ namespace etl
|
||||
{
|
||||
access.lock();
|
||||
|
||||
bool result = emplace_implementation(etlstd::forward<Args>(args)...);
|
||||
bool result = emplace_implementation(etl::forward<Args>(args)...);
|
||||
|
||||
access.unlock();
|
||||
|
||||
@ -392,7 +392,7 @@ namespace etl
|
||||
{
|
||||
if (current_size != MAX_SIZE)
|
||||
{
|
||||
::new (&p_buffer[write_index]) T(etlstd::forward<Args>(args)...);
|
||||
::new (&p_buffer[write_index]) T(etl::forward<Args>(args)...);
|
||||
|
||||
write_index = get_next_index(write_index, MAX_SIZE);
|
||||
|
||||
@ -585,7 +585,7 @@ namespace etl
|
||||
queue_mpmc_mutex& operator = (const queue_mpmc_mutex&);
|
||||
|
||||
/// The uninitialised buffer of T used in the queue_mpmc_mutex.
|
||||
typename etl::aligned_storage<sizeof(T), etlstd::alignment_of<T>::value>::type buffer[MAX_SIZE];
|
||||
typename etl::aligned_storage<sizeof(T), etl::alignment_of<T>::value>::type buffer[MAX_SIZE];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -239,7 +239,7 @@ namespace etl
|
||||
|
||||
if (next_index != read.load(etl::memory_order_acquire))
|
||||
{
|
||||
::new (&p_buffer[write_index]) T(etlstd::forward<Args>(args)...);
|
||||
::new (&p_buffer[write_index]) T(etl::forward<Args>(args)...);
|
||||
|
||||
write.store(next_index, etl::memory_order_release);
|
||||
|
||||
@ -469,7 +469,7 @@ namespace etl
|
||||
private:
|
||||
|
||||
/// The uninitialised buffer of T used in the queue_spsc.
|
||||
typename etl::aligned_storage<sizeof(T), etlstd::alignment_of<T>::value>::type buffer[RESERVED_SIZE];
|
||||
typename etl::aligned_storage<sizeof(T), etl::alignment_of<T>::value>::type buffer[RESERVED_SIZE];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ namespace etl
|
||||
template <typename ... Args>
|
||||
bool emplace_from_isr(Args&&... args)
|
||||
{
|
||||
return emplace_implementation(etlstd::forward<Args>(args)...);
|
||||
return emplace_implementation(etl::forward<Args>(args)...);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -207,7 +207,7 @@ namespace etl
|
||||
{
|
||||
if (current_size != MAX_SIZE)
|
||||
{
|
||||
::new (&p_buffer[write_index]) T(etlstd::forward<Args>(args)...);
|
||||
::new (&p_buffer[write_index]) T(etl::forward<Args>(args)...);
|
||||
|
||||
write_index = get_next_index(write_index, MAX_SIZE);
|
||||
|
||||
@ -440,7 +440,7 @@ namespace etl
|
||||
{
|
||||
TAccess::lock();
|
||||
|
||||
bool result = this->emplace_implementation(etlstd::forward<Args>(args)...);
|
||||
bool result = this->emplace_implementation(etl::forward<Args>(args)...);
|
||||
|
||||
TAccess::unlock();
|
||||
|
||||
@ -676,7 +676,7 @@ namespace etl
|
||||
queue_spsc_isr& operator = (const queue_spsc_isr&);
|
||||
|
||||
/// The uninitialised buffer of T used in the queue_spsc_isr.
|
||||
typename etl::aligned_storage<sizeof(T), etlstd::alignment_of<T>::value>::type buffer[MAX_SIZE];
|
||||
typename etl::aligned_storage<sizeof(T), etl::alignment_of<T>::value>::type buffer[MAX_SIZE];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -83,7 +83,7 @@ namespace etl
|
||||
template <typename ... Args>
|
||||
bool emplace_from_unlocked(Args&&... args)
|
||||
{
|
||||
return emplace_implementation(etlstd::forward<Args>(args)...);
|
||||
return emplace_implementation(etl::forward<Args>(args)...);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -208,7 +208,7 @@ namespace etl
|
||||
{
|
||||
if (current_size != MAX_SIZE)
|
||||
{
|
||||
::new (&p_buffer[write_index]) T(etlstd::forward<Args>(args)...);
|
||||
::new (&p_buffer[write_index]) T(etl::forward<Args>(args)...);
|
||||
|
||||
write_index = get_next_index(write_index, MAX_SIZE);
|
||||
|
||||
@ -437,7 +437,7 @@ namespace etl
|
||||
{
|
||||
lock();
|
||||
|
||||
bool result = this->emplace_implementation(etlstd::forward<Args>(args)...);
|
||||
bool result = this->emplace_implementation(etl::forward<Args>(args)...);
|
||||
|
||||
unlock();
|
||||
|
||||
@ -677,7 +677,7 @@ namespace etl
|
||||
queue_spsc_locked& operator = (const queue_spsc_locked&);
|
||||
|
||||
/// The uninitialised buffer of T used in the queue_spsc_locked.
|
||||
typename etl::aligned_storage<sizeof(T), etlstd::alignment_of<T>::value>::type buffer[MAX_SIZE];
|
||||
typename etl::aligned_storage<sizeof(T), etl::alignment_of<T>::value>::type buffer[MAX_SIZE];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@ namespace etl
|
||||
/// Can be used as a reference type for all reference_flat_maps containing a specific type.
|
||||
///\ingroup reference_flat_map
|
||||
//***************************************************************************
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare = etlstd::less<TKey> >
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare = etl::less<TKey> >
|
||||
class ireference_flat_map
|
||||
{
|
||||
public:
|
||||
@ -319,7 +319,7 @@ namespace etl
|
||||
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
protected:
|
||||
|
||||
@ -525,10 +525,10 @@ namespace etl
|
||||
template <typename TIterator>
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
ETL_STATIC_ASSERT((etlstd::is_same<value_type, typename etlstd::iterator_traits<TIterator>::value_type>::value), "Incompatible data for assign");
|
||||
ETL_STATIC_ASSERT((etl::is_same<value_type, typename etl::iterator_traits<TIterator>::value_type>::value), "Incompatible data for assign");
|
||||
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first, last);
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_map_full));
|
||||
#endif
|
||||
|
||||
@ -693,7 +693,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
iterator lower_bound(key_parameter_t key)
|
||||
{
|
||||
return etlstd::lower_bound(begin(), end(), key, compare);
|
||||
return etl::lower_bound(begin(), end(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -703,7 +703,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
const_iterator lower_bound(key_parameter_t key) const
|
||||
{
|
||||
return etlstd::lower_bound(cbegin(), cend(), key, compare);
|
||||
return etl::lower_bound(cbegin(), cend(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -713,7 +713,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
iterator upper_bound(key_parameter_t key)
|
||||
{
|
||||
return etlstd::upper_bound(begin(), end(), key, compare);
|
||||
return etl::upper_bound(begin(), end(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -723,7 +723,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
const_iterator upper_bound(key_parameter_t key) const
|
||||
{
|
||||
return etlstd::upper_bound(begin(), end(), key, compare);
|
||||
return etl::upper_bound(begin(), end(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -733,9 +733,9 @@ namespace etl
|
||||
//*********************************************************************
|
||||
ETL_OR_STD::pair<iterator, iterator> equal_range(key_parameter_t key)
|
||||
{
|
||||
iterator i_lower = etlstd::lower_bound(begin(), end(), key, compare);
|
||||
iterator i_lower = etl::lower_bound(begin(), end(), key, compare);
|
||||
|
||||
return ETL_MAKE_PAIR(i_lower, etlstd::upper_bound(i_lower, end(), key, compare));
|
||||
return ETL_OR_STD::make_pair(i_lower, etl::upper_bound(i_lower, end(), key, compare));
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -745,9 +745,9 @@ namespace etl
|
||||
//*********************************************************************
|
||||
ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(key_parameter_t key) const
|
||||
{
|
||||
const_iterator i_lower = etlstd::lower_bound(cbegin(), cend(), key, compare);
|
||||
const_iterator i_lower = etl::lower_bound(cbegin(), cend(), key, compare);
|
||||
|
||||
return ETL_MAKE_PAIR(i_lower, etlstd::upper_bound(i_lower, cend(), key, compare));
|
||||
return ETL_OR_STD::make_pair(i_lower, etl::upper_bound(i_lower, cend(), key, compare));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -886,7 +886,7 @@ namespace etl
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare>
|
||||
bool operator ==(const etl::ireference_flat_map<TKey, TMapped, TKeyCompare>& lhs, const etl::ireference_flat_map<TKey, TMapped, TKeyCompare>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -906,11 +906,11 @@ namespace etl
|
||||
/// A reference_flat_map implementation that uses a fixed size buffer.
|
||||
///\tparam TKey The key type.
|
||||
///\tparam TValue The value type.
|
||||
///\tparam TCompare The type to compare keys. Default = etlstd::less<TKey>
|
||||
///\tparam TCompare The type to compare keys. Default = etl::less<TKey>
|
||||
///\tparam MAX_SIZE_ The maximum number of elements that can be stored.
|
||||
///\ingroup reference_flat_map
|
||||
//***************************************************************************
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = etlstd::less<TKey> >
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = etl::less<TKey> >
|
||||
class reference_flat_map : public ireference_flat_map<TKey, TValue, TCompare>
|
||||
{
|
||||
public:
|
||||
|
||||
@ -78,7 +78,7 @@ namespace etl
|
||||
/// Can be used as a reference type for all reference_flat_multimaps containing a specific type.
|
||||
///\ingroup reference_flat_multimap
|
||||
//***************************************************************************
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare = etlstd::less<TKey> >
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare = etl::less<TKey> >
|
||||
class ireference_flat_multimap
|
||||
{
|
||||
public:
|
||||
@ -294,7 +294,7 @@ namespace etl
|
||||
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
protected:
|
||||
|
||||
@ -443,7 +443,7 @@ namespace etl
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first, last);
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_multimap_full));
|
||||
#endif
|
||||
|
||||
@ -513,7 +513,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t d = etlstd::distance(range.first, range.second);
|
||||
size_t d = etl::distance(range.first, range.second);
|
||||
erase(range.first, range.second);
|
||||
return d;
|
||||
}
|
||||
@ -605,7 +605,7 @@ namespace etl
|
||||
{
|
||||
ETL_OR_STD::pair<const_iterator, const_iterator> range = equal_range(key);
|
||||
|
||||
return etlstd::distance(range.first, range.second);
|
||||
return etl::distance(range.first, range.second);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -615,7 +615,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
iterator lower_bound(key_parameter_t key)
|
||||
{
|
||||
return etlstd::lower_bound(begin(), end(), key, compare);
|
||||
return etl::lower_bound(begin(), end(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -625,7 +625,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
const_iterator lower_bound(key_parameter_t key) const
|
||||
{
|
||||
return etlstd::lower_bound(cbegin(), cend(), key, compare);
|
||||
return etl::lower_bound(cbegin(), cend(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -635,7 +635,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
iterator upper_bound(key_parameter_t key)
|
||||
{
|
||||
return etlstd::upper_bound(begin(), end(), key, compare);
|
||||
return etl::upper_bound(begin(), end(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -645,7 +645,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
const_iterator upper_bound(key_parameter_t key) const
|
||||
{
|
||||
return etlstd::upper_bound(begin(), end(), key, compare);
|
||||
return etl::upper_bound(begin(), end(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -655,9 +655,9 @@ namespace etl
|
||||
//*********************************************************************
|
||||
ETL_OR_STD::pair<iterator, iterator> equal_range(key_parameter_t key)
|
||||
{
|
||||
iterator i_lower = etlstd::lower_bound(begin(), end(), key, compare);
|
||||
iterator i_lower = etl::lower_bound(begin(), end(), key, compare);
|
||||
|
||||
return ETL_MAKE_PAIR(i_lower, etlstd::upper_bound(i_lower, end(), key, compare));
|
||||
return ETL_OR_STD::make_pair(i_lower, etl::upper_bound(i_lower, end(), key, compare));
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -667,9 +667,9 @@ namespace etl
|
||||
//*********************************************************************
|
||||
ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(key_parameter_t key) const
|
||||
{
|
||||
const_iterator i_lower = etlstd::lower_bound(cbegin(), cend(), key, compare);
|
||||
const_iterator i_lower = etl::lower_bound(cbegin(), cend(), key, compare);
|
||||
|
||||
return ETL_MAKE_PAIR(i_lower, etlstd::upper_bound(i_lower, cend(), key, compare));
|
||||
return ETL_OR_STD::make_pair(i_lower, etl::upper_bound(i_lower, cend(), key, compare));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -799,7 +799,7 @@ namespace etl
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare>
|
||||
bool operator ==(const etl::ireference_flat_multimap<TKey, TMapped, TKeyCompare>& lhs, const etl::ireference_flat_multimap<TKey, TMapped, TKeyCompare>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -819,11 +819,11 @@ namespace etl
|
||||
/// A reference_flat_multimap implementation that uses a fixed size buffer.
|
||||
///\tparam TKey The key type.
|
||||
///\tparam TValue The value type.
|
||||
///\tparam TCompare The type to compare keys. Default = etlstd::less<TKey>
|
||||
///\tparam TCompare The type to compare keys. Default = etl::less<TKey>
|
||||
///\tparam MAX_SIZE_ The maximum number of elements that can be stored.
|
||||
///\ingroup reference_flat_multimap
|
||||
//***************************************************************************
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = etlstd::less<TKey> >
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, typename TCompare = etl::less<TKey> >
|
||||
class reference_flat_multimap : public ireference_flat_multimap<TKey, TValue, TCompare>
|
||||
{
|
||||
public:
|
||||
|
||||
@ -98,7 +98,7 @@ namespace etl
|
||||
/// Can be used as a reference type for all reference_flat_multisets containing a specific type.
|
||||
///\ingroup reference_flat_multiset
|
||||
//***************************************************************************
|
||||
template <typename T, typename TKeyCompare = etlstd::less<T> >
|
||||
template <typename T, typename TKeyCompare = etl::less<T> >
|
||||
class ireference_flat_multiset
|
||||
{
|
||||
public:
|
||||
@ -318,7 +318,7 @@ namespace etl
|
||||
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns an iterator to the beginning of the reference_flat_multiset.
|
||||
@ -439,7 +439,7 @@ namespace etl
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first, last);
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_multiset_full));
|
||||
#endif
|
||||
|
||||
@ -462,7 +462,7 @@ namespace etl
|
||||
|
||||
ETL_ASSERT(!lookup.full(), ETL_ERROR(flat_multiset_full));
|
||||
|
||||
iterator i_element = etlstd::lower_bound(begin(), end(), value, compare);
|
||||
iterator i_element = etl::lower_bound(begin(), end(), value, compare);
|
||||
|
||||
if (i_element == end())
|
||||
{
|
||||
@ -524,7 +524,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t d = etlstd::distance(range.first, range.second);
|
||||
size_t d = etl::distance(range.first, range.second);
|
||||
erase(range.first, range.second);
|
||||
return d;
|
||||
}
|
||||
@ -566,7 +566,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
iterator find(parameter_t key)
|
||||
{
|
||||
iterator itr = etlstd::lower_bound(begin(), end(), key, compare);
|
||||
iterator itr = etl::lower_bound(begin(), end(), key, compare);
|
||||
|
||||
if (itr != end())
|
||||
{
|
||||
@ -590,7 +590,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
const_iterator find(parameter_t key) const
|
||||
{
|
||||
const_iterator itr = etlstd::lower_bound(begin(), end(), key, compare);
|
||||
const_iterator itr = etl::lower_bound(begin(), end(), key, compare);
|
||||
|
||||
if (itr != end())
|
||||
{
|
||||
@ -616,7 +616,7 @@ namespace etl
|
||||
{
|
||||
ETL_OR_STD::pair<const_iterator, const_iterator> range = equal_range(key);
|
||||
|
||||
return etlstd::distance(range.first, range.second);
|
||||
return etl::distance(range.first, range.second);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -626,7 +626,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
iterator lower_bound(parameter_t key)
|
||||
{
|
||||
return etlstd::lower_bound(begin(), end(), key, compare);
|
||||
return etl::lower_bound(begin(), end(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -636,7 +636,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
const_iterator lower_bound(parameter_t key) const
|
||||
{
|
||||
return etlstd::lower_bound(cbegin(), cend(), key, compare);
|
||||
return etl::lower_bound(cbegin(), cend(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -646,7 +646,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
iterator upper_bound(parameter_t key)
|
||||
{
|
||||
return etlstd::upper_bound(begin(), end(), key, compare);
|
||||
return etl::upper_bound(begin(), end(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -656,7 +656,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
const_iterator upper_bound(parameter_t key) const
|
||||
{
|
||||
return etlstd::upper_bound(cbegin(), cend(), key, compare);
|
||||
return etl::upper_bound(cbegin(), cend(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -666,7 +666,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
ETL_OR_STD::pair<iterator, iterator> equal_range(parameter_t key)
|
||||
{
|
||||
return etlstd::equal_range(begin(), end(), key, compare);
|
||||
return etl::equal_range(begin(), end(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -676,7 +676,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(parameter_t key) const
|
||||
{
|
||||
return etlstd::equal_range(begin(), end(), key, compare);
|
||||
return etl::equal_range(begin(), end(), key, compare);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -805,7 +805,7 @@ namespace etl
|
||||
/// An reference flat set
|
||||
///\ingroup reference_flat_multiset
|
||||
//***************************************************************************
|
||||
template <typename TKey, const size_t MAX_SIZE_, typename TKeyCompare = etlstd::less<TKey> >
|
||||
template <typename TKey, const size_t MAX_SIZE_, typename TKeyCompare = etl::less<TKey> >
|
||||
class reference_flat_multiset : public ireference_flat_multiset<TKey, TKeyCompare>
|
||||
{
|
||||
public:
|
||||
@ -868,7 +868,7 @@ namespace etl
|
||||
template <typename T, typename TKeyCompare>
|
||||
bool operator ==(const etl::ireference_flat_multiset<T, TKeyCompare>& lhs, const etl::ireference_flat_multiset<T, TKeyCompare>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
|
||||
@ -99,7 +99,7 @@ namespace etl
|
||||
/// Can be used as a reference type for all reference_flat_sets containing a specific type.
|
||||
///\ingroup reference_flat_set
|
||||
//***************************************************************************
|
||||
template <typename T, typename TKeyCompare = etlstd::less<T> >
|
||||
template <typename T, typename TKeyCompare = etl::less<T> >
|
||||
class ireference_flat_set
|
||||
{
|
||||
public:
|
||||
@ -319,7 +319,7 @@ namespace etl
|
||||
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns an iterator to the beginning of the reference_flat_set.
|
||||
@ -440,7 +440,7 @@ namespace etl
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first, last);
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(d <= difference_type(capacity()), ETL_ERROR(flat_set_full));
|
||||
#endif
|
||||
|
||||
@ -547,7 +547,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
iterator find(parameter_t key)
|
||||
{
|
||||
iterator itr = etlstd::lower_bound(begin(), end(), key, compare);
|
||||
iterator itr = etl::lower_bound(begin(), end(), key, compare);
|
||||
|
||||
if (itr != end())
|
||||
{
|
||||
@ -571,7 +571,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
const_iterator find(parameter_t key) const
|
||||
{
|
||||
const_iterator itr = etlstd::lower_bound(begin(), end(), key, compare);
|
||||
const_iterator itr = etl::lower_bound(begin(), end(), key, compare);
|
||||
|
||||
if (itr != end())
|
||||
{
|
||||
@ -605,7 +605,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
iterator lower_bound(parameter_t key)
|
||||
{
|
||||
return etlstd::lower_bound(begin(), end(), key, compare);
|
||||
return etl::lower_bound(begin(), end(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -615,7 +615,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
const_iterator lower_bound(parameter_t key) const
|
||||
{
|
||||
return etlstd::lower_bound(cbegin(), cend(), key, compare);
|
||||
return etl::lower_bound(cbegin(), cend(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -625,7 +625,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
iterator upper_bound(parameter_t key)
|
||||
{
|
||||
return etlstd::upper_bound(begin(), end(), key, compare);
|
||||
return etl::upper_bound(begin(), end(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -635,7 +635,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
const_iterator upper_bound(parameter_t key) const
|
||||
{
|
||||
return etlstd::upper_bound(cbegin(), cend(), key, compare);
|
||||
return etl::upper_bound(cbegin(), cend(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -645,7 +645,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
ETL_OR_STD::pair<iterator, iterator> equal_range(parameter_t key)
|
||||
{
|
||||
return etlstd::equal_range(begin(), end(), key, compare);
|
||||
return etl::equal_range(begin(), end(), key, compare);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -655,7 +655,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(parameter_t key) const
|
||||
{
|
||||
return etlstd::upper_bound(cbegin(), cend(), key, compare);
|
||||
return etl::upper_bound(cbegin(), cend(), key, compare);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -788,7 +788,7 @@ namespace etl
|
||||
/// An reference flat set
|
||||
///\ingroup reference_flat_set
|
||||
//***************************************************************************
|
||||
template <typename TKey, const size_t MAX_SIZE_, typename TKeyCompare = etlstd::less<TKey> >
|
||||
template <typename TKey, const size_t MAX_SIZE_, typename TKeyCompare = etl::less<TKey> >
|
||||
class reference_flat_set : public ireference_flat_set<TKey, TKeyCompare>
|
||||
{
|
||||
public:
|
||||
@ -851,7 +851,7 @@ namespace etl
|
||||
template <typename T, typename TKeyCompare>
|
||||
bool operator ==(const etl::ireference_flat_set<T, TKeyCompare>& lhs, const etl::ireference_flat_set<T, TKeyCompare>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
|
||||
@ -41,7 +41,7 @@ namespace etl
|
||||
template <typename T>
|
||||
struct scaled_rounding_t
|
||||
{
|
||||
typedef typename etlstd::conditional<etlstd::is_signed<T>::value, int32_t, uint32_t>::type type;
|
||||
typedef typename etl::conditional<etl::is_signed<T>::value, int32_t, uint32_t>::type type;
|
||||
};
|
||||
|
||||
//*****************************************************************************
|
||||
@ -67,7 +67,7 @@ namespace etl
|
||||
template <const size_t SCALING, typename T>
|
||||
T round_ceiling_unscaled(T value)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Type must be an integral");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Type must be an integral");
|
||||
typedef typename scaled_rounding_t<T>::type scale_t;
|
||||
|
||||
if (value >= 0)
|
||||
@ -101,7 +101,7 @@ namespace etl
|
||||
template <const size_t SCALING, typename T>
|
||||
T round_floor_unscaled(T value)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Type must be an integral");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Type must be an integral");
|
||||
typedef typename scaled_rounding_t<T>::type scale_t;
|
||||
|
||||
if (value >= 0)
|
||||
@ -136,7 +136,7 @@ namespace etl
|
||||
template <const size_t SCALING, typename T>
|
||||
T round_half_up_unscaled(T value)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Type must be an integral");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Type must be an integral");
|
||||
ETL_STATIC_ASSERT((((SCALING / 2U) * 2U) == SCALING), "Scaling must be divisible by 2");
|
||||
typedef typename scaled_rounding_t<T>::type scale_t;
|
||||
|
||||
@ -173,7 +173,7 @@ namespace etl
|
||||
template <const size_t SCALING, typename T>
|
||||
T round_half_down_unscaled(T value)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Type must be an integral");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Type must be an integral");
|
||||
ETL_STATIC_ASSERT((((SCALING / 2U) * 2U) == SCALING), "Scaling must be divisible by 2");
|
||||
typedef typename scaled_rounding_t<T>::type scale_t;
|
||||
|
||||
@ -209,7 +209,7 @@ namespace etl
|
||||
template <const size_t SCALING, typename T>
|
||||
T round_zero_unscaled(T value)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Type must be an integral");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Type must be an integral");
|
||||
typedef typename scaled_rounding_t<T>::type scale_t;
|
||||
|
||||
return T(value / scale_t(SCALING));
|
||||
@ -236,7 +236,7 @@ namespace etl
|
||||
template <const size_t SCALING, typename T>
|
||||
T round_infinity_unscaled(T value)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Type must be an integral");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Type must be an integral");
|
||||
typedef typename scaled_rounding_t<T>::type scale_t;
|
||||
|
||||
if (value >= 0)
|
||||
@ -271,7 +271,7 @@ namespace etl
|
||||
template <const size_t SCALING, typename T>
|
||||
T round_half_even_unscaled(T value)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Type must be an integral");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Type must be an integral");
|
||||
typedef typename scaled_rounding_t<T>::type scale_t;
|
||||
|
||||
// Half?
|
||||
@ -316,7 +316,7 @@ namespace etl
|
||||
template <const size_t SCALING, typename T>
|
||||
T round_half_odd_unscaled(T value)
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Type must be an integral");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Type must be an integral");
|
||||
typedef typename scaled_rounding_t<T>::type scale_t;
|
||||
|
||||
// Half?
|
||||
|
||||
@ -285,7 +285,7 @@ namespace etl
|
||||
|
||||
if (!task_list.full())
|
||||
{
|
||||
typename task_list_t::iterator itask = etlstd::upper_bound(task_list.begin(),
|
||||
typename task_list_t::iterator itask = etl::upper_bound(task_list.begin(),
|
||||
task_list.end(),
|
||||
task.get_task_priority(),
|
||||
compare_priority());
|
||||
|
||||
@ -457,7 +457,7 @@ namespace etl
|
||||
/// A templated base for all etl::set types.
|
||||
///\ingroup set
|
||||
//***************************************************************************
|
||||
template <typename T, typename TCompare = etlstd::less<T> >
|
||||
template <typename T, typename TCompare = etl::less<T> >
|
||||
class iset : public etl::set_base
|
||||
{
|
||||
public:
|
||||
@ -761,7 +761,7 @@ namespace etl
|
||||
};
|
||||
friend class const_iterator;
|
||||
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
@ -913,7 +913,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
ETL_OR_STD::pair<iterator, iterator> equal_range(const value_type& value)
|
||||
{
|
||||
return ETL_MAKE_PAIR<iterator, iterator>(
|
||||
return ETL_OR_STD::make_pair<iterator, iterator>(
|
||||
iterator(*this, find_lower_node(root_node, value)),
|
||||
iterator(*this, find_upper_node(root_node, value)));
|
||||
}
|
||||
@ -924,7 +924,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
ETL_OR_STD::pair<const_iterator, const_iterator> equal_range(const value_type& value) const
|
||||
{
|
||||
return ETL_MAKE_PAIR<const_iterator, const_iterator>(
|
||||
return ETL_OR_STD::make_pair<const_iterator, const_iterator>(
|
||||
const_iterator(*this, find_lower_node(root_node, value)),
|
||||
const_iterator(*this, find_upper_node(root_node, value)));
|
||||
}
|
||||
@ -1031,7 +1031,7 @@ namespace etl
|
||||
inserted = inserted_node == &node;
|
||||
|
||||
// Insert node into tree and return iterator to new node location in tree
|
||||
return ETL_MAKE_PAIR(iterator(*this, inserted_node), inserted);
|
||||
return ETL_OR_STD::make_pair(iterator(*this, inserted_node), inserted);
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -1950,7 +1950,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// A templated set implementation that uses a fixed size buffer.
|
||||
//*************************************************************************
|
||||
template <typename T, const size_t MAX_SIZE_, typename TCompare = etlstd::less<T> >
|
||||
template <typename T, const size_t MAX_SIZE_, typename TCompare = etl::less<T> >
|
||||
class set : public etl::iset<T, TCompare>
|
||||
{
|
||||
public:
|
||||
@ -2037,7 +2037,7 @@ namespace etl
|
||||
template <typename T, typename TCompare>
|
||||
bool operator ==(const etl::iset<T, TCompare>& lhs, const etl::iset<T, TCompare>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -2063,7 +2063,7 @@ namespace etl
|
||||
template <typename T, typename TCompare>
|
||||
bool operator <(const etl::iset<T, TCompare>& lhs, const etl::iset<T, TCompare>& rhs)
|
||||
{
|
||||
return etlstd::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -82,7 +82,7 @@ namespace etl
|
||||
|
||||
// Set 'type' to be the smallest of the first parameter and any of the others.
|
||||
// This is recursive.
|
||||
using type = typename etlstd::conditional<(etl::size_of<T1>::value < etl::size_of<smallest_other>::value), // Boolean
|
||||
using type = typename etl::conditional<(etl::size_of<T1>::value < etl::size_of<smallest_other>::value), // Boolean
|
||||
T1, // TrueType
|
||||
smallest_other> // FalseType
|
||||
::type; // The smallest type of the two.
|
||||
|
||||
@ -94,7 +94,7 @@ namespace etl
|
||||
|
||||
// Set 'type' to be the smallest of the first parameter and any of the others.
|
||||
// This is recursive.
|
||||
using type = typename etlstd::conditional<(etl::size_of<T1>::value < etl::size_of<smallest_other>::value), // Boolean
|
||||
using type = typename etl::conditional<(etl::size_of<T1>::value < etl::size_of<smallest_other>::value), // Boolean
|
||||
T1, // TrueType
|
||||
smallest_other> // FalseType
|
||||
::type; // The smallest type of the two.
|
||||
|
||||
@ -45,7 +45,7 @@ namespace etl
|
||||
template <const size_t VALUE, const size_t I = 1>
|
||||
struct sqrt
|
||||
{
|
||||
typedef typename etlstd::conditional<((I * I) > VALUE),
|
||||
typedef typename etl::conditional<((I * I) > VALUE),
|
||||
etl::constant<intmax_t, I - 1>,
|
||||
etl::sqrt<VALUE, I + 1> >::type type;
|
||||
|
||||
|
||||
@ -278,7 +278,7 @@ namespace etl
|
||||
ETL_ASSERT(!full(), ETL_ERROR(stack_full));
|
||||
#endif
|
||||
base_t::add_in();
|
||||
::new (&p_buffer[top_index]) T(etlstd::forward<Args>(args)...);
|
||||
::new (&p_buffer[top_index]) T(etl::forward<Args>(args)...);
|
||||
}
|
||||
#else
|
||||
//*************************************************************************
|
||||
@ -408,7 +408,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void reverse()
|
||||
{
|
||||
etlstd::reverse(p_buffer, p_buffer + current_size);
|
||||
etl::reverse(p_buffer, p_buffer + current_size);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -527,7 +527,7 @@ namespace etl
|
||||
private:
|
||||
|
||||
/// The unintitialised buffer of T used in the stack.
|
||||
typename etl::aligned_storage<sizeof(T), etlstd::alignment_of<T>::value>::type buffer[SIZE];
|
||||
typename etl::aligned_storage<sizeof(T), etl::alignment_of<T>::value>::type buffer[SIZE];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -235,7 +235,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
return etlstd::find_if(state_table.begin(),
|
||||
return etl::find_if(state_table.begin(),
|
||||
state_table.end(),
|
||||
is_state(state_id));
|
||||
}
|
||||
@ -280,7 +280,7 @@ namespace etl
|
||||
while (t != transition_table.end())
|
||||
{
|
||||
// Scan the transition table from the latest position.
|
||||
t = etlstd::find_if(t,
|
||||
t = etl::find_if(t,
|
||||
transition_table.end(),
|
||||
is_transition(event_id, current_state_id));
|
||||
|
||||
|
||||
@ -155,7 +155,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Construct from iterator/size.
|
||||
//*************************************************************************
|
||||
template <typename TSize, typename TDummy = typename etlstd::enable_if<etlstd::is_integral<TSize>::value, void>::type>
|
||||
template <typename TSize, typename TDummy = typename etl::enable_if<etl::is_integral<TSize>::value, void>::type>
|
||||
ETL_CONSTEXPR17 basic_string_view(const T* begin_, TSize size_)
|
||||
: mbegin(begin_),
|
||||
mend(begin_ + size_)
|
||||
@ -309,11 +309,11 @@ namespace etl
|
||||
/// Assign from iterators
|
||||
//*************************************************************************
|
||||
template <typename TIterator,
|
||||
typename TDummy = typename etlstd::enable_if<etl::is_random_iterator<TIterator>::value, void>::type>
|
||||
typename TDummy = typename etl::enable_if<etl::is_random_iterator<TIterator>::value, void>::type>
|
||||
void assign(TIterator begin_, TIterator end_)
|
||||
{
|
||||
mbegin = etl::addressof(*begin_);
|
||||
mend = etl::addressof(*begin_) + etlstd::distance(begin_, end_);
|
||||
mend = etl::addressof(*begin_) + etl::distance(begin_, end_);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -321,7 +321,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
template <typename TIterator,
|
||||
typename TSize,
|
||||
typename TDummy = typename etlstd::enable_if<etlstd::is_integral<TSize>::value, void>::type>
|
||||
typename TDummy = typename etl::enable_if<etl::is_integral<TSize>::value, void>::type>
|
||||
void assign(TIterator begin_, TSize size_)
|
||||
{
|
||||
mbegin = etl::addressof(*begin_);
|
||||
@ -351,11 +351,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
void swap(basic_string_view& other)
|
||||
{
|
||||
#if defined(ETL_NO_STL)
|
||||
using etlstd::swap;
|
||||
#else
|
||||
using std::swap;
|
||||
#endif
|
||||
using ETL_OR_STD::swap; // Allow ADL
|
||||
|
||||
swap(mbegin, other.mbegin);
|
||||
swap(mend, other.mend);
|
||||
@ -370,9 +366,9 @@ namespace etl
|
||||
|
||||
if (position < size())
|
||||
{
|
||||
n = etlstd::min(count, size() - position);
|
||||
n = etl::min(count, size() - position);
|
||||
|
||||
etlstd::copy(mbegin + position, mbegin + position + n, destination);
|
||||
etl::copy(mbegin + position, mbegin + position + n, destination);
|
||||
}
|
||||
|
||||
return n;
|
||||
@ -387,7 +383,7 @@ namespace etl
|
||||
|
||||
if (position < size())
|
||||
{
|
||||
size_t n = etlstd::min(count, size() - position);
|
||||
size_t n = etl::min(count, size() - position);
|
||||
|
||||
view = basic_string_view(mbegin + position, mbegin + position + n);
|
||||
}
|
||||
@ -501,7 +497,7 @@ namespace etl
|
||||
return npos;
|
||||
}
|
||||
|
||||
const_iterator iposition = etlstd::search(begin() + position, end(), view.begin(), view.end());
|
||||
const_iterator iposition = etl::search(begin() + position, end(), view.begin(), view.end());
|
||||
|
||||
if (iposition == end())
|
||||
{
|
||||
@ -509,7 +505,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
return etlstd::distance(begin(), iposition);
|
||||
return etl::distance(begin(), iposition);
|
||||
}
|
||||
}
|
||||
|
||||
@ -538,9 +534,9 @@ namespace etl
|
||||
return npos;
|
||||
}
|
||||
|
||||
position = etlstd::min(position, size());
|
||||
position = etl::min(position, size());
|
||||
|
||||
const_iterator iposition = etlstd::find_end(begin(),
|
||||
const_iterator iposition = etl::find_end(begin(),
|
||||
begin() + position,
|
||||
view.begin(),
|
||||
view.end());
|
||||
@ -551,7 +547,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
return etlstd::distance(begin(), iposition);
|
||||
return etl::distance(begin(), iposition);
|
||||
}
|
||||
}
|
||||
|
||||
@ -621,7 +617,7 @@ namespace etl
|
||||
return npos;
|
||||
}
|
||||
|
||||
position = etlstd::min(position, size() - 1);
|
||||
position = etl::min(position, size() - 1);
|
||||
|
||||
const_reverse_iterator it = rbegin() + size() - position - 1;
|
||||
|
||||
@ -717,7 +713,7 @@ namespace etl
|
||||
return npos;
|
||||
}
|
||||
|
||||
position = etlstd::min(position, size() - 1);
|
||||
position = etl::min(position, size() - 1);
|
||||
|
||||
const_reverse_iterator it = rbegin() + size() - position - 1;
|
||||
|
||||
@ -768,7 +764,7 @@ namespace etl
|
||||
friend bool operator == (const etl::basic_string_view<T, TTraits>& lhs, const etl::basic_string_view<T, TTraits>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) &&
|
||||
etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -784,7 +780,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
friend bool operator < (const etl::basic_string_view<T, TTraits>& lhs, const etl::basic_string_view<T, TTraits>& rhs)
|
||||
{
|
||||
return etlstd::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
@ -101,28 +101,28 @@ namespace etl
|
||||
struct type_from_id
|
||||
{
|
||||
typedef
|
||||
typename etlstd::conditional<ID == T1::ID, typename T1::type,
|
||||
typename etlstd::conditional<ID == T2::ID, typename T2::type,
|
||||
typename etlstd::conditional<ID == T3::ID, typename T3::type,
|
||||
typename etlstd::conditional<ID == T4::ID, typename T4::type,
|
||||
typename etlstd::conditional<ID == T5::ID, typename T5::type,
|
||||
typename etlstd::conditional<ID == T6::ID, typename T6::type,
|
||||
typename etlstd::conditional<ID == T7::ID, typename T7::type,
|
||||
typename etlstd::conditional<ID == T8::ID, typename T8::type,
|
||||
typename etlstd::conditional<ID == T9::ID, typename T9::type,
|
||||
typename etlstd::conditional<ID == T10::ID, typename T10::type,
|
||||
typename etlstd::conditional<ID == T11::ID, typename T11::type,
|
||||
typename etlstd::conditional<ID == T12::ID, typename T12::type,
|
||||
typename etlstd::conditional<ID == T13::ID, typename T13::type,
|
||||
typename etlstd::conditional<ID == T14::ID, typename T14::type,
|
||||
typename etlstd::conditional<ID == T15::ID, typename T15::type,
|
||||
typename etlstd::conditional<ID == T16::ID, typename T16::type,
|
||||
typename etl::conditional<ID == T1::ID, typename T1::type,
|
||||
typename etl::conditional<ID == T2::ID, typename T2::type,
|
||||
typename etl::conditional<ID == T3::ID, typename T3::type,
|
||||
typename etl::conditional<ID == T4::ID, typename T4::type,
|
||||
typename etl::conditional<ID == T5::ID, typename T5::type,
|
||||
typename etl::conditional<ID == T6::ID, typename T6::type,
|
||||
typename etl::conditional<ID == T7::ID, typename T7::type,
|
||||
typename etl::conditional<ID == T8::ID, typename T8::type,
|
||||
typename etl::conditional<ID == T9::ID, typename T9::type,
|
||||
typename etl::conditional<ID == T10::ID, typename T10::type,
|
||||
typename etl::conditional<ID == T11::ID, typename T11::type,
|
||||
typename etl::conditional<ID == T12::ID, typename T12::type,
|
||||
typename etl::conditional<ID == T13::ID, typename T13::type,
|
||||
typename etl::conditional<ID == T14::ID, typename T14::type,
|
||||
typename etl::conditional<ID == T15::ID, typename T15::type,
|
||||
typename etl::conditional<ID == T16::ID, typename T16::type,
|
||||
etl::null_type<0> >::type>::type>::type>::type>
|
||||
::type>::type>::type>::type>
|
||||
::type>::type>::type>::type>
|
||||
::type>::type>::type>::type type;
|
||||
|
||||
ETL_STATIC_ASSERT(!(etlstd::is_same<etl::null_type<0>, type>::value), "Invalid id");
|
||||
ETL_STATIC_ASSERT(!(etl::is_same<etl::null_type<0>, type>::value), "Invalid id");
|
||||
};
|
||||
|
||||
//************************************
|
||||
@ -137,22 +137,22 @@ namespace etl
|
||||
enum
|
||||
{
|
||||
value =
|
||||
(unsigned int) etlstd::is_same<T, typename T1::type>::value ? T1::ID :
|
||||
(unsigned int) etlstd::is_same<T, typename T2::type>::value ? T2::ID :
|
||||
(unsigned int) etlstd::is_same<T, typename T3::type>::value ? T3::ID :
|
||||
(unsigned int) etlstd::is_same<T, typename T4::type>::value ? T4::ID :
|
||||
(unsigned int) etlstd::is_same<T, typename T5::type>::value ? T5::ID :
|
||||
(unsigned int) etlstd::is_same<T, typename T6::type>::value ? T6::ID :
|
||||
(unsigned int) etlstd::is_same<T, typename T7::type>::value ? T7::ID :
|
||||
(unsigned int) etlstd::is_same<T, typename T8::type>::value ? T8::ID :
|
||||
(unsigned int) etlstd::is_same<T, typename T9::type>::value ? T9::ID :
|
||||
(unsigned int) etlstd::is_same<T, typename T10::type>::value ? T10::ID :
|
||||
(unsigned int) etlstd::is_same<T, typename T11::type>::value ? T11::ID :
|
||||
(unsigned int) etlstd::is_same<T, typename T12::type>::value ? T12::ID :
|
||||
(unsigned int) etlstd::is_same<T, typename T13::type>::value ? T13::ID :
|
||||
(unsigned int) etlstd::is_same<T, typename T14::type>::value ? T14::ID :
|
||||
(unsigned int) etlstd::is_same<T, typename T15::type>::value ? T15::ID :
|
||||
(unsigned int) etlstd::is_same<T, typename T16::type>::value ? T16::ID :
|
||||
(unsigned int) etl::is_same<T, typename T1::type>::value ? T1::ID :
|
||||
(unsigned int) etl::is_same<T, typename T2::type>::value ? T2::ID :
|
||||
(unsigned int) etl::is_same<T, typename T3::type>::value ? T3::ID :
|
||||
(unsigned int) etl::is_same<T, typename T4::type>::value ? T4::ID :
|
||||
(unsigned int) etl::is_same<T, typename T5::type>::value ? T5::ID :
|
||||
(unsigned int) etl::is_same<T, typename T6::type>::value ? T6::ID :
|
||||
(unsigned int) etl::is_same<T, typename T7::type>::value ? T7::ID :
|
||||
(unsigned int) etl::is_same<T, typename T8::type>::value ? T8::ID :
|
||||
(unsigned int) etl::is_same<T, typename T9::type>::value ? T9::ID :
|
||||
(unsigned int) etl::is_same<T, typename T10::type>::value ? T10::ID :
|
||||
(unsigned int) etl::is_same<T, typename T11::type>::value ? T11::ID :
|
||||
(unsigned int) etl::is_same<T, typename T12::type>::value ? T12::ID :
|
||||
(unsigned int) etl::is_same<T, typename T13::type>::value ? T13::ID :
|
||||
(unsigned int) etl::is_same<T, typename T14::type>::value ? T14::ID :
|
||||
(unsigned int) etl::is_same<T, typename T15::type>::value ? T15::ID :
|
||||
(unsigned int) etl::is_same<T, typename T16::type>::value ? T16::ID :
|
||||
(unsigned int) UNKNOWN
|
||||
};
|
||||
|
||||
@ -202,26 +202,26 @@ namespace etl
|
||||
struct type_from_type
|
||||
{
|
||||
typedef
|
||||
typename etlstd::conditional<etlstd::is_same<T, typename T1::type1>::value, typename T1::type2,
|
||||
typename etlstd::conditional<etlstd::is_same<T, typename T2::type1>::value, typename T2::type2,
|
||||
typename etlstd::conditional<etlstd::is_same<T, typename T3::type1>::value, typename T3::type2,
|
||||
typename etlstd::conditional<etlstd::is_same<T, typename T4::type1>::value, typename T4::type2,
|
||||
typename etlstd::conditional<etlstd::is_same<T, typename T5::type1>::value, typename T5::type2,
|
||||
typename etlstd::conditional<etlstd::is_same<T, typename T6::type1>::value, typename T6::type2,
|
||||
typename etlstd::conditional<etlstd::is_same<T, typename T7::type1>::value, typename T7::type2,
|
||||
typename etlstd::conditional<etlstd::is_same<T, typename T8::type1>::value, typename T8::type2,
|
||||
typename etlstd::conditional<etlstd::is_same<T, typename T9::type1>::value, typename T9::type2,
|
||||
typename etlstd::conditional<etlstd::is_same<T, typename T10::type1>::value, typename T10::type2,
|
||||
typename etlstd::conditional<etlstd::is_same<T, typename T11::type1>::value, typename T11::type2,
|
||||
typename etlstd::conditional<etlstd::is_same<T, typename T12::type1>::value, typename T12::type2,
|
||||
typename etlstd::conditional<etlstd::is_same<T, typename T13::type1>::value, typename T13::type2,
|
||||
typename etlstd::conditional<etlstd::is_same<T, typename T14::type1>::value, typename T14::type2,
|
||||
typename etlstd::conditional<etlstd::is_same<T, typename T15::type1>::value, typename T15::type2,
|
||||
typename etlstd::conditional<etlstd::is_same<T, typename T16::type1>::value, typename T16::type2,
|
||||
typename etl::conditional<etl::is_same<T, typename T1::type1>::value, typename T1::type2,
|
||||
typename etl::conditional<etl::is_same<T, typename T2::type1>::value, typename T2::type2,
|
||||
typename etl::conditional<etl::is_same<T, typename T3::type1>::value, typename T3::type2,
|
||||
typename etl::conditional<etl::is_same<T, typename T4::type1>::value, typename T4::type2,
|
||||
typename etl::conditional<etl::is_same<T, typename T5::type1>::value, typename T5::type2,
|
||||
typename etl::conditional<etl::is_same<T, typename T6::type1>::value, typename T6::type2,
|
||||
typename etl::conditional<etl::is_same<T, typename T7::type1>::value, typename T7::type2,
|
||||
typename etl::conditional<etl::is_same<T, typename T8::type1>::value, typename T8::type2,
|
||||
typename etl::conditional<etl::is_same<T, typename T9::type1>::value, typename T9::type2,
|
||||
typename etl::conditional<etl::is_same<T, typename T10::type1>::value, typename T10::type2,
|
||||
typename etl::conditional<etl::is_same<T, typename T11::type1>::value, typename T11::type2,
|
||||
typename etl::conditional<etl::is_same<T, typename T12::type1>::value, typename T12::type2,
|
||||
typename etl::conditional<etl::is_same<T, typename T13::type1>::value, typename T13::type2,
|
||||
typename etl::conditional<etl::is_same<T, typename T14::type1>::value, typename T14::type2,
|
||||
typename etl::conditional<etl::is_same<T, typename T15::type1>::value, typename T15::type2,
|
||||
typename etl::conditional<etl::is_same<T, typename T16::type1>::value, typename T16::type2,
|
||||
etl::null_type<0> >::type>::type>::type>::type>::type>::type>::type>::type>
|
||||
::type>::type>::type>::type>::type>::type>::type>::type type;
|
||||
|
||||
ETL_STATIC_ASSERT(!(etlstd::is_same<etl::null_type<0>, type>::value), "Invalid type");
|
||||
ETL_STATIC_ASSERT(!(etl::is_same<etl::null_type<0>, type>::value), "Invalid type");
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ namespace etl
|
||||
cog.outl(" {")
|
||||
cog.outl(" typedef ")
|
||||
for n in range(1, int(NTypes) + 1):
|
||||
cog.outl(" typename etlstd::conditional<ID == T%s::ID, typename T%s::type," %(n, n))
|
||||
cog.outl(" typename etl::conditional<ID == T%s::ID, typename T%s::type," %(n, n))
|
||||
cog.out(" etl::null_type<0> >")
|
||||
for n in range(1, int(NTypes) + 1):
|
||||
if n == int(NTypes):
|
||||
@ -116,7 +116,7 @@ namespace etl
|
||||
cog.outl("")
|
||||
cog.out(" ")
|
||||
cog.outl("")
|
||||
cog.outl(" ETL_STATIC_ASSERT(!(etlstd::is_same<etl::null_type<0>, type>::value), \"Invalid id\");")
|
||||
cog.outl(" ETL_STATIC_ASSERT(!(etl::is_same<etl::null_type<0>, type>::value), \"Invalid id\");")
|
||||
cog.outl(" };")
|
||||
cog.outl("")
|
||||
cog.outl(" //************************************")
|
||||
@ -132,7 +132,7 @@ namespace etl
|
||||
cog.outl(" {")
|
||||
cog.outl(" value =")
|
||||
for n in range(1, int(NTypes) + 1) :
|
||||
cog.outl(" (unsigned int) etlstd::is_same<T, typename T%s::type>::value ? T%s::ID :" % (n, n))
|
||||
cog.outl(" (unsigned int) etl::is_same<T, typename T%s::type>::value ? T%s::ID :" % (n, n))
|
||||
cog.outl(" (unsigned int) UNKNOWN")
|
||||
cog.outl(" };")
|
||||
cog.outl("")
|
||||
@ -171,7 +171,7 @@ namespace etl
|
||||
cog.outl(" {")
|
||||
cog.outl(" typedef ")
|
||||
for n in range(1, int(NTypes) + 1):
|
||||
cog.outl(" typename etlstd::conditional<etlstd::is_same<T, typename T%s::type1>::value, typename T%s::type2," %(n, n))
|
||||
cog.outl(" typename etl::conditional<etl::is_same<T, typename T%s::type1>::value, typename T%s::type2," %(n, n))
|
||||
cog.out(" etl::null_type<0> >")
|
||||
for n in range(1, int(NTypes) + 1):
|
||||
if n == int(NTypes):
|
||||
@ -183,7 +183,7 @@ namespace etl
|
||||
cog.outl("")
|
||||
cog.out(" ")
|
||||
cog.outl("")
|
||||
cog.outl(" ETL_STATIC_ASSERT(!(etlstd::is_same<etl::null_type<0>, type>::value), \"Invalid type\");")
|
||||
cog.outl(" ETL_STATIC_ASSERT(!(etl::is_same<etl::null_type<0>, type>::value), \"Invalid type\");")
|
||||
cog.outl(" };")
|
||||
cog.outl("};")
|
||||
]]]*/
|
||||
|
||||
@ -73,22 +73,22 @@ namespace etl
|
||||
template <const size_t ID>
|
||||
struct select
|
||||
{
|
||||
typedef typename etlstd::conditional<ID == 0, T0,
|
||||
typename etlstd::conditional<ID == 1, T1,
|
||||
typename etlstd::conditional<ID == 2, T2,
|
||||
typename etlstd::conditional<ID == 3, T3,
|
||||
typename etlstd::conditional<ID == 4, T4,
|
||||
typename etlstd::conditional<ID == 5, T5,
|
||||
typename etlstd::conditional<ID == 6, T6,
|
||||
typename etlstd::conditional<ID == 7, T7,
|
||||
typename etlstd::conditional<ID == 8, T8,
|
||||
typename etlstd::conditional<ID == 9, T9,
|
||||
typename etlstd::conditional<ID == 10, T10,
|
||||
typename etlstd::conditional<ID == 11, T11,
|
||||
typename etlstd::conditional<ID == 12, T12,
|
||||
typename etlstd::conditional<ID == 13, T13,
|
||||
typename etlstd::conditional<ID == 14, T14,
|
||||
typename etlstd::conditional<ID == 15, T15,
|
||||
typedef typename etl::conditional<ID == 0, T0,
|
||||
typename etl::conditional<ID == 1, T1,
|
||||
typename etl::conditional<ID == 2, T2,
|
||||
typename etl::conditional<ID == 3, T3,
|
||||
typename etl::conditional<ID == 4, T4,
|
||||
typename etl::conditional<ID == 5, T5,
|
||||
typename etl::conditional<ID == 6, T6,
|
||||
typename etl::conditional<ID == 7, T7,
|
||||
typename etl::conditional<ID == 8, T8,
|
||||
typename etl::conditional<ID == 9, T9,
|
||||
typename etl::conditional<ID == 10, T10,
|
||||
typename etl::conditional<ID == 11, T11,
|
||||
typename etl::conditional<ID == 12, T12,
|
||||
typename etl::conditional<ID == 13, T13,
|
||||
typename etl::conditional<ID == 14, T14,
|
||||
typename etl::conditional<ID == 15, T15,
|
||||
etl::null_type<0> >
|
||||
::type>::type>::type>::type>::type>::type>::type>::type>
|
||||
::type>::type>::type>::type>::type>::type>::type>::type type;
|
||||
@ -121,21 +121,21 @@ namespace etl
|
||||
template <const size_t ID>
|
||||
struct select
|
||||
{
|
||||
typedef typename etlstd::conditional<ID == 0, T0,
|
||||
typename etlstd::conditional<ID == 1, T1,
|
||||
typename etlstd::conditional<ID == 2, T2,
|
||||
typename etlstd::conditional<ID == 3, T3,
|
||||
typename etlstd::conditional<ID == 4, T4,
|
||||
typename etlstd::conditional<ID == 5, T5,
|
||||
typename etlstd::conditional<ID == 6, T6,
|
||||
typename etlstd::conditional<ID == 7, T7,
|
||||
typename etlstd::conditional<ID == 8, T8,
|
||||
typename etlstd::conditional<ID == 9, T9,
|
||||
typename etlstd::conditional<ID == 10, T10,
|
||||
typename etlstd::conditional<ID == 11, T11,
|
||||
typename etlstd::conditional<ID == 12, T12,
|
||||
typename etlstd::conditional<ID == 13, T13,
|
||||
typename etlstd::conditional<ID == 14, T14,
|
||||
typedef typename etl::conditional<ID == 0, T0,
|
||||
typename etl::conditional<ID == 1, T1,
|
||||
typename etl::conditional<ID == 2, T2,
|
||||
typename etl::conditional<ID == 3, T3,
|
||||
typename etl::conditional<ID == 4, T4,
|
||||
typename etl::conditional<ID == 5, T5,
|
||||
typename etl::conditional<ID == 6, T6,
|
||||
typename etl::conditional<ID == 7, T7,
|
||||
typename etl::conditional<ID == 8, T8,
|
||||
typename etl::conditional<ID == 9, T9,
|
||||
typename etl::conditional<ID == 10, T10,
|
||||
typename etl::conditional<ID == 11, T11,
|
||||
typename etl::conditional<ID == 12, T12,
|
||||
typename etl::conditional<ID == 13, T13,
|
||||
typename etl::conditional<ID == 14, T14,
|
||||
etl::null_type<0> >
|
||||
::type>::type>::type>::type>::type>::type>::type>::type>
|
||||
::type>::type>::type>::type>::type>::type>::type type;
|
||||
@ -167,20 +167,20 @@ namespace etl
|
||||
template <const size_t ID>
|
||||
struct select
|
||||
{
|
||||
typedef typename etlstd::conditional<ID == 0, T0,
|
||||
typename etlstd::conditional<ID == 1, T1,
|
||||
typename etlstd::conditional<ID == 2, T2,
|
||||
typename etlstd::conditional<ID == 3, T3,
|
||||
typename etlstd::conditional<ID == 4, T4,
|
||||
typename etlstd::conditional<ID == 5, T5,
|
||||
typename etlstd::conditional<ID == 6, T6,
|
||||
typename etlstd::conditional<ID == 7, T7,
|
||||
typename etlstd::conditional<ID == 8, T8,
|
||||
typename etlstd::conditional<ID == 9, T9,
|
||||
typename etlstd::conditional<ID == 10, T10,
|
||||
typename etlstd::conditional<ID == 11, T11,
|
||||
typename etlstd::conditional<ID == 12, T12,
|
||||
typename etlstd::conditional<ID == 13, T13,
|
||||
typedef typename etl::conditional<ID == 0, T0,
|
||||
typename etl::conditional<ID == 1, T1,
|
||||
typename etl::conditional<ID == 2, T2,
|
||||
typename etl::conditional<ID == 3, T3,
|
||||
typename etl::conditional<ID == 4, T4,
|
||||
typename etl::conditional<ID == 5, T5,
|
||||
typename etl::conditional<ID == 6, T6,
|
||||
typename etl::conditional<ID == 7, T7,
|
||||
typename etl::conditional<ID == 8, T8,
|
||||
typename etl::conditional<ID == 9, T9,
|
||||
typename etl::conditional<ID == 10, T10,
|
||||
typename etl::conditional<ID == 11, T11,
|
||||
typename etl::conditional<ID == 12, T12,
|
||||
typename etl::conditional<ID == 13, T13,
|
||||
etl::null_type<0> >
|
||||
::type>::type>::type>::type>::type>::type>::type>::type>
|
||||
::type>::type>::type>::type>::type>::type type;
|
||||
@ -211,19 +211,19 @@ namespace etl
|
||||
template <const size_t ID>
|
||||
struct select
|
||||
{
|
||||
typedef typename etlstd::conditional<ID == 0, T0,
|
||||
typename etlstd::conditional<ID == 1, T1,
|
||||
typename etlstd::conditional<ID == 2, T2,
|
||||
typename etlstd::conditional<ID == 3, T3,
|
||||
typename etlstd::conditional<ID == 4, T4,
|
||||
typename etlstd::conditional<ID == 5, T5,
|
||||
typename etlstd::conditional<ID == 6, T6,
|
||||
typename etlstd::conditional<ID == 7, T7,
|
||||
typename etlstd::conditional<ID == 8, T8,
|
||||
typename etlstd::conditional<ID == 9, T9,
|
||||
typename etlstd::conditional<ID == 10, T10,
|
||||
typename etlstd::conditional<ID == 11, T11,
|
||||
typename etlstd::conditional<ID == 12, T12,
|
||||
typedef typename etl::conditional<ID == 0, T0,
|
||||
typename etl::conditional<ID == 1, T1,
|
||||
typename etl::conditional<ID == 2, T2,
|
||||
typename etl::conditional<ID == 3, T3,
|
||||
typename etl::conditional<ID == 4, T4,
|
||||
typename etl::conditional<ID == 5, T5,
|
||||
typename etl::conditional<ID == 6, T6,
|
||||
typename etl::conditional<ID == 7, T7,
|
||||
typename etl::conditional<ID == 8, T8,
|
||||
typename etl::conditional<ID == 9, T9,
|
||||
typename etl::conditional<ID == 10, T10,
|
||||
typename etl::conditional<ID == 11, T11,
|
||||
typename etl::conditional<ID == 12, T12,
|
||||
etl::null_type<0> >
|
||||
::type>::type>::type>::type>::type>::type>::type>::type>
|
||||
::type>::type>::type>::type>::type type;
|
||||
@ -253,18 +253,18 @@ namespace etl
|
||||
template <const size_t ID>
|
||||
struct select
|
||||
{
|
||||
typedef typename etlstd::conditional<ID == 0, T0,
|
||||
typename etlstd::conditional<ID == 1, T1,
|
||||
typename etlstd::conditional<ID == 2, T2,
|
||||
typename etlstd::conditional<ID == 3, T3,
|
||||
typename etlstd::conditional<ID == 4, T4,
|
||||
typename etlstd::conditional<ID == 5, T5,
|
||||
typename etlstd::conditional<ID == 6, T6,
|
||||
typename etlstd::conditional<ID == 7, T7,
|
||||
typename etlstd::conditional<ID == 8, T8,
|
||||
typename etlstd::conditional<ID == 9, T9,
|
||||
typename etlstd::conditional<ID == 10, T10,
|
||||
typename etlstd::conditional<ID == 11, T11,
|
||||
typedef typename etl::conditional<ID == 0, T0,
|
||||
typename etl::conditional<ID == 1, T1,
|
||||
typename etl::conditional<ID == 2, T2,
|
||||
typename etl::conditional<ID == 3, T3,
|
||||
typename etl::conditional<ID == 4, T4,
|
||||
typename etl::conditional<ID == 5, T5,
|
||||
typename etl::conditional<ID == 6, T6,
|
||||
typename etl::conditional<ID == 7, T7,
|
||||
typename etl::conditional<ID == 8, T8,
|
||||
typename etl::conditional<ID == 9, T9,
|
||||
typename etl::conditional<ID == 10, T10,
|
||||
typename etl::conditional<ID == 11, T11,
|
||||
etl::null_type<0> >
|
||||
::type>::type>::type>::type>::type>::type>::type>::type>
|
||||
::type>::type>::type>::type type;
|
||||
@ -293,17 +293,17 @@ namespace etl
|
||||
template <const size_t ID>
|
||||
struct select
|
||||
{
|
||||
typedef typename etlstd::conditional<ID == 0, T0,
|
||||
typename etlstd::conditional<ID == 1, T1,
|
||||
typename etlstd::conditional<ID == 2, T2,
|
||||
typename etlstd::conditional<ID == 3, T3,
|
||||
typename etlstd::conditional<ID == 4, T4,
|
||||
typename etlstd::conditional<ID == 5, T5,
|
||||
typename etlstd::conditional<ID == 6, T6,
|
||||
typename etlstd::conditional<ID == 7, T7,
|
||||
typename etlstd::conditional<ID == 8, T8,
|
||||
typename etlstd::conditional<ID == 9, T9,
|
||||
typename etlstd::conditional<ID == 10, T10,
|
||||
typedef typename etl::conditional<ID == 0, T0,
|
||||
typename etl::conditional<ID == 1, T1,
|
||||
typename etl::conditional<ID == 2, T2,
|
||||
typename etl::conditional<ID == 3, T3,
|
||||
typename etl::conditional<ID == 4, T4,
|
||||
typename etl::conditional<ID == 5, T5,
|
||||
typename etl::conditional<ID == 6, T6,
|
||||
typename etl::conditional<ID == 7, T7,
|
||||
typename etl::conditional<ID == 8, T8,
|
||||
typename etl::conditional<ID == 9, T9,
|
||||
typename etl::conditional<ID == 10, T10,
|
||||
etl::null_type<0> >
|
||||
::type>::type>::type>::type>::type>::type>::type>::type>
|
||||
::type>::type>::type type;
|
||||
@ -331,16 +331,16 @@ namespace etl
|
||||
template <const size_t ID>
|
||||
struct select
|
||||
{
|
||||
typedef typename etlstd::conditional<ID == 0, T0,
|
||||
typename etlstd::conditional<ID == 1, T1,
|
||||
typename etlstd::conditional<ID == 2, T2,
|
||||
typename etlstd::conditional<ID == 3, T3,
|
||||
typename etlstd::conditional<ID == 4, T4,
|
||||
typename etlstd::conditional<ID == 5, T5,
|
||||
typename etlstd::conditional<ID == 6, T6,
|
||||
typename etlstd::conditional<ID == 7, T7,
|
||||
typename etlstd::conditional<ID == 8, T8,
|
||||
typename etlstd::conditional<ID == 9, T9,
|
||||
typedef typename etl::conditional<ID == 0, T0,
|
||||
typename etl::conditional<ID == 1, T1,
|
||||
typename etl::conditional<ID == 2, T2,
|
||||
typename etl::conditional<ID == 3, T3,
|
||||
typename etl::conditional<ID == 4, T4,
|
||||
typename etl::conditional<ID == 5, T5,
|
||||
typename etl::conditional<ID == 6, T6,
|
||||
typename etl::conditional<ID == 7, T7,
|
||||
typename etl::conditional<ID == 8, T8,
|
||||
typename etl::conditional<ID == 9, T9,
|
||||
etl::null_type<0> >
|
||||
::type>::type>::type>::type>::type>::type>::type>::type>
|
||||
::type>::type type;
|
||||
@ -367,15 +367,15 @@ namespace etl
|
||||
template <const size_t ID>
|
||||
struct select
|
||||
{
|
||||
typedef typename etlstd::conditional<ID == 0, T0,
|
||||
typename etlstd::conditional<ID == 1, T1,
|
||||
typename etlstd::conditional<ID == 2, T2,
|
||||
typename etlstd::conditional<ID == 3, T3,
|
||||
typename etlstd::conditional<ID == 4, T4,
|
||||
typename etlstd::conditional<ID == 5, T5,
|
||||
typename etlstd::conditional<ID == 6, T6,
|
||||
typename etlstd::conditional<ID == 7, T7,
|
||||
typename etlstd::conditional<ID == 8, T8,
|
||||
typedef typename etl::conditional<ID == 0, T0,
|
||||
typename etl::conditional<ID == 1, T1,
|
||||
typename etl::conditional<ID == 2, T2,
|
||||
typename etl::conditional<ID == 3, T3,
|
||||
typename etl::conditional<ID == 4, T4,
|
||||
typename etl::conditional<ID == 5, T5,
|
||||
typename etl::conditional<ID == 6, T6,
|
||||
typename etl::conditional<ID == 7, T7,
|
||||
typename etl::conditional<ID == 8, T8,
|
||||
etl::null_type<0> >
|
||||
::type>::type>::type>::type>::type>::type>::type>::type>
|
||||
::type type;
|
||||
@ -401,14 +401,14 @@ namespace etl
|
||||
template <const size_t ID>
|
||||
struct select
|
||||
{
|
||||
typedef typename etlstd::conditional<ID == 0, T0,
|
||||
typename etlstd::conditional<ID == 1, T1,
|
||||
typename etlstd::conditional<ID == 2, T2,
|
||||
typename etlstd::conditional<ID == 3, T3,
|
||||
typename etlstd::conditional<ID == 4, T4,
|
||||
typename etlstd::conditional<ID == 5, T5,
|
||||
typename etlstd::conditional<ID == 6, T6,
|
||||
typename etlstd::conditional<ID == 7, T7,
|
||||
typedef typename etl::conditional<ID == 0, T0,
|
||||
typename etl::conditional<ID == 1, T1,
|
||||
typename etl::conditional<ID == 2, T2,
|
||||
typename etl::conditional<ID == 3, T3,
|
||||
typename etl::conditional<ID == 4, T4,
|
||||
typename etl::conditional<ID == 5, T5,
|
||||
typename etl::conditional<ID == 6, T6,
|
||||
typename etl::conditional<ID == 7, T7,
|
||||
etl::null_type<0> >
|
||||
::type>::type>::type>::type>::type>::type>::type>::type type;
|
||||
|
||||
@ -432,13 +432,13 @@ namespace etl
|
||||
template <const size_t ID>
|
||||
struct select
|
||||
{
|
||||
typedef typename etlstd::conditional<ID == 0, T0,
|
||||
typename etlstd::conditional<ID == 1, T1,
|
||||
typename etlstd::conditional<ID == 2, T2,
|
||||
typename etlstd::conditional<ID == 3, T3,
|
||||
typename etlstd::conditional<ID == 4, T4,
|
||||
typename etlstd::conditional<ID == 5, T5,
|
||||
typename etlstd::conditional<ID == 6, T6,
|
||||
typedef typename etl::conditional<ID == 0, T0,
|
||||
typename etl::conditional<ID == 1, T1,
|
||||
typename etl::conditional<ID == 2, T2,
|
||||
typename etl::conditional<ID == 3, T3,
|
||||
typename etl::conditional<ID == 4, T4,
|
||||
typename etl::conditional<ID == 5, T5,
|
||||
typename etl::conditional<ID == 6, T6,
|
||||
etl::null_type<0> >
|
||||
::type>::type>::type>::type>::type>::type>::type type;
|
||||
|
||||
@ -461,12 +461,12 @@ namespace etl
|
||||
template <const size_t ID>
|
||||
struct select
|
||||
{
|
||||
typedef typename etlstd::conditional<ID == 0, T0,
|
||||
typename etlstd::conditional<ID == 1, T1,
|
||||
typename etlstd::conditional<ID == 2, T2,
|
||||
typename etlstd::conditional<ID == 3, T3,
|
||||
typename etlstd::conditional<ID == 4, T4,
|
||||
typename etlstd::conditional<ID == 5, T5,
|
||||
typedef typename etl::conditional<ID == 0, T0,
|
||||
typename etl::conditional<ID == 1, T1,
|
||||
typename etl::conditional<ID == 2, T2,
|
||||
typename etl::conditional<ID == 3, T3,
|
||||
typename etl::conditional<ID == 4, T4,
|
||||
typename etl::conditional<ID == 5, T5,
|
||||
etl::null_type<0> >
|
||||
::type>::type>::type>::type>::type>::type type;
|
||||
|
||||
@ -488,11 +488,11 @@ namespace etl
|
||||
template <const size_t ID>
|
||||
struct select
|
||||
{
|
||||
typedef typename etlstd::conditional<ID == 0, T0,
|
||||
typename etlstd::conditional<ID == 1, T1,
|
||||
typename etlstd::conditional<ID == 2, T2,
|
||||
typename etlstd::conditional<ID == 3, T3,
|
||||
typename etlstd::conditional<ID == 4, T4,
|
||||
typedef typename etl::conditional<ID == 0, T0,
|
||||
typename etl::conditional<ID == 1, T1,
|
||||
typename etl::conditional<ID == 2, T2,
|
||||
typename etl::conditional<ID == 3, T3,
|
||||
typename etl::conditional<ID == 4, T4,
|
||||
etl::null_type<0> >
|
||||
::type>::type>::type>::type>::type type;
|
||||
|
||||
@ -513,10 +513,10 @@ namespace etl
|
||||
template <const size_t ID>
|
||||
struct select
|
||||
{
|
||||
typedef typename etlstd::conditional<ID == 0, T0,
|
||||
typename etlstd::conditional<ID == 1, T1,
|
||||
typename etlstd::conditional<ID == 2, T2,
|
||||
typename etlstd::conditional<ID == 3, T3,
|
||||
typedef typename etl::conditional<ID == 0, T0,
|
||||
typename etl::conditional<ID == 1, T1,
|
||||
typename etl::conditional<ID == 2, T2,
|
||||
typename etl::conditional<ID == 3, T3,
|
||||
etl::null_type<0> >
|
||||
::type>::type>::type>::type type;
|
||||
|
||||
@ -536,9 +536,9 @@ namespace etl
|
||||
template <const size_t ID>
|
||||
struct select
|
||||
{
|
||||
typedef typename etlstd::conditional<ID == 0, T0,
|
||||
typename etlstd::conditional<ID == 1, T1,
|
||||
typename etlstd::conditional<ID == 2, T2,
|
||||
typedef typename etl::conditional<ID == 0, T0,
|
||||
typename etl::conditional<ID == 1, T1,
|
||||
typename etl::conditional<ID == 2, T2,
|
||||
etl::null_type<0> >
|
||||
::type>::type>::type type;
|
||||
|
||||
@ -557,8 +557,8 @@ namespace etl
|
||||
template <const size_t ID>
|
||||
struct select
|
||||
{
|
||||
typedef typename etlstd::conditional<ID == 0, T0,
|
||||
typename etlstd::conditional<ID == 1, T1,
|
||||
typedef typename etl::conditional<ID == 0, T0,
|
||||
typename etl::conditional<ID == 1, T1,
|
||||
etl::null_type<0> >
|
||||
::type>::type type;
|
||||
|
||||
@ -576,7 +576,7 @@ namespace etl
|
||||
template <const size_t ID>
|
||||
struct select
|
||||
{
|
||||
typedef typename etlstd::conditional<ID == 0, T0,
|
||||
typedef typename etl::conditional<ID == 0, T0,
|
||||
etl::null_type<0> >
|
||||
::type type;
|
||||
|
||||
|
||||
@ -75,9 +75,9 @@ namespace etl
|
||||
cog.outl(" template <const size_t ID>")
|
||||
cog.outl(" struct select")
|
||||
cog.outl(" {")
|
||||
cog.outl(" typedef typename etlstd::conditional<ID == 0, T0,")
|
||||
cog.outl(" typedef typename etl::conditional<ID == 0, T0,")
|
||||
for n in range(1, int(NTypes)) :
|
||||
cog.outl(" typename etlstd::conditional<ID == %s, T%s," % (n, n))
|
||||
cog.outl(" typename etl::conditional<ID == %s, T%s," % (n, n))
|
||||
cog.outl(" etl::null_type<0> >")
|
||||
cog.out(" ")
|
||||
for n in range(1, int(NTypes)) :
|
||||
@ -110,9 +110,9 @@ namespace etl
|
||||
cog.outl(" template <const size_t ID>")
|
||||
cog.outl(" struct select")
|
||||
cog.outl(" {")
|
||||
cog.outl(" typedef typename etlstd::conditional<ID == 0, T0,")
|
||||
cog.outl(" typedef typename etl::conditional<ID == 0, T0,")
|
||||
for n in range(1, s) :
|
||||
cog.outl(" typename etlstd::conditional<ID == %s, T%s," % (n, n))
|
||||
cog.outl(" typename etl::conditional<ID == %s, T%s," % (n, n))
|
||||
cog.outl(" etl::null_type<0> >")
|
||||
cog.out(" ")
|
||||
for n in range(1, s) :
|
||||
|
||||
@ -65,13 +65,17 @@ SOFTWARE.
|
||||
/// Derived from either the standard or alternate definitions, dependant on whether or not ETL_NO_STL is defined.
|
||||
/// \ingroup utilities
|
||||
|
||||
#if defined(ETL_NO_STL)
|
||||
#if !defined(ETL_NO_STL) && ETL_CPP11_SUPPORTED
|
||||
#include <type_traits>
|
||||
#endif
|
||||
|
||||
//*****************************************************************************
|
||||
// Traits are defined by the ETL
|
||||
//*****************************************************************************
|
||||
namespace etlstd
|
||||
namespace etl
|
||||
{
|
||||
#if defined(ETL_NO_STL) || !ETL_CPP11_SUPPORTED
|
||||
|
||||
//*****************************************************************************
|
||||
// Traits are defined by the ETL
|
||||
//*****************************************************************************
|
||||
//***************************************************************************
|
||||
/// integral_constant
|
||||
template <typename T, const T VALUE>
|
||||
@ -92,6 +96,9 @@ namespace etlstd
|
||||
typedef integral_constant<bool, false> false_type;
|
||||
typedef integral_constant<bool, true> true_type;
|
||||
|
||||
template <typename T, const T VALUE>
|
||||
const T integral_constant<T, VALUE>::value;
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <bool B>
|
||||
using bool_constant = integral_constant<bool, B>;
|
||||
@ -248,7 +255,7 @@ namespace etlstd
|
||||
/// is_signed
|
||||
template <typename T> struct is_signed : false_type {};
|
||||
template <> struct is_signed<char> : integral_constant<bool, (char(255) < 0)> {};
|
||||
template <> struct is_signed<wchar_t> : public etlstd::integral_constant<bool, static_cast<bool>(wchar_t(-1) < wchar_t(0))> {};
|
||||
template <> struct is_signed<wchar_t> : public etl::integral_constant<bool, static_cast<bool>(wchar_t(-1) < wchar_t(0))> {};
|
||||
template <> struct is_signed<signed char> : true_type {};
|
||||
template <> struct is_signed<short> : true_type {};
|
||||
template <> struct is_signed<int> : true_type {};
|
||||
@ -272,7 +279,7 @@ namespace etlstd
|
||||
template <> struct is_unsigned<bool> : true_type {};
|
||||
template <> struct is_unsigned<char> : integral_constant<bool, (char(255) > 0)> {};
|
||||
template <> struct is_unsigned<unsigned char> : true_type {};
|
||||
template <> struct is_unsigned<wchar_t> : public etlstd::integral_constant<bool, (wchar_t(-1) > wchar_t(0))> {};
|
||||
template <> struct is_unsigned<wchar_t> : public etl::integral_constant<bool, (wchar_t(-1) > wchar_t(0))> {};
|
||||
template <> struct is_unsigned<unsigned short> : true_type {};
|
||||
template <> struct is_unsigned<unsigned int> : true_type {};
|
||||
template <> struct is_unsigned<unsigned long> : true_type {};
|
||||
@ -391,7 +398,7 @@ namespace etlstd
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_lvalue_reference_v = etlstd::is_lvalue_reference<T>::value;
|
||||
inline constexpr bool is_lvalue_reference_v = etl::is_lvalue_reference<T>::value;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
@ -402,67 +409,67 @@ namespace etlstd
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_rvalue_reference_v = etlstd::is_rvalue_reference<T>::value;
|
||||
inline constexpr bool is_rvalue_reference_v = etl::is_rvalue_reference<T>::value;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_pod
|
||||
/// Only fundamental and pointers types are recognised.
|
||||
template <typename T> struct is_pod : etlstd::integral_constant<bool, etlstd::is_fundamental<T>::value || etlstd::is_pointer<T>::value> {};
|
||||
template <typename T> struct is_pod : etl::integral_constant<bool, etl::is_fundamental<T>::value || etl::is_pointer<T>::value> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_pod_v = etlstd::is_pod<T>::value;
|
||||
inline constexpr bool is_pod_v = etl::is_pod<T>::value;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_constructible
|
||||
/// Only POD types are recognised.
|
||||
template <typename T> struct is_trivially_constructible : etlstd::is_pod<T> {};
|
||||
template <typename T> struct is_trivially_constructible : etl::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_constructible_v = etlstd::is_trivially_constructible<T>::value;
|
||||
inline constexpr bool is_trivially_constructible_v = etl::is_trivially_constructible<T>::value;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_copy_constructible
|
||||
/// Only POD types are recognised.
|
||||
template <typename T> struct is_trivially_copy_constructible : etlstd::is_pod<T> {};
|
||||
template <typename T> struct is_trivially_copy_constructible : etl::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_copy_constructible_v = etlstd::is_trivially_copy_constructible<T>::value;
|
||||
inline constexpr bool is_trivially_copy_constructible_v = etl::is_trivially_copy_constructible<T>::value;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_destructible
|
||||
/// Only POD types are recognised.
|
||||
template <typename T> struct is_trivially_destructible : etlstd::is_pod<T> {};
|
||||
template <typename T> struct is_trivially_destructible : etl::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_destructible_v = etlstd::is_trivially_destructible<T>::value;
|
||||
inline constexpr bool is_trivially_destructible_v = etl::is_trivially_destructible<T>::value;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_copy_assignable
|
||||
/// Only POD types are recognised.
|
||||
template <typename T> struct is_trivially_copy_assignable : etlstd::is_pod<T> {};
|
||||
template <typename T> struct is_trivially_copy_assignable : etl::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_copy_assignable_v = etlstd::is_trivially_copy_assignable<T>::value;
|
||||
inline constexpr bool is_trivially_copy_assignable_v = etl::is_trivially_copy_assignable<T>::value;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_copyable
|
||||
/// Only POD types are recognised.
|
||||
template <typename T> struct is_trivially_copyable : etlstd::is_pod<T> {};
|
||||
template <typename T> struct is_trivially_copyable : etl::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_copyable_v = etlstd::is_trivially_copyable<T>::value;
|
||||
inline constexpr bool is_trivially_copyable_v = etl::is_trivially_copyable<T>::value;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
@ -478,9 +485,9 @@ namespace etlstd
|
||||
|
||||
template <> struct make_signed<wchar_t>
|
||||
{
|
||||
typedef etlstd::conditional<sizeof(wchar_t) == sizeof(int16_t),
|
||||
typedef etl::conditional<sizeof(wchar_t) == sizeof(int16_t),
|
||||
int16_t,
|
||||
etlstd::conditional<sizeof(wchar_t) == sizeof(int32_t),
|
||||
etl::conditional<sizeof(wchar_t) == sizeof(int32_t),
|
||||
int32_t,
|
||||
void>::type>::type type;
|
||||
};
|
||||
@ -507,9 +514,9 @@ namespace etlstd
|
||||
|
||||
template <> struct make_unsigned<wchar_t>
|
||||
{
|
||||
typedef etlstd::conditional<sizeof(wchar_t) == sizeof(uint16_t),
|
||||
typedef etl::conditional<sizeof(wchar_t) == sizeof(uint16_t),
|
||||
uint16_t,
|
||||
etlstd::conditional<sizeof(wchar_t) == sizeof(uint32_t),
|
||||
etl::conditional<sizeof(wchar_t) == sizeof(uint32_t),
|
||||
uint32_t,
|
||||
void>::type>::type type;
|
||||
};
|
||||
@ -596,10 +603,10 @@ namespace etlstd
|
||||
template <typename T>
|
||||
struct decay
|
||||
{
|
||||
typedef typename etlstd::remove_reference<T>::type U;
|
||||
typedef typename etlstd::conditional<etlstd::is_array<U>::value,
|
||||
typename etlstd::remove_extent<U>::type*,
|
||||
typename etlstd::remove_cv<U>::type>::type type;
|
||||
typedef typename etl::remove_reference<T>::type U;
|
||||
typedef typename etl::conditional<etl::is_array<U>::value,
|
||||
typename etl::remove_extent<U>::type*,
|
||||
typename etl::remove_cv<U>::type>::type type;
|
||||
};
|
||||
|
||||
#if ETL_CPP14_SUPPORTED
|
||||
@ -611,7 +618,7 @@ namespace etlstd
|
||||
/// is_base_of
|
||||
template<typename TBase,
|
||||
typename TDerived,
|
||||
const bool IsFundamental = (etlstd::is_fundamental<TBase>::value || etlstd::is_fundamental<TDerived>::value)>
|
||||
const bool IsFundamental = (etl::is_fundamental<TBase>::value || etl::is_fundamental<TDerived>::value)>
|
||||
struct is_base_of
|
||||
{
|
||||
private:
|
||||
@ -650,7 +657,7 @@ namespace etlstd
|
||||
|
||||
#if ETL_CPP14_SUPPORTED
|
||||
template <typename T>
|
||||
using add_lvalue_reference_t = typename etlstd::add_lvalue_reference<T>::type;
|
||||
using add_lvalue_reference_t = typename etl::add_lvalue_reference<T>::type;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
@ -666,14 +673,14 @@ namespace etlstd
|
||||
|
||||
#if ETL_CPP14_SUPPORTED
|
||||
template <typename T>
|
||||
using add_rvalue_reference_t = typename etlstd::add_rvalue_reference<T>::type;
|
||||
using add_rvalue_reference_t = typename etl::add_rvalue_reference<T>::type;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// decval
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
template <typename T>
|
||||
typename etlstd::add_rvalue_reference<T>::type declval() ETL_NOEXCEPT;
|
||||
typename etl::add_rvalue_reference<T>::type declval() ETL_NOEXCEPT;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
@ -682,30 +689,30 @@ namespace etlstd
|
||||
namespace private_type_traits
|
||||
{
|
||||
template <typename>
|
||||
using true_type_for = etlstd::true_type;
|
||||
using true_type_for = etl::true_type;
|
||||
|
||||
template <typename T>
|
||||
auto returnable(int)->true_type_for<T()>;
|
||||
|
||||
template <typename>
|
||||
auto returnable(...)->etlstd::false_type;
|
||||
auto returnable(...)->etl::false_type;
|
||||
|
||||
template <typename TFrom, typename TTo>
|
||||
auto nonvoid_convertible(int)->true_type_for<decltype(etlstd::declval<void(&)(TTo)>()(etlstd::declval<TFrom>()))
|
||||
auto nonvoid_convertible(int)->true_type_for<decltype(etl::declval<void(&)(TTo)>()(etl::declval<TFrom>()))
|
||||
>;
|
||||
template <typename, typename>
|
||||
auto nonvoid_convertible(...)->etlstd::false_type;
|
||||
auto nonvoid_convertible(...)->etl::false_type;
|
||||
}
|
||||
|
||||
template <typename TFrom, typename TTo>
|
||||
struct is_convertible : etlstd::integral_constant<bool, (decltype(private_type_traits::returnable<TTo>(0))::value &&
|
||||
decltype(private_type_traits::nonvoid_convertible<TFrom, TTo>(0))::value) ||
|
||||
(etlstd::is_void<TFrom>::value && etlstd::is_void<TTo>::value)> {};
|
||||
struct is_convertible : etl::integral_constant<bool, (decltype(private_type_traits::returnable<TTo>(0))::value &&
|
||||
decltype(private_type_traits::nonvoid_convertible<TFrom, TTo>(0))::value) ||
|
||||
(etl::is_void<TFrom>::value && etl::is_void<TTo>::value)> {};
|
||||
#endif
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename TFrom, typename TTo >
|
||||
inline constexpr bool is_convertible_v = etlstd::is_convertible<TFrom, TTo>::value;
|
||||
inline constexpr bool is_convertible_v = etl::is_convertible<TFrom, TTo>::value;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
@ -725,19 +732,15 @@ namespace etlstd
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr size_t alignment_of_v = etlstd::alignment_of<T>::value;
|
||||
inline constexpr size_t alignment_of_v = etl::alignment_of<T>::value;
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
#else // defined(ETL_NO_STL) || !ETL_CPP11_SUPPORTED
|
||||
|
||||
//*****************************************************************************
|
||||
// Traits are derived from the STL
|
||||
//*****************************************************************************
|
||||
#include <type_traits>
|
||||
//*****************************************************************************
|
||||
// Traits are derived from the STL
|
||||
//*****************************************************************************
|
||||
|
||||
namespace etlstd
|
||||
{
|
||||
//***************************************************************************
|
||||
/// integral_constant
|
||||
///\ingroup type_traits
|
||||
@ -751,7 +754,7 @@ namespace etlstd
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <bool B>
|
||||
using bool_constant = std::integral_constant<bool, B>;
|
||||
using bool_constant = std::bool_constant<B>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
@ -1017,105 +1020,105 @@ namespace etlstd
|
||||
#endif
|
||||
|
||||
#if !defined(ARDUINO) && !defined(ETL_STLPORT)
|
||||
//***************************************************************************
|
||||
/// is_trivially_constructible
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_constructible : std::is_trivially_constructible<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_constructible_v = std::is_trivially_constructible_v<T>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_copy_constructible
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_copy_constructible : std::is_trivially_copy_constructible<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_copy_constructible_v = std::is_trivially_copy_constructible_v<T>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_destructible
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_destructible : std::is_trivially_destructible<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_destructible_v = std::is_trivially_destructible_v<T>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_copy_assignable
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_copy_assignable : std::is_trivially_copy_assignable<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_copy_assignable_v = std::is_trivially_copy_assignable_v<T>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_copyable
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_copyable : std::is_trivially_copyable<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_copyable_v = std::is_trivially_copyable_v<T>;
|
||||
#endif
|
||||
#else
|
||||
//***************************************************************************
|
||||
/// is_trivially_constructible
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_constructible : std::is_trivially_constructible<T> {};
|
||||
template <typename T> struct is_trivially_constructible : std::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_constructible_v = std::is_trivially_constructible_v<T>;
|
||||
inline constexpr bool is_trivially_constructible_v = std::is_pod_v<T>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_copy_constructible
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_copy_constructible : std::is_trivially_copy_constructible<T> {};
|
||||
template <typename T> struct is_trivially_copy_constructible : std::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_copy_constructible_v = std::is_trivially_copy_constructible_v<T>;
|
||||
inline constexpr bool is_trivially_copy_constructible_v = std::is_pod_v<T>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_destructible
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_destructible : std::is_trivially_destructible<T> {};
|
||||
template <typename T> struct is_trivially_destructible : std::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_destructible_v = std::is_trivially_destructible_v<T>;
|
||||
inline constexpr bool is_trivially_destructible_v = std::is_pod_v<T>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_copy_assignable
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_copy_assignable : std::is_trivially_copy_assignable<T> {};
|
||||
template <typename T> struct is_trivially_copy_assignable : std::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_copy_assignable_v = std::is_trivially_copy_assignable_v<T>;
|
||||
inline constexpr bool is_trivially_copy_assignable_v = std::is_pod_v<T>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_copyable
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_copyable : std::is_trivially_copyable<T> {};
|
||||
template <typename T> struct is_trivially_copyable : std::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_copyable_v = std::is_trivially_copyable_v<T>;
|
||||
inline constexpr bool is_trivially_copyable_v = std::is_pod_v<T>;
|
||||
#endif
|
||||
#else
|
||||
// //***************************************************************************
|
||||
// /// is_trivially_constructible
|
||||
// ///\ingroup type_traits
|
||||
// template <typename T> struct is_trivially_constructible : etlstd::is_trivially_constructible<T> {};
|
||||
|
||||
//#if ETL_CPP17_SUPPORTED
|
||||
// template <typename T>
|
||||
// inline constexpr bool is_trivially_constructible_v = typename etlstd::::is_trivially_constructible_v<T>;
|
||||
//#endif
|
||||
|
||||
// //***************************************************************************
|
||||
// /// is_trivially_copy_constructible
|
||||
// ///\ingroup type_traits
|
||||
// template <typename T> struct is_trivially_copy_constructible : etlstd::::is_trivially_copy_constructible<T> {};
|
||||
|
||||
//#if ETL_CPP17_SUPPORTED
|
||||
// template <typename T>
|
||||
// inline constexpr bool is_trivially_copy_constructible_v = typename etlstd::::is_trivially_copy_constructible_v<T>;
|
||||
//#endif
|
||||
|
||||
// //***************************************************************************
|
||||
// /// is_trivially_destructible
|
||||
// ///\ingroup type_traits
|
||||
// template <typename T> struct is_trivially_destructible : etlstd::::is_trivially_destructible<T> {};
|
||||
|
||||
//#if ETL_CPP17_SUPPORTED
|
||||
// template <typename T>
|
||||
// inline constexpr bool is_trivially_destructible_v = typename etlstd::::is_trivially_destructible_v<T>;
|
||||
//#endif
|
||||
|
||||
// //***************************************************************************
|
||||
// /// is_trivially_copy_assignable
|
||||
// ///\ingroup type_traits
|
||||
// template <typename T> struct is_trivially_copy_assignable : etlstd::::is_trivially_copy_assignable<T> {};
|
||||
|
||||
//#if ETL_CPP17_SUPPORTED
|
||||
// template <typename T>
|
||||
// inline constexpr bool is_trivially_copy_assignable_v = typename etlstd::::is_trivially_copy_assignable_v<T>;
|
||||
//#endif
|
||||
|
||||
// //***************************************************************************
|
||||
// /// is_trivially_copyable
|
||||
// ///\ingroup type_traits
|
||||
// template <typename T> struct is_trivially_copyable : etlstd::::is_trivially_copyable<T> {};
|
||||
|
||||
//#if ETL_CPP17_SUPPORTED
|
||||
// template <typename T>
|
||||
// inline constexpr bool is_trivially_copyable_v = typename etlstd::::is_trivially_copyable_v<T>;
|
||||
//#endif
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
@ -1265,14 +1268,13 @@ namespace etlstd
|
||||
template <typename T>
|
||||
inline constexpr size_t alignment_of_v = std::alignment_of_v<T>;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
// ETL specific type traits.
|
||||
//***************************************************************************
|
||||
namespace etl
|
||||
{
|
||||
#endif // defined(ETL_NO_STL) || !ETL_CPP11_SUPPORTED
|
||||
|
||||
//***************************************************************************
|
||||
// ETL extended type traits.
|
||||
//***************************************************************************
|
||||
|
||||
//***************************************************************************
|
||||
/// conditional_integral_constant
|
||||
// /\ingroup type_traits
|
||||
@ -1282,14 +1284,14 @@ namespace etl
|
||||
template <typename T, T TRUE_VALUE, T FALSE_VALUE>
|
||||
struct conditional_integral_constant<true, T, TRUE_VALUE, FALSE_VALUE>
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
|
||||
static const T value = TRUE_VALUE;
|
||||
};
|
||||
|
||||
template <typename T, T TRUE_VALUE, T FALSE_VALUE>
|
||||
struct conditional_integral_constant<false, T, TRUE_VALUE, FALSE_VALUE>
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
|
||||
static const T value = FALSE_VALUE;
|
||||
};
|
||||
|
||||
@ -1301,18 +1303,16 @@ namespace etl
|
||||
template <typename T, typename T1, typename... TRest>
|
||||
struct is_one_of
|
||||
{
|
||||
static const bool value = etlstd::is_same<T, T1>::value ||
|
||||
etl::is_one_of<T, TRest...>::value;
|
||||
static const bool value = etl::is_same<T, T1>::value ||
|
||||
etl::is_one_of<T, TRest...>::value;
|
||||
};
|
||||
|
||||
template <typename T, typename T1>
|
||||
struct is_one_of<T, T1>
|
||||
{
|
||||
static const bool value = etlstd::is_same<T, T1>::value;
|
||||
static const bool value = etl::is_same<T, T1>::value;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
//***************************************************************************
|
||||
/// Template to determine if a type is one of a specified list.
|
||||
///\ingroup types
|
||||
@ -1320,8 +1320,7 @@ namespace etl
|
||||
typename T1, typename T2 = void, typename T3 = void, typename T4 = void,
|
||||
typename T5 = void, typename T6 = void, typename T7 = void, typename T8 = void,
|
||||
typename T9 = void, typename T10 = void, typename T11 = void, typename T12 = void,
|
||||
typename T13 = void, typename T14 = void, typename T15 = void, typename T16 = void,
|
||||
typename T17 = void>
|
||||
typename T13 = void, typename T14 = void, typename T15 = void, typename T16 = void>
|
||||
struct is_one_of
|
||||
{
|
||||
static const bool value =
|
||||
@ -1340,10 +1339,8 @@ namespace etl
|
||||
etlstd::is_same<T, T13>::value ||
|
||||
etlstd::is_same<T, T14>::value ||
|
||||
etlstd::is_same<T, T15>::value ||
|
||||
etlstd::is_same<T, T16>::value ||
|
||||
etlstd::is_same<T, T17>::value;
|
||||
etlstd::is_same<T, T16>::value;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
@ -1361,7 +1358,7 @@ namespace etl
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename etlstd::remove_cv<T>::type type_t;
|
||||
typedef typename etl::remove_cv<T>::type type_t;
|
||||
|
||||
public:
|
||||
|
||||
@ -1379,7 +1376,7 @@ namespace etl
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename etlstd::remove_cv<T>::type type_t;
|
||||
typedef typename etl::remove_cv<T>::type type_t;
|
||||
|
||||
public:
|
||||
|
||||
@ -1397,7 +1394,7 @@ namespace etl
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename etlstd::remove_cv<T>::type type_t;
|
||||
typedef typename etl::remove_cv<T>::type type_t;
|
||||
|
||||
public:
|
||||
|
||||
@ -1415,7 +1412,7 @@ namespace etl
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename etlstd::remove_cv<T>::type type_t;
|
||||
typedef typename etl::remove_cv<T>::type type_t;
|
||||
|
||||
public:
|
||||
|
||||
@ -1434,7 +1431,7 @@ namespace etl
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename etlstd::remove_cv<T>::type type_t;
|
||||
typedef typename etl::remove_cv<T>::type type_t;
|
||||
|
||||
public:
|
||||
|
||||
@ -1470,8 +1467,8 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// size_of
|
||||
///\ingroup types
|
||||
template <typename T> struct size_of : etlstd::integral_constant<size_t, sizeof(T)> {};
|
||||
template <> struct size_of<void> : etlstd::integral_constant<size_t, 1U> {};
|
||||
template <typename T> struct size_of : etl::integral_constant<size_t, sizeof(T)> {};
|
||||
template <> struct size_of<void> : etl::integral_constant<size_t, 1U> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
@ -1479,5 +1476,4 @@ namespace etl
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
#endif // ETL_TYPE_TRAITS_INCLUDED
|
||||
|
||||
@ -77,13 +77,17 @@ cog.outl("//********************************************************************
|
||||
/// Derived from either the standard or alternate definitions, dependant on whether or not ETL_NO_STL is defined.
|
||||
/// \ingroup utilities
|
||||
|
||||
#if defined(ETL_NO_STL)
|
||||
#if !defined(ETL_NO_STL) && ETL_CPP11_SUPPORTED
|
||||
#include <type_traits>
|
||||
#endif
|
||||
|
||||
//*****************************************************************************
|
||||
// Traits are defined by the ETL
|
||||
//*****************************************************************************
|
||||
namespace etlstd
|
||||
namespace etl
|
||||
{
|
||||
#if defined(ETL_NO_STL) || !ETL_CPP11_SUPPORTED
|
||||
|
||||
//*****************************************************************************
|
||||
// Traits are defined by the ETL
|
||||
//*****************************************************************************
|
||||
//***************************************************************************
|
||||
/// integral_constant
|
||||
template <typename T, const T VALUE>
|
||||
@ -104,6 +108,9 @@ namespace etlstd
|
||||
typedef integral_constant<bool, false> false_type;
|
||||
typedef integral_constant<bool, true> true_type;
|
||||
|
||||
template <typename T, const T VALUE>
|
||||
const T integral_constant<T, VALUE>::value;
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <bool B>
|
||||
using bool_constant = integral_constant<bool, B>;
|
||||
@ -420,27 +427,27 @@ namespace etlstd
|
||||
//***************************************************************************
|
||||
/// is_pod
|
||||
/// Only fundamental and pointers types are recognised.
|
||||
template <typename T> struct is_pod : etl::integral_constant<bool, etlstd::is_fundamental<T>::value || etlstd::is_pointer<T>::value> {};
|
||||
template <typename T> struct is_pod : etl::integral_constant<bool, etl::is_fundamental<T>::value || etl::is_pointer<T>::value> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_pod_v = etlstd::is_pod<T>::value;
|
||||
inline constexpr bool is_pod_v = etl::is_pod<T>::value;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_constructible
|
||||
/// Only POD types are recognised.
|
||||
template <typename T> struct is_trivially_constructible : etlstd::is_pod<T> {};
|
||||
template <typename T> struct is_trivially_constructible : etl::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_constructible_v = etlstd::is_trivially_constructible<T>::value;
|
||||
inline constexpr bool is_trivially_constructible_v = etl::is_trivially_constructible<T>::value;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_copy_constructible
|
||||
/// Only POD types are recognised.
|
||||
template <typename T> struct is_trivially_copy_constructible : etlstd::is_pod<T> {};
|
||||
template <typename T> struct is_trivially_copy_constructible : etl::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
@ -450,7 +457,7 @@ namespace etlstd
|
||||
//***************************************************************************
|
||||
/// is_trivially_destructible
|
||||
/// Only POD types are recognised.
|
||||
template <typename T> struct is_trivially_destructible : etlstd::is_pod<T> {};
|
||||
template <typename T> struct is_trivially_destructible : etl::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
@ -460,7 +467,7 @@ namespace etlstd
|
||||
//***************************************************************************
|
||||
/// is_trivially_copy_assignable
|
||||
/// Only POD types are recognised.
|
||||
template <typename T> struct is_trivially_copy_assignable : etlstd::is_pod<T> {};
|
||||
template <typename T> struct is_trivially_copy_assignable : etl::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
@ -470,7 +477,7 @@ namespace etlstd
|
||||
//***************************************************************************
|
||||
/// is_trivially_copyable
|
||||
/// Only POD types are recognised.
|
||||
template <typename T> struct is_trivially_copyable : etlstd::is_pod<T> {};
|
||||
template <typename T> struct is_trivially_copyable : etl::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
@ -490,9 +497,9 @@ namespace etlstd
|
||||
|
||||
template <> struct make_signed<wchar_t>
|
||||
{
|
||||
typedef etlstd::conditional<sizeof(wchar_t) == sizeof(int16_t),
|
||||
typedef etl::conditional<sizeof(wchar_t) == sizeof(int16_t),
|
||||
int16_t,
|
||||
etlstd::conditional<sizeof(wchar_t) == sizeof(int32_t),
|
||||
etl::conditional<sizeof(wchar_t) == sizeof(int32_t),
|
||||
int32_t,
|
||||
void>::type>::type type;
|
||||
};
|
||||
@ -519,9 +526,9 @@ namespace etlstd
|
||||
|
||||
template <> struct make_unsigned<wchar_t>
|
||||
{
|
||||
typedef etlstd::conditional<sizeof(wchar_t) == sizeof(uint16_t),
|
||||
typedef etl::conditional<sizeof(wchar_t) == sizeof(uint16_t),
|
||||
uint16_t,
|
||||
etlstd::conditional<sizeof(wchar_t) == sizeof(uint32_t),
|
||||
etl::conditional<sizeof(wchar_t) == sizeof(uint32_t),
|
||||
uint32_t,
|
||||
void>::type>::type type;
|
||||
};
|
||||
@ -608,10 +615,10 @@ namespace etlstd
|
||||
template <typename T>
|
||||
struct decay
|
||||
{
|
||||
typedef typename etlstd::remove_reference<T>::type U;
|
||||
typedef typename etlstd::conditional<etlstd::is_array<U>::value,
|
||||
typename etlstd::remove_extent<U>::type*,
|
||||
typename etlstd::remove_cv<U>::type>::type type;
|
||||
typedef typename etl::remove_reference<T>::type U;
|
||||
typedef typename etl::conditional<etl::is_array<U>::value,
|
||||
typename etl::remove_extent<U>::type*,
|
||||
typename etl::remove_cv<U>::type>::type type;
|
||||
};
|
||||
|
||||
#if ETL_CPP14_SUPPORTED
|
||||
@ -623,7 +630,7 @@ namespace etlstd
|
||||
/// is_base_of
|
||||
template<typename TBase,
|
||||
typename TDerived,
|
||||
const bool IsFundamental = (etlstd::is_fundamental<TBase>::value || etlstd::is_fundamental<TDerived>::value)>
|
||||
const bool IsFundamental = (etl::is_fundamental<TBase>::value || etl::is_fundamental<TDerived>::value)>
|
||||
struct is_base_of
|
||||
{
|
||||
private:
|
||||
@ -662,7 +669,7 @@ namespace etlstd
|
||||
|
||||
#if ETL_CPP14_SUPPORTED
|
||||
template <typename T>
|
||||
using add_lvalue_reference_t = typename etlstd::add_lvalue_reference<T>::type;
|
||||
using add_lvalue_reference_t = typename etl::add_lvalue_reference<T>::type;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
@ -678,14 +685,14 @@ namespace etlstd
|
||||
|
||||
#if ETL_CPP14_SUPPORTED
|
||||
template <typename T>
|
||||
using add_rvalue_reference_t = typename etlstd::add_rvalue_reference<T>::type;
|
||||
using add_rvalue_reference_t = typename etl::add_rvalue_reference<T>::type;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// decval
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
template <typename T>
|
||||
typename etlstd::add_rvalue_reference<T>::type declval() ETL_NOEXCEPT;
|
||||
typename etl::add_rvalue_reference<T>::type declval() ETL_NOEXCEPT;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
@ -694,30 +701,30 @@ namespace etlstd
|
||||
namespace private_type_traits
|
||||
{
|
||||
template <typename>
|
||||
using true_type_for = etlstd::true_type;
|
||||
using true_type_for = etl::true_type;
|
||||
|
||||
template <typename T>
|
||||
auto returnable(int)->true_type_for<T()>;
|
||||
|
||||
template <typename>
|
||||
auto returnable(...)->etlstd::false_type;
|
||||
auto returnable(...)->etl::false_type;
|
||||
|
||||
template <typename TFrom, typename TTo>
|
||||
auto nonvoid_convertible(int)->true_type_for<decltype(etl::declval<void(&)(TTo)>()(etl::declval<TFrom>()))
|
||||
>;
|
||||
template <typename, typename>
|
||||
auto nonvoid_convertible(...)->etlstd::false_type;
|
||||
auto nonvoid_convertible(...)->etl::false_type;
|
||||
}
|
||||
|
||||
template <typename TFrom, typename TTo>
|
||||
struct is_convertible : etl::integral_constant<bool, (decltype(private_type_traits::returnable<TTo>(0))::value &&
|
||||
decltype(private_type_traits::nonvoid_convertible<TFrom, TTo>(0))::value) ||
|
||||
(etl::is_void<TFrom>::value && etl::is_void<TTo>::value)> {};
|
||||
decltype(private_type_traits::nonvoid_convertible<TFrom, TTo>(0))::value) ||
|
||||
(etl::is_void<TFrom>::value && etl::is_void<TTo>::value)> {};
|
||||
#endif
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename TFrom, typename TTo >
|
||||
inline constexpr bool is_convertible_v = etlstd::is_convertible<TFrom, TTo>::value;
|
||||
inline constexpr bool is_convertible_v = etl::is_convertible<TFrom, TTo>::value;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
@ -737,19 +744,15 @@ namespace etlstd
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr size_t alignment_of_v = etlstd::alignment_of<T>::value;
|
||||
inline constexpr size_t alignment_of_v = etl::alignment_of<T>::value;
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
#else // defined(ETL_NO_STL) || !ETL_CPP11_SUPPORTED
|
||||
|
||||
//*****************************************************************************
|
||||
// Traits are derived from the STL
|
||||
//*****************************************************************************
|
||||
#include <type_traits>
|
||||
//*****************************************************************************
|
||||
// Traits are derived from the STL
|
||||
//*****************************************************************************
|
||||
|
||||
namespace etlstd
|
||||
{
|
||||
//***************************************************************************
|
||||
/// integral_constant
|
||||
///\ingroup type_traits
|
||||
@ -763,7 +766,7 @@ namespace etlstd
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <bool B>
|
||||
using bool_constant = std::integral_constant<bool, B>;
|
||||
using bool_constant = std::bool_constant<B>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
@ -1029,105 +1032,105 @@ namespace etlstd
|
||||
#endif
|
||||
|
||||
#if !defined(ARDUINO) && !defined(ETL_STLPORT)
|
||||
//***************************************************************************
|
||||
/// is_trivially_constructible
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_constructible : std::is_trivially_constructible<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_constructible_v = std::is_trivially_constructible_v<T>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_copy_constructible
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_copy_constructible : std::is_trivially_copy_constructible<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_copy_constructible_v = std::is_trivially_copy_constructible_v<T>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_destructible
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_destructible : std::is_trivially_destructible<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_destructible_v = std::is_trivially_destructible_v<T>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_copy_assignable
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_copy_assignable : std::is_trivially_copy_assignable<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_copy_assignable_v = std::is_trivially_copy_assignable_v<T>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_copyable
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_copyable : std::is_trivially_copyable<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_copyable_v = std::is_trivially_copyable_v<T>;
|
||||
#endif
|
||||
#else
|
||||
//***************************************************************************
|
||||
/// is_trivially_constructible
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_constructible : std::is_trivially_constructible<T> {};
|
||||
template <typename T> struct is_trivially_constructible : std::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_constructible_v = std::is_trivially_constructible_v<T>;
|
||||
inline constexpr bool is_trivially_constructible_v = std::is_pod_v<T>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_copy_constructible
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_copy_constructible : std::is_trivially_copy_constructible<T> {};
|
||||
template <typename T> struct is_trivially_copy_constructible : std::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_copy_constructible_v = std::is_trivially_copy_constructible_v<T>;
|
||||
inline constexpr bool is_trivially_copy_constructible_v = std::is_pod_v<T>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_destructible
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_destructible : std::is_trivially_destructible<T> {};
|
||||
template <typename T> struct is_trivially_destructible : std::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_destructible_v = std::is_trivially_destructible_v<T>;
|
||||
inline constexpr bool is_trivially_destructible_v = std::is_pod_v<T>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_copy_assignable
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_copy_assignable : std::is_trivially_copy_assignable<T> {};
|
||||
template <typename T> struct is_trivially_copy_assignable : std::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_copy_assignable_v = std::is_trivially_copy_assignable_v<T>;
|
||||
inline constexpr bool is_trivially_copy_assignable_v = std::is_pod_v<T>;
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
/// is_trivially_copyable
|
||||
///\ingroup type_traits
|
||||
template <typename T> struct is_trivially_copyable : std::is_trivially_copyable<T> {};
|
||||
template <typename T> struct is_trivially_copyable : std::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_trivially_copyable_v = std::is_trivially_copyable_v<T>;
|
||||
inline constexpr bool is_trivially_copyable_v = std::is_pod_v<T>;
|
||||
#endif
|
||||
#else
|
||||
// //***************************************************************************
|
||||
// /// is_trivially_constructible
|
||||
// ///\ingroup type_traits
|
||||
// template <typename T> struct is_trivially_constructible : etlstd::is_trivially_constructible<T> {};
|
||||
|
||||
//#if ETL_CPP17_SUPPORTED
|
||||
// template <typename T>
|
||||
// inline constexpr bool is_trivially_constructible_v = typename etl::::is_trivially_constructible_v<T>;
|
||||
//#endif
|
||||
|
||||
// //***************************************************************************
|
||||
// /// is_trivially_copy_constructible
|
||||
// ///\ingroup type_traits
|
||||
// template <typename T> struct is_trivially_copy_constructible : etl::::is_trivially_copy_constructible<T> {};
|
||||
|
||||
//#if ETL_CPP17_SUPPORTED
|
||||
// template <typename T>
|
||||
// inline constexpr bool is_trivially_copy_constructible_v = typename etl::::is_trivially_copy_constructible_v<T>;
|
||||
//#endif
|
||||
|
||||
// //***************************************************************************
|
||||
// /// is_trivially_destructible
|
||||
// ///\ingroup type_traits
|
||||
// template <typename T> struct is_trivially_destructible : etl::::is_trivially_destructible<T> {};
|
||||
|
||||
//#if ETL_CPP17_SUPPORTED
|
||||
// template <typename T>
|
||||
// inline constexpr bool is_trivially_destructible_v = typename etl::::is_trivially_destructible_v<T>;
|
||||
//#endif
|
||||
|
||||
// //***************************************************************************
|
||||
// /// is_trivially_copy_assignable
|
||||
// ///\ingroup type_traits
|
||||
// template <typename T> struct is_trivially_copy_assignable : etl::::is_trivially_copy_assignable<T> {};
|
||||
|
||||
//#if ETL_CPP17_SUPPORTED
|
||||
// template <typename T>
|
||||
// inline constexpr bool is_trivially_copy_assignable_v = typename etl::::is_trivially_copy_assignable_v<T>;
|
||||
//#endif
|
||||
|
||||
// //***************************************************************************
|
||||
// /// is_trivially_copyable
|
||||
// ///\ingroup type_traits
|
||||
// template <typename T> struct is_trivially_copyable : etl::::is_trivially_copyable<T> {};
|
||||
|
||||
//#if ETL_CPP17_SUPPORTED
|
||||
// template <typename T>
|
||||
// inline constexpr bool is_trivially_copyable_v = typename etl::::is_trivially_copyable_v<T>;
|
||||
//#endif
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
@ -1277,14 +1280,13 @@ namespace etlstd
|
||||
template <typename T>
|
||||
inline constexpr size_t alignment_of_v = std::alignment_of_v<T>;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
//***************************************************************************
|
||||
// ETL specific type traits.
|
||||
//***************************************************************************
|
||||
namespace etl
|
||||
{
|
||||
#endif // defined(ETL_NO_STL) || !ETL_CPP11_SUPPORTED
|
||||
|
||||
//***************************************************************************
|
||||
// ETL extended type traits.
|
||||
//***************************************************************************
|
||||
|
||||
//***************************************************************************
|
||||
/// conditional_integral_constant
|
||||
// /\ingroup type_traits
|
||||
@ -1294,14 +1296,14 @@ namespace etl
|
||||
template <typename T, T TRUE_VALUE, T FALSE_VALUE>
|
||||
struct conditional_integral_constant<true, T, TRUE_VALUE, FALSE_VALUE>
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
|
||||
static const T value = TRUE_VALUE;
|
||||
};
|
||||
|
||||
template <typename T, T TRUE_VALUE, T FALSE_VALUE>
|
||||
struct conditional_integral_constant<false, T, TRUE_VALUE, FALSE_VALUE>
|
||||
{
|
||||
ETL_STATIC_ASSERT(etlstd::is_integral<T>::value, "Not an integral type");
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Not an integral type");
|
||||
static const T value = FALSE_VALUE;
|
||||
};
|
||||
|
||||
@ -1313,18 +1315,16 @@ namespace etl
|
||||
template <typename T, typename T1, typename... TRest>
|
||||
struct is_one_of
|
||||
{
|
||||
static const bool value = etlstd::is_same<T, T1>::value ||
|
||||
static const bool value = etl::is_same<T, T1>::value ||
|
||||
etl::is_one_of<T, TRest...>::value;
|
||||
};
|
||||
|
||||
template <typename T, typename T1>
|
||||
struct is_one_of<T, T1>
|
||||
{
|
||||
static const bool value = etlstd::is_same<T, T1>::value;
|
||||
static const bool value = etl::is_same<T, T1>::value;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
/*[[[cog
|
||||
import cog
|
||||
cog.outl("//***************************************************************************")
|
||||
@ -1348,7 +1348,6 @@ namespace etl
|
||||
cog.outl("};")
|
||||
]]]*/
|
||||
/*[[[end]]]*/
|
||||
|
||||
#endif
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
@ -1366,7 +1365,7 @@ namespace etl
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename etlstd::remove_cv<T>::type type_t;
|
||||
typedef typename etl::remove_cv<T>::type type_t;
|
||||
|
||||
public:
|
||||
|
||||
@ -1384,7 +1383,7 @@ namespace etl
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename etlstd::remove_cv<T>::type type_t;
|
||||
typedef typename etl::remove_cv<T>::type type_t;
|
||||
|
||||
public:
|
||||
|
||||
@ -1402,7 +1401,7 @@ namespace etl
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename etlstd::remove_cv<T>::type type_t;
|
||||
typedef typename etl::remove_cv<T>::type type_t;
|
||||
|
||||
public:
|
||||
|
||||
@ -1420,7 +1419,7 @@ namespace etl
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename etlstd::remove_cv<T>::type type_t;
|
||||
typedef typename etl::remove_cv<T>::type type_t;
|
||||
|
||||
public:
|
||||
|
||||
@ -1439,7 +1438,7 @@ namespace etl
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename etlstd::remove_cv<T>::type type_t;
|
||||
typedef typename etl::remove_cv<T>::type type_t;
|
||||
|
||||
public:
|
||||
|
||||
@ -1475,8 +1474,8 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// size_of
|
||||
///\ingroup types
|
||||
template <typename T> struct size_of : etlstd::integral_constant<size_t, sizeof(T)> {};
|
||||
template <> struct size_of<void> : etlstd::integral_constant<size_t, 1U> {};
|
||||
template <typename T> struct size_of : etl::integral_constant<size_t, sizeof(T)> {};
|
||||
template <> struct size_of<void> : etl::integral_constant<size_t, 1U> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
@ -1484,5 +1483,4 @@ namespace etl
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
#endif // ETL_TYPE_TRAITS_INCLUDED
|
||||
|
||||
@ -191,7 +191,7 @@ namespace etl
|
||||
{
|
||||
ETL_ASSERT(position < size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
length_ = etlstd::min(length_, size() - position);
|
||||
length_ = etl::min(length_, size() - position);
|
||||
|
||||
new_string.assign(buffer + position, buffer + position + length_);
|
||||
}
|
||||
|
||||
@ -191,7 +191,7 @@ namespace etl
|
||||
{
|
||||
ETL_ASSERT(position < size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
length_ = etlstd::min(length_, size() - position);
|
||||
length_ = etl::min(length_, size() - position);
|
||||
|
||||
new_string.assign(buffer + position, buffer + position + length_);
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ namespace etl
|
||||
/// Can be used as a reference type for all unordered_map containing a specific type.
|
||||
///\ingroup unordered_map
|
||||
//***************************************************************************
|
||||
template <typename TKey, typename T, typename THash = etl::hash<TKey>, typename TKeyEqual = etlstd::equal_to<TKey> >
|
||||
template <typename TKey, typename T, typename THash = etl::hash<TKey>, typename TKeyEqual = etl::equal_to<TKey> >
|
||||
class iunordered_map
|
||||
{
|
||||
public:
|
||||
@ -482,7 +482,7 @@ namespace etl
|
||||
local_iterator inode;
|
||||
};
|
||||
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns an iterator to the beginning of the unordered_map.
|
||||
@ -609,7 +609,7 @@ namespace etl
|
||||
{
|
||||
size_t index = bucket(key);
|
||||
|
||||
return etlstd::distance(pbuckets[index].begin(), pbuckets[index].end());
|
||||
return etl::distance(pbuckets[index].begin(), pbuckets[index].end());
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -752,7 +752,7 @@ namespace etl
|
||||
void assign(TIterator first_, TIterator last_)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first_, last_);
|
||||
difference_type d = etl::distance(first_, last_);
|
||||
ETL_ASSERT(d >= 0, ETL_ERROR(unordered_map_iterator));
|
||||
ETL_ASSERT(size_t(d) <= max_size(), ETL_ERROR(unordered_map_full));
|
||||
#endif
|
||||
@ -1370,7 +1370,7 @@ namespace etl
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare>
|
||||
bool operator ==(const etl::iunordered_map<TKey, TMapped, TKeyCompare>& lhs, const etl::iunordered_map<TKey, TMapped, TKeyCompare>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -1389,7 +1389,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// A templated unordered_map implementation that uses a fixed size buffer.
|
||||
//*************************************************************************
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, const size_t MAX_BUCKETS_ = MAX_SIZE_, typename THash = etl::hash<TKey>, typename TKeyEqual = etlstd::equal_to<TKey> >
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, const size_t MAX_BUCKETS_ = MAX_SIZE_, typename THash = etl::hash<TKey>, typename TKeyEqual = etl::equal_to<TKey> >
|
||||
class unordered_map : public etl::iunordered_map<TKey, TValue, THash, TKeyEqual>
|
||||
{
|
||||
private:
|
||||
|
||||
@ -127,7 +127,7 @@ namespace etl
|
||||
/// Can be used as a reference type for all unordered_multimap containing a specific type.
|
||||
///\ingroup unordered_multimap
|
||||
//***************************************************************************
|
||||
template <typename TKey, typename T, typename THash = etl::hash<TKey>, typename TKeyEqual = etlstd::equal_to<TKey> >
|
||||
template <typename TKey, typename T, typename THash = etl::hash<TKey>, typename TKeyEqual = etl::equal_to<TKey> >
|
||||
class iunordered_multimap
|
||||
{
|
||||
public:
|
||||
@ -482,7 +482,7 @@ namespace etl
|
||||
local_iterator inode;
|
||||
};
|
||||
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns an iterator to the beginning of the unordered_multimap.
|
||||
@ -609,7 +609,7 @@ namespace etl
|
||||
{
|
||||
size_t index = bucket(key);
|
||||
|
||||
return etlstd::distance(pbuckets[index].begin(), pbuckets[index].end());
|
||||
return etl::distance(pbuckets[index].begin(), pbuckets[index].end());
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -641,7 +641,7 @@ namespace etl
|
||||
void assign(TIterator first_, TIterator last_)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first_, last_);
|
||||
difference_type d = etl::distance(first_, last_);
|
||||
ETL_ASSERT(d >= 0, ETL_ERROR(unordered_multimap_iterator));
|
||||
ETL_ASSERT(size_t(d) <= max_size(), ETL_ERROR(unordered_multimap_full));
|
||||
#endif
|
||||
@ -1279,7 +1279,7 @@ namespace etl
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare>
|
||||
bool operator ==(const etl::iunordered_multimap<TKey, TMapped, TKeyCompare>& lhs, const etl::iunordered_multimap<TKey, TMapped, TKeyCompare>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -1298,7 +1298,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// A templated unordered_multimap implementation that uses a fixed size buffer.
|
||||
//*************************************************************************
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, const size_t MAX_BUCKETS_ = MAX_SIZE_, typename THash = etl::hash<TKey>, typename TKeyEqual = etlstd::equal_to<TKey> >
|
||||
template <typename TKey, typename TValue, const size_t MAX_SIZE_, const size_t MAX_BUCKETS_ = MAX_SIZE_, typename THash = etl::hash<TKey>, typename TKeyEqual = etl::equal_to<TKey> >
|
||||
class unordered_multimap : public etl::iunordered_multimap<TKey, TValue, THash, TKeyEqual>
|
||||
{
|
||||
private:
|
||||
|
||||
@ -126,7 +126,7 @@ namespace etl
|
||||
/// Can be used as a reference type for all unordered_multiset containing a specific type.
|
||||
///\ingroup unordered_multiset
|
||||
//***************************************************************************
|
||||
template <typename TKey, typename THash = etl::hash<TKey>, typename TKeyEqual = etlstd::equal_to<TKey> >
|
||||
template <typename TKey, typename THash = etl::hash<TKey>, typename TKeyEqual = etl::equal_to<TKey> >
|
||||
class iunordered_multiset
|
||||
{
|
||||
public:
|
||||
@ -477,7 +477,7 @@ namespace etl
|
||||
local_iterator inode;
|
||||
};
|
||||
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns an iterator to the beginning of the unordered_multiset.
|
||||
@ -604,7 +604,7 @@ namespace etl
|
||||
{
|
||||
size_t index = bucket(key);
|
||||
|
||||
return etlstd::distance(pbuckets[index].begin(), pbuckets[index].end());
|
||||
return etl::distance(pbuckets[index].begin(), pbuckets[index].end());
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -636,7 +636,7 @@ namespace etl
|
||||
void assign(TIterator first_, TIterator last_)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first_, last_);
|
||||
difference_type d = etl::distance(first_, last_);
|
||||
ETL_ASSERT(d >= 0, ETL_ERROR(unordered_multiset_iterator));
|
||||
ETL_ASSERT(size_t(d) <= max_size(), ETL_ERROR(unordered_multiset_full));
|
||||
#endif
|
||||
@ -1274,7 +1274,7 @@ namespace etl
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare>
|
||||
bool operator ==(const etl::iunordered_multiset<TKey, TMapped, TKeyCompare>& lhs, const etl::iunordered_multiset<TKey, TMapped, TKeyCompare>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -1293,7 +1293,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// A templated unordered_multiset implementation that uses a fixed size buffer.
|
||||
//*************************************************************************
|
||||
template <typename TKey, const size_t MAX_SIZE_, size_t MAX_BUCKETS_ = MAX_SIZE_, typename THash = etl::hash<TKey>, typename TKeyEqual = etlstd::equal_to<TKey> >
|
||||
template <typename TKey, const size_t MAX_SIZE_, size_t MAX_BUCKETS_ = MAX_SIZE_, typename THash = etl::hash<TKey>, typename TKeyEqual = etl::equal_to<TKey> >
|
||||
class unordered_multiset : public etl::iunordered_multiset<TKey, THash, TKeyEqual>
|
||||
{
|
||||
private:
|
||||
|
||||
@ -127,7 +127,7 @@ namespace etl
|
||||
/// Can be used as a reference type for all unordered_set containing a specific type.
|
||||
///\ingroup unordered_set
|
||||
//***************************************************************************
|
||||
template <typename TKey, typename THash = etl::hash<TKey>, typename TKeyEqual = etlstd::equal_to<TKey> >
|
||||
template <typename TKey, typename THash = etl::hash<TKey>, typename TKeyEqual = etl::equal_to<TKey> >
|
||||
class iunordered_set
|
||||
{
|
||||
public:
|
||||
@ -169,7 +169,7 @@ namespace etl
|
||||
typedef typename bucket_t::const_iterator local_const_iterator;
|
||||
|
||||
//*********************************************************************
|
||||
class iterator : public etl::iterator<etlstd::forward_iterator_tag, TKey>
|
||||
class iterator : public etl::iterator<ETL_OR_STD::forward_iterator_tag, TKey>
|
||||
{
|
||||
public:
|
||||
|
||||
@ -328,7 +328,7 @@ namespace etl
|
||||
};
|
||||
|
||||
//*********************************************************************
|
||||
class const_iterator : public etl::iterator<etlstd::forward_iterator_tag, const TKey>
|
||||
class const_iterator : public etl::iterator<ETL_OR_STD::forward_iterator_tag, const TKey>
|
||||
{
|
||||
public:
|
||||
|
||||
@ -478,7 +478,7 @@ namespace etl
|
||||
local_iterator inode;
|
||||
};
|
||||
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
//*********************************************************************
|
||||
/// Returns an iterator to the beginning of the unordered_set.
|
||||
@ -605,7 +605,7 @@ namespace etl
|
||||
{
|
||||
size_t index = bucket(key);
|
||||
|
||||
return etlstd::distance(pbuckets[index].begin(), pbuckets[index].end());
|
||||
return etl::distance(pbuckets[index].begin(), pbuckets[index].end());
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -637,7 +637,7 @@ namespace etl
|
||||
void assign(TIterator first_, TIterator last_)
|
||||
{
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first_, last_);
|
||||
difference_type d = etl::distance(first_, last_);
|
||||
ETL_ASSERT(d >= 0, ETL_ERROR(unordered_set_iterator));
|
||||
ETL_ASSERT(size_t(d) <= max_size(), ETL_ERROR(unordered_set_full));
|
||||
#endif
|
||||
@ -1251,7 +1251,7 @@ namespace etl
|
||||
template <typename TKey, typename TMapped, typename TKeyCompare>
|
||||
bool operator ==(const etl::iunordered_set<TKey, TMapped, TKeyCompare>& lhs, const etl::iunordered_set<TKey, TMapped, TKeyCompare>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -1270,7 +1270,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// A templated unordered_set implementation that uses a fixed size buffer.
|
||||
//*************************************************************************
|
||||
template <typename TKey, const size_t MAX_SIZE_, size_t MAX_BUCKETS_ = MAX_SIZE_, typename THash = etl::hash<TKey>, typename TKeyEqual = etlstd::equal_to<TKey> >
|
||||
template <typename TKey, const size_t MAX_SIZE_, size_t MAX_BUCKETS_ = MAX_SIZE_, typename THash = etl::hash<TKey>, typename TKeyEqual = etl::equal_to<TKey> >
|
||||
class unordered_set : public etl::iunordered_set<TKey, THash, TKeyEqual>
|
||||
{
|
||||
private:
|
||||
|
||||
@ -41,7 +41,7 @@ SOFTWARE.
|
||||
///\defgroup utility utility
|
||||
///\ingroup utilities
|
||||
|
||||
namespace etlstd
|
||||
namespace etl
|
||||
{
|
||||
//******************************************************************************
|
||||
template <typename T1, typename T2>
|
||||
@ -144,20 +144,20 @@ namespace etlstd
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
//******************************************************************************
|
||||
template <typename T>
|
||||
constexpr typename etlstd::remove_reference<T>::type&& move(T&& t) noexcept
|
||||
constexpr typename etl::remove_reference<T>::type&& move(T&& t) noexcept
|
||||
{
|
||||
return static_cast<typename etlstd::remove_reference<T>::type&&>(t);
|
||||
return static_cast<typename etl::remove_reference<T>::type&&>(t);
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
template <typename T>
|
||||
constexpr T&& forward(typename etlstd::remove_reference<T>::type& t) noexcept
|
||||
constexpr T&& forward(typename etl::remove_reference<T>::type& t) noexcept
|
||||
{
|
||||
return static_cast<T&&>(t);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
constexpr T&& forward(typename etlstd::remove_reference<T>::type&& t) noexcept
|
||||
constexpr T&& forward(typename etl::remove_reference<T>::type&& t) noexcept
|
||||
{
|
||||
return static_cast<T&&>(t);
|
||||
}
|
||||
@ -189,7 +189,7 @@ namespace etlstd
|
||||
/// as_const
|
||||
//***************************************************************************
|
||||
template <typename T>
|
||||
typename etlstd::add_const<T>::type& as_const(T& t)
|
||||
typename etl::add_const<T>::type& as_const(T& t)
|
||||
{
|
||||
return t;
|
||||
}
|
||||
|
||||
@ -164,14 +164,14 @@ namespace etl
|
||||
template <typename T>
|
||||
struct Type_Id_Lookup
|
||||
{
|
||||
static const uint_least8_t type_id = etlstd::is_same<T, T1>::value ? 0 :
|
||||
etlstd::is_same<T, T2>::value ? 1 :
|
||||
etlstd::is_same<T, T3>::value ? 2 :
|
||||
etlstd::is_same<T, T4>::value ? 3 :
|
||||
etlstd::is_same<T, T5>::value ? 4 :
|
||||
etlstd::is_same<T, T6>::value ? 5 :
|
||||
etlstd::is_same<T, T7>::value ? 6 :
|
||||
etlstd::is_same<T, T8>::value ? 7 :
|
||||
static const uint_least8_t type_id = etl::is_same<T, T1>::value ? 0 :
|
||||
etl::is_same<T, T2>::value ? 1 :
|
||||
etl::is_same<T, T3>::value ? 2 :
|
||||
etl::is_same<T, T4>::value ? 3 :
|
||||
etl::is_same<T, T5>::value ? 4 :
|
||||
etl::is_same<T, T6>::value ? 5 :
|
||||
etl::is_same<T, T7>::value ? 6 :
|
||||
etl::is_same<T, T8>::value ? 7 :
|
||||
UNSUPPORTED_TYPE_ID;
|
||||
};
|
||||
|
||||
@ -723,7 +723,7 @@ namespace etl
|
||||
ETL_STATIC_ASSERT(Type_Is_Supported<T>::value, "Unsupported type");
|
||||
|
||||
destruct_current();
|
||||
::new (static_cast<T*>(data)) T(etlstd::forward<Args>(args)...);
|
||||
::new (static_cast<T*>(data)) T(etl::forward<Args>(args)...);
|
||||
type_id = Type_Id_Lookup<T>::type_id;
|
||||
|
||||
return *static_cast<T*>(data);
|
||||
|
||||
@ -290,7 +290,7 @@ namespace etl
|
||||
|
||||
if (p != nullptr)
|
||||
{
|
||||
new (p) T(etlstd::forward<Args>(args)...);
|
||||
new (p) T(etl::forward<Args>(args)...);
|
||||
}
|
||||
}
|
||||
|
||||
@ -305,22 +305,22 @@ namespace etl
|
||||
bool destroy(const T* const p)
|
||||
{
|
||||
ETL_STATIC_ASSERT((etl::is_one_of<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value ||
|
||||
etlstd::is_base_of<T, T1>::value ||
|
||||
etlstd::is_base_of<T, T2>::value ||
|
||||
etlstd::is_base_of<T, T3>::value ||
|
||||
etlstd::is_base_of<T, T4>::value ||
|
||||
etlstd::is_base_of<T, T5>::value ||
|
||||
etlstd::is_base_of<T, T6>::value ||
|
||||
etlstd::is_base_of<T, T7>::value ||
|
||||
etlstd::is_base_of<T, T8>::value ||
|
||||
etlstd::is_base_of<T, T9>::value ||
|
||||
etlstd::is_base_of<T, T10>::value ||
|
||||
etlstd::is_base_of<T, T11>::value ||
|
||||
etlstd::is_base_of<T, T12>::value ||
|
||||
etlstd::is_base_of<T, T13>::value ||
|
||||
etlstd::is_base_of<T, T14>::value ||
|
||||
etlstd::is_base_of<T, T15>::value ||
|
||||
etlstd::is_base_of<T, T16>::value), "Invalid type");
|
||||
etl::is_base_of<T, T1>::value ||
|
||||
etl::is_base_of<T, T2>::value ||
|
||||
etl::is_base_of<T, T3>::value ||
|
||||
etl::is_base_of<T, T4>::value ||
|
||||
etl::is_base_of<T, T5>::value ||
|
||||
etl::is_base_of<T, T6>::value ||
|
||||
etl::is_base_of<T, T7>::value ||
|
||||
etl::is_base_of<T, T8>::value ||
|
||||
etl::is_base_of<T, T9>::value ||
|
||||
etl::is_base_of<T, T10>::value ||
|
||||
etl::is_base_of<T, T11>::value ||
|
||||
etl::is_base_of<T, T12>::value ||
|
||||
etl::is_base_of<T, T13>::value ||
|
||||
etl::is_base_of<T, T14>::value ||
|
||||
etl::is_base_of<T, T15>::value ||
|
||||
etl::is_base_of<T, T16>::value), "Invalid type");
|
||||
|
||||
p->~T();
|
||||
|
||||
|
||||
@ -382,8 +382,8 @@ namespace etl
|
||||
cog.outl("T%s>::value ||" % int(NTypes))
|
||||
|
||||
for n in range(1, int(NTypes)):
|
||||
cog.outl(" etlstd::is_base_of<T, T%s>::value ||" % n)
|
||||
cog.outl(" etlstd::is_base_of<T, T%s>::value), \"Invalid type\");" % int(NTypes))
|
||||
cog.outl(" etl::is_base_of<T, T%s>::value ||" % n)
|
||||
cog.outl(" etl::is_base_of<T, T%s>::value), \"Invalid type\");" % int(NTypes))
|
||||
|
||||
]]]*/
|
||||
/*[[[end]]]*/
|
||||
|
||||
@ -95,7 +95,7 @@ namespace etl
|
||||
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
typedef size_t size_type;
|
||||
typedef typename etlstd::iterator_traits<iterator>::difference_type difference_type;
|
||||
typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
|
||||
|
||||
protected:
|
||||
|
||||
@ -365,17 +365,17 @@ namespace etl
|
||||
template <typename TIterator>
|
||||
void assign(TIterator first, TIterator last)
|
||||
{
|
||||
ETL_STATIC_ASSERT((etlstd::is_same<typename etlstd::remove_cv<T>::type, typename etlstd::remove_cv<typename etlstd::iterator_traits<TIterator>::value_type>::type>::value), "Iterator type does not match container type");
|
||||
ETL_STATIC_ASSERT((etl::is_same<typename etl::remove_cv<T>::type, typename etl::remove_cv<typename etl::iterator_traits<TIterator>::value_type>::type>::value), "Iterator type does not match container type");
|
||||
|
||||
#if defined(ETL_DEBUG)
|
||||
difference_type d = etlstd::distance(first, last);
|
||||
difference_type d = etl::distance(first, last);
|
||||
ETL_ASSERT(static_cast<size_t>(d) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
#endif
|
||||
|
||||
initialise();
|
||||
|
||||
p_end = etl::uninitialized_copy(first, last, p_buffer);
|
||||
ETL_ADD_DEBUG_COUNT(uint32_t(etlstd::distance(first, last)))
|
||||
ETL_ADD_DEBUG_COUNT(uint32_t(etl::distance(first, last)))
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
@ -426,7 +426,7 @@ namespace etl
|
||||
#if defined(ETL_CHECK_PUSH_POP)
|
||||
ETL_ASSERT(size() != CAPACITY, ETL_ERROR(vector_full));
|
||||
#endif
|
||||
create_back(etlstd::move(value));
|
||||
create_back(etl::move(value));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -442,7 +442,7 @@ namespace etl
|
||||
#if defined(ETL_CHECK_PUSH_POP)
|
||||
ETL_ASSERT(size() != CAPACITY, ETL_ERROR(vector_full));
|
||||
#endif
|
||||
::new (p_end) T(etlstd::forward<Args>(args)...);
|
||||
::new (p_end) T(etl::forward<Args>(args)...);
|
||||
++p_end;
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
}
|
||||
@ -541,7 +541,7 @@ namespace etl
|
||||
else
|
||||
{
|
||||
create_back(back());
|
||||
etlstd::copy_backward(position, p_end - 2, p_end - 1);
|
||||
etl::copy_backward(position, p_end - 2, p_end - 1);
|
||||
*position = value;
|
||||
}
|
||||
|
||||
@ -561,13 +561,13 @@ namespace etl
|
||||
|
||||
if (position == end())
|
||||
{
|
||||
create_back(etlstd::move(value));
|
||||
create_back(etl::move(value));
|
||||
}
|
||||
else
|
||||
{
|
||||
create_back(etlstd::move(back()));
|
||||
etlstd::move_backward(position, p_end - 2, p_end - 1);
|
||||
*position = etlstd::move(value);
|
||||
create_back(etl::move(back()));
|
||||
etl::move_backward(position, p_end - 2, p_end - 1);
|
||||
*position = etl::move(value);
|
||||
}
|
||||
|
||||
return position;
|
||||
@ -594,11 +594,11 @@ namespace etl
|
||||
{
|
||||
p = etl::addressof(*position);
|
||||
create_back(back());
|
||||
etlstd::copy_backward(position, p_end - 2, p_end - 1);
|
||||
etl::copy_backward(position, p_end - 2, p_end - 1);
|
||||
(*position).~T();
|
||||
}
|
||||
|
||||
::new (p) T(etlstd::forward<Args>(args)...);
|
||||
::new (p) T(etl::forward<Args>(args)...);
|
||||
|
||||
return position;
|
||||
}
|
||||
@ -619,7 +619,7 @@ namespace etl
|
||||
{
|
||||
p = etl::addressof(*position);
|
||||
create_back(back());
|
||||
etlstd::copy_backward(position, p_end - 2, p_end - 1);
|
||||
etl::copy_backward(position, p_end - 2, p_end - 1);
|
||||
(*position).~T();
|
||||
}
|
||||
|
||||
@ -644,7 +644,7 @@ namespace etl
|
||||
{
|
||||
p = etl::addressof(*position);
|
||||
create_back(back());
|
||||
etlstd::copy_backward(position, p_end - 2, p_end - 1);
|
||||
etl::copy_backward(position, p_end - 2, p_end - 1);
|
||||
(*position).~T();
|
||||
}
|
||||
|
||||
@ -669,7 +669,7 @@ namespace etl
|
||||
{
|
||||
p = etl::addressof(*position);
|
||||
create_back(back());
|
||||
etlstd::copy_backward(position, p_end - 2, p_end - 1);
|
||||
etl::copy_backward(position, p_end - 2, p_end - 1);
|
||||
(*position).~T();
|
||||
}
|
||||
|
||||
@ -694,7 +694,7 @@ namespace etl
|
||||
{
|
||||
p = etl::addressof(*position);
|
||||
create_back(back());
|
||||
etlstd::copy_backward(position, p_end - 2, p_end - 1);
|
||||
etl::copy_backward(position, p_end - 2, p_end - 1);
|
||||
(*position).~T();
|
||||
}
|
||||
|
||||
@ -716,7 +716,7 @@ namespace etl
|
||||
ETL_ASSERT((size() + n) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
|
||||
size_t insert_n = n;
|
||||
size_t insert_begin = etlstd::distance(begin(), position);
|
||||
size_t insert_begin = etl::distance(begin(), position);
|
||||
size_t insert_end = insert_begin + insert_n;
|
||||
|
||||
// Copy old data.
|
||||
@ -745,14 +745,14 @@ namespace etl
|
||||
ETL_ADD_DEBUG_COUNT(construct_old_n)
|
||||
|
||||
// Copy old.
|
||||
etlstd::copy_backward(p_buffer + insert_begin, p_buffer + insert_begin + copy_old_n, p_buffer + insert_end + copy_old_n);
|
||||
etl::copy_backward(p_buffer + insert_begin, p_buffer + insert_begin + copy_old_n, p_buffer + insert_end + copy_old_n);
|
||||
|
||||
// Construct new.
|
||||
etl::uninitialized_fill_n(p_end, construct_new_n, value);
|
||||
ETL_ADD_DEBUG_COUNT(construct_new_n)
|
||||
|
||||
// Copy new.
|
||||
etlstd::fill_n(p_buffer + insert_begin, copy_new_n, value);
|
||||
etl::fill_n(p_buffer + insert_begin, copy_new_n, value);
|
||||
|
||||
p_end += n;
|
||||
}
|
||||
@ -768,12 +768,12 @@ namespace etl
|
||||
template <class TIterator>
|
||||
void insert(iterator position, TIterator first, TIterator last)
|
||||
{
|
||||
size_t count = etlstd::distance(first, last);
|
||||
size_t count = etl::distance(first, last);
|
||||
|
||||
ETL_ASSERT((size() + count) <= CAPACITY, ETL_ERROR(vector_full));
|
||||
|
||||
size_t insert_n = count;
|
||||
size_t insert_begin = etlstd::distance(begin(), position);
|
||||
size_t insert_begin = etl::distance(begin(), position);
|
||||
size_t insert_end = insert_begin + insert_n;
|
||||
|
||||
// Copy old data.
|
||||
@ -802,7 +802,7 @@ namespace etl
|
||||
ETL_ADD_DEBUG_COUNT(construct_old_n)
|
||||
|
||||
// Copy old.
|
||||
etlstd::copy_backward(p_buffer + insert_begin, p_buffer + insert_begin + copy_old_n, p_buffer + insert_end + copy_old_n);
|
||||
etl::copy_backward(p_buffer + insert_begin, p_buffer + insert_begin + copy_old_n, p_buffer + insert_end + copy_old_n);
|
||||
|
||||
// Construct new.
|
||||
etl::uninitialized_copy_n(first + copy_new_n, construct_new_n, p_end);
|
||||
@ -821,7 +821,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
iterator erase(iterator i_element)
|
||||
{
|
||||
etlstd::copy(i_element + 1, end(), i_element);
|
||||
etl::copy(i_element + 1, end(), i_element);
|
||||
destroy_back();
|
||||
|
||||
return i_element;
|
||||
@ -843,8 +843,8 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
etlstd::copy(last, end(), first);
|
||||
size_t n_delete = etlstd::distance(first, last);
|
||||
etl::copy(last, end(), first);
|
||||
size_t n_delete = etl::distance(first, last);
|
||||
|
||||
// Destroy the elements left over at the end.
|
||||
etl::destroy(p_end - n_delete, p_end);
|
||||
@ -880,7 +880,7 @@ namespace etl
|
||||
iterator itr = rhs.begin();
|
||||
while (itr != rhs.end())
|
||||
{
|
||||
push_back(etlstd::move(*itr));
|
||||
push_back(etl::move(*itr));
|
||||
++itr;
|
||||
}
|
||||
|
||||
@ -952,7 +952,7 @@ namespace etl
|
||||
void initialise()
|
||||
{
|
||||
etl::destroy(p_buffer, p_end);
|
||||
ETL_SUBTRACT_DEBUG_COUNT(int32_t(etlstd::distance(p_buffer, p_end)))
|
||||
ETL_SUBTRACT_DEBUG_COUNT(int32_t(etl::distance(p_buffer, p_end)))
|
||||
|
||||
p_end = p_buffer;
|
||||
}
|
||||
@ -962,7 +962,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
void initialise_source_external_buffer_after_move()
|
||||
{
|
||||
ETL_SUBTRACT_DEBUG_COUNT(int32_t(etlstd::distance(p_buffer, p_end)))
|
||||
ETL_SUBTRACT_DEBUG_COUNT(int32_t(etl::distance(p_buffer, p_end)))
|
||||
|
||||
p_end = p_buffer;
|
||||
}
|
||||
@ -972,7 +972,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
void initialise_destination_external_buffer_after_move()
|
||||
{
|
||||
ETL_ADD_DEBUG_COUNT(int32_t(etlstd::distance(p_buffer, p_end)))
|
||||
ETL_ADD_DEBUG_COUNT(int32_t(etl::distance(p_buffer, p_end)))
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -1018,7 +1018,7 @@ namespace etl
|
||||
//*********************************************************************
|
||||
inline void create_back(rvalue_reference value)
|
||||
{
|
||||
etl::create_copy_at(p_end, etlstd::move(value));
|
||||
etl::create_copy_at(p_end, etl::move(value));
|
||||
ETL_INCREMENT_DEBUG_COUNT
|
||||
|
||||
++p_end;
|
||||
@ -1065,7 +1065,7 @@ namespace etl
|
||||
template <typename T>
|
||||
bool operator ==(const etl::ivector<T>& lhs, const etl::ivector<T>& rhs)
|
||||
{
|
||||
return (lhs.size() == rhs.size()) && etlstd::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -1091,7 +1091,7 @@ namespace etl
|
||||
template <typename T>
|
||||
bool operator <(const etl::ivector<T>& lhs, const etl::ivector<T>& rhs)
|
||||
{
|
||||
return etlstd::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
@ -1243,7 +1243,7 @@ namespace etl
|
||||
typename etl::ivector<T>::iterator itr = other.begin();
|
||||
while (itr != other.end())
|
||||
{
|
||||
this->push_back(etlstd::move(*itr));
|
||||
this->push_back(etl::move(*itr));
|
||||
++itr;
|
||||
}
|
||||
|
||||
@ -1262,7 +1262,7 @@ namespace etl
|
||||
typename etl::ivector<T>::iterator itr = rhs.begin();
|
||||
while (itr != rhs.end())
|
||||
{
|
||||
this->push_back(etlstd::move(*itr));
|
||||
this->push_back(etl::move(*itr));
|
||||
++itr;
|
||||
}
|
||||
|
||||
@ -1298,7 +1298,7 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
typename etl::aligned_storage<sizeof(T) * MAX_SIZE, etlstd::alignment_of<T>::value>::type buffer;
|
||||
typename etl::aligned_storage<sizeof(T) * MAX_SIZE, etl::alignment_of<T>::value>::type buffer;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
@ -1560,7 +1560,7 @@ namespace etl
|
||||
typename etl::ivector<T*>::iterator itr = other.begin();
|
||||
while (itr != other.end())
|
||||
{
|
||||
this->push_back(etlstd::move(*itr));
|
||||
this->push_back(etl::move(*itr));
|
||||
++itr;
|
||||
}
|
||||
|
||||
@ -1579,7 +1579,7 @@ namespace etl
|
||||
typename etl::ivector<T*>::iterator itr = rhs.begin();
|
||||
while (itr != rhs.end())
|
||||
{
|
||||
this->push_back(etlstd::move(*itr));
|
||||
this->push_back(etl::move(*itr));
|
||||
++itr;
|
||||
}
|
||||
|
||||
@ -1600,7 +1600,7 @@ namespace etl
|
||||
|
||||
private:
|
||||
|
||||
typename etl::aligned_storage<sizeof(T*) * MAX_SIZE, etlstd::alignment_of<T*>::value>::type buffer;
|
||||
typename etl::aligned_storage<sizeof(T*) * MAX_SIZE, etl::alignment_of<T*>::value>::type buffer;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
|
||||
@ -192,7 +192,7 @@ namespace etl
|
||||
{
|
||||
ETL_ASSERT(position < size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
length_ = etlstd::min(length_, size() - position);
|
||||
length_ = etl::min(length_, size() - position);
|
||||
|
||||
new_string.assign(buffer + position, buffer + position + length_);
|
||||
}
|
||||
|
||||
@ -8,15 +8,6 @@ if(NOT UnitTest++_FOUND)
|
||||
# Add unittest-cpp as an ExternalProject
|
||||
include(cmake/unit-test_external_project.cmake)
|
||||
add_unittest_cpp()
|
||||
else()
|
||||
include(${UnitTest++_CONFIG})
|
||||
# The CMake install of UnitTest++ puts the include directory to ${CMAKE_INSTALL_PREFIX}/include
|
||||
# under the assumptions that clients will consume the headers via
|
||||
# #include<UnitTest++/UnitTest++.h>
|
||||
# However the tests in etl include the headers directly, e.g.
|
||||
# #include "UnitTest++.h"
|
||||
# Therefore we update the provide UTPP_INCLUDE_DIRS here
|
||||
set(UTPP_INCLUDE_DIRS "${UTPP_INCLUDE_DIRS}/UnitTest++")
|
||||
endif()
|
||||
|
||||
include_directories(${UTPP_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/../include)
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
#ifndef UNITTEST_EXTRA_CHECKMACROS_H
|
||||
#ifndef UNITTEST_EXTRA_CHECKMACROS_H
|
||||
#define UNITTEST_EXTRA_CHECKMACROS_H
|
||||
|
||||
#include "HelperMacros.h"
|
||||
#include "ExceptionMacros.h"
|
||||
#include "Checks.h"
|
||||
#include "AssertException.h"
|
||||
#include "MemoryOutStream.h"
|
||||
#include "TestDetails.h"
|
||||
#include "CurrentTest.h"
|
||||
#include "ReportAssertImpl.h"
|
||||
#include "UnitTest++/HelperMacros.h"
|
||||
#include "UnitTest++/ExceptionMacros.h"
|
||||
#include "UnitTest++/Checks.h"
|
||||
#include "UnitTest++/AssertException.h"
|
||||
#include "UnitTest++/MemoryOutStream.h"
|
||||
#include "UnitTest++/TestDetails.h"
|
||||
#include "UnitTest++/CurrentTest.h"
|
||||
#include "UnitTest++/ReportAssertImpl.h"
|
||||
|
||||
#ifndef CHECK_NO_THROW
|
||||
#define CHECK_NO_THROW(expression) \
|
||||
|
||||
@ -100,16 +100,37 @@
|
||||
<Mode after="always" />
|
||||
</ExtraCommands>
|
||||
</Target>
|
||||
<Target title="Windows No STL - Force No Advanced">
|
||||
<Option output="bin/Debug No STL/ETL" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Debug/" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-m32" />
|
||||
<Add option="-g" />
|
||||
<Add option="-std=c++1z" />
|
||||
<Add option="-D_DEBUG" />
|
||||
<Add option="-DETL_NO_STL" />
|
||||
<Add option="-DETL_FORCE_NO_ADVANCED_CPP" />
|
||||
<Add directory="../../src" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-m32" />
|
||||
</Linker>
|
||||
<ExtraCommands>
|
||||
<Add after="${TARGET_OUTPUT_DIR}${TARGET_OUTPUT_BASENAME}" />
|
||||
</ExtraCommands>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wunused-parameter" />
|
||||
<Add option="-Wstrict-aliasing" />
|
||||
<Add option="-Wshadow" />
|
||||
<Add option="-Wundef" />
|
||||
<Add option="-Wall" />
|
||||
<Add option="-Wunused-parameter" />
|
||||
<Add option="-Wstrict-aliasing" />
|
||||
<Add option="-std=c++17" />
|
||||
<Add option="-fexceptions" />
|
||||
<Add directory="../../../unittest-cpp/UnitTest++/" />
|
||||
<Add directory="../../../unittest-cpp/" />
|
||||
<Add directory="../../src" />
|
||||
<Add directory="../" />
|
||||
<Add directory="../../src/c" />
|
||||
@ -183,12 +204,14 @@
|
||||
<Option target="Windows" />
|
||||
<Option target="Windows 64" />
|
||||
<Option target="Windows No STL" />
|
||||
<Option target="Windows No STL - Force No Advanced" />
|
||||
</Unit>
|
||||
<Unit filename="../../../unittest-cpp/UnitTest++/Win32/TimeHelpers.h">
|
||||
<Option target="<{~None~}>" />
|
||||
</Unit>
|
||||
<Unit filename="../../../unittest-cpp/UnitTest++/XmlTestReporter.cpp" />
|
||||
<Unit filename="../../../unittest-cpp/UnitTest++/XmlTestReporter.h" />
|
||||
<Unit filename="../../include/etl/absolute.h" />
|
||||
<Unit filename="../../include/etl/algorithm.h" />
|
||||
<Unit filename="../../include/etl/alignment.h" />
|
||||
<Unit filename="../../include/etl/array.h" />
|
||||
@ -214,13 +237,24 @@
|
||||
<Unit filename="../../include/etl/constant.h" />
|
||||
<Unit filename="../../include/etl/container.h" />
|
||||
<Unit filename="../../include/etl/crc16.h" />
|
||||
<Unit filename="../../include/etl/crc16_aug_ccitt.h" />
|
||||
<Unit filename="../../include/etl/crc16_ccitt.h" />
|
||||
<Unit filename="../../include/etl/crc16_genibus.h" />
|
||||
<Unit filename="../../include/etl/crc16_kermit.h" />
|
||||
<Unit filename="../../include/etl/crc16_modbus.h" />
|
||||
<Unit filename="../../include/etl/crc16_usb.h" />
|
||||
<Unit filename="../../include/etl/crc16_x25.h" />
|
||||
<Unit filename="../../include/etl/crc16_xmodem.h" />
|
||||
<Unit filename="../../include/etl/crc32.h" />
|
||||
<Unit filename="../../include/etl/crc32_bzip2.h" />
|
||||
<Unit filename="../../include/etl/crc32_c.h" />
|
||||
<Unit filename="../../include/etl/crc32_mpeg2.h" />
|
||||
<Unit filename="../../include/etl/crc32_posix.h" />
|
||||
<Unit filename="../../include/etl/crc64_ecma.h" />
|
||||
<Unit filename="../../include/etl/crc8_ccitt.h" />
|
||||
<Unit filename="../../include/etl/crc8_rohc.h" />
|
||||
<Unit filename="../../include/etl/cstring.h" />
|
||||
<Unit filename="../../include/etl/cumulative_moving_average.h" />
|
||||
<Unit filename="../../include/etl/cyclic_value.h" />
|
||||
<Unit filename="../../include/etl/debounce.h" />
|
||||
<Unit filename="../../include/etl/debug_count.h" />
|
||||
@ -266,11 +300,14 @@
|
||||
<Unit filename="../../include/etl/jenkins.h" />
|
||||
<Unit filename="../../include/etl/largest.h" />
|
||||
<Unit filename="../../include/etl/largest_generator.h" />
|
||||
<Unit filename="../../include/etl/limits.h" />
|
||||
<Unit filename="../../include/etl/list.h" />
|
||||
<Unit filename="../../include/etl/log.h" />
|
||||
<Unit filename="../../include/etl/macros.h" />
|
||||
<Unit filename="../../include/etl/map.h" />
|
||||
<Unit filename="../../include/etl/math_constants.h" />
|
||||
<Unit filename="../../include/etl/memory.h" />
|
||||
<Unit filename="../../include/etl/memory_model.h" />
|
||||
<Unit filename="../../include/etl/message.h" />
|
||||
<Unit filename="../../include/etl/message_bus.h" />
|
||||
<Unit filename="../../include/etl/message_router.h" />
|
||||
@ -282,6 +319,7 @@
|
||||
<Unit filename="../../include/etl/multiset.h" />
|
||||
<Unit filename="../../include/etl/murmur3.h" />
|
||||
<Unit filename="../../include/etl/mutex.h" />
|
||||
<Unit filename="../../include/etl/negative.h" />
|
||||
<Unit filename="../../include/etl/null_type.h" />
|
||||
<Unit filename="../../include/etl/nullptr.h" />
|
||||
<Unit filename="../../include/etl/numeric.h" />
|
||||
@ -296,8 +334,6 @@
|
||||
<Unit filename="../../include/etl/power.h" />
|
||||
<Unit filename="../../include/etl/priority_queue.h" />
|
||||
<Unit filename="../../include/etl/private/choose_namespace.h" />
|
||||
<Unit filename="../../include/etl/private/choose_pair_types.h" />
|
||||
<Unit filename="../../include/etl/private/choose_tag_types.h" />
|
||||
<Unit filename="../../include/etl/private/crc16_poly_0x1021_.h" />
|
||||
<Unit filename="../../include/etl/private/crc16_poly_0x8005.h" />
|
||||
<Unit filename="../../include/etl/private/crc32_poly_0x04c11db7.h" />
|
||||
@ -340,6 +376,7 @@
|
||||
<Unit filename="../../include/etl/queue_mpmc_mutex.h" />
|
||||
<Unit filename="../../include/etl/queue_spsc_atomic.h" />
|
||||
<Unit filename="../../include/etl/queue_spsc_isr.h" />
|
||||
<Unit filename="../../include/etl/queue_spsc_locked.h" />
|
||||
<Unit filename="../../include/etl/radix.h" />
|
||||
<Unit filename="../../include/etl/random.h" />
|
||||
<Unit filename="../../include/etl/ratio.h" />
|
||||
@ -347,6 +384,7 @@
|
||||
<Unit filename="../../include/etl/reference_flat_multimap.h" />
|
||||
<Unit filename="../../include/etl/reference_flat_multiset.h" />
|
||||
<Unit filename="../../include/etl/reference_flat_set.h" />
|
||||
<Unit filename="../../include/etl/scaled_rounding.h" />
|
||||
<Unit filename="../../include/etl/scheduler.h" />
|
||||
<Unit filename="../../include/etl/set.h" />
|
||||
<Unit filename="../../include/etl/smallest.h" />
|
||||
@ -359,16 +397,6 @@
|
||||
<Unit filename="../../include/etl/stack.h" />
|
||||
<Unit filename="../../include/etl/state_chart.h" />
|
||||
<Unit filename="../../include/etl/static_assert.h" />
|
||||
<Unit filename="../../include/etl/stl/algorithm.h" />
|
||||
<Unit filename="../../include/etl/stl/alternate/algorithm.h" />
|
||||
<Unit filename="../../include/etl/stl/alternate/functional.h" />
|
||||
<Unit filename="../../include/etl/stl/alternate/iterator.h" />
|
||||
<Unit filename="../../include/etl/stl/alternate/limits.h" />
|
||||
<Unit filename="../../include/etl/stl/alternate/utility.h" />
|
||||
<Unit filename="../../include/etl/stl/functional.h" />
|
||||
<Unit filename="../../include/etl/stl/iterator.h" />
|
||||
<Unit filename="../../include/etl/stl/limits.h" />
|
||||
<Unit filename="../../include/etl/stl/utility.h" />
|
||||
<Unit filename="../../include/etl/string_view.h" />
|
||||
<Unit filename="../../include/etl/task.h" />
|
||||
<Unit filename="../../include/etl/temp.h" />
|
||||
@ -381,6 +409,8 @@
|
||||
<Unit filename="../../include/etl/type_lookup.h" />
|
||||
<Unit filename="../../include/etl/type_lookup_generator.h" />
|
||||
<Unit filename="../../include/etl/type_select.h" />
|
||||
<Unit filename="../../include/etl/type_select_generator.h" />
|
||||
<Unit filename="../../include/etl/type_traits - Copy.h" />
|
||||
<Unit filename="../../include/etl/type_traits.h" />
|
||||
<Unit filename="../../include/etl/type_traits_generator.h" />
|
||||
<Unit filename="../../include/etl/u16format_spec.h" />
|
||||
@ -403,12 +433,11 @@
|
||||
<Unit filename="../../include/etl/wstring.h" />
|
||||
<Unit filename="../ExtraCheckMacros.h" />
|
||||
<Unit filename="../data.h" />
|
||||
<Unit filename="../ecl_user.h" />
|
||||
<Unit filename="../etl_profile.h" />
|
||||
<Unit filename="../iterators_for_unit_tests.h" />
|
||||
<Unit filename="../main.cpp" />
|
||||
<Unit filename="../murmurhash3.cpp" />
|
||||
<Unit filename="../murmurhash3.h" />
|
||||
<Unit filename="../no_stl_test_iterators.h" />
|
||||
<Unit filename="../test_algorithm.cpp" />
|
||||
<Unit filename="../test_alignment.cpp" />
|
||||
<Unit filename="../test_array.cpp" />
|
||||
@ -429,6 +458,7 @@
|
||||
<Unit filename="../test_constant.cpp" />
|
||||
<Unit filename="../test_container.cpp" />
|
||||
<Unit filename="../test_crc.cpp" />
|
||||
<Unit filename="../test_cumulative_moving_average.cpp" />
|
||||
<Unit filename="../test_cyclic_value.cpp" />
|
||||
<Unit filename="../test_debounce.cpp" />
|
||||
<Unit filename="../test_delegate.cpp" />
|
||||
@ -451,6 +481,7 @@
|
||||
<Unit filename="../test_functional.cpp" />
|
||||
<Unit filename="../test_hash.cpp" />
|
||||
<Unit filename="../test_indirect_vector.cpp" />
|
||||
<Unit filename="../test_indirect_vector_external_buffer.cpp" />
|
||||
<Unit filename="../test_instance_count.cpp" />
|
||||
<Unit filename="../test_integral_limits.cpp" />
|
||||
<Unit filename="../test_intrusive_forward_list.cpp" />
|
||||
@ -462,6 +493,7 @@
|
||||
<Unit filename="../test_iterator.cpp" />
|
||||
<Unit filename="../test_jenkins.cpp" />
|
||||
<Unit filename="../test_largest.cpp" />
|
||||
<Unit filename="../test_limits.cpp" />
|
||||
<Unit filename="../test_list.cpp" />
|
||||
<Unit filename="../test_list_shared_pool.cpp" />
|
||||
<Unit filename="../test_make_string.cpp" />
|
||||
@ -475,10 +507,6 @@
|
||||
<Unit filename="../test_multimap.cpp" />
|
||||
<Unit filename="../test_multiset.cpp" />
|
||||
<Unit filename="../test_murmur3.cpp" />
|
||||
<Unit filename="../test_no_stl_algorithm.cpp" />
|
||||
<Unit filename="../test_no_stl_functional.cpp" />
|
||||
<Unit filename="../test_no_stl_limits.cpp" />
|
||||
<Unit filename="../test_no_stl_utility.cpp" />
|
||||
<Unit filename="../test_numeric.cpp" />
|
||||
<Unit filename="../test_observer.cpp" />
|
||||
<Unit filename="../test_optional.cpp" />
|
||||
|
||||
@ -30,6 +30,7 @@ SOFTWARE.
|
||||
#define ETL_TEST_DATA_INCLUDED
|
||||
|
||||
#include <ostream>
|
||||
#include <utility>
|
||||
|
||||
#include "etl/instance_count.h"
|
||||
|
||||
@ -258,5 +259,4 @@ std::ostream& operator << (std::ostream& s, const TestDataM<T>& rhs)
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user