Skip to content

Allow 'just signature' to be specified in addConditionDerivation

If only a signature is specified, check whether it matches a constructor, and if so, build a corresponding transform.

As a result, usage like this:

addConditionDerivation( DeMuonLocation::Default, inputLocation<2>(),
                        []( const DeMuonDetector& det ) { return ComputeTilePosition{det}; } );

can be replaced by:

addConditionDerivation<ComputeTilePosition(const DeMuonDetector&)>( DeMuonLocation::Default, inputLocation<2>() );

Note that the version which specifies a 'callable' will continue to work, and in that case the arguments are (still) deduced from the signature of the callable.

Edited by Gerhard Raven

Merge request reports