mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 14:49:53 +08:00
Merge branch 'feature/string-optimisation' into development
This commit is contained in:
commit
9e4b5870e1
File diff suppressed because it is too large
Load Diff
417
include/etl/flags.h
Normal file
417
include/etl/flags.h
Normal file
@ -0,0 +1,417 @@
|
||||
///\file
|
||||
|
||||
/******************************************************************************
|
||||
The MIT License(MIT)
|
||||
|
||||
Embedded Template Library.
|
||||
https://github.com/ETLCPP/etl
|
||||
https://www.etlcpp.com
|
||||
|
||||
Copyright(c) 2020 jwellbelove
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files(the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions :
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef ETL_FLAGS_INCLUDED
|
||||
#define ETL_FLAGS_INCLUDED
|
||||
|
||||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "platform.h"
|
||||
#include "type_traits.h"
|
||||
#include "integral_limits.h"
|
||||
#include "static_assert.h"
|
||||
|
||||
#if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && ETL_USING_STL
|
||||
#include <initializer_list>
|
||||
#endif
|
||||
|
||||
namespace etl
|
||||
{
|
||||
//*************************************************************************
|
||||
/// flags
|
||||
/// Flags based around an integral value.
|
||||
//*************************************************************************
|
||||
template <typename T, T MASK = etl::integral_limits<T>::max>
|
||||
class flags
|
||||
{
|
||||
public:
|
||||
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value && etl::is_unsigned<T>::value, "Unsigned integral values only");
|
||||
|
||||
typedef T value_type;
|
||||
|
||||
static ETL_CONSTANT value_type ALL_SET = etl::integral_limits<value_type>::max & MASK;
|
||||
static ETL_CONSTANT value_type ALL_CLEAR = 0;
|
||||
|
||||
static const size_t NBITS = etl::integral_limits<value_type>::bits;
|
||||
|
||||
//*************************************************************************
|
||||
/// Constructor
|
||||
//*************************************************************************
|
||||
flags() ETL_NOEXCEPT
|
||||
: data(value_type(0))
|
||||
{
|
||||
}
|
||||
|
||||
flags(value_type initial) ETL_NOEXCEPT
|
||||
: data(initial & MASK)
|
||||
{
|
||||
}
|
||||
|
||||
flags(const flags<T, MASK>& initial) ETL_NOEXCEPT
|
||||
: data(initial.value())
|
||||
{
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Tests bits.
|
||||
//*************************************************************************
|
||||
template <value_type position>
|
||||
bool test() const ETL_NOEXCEPT
|
||||
{
|
||||
return (data & position) != value_type(0);
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
bool test(value_type position) const
|
||||
{
|
||||
return (data & position) != value_type(0);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Set the bits.
|
||||
//*************************************************************************
|
||||
template <value_type position, bool value>
|
||||
flags<T, MASK>& set() ETL_NOEXCEPT
|
||||
{
|
||||
if ETL_IF_CONSTEXPR(value)
|
||||
{
|
||||
data |= position;
|
||||
}
|
||||
else
|
||||
{
|
||||
data &= ~position;
|
||||
}
|
||||
|
||||
data &= MASK;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
template <value_type position>
|
||||
flags<T, MASK>& set(bool value) ETL_NOEXCEPT
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
data |= position;
|
||||
}
|
||||
else
|
||||
{
|
||||
data &= ~position;
|
||||
}
|
||||
|
||||
data &= MASK;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
template <value_type position>
|
||||
flags<T, MASK>& set() ETL_NOEXCEPT
|
||||
{
|
||||
data |= position;
|
||||
data &= MASK;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
flags<T, MASK>& set(value_type position) ETL_NOEXCEPT
|
||||
{
|
||||
data |= position;
|
||||
data &= MASK;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
flags<T, MASK>& set(value_type position, bool value) ETL_NOEXCEPT
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
data |= position;
|
||||
}
|
||||
else
|
||||
{
|
||||
data &= ~position;
|
||||
}
|
||||
|
||||
data &= MASK;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Clear all of the flags.
|
||||
//*************************************************************************
|
||||
flags<T, MASK>& clear() ETL_NOEXCEPT
|
||||
{
|
||||
data = ALL_CLEAR;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Reset the bit at the position.
|
||||
//*************************************************************************
|
||||
template <value_type position>
|
||||
flags<T, MASK>& reset() ETL_NOEXCEPT
|
||||
{
|
||||
data &= ~position;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
flags<T, MASK>& reset(value_type position) ETL_NOEXCEPT
|
||||
{
|
||||
data &= ~position;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Flip bits.
|
||||
//*************************************************************************
|
||||
flags<T, MASK>& flip() ETL_NOEXCEPT
|
||||
{
|
||||
data = ~data;
|
||||
data &= MASK;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
template <value_type position>
|
||||
flags<T, MASK>& flip() ETL_NOEXCEPT
|
||||
{
|
||||
data ^= position;
|
||||
data &= MASK;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
flags<T, MASK>& flip(value_type position) ETL_NOEXCEPT
|
||||
{
|
||||
data ^= position;
|
||||
data &= MASK;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
// Are all the bits sets?
|
||||
//*************************************************************************
|
||||
bool all() const ETL_NOEXCEPT
|
||||
{
|
||||
return data == MASK;
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
template <value_type position>
|
||||
bool all_of() const ETL_NOEXCEPT
|
||||
{
|
||||
return (data & (position & MASK)) == (position & MASK);
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
bool all_of(value_type position) const ETL_NOEXCEPT
|
||||
{
|
||||
position &= MASK;
|
||||
return (data & position) == position;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Are none of the bits set?
|
||||
//*************************************************************************
|
||||
bool none() const ETL_NOEXCEPT
|
||||
{
|
||||
return (data & MASK) == ALL_CLEAR;
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
template <value_type position>
|
||||
bool none_of() const ETL_NOEXCEPT
|
||||
{
|
||||
return !any_of(position);
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
bool none_of(value_type position) const ETL_NOEXCEPT
|
||||
{
|
||||
return !any_of(position);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Are any of the bits set?
|
||||
//*************************************************************************
|
||||
bool any() const ETL_NOEXCEPT
|
||||
{
|
||||
return (data & MASK) != value_type(0);
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
template <value_type position>
|
||||
bool any_of() const ETL_NOEXCEPT
|
||||
{
|
||||
return (data & (position & MASK)) != value_type(0);
|
||||
}
|
||||
|
||||
//*******************************************
|
||||
bool any_of(value_type position) const
|
||||
{
|
||||
return (data & (position & MASK)) != value_type(0);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Return the value of the flags.
|
||||
//*************************************************************************
|
||||
value_type value() const ETL_NOEXCEPT
|
||||
{
|
||||
return data;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Set the value of the flags.
|
||||
//*************************************************************************
|
||||
void value(value_type initial) ETL_NOEXCEPT
|
||||
{
|
||||
data = initial & MASK;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Return the value of the flags.
|
||||
//*************************************************************************
|
||||
operator value_type() const ETL_NOEXCEPT
|
||||
{
|
||||
return data;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// operator &=
|
||||
//*************************************************************************
|
||||
flags<T, MASK>& operator &=(value_type other) ETL_NOEXCEPT
|
||||
{
|
||||
data &= other;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// operator |=
|
||||
//*************************************************************************
|
||||
flags<T, MASK>& operator |=(value_type other) ETL_NOEXCEPT
|
||||
{
|
||||
data |= other;
|
||||
data &= MASK;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// operator ^=
|
||||
//*************************************************************************
|
||||
flags<T, MASK>& operator ^=(value_type other) ETL_NOEXCEPT
|
||||
{
|
||||
data ^= other;
|
||||
data &= MASK;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// operator =
|
||||
//*************************************************************************
|
||||
flags<T, MASK>& operator =(flags<T, MASK> other) ETL_NOEXCEPT
|
||||
{
|
||||
if (this != &other)
|
||||
{
|
||||
data = other.data;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// operator =
|
||||
//*************************************************************************
|
||||
flags<T, MASK>& operator =(value_type other) ETL_NOEXCEPT
|
||||
{
|
||||
data = (other & MASK);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// swap
|
||||
//*************************************************************************
|
||||
void swap(flags<T, MASK>& other) ETL_NOEXCEPT
|
||||
{
|
||||
etl::swap(data, other.data);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
value_type data;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
/// operator ==
|
||||
//***************************************************************************
|
||||
template <typename T, T MASK>
|
||||
bool operator == (flags<T, MASK> lhs, flags<T, MASK> rhs) ETL_NOEXCEPT
|
||||
{
|
||||
return lhs.value() == rhs.value();
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
/// operator !=
|
||||
//***************************************************************************
|
||||
template <typename T, T MASK>
|
||||
bool operator != (flags<T, MASK> lhs, flags<T, MASK> rhs) ETL_NOEXCEPT
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// swap
|
||||
//*************************************************************************
|
||||
template <typename T, T MASK>
|
||||
void swap(etl::flags<T, MASK>& lhs, etl::flags<T, MASK>& rhs) ETL_NOEXCEPT
|
||||
{
|
||||
lhs.swap(rhs);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -1570,6 +1570,28 @@ namespace etl
|
||||
template <typename T>
|
||||
inline constexpr size_t size_of_v = etl::size_of<T>::value;
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
//***************************************************************************
|
||||
/// are_all_same
|
||||
template <typename T, typename T1, typename... TRest>
|
||||
struct are_all_same
|
||||
{
|
||||
static const bool value = etl::is_same<T, T1>::value &&
|
||||
etl::are_all_same<T, TRest...>::value;
|
||||
};
|
||||
|
||||
template <typename T, typename T1>
|
||||
struct are_all_same<T, T1>
|
||||
{
|
||||
static const bool value = etl::is_same<T, T1>::value;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T, typename T1, typename... TRest>
|
||||
inline constexpr bool are_all_same_v = are_all_same<T, T1, TRest...>::value;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // ETL_TYPE_TRAITS_INCLUDED
|
||||
|
||||
@ -101,6 +101,20 @@ SOFTWARE.
|
||||
#define ETL_EXPLICIT_STRING_FROM_CHAR
|
||||
#endif
|
||||
|
||||
// Option to disable truncation checks for strings.
|
||||
#if defined(ETL_DISABLE_STRING_TRUNCATION_CHECKS)
|
||||
#define ETL_STRING_TRUNCATION_CHECKS_ENABLED 0
|
||||
#else
|
||||
#define ETL_STRING_TRUNCATION_CHECKS_ENABLED 1
|
||||
#endif
|
||||
|
||||
// Option to disable clear-after-use functionality for strings.
|
||||
#if defined(ETL_DISABLE_STRING_CLEAR_AFTER_USE)
|
||||
#define ETL_STRING_CLEAR_AFTER_USE_ENABLED 0
|
||||
#else
|
||||
#define ETL_STRING_CLEAR_AFTER_USE_ENABLED 1
|
||||
#endif
|
||||
|
||||
// The macros below are dependent on the profile.
|
||||
// C++11
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_FORCE_NO_ADVANCED_CPP)
|
||||
|
||||
@ -105,14 +105,16 @@ namespace etl
|
||||
|
||||
this->assign(other.begin() + position, other.begin() + position + length_);
|
||||
|
||||
if (other.truncated())
|
||||
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
||||
if (other.is_truncated())
|
||||
{
|
||||
this->is_truncated = true;
|
||||
this->set_truncated(true);
|
||||
|
||||
#if defined(ETL_STRING_TRUNCATION_IS_ERROR)
|
||||
ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -141,7 +143,7 @@ namespace etl
|
||||
///\param initialSize The initial size of the string.
|
||||
///\param value The value to fill the string with.
|
||||
//*************************************************************************
|
||||
string(size_t count, value_type c)
|
||||
string(size_type count, value_type c)
|
||||
: istring(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
this->initialise();
|
||||
@ -187,7 +189,7 @@ namespace etl
|
||||
///\param position The position of the first character. Default = 0.
|
||||
///\param length The number of characters. Default = npos.
|
||||
//*************************************************************************
|
||||
etl::string<MAX_SIZE_> substr(size_t position = 0, size_t length_ = npos) const
|
||||
etl::string<MAX_SIZE_> substr(size_type position = 0, size_type length_ = npos) const
|
||||
{
|
||||
etl::string<MAX_SIZE_> new_string;
|
||||
|
||||
@ -270,11 +272,12 @@ namespace etl
|
||||
typedef istring interface_type;
|
||||
|
||||
typedef istring::value_type value_type;
|
||||
typedef istring::size_type size_type;
|
||||
|
||||
//*************************************************************************
|
||||
/// Constructor.
|
||||
//*************************************************************************
|
||||
string(value_type* buffer, size_t buffer_size)
|
||||
string(value_type* buffer, size_type buffer_size)
|
||||
: istring(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->initialise();
|
||||
@ -284,7 +287,7 @@ namespace etl
|
||||
/// Copy constructor.
|
||||
///\param other The other string.
|
||||
//*************************************************************************
|
||||
string(const etl::string<0U>& other, value_type* buffer, size_t buffer_size)
|
||||
string(const etl::string<0U>& other, value_type* buffer, size_type buffer_size)
|
||||
: istring(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(other);
|
||||
@ -294,7 +297,7 @@ namespace etl
|
||||
/// From other istring.
|
||||
///\param other The other istring.
|
||||
//*************************************************************************
|
||||
string(const etl::istring& other, value_type* buffer, size_t buffer_size)
|
||||
string(const etl::istring& other, value_type* buffer, size_type buffer_size)
|
||||
: istring(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(other);
|
||||
@ -306,28 +309,30 @@ namespace etl
|
||||
///\param position The position of the first character.
|
||||
///\param length The number of characters. Default = npos.
|
||||
//*************************************************************************
|
||||
string(const etl::istring& other, value_type* buffer, size_t buffer_size, size_t position, size_t length_ = npos)
|
||||
string(const etl::istring& other, value_type* buffer, size_type buffer_size, size_type position, size_type length_ = npos)
|
||||
: istring(buffer, buffer_size - 1U)
|
||||
{
|
||||
ETL_ASSERT(position < other.size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
this->assign(other.begin() + position, other.begin() + position + length_);
|
||||
|
||||
if (other.truncated())
|
||||
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
||||
if (other.is_truncated())
|
||||
{
|
||||
this->is_truncated = true;
|
||||
this->set_truncated(true);
|
||||
|
||||
#if defined(ETL_STRING_TRUNCATION_IS_ERROR)
|
||||
ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Constructor, from null terminated text.
|
||||
///\param text The initial text of the string.
|
||||
//*************************************************************************
|
||||
string(const value_type* text, value_type* buffer, size_t buffer_size)
|
||||
string(const value_type* text, value_type* buffer, size_type buffer_size)
|
||||
: istring(buffer, buffer_size - 1U)
|
||||
{
|
||||
// Is the initial text at the same address as the buffer?
|
||||
@ -346,7 +351,7 @@ namespace etl
|
||||
///\param text The initial text of the string.
|
||||
///\param count The number of characters to copy.
|
||||
//*************************************************************************
|
||||
string(const value_type* text, size_t count, value_type* buffer, size_t buffer_size)
|
||||
string(const value_type* text, size_type count, value_type* buffer, size_type buffer_size)
|
||||
: istring(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(text, text + count);
|
||||
@ -357,7 +362,7 @@ namespace etl
|
||||
///\param initialSize The initial size of the string.
|
||||
///\param value The value to fill the string with.
|
||||
//*************************************************************************
|
||||
string(size_t count, value_type c, value_type* buffer, size_t buffer_size)
|
||||
string(size_type count, value_type c, value_type* buffer, size_type buffer_size)
|
||||
: istring(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->initialise();
|
||||
@ -371,7 +376,7 @@ namespace etl
|
||||
///\param last The iterator to the last element + 1.
|
||||
//*************************************************************************
|
||||
template <typename TIterator>
|
||||
string(TIterator first, TIterator last, value_type* buffer, size_t buffer_size)
|
||||
string(TIterator first, TIterator last, value_type* buffer, size_type buffer_size)
|
||||
: istring(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(first, last);
|
||||
@ -381,7 +386,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Construct from initializer_list.
|
||||
//*************************************************************************
|
||||
string(std::initializer_list<value_type> init, value_type* buffer, size_t buffer_size)
|
||||
string(std::initializer_list<value_type> init, value_type* buffer, size_type buffer_size)
|
||||
: istring(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(init.begin(), init.end());
|
||||
@ -392,7 +397,7 @@ namespace etl
|
||||
/// From string_view.
|
||||
///\param view The string_view.
|
||||
//*************************************************************************
|
||||
explicit string(const etl::string_view& view, value_type* buffer, size_t buffer_size)
|
||||
explicit string(const etl::string_view& view, value_type* buffer, size_type buffer_size)
|
||||
: istring(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(view.begin(), view.end());
|
||||
@ -456,7 +461,7 @@ namespace etl
|
||||
size_t operator()(const etl::istring& text) const
|
||||
{
|
||||
return etl::private_hash::generic_hash<size_t>(reinterpret_cast<const uint8_t*>(&text[0]),
|
||||
reinterpret_cast<const uint8_t*>(&text[text.size()]));
|
||||
reinterpret_cast<const uint8_t*>(&text[text.size()]));
|
||||
}
|
||||
};
|
||||
|
||||
@ -466,7 +471,7 @@ namespace etl
|
||||
size_t operator()(const etl::string<SIZE>& text) const
|
||||
{
|
||||
return etl::private_hash::generic_hash<size_t>(reinterpret_cast<const uint8_t*>(&text[0]),
|
||||
reinterpret_cast<const uint8_t*>(&text[text.size()]));
|
||||
reinterpret_cast<const uint8_t*>(&text[text.size()]));
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -113,7 +113,7 @@ namespace etl
|
||||
template <typename TIString>
|
||||
void trim_from_left(TIString& s, typename TIString::const_pointer trim_characters)
|
||||
{
|
||||
size_t position = s.find_first_not_of(trim_characters);
|
||||
typename TIString::size_type position = s.find_first_not_of(trim_characters);
|
||||
s.erase(0U, position);
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ namespace etl
|
||||
template <typename TStringView>
|
||||
TStringView trim_from_view_left(const TStringView& view, typename TStringView::const_pointer trim_characters)
|
||||
{
|
||||
size_t first = view.find_first_not_of(trim_characters);
|
||||
typename TStringView::size_type first = view.find_first_not_of(trim_characters);
|
||||
|
||||
typename TStringView::const_pointer pbegin = view.data() + view.size();
|
||||
|
||||
@ -163,7 +163,7 @@ namespace etl
|
||||
template <typename TIString>
|
||||
void trim_left(TIString& s, typename TIString::const_pointer delimiters)
|
||||
{
|
||||
size_t p = s.find_first_of(delimiters);
|
||||
typename TIString::size_type p = s.find_first_of(delimiters);
|
||||
|
||||
if (p == TIString::npos)
|
||||
{
|
||||
@ -182,7 +182,7 @@ namespace etl
|
||||
template <typename TStringView>
|
||||
TStringView trim_view_left(const TStringView& view, typename TStringView::const_pointer delimiters)
|
||||
{
|
||||
size_t first = view.find_first_of(delimiters);
|
||||
typename TStringView::size_type first = view.find_first_of(delimiters);
|
||||
|
||||
typename TStringView::const_pointer pbegin = view.data();
|
||||
|
||||
@ -193,7 +193,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
return TStringView(pbegin, size_t(0U));
|
||||
return TStringView(pbegin, typename TStringView::size_type(0U));
|
||||
}
|
||||
}
|
||||
|
||||
@ -224,7 +224,7 @@ namespace etl
|
||||
template <typename TStringView>
|
||||
TStringView trim_from_view_right(const TStringView& view, typename TStringView::const_pointer trim_characters)
|
||||
{
|
||||
size_t last = view.find_last_not_of(trim_characters) + 1;
|
||||
typename TStringView::size_type last = view.find_last_not_of(trim_characters) + 1;
|
||||
|
||||
typename TStringView::const_pointer pend = view.data();
|
||||
|
||||
@ -252,7 +252,7 @@ namespace etl
|
||||
template <typename TIString>
|
||||
void trim_right(TIString& s, typename TIString::const_pointer delimiters)
|
||||
{
|
||||
size_t p = s.find_last_of(delimiters);
|
||||
typename TIString::size_type p = s.find_last_of(delimiters);
|
||||
|
||||
if (p == TIString::npos)
|
||||
{
|
||||
@ -275,7 +275,7 @@ namespace etl
|
||||
template <typename TStringView>
|
||||
TStringView trim_view_right(const TStringView& view, typename TStringView::const_pointer delimiters)
|
||||
{
|
||||
size_t last = view.find_last_of(delimiters) + 1;
|
||||
typename TStringView::size_type last = view.find_last_of(delimiters) + 1;
|
||||
|
||||
typename TStringView::const_pointer pend = view.data();
|
||||
|
||||
@ -286,7 +286,7 @@ namespace etl
|
||||
}
|
||||
else
|
||||
{
|
||||
return TStringView(view.data(), size_t(0U));
|
||||
return TStringView(view.data(), typename TStringView::size_type(0U));
|
||||
}
|
||||
}
|
||||
|
||||
@ -318,8 +318,8 @@ namespace etl
|
||||
template <typename TStringView>
|
||||
TStringView trim_from_view(const TStringView& view, typename TStringView::const_pointer trim_characters)
|
||||
{
|
||||
size_t first = view.find_first_not_of(trim_characters);
|
||||
size_t last = view.find_last_not_of(trim_characters) + 1;
|
||||
typename TStringView::size_type first = view.find_first_not_of(trim_characters);
|
||||
typename TStringView::size_type last = view.find_last_not_of(trim_characters) + 1;
|
||||
|
||||
typename TStringView::const_pointer pbegin = view.data();
|
||||
typename TStringView::const_pointer pend = view.data();
|
||||
@ -365,8 +365,8 @@ namespace etl
|
||||
template <typename TStringView>
|
||||
TStringView trim_view(const TStringView& view, typename TStringView::const_pointer delimiters)
|
||||
{
|
||||
size_t first = view.find_first_of(delimiters);
|
||||
size_t last = view.find_last_of(delimiters) + 1;
|
||||
typename TStringView::size_type first = view.find_first_of(delimiters);
|
||||
typename TStringView::size_type last = view.find_last_of(delimiters) + 1;
|
||||
|
||||
typename TStringView::const_pointer pbegin = view.data();
|
||||
typename TStringView::const_pointer pend = view.data();
|
||||
@ -388,7 +388,7 @@ namespace etl
|
||||
/// Get up to the first n characters.
|
||||
//***************************************************************************
|
||||
template <typename TIString>
|
||||
void left_n(TIString& s, size_t n)
|
||||
void left_n(TIString& s, typename TIString::size_type n)
|
||||
{
|
||||
n = (n > s.size()) ? s.size() : n;
|
||||
|
||||
@ -399,7 +399,7 @@ namespace etl
|
||||
/// Get a view of up to the first n characters.
|
||||
//***************************************************************************
|
||||
template <typename TStringView>
|
||||
TStringView left_n_view(const TStringView& view, size_t n)
|
||||
TStringView left_n_view(const TStringView& view, typename TStringView::size_type n)
|
||||
{
|
||||
n = (n > view.size()) ? view.size() : n;
|
||||
|
||||
@ -410,7 +410,7 @@ namespace etl
|
||||
/// Get up to the last n characters.
|
||||
//***************************************************************************
|
||||
template <typename TIString>
|
||||
void right_n(TIString& s, size_t n)
|
||||
void right_n(TIString& s, typename TIString::size_type n)
|
||||
{
|
||||
n = (n > s.size()) ? s.size() : n;
|
||||
|
||||
@ -421,7 +421,7 @@ namespace etl
|
||||
/// Get a view of up to the last n characters.
|
||||
//***************************************************************************
|
||||
template <typename TStringView>
|
||||
TStringView right_n_view(const TStringView& view, size_t n)
|
||||
TStringView right_n_view(const TStringView& view, typename TStringView::size_type n)
|
||||
{
|
||||
n = (n > view.size()) ? view.size() : n;
|
||||
|
||||
@ -466,15 +466,15 @@ namespace etl
|
||||
const typename TIString::value_type* p_old = pairsbegin->first;
|
||||
const typename TIString::value_type* p_new = pairsbegin->second;
|
||||
|
||||
size_t position = 0U;
|
||||
typename TIString::size_type position = 0U;
|
||||
|
||||
do
|
||||
{
|
||||
position = s.find(p_old, position);
|
||||
if (position != TIString::npos)
|
||||
{
|
||||
s.replace(position, etl::strlen(p_old), p_new, etl::strlen(p_new));
|
||||
position += etl::strlen(p_new);
|
||||
s.replace(position, typename TIString::size_type(etl::strlen(p_old)), p_new, typename TIString::size_type(etl::strlen(p_new)));
|
||||
position += typename TIString::size_type(etl::strlen(p_new));
|
||||
}
|
||||
} while (position != TIString::npos);
|
||||
|
||||
@ -703,7 +703,7 @@ namespace etl
|
||||
typedef typename TInput::const_pointer const_pointer;
|
||||
|
||||
bool token_found = false;
|
||||
size_t position = 0U;
|
||||
typename TStringView::size_type position = 0U;
|
||||
TStringView view = last_view.value_or(TStringView());
|
||||
const_pointer begin_ptr = input.data();
|
||||
|
||||
@ -744,14 +744,14 @@ namespace etl
|
||||
/// pad_left
|
||||
//***************************************************************************
|
||||
template <typename TIString>
|
||||
void pad_left(TIString& s, size_t required_size, typename TIString::value_type pad_char)
|
||||
void pad_left(TIString& s, typename TIString::size_type required_size, typename TIString::value_type pad_char)
|
||||
{
|
||||
required_size = etl::min(required_size, s.max_size());
|
||||
|
||||
if (required_size > s.size())
|
||||
{
|
||||
required_size -= s.size();
|
||||
s.insert(size_t(0U), required_size, pad_char);
|
||||
s.insert(typename TIString::size_type(0U), required_size, pad_char);
|
||||
}
|
||||
}
|
||||
|
||||
@ -759,7 +759,7 @@ namespace etl
|
||||
/// pad_right
|
||||
//***************************************************************************
|
||||
template <typename TIString>
|
||||
void pad_right(TIString& s, size_t required_size, typename TIString::value_type pad_char)
|
||||
void pad_right(TIString& s, typename TIString::size_type required_size, typename TIString::value_type pad_char)
|
||||
{
|
||||
required_size = etl::min(required_size, s.max_size());
|
||||
|
||||
@ -774,7 +774,7 @@ namespace etl
|
||||
/// pad
|
||||
//***************************************************************************
|
||||
template <typename TIString>
|
||||
void pad(TIString& s, size_t required_size, string_pad_direction pad_direction, typename TIString::value_type pad_char)
|
||||
void pad(TIString& s, typename TIString::size_type required_size, string_pad_direction pad_direction, typename TIString::value_type pad_char)
|
||||
{
|
||||
switch (int(pad_direction))
|
||||
{
|
||||
|
||||
@ -756,7 +756,7 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// Alignment templates.
|
||||
/// These require compiler specific intrinsics.
|
||||
#if ETL_CPP11_SUPPORTED && !defined(ETL_COMPILER_ARM5)
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
template <typename T> struct alignment_of : integral_constant<size_t, alignof(T)> { };
|
||||
#elif ETL_COMPILER_MICROSOFT
|
||||
template <typename T> struct alignment_of : integral_constant<size_t, size_t(__alignof(T))> {};
|
||||
@ -1068,12 +1068,11 @@ namespace etl
|
||||
//***************************************************************************
|
||||
/// is_pod
|
||||
///\ingroup type_traits
|
||||
template <typename T>
|
||||
struct is_pod : std::integral_constant<bool, std::is_standard_layout<T>::value && std::is_trivial<T>::value> {};
|
||||
template <typename T> struct is_pod : std::is_pod<T> {};
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T>
|
||||
inline constexpr bool is_pod_v = std::is_standard_layout_v<T> && std::is_trivial_v<T>;
|
||||
inline constexpr bool is_pod_v = std::is_pod_v<T>;
|
||||
#endif
|
||||
|
||||
#if !defined(ARDUINO) && ETL_NOT_USING_STLPORT
|
||||
@ -1563,6 +1562,28 @@ namespace etl
|
||||
template <typename T>
|
||||
inline constexpr size_t size_of_v = etl::size_of<T>::value;
|
||||
#endif
|
||||
|
||||
#if ETL_CPP11_SUPPORTED
|
||||
//***************************************************************************
|
||||
/// are_all_same
|
||||
template <typename T, typename T1, typename... TRest>
|
||||
struct are_all_same
|
||||
{
|
||||
static const bool value = etl::is_same<T, T1>::value &&
|
||||
etl::are_all_same<T, TRest...>::value;
|
||||
};
|
||||
|
||||
template <typename T, typename T1>
|
||||
struct are_all_same<T, T1>
|
||||
{
|
||||
static const bool value = etl::is_same<T, T1>::value;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if ETL_CPP17_SUPPORTED
|
||||
template <typename T, typename T1, typename... TRest>
|
||||
inline constexpr bool are_all_same_v = are_all_same<T, T1, TRest...>::value;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // ETL_TYPE_TRAITS_INCLUDED
|
||||
|
||||
@ -98,21 +98,23 @@ namespace etl
|
||||
///\param position The position of the first character.
|
||||
///\param length The number of characters. Default = npos.
|
||||
//*************************************************************************
|
||||
u16string(const etl::iu16string& other, size_t position, size_t length_ = npos)
|
||||
u16string(const etl::iu16string& other, size_type position, size_type length_ = npos)
|
||||
: iu16string(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
ETL_ASSERT(position < other.size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
this->assign(other.begin() + position, other.begin() + position + length_);
|
||||
|
||||
if (other.truncated())
|
||||
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
||||
if (other.is_truncated())
|
||||
{
|
||||
this->is_truncated = true;
|
||||
this->set_truncated(true);
|
||||
|
||||
#if defined(ETL_STRING_TRUNCATION_IS_ERROR)
|
||||
ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -130,7 +132,7 @@ namespace etl
|
||||
///\param text The initial text of the u16string.
|
||||
///\param count The number of characters to copy.
|
||||
//*************************************************************************
|
||||
u16string(const value_type* text, size_t count)
|
||||
u16string(const value_type* text, size_type count)
|
||||
: iu16string(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
this->assign(text, text + count);
|
||||
@ -141,7 +143,7 @@ namespace etl
|
||||
///\param initialSize The initial size of the u16string.
|
||||
///\param value The value to fill the u16string with.
|
||||
//*************************************************************************
|
||||
u16string(size_t count, value_type c)
|
||||
u16string(size_type count, value_type c)
|
||||
: iu16string(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
this->initialise();
|
||||
@ -187,7 +189,7 @@ namespace etl
|
||||
///\param position The position of the first character. Default = 0.
|
||||
///\param length The number of characters. Default = npos.
|
||||
//*************************************************************************
|
||||
etl::u16string<MAX_SIZE_> substr(size_t position = 0, size_t length_ = npos) const
|
||||
etl::u16string<MAX_SIZE_> substr(size_type position = 0, size_type length_ = npos) const
|
||||
{
|
||||
etl::u16string<MAX_SIZE_> new_string;
|
||||
|
||||
@ -260,7 +262,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Constructor.
|
||||
//*************************************************************************
|
||||
u16string(value_type* buffer, size_t buffer_size)
|
||||
u16string(value_type* buffer, size_type buffer_size)
|
||||
: iu16string(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->initialise();
|
||||
@ -270,7 +272,7 @@ namespace etl
|
||||
/// Copy constructor.
|
||||
///\param other The other u16string.
|
||||
//*************************************************************************
|
||||
u16string(const etl::u16string<0U>& other, value_type* buffer, size_t buffer_size)
|
||||
u16string(const etl::u16string<0U>& other, value_type* buffer, size_type buffer_size)
|
||||
: iu16string(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(other);
|
||||
@ -280,7 +282,7 @@ namespace etl
|
||||
/// From other iu16string.
|
||||
///\param other The other iu16string.
|
||||
//*************************************************************************
|
||||
u16string(const etl::iu16string& other, value_type* buffer, size_t buffer_size)
|
||||
u16string(const etl::iu16string& other, value_type* buffer, size_type buffer_size)
|
||||
: iu16string(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(other);
|
||||
@ -292,28 +294,30 @@ namespace etl
|
||||
///\param position The position of the first character.
|
||||
///\param length The number of characters. Default = npos.
|
||||
//*************************************************************************
|
||||
u16string(const etl::iu16string& other, value_type* buffer, size_t buffer_size, size_t position, size_t length_ = npos)
|
||||
u16string(const etl::iu16string& other, value_type* buffer, size_type buffer_size, size_type position, size_type length_ = npos)
|
||||
: iu16string(buffer, buffer_size - 1U)
|
||||
{
|
||||
ETL_ASSERT(position < other.size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
this->assign(other.begin() + position, other.begin() + position + length_);
|
||||
|
||||
if (other.truncated())
|
||||
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
||||
if (other.is_truncated())
|
||||
{
|
||||
this->is_truncated = true;
|
||||
this->set_truncated(true);
|
||||
|
||||
#if defined(ETL_STRING_TRUNCATION_IS_ERROR)
|
||||
ETL_ALWAYS_ASSERT(ETL_ERROR(u16string_truncation));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Constructor, from null terminated text.
|
||||
///\param text The initial text of the u16string.
|
||||
//*************************************************************************
|
||||
u16string(const value_type* text, value_type* buffer, size_t buffer_size)
|
||||
u16string(const value_type* text, value_type* buffer, size_type buffer_size)
|
||||
: iu16string(buffer, buffer_size - 1U)
|
||||
{
|
||||
// Is the initial text at the same address as the buffer?
|
||||
@ -332,7 +336,7 @@ namespace etl
|
||||
///\param text The initial text of the u16string.
|
||||
///\param count The number of characters to copy.
|
||||
//*************************************************************************
|
||||
u16string(const value_type* text, size_t count, value_type* buffer, size_t buffer_size)
|
||||
u16string(const value_type* text, size_type count, value_type* buffer, size_type buffer_size)
|
||||
: iu16string(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(text, text + count);
|
||||
@ -343,7 +347,7 @@ namespace etl
|
||||
///\param initialSize The initial size of the u16string.
|
||||
///\param value The value to fill the u16string with.
|
||||
//*************************************************************************
|
||||
u16string(size_t count, value_type c, value_type* buffer, size_t buffer_size)
|
||||
u16string(size_type count, value_type c, value_type* buffer, size_type buffer_size)
|
||||
: iu16string(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->initialise();
|
||||
@ -357,7 +361,7 @@ namespace etl
|
||||
///\param last The iterator to the last element + 1.
|
||||
//*************************************************************************
|
||||
template <typename TIterator>
|
||||
u16string(TIterator first, TIterator last, value_type* buffer, size_t buffer_size)
|
||||
u16string(TIterator first, TIterator last, value_type* buffer, size_type buffer_size)
|
||||
: iu16string(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(first, last);
|
||||
@ -367,7 +371,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Construct from initializer_list.
|
||||
//*************************************************************************
|
||||
u16string(std::initializer_list<value_type> init, value_type* buffer, size_t buffer_size)
|
||||
u16string(std::initializer_list<value_type> init, value_type* buffer, size_type buffer_size)
|
||||
: iu16string(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(init.begin(), init.end());
|
||||
@ -378,7 +382,7 @@ namespace etl
|
||||
/// From u16string_view.
|
||||
///\param view The u16string_view.
|
||||
//*************************************************************************
|
||||
explicit u16string(const etl::u16string_view& view, value_type* buffer, size_t buffer_size)
|
||||
explicit u16string(const etl::u16string_view& view, value_type* buffer, size_type buffer_size)
|
||||
: iu16string(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(view.begin(), view.end());
|
||||
@ -442,7 +446,7 @@ namespace etl
|
||||
size_t operator()(const etl::iu16string& text) const
|
||||
{
|
||||
return etl::private_hash::generic_hash<size_t>(reinterpret_cast<const uint8_t*>(&text[0]),
|
||||
reinterpret_cast<const uint8_t*>(&text[text.size()]));
|
||||
reinterpret_cast<const uint8_t*>(&text[text.size()]));
|
||||
}
|
||||
};
|
||||
|
||||
@ -452,7 +456,7 @@ namespace etl
|
||||
size_t operator()(const etl::u16string<SIZE>& text) const
|
||||
{
|
||||
return etl::private_hash::generic_hash<size_t>(reinterpret_cast<const uint8_t*>(&text[0]),
|
||||
reinterpret_cast<const uint8_t*>(&text[text.size()]));
|
||||
reinterpret_cast<const uint8_t*>(&text[text.size()]));
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -98,21 +98,23 @@ namespace etl
|
||||
///\param position The position of the first character.
|
||||
///\param length The number of characters. Default = npos.
|
||||
//*************************************************************************
|
||||
u32string(const etl::iu32string& other, size_t position, size_t length_ = npos)
|
||||
u32string(const etl::iu32string& other, size_type position, size_type length_ = npos)
|
||||
: iu32string(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
ETL_ASSERT(position < other.size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
this->assign(other.begin() + position, other.begin() + position + length_);
|
||||
|
||||
if (other.truncated())
|
||||
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
||||
if (other.is_truncated())
|
||||
{
|
||||
this->is_truncated = true;
|
||||
this->set_truncated(true);
|
||||
|
||||
#if defined(ETL_STRING_TRUNCATION_IS_ERROR)
|
||||
ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -130,7 +132,7 @@ namespace etl
|
||||
///\param text The initial text of the u32string.
|
||||
///\param count The number of characters to copy.
|
||||
//*************************************************************************
|
||||
u32string(const value_type* text, size_t count)
|
||||
u32string(const value_type* text, size_type count)
|
||||
: iu32string(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
this->assign(text, text + count);
|
||||
@ -141,7 +143,7 @@ namespace etl
|
||||
///\param initialSize The initial size of the u32string.
|
||||
///\param value The value to fill the u32string with.
|
||||
//*************************************************************************
|
||||
u32string(size_t count, value_type c)
|
||||
u32string(size_type count, value_type c)
|
||||
: iu32string(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
this->initialise();
|
||||
@ -187,7 +189,7 @@ namespace etl
|
||||
///\param position The position of the first character. Default = 0.
|
||||
///\param length The number of characters. Default = npos.
|
||||
//*************************************************************************
|
||||
etl::u32string<MAX_SIZE_> substr(size_t position = 0, size_t length_ = npos) const
|
||||
etl::u32string<MAX_SIZE_> substr(size_type position = 0, size_type length_ = npos) const
|
||||
{
|
||||
etl::u32string<MAX_SIZE_> new_string;
|
||||
|
||||
@ -260,7 +262,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Constructor.
|
||||
//*************************************************************************
|
||||
u32string(value_type* buffer, size_t buffer_size)
|
||||
u32string(value_type* buffer, size_type buffer_size)
|
||||
: iu32string(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->initialise();
|
||||
@ -270,7 +272,7 @@ namespace etl
|
||||
/// Copy constructor.
|
||||
///\param other The other u32string.
|
||||
//*************************************************************************
|
||||
u32string(const etl::u32string<0U>& other, value_type* buffer, size_t buffer_size)
|
||||
u32string(const etl::u32string<0U>& other, value_type* buffer, size_type buffer_size)
|
||||
: iu32string(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(other);
|
||||
@ -280,7 +282,7 @@ namespace etl
|
||||
/// From other iu32string.
|
||||
///\param other The other iu32string.
|
||||
//*************************************************************************
|
||||
u32string(const etl::iu32string& other, value_type* buffer, size_t buffer_size)
|
||||
u32string(const etl::iu32string& other, value_type* buffer, size_type buffer_size)
|
||||
: iu32string(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(other);
|
||||
@ -292,34 +294,36 @@ namespace etl
|
||||
///\param position The position of the first character.
|
||||
///\param length The number of characters. Default = npos.
|
||||
//*************************************************************************
|
||||
u32string(const etl::iu32string& other, value_type* buffer, size_t buffer_size, size_t position, size_t length_ = npos)
|
||||
u32string(const etl::iu32string& other, value_type* buffer, size_type buffer_size, size_type position, size_type length_ = npos)
|
||||
: iu32string(buffer, buffer_size - 1U)
|
||||
{
|
||||
ETL_ASSERT(position < other.size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
this->assign(other.begin() + position, other.begin() + position + length_);
|
||||
|
||||
if (other.truncated())
|
||||
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
||||
if (other.is_truncated())
|
||||
{
|
||||
this->is_truncated = true;
|
||||
this->set_truncated(true);
|
||||
|
||||
#if defined(ETL_STRING_TRUNCATION_IS_ERROR)
|
||||
ETL_ALWAYS_ASSERT(ETL_ERROR(u32string_truncation));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Constructor, from null terminated text.
|
||||
///\param text The initial text of the u32string.
|
||||
//*************************************************************************
|
||||
ETL_EXPLICIT_STRING_FROM_CHAR u32string(const value_type* text, value_type* buffer, size_t buffer_size)
|
||||
ETL_EXPLICIT_STRING_FROM_CHAR u32string(const value_type* text, value_type* buffer, size_type buffer_size)
|
||||
: iu32string(buffer, buffer_size - 1U)
|
||||
{
|
||||
// Is the initial text at the same address as the buffer?
|
||||
if (text == buffer)
|
||||
{
|
||||
this->current_size = etl::strlen(buffer);
|
||||
this->current_size = etl::strlen(buffer);;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -332,7 +336,7 @@ namespace etl
|
||||
///\param text The initial text of the u32string.
|
||||
///\param count The number of characters to copy.
|
||||
//*************************************************************************
|
||||
u32string(const value_type* text, size_t count, value_type* buffer, size_t buffer_size)
|
||||
u32string(const value_type* text, size_type count, value_type* buffer, size_type buffer_size)
|
||||
: iu32string(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(text, text + count);
|
||||
@ -343,7 +347,7 @@ namespace etl
|
||||
///\param initialSize The initial size of the u32string.
|
||||
///\param value The value to fill the u32string with.
|
||||
//*************************************************************************
|
||||
u32string(size_t count, value_type c, value_type* buffer, size_t buffer_size)
|
||||
u32string(size_type count, value_type c, value_type* buffer, size_type buffer_size)
|
||||
: iu32string(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->initialise();
|
||||
@ -357,7 +361,7 @@ namespace etl
|
||||
///\param last The iterator to the last element + 1.
|
||||
//*************************************************************************
|
||||
template <typename TIterator>
|
||||
u32string(TIterator first, TIterator last, value_type* buffer, size_t buffer_size)
|
||||
u32string(TIterator first, TIterator last, value_type* buffer, size_type buffer_size)
|
||||
: iu32string(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(first, last);
|
||||
@ -367,7 +371,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Construct from initializer_list.
|
||||
//*************************************************************************
|
||||
u32string(std::initializer_list<value_type> init, value_type* buffer, size_t buffer_size)
|
||||
u32string(std::initializer_list<value_type> init, value_type* buffer, size_type buffer_size)
|
||||
: iu32string(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(init.begin(), init.end());
|
||||
@ -378,7 +382,7 @@ namespace etl
|
||||
/// From u32string_view.
|
||||
///\param view The u32string_view.
|
||||
//*************************************************************************
|
||||
explicit u32string(const etl::u32string_view& view, value_type* buffer, size_t buffer_size)
|
||||
explicit u32string(const etl::u32string_view& view, value_type* buffer, size_type buffer_size)
|
||||
: iu32string(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(view.begin(), view.end());
|
||||
@ -442,7 +446,7 @@ namespace etl
|
||||
size_t operator()(const etl::iu32string& text) const
|
||||
{
|
||||
return etl::private_hash::generic_hash<size_t>(reinterpret_cast<const uint8_t*>(&text[0]),
|
||||
reinterpret_cast<const uint8_t*>(&text[text.size()]));
|
||||
reinterpret_cast<const uint8_t*>(&text[text.size()]));
|
||||
}
|
||||
};
|
||||
|
||||
@ -452,7 +456,7 @@ namespace etl
|
||||
size_t operator()(const etl::u32string<SIZE>& text) const
|
||||
{
|
||||
return etl::private_hash::generic_hash<size_t>(reinterpret_cast<const uint8_t*>(&text[0]),
|
||||
reinterpret_cast<const uint8_t*>(&text[text.size()]));
|
||||
reinterpret_cast<const uint8_t*>(&text[text.size()]));
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -92,28 +92,29 @@ namespace etl
|
||||
this->assign(other);
|
||||
}
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
/// From other string, position, length.
|
||||
///\param other The other string.
|
||||
///\param position The position of the first character.
|
||||
///\param length The number of characters. Default = npos.
|
||||
//*************************************************************************
|
||||
wstring(const etl::iwstring& other, size_t position, size_t length_ = npos)
|
||||
wstring(const etl::iwstring& other, size_type position, size_type length_ = npos)
|
||||
: iwstring(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
ETL_ASSERT(position < other.size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
this->assign(other.begin() + position, other.begin() + position + length_);
|
||||
|
||||
if (other.truncated())
|
||||
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
||||
if (other.is_truncated())
|
||||
{
|
||||
this->is_truncated = true;
|
||||
this->set_truncated(true);
|
||||
|
||||
#if defined(ETL_STRING_TRUNCATION_IS_ERROR)
|
||||
ETL_ALWAYS_ASSERT(ETL_ERROR(string_truncation));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
@ -131,7 +132,7 @@ namespace etl
|
||||
///\param text The initial text of the wstring.
|
||||
///\param count The number of characters to copy.
|
||||
//*************************************************************************
|
||||
wstring(const value_type* text, size_t count)
|
||||
wstring(const value_type* text, size_type count)
|
||||
: iwstring(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
this->assign(text, text + count);
|
||||
@ -142,7 +143,7 @@ namespace etl
|
||||
///\param initialSize The initial size of the wstring.
|
||||
///\param value The value to fill the wstring with.
|
||||
//*************************************************************************
|
||||
wstring(size_t count, value_type c)
|
||||
wstring(size_type count, value_type c)
|
||||
: iwstring(reinterpret_cast<value_type*>(&buffer), MAX_SIZE)
|
||||
{
|
||||
this->initialise();
|
||||
@ -188,7 +189,7 @@ namespace etl
|
||||
///\param position The position of the first character. Default = 0.
|
||||
///\param length The number of characters. Default = npos.
|
||||
//*************************************************************************
|
||||
etl::wstring<MAX_SIZE_> substr(size_t position = 0, size_t length_ = npos) const
|
||||
etl::wstring<MAX_SIZE_> substr(size_type position = 0, size_type length_ = npos) const
|
||||
{
|
||||
etl::wstring<MAX_SIZE_> new_string;
|
||||
|
||||
@ -261,7 +262,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Constructor.
|
||||
//*************************************************************************
|
||||
wstring(value_type* buffer, size_t buffer_size)
|
||||
wstring(value_type* buffer, size_type buffer_size)
|
||||
: iwstring(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->initialise();
|
||||
@ -271,7 +272,7 @@ namespace etl
|
||||
/// Copy constructor.
|
||||
///\param other The other wstring.
|
||||
//*************************************************************************
|
||||
wstring(const etl::wstring<0U>& other, value_type* buffer, size_t buffer_size)
|
||||
wstring(const etl::wstring<0U>& other, value_type* buffer, size_type buffer_size)
|
||||
: iwstring(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(other);
|
||||
@ -281,7 +282,7 @@ namespace etl
|
||||
/// From other iwstring.
|
||||
///\param other The other iwstring.
|
||||
//*************************************************************************
|
||||
wstring(const etl::iwstring& other, value_type* buffer, size_t buffer_size)
|
||||
wstring(const etl::iwstring& other, value_type* buffer, size_type buffer_size)
|
||||
: iwstring(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(other);
|
||||
@ -293,28 +294,30 @@ namespace etl
|
||||
///\param position The position of the first character.
|
||||
///\param length The number of characters. Default = npos.
|
||||
//*************************************************************************
|
||||
wstring(const etl::iwstring& other, value_type* buffer, size_t buffer_size, size_t position, size_t length_ = npos)
|
||||
wstring(const etl::iwstring& other, value_type* buffer, size_type buffer_size, size_type position, size_type length_ = npos)
|
||||
: iwstring(buffer, buffer_size - 1U)
|
||||
{
|
||||
ETL_ASSERT(position < other.size(), ETL_ERROR(string_out_of_bounds));
|
||||
|
||||
this->assign(other.begin() + position, other.begin() + position + length_);
|
||||
|
||||
if (other.truncated())
|
||||
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
||||
if (other.is_truncated())
|
||||
{
|
||||
this->is_truncated = true;
|
||||
this->set_truncated(true);
|
||||
|
||||
#if defined(ETL_STRING_TRUNCATION_IS_ERROR)
|
||||
ETL_ALWAYS_ASSERT(ETL_ERROR(wstring_truncation));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Constructor, from null terminated text.
|
||||
///\param text The initial text of the wstring.
|
||||
//*************************************************************************
|
||||
wstring(const value_type* text, value_type* buffer, size_t buffer_size)
|
||||
wstring(const value_type* text, value_type* buffer, size_type buffer_size)
|
||||
: iwstring(buffer, buffer_size - 1U)
|
||||
{
|
||||
// Is the initial text at the same address as the buffer?
|
||||
@ -333,7 +336,7 @@ namespace etl
|
||||
///\param text The initial text of the wstring.
|
||||
///\param count The number of characters to copy.
|
||||
//*************************************************************************
|
||||
wstring(const value_type* text, size_t count, value_type* buffer, size_t buffer_size)
|
||||
wstring(const value_type* text, size_type count, value_type* buffer, size_type buffer_size)
|
||||
: iwstring(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(text, text + count);
|
||||
@ -344,7 +347,7 @@ namespace etl
|
||||
///\param initialSize The initial size of the wstring.
|
||||
///\param value The value to fill the wstring with.
|
||||
//*************************************************************************
|
||||
wstring(size_t count, value_type c, value_type* buffer, size_t buffer_size)
|
||||
wstring(size_type count, value_type c, value_type* buffer, size_type buffer_size)
|
||||
: iwstring(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->initialise();
|
||||
@ -358,7 +361,7 @@ namespace etl
|
||||
///\param last The iterator to the last element + 1.
|
||||
//*************************************************************************
|
||||
template <typename TIterator>
|
||||
wstring(TIterator first, TIterator last, value_type* buffer, size_t buffer_size)
|
||||
wstring(TIterator first, TIterator last, value_type* buffer, size_type buffer_size)
|
||||
: iwstring(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(first, last);
|
||||
@ -368,7 +371,7 @@ namespace etl
|
||||
//*************************************************************************
|
||||
/// Construct from initializer_list.
|
||||
//*************************************************************************
|
||||
wstring(std::initializer_list<value_type> init, value_type* buffer, size_t buffer_size)
|
||||
wstring(std::initializer_list<value_type> init, value_type* buffer, size_type buffer_size)
|
||||
: iwstring(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(init.begin(), init.end());
|
||||
@ -379,7 +382,7 @@ namespace etl
|
||||
/// From wstring_view.
|
||||
///\param view The wstring_view.
|
||||
//*************************************************************************
|
||||
explicit wstring(const etl::wstring_view& view, value_type* buffer, size_t buffer_size)
|
||||
explicit wstring(const etl::wstring_view& view, value_type* buffer, size_type buffer_size)
|
||||
: iwstring(buffer, buffer_size - 1U)
|
||||
{
|
||||
this->assign(view.begin(), view.end());
|
||||
@ -443,7 +446,7 @@ namespace etl
|
||||
size_t operator()(const etl::iwstring& text) const
|
||||
{
|
||||
return etl::private_hash::generic_hash<size_t>(reinterpret_cast<const uint8_t*>(&text[0]),
|
||||
reinterpret_cast<const uint8_t*>(&text[text.size()]));
|
||||
reinterpret_cast<const uint8_t*>(&text[text.size()]));
|
||||
}
|
||||
};
|
||||
|
||||
@ -453,7 +456,7 @@ namespace etl
|
||||
size_t operator()(const etl::wstring<SIZE>& text) const
|
||||
{
|
||||
return etl::private_hash::generic_hash<size_t>(reinterpret_cast<const uint8_t*>(&text[0]),
|
||||
reinterpret_cast<const uint8_t*>(&text[text.size()]));
|
||||
reinterpret_cast<const uint8_t*>(&text[text.size()]));
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -127,6 +127,29 @@
|
||||
<Add after="${TARGET_OUTPUT_DIR}${TARGET_OUTPUT_BASENAME}" />
|
||||
</ExtraCommands>
|
||||
</Target>
|
||||
<Target title="Windows Small Strings">
|
||||
<Option output="bin/Debug/ETL" prefix_auto="1" extension_auto="1" />
|
||||
<Option object_output="obj/Debug/" />
|
||||
<Option type="1" />
|
||||
<Option compiler="gcc" />
|
||||
<Compiler>
|
||||
<Add option="-std=c++14" />
|
||||
<Add option="-std=c++17" />
|
||||
<Add option="-std=c++11" />
|
||||
<Add option="-m32" />
|
||||
<Add option="-g" />
|
||||
<Add option="-D_DEBUG" />
|
||||
<Add option="-DETL_DISABLE_STRING_TRUNCATION_CHECKS" />
|
||||
<Add option="-DETL_DISABLE_STRING_CLEAR_AFTER_USE" />
|
||||
<Add directory="../../src" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-m32" />
|
||||
</Linker>
|
||||
<ExtraCommands>
|
||||
<Add after="${TARGET_OUTPUT_DIR}${TARGET_OUTPUT_BASENAME}" />
|
||||
</ExtraCommands>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wshadow" />
|
||||
@ -211,6 +234,7 @@
|
||||
<Option target="Windows 64" />
|
||||
<Option target="Windows No STL" />
|
||||
<Option target="Windows No STL - Force No Advanced" />
|
||||
<Option target="Windows Small Strings" />
|
||||
</Unit>
|
||||
<Unit filename="../../../unittest-cpp/UnitTest++/Win32/TimeHelpers.h">
|
||||
<Option target="<{~None~}>" />
|
||||
|
||||
527
test/test_flags.cpp
Normal file
527
test/test_flags.cpp
Normal file
@ -0,0 +1,527 @@
|
||||
/******************************************************************************
|
||||
The MIT License(MIT)
|
||||
|
||||
Embedded Template Library.
|
||||
https://github.com/ETLCPP/etl
|
||||
https://www.etlcpp.com
|
||||
|
||||
Copyright(c) 2020 jwellbelove
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files(the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions :
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
#include "UnitTest++/UnitTest++.h"
|
||||
|
||||
#include "etl/flags.h"
|
||||
#include "etl/binary.h"
|
||||
#include "etl/string.h"
|
||||
#include "etl/wstring.h"
|
||||
#include "etl/u16string.h"
|
||||
#include "etl/u32string.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
enum
|
||||
{
|
||||
F0 = etl::bit<0>::value,
|
||||
F1 = etl::bit<1>::value,
|
||||
F2 = etl::bit<2>::value,
|
||||
F3 = etl::bit<3>::value,
|
||||
F4 = etl::bit<4>::value,
|
||||
F5 = etl::bit<5>::value,
|
||||
F6 = etl::bit<6>::value,
|
||||
F7 = etl::bit<7>::value,
|
||||
|
||||
F023467 = F0 | F2 | F3 | F4 | F6 | F7,
|
||||
F0246 = F0 | F2 | F4 | F6,
|
||||
F1246 = F1 | F2 | F4 | F6,
|
||||
F246 = F2 | F4 | F6,
|
||||
F235 = F2 | F3 | F5,
|
||||
F46 = F4 | F6,
|
||||
F13 = F1 | F3,
|
||||
F02 = F0 | F2,
|
||||
F04 = F0 | F4,
|
||||
F03 = F0 | F3,
|
||||
F1357 = F1 | F3 | F5 | F7,
|
||||
F0347 = F0 | F3 | F4 | F7,
|
||||
F1346 = F1 | F3 | F4 | F6,
|
||||
F01234567 = F0 | F1 | F2 | F3 | F4 | F5 | F6 | F7,
|
||||
FNONE = 0
|
||||
};
|
||||
|
||||
using Flags = etl::flags<uint8_t>;
|
||||
using FlagsM0246 = etl::flags<uint8_t, F0246>;
|
||||
|
||||
SUITE(test_flags)
|
||||
{
|
||||
//*************************************************************************
|
||||
TEST(test_constructor)
|
||||
{
|
||||
Flags flags;
|
||||
|
||||
CHECK_EQUAL(0U, flags);
|
||||
CHECK_EQUAL(0U, flags.value());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_value)
|
||||
{
|
||||
Flags flags;
|
||||
|
||||
CHECK_EQUAL(int(FNONE), int(flags));
|
||||
CHECK_EQUAL(int(FNONE), int(flags.value()));
|
||||
|
||||
flags.value(int(F1346));
|
||||
CHECK_EQUAL(int(F1346), int(flags));
|
||||
CHECK_EQUAL(int(F1346), int(flags.value()));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_value_masked)
|
||||
{
|
||||
FlagsM0246 flags1(F0246);
|
||||
FlagsM0246 flags2(F1357);
|
||||
FlagsM0246 flags3(F01234567);
|
||||
|
||||
CHECK_EQUAL(int(F0246), int(flags1));
|
||||
CHECK_EQUAL(int(FNONE), int(flags2));
|
||||
CHECK_EQUAL(int(F0246), int(flags3));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_set)
|
||||
{
|
||||
Flags flags1;
|
||||
Flags flags2;
|
||||
Flags flags3;
|
||||
|
||||
CHECK_EQUAL(int(Flags::value_type(F1357)), int((flags1.set(F7, true).set(F6, false).set(F5, true).set(F4, false).set(F3, true).set(F2, false).set(F1, true).set(F0, false).value())));
|
||||
CHECK_EQUAL(int(Flags::value_type(F1357)), int((flags2.set<F7>(true).set<F6>(false).set<F5>(true).set<F4>(false).set<F3>(true).set<F2>(false).set<F1>(true).set<F0>(false).value())));
|
||||
CHECK_EQUAL(int(Flags::value_type(F1357)), int((flags3.set<F7, true>().set<F6, false>().set<F5, true>().set<F4, false>().set<F3, true>().set<F2, false>().set<F1, true>().set<F0, false>().value())));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_set_multiple)
|
||||
{
|
||||
Flags flags1;
|
||||
Flags flags2;
|
||||
Flags flags3;
|
||||
|
||||
CHECK_EQUAL(int(F1357), int((flags1.set(F1357, true).value())));
|
||||
CHECK_EQUAL(int(F1357), int((flags2.set<F1357>(true).value())));
|
||||
CHECK_EQUAL(int(F1357), int((flags3.set<F1357, true>().value())));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_set_multiple_masked)
|
||||
{
|
||||
FlagsM0246 flags1;
|
||||
FlagsM0246 flags2;
|
||||
FlagsM0246 flags3;
|
||||
|
||||
CHECK_EQUAL(int(F0246), int(flags1.set(F0246)));
|
||||
CHECK_EQUAL(int(FNONE), int(flags2.set(F1357)));
|
||||
CHECK_EQUAL(int(F0246), int(flags3.set(F01234567)));
|
||||
|
||||
CHECK_EQUAL(int(F0246), int(flags1.set<F0246>()));
|
||||
CHECK_EQUAL(int(FNONE), int(flags2.set<F1357>()));
|
||||
CHECK_EQUAL(int(F0246), int(flags3.set<F01234567>()));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_set_reset)
|
||||
{
|
||||
Flags flags1(F01234567);
|
||||
Flags flags2(F01234567);
|
||||
|
||||
CHECK_EQUAL(int(Flags::value_type(F1357)), int((flags1.set(F7).reset(F6).set(F5).reset(F4).set(F3).reset(F2).set(F1).reset(F0).value())));
|
||||
CHECK_EQUAL(int(Flags::value_type(F1357)), int((flags2.set<F7>().reset<F6>().set<F5>().reset<F4>().set<F3>().reset<F2>().set<F1>().reset<F0>().value())));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_clear)
|
||||
{
|
||||
Flags flags1(F01234567);
|
||||
|
||||
CHECK_EQUAL(int(Flags::value_type(0)), flags1.clear());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_reset)
|
||||
{
|
||||
Flags flags1(F0246);
|
||||
Flags flags2(F0246);
|
||||
|
||||
CHECK_EQUAL(int(Flags::value_type(F246)), flags1.reset(F0));
|
||||
CHECK_EQUAL(int(Flags::value_type(F246)), flags2.reset<F0>());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_all)
|
||||
{
|
||||
Flags flags1(FNONE);
|
||||
Flags flags2(F1346);
|
||||
Flags flags3(F01234567);
|
||||
|
||||
CHECK(flags1.all() == false);
|
||||
CHECK(flags2.all() == false);
|
||||
CHECK(flags3.all() == true);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_all_masked)
|
||||
{
|
||||
FlagsM0246 flags1(FNONE);
|
||||
FlagsM0246 flags2(F1346);
|
||||
FlagsM0246 flags3(F0246);
|
||||
FlagsM0246 flags4(F01234567);
|
||||
|
||||
CHECK(flags1.all() == false);
|
||||
CHECK(flags2.all() == false);
|
||||
CHECK(flags3.all() == true);
|
||||
CHECK(flags4.all() == true);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_all_of)
|
||||
{
|
||||
Flags flags1(F0246);
|
||||
|
||||
CHECK(flags1.all_of(F0246) == true);
|
||||
CHECK((flags1.all_of<F0246>()) == true);
|
||||
|
||||
CHECK(flags1.all_of(F246) == true);
|
||||
CHECK((flags1.all_of<F246>()) == true);
|
||||
|
||||
CHECK(flags1.all_of(F1246) == false);
|
||||
CHECK((flags1.all_of<F1246>()) == false);
|
||||
|
||||
CHECK(flags1.all_of(F01234567) == false);
|
||||
CHECK((flags1.all_of<F01234567>()) == false);
|
||||
|
||||
Flags flags2(F1357);
|
||||
|
||||
CHECK(flags2.all_of(F0246) == false);
|
||||
CHECK((flags2.all_of<F0246>()) == false);
|
||||
|
||||
CHECK(flags2.all_of(F246) == false);
|
||||
CHECK((flags2.all_of<F246>()) == false);
|
||||
|
||||
CHECK(flags2.all_of(F1246) == false);
|
||||
CHECK((flags2.all_of<F1246>()) == false);
|
||||
|
||||
CHECK(flags2.all_of(F01234567) == false);
|
||||
CHECK((flags2.all_of<F01234567>()) == false);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_all_of_masked)
|
||||
{
|
||||
FlagsM0246 flags1(F0246);
|
||||
|
||||
CHECK(flags1.all_of(F0246) == true);
|
||||
CHECK((flags1.all_of<F0246>()) == true);
|
||||
|
||||
CHECK(flags1.all_of(F246) == true);
|
||||
CHECK((flags1.all_of<F246>()) == true);
|
||||
|
||||
CHECK(flags1.all_of(F1246) == true);
|
||||
CHECK((flags1.all_of<F1246>()) == true);
|
||||
|
||||
CHECK(flags1.all_of(F01234567) == true);
|
||||
CHECK((flags1.all_of<F01234567>()) == true);
|
||||
|
||||
FlagsM0246 flags2(F1357);
|
||||
|
||||
CHECK(flags2.all_of(F0246) == false);
|
||||
CHECK((flags2.all_of<F0246>()) == false);
|
||||
|
||||
CHECK(flags2.all_of(F246) == false);
|
||||
CHECK((flags2.all_of<F246>()) == false);
|
||||
|
||||
CHECK(flags2.all_of(F1246) == false);
|
||||
CHECK((flags2.all_of<F1246>()) == false);
|
||||
|
||||
CHECK(flags2.all_of(F01234567) == false);
|
||||
CHECK((flags2.all_of<F01234567>()) == false);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_any)
|
||||
{
|
||||
Flags flags1(FNONE);
|
||||
Flags flags2(F3);
|
||||
|
||||
CHECK(flags1.any() == false);
|
||||
CHECK(flags2.any() == true);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_any_masked)
|
||||
{
|
||||
FlagsM0246 flags1(FNONE);
|
||||
FlagsM0246 flags2(F46);
|
||||
FlagsM0246 flags3(F03);
|
||||
FlagsM0246 flags4(F13);
|
||||
|
||||
CHECK(flags1.any() == false);
|
||||
CHECK(flags2.any() == true);
|
||||
CHECK(flags3.any() == true);
|
||||
CHECK(flags4.any() == false);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_any_of)
|
||||
{
|
||||
Flags flags(F0246);
|
||||
|
||||
CHECK(flags.any_of(F0246) == true);
|
||||
CHECK((flags.any_of<F0246>()) == true);
|
||||
|
||||
CHECK(flags.any_of(F246) == true);
|
||||
CHECK((flags.any_of<F246>()) == true);
|
||||
|
||||
CHECK(flags.any_of(F1357) == false);
|
||||
CHECK((flags.any_of<F1357>()) == false);
|
||||
|
||||
CHECK(flags.any_of(F01234567) == true);
|
||||
CHECK((flags.any_of<F01234567>()) == true);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_any_of_masked)
|
||||
{
|
||||
FlagsM0246 flags(F0246);
|
||||
|
||||
CHECK(flags.any_of(F0246) == true);
|
||||
CHECK((flags.any_of<F0246>()) == true);
|
||||
|
||||
CHECK(flags.any_of(F235) == true);
|
||||
CHECK((flags.any_of<F235>()) == true);
|
||||
|
||||
CHECK(flags.any_of(F1357) == false);
|
||||
CHECK((flags.any_of<F1357>()) == false);
|
||||
|
||||
CHECK(flags.any_of(F01234567) == true);
|
||||
CHECK((flags.any_of<F01234567>()) == true);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_none)
|
||||
{
|
||||
Flags flags1(FNONE);
|
||||
Flags flags2(F3);
|
||||
|
||||
CHECK(flags1.none() == true);
|
||||
CHECK(flags2.none() == false);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_none_masked)
|
||||
{
|
||||
FlagsM0246 flags1(F0246);
|
||||
FlagsM0246 flags2(F1357);
|
||||
|
||||
CHECK(flags1.none() == false);
|
||||
CHECK(flags2.none() == true);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_none_of)
|
||||
{
|
||||
Flags flags1(FNONE);
|
||||
Flags flags2(F0246);
|
||||
|
||||
CHECK(flags1.none_of(FNONE) == true);
|
||||
CHECK(flags1.none_of(F01234567) == true);
|
||||
CHECK(flags1.none_of<F01234567>() == true);
|
||||
|
||||
CHECK(flags2.none_of(F01234567) == false);
|
||||
CHECK(flags2.none_of<F01234567>() == false);
|
||||
CHECK(flags2.none_of(F0246) == false);
|
||||
CHECK(flags2.none_of<F0246>() == false);
|
||||
CHECK(flags2.none_of(F1357) == true);
|
||||
CHECK(flags2.none_of<F1357>() == true);
|
||||
CHECK(flags2.none_of(F01234567) == false);
|
||||
CHECK(flags2.none_of<F01234567>() == false);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_none_of_masked)
|
||||
{
|
||||
FlagsM0246 flags1(FNONE);
|
||||
FlagsM0246 flags2(F01234567);
|
||||
|
||||
CHECK(flags1.none_of(FNONE) == true);
|
||||
CHECK(flags1.none_of(F01234567) == true);
|
||||
CHECK(flags1.none_of<F01234567>() == true);
|
||||
|
||||
CHECK(flags2.none_of(F01234567) == false);
|
||||
CHECK(flags2.none_of<F01234567>() == false);
|
||||
CHECK(flags2.none_of(F0246) == false);
|
||||
CHECK(flags2.none_of<F0246>() == false);
|
||||
CHECK(flags2.none_of(F1357) == true);
|
||||
CHECK(flags2.none_of<F1357>() == true);
|
||||
CHECK(flags2.none_of(F01234567) == false);
|
||||
CHECK(flags2.none_of<F01234567>() == false);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_flip)
|
||||
{
|
||||
Flags flags1(F0246);
|
||||
Flags flags2(F0246);
|
||||
Flags flags3(F0246);
|
||||
Flags flags4(F0246);
|
||||
|
||||
CHECK_EQUAL(F46, flags1.flip(F02).value());
|
||||
CHECK_EQUAL(F46, (flags2.flip<F02>().value()));
|
||||
|
||||
CHECK_EQUAL(F1357, flags3.flip(F01234567).value());
|
||||
CHECK_EQUAL(F1357, (flags4.flip<F01234567>().value()));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_flip_masked)
|
||||
{
|
||||
FlagsM0246 flags1(F0246);
|
||||
FlagsM0246 flags2(F0246);
|
||||
FlagsM0246 flags3(F0246);
|
||||
FlagsM0246 flags4(F0246);
|
||||
|
||||
CHECK_EQUAL(int(F46), flags1.flip(F02).value());
|
||||
CHECK_EQUAL(int(F46), (flags2.flip<F02>().value()));
|
||||
|
||||
CHECK_EQUAL(int(FNONE), flags3.flip(F01234567).value());
|
||||
CHECK_EQUAL(int(FNONE), (flags4.flip<F01234567>().value()));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_assignment)
|
||||
{
|
||||
Flags flags1(F0246);
|
||||
Flags flags2(F1357);
|
||||
Flags flags3(F1357);
|
||||
|
||||
flags2 = flags1;
|
||||
flags3 = flags1.value();
|
||||
|
||||
CHECK_EQUAL(flags1, flags2);
|
||||
CHECK_EQUAL(flags1, flags3);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_assignment_masked)
|
||||
{
|
||||
FlagsM0246 flags1(F46);
|
||||
FlagsM0246 flags2(F0246);
|
||||
FlagsM0246 flags3(F0246);
|
||||
|
||||
flags2 = flags1;
|
||||
flags3 = F1346;
|
||||
|
||||
CHECK_EQUAL(flags1, flags2);
|
||||
CHECK_EQUAL(flags1, flags3);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_and_operation)
|
||||
{
|
||||
Flags flags1(F0246);
|
||||
Flags flags2(F0246);
|
||||
Flags flags3(F0246);
|
||||
Flags flags4(F0246);
|
||||
|
||||
CHECK_EQUAL(int(F0246), int(flags1 &= F0246));
|
||||
CHECK_EQUAL(int(FNONE), int(flags2 &= F1357));
|
||||
CHECK_EQUAL(int(F0246), int(flags3 &= F01234567));
|
||||
CHECK_EQUAL(int(FNONE), int(flags4 &= FNONE));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_and_operation_masked)
|
||||
{
|
||||
FlagsM0246 flags1(F0246);
|
||||
FlagsM0246 flags2(F0246);
|
||||
FlagsM0246 flags3(F0246);
|
||||
FlagsM0246 flags4(F0246);
|
||||
|
||||
CHECK_EQUAL(int(F0246), int(flags1 &= F0246));
|
||||
CHECK_EQUAL(int(FNONE), int(flags2 &= F1357));
|
||||
CHECK_EQUAL(int(F0246), int(flags3 &= F01234567));
|
||||
CHECK_EQUAL(int(FNONE), int(flags4 &= FNONE));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_or_operation)
|
||||
{
|
||||
Flags flags1(F0246);
|
||||
Flags flags2(F0246);
|
||||
Flags flags3(F0246);
|
||||
Flags flags4(F0246);
|
||||
|
||||
CHECK_EQUAL(int(F0246), int(flags1 |= F0246));
|
||||
CHECK_EQUAL(int(F01234567), int(flags2 |= F1357));
|
||||
CHECK_EQUAL(int(F01234567), int(flags3 |= F01234567));
|
||||
CHECK_EQUAL(int(F0246), int(flags4 |= FNONE));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_or_operation_masked)
|
||||
{
|
||||
FlagsM0246 flags1(F0246);
|
||||
FlagsM0246 flags2(F0246);
|
||||
FlagsM0246 flags3(F0246);
|
||||
FlagsM0246 flags4(F0246);
|
||||
|
||||
CHECK_EQUAL(int(F0246), int(flags1 |= F0246));
|
||||
CHECK_EQUAL(int(F0246), int(flags2 |= F1357));
|
||||
CHECK_EQUAL(int(F0246), int(flags3 |= F01234567));
|
||||
CHECK_EQUAL(int(F0246), int(flags4 |= FNONE));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_xor_operation)
|
||||
{
|
||||
Flags flags1(F0246);
|
||||
Flags flags2(F0246);
|
||||
Flags flags3(F0246);
|
||||
Flags flags4(F0246);
|
||||
|
||||
CHECK_EQUAL(int(FNONE), int(flags1 ^= F0246));
|
||||
CHECK_EQUAL(int(F01234567), int(flags2 ^= F1357));
|
||||
CHECK_EQUAL(int(F1357), int(flags3 ^= F01234567));
|
||||
CHECK_EQUAL(int(F0246), int(flags4 ^= FNONE));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_xor_operation_masked)
|
||||
{
|
||||
FlagsM0246 flags1(F0246);
|
||||
FlagsM0246 flags2(F0246);
|
||||
FlagsM0246 flags3(F0246);
|
||||
FlagsM0246 flags4(F0246);
|
||||
|
||||
CHECK_EQUAL(int(FNONE), int(flags1 ^= F0246));
|
||||
CHECK_EQUAL(int(F0246), int(flags2 ^= F1357));
|
||||
CHECK_EQUAL(int(FNONE), int(flags3 ^= F01234567));
|
||||
CHECK_EQUAL(int(F0246), int(flags4 ^= FNONE));
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -87,19 +87,27 @@ namespace
|
||||
|
||||
CHECK_EQUAL(CAPACITY, ctext.max_size());
|
||||
CHECK_EQUAL(length, ctext.size());
|
||||
CHECK(!ctext.truncated());
|
||||
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
||||
CHECK(!ctext.is_truncated());
|
||||
#endif
|
||||
|
||||
CHECK_EQUAL(CAPACITY, wtext.max_size());
|
||||
CHECK_EQUAL(length, wtext.size());
|
||||
CHECK(!wtext.truncated());
|
||||
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
||||
CHECK(!wtext.is_truncated());
|
||||
#endif
|
||||
|
||||
CHECK_EQUAL(CAPACITY, u16text.max_size());
|
||||
CHECK_EQUAL(length, u16text.size());
|
||||
CHECK(!u16text.truncated());
|
||||
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
||||
CHECK(!u16text.is_truncated());
|
||||
#endif
|
||||
|
||||
CHECK_EQUAL(CAPACITY, u32text.max_size());
|
||||
CHECK_EQUAL(length, u32text.size());
|
||||
CHECK(!u32text.truncated());
|
||||
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
||||
CHECK(!u32text.is_truncated());
|
||||
#endif
|
||||
|
||||
CHECK(Equal(std::string("Hello World"), ctext));
|
||||
CHECK(Equal(std::wstring(L"Hello World"), ctext));
|
||||
@ -126,19 +134,27 @@ namespace
|
||||
|
||||
CHECK_EQUAL(CAPACITY, ctext.max_size());
|
||||
CHECK_EQUAL(length - 1, ctext.size());
|
||||
CHECK(ctext.truncated());
|
||||
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
||||
CHECK(ctext.is_truncated());
|
||||
#endif
|
||||
|
||||
CHECK_EQUAL(CAPACITY, wtext.max_size());
|
||||
CHECK_EQUAL(length - 1, wtext.size());
|
||||
CHECK(wtext.truncated());
|
||||
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
||||
CHECK(wtext.is_truncated());
|
||||
#endif
|
||||
|
||||
CHECK_EQUAL(CAPACITY, u16text.max_size());
|
||||
CHECK_EQUAL(length - 1, u16text.size());
|
||||
CHECK(u16text.truncated());
|
||||
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
||||
CHECK(u16text.is_truncated());
|
||||
#endif
|
||||
|
||||
CHECK_EQUAL(CAPACITY, u32text.max_size());
|
||||
CHECK_EQUAL(length - 1, u32text.size());
|
||||
CHECK(u32text.truncated());
|
||||
#if ETL_STRING_TRUNCATION_CHECKS_ENABLED
|
||||
CHECK(u32text.is_truncated());
|
||||
#endif
|
||||
|
||||
CHECK(Equal(std::string("Hello Worl"), ctext));
|
||||
CHECK(Equal(std::wstring(L"Hello Worl"), ctext));
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -47,6 +47,7 @@ namespace
|
||||
using StringView = etl::string_view;
|
||||
using Char = etl::istring::value_type;
|
||||
using Vector = etl::vector<String, 15>;
|
||||
using SizeType = etl::istring::size_type;
|
||||
|
||||
constexpr auto Whitespace = etl::whitespace_v<String::value_type>;
|
||||
|
||||
@ -1102,7 +1103,7 @@ namespace
|
||||
{
|
||||
String text(STR("Hello World"));
|
||||
String expected(text);
|
||||
expected.insert(size_t(0U), text.capacity() - expected.size(), STR('x'));
|
||||
expected.insert(SizeType(0U), text.capacity() - expected.size(), STR('x'));
|
||||
|
||||
etl::pad_left(text, text.capacity() + 1U, STR('x'));
|
||||
|
||||
@ -1170,7 +1171,7 @@ namespace
|
||||
{
|
||||
String text(STR("Hello World"));
|
||||
String expected(text);
|
||||
expected.insert(size_t(0U), text.capacity() - expected.size(), STR('x'));
|
||||
expected.insert(SizeType(0U), text.capacity() - expected.size(), STR('x'));
|
||||
|
||||
etl::pad(text, text.capacity() + 1U, etl::string_pad_direction::LEFT, STR('x'));
|
||||
|
||||
|
||||
@ -1102,7 +1102,7 @@ namespace
|
||||
{
|
||||
String text(STR("Hello World"));
|
||||
String expected(text);
|
||||
expected.insert(size_t(0U), text.capacity() - expected.size(), STR('x'));
|
||||
expected.insert(String::size_type(0U), text.capacity() - expected.size(), STR('x'));
|
||||
|
||||
etl::pad_left(text, text.capacity() + 1U, STR('x'));
|
||||
|
||||
@ -1170,7 +1170,7 @@ namespace
|
||||
{
|
||||
String text(STR("Hello World"));
|
||||
String expected(text);
|
||||
expected.insert(size_t(0U), text.capacity() - expected.size(), STR('x'));
|
||||
expected.insert(String::size_type(0U), text.capacity() - expected.size(), STR('x'));
|
||||
|
||||
etl::pad(text, text.capacity() + 1U, etl::string_pad_direction::LEFT, STR('x'));
|
||||
|
||||
|
||||
@ -1102,7 +1102,7 @@ namespace
|
||||
{
|
||||
String text(STR("Hello World"));
|
||||
String expected(text);
|
||||
expected.insert(size_t(0U), text.capacity() - expected.size(), STR('x'));
|
||||
expected.insert(String::size_type(0U), text.capacity() - expected.size(), STR('x'));
|
||||
|
||||
etl::pad_left(text, text.capacity() + 1U, STR('x'));
|
||||
|
||||
@ -1170,7 +1170,7 @@ namespace
|
||||
{
|
||||
String text(STR("Hello World"));
|
||||
String expected(text);
|
||||
expected.insert(size_t(0U), text.capacity() - expected.size(), STR('x'));
|
||||
expected.insert(String::size_type(0U), text.capacity() - expected.size(), STR('x'));
|
||||
|
||||
etl::pad(text, text.capacity() + 1U, etl::string_pad_direction::LEFT, STR('x'));
|
||||
|
||||
|
||||
@ -1102,7 +1102,7 @@ namespace
|
||||
{
|
||||
String text(STR("Hello World"));
|
||||
String expected(text);
|
||||
expected.insert(size_t(0U), text.capacity() - expected.size(), STR('x'));
|
||||
expected.insert(String::size_type(0U), text.capacity() - expected.size(), STR('x'));
|
||||
|
||||
etl::pad_left(text, text.capacity() + 1U, STR('x'));
|
||||
|
||||
@ -1170,7 +1170,7 @@ namespace
|
||||
{
|
||||
String text(STR("Hello World"));
|
||||
String expected(text);
|
||||
expected.insert(size_t(0U), text.capacity() - expected.size(), STR('x'));
|
||||
expected.insert(String::size_type(0U), text.capacity() - expected.size(), STR('x'));
|
||||
|
||||
etl::pad(text, text.capacity() + 1U, etl::string_pad_direction::LEFT, STR('x'));
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -832,4 +832,11 @@ namespace
|
||||
CHECK_EQUAL(false, etl::negation_v<etl::bool_constant<true>>);
|
||||
CHECK((std::is_same_v<bool, etl::bool_constant<true>::value_type>));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_are_all_same)
|
||||
{
|
||||
CHECK((etl::are_all_same<int, int, int, int, int>::value == true));
|
||||
CHECK((etl::are_all_same<int, int, int, char, int>::value == false));
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,6 +17,8 @@ Global
|
||||
Debug MSVC - No STL|x64 = Debug MSVC - No STL|x64
|
||||
Debug MSVC - No Unit Tests|Win32 = Debug MSVC - No Unit Tests|Win32
|
||||
Debug MSVC - No Unit Tests|x64 = Debug MSVC - No Unit Tests|x64
|
||||
Debug MSVC - Small Strings|Win32 = Debug MSVC - Small Strings|Win32
|
||||
Debug MSVC - Small Strings|x64 = Debug MSVC - Small Strings|x64
|
||||
Debug MSVC - String Truncation Is Error|Win32 = Debug MSVC - String Truncation Is Error|Win32
|
||||
Debug MSVC - String Truncation Is Error|x64 = Debug MSVC - String Truncation Is Error|x64
|
||||
Debug MSVC 64|Win32 = Debug MSVC 64|Win32
|
||||
@ -55,6 +57,10 @@ Global
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No Unit Tests|Win32.Build.0 = Debug No Unit Tests|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No Unit Tests|x64.ActiveCfg = Debug No Unit Tests|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - No Unit Tests|x64.Build.0 = Debug No Unit Tests|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - Small Strings|Win32.ActiveCfg = DebugMSVCSmallStrings|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - Small Strings|Win32.Build.0 = DebugMSVCSmallStrings|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - Small Strings|x64.ActiveCfg = DebugMSVCSmallStrings|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - Small Strings|x64.Build.0 = DebugMSVCSmall Strings|x64
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - String Truncation Is Error|Win32.ActiveCfg = DebugStringTruncationIsError|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - String Truncation Is Error|Win32.Build.0 = DebugStringTruncationIsError|Win32
|
||||
{C21DF78C-D8E0-46AB-9D6F-D38A3C1CB0FB}.Debug MSVC - String Truncation Is Error|x64.ActiveCfg = DebugStringTruncationIsError|x64
|
||||
|
||||
@ -17,6 +17,14 @@
|
||||
<Configuration>Debug LLVM</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="DebugMSVCSmallStrings|Win32">
|
||||
<Configuration>DebugMSVCSmallStrings</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="DebugMSVCSmallStrings|x64">
|
||||
<Configuration>DebugMSVCSmallStrings</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug MSVC No Checks|Win32">
|
||||
<Configuration>Debug MSVC No Checks</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
@ -128,6 +136,12 @@
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
@ -194,6 +208,12 @@
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
@ -298,6 +318,9 @@
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
@ -331,6 +354,9 @@
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
@ -385,6 +411,11 @@
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
<IntDir>\$(IntDir)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
<IntDir>\$(IntDir)</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
@ -439,6 +470,10 @@
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<PostBuildEventUseInBuild>true</PostBuildEventUseInBuild>
|
||||
@ -525,6 +560,27 @@
|
||||
<Command>$(OutDir)\etl.exe</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;ETL_DISABLE_STRING_TRUNCATION_CHECKS;ETL_DISABLE_STRING_CLEAR_AFTER_USE;ETL_STRING_SIZE_SMALL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../../../unittest-cpp/;../../include;../../test</AdditionalIncludeDirectories>
|
||||
<UndefinePreprocessorDefinitions>
|
||||
</UndefinePreprocessorDefinitions>
|
||||
<MultiProcessorCompilation>false</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>$(OutDir)\etl.exe</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
@ -789,6 +845,27 @@
|
||||
<Command>$(OutDir)\etl.exe</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../../unittest-cpp/UnitTest++/;../../include/etl;../../test</AdditionalIncludeDirectories>
|
||||
<UndefinePreprocessorDefinitions>
|
||||
</UndefinePreprocessorDefinitions>
|
||||
<MultiProcessorCompilation>false</MultiProcessorCompilation>
|
||||
<LanguageStandard>stdcpp14</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>$(OutDir)\etl.exe</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
@ -1189,6 +1266,7 @@
|
||||
<ClInclude Include="..\..\include\etl\cumulative_moving_average.h" />
|
||||
<ClInclude Include="..\..\include\etl\delegate.h" />
|
||||
<ClInclude Include="..\..\include\etl\delegate_service.h" />
|
||||
<ClInclude Include="..\..\include\etl\flags.h" />
|
||||
<ClInclude Include="..\..\include\etl\format_spec.h" />
|
||||
<ClInclude Include="..\..\include\etl\frame_check_sequence.h" />
|
||||
<ClInclude Include="..\..\include\etl\fsm.h" />
|
||||
@ -1429,6 +1507,7 @@
|
||||
<ClCompile Include="..\test_cumulative_moving_average.cpp" />
|
||||
<ClCompile Include="..\test_delegate.cpp" />
|
||||
<ClCompile Include="..\test_delegate_service.cpp" />
|
||||
<ClCompile Include="..\test_flags.cpp" />
|
||||
<ClCompile Include="..\test_forward_list_shared_pool.cpp" />
|
||||
<ClCompile Include="..\test_bit_stream.cpp" />
|
||||
<ClCompile Include="..\test_indirect_vector.cpp" />
|
||||
@ -1463,6 +1542,7 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
|
||||
@ -1475,6 +1555,7 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
|
||||
@ -1506,6 +1587,7 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\test_flat_set.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
|
||||
@ -1518,6 +1600,7 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
|
||||
@ -1544,6 +1627,7 @@
|
||||
<ClCompile Include="..\test_integral_limits.cpp" />
|
||||
<ClCompile Include="..\test_intrusive_forward_list.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
|
||||
@ -1556,6 +1640,7 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
|
||||
@ -1572,6 +1657,7 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\test_intrusive_links.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
|
||||
@ -1584,6 +1670,7 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
|
||||
@ -1600,6 +1687,7 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\test_intrusive_list.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
|
||||
@ -1612,6 +1700,7 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
|
||||
@ -1628,6 +1717,7 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\test_intrusive_queue.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
|
||||
@ -1640,6 +1730,7 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
|
||||
@ -1656,6 +1747,7 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\test_intrusive_stack.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
|
||||
@ -1668,6 +1760,7 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
|
||||
@ -1689,6 +1782,7 @@
|
||||
<ClCompile Include="..\test_list.cpp" />
|
||||
<ClCompile Include="..\test_flat_map.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
|
||||
@ -1701,6 +1795,7 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
|
||||
@ -1721,6 +1816,7 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
|
||||
@ -1733,6 +1829,7 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
|
||||
@ -1758,6 +1855,7 @@
|
||||
<ClCompile Include="..\test_numeric.cpp" />
|
||||
<ClCompile Include="..\test_observer.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|Win32'">false</ExcludedFromBuild>
|
||||
@ -1770,6 +1868,7 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugLLVMNoSTL|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Clang|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugMSVCSmallStrings|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='MSVCDebugAppveyor|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='LLVM New|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug MSVC No Checks|x64'">false</ExcludedFromBuild>
|
||||
|
||||
@ -888,6 +888,9 @@
|
||||
<ClInclude Include="..\..\include\etl\circular_buffer.h">
|
||||
<Filter>ETL\Containers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\etl\flags.h">
|
||||
<Filter>ETL\Utilities</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\main.cpp">
|
||||
@ -1409,6 +1412,9 @@
|
||||
<ClCompile Include="..\test_circular_buffer_external_buffer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\test_flags.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\library.properties">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user