rapidfuzz / rapidfuzz-cpp

Rapid fuzzy string matching in C++ using the Levenshtein Distance
https://rapidfuzz.github.io/rapidfuzz-cpp
MIT License
238 stars 37 forks source link

Are there any specific compiler settings aside from std++17 (onwards) I need to get this to work? #105

Closed oviano closed 1 year ago

oviano commented 1 year ago

I was using version 0.0.1 of the amalgamation from I guess a couple of years ago and I was able to drop this into my project and it built and I could use it fine.

Today I tried the latest amalgamation, and I get all these weird errors in Xcode, and similar under MSVC:

I had a look at CMakeLists.txt but aside from specifying that C++17 is required, I couldn't spot anything else I need.

I have specified C++20 in my own project, but I get the same errors if I change it to C++17.

Screenshot 2023-05-09 at 18 15 26
oviano commented 1 year ago

Ok, I think I just need to better understand the newer API, so I'm closing this now.

maxbachmann commented 1 year ago

I think this should just be CachedRatio<char> now and scorer.similarity now.

maxbachmann commented 1 year ago

and you might want to pass CachedRatio as const &, since it is not modified by the score calculation.

oviano commented 1 year ago

Yes, thank you, I figured that out in the end! I was using a version from quite a while ago.

Anyway, thanks for the library!