summaryrefslogtreecommitdiffstats
path: root/Source/Checks/cm_cxx17_check.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Checks/cm_cxx17_check.cpp')
-rw-r--r--Source/Checks/cm_cxx17_check.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Checks/cm_cxx17_check.cpp b/Source/Checks/cm_cxx17_check.cpp
index 593d9b2..29863b1 100644
--- a/Source/Checks/cm_cxx17_check.cpp
+++ b/Source/Checks/cm_cxx17_check.cpp
@@ -1,6 +1,7 @@
#include <cstdio>
#include <iterator>
#include <memory>
+#include <optional>
#include <unordered_map>
#ifdef _MSC_VER
@@ -27,5 +28,7 @@ int main()
IDispatchPtr disp(ptr);
#endif
- return *u + *ai + *(bi - 1) + (3 - static_cast<int>(ci));
+ std::optional<int> oi = 0;
+
+ return *u + *ai + *(bi - 1) + (3 - static_cast<int>(ci)) + oi.value();
}