Skip to content

Commit

Permalink
rename fmt PACKED (#624)
Browse files Browse the repository at this point in the history
  • Loading branch information
odygrd authored Nov 2, 2024
1 parent 1269de7 commit e6e1ca5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@
- The `set_thread_name` function has been fixed to provide accurate error reporting, ensuring that the correct error
message is displayed in the event of a failure.

- Renamed `PACKED` used in `libfmt` to `QUILLPACKED` to avoid naming
collisions. ([#620](https://github.com/odygrd/quill/issues/620))

## v7.4.0

- Fixed a build issue when compiling with `-fno-rtti`. This ensures compatibility with projects that disable
Expand Down
4 changes: 2 additions & 2 deletions include/quill/bundled/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,7 @@ struct type_is_unformattable_for {
struct type_is_unformattable_for;
#endif

template <bool PACKED, typename Context, typename T, FMTQUILL_ENABLE_IF(PACKED)>
template <bool QUILLPACKED, typename Context, typename T, FMTQUILL_ENABLE_IF(QUILLPACKED)>
FMTQUILL_CONSTEXPR auto make_arg(T& val) -> value<Context> {
using arg_type = remove_cvref_t<decltype(arg_mapper<Context>().map(val))>;

Expand Down Expand Up @@ -1662,7 +1662,7 @@ FMTQUILL_CONSTEXPR auto make_arg(T& val) -> basic_format_arg<Context> {
return arg;
}

template <bool PACKED, typename Context, typename T, FMTQUILL_ENABLE_IF(!PACKED)>
template <bool QUILLPACKED, typename Context, typename T, FMTQUILL_ENABLE_IF(!QUILLPACKED)>
FMTQUILL_CONSTEXPR inline auto make_arg(T& val) -> basic_format_arg<Context> {
return make_arg<Context>(val);
}
Expand Down
4 changes: 2 additions & 2 deletions include/quill/sinks/ConsoleSink.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class ConsoleColours
}

private:
std::array<WORD, 10> _colours = {0}; /**< Colours per log level */
std::array<WORD, 11> _colours = {0}; /**< Colours per log level */
bool _using_colours{false};
bool _can_use_colours{false};
};
Expand Down Expand Up @@ -344,7 +344,7 @@ class ConsoleColours
}

private:
std::array<std::string_view, 10> _colours; /**< Colours per log level */
std::array<std::string_view, 11> _colours; /**< Colours per log level */
bool _using_colours{false};
bool _can_use_colours{false};
};
Expand Down

0 comments on commit e6e1ca5

Please sign in to comment.