|
@@ -84,6 +84,11 @@ public:
|
|
|
as_string_impl().ref();
|
|
|
}
|
|
|
|
|
|
+ StringOrSymbol(StringOrSymbol&& other)
|
|
|
+ {
|
|
|
+ m_ptr = exchange(other.m_ptr, nullptr);
|
|
|
+ }
|
|
|
+
|
|
|
ALWAYS_INLINE bool is_valid() const { return m_ptr != nullptr; }
|
|
|
ALWAYS_INLINE bool is_symbol() const { return is_valid() && (bits() & 1ul); }
|
|
|
ALWAYS_INLINE bool is_string() const { return is_valid() && !(bits() & 1ul); }
|
|
@@ -143,6 +148,13 @@ public:
|
|
|
return *this;
|
|
|
}
|
|
|
|
|
|
+ StringOrSymbol& operator=(StringOrSymbol&& other)
|
|
|
+ {
|
|
|
+ if (this != &other)
|
|
|
+ m_ptr = exchange(other.m_ptr, nullptr);
|
|
|
+ return *this;
|
|
|
+ }
|
|
|
+
|
|
|
unsigned hash() const
|
|
|
{
|
|
|
if (is_string())
|