Skip to content

Extend F.VALUE_OR for more input types

Jiahui Zhuo requested to merge jzhuo_ExValueOr into master

This MR, initiated from #493 (closed), will introduce an extra feature to the F.VALUE_OR. When this functor is initialized with a tuple, it will unpack the contents of the tuple and use them to create the default value. This enhancement is beneficial for accommodating more complex output types such as LHCb::linalg::Vec<scalar::float_v,N>, and at the same time, it enables the initialization of std::vector or std::array of any size.

Example:

F.VALUE_OR((0.,0.,0.)) @ "LHCb::Linalg::Vec<float_v,N>"
F.VALUE_OR((0.)) @ "std::vector<float_v>"

FYI: @graven @amathad @tfulghes @pkoppenb @erodrigu

Edited by Jiahui Zhuo

Merge request reports

Loading