diff options
author | B Stack <bgstack15@gmail.com> | 2019-10-17 15:59:39 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2019-10-17 15:59:39 -0400 |
commit | 5b604dd360ffc162f163962ccb2b1af109a5f93f (patch) | |
tree | 65292208a81994782e1c16dd84dfcdcc221d0cd7 /zen/string_base.h | |
parent | Merge branch '10.16' into 'master' (diff) | |
download | FreeFileSync-5b604dd360ffc162f163962ccb2b1af109a5f93f.tar.gz FreeFileSync-5b604dd360ffc162f163962ccb2b1af109a5f93f.tar.bz2 FreeFileSync-5b604dd360ffc162f163962ccb2b1af109a5f93f.zip |
add upstream 10.17
Diffstat (limited to 'zen/string_base.h')
-rw-r--r-- | zen/string_base.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/zen/string_base.h b/zen/string_base.h index 2247f93a..a417b7f6 100644 --- a/zen/string_base.h +++ b/zen/string_base.h @@ -189,8 +189,8 @@ private: length (static_cast<uint32_t>(len)), capacity(static_cast<uint32_t>(cap)) { - static_assert(ATOMIC_INT_LOCK_FREE == 2); //2: "The atomic type is always lock-free" - //static_assert(decltype(refCount)::is_always_lock_free); //C++17 variant (not yet supported on GCC 6.3) + //static_assert(ATOMIC_INT_LOCK_FREE == 2); //2: "The atomic type is always lock-free" + static_assert(decltype(refCount)::is_always_lock_free); //C++17 variant (not yet supported on GCC 6.3) } std::atomic<unsigned int> refCount { 1 }; //std:atomic is uninitialized by default! @@ -313,6 +313,11 @@ template <class Char, template <class> class SP> inline Zbase<Char, SP> operator template <class Char, template <class> class SP> inline Zbase<Char, SP> operator+( Char lhs, const Zbase<Char, SP>& rhs) { return Zbase<Char, SP>(&lhs, 1) += rhs; } template <class Char, template <class> class SP> inline Zbase<Char, SP> operator+(const Char* lhs, const Zbase<Char, SP>& rhs) { return Zbase<Char, SP>(lhs ) += rhs; } +#if __cpp_impl_three_way_comparison +#error implement: +std::strong_ordering operator<=>(const Zbase<Char, SP>& lhs, const Zbase<Char, SP>& rhs) +bool operator==(const Zbase<Char, SP>& lhs, const Zbase<Char, SP>& rhs); +#endif @@ -329,7 +334,7 @@ template <class Char, template <class> class SP> inline Zbase<Char, SP> operator template <class Char, template <class> class SP> inline Zbase<Char, SP>::Zbase() { - //resist the temptation to avoid this allocation by referening a static global: NO performance advantage, MT issues! + //resist the temptation to avoid this allocation by referencing a static global: NO performance advantage, MT issues! rawStr_ = this->create(0); rawStr_[0] = 0; } |