From: Arne Morten Kvarving <arne.morten.kvarving@sintef.no>
Date: Mon, 11 Nov 2024 11:56:41 +0100
Subject: fixed: format() must be const for custom formatters using {{fmt11}}

---
 opm/material/densead/EvaluationFormat.hpp | 2 +-
 opm/output/eclipse/Summary.cpp            | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/opm/material/densead/EvaluationFormat.hpp b/opm/material/densead/EvaluationFormat.hpp
index 68ff41d..d34a878 100644
--- a/opm/material/densead/EvaluationFormat.hpp
+++ b/opm/material/densead/EvaluationFormat.hpp
@@ -45,7 +45,7 @@ struct fmt::formatter<Opm::DenseAd::Evaluation<ValueT,numDerivs,staticSize>>
 
     template<class FormatContext>
     auto format(const Opm::DenseAd::Evaluation<ValueT,numDerivs,staticSize>& e,
-                FormatContext& ctx)
+                FormatContext& ctx) const
     {
         std::vector<ValueT> tmp(e.size());
         for (int i = 0; i < e.size(); ++i)
diff --git a/opm/output/eclipse/Summary.cpp b/opm/output/eclipse/Summary.cpp
index c74bc97..ad37428 100644
--- a/opm/output/eclipse/Summary.cpp
+++ b/opm/output/eclipse/Summary.cpp
@@ -95,7 +95,7 @@ struct fmt::formatter<Opm::EclIO::SummaryNode::Category> : fmt::formatter<string
 {
     // parse is inherited from formatter<string_view>.
     template <typename FormatContext>
-    auto format(Opm::EclIO::SummaryNode::Category c, FormatContext& ctx)
+    auto format(Opm::EclIO::SummaryNode::Category c, FormatContext& ctx) const
     {
         using Category = Opm::EclIO::SummaryNode::Category;
 
@@ -124,7 +124,7 @@ struct fmt::formatter<Opm::EclIO::SummaryNode::Type> : fmt::formatter<string_vie
 {
     // parse is inherited from formatter<string_view>.
     template <typename FormatContext>
-    auto format(Opm::EclIO::SummaryNode::Type t, FormatContext& ctx)
+    auto format(Opm::EclIO::SummaryNode::Type t, FormatContext& ctx) const
     {
         using Type = Opm::EclIO::SummaryNode::Type;
 
