@@ -511,6 +511,7 @@ void Value<_Alloc, _String>::swapPayload(Value<_Alloc, _String>& other) {
511
511
int temp2 = allocated_;
512
512
allocated_ = other.allocated_ ;
513
513
other.allocated_ = temp2 & 0x1 ;
514
+ std::swap (stringValue_, other.stringValue_ );
514
515
}
515
516
516
517
template <class _Alloc , class _String >
@@ -1525,6 +1526,16 @@ Value<_Alloc, _String>::StringValueHolder::StringValueHolder() {
1525
1526
/* Not used */
1526
1527
}
1527
1528
1529
+ template <class _Alloc , class _String >
1530
+ Value<_Alloc, _String>::StringValueHolder::StringValueHolder(const StringValueHolder& other) {
1531
+ copy (other);
1532
+ }
1533
+
1534
+ template <class _Alloc , class _String >
1535
+ Value<_Alloc, _String>::StringValueHolder::StringValueHolder(StringValueHolder&& other) {
1536
+ swap (std::move (other));
1537
+ }
1538
+
1528
1539
template <class _Alloc , class _String >
1529
1540
Value<_Alloc, _String>::StringValueHolder::StringValueHolder(StringDataPtr&& value) {
1530
1541
SetString (std::move (value));
@@ -1579,6 +1590,33 @@ bool Value<_Alloc, _String>::StringValueHolder::IsRaw() const {
1579
1590
return raw_;
1580
1591
}
1581
1592
1593
+ template <class _Alloc , class _String >
1594
+ typename Value<_Alloc, _String>::StringValueHolder& Value<_Alloc, _String>::StringValueHolder::operator =(const StringValueHolder& other) {
1595
+ copy (other);
1596
+ return *this ;
1597
+ }
1598
+
1599
+ template <class _Alloc , class _String >
1600
+ typename Value<_Alloc, _String>::StringValueHolder& Value<_Alloc, _String>::StringValueHolder::operator =(StringValueHolder&& other) {
1601
+ swap (std::move (other));
1602
+ return *this ;
1603
+ }
1604
+
1605
+ template <class _Alloc , class _String >
1606
+ void Value<_Alloc, _String>::StringValueHolder::copy(const StringValueHolder& other) {
1607
+ valueStringRaw_ = other.valueStringRaw_ ;
1608
+ if (other.valueStringCopy_ )
1609
+ valueStringCopy_ = StringDataPtr (new StringData (*other.valueStringCopy_ ));
1610
+ raw_ = other.raw_ ;
1611
+ }
1612
+
1613
+ template <class _Alloc , class _String >
1614
+ void Value<_Alloc, _String>::StringValueHolder::swap(StringValueHolder&& other) {
1615
+ std::swap (valueStringRaw_, other.valueStringRaw_ );
1616
+ std::swap (valueStringCopy_, other.valueStringCopy_ );
1617
+ std::swap (raw_, other.raw_ );
1618
+ }
1619
+
1582
1620
// class PathArgument
1583
1621
// //////////////////////////////////////////////////////////////////
1584
1622
0 commit comments