cm::optional: Add constructor delegation to nullopt_t constructor

Some static analysis tools incorrectly identify this constructor
as leaving _has_value in an undefined state. Explicitly call the
default constructor to force _has_value to false.
This commit is contained in:
Kyle Edwards
2020-10-22 11:39:48 -04:00
parent 0668120398
commit 67383725bd

View File

@@ -140,6 +140,7 @@ optional<T> make_optional(Args&&... args)
template <typename T>
optional<T>::optional(nullopt_t) noexcept
: optional()
{
}