This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/main by this push:
     new dc7bbd0862 AVRO-4158: [c++] Update for fmtlib 10+ (#3444)
dc7bbd0862 is described below

commit dc7bbd086283bb61dfabd8fcdf980d22f30c7a93
Author: Markus Kitsinger <[email protected]>
AuthorDate: Mon Aug 4 15:07:32 2025 -0500

    AVRO-4158: [c++] Update for fmtlib 10+ (#3444)
---
 lang/c++/include/avro/Node.hh  | 2 +-
 lang/c++/include/avro/Types.hh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lang/c++/include/avro/Node.hh b/lang/c++/include/avro/Node.hh
index 7918c3302e..72e85e0ee4 100644
--- a/lang/c++/include/avro/Node.hh
+++ b/lang/c++/include/avro/Node.hh
@@ -225,7 +225,7 @@ inline std::ostream &operator<<(std::ostream &os, const 
avro::Node &n) {
 template<>
 struct fmt::formatter<avro::Name> : fmt::formatter<std::string> {
     template<typename FormatContext>
-    auto format(const avro::Name &n, FormatContext &ctx) {
+    constexpr auto format(const avro::Name &n, FormatContext &ctx) const {
         return fmt::formatter<std::string>::format(n.fullname(), ctx);
     }
 };
diff --git a/lang/c++/include/avro/Types.hh b/lang/c++/include/avro/Types.hh
index 84a33976e9..d02b8006e5 100644
--- a/lang/c++/include/avro/Types.hh
+++ b/lang/c++/include/avro/Types.hh
@@ -113,7 +113,7 @@ std::ostream &operator<<(std::ostream &os, const Null 
&null);
 template<>
 struct fmt::formatter<avro::Type> : fmt::formatter<std::string> {
     template<typename FormatContext>
-    auto format(avro::Type t, FormatContext &ctx) {
+    constexpr auto format(avro::Type t, FormatContext &ctx) const {
         return fmt::formatter<std::string>::format(avro::toString(t), ctx);
     }
 };

Reply via email to