Make Gaudi::Functional constructors more paranoid about # of inputs/outputs
Currenly, the constructors of the Gaudi::Functional baseclasses use
std::array<KeyValue,N>
as arguments where N is the number of inputs
or outputs specified. However, this implies that one can specify a list
of less than N KeyValues, as std::array
will happily
default-initialize any missing items. This will then result in an error
in genConf, as this implies a property with a default-initialized string
(i.e. an empty string) as key.
This is fixed by replacing the use std::array<KeyValue,N>
with a tuple
with N KeyValue
s, eg. for N=2 an std::tuple<KeyValue,KeyValue>
.
Warning/Caveat: some (rare) user code may have hardwired the assumption of an std::array
,
and thus will have to be migrated. To easy this migration, the version which uses
std::tuple
also defines the preprocessor symbol GAUDI_FUNCTIONAL_CONSTRUCTOR_USES_TUPLE
,
which can be used to adapt the client code in a backwards compatible manner.
Merge request reports
Activity
added code cleanup label
mentioned in commit lhcb/LHCb@7f182d73
mentioned in merge request lhcb/LHCb!3217 (merged)
mentioned in merge request lhcb/Rec!2529 (closed)
added 1 commit
- cf446729 - Make Gaudi::Functional constructors more paranoid about # of inputs/outputs
mentioned in commit lhcb/Rec@77d33ab9
mentioned in commit lhcb/Phys@c0bd7a10
mentioned in merge request lhcb/Phys!983 (merged)
mentioned in commit lhcb/Rec@054cc9dc
mentioned in commit lhcb/LHCb@e85f845e
added 1 commit
- 364db54a - Make Gaudi::Functional constructors more paranoid about # of inputs/outputs
mentioned in commit lhcb/Rec@7076ff57
mentioned in commit lhcb/Rec@d211df19
mentioned in commit lhcb/Rec@1173cb3f
mentioned in commit lhcb/Phys@f18f5d2a
mentioned in commit lhcb/Phys@bd71f5dd
mentioned in commit lhcb/Rec@63e63904