Skip to content

Commit 0c08b77

Browse files
authored
Get fmt 11.1.1 to compile (#13855)
1 parent a6d96bc commit 0c08b77

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

DataFormats/Headers/include/Headers/DataHeaderHelpers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct fmt::formatter<T, std::enable_if_t<o2::header::is_descriptor<T>::value, c
3838
}
3939

4040
template <typename FormatContext>
41-
auto format(const T& p, FormatContext& ctx)
41+
auto format(const T& p, FormatContext& ctx) const
4242
{
4343
return fmt::format_to(ctx.out(), "{}", p.template as<std::string>());
4444
}
@@ -67,7 +67,7 @@ struct fmt::formatter<o2::header::DataHeader> {
6767
}
6868

6969
template <typename FormatContext>
70-
auto format(const o2::header::DataHeader& h, FormatContext& ctx)
70+
auto format(const o2::header::DataHeader& h, FormatContext& ctx) const
7171
{
7272
if (presentation == 's') {
7373
auto res = fmt::format("Data header version {}, flags: {}\n", h.headerVersion, h.flags) +

EventVisualisation/Workflow/src/O2DPLDisplay.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ void O2DPLDisplaySpec::run(ProcessingContext& pc)
229229
}
230230
}
231231

232-
LOGP(info, "Tracks: {}", fmt::join(sourceStats, ", "));
232+
// FIXME: find out why this does not work with 11.1.1
233+
// LOGP(info, "Tracks: {}", fmt::join(sourceStats, ", "));
233234
}
234235

235236
void O2DPLDisplaySpec::endOfStream(EndOfStreamContext& ec)

Framework/Core/include/Framework/Formatters.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ struct fmt::formatter<o2::framework::Lifetime> : fmt::formatter<std::string_view
2020
char presentation = 's';
2121

2222
template <typename FormatContext>
23-
auto format(o2::framework::Lifetime const& h, FormatContext& ctx)
23+
auto format(o2::framework::Lifetime const& h, FormatContext& ctx) const
2424
{
2525
std::string_view s = "unknown";
2626
switch (h) {

Framework/Core/src/ComputingQuotaEvaluator.cxx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#define LOGLEVEL debug
2626

27+
2728
namespace o2::framework
2829
{
2930

@@ -90,7 +91,7 @@ bool ComputingQuotaEvaluator::selectOffer(int task, ComputingQuotaRequest const&
9091
}
9192
if (enough) {
9293
LOGP(LOGLEVEL, "{} offers were selected for a total of: cpu {}, memory {}, shared memory {}", result.size(), totalOffer.cpu, totalOffer.memory, totalOffer.sharedMemory);
93-
LOGP(LOGLEVEL, " The following offers were selected for computation: {} ", fmt::join(result, ","));
94+
//LOG(LOGLEVEL) << " The following offers were selected for computation: {} " << fmt::join(result, ", ");
9495
dpStats.updateStats({static_cast<short>(ProcessingStatsId::RESOURCES_SATISFACTORY), DataProcessingStats::Op::Add, 1});
9596
} else {
9697
dpStats.updateStats({static_cast<short>(ProcessingStatsId::RESOURCES_MISSING), DataProcessingStats::Op::Add, 1});
@@ -99,16 +100,16 @@ bool ComputingQuotaEvaluator::selectOffer(int task, ComputingQuotaRequest const&
99100
}
100101
}
101102
if (stats.invalidOffers.size()) {
102-
LOGP(LOGLEVEL, " The following offers were invalid: {}", fmt::join(stats.invalidOffers, ", "));
103+
// LOGP(LOGLEVEL, " The following offers were invalid: {}", fmt::join(stats.invalidOffers, ", "));
103104
}
104105
if (stats.otherUser.size()) {
105-
LOGP(LOGLEVEL, " The following offers were owned by other users: {}", fmt::join(stats.otherUser, ", "));
106+
// LOGP(LOGLEVEL, " The following offers were owned by other users: {}", fmt::join(stats.otherUser, ", "));
106107
}
107108
if (stats.expired.size()) {
108-
LOGP(LOGLEVEL, " The following offers are expired: {}", fmt::join(stats.expired, ", "));
109+
// LOGP(LOGLEVEL, " The following offers are expired: {}", fmt::join(stats.expired, ", "));
109110
}
110111
if (stats.unexpiring.size() > 1) {
111-
LOGP(LOGLEVEL, " The following offers will never expire: {}", fmt::join(stats.unexpiring, ", "));
112+
// LOGP(LOGLEVEL, " The following offers will never expire: {}", fmt::join(stats.unexpiring, ", "));
112113
}
113114

114115
return enough;

0 commit comments

Comments
 (0)