mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
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:
@@ -140,6 +140,7 @@ optional<T> make_optional(Args&&... args)
|
||||
|
||||
template <typename T>
|
||||
optional<T>::optional(nullopt_t) noexcept
|
||||
: optional()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user