diff --git a/include/libcamera/internal/value_node.h b/include/libcamera/internal/value_node.h index d4533df1..bcf2c8ec 100644 --- a/include/libcamera/internal/value_node.h +++ b/include/libcamera/internal/value_node.h @@ -143,6 +143,14 @@ public: #endif /* __DOXYGEN__ */ ValueNode(); + + template + ValueNode(T &&value) + : type_(Type::Empty) + { + set(std::forward(value)); + } + ~ValueNode(); bool isValue() const diff --git a/src/libcamera/value_node.cpp b/src/libcamera/value_node.cpp index f22f4de9..cb43fa9c 100644 --- a/src/libcamera/value_node.cpp +++ b/src/libcamera/value_node.cpp @@ -44,6 +44,13 @@ ValueNode::ValueNode() { } +/** + * \fn template ValueNode::ValueNode(T &&value) + * \brief Construct a ValueNode instance with a value + * \tparam T Type of the value + * \param[in] value The value + */ + ValueNode::~ValueNode() = default; /**