summaryrefslogtreecommitdiffstats
path: root/framework/src
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2018-03-09 11:35:25 +0100
committerMinijackson <minijackson@riseup.net>2018-03-09 11:35:25 +0100
commitfdbc0a0a5f3a7c0a1baffc2188fe901ccf397338 (patch)
treedb0ebb30db599a6889ea6066ec33bf5f862c8444 /framework/src
parent002a6da1a1d5268153a9cda13edacc09fc135238 (diff)
downloadkube-fdbc0a0a5f3a7c0a1baffc2188fe901ccf397338.tar.gz
kube-fdbc0a0a5f3a7c0a1baffc2188fe901ccf397338.zip
Elaborate just a bit morepkey-ie
Diffstat (limited to 'framework/src')
-rw-r--r--framework/src/errors.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/framework/src/errors.h b/framework/src/errors.h
index d95272da..4249cf8d 100644
--- a/framework/src/errors.h
+++ b/framework/src/errors.h
@@ -122,7 +122,11 @@ protected:
122 // 122 //
123 // If overloaded, this will call `mValue.operator=(other.mValue);`, but 123 // If overloaded, this will call `mValue.operator=(other.mValue);`, but
124 // since we're in the constructor, mValue is not initialized. This can 124 // since we're in the constructor, mValue is not initialized. This can
125 // cause big issues if the Type is not trivially (move) assignable. 125 // cause big issues if `Type` / `Error` is not trivially (move)
126 // assignable.
127 //
128 // And so, the placement new allows us to call the constructor of
129 // `Type` or `Error` instead of its assignment operator.
126 if (mIsValue) { 130 if (mIsValue) {
127 new (std::addressof(mValue)) Type(other.mValue); 131 new (std::addressof(mValue)) Type(other.mValue);
128 } else { 132 } else {