Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-gnome
Path: blob/main/multimedia/aegisub/files/patch-src_search__replace__engine.cpp
16126 views
1
After https://github.com/boostorg/range/commit/69409ed63a9e1 build fails:
2
3
src/search_replace_engine.cpp:315:14: error: call to
4
'distance' is ambiguous
5
count += distance(
6
^~~~~~~~
7
/usr/include/c++/v1/iterator:511:1: note: candidate function [with _InputIter =
8
boost::u32regex_iterator<std::__1::__wrap_iter<const char *> >]
9
distance(_InputIter __first, _InputIter __last)
10
^
11
/usr/local/include/boost/iterator/distance.hpp:49:9: note: candidate function [with SinglePassIterator =
12
boost::u32regex_iterator<std::__1::__wrap_iter<const char *> >]
13
distance(SinglePassIterator first, SinglePassIterator last)
14
^
15
16
--- src/search_replace_engine.cpp.orig 2014-12-08 00:07:09 UTC
17
+++ src/search_replace_engine.cpp
18
@@ -312,7 +312,7 @@
19
if (MatchState ms = matches(&diag, 0)) {
20
auto& diag_field = diag.*get_dialogue_field(settings.field);
21
std::string const& text = diag_field.get();
22
- count += distance(
23
+ count += std::distance(
24
boost::u32regex_iterator<std::string::const_iterator>(begin(text), end(text), *ms.re),
25
boost::u32regex_iterator<std::string::const_iterator>());
26
diag_field = u32regex_replace(text, *ms.re, settings.replace_with);
27
28