From c4f6fa71357b223b0ab8ac29577c6228fde8853d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Neboj=C5=A1a=20Cvetkovi=C4=87?= Date: Mon, 1 Jul 2024 15:43:52 -0600 Subject: [PATCH] fix: Make basic_format_arg::visit() const (#4043) --- include/fmt/base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index 976402a4..783e0368 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -1760,7 +1760,7 @@ template class basic_format_arg { * `vis(value)` will be called with the value of type `double`. */ template - 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;