aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-10-10 05:12:24 -0700
committerChris Robinson <[email protected]>2021-10-10 05:12:24 -0700
commit6a3c4c09f838b0e9156b3f4c223281a3ed43817b (patch)
tree47f412df287fd6bbbfa496bc42a9f79658876d54
parent92b65fa15fa8d7ca064ef6178fc749b6a465ad5b (diff)
Explicitly declare optional_storage's default constructor
This should help MSVC
-rw-r--r--common/aloptional.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/aloptional.h b/common/aloptional.h
index fec54d3b..55d2597f 100644
--- a/common/aloptional.h
+++ b/common/aloptional.h
@@ -111,6 +111,7 @@ template<typename T, bool trivial_copy = std::is_trivially_copy_constructible<T>
bool = trivial_move && std::is_trivially_move_assignable<T>::value>
struct optional_storage : public optstore_helper<T> {
using optstore_helper<T>::optstore_helper;
+ optional_storage() noexcept = default;
optional_storage(const optional_storage&) = default;
optional_storage(optional_storage&&) = default;
optional_storage& operator=(const optional_storage&) = default;
@@ -121,6 +122,7 @@ struct optional_storage : public optstore_helper<T> {
template<typename T>
struct optional_storage<T, true, true, true, false> : public optstore_helper<T> {
using optstore_helper<T>::optstore_helper;
+ optional_storage() noexcept = default;
optional_storage(const optional_storage&) = default;
optional_storage(optional_storage&&) = default;
optional_storage& operator=(const optional_storage&) = default;
@@ -132,6 +134,7 @@ struct optional_storage<T, true, true, true, false> : public optstore_helper<T>
template<typename T>
struct optional_storage<T, true, false, true, false> : public optstore_helper<T> {
using optstore_helper<T>::optstore_helper;
+ optional_storage() noexcept = default;
optional_storage(const optional_storage&) = default;
optional_storage(optional_storage&& rhs) NOEXCEPT_AS(this->construct(std::move(rhs.mValue)))
{ if(rhs.mHasValue) this->construct(std::move(rhs.mValue)); }
@@ -144,6 +147,7 @@ struct optional_storage<T, true, false, true, false> : public optstore_helper<T>
template<typename T>
struct optional_storage<T, true, true, false, true> : public optstore_helper<T> {
using optstore_helper<T>::optstore_helper;
+ optional_storage() noexcept = default;
optional_storage(const optional_storage&) = default;
optional_storage(optional_storage&&) = default;
optional_storage& operator=(const optional_storage &rhs) NOEXCEPT_AS(this->assign(rhs))
@@ -155,6 +159,7 @@ struct optional_storage<T, true, true, false, true> : public optstore_helper<T>
template<typename T>
struct optional_storage<T, false, true, false, true> : public optstore_helper<T> {
using optstore_helper<T>::optstore_helper;
+ optional_storage() noexcept = default;
optional_storage(const optional_storage &rhs) NOEXCEPT_AS(this->construct(rhs.mValue))
{ if(rhs.mHasValue) this->construct(rhs.mValue); }
optional_storage(optional_storage&&) = default;
@@ -167,6 +172,7 @@ struct optional_storage<T, false, true, false, true> : public optstore_helper<T>
template<typename T>
struct optional_storage<T, true, true, false, false> : public optstore_helper<T> {
using optstore_helper<T>::optstore_helper;
+ optional_storage() noexcept = default;
optional_storage(const optional_storage&) = default;
optional_storage(optional_storage&&) = default;
optional_storage& operator=(const optional_storage &rhs) NOEXCEPT_AS(this->assign(rhs))
@@ -179,6 +185,7 @@ struct optional_storage<T, true, true, false, false> : public optstore_helper<T>
template<typename T>
struct optional_storage<T, true, false, false, false> : public optstore_helper<T> {
using optstore_helper<T>::optstore_helper;
+ optional_storage() noexcept = default;
optional_storage(const optional_storage&) = default;
optional_storage(optional_storage&& rhs) NOEXCEPT_AS(this->construct(std::move(rhs.mValue)))
{ if(rhs.mHasValue) this->construct(std::move(rhs.mValue)); }
@@ -192,6 +199,7 @@ struct optional_storage<T, true, false, false, false> : public optstore_helper<T
template<typename T>
struct optional_storage<T, false, true, false, false> : public optstore_helper<T> {
using optstore_helper<T>::optstore_helper;
+ optional_storage() noexcept = default;
optional_storage(const optional_storage &rhs) NOEXCEPT_AS(this->construct(rhs.mValue))
{ if(rhs.mHasValue) this->construct(rhs.mValue); }
optional_storage(optional_storage&&) = default;
@@ -205,6 +213,7 @@ struct optional_storage<T, false, true, false, false> : public optstore_helper<T
template<typename T>
struct optional_storage<T, false, false, false, false> : public optstore_helper<T> {
using optstore_helper<T>::optstore_helper;
+ optional_storage() noexcept = default;
optional_storage(const optional_storage &rhs) NOEXCEPT_AS(this->construct(rhs.mValue))
{ if(rhs.mHasValue) this->construct(rhs.mValue); }
optional_storage(optional_storage&& rhs) NOEXCEPT_AS(this->construct(std::move(rhs.mValue)))