You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The statements:
Line 155 it = utils::find_bm(bit, eit, "From ");
Line 156 if(!isnl(*(it-1))) >>>>> error C2784: '_RanIt1::difference_type std::operator ......
If I comment out line 156, I get the error
D:\pkg\C++\MSVC2010\mimetic-master\mimetic/utils.h(88): error C2664: 'mimetic::utils::find_bm' : cannot convert parameter 4 from 'std::input_iterator_tag' to 'const std::random_access_iterator_tag &'
1> Reason: cannot convert from 'std::input_iterator_tag' to 'const std::random_access_iterator_tag'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
I am unfamiliar enough with STL & mimetic to be able to resolve this issue on my own.
FWIW, using current mimetic-master from github
The text was updated successfully, but these errors were encountered:
lukem
added a commit
to lukem/mimetic
that referenced
this issue
Dec 29, 2023
Use std::search() to implement find_bm() instead of using a
local implementation of Boyer-Moore.
Avoids integer overflow reported in issue tat#31 and PR tat#31.
Should fix build problem in issue tat#7.
std::search is also faster for the test program in issue tat#31
on a system with an Intel Xeon E-2224 CPU:
- gcc 8.5, find_bm(): 3.16s
- g++ 8.5, std::search: 2.40s
- g++ 13, std::search: 2.16s
Experiments using the C++17 std::boyer_moore_searcher or
std::boyer_moore_horspool_searcher were also slower than
std::search in this experiment.
The statements:
Line 155 it = utils::find_bm(bit, eit, "From ");
Line 156 if(!isnl(*(it-1))) >>>>> error C2784: '_RanIt1::difference_type std::operator ......
If I comment out line 156, I get the error
D:\pkg\C++\MSVC2010\mimetic-master\mimetic/utils.h(88): error C2664: 'mimetic::utils::find_bm' : cannot convert parameter 4 from 'std::input_iterator_tag' to 'const std::random_access_iterator_tag &'
1> Reason: cannot convert from 'std::input_iterator_tag' to 'const std::random_access_iterator_tag'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
I am unfamiliar enough with STL & mimetic to be able to resolve this issue on my own.
FWIW, using current mimetic-master from github
The text was updated successfully, but these errors were encountered: