mirror of
https://github.com/boostorg/optional.git
synced 2026-07-21 13:43:39 +00:00
MSVC 14.1 fix -- 2nd attempt
This commit is contained in:
@@ -124,11 +124,13 @@ struct constexpr_guarded_storage
|
||||
//~constexpr_guarded_storage() = default;
|
||||
|
||||
#if (defined(_MSC_VER) && 1910 <= _MSC_VER && _MSC_VER <= 1916)
|
||||
private:
|
||||
// Workaround for MSVC 14.1x bug where it eagerly tries to define the copy/move operations
|
||||
constexpr_guarded_storage(const constexpr_guarded_storage&) = delete;
|
||||
constexpr_guarded_storage(constexpr_guarded_storage&&) = delete;
|
||||
constexpr_guarded_storage& operator=(const constexpr_guarded_storage&) = delete;
|
||||
constexpr_guarded_storage& operator=(constexpr_guarded_storage&&) = delete;
|
||||
// these are declared but never defined
|
||||
constexpr_guarded_storage(const constexpr_guarded_storage&);
|
||||
constexpr_guarded_storage(constexpr_guarded_storage&&);
|
||||
constexpr_guarded_storage& operator=(const constexpr_guarded_storage&);
|
||||
constexpr_guarded_storage& operator=(constexpr_guarded_storage&&);
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -166,10 +168,12 @@ struct fallback_guarded_storage
|
||||
|
||||
#if (defined(_MSC_VER) && 1910 <= _MSC_VER && _MSC_VER <= 1916)
|
||||
// Workaround for MSVC 14.1x bug where it eagerly tries to define the copy/move operations
|
||||
fallback_guarded_storage(const fallback_guarded_storage&) = delete;
|
||||
fallback_guarded_storage(fallback_guarded_storage&&) = delete;
|
||||
fallback_guarded_storage& operator=(const fallback_guarded_storage&) = delete;
|
||||
fallback_guarded_storage& operator=(fallback_guarded_storage&&) = delete;
|
||||
// These are declared but never defined
|
||||
private:
|
||||
fallback_guarded_storage(const fallback_guarded_storage&);
|
||||
fallback_guarded_storage(fallback_guarded_storage&&);
|
||||
fallback_guarded_storage& operator=(const fallback_guarded_storage&);
|
||||
fallback_guarded_storage& operator=(fallback_guarded_storage&&);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user