Skip to content

Commit

Permalink
bump {fmt} -> 10.2.1 & httplib -> 0.15.3
Browse files Browse the repository at this point in the history
could drop formatter definitions for std::source_location (now part of FMT)

Signed-off-by: Ralph J. Steinhagen <[email protected]>
  • Loading branch information
RalphSteinhagen committed Apr 24, 2024
1 parent c96c8ec commit a1370f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 28 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ include(FetchContent)
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 10.1.1
GIT_TAG 10.2.1
)

FetchContent_Declare(
Expand Down Expand Up @@ -143,7 +143,7 @@ FetchContent_Declare(
FetchContent_Declare(
cpp-httplib
GIT_REPOSITORY https://github.com/yhirose/cpp-httplib.git
GIT_TAG v0.15.1
GIT_TAG v0.15.3
)

FetchContent_MakeAvailable(fmt pmt ut yaml-cpp vir-simd cpp-httplib)
Expand Down
17 changes: 1 addition & 16 deletions meta/include/gnuradio-4.0/meta/formatter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <complex>
#include <expected>
#include <fmt/format.h>
#include <fmt/std.h>
#include <gnuradio-4.0/meta/UncertainValue.hpp>
#include <gnuradio-4.0/Tag.hpp>
#include <source_location>
Expand Down Expand Up @@ -131,22 +132,6 @@ struct fmt::formatter<std::vector<bool>> {
}
};

template<>
struct fmt::formatter<std::source_location> {
constexpr auto
parse(format_parse_context &ctx) -> decltype(ctx.begin()) {
return ctx.begin();
}

// Formats the source_location, using 'f' for file and 'l' for line
template<typename FormatContext>
auto
format(const std::source_location &loc, FormatContext &ctx) const -> decltype(ctx.out()) {
// Example format: "file:line"
return fmt::format_to(ctx.out(), "{}:{}", loc.file_name(), loc.line());
}
};

template<typename Value, typename Error>
struct fmt::formatter<std::expected<Value, Error>> {
constexpr auto
Expand Down
10 changes: 0 additions & 10 deletions meta/test/qa_formatter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,6 @@ const boost::ut::suite vectorBoolFormatter = [] {
};
};

const boost::ut::suite sourceLocationFormatter = [] {
using namespace boost::ut;

"fmt::formatter<std::source_location>"_test = [] {
auto loc = fmt::format("{}", std::source_location::current());
fmt::println("location formatter test: {}", loc);
expect(ge(loc.size(), 0UZ));
};
};

const boost::ut::suite expectedFormatter = [] {
using namespace boost::ut;
using namespace std::string_literals;
Expand Down

0 comments on commit a1370f8

Please sign in to comment.