Skip to content

Commit

Permalink
Tentative fix for building with fmt 9.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluescarni committed Dec 7, 2023
1 parent 297dd2f commit 8c120b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/mp++/detail/fmt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef MPPP_DETAIL_FMT_HPP
#define MPPP_DETAIL_FMT_HPP

#include <stdexcept>

#include <fmt/core.h>

#include <mp++/config.hpp>
Expand Down Expand Up @@ -42,7 +44,11 @@ struct to_string_formatter {
}

// LCOV_EXCL_START
#if FMT_VERSION < 100000
throw std::invalid_argument("Invalid format");
#else
fmt::throw_format_error("Invalid format");
#endif
// LCOV_EXCL_STOP
}

Expand Down

0 comments on commit 8c120b4

Please sign in to comment.