Skip to content

Commit 0166a32

Browse files
JacobDomagalacwschilly
authored andcommitted
#2216: Fix compile errors with newer version of fmt
1 parent 0413147 commit 0166a32

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

src/vt/collective/reduce/reduce_manager.h

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include "vt/collective/reduce/reduce_scope.h"
4848
#include "vt/collective/tree/tree.h"
4949

50+
#include <memory>
5051
namespace vt { namespace collective { namespace reduce {
5152

5253
struct Reduce;

src/vt/elm/elm_id.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ struct formatter<::vt::elm::ElementIDStruct> {
128128
/// Formats the epoch using the parsed format specification (presentation)
129129
/// stored in this formatter.
130130
template <typename FormatContext>
131-
auto format(::vt::elm::ElementIDStruct const& e, FormatContext& ctx) {
131+
auto format(::vt::elm::ElementIDStruct const& e, FormatContext& ctx) const {
132132
std::string id_format =
133133
presentation == 'b' ? "{:b}" : (presentation == 'd' ? "{:d}" : "{:x}");
134134
auto fmt_str = "(" + id_format + ",{},{},{})";

src/vt/epoch/epoch_type.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct formatter<::vt::epoch::EpochType> {
142142
/// Formats the epoch using the parsed format specification (presentation)
143143
/// stored in this formatter.
144144
template <typename FormatContext>
145-
auto format(::vt::epoch::EpochType const& e, FormatContext& ctx) {
145+
auto format(::vt::epoch::EpochType const& e, FormatContext& ctx) const {
146146
return format_to(
147147
ctx.out(),
148148
presentation == 'b' ? "{:b}" : (presentation == 'd' ? "{:d}" : "{:x}"),

src/vt/rdma/rdma_common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ VT_FMT_NAMESPACE_BEGIN
122122
template <>
123123
struct formatter<::vt::rdma::Type> : formatter<std::string_view> {
124124
template <typename FormatContext>
125-
auto format(::vt::rdma::Type t, FormatContext& ctx) {
125+
auto format(::vt::rdma::Type t, FormatContext& ctx) const {
126126
std::string_view name = "Unknown";
127127
switch (t) {
128128
case ::vt::rdma::Type::Get:

src/vt/termination/interval/interval.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ struct formatter<::vt::term::interval::Interval<DomainT, sentinel>>
245245
template <typename FormatContext>
246246
auto format(
247247
const ::vt::term::interval::Interval<DomainT, sentinel>& interval,
248-
FormatContext& ctx) {
248+
FormatContext& ctx) const {
249249
return format_to(
250250
ctx.out(), "Interval[{}, {}]", interval.lower(), interval.upper());
251251
}

src/vt/timing/timing.h

+9-10
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,19 @@ TimeType getCurrentTime();
6565

6666
VT_FMT_NAMESPACE_BEGIN
6767

68-
template <typename FormatContext>
69-
auto format(::vt::TimeTypeWrapper const& t, FormatContext& ctx) {
70-
return fmt::format_to(
71-
ctx.out(), "{}",
72-
to_engineering_string(t.seconds(), 5, eng_exponential, "s")
73-
);
68+
template<>
69+
struct formatter<::vt::TimeTypeWrapper> {
70+
template<typename ParseContext>
71+
constexpr auto parse(ParseContext& ctx) {
72+
return ctx.begin();
7473
}
75-
};
7674

77-
template <typename FormatContext>
78-
auto format(::vt::TimeTypeWrapper const& t, FormatContext& ctx) {
75+
template<typename FormatContext>
76+
auto format(::vt::TimeTypeWrapper const& t, FormatContext& ctx) const {
7977
return fmt::format_to(
8078
ctx.out(), "{}",
81-
to_engineering_string(t.seconds(), 3, eng_exponential, "s"));
79+
to_engineering_string(t.seconds(), 5, eng_exponential, "s")
80+
);
8281
}
8382
};
8483

src/vt/topos/index/dense/dense_array.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ struct formatter<::vt::index::DenseIndexArray<IndexType, ndim>>
166166
auto format(
167167
const ::vt::index::DenseIndexArray<IndexType, ndim>& idx,
168168
FormatContext& ctx
169-
) {
169+
) const {
170170
return formatter<std::string>::format(idx.toString(), ctx);
171171
}
172172
};

src/vt/vrt/collection/balance/temperedlb/criterion.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ template <>
9999
struct formatter<::vt::vrt::collection::lb::CriterionEnum>
100100
: formatter<std::string_view> {
101101
template <typename FormatContext>
102-
auto format(::vt::vrt::collection::lb::CriterionEnum c, FormatContext& ctx) {
102+
auto format(::vt::vrt::collection::lb::CriterionEnum c, FormatContext& ctx) const {
103103
std::string_view name = "Unknown";
104104
switch (c) {
105105
case ::vt::vrt::collection::lb::CriterionEnum::Grapevine:

tests/unit/lb/test_lbargs_enum_conv.nompi.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ VT_FMT_NAMESPACE_BEGIN
152152
template <>
153153
struct formatter<::vt::tests::unit::DummyEnum> : formatter<std::string_view> {
154154
template <typename FormatContext>
155-
auto format(::vt::tests::unit::DummyEnum c, FormatContext& ctx) {
155+
auto format(::vt::tests::unit::DummyEnum c, FormatContext& ctx) const {
156156
std::string_view name = "Unknown";
157157
switch (c) {
158158
case ::vt::tests::unit::DummyEnum::One:

0 commit comments

Comments
 (0)