Skip to content

Commit

Permalink
citnames: include fmt/ranges.h for using fmt::join()
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tchaikov authored and rizsotto committed Jul 14, 2024
1 parent 81160a2 commit 8afeafe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions source/citnames/source/semantic/Parsers.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <optional>

#include <fmt/format.h>
#include <fmt/ranges.h>

namespace cs::semantic {

Expand Down
3 changes: 2 additions & 1 deletion source/citnames/source/semantic/Semantic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -133,4 +134,4 @@ namespace cs::semantic {
}
return results;
}
}
}

0 comments on commit 8afeafe

Please sign in to comment.