summaryrefslogtreecommitdiff
path: root/include/o3tl
diff options
context:
space:
mode:
Diffstat (limited to 'include/o3tl')
-rw-r--r--include/o3tl/cow_wrapper.hxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/o3tl/cow_wrapper.hxx b/include/o3tl/cow_wrapper.hxx
index 2fa7f03f276f..b9c463b852e4 100644
--- a/include/o3tl/cow_wrapper.hxx
+++ b/include/o3tl/cow_wrapper.hxx
@@ -194,6 +194,12 @@ int cow_wrapper_client::queryUnmodified() const
{
}
+ explicit impl_t( T&& v ) :
+ m_value(std::move(v)),
+ m_ref_count(1)
+ {
+ }
+
T m_value;
typename MTPolicy::ref_count_t m_ref_count;
};
@@ -227,6 +233,13 @@ int cow_wrapper_client::queryUnmodified() const
{
}
+ /** Move-construct wrapped type instance from given object
+ */
+ explicit cow_wrapper( value_type&& r ) :
+ m_pimpl( new impl_t(std::move(r)) )
+ {
+ }
+
/** Shallow-copy given cow_wrapper
*/
explicit cow_wrapper( const cow_wrapper& rSrc ) : // nothrow