Skip to content

Commit 6b3be9e

Browse files
committed
use C++ concepts in monitor_file_utilities
Constrained types to be integral
1 parent 635e97f commit 6b3be9e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

FWCore/Services/plugins/monitor_file_utilities.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <iomanip>
55
#include <iostream>
66
#include <vector>
7+
#include <concepts>
78

89
#include "FWCore/ServiceRegistry/interface/StreamContext.h"
910
#include "FWCore/ServiceRegistry/interface/ModuleCallingContext.h"
@@ -23,13 +24,13 @@ namespace edm::service::monitor_file_utilities {
2324

2425
inline auto module_callid(edm::ESModuleCallingContext const& mcc) { return mcc.callID(); }
2526

26-
template <typename T>
27-
std::enable_if_t<std::is_integral<T>::value> concatenate(std::ostream& os, T const t) {
27+
template <std::integral T>
28+
void concatenate(std::ostream& os, T const t) {
2829
os << ' ' << t;
2930
}
3031

31-
template <typename H, typename... T>
32-
std::enable_if_t<std::is_integral<H>::value> concatenate(std::ostream& os, H const h, T const... t) {
32+
template <std::integral H, std::integral... T>
33+
void concatenate(std::ostream& os, H const h, T const... t) {
3334
os << ' ' << h;
3435
concatenate(os, t...);
3536
}

0 commit comments

Comments
 (0)