]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3991] Commented CWE 476 nullPointer
authorFrancis Dupont <fdupont@isc.org>
Tue, 12 May 2026 09:01:12 +0000 (11:01 +0200)
committerFrancis Dupont <fdupont@isc.org>
Wed, 27 May 2026 20:03:01 +0000 (22:03 +0200)
src/lib/util/optional.h

index 16d5dc022adde3dc6c6cdf78d4a3dbaf2db4ba3f..40c6df221d0bcffc0910a92434294ecd8cb19221 100644 (file)
@@ -91,6 +91,10 @@ public:
     /// with an appropriate constructor, the caller must create a
     /// template specialization similar to the one provided for
     /// @c std::string below.
+    ///
+    /// @todo: when C++17 will be required can be solved using "if contexpr"
+    /// for type convertible from int or default constructible.
+    /// This will fix complains from code checkers e.g. cppcheck CWE 476.
     Optional()
         : default_(T(0)), unspecified_(true) {
     }