瀏覽代碼

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.
Kyle Edwards 5 年之前
父節點
當前提交
67383725bd
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Utilities/std/cm/optional

+ 1 - 0
Utilities/std/cm/optional

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