Skip to content

Commit

Permalink
Backport fmt 11 support from main
Browse files Browse the repository at this point in the history
  • Loading branch information
jjerphan authored and opoplawski committed Aug 2, 2024
1 parent 4f26925 commit c1fabca
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libmamba/include/mamba/core/mamba_fs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,7 @@ struct fmt::formatter<::fs::u8path>
}

template <class FormatContext>
auto format(const ::fs::u8path& path, FormatContext& ctx)
auto format(const ::fs::u8path& path, FormatContext& ctx) const
{
return fmt::format_to(ctx.out(), "'{}'", path.string());
}
Expand Down
4 changes: 2 additions & 2 deletions libmamba/include/mamba/specs/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ struct fmt::formatter<mamba::specs::VersionPartAtom>
}

template <class FormatContext>
auto format(const ::mamba::specs::VersionPartAtom atom, FormatContext& ctx)
auto format(const ::mamba::specs::VersionPartAtom atom, FormatContext& ctx) const
{
return fmt::format_to(ctx.out(), "{}{}", atom.numeral(), atom.literal());
}
Expand All @@ -188,7 +188,7 @@ struct fmt::formatter<mamba::specs::Version>
}

template <class FormatContext>
auto format(const ::mamba::specs::Version v, FormatContext& ctx)
auto format(const ::mamba::specs::Version v, FormatContext& ctx) const
{
auto out = ctx.out();
if (v.epoch() != 0)
Expand Down
1 change: 1 addition & 0 deletions libmamba/src/api/install.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <fmt/color.h>
#include <fmt/format.h>
#include <fmt/ostream.h>
#include <fmt/ranges.h>
#include <reproc++/run.hpp>
#include <reproc/reproc.h>

Expand Down
2 changes: 1 addition & 1 deletion libmamba/src/core/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include <iostream>

#include <fmt/format.h>
#include <fmt/ostream.h>
#include <fmt/ranges.h>
#include <spdlog/pattern_formatter.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <spdlog/spdlog.h>
Expand Down
1 change: 1 addition & 0 deletions libmamba/src/core/package_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <tuple>

#include <fmt/format.h>
#include <fmt/ranges.h>

#include "mamba/core/package_info.hpp"
#include "mamba/specs/archive.hpp"
Expand Down
1 change: 1 addition & 0 deletions libmamba/src/core/query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <fmt/color.h>
#include <fmt/format.h>
#include <fmt/ostream.h>
#include <fmt/ranges.h>
#include <solv/evr.h>
#include <spdlog/spdlog.h>

Expand Down
1 change: 1 addition & 0 deletions libmamba/src/core/run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <fmt/color.h>
#include <fmt/format.h>
#include <fmt/ostream.h>
#include <fmt/ranges.h>
#include <nlohmann/json.hpp>
#include <reproc++/run.hpp>
#include <spdlog/spdlog.h>
Expand Down
1 change: 1 addition & 0 deletions libmamba/tests/src/core/test_satisfiability_error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include <doctest/doctest.h>
#include <fmt/format.h>
#include <fmt/ranges.h>
#include <nlohmann/json.hpp>
#include <solv/solver.h>

Expand Down
1 change: 1 addition & 0 deletions libmamba/tests/src/doctest-printer/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <doctest/doctest.h>
#include <fmt/format.h>
#include <fmt/ranges.h>

namespace doctest
{
Expand Down
1 change: 1 addition & 0 deletions libmamba/tests/src/doctest-printer/vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <doctest/doctest.h>
#include <fmt/format.h>
#include <fmt/ranges.h>

namespace doctest
{
Expand Down
1 change: 1 addition & 0 deletions libmambapy/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <stdexcept>

#include <fmt/format.h>
#include <fmt/ranges.h>
#include <nlohmann/json.hpp>
#include <pybind11/functional.h>
#include <pybind11/iostream.h>
Expand Down
1 change: 1 addition & 0 deletions micromamba/src/run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include <fmt/color.h>
#include <fmt/format.h>
#include <fmt/ranges.h>
#include <nlohmann/json.hpp>
#include <reproc++/run.hpp>
#include <spdlog/spdlog.h>
Expand Down

0 comments on commit c1fabca

Please sign in to comment.