Extend F.VALUE_OR for more input types
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>"
Edited by Jiahui Zhuo