Skip to content

Commit

Permalink
fix: Make basic_format_arg::visit() const (#4043)
Browse files Browse the repository at this point in the history
  • Loading branch information
nebkat committed Jul 1, 2024
1 parent 10f12fd commit c4f6fa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -1760,7 +1760,7 @@ template <typename Context> class basic_format_arg {
* `vis(value)` will be called with the value of type `double`.
*/
template <typename Visitor>
FMT_CONSTEXPR auto visit(Visitor&& vis) -> decltype(vis(0)) {
FMT_CONSTEXPR auto visit(Visitor&& vis) const -> decltype(vis(0)) {
switch (type_) {
case detail::type::none_type:
break;
Expand Down

0 comments on commit c4f6fa7

Please sign in to comment.