From 8afeafe61299c87449023d63336389f159b55808 Mon Sep 17 00:00:00 2001
From: Kefu Chai <tchaikov@gmail.com>
Date: Sun, 14 Jul 2024 08:47:53 +0800
Subject: [PATCH] citnames: include fmt/ranges.h for using fmt::join()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

fmt::join() was moved into fmt/ranges.h since fmt v11, so include
this header for using fmt::join(). otherwise, we'd have following
compilation failure when building Bear with fmt v11 and up:

```
/builddir/build/BUILD/bear-3.1.4-build/Bear-3.1.4/source/citnames/source/semantic/Parsers.h:255:73: error: ‘join’ is not a member of ‘fmt’
  255 |                             fmt::format("Failed to recognize: {}", fmt::join(remainder.begin(), remainder.end(), ", "))
      |                                                                         ^~~~
```

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
---
 source/citnames/source/semantic/Parsers.h   | 1 +
 source/citnames/source/semantic/Semantic.cc | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/source/citnames/source/semantic/Parsers.h b/source/citnames/source/semantic/Parsers.h
index 90e64f9e..34203a17 100644
--- a/source/citnames/source/semantic/Parsers.h
+++ b/source/citnames/source/semantic/Parsers.h
@@ -30,6 +30,7 @@
 #include <optional>
 
 #include <fmt/format.h>
+#include <fmt/ranges.h>
 
 namespace cs::semantic {
 
diff --git a/source/citnames/source/semantic/Semantic.cc b/source/citnames/source/semantic/Semantic.cc
index da762956..54d3e62d 100644
--- a/source/citnames/source/semantic/Semantic.cc
+++ b/source/citnames/source/semantic/Semantic.cc
@@ -21,6 +21,7 @@
 #include "semantic/Semantic.h"
 
 #include <fmt/format.h>
+#include <fmt/ranges.h>
 #ifdef HAVE_FMT_STD_H
 #include <fmt/std.h>
 #else
@@ -133,4 +134,4 @@ namespace cs::semantic {
         }
         return results;
     }
-}
\ No newline at end of file
+}
