summaryrefslogtreecommitdiff
path: root/zen/string_base.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2019-10-28 23:21:40 +0000
committerDaniel Wilhelm <shieldwed@outlook.com>2019-10-28 23:21:40 +0000
commit8d6d4e48a61fd974c3fb2a85254f9bedd796a2b7 (patch)
tree65292208a81994782e1c16dd84dfcdcc221d0cd7 /zen/string_base.h
parentMerge branch '10.16' into 'master' (diff)
parentadd upstream 10.17 (diff)
downloadFreeFileSync-8d6d4e48a61fd974c3fb2a85254f9bedd796a2b7.tar.gz
FreeFileSync-8d6d4e48a61fd974c3fb2a85254f9bedd796a2b7.tar.bz2
FreeFileSync-8d6d4e48a61fd974c3fb2a85254f9bedd796a2b7.zip
Merge branch '10.17' into 'master'10.17
10.17 See merge request opensource-tracking/FreeFileSync!14
Diffstat (limited to 'zen/string_base.h')
-rw-r--r--zen/string_base.h11
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;
}
bgstack15