diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-22 15:39:48 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-10-22 15:40:48 (GMT) |
commit | 67383725bd40a92db85738f8d0c120e2c9bb2100 (patch) | |
tree | c447d3be1a27b8c76be41b0bd7bc669daf39c5d4 /Utilities | |
parent | 066812039873991416f04ebb3c051ac8cb669d14 (diff) | |
download | CMake-67383725bd40a92db85738f8d0c120e2c9bb2100.zip CMake-67383725bd40a92db85738f8d0c120e2c9bb2100.tar.gz CMake-67383725bd40a92db85738f8d0c120e2c9bb2100.tar.bz2 |
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')
-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 4eb7f27..0defae1 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() { } |