Feature #23320
Support associative containers of key type art::InputTag
Description
Hello,
an std::set<art::InputTag> does not compile because of the lack of 'operator<'
.
Can it please be added?
Andrei
History
#1 Updated by Kyle Knoepfel over 1 year ago
- Description updated (diff)
#2 Updated by Kyle Knoepfel over 1 year ago
- Status changed from New to Under Discussion
#3 Updated by Kyle Knoepfel over 1 year ago
Andrei, is the motivation for this request that you want to compare a user-specified tag against a set of allowed tags?
#4 Updated by Kyle Knoepfel over 1 year ago
- Status changed from Under Discussion to Feedback
#5 Updated by Kyle Knoepfel over 1 year ago
- Estimated time set to 2.00 h
- Target version set to 3.04.00
- Assignee set to Kyle Knoepfel
- Status changed from Feedback to Assigned
We are fine with implementing a comparison operation, although its spelling may be something other than 'operator<()'
, or 'operator<()'
may be implemented in terms of a named function that can alternatively be specified when specifying/constructing the std::set
template arguments.
#6 Updated by Kyle Knoepfel over 1 year ago
- % Done changed from 0 to 100
- Status changed from Assigned to Resolved
- SSI Package art added
The chosen approach was to specialize of std::less<art::InputTag>
, which is what std::set
and std::map
use as default custom comparators. By choosing this route, we avoid introducing operators '<'
, '>'
(etc.), which do not have a natural meaning for art::InputTag
.
Implemented with commit canvas:ed8e1c7e.
#7 Updated by Kyle Knoepfel over 1 year ago
- Subject changed from operator<() for InputTag to Support associative containers of key type art::InputTag
#8 Updated by Kyle Knoepfel over 1 year ago
- Status changed from Resolved to Closed