diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-22 11:39:48 -0400 |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-22 11:40:48 -0400 |
commit | 67383725bd40a92db85738f8d0c120e2c9bb2100 (patch) | |
tree | c447d3be1a27b8c76be41b0bd7bc669daf39c5d4 /Utilities/std | |
parent | 066812039873991416f04ebb3c051ac8cb669d14 (diff) | |
download | cmake-67383725bd40a92db85738f8d0c120e2c9bb2100.tar.gz |
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.
Diffstat (limited to 'Utilities/std')
-rw-r--r-- | Utilities/std/cm/optional | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Utilities/std/cm/optional b/Utilities/std/cm/optional index 4eb7f27d84..0defae1608 100644 --- a/Utilities/std/cm/optional +++ b/Utilities/std/cm/optional @@ -140,6 +140,7 @@ optional<T> make_optional(Args&&... args) template <typename T> optional<T>::optional(nullopt_t) noexcept + : optional() { } |