summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/yaml_parser.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/libcamera/internal/yaml_parser.h b/include/libcamera/internal/yaml_parser.h
index b6979d73..3ac27e06 100644
--- a/include/libcamera/internal/yaml_parser.h
+++ b/include/libcamera/internal/yaml_parser.h
@@ -179,10 +179,10 @@ public:
#endif
std::optional<T> get() const;
- template<typename T>
- T get(const T &defaultValue) const
+ template<typename T, typename U>
+ T get(U &&defaultValue) const
{
- return get<T>().value_or(defaultValue);
+ return get<T>().value_or(std::forward<U>(defaultValue));
}
#ifndef __DOXYGEN__