summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/base/utils.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/libcamera/base/utils.h b/include/libcamera/base/utils.h
index cfff0583..889bb4a2 100644
--- a/include/libcamera/base/utils.h
+++ b/include/libcamera/base/utils.h
@@ -361,6 +361,20 @@ decltype(auto) abs_diff(const T &a, const T &b)
return a - b;
}
+namespace details {
+
+struct defopt_t {
+ template<typename T>
+ operator T() const
+ {
+ return T{};
+ }
+};
+
+} /* namespace details */
+
+constexpr details::defopt_t defopt;
+
} /* namespace utils */
#ifndef __DOXYGEN__