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 three algorithms have very similar interfaces. The docs could perhaps define a "searcher" concept and explicitly declare these algorithms' classes to be models of that concept.
std::search is similar to the three algorithms' free function versions (congratulations on getting the arguments in the same order!). For completeness, how about adding a searcher class that uses std::search?
It would sometimes be useful to have a variant of the constructor that takes a const char* pattern.
The tables store ints. For patterns shorter than 256 characters I think that uint8_t would be sufficient, and would reduce the size of a table from 1024 or 2048 bytes to only 256 bytes. Similarly uint16_t or uint32_t could be used for larger patterns. It is not obvious how to implement this, though; perhaps an optional max_pattern_length template parameter, making it the user's responsibility to ensure the supplied pattern is not too long.
The text was updated successfully, but these errors were encountered:
You can do that today with ( str, str + strlen (str), but I'll think about how to do it better.
Maybe just a specialization for char * (and wchar?)
The trick, I think, will be to avoid having a general pointer-based version that insists on null termination.
Phil Endecott writes:
The text was updated successfully, but these errors were encountered: