Skip to content

Commit 0dd0b8a

Browse files
committed
DPL: add C++20 ranges views to filter vectors of InputSpecs / OutputSpecs
1 parent 5df80a7 commit 0dd0b8a

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright 2019-2025 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
#ifndef O2_FRAMEWORK_DATASPECVIEWS_H_
12+
#define O2_FRAMEWORK_DATASPECVIEWS_H_
13+
14+
#include "Framework/DataSpecUtils.h"
15+
#include <ranges>
16+
17+
namespace o2::framework::views
18+
{
19+
static auto partial_match_filter(auto what)
20+
{
21+
return std::views::filter([&what](auto const& t) -> bool { return DataSpecUtils::partialMatch(t, what); });
22+
}
23+
} // namespace o2::framework::views
24+
25+
#endif // O2_FRAMEWORK_DATASPECVIEWS_H_

0 commit comments

Comments
 (0)