summaryrefslogtreecommitdiff
path: root/value.h
diff options
context:
space:
mode:
Diffstat (limited to 'value.h')
-rw-r--r--value.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/value.h b/value.h
index e5418995..721d6d63 100644
--- a/value.h
+++ b/value.h
@@ -164,13 +164,9 @@ private:
explicit storage_t(const storage_t& rhs)
: type(rhs.type), refc(0) {
TRACE_CTOR(value_t::storage_t, "");
- std::memcpy(data, rhs.data, sizeof(data));
- }
- storage_t& operator=(const storage_t& rhs) {
- type = rhs.type;
- std::memcpy(data, rhs.data, sizeof(data));
- return *this;
+ *this = rhs;
}
+ storage_t& operator=(const storage_t& rhs);
/**
* Reference counting methods. The intrusive_ptr_* methods are