Skip to content

Make PyConf type matching compatible with planned change in Gaudi::{Named}Range_

currently, a Gaudi::Range_ has a very long symbol name, as it is templated on both a container and an iterator. However, the iterator is always equal to the const_iterator of the container. Thus there is no need for this second template argument, as it can be derived from the first. So this MR changes the PyConf regex type matching to make the second template argument optional, so that when it is removed from Gaudi at some point in the future, the matching continues to work.

Note that when the change in Gaudi is made, the type name for a range will change from eg. Gaudi::Range_<std::vector<LHCb::Event::v1::Track const*,std::allocator<LHCb::Event::v1::Track const*> >,__gnu_cxx::__normal_iterator<LHCb::Event::v1::Track const* const*,std::vector<LHCb::Event::v1::Track const*,std::allocator<LHCb::Event::v1::Track const*> > > > into Gaudi::Range_<std::vector<LHCb::Event::v1::Track const*,std::allocator<LHCb::Event::v1::Track const*> > > which significantly shortens the symbol names (in this specific example from 263 characters to 105 characters), which in turn will reduce library sizes, and compiler memory usage - especially given how often ranges appear in function signatures, esp. when compiling eg. Gaudi::Functional algorithms and functors.

This change by itself will have no impact, other than enabling the transition to a Gaudi::Range without iterator template argument (i.e. this is necessary, but not sufficient for that change).

Edited by Gerhard Raven

Merge request reports

Loading