Skip to content

Commit

Permalink
Update to latest fmt
Browse files Browse the repository at this point in the history
Make it use the same version as opencmw-cpp.
  • Loading branch information
frankosterfeld authored and RalphSteinhagen committed Oct 17, 2023
1 parent 93bfda6 commit 53f1193
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ include(FetchContent)
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 10.0.0
GIT_TAG 10.1.1
)

FetchContent_Declare(
Expand Down
4 changes: 2 additions & 2 deletions core/include/gnuradio-4.0/annotated.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,13 @@ struct fmt::formatter<gr::Annotated<T, description, Arguments...>> {
fmt::formatter<Type> value_formatter;

template<typename FormatContext>
auto
constexpr auto
parse(FormatContext &ctx) {
return value_formatter.parse(ctx);
}

template<typename FormatContext>
auto
constexpr auto
format(const gr::Annotated<T, description, Arguments...> &annotated, FormatContext &ctx) {
// TODO: add switch for printing only brief and/or meta-information
return value_formatter.format(annotated.value, ctx);
Expand Down
4 changes: 2 additions & 2 deletions core/test/qa_Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ auto boost::ut::cfg<boost::ut::override> = boost::ut::runner<boost::ut::reporter
template<typename T>
struct fmt::formatter<std::complex<T>> {
template<typename ParseContext>
auto
constexpr auto
parse(ParseContext &ctx) {
return std::begin(ctx);
}

template<typename FormatContext>
auto
constexpr auto
format(const std::complex<T> value, FormatContext &ctx) const {
return fmt::format_to(ctx.out(), "({}+{}i)", value.real(), value.imag());
}
Expand Down

0 comments on commit 53f1193

Please sign in to comment.