Opened 5 years ago

Closed 5 years ago

#7104 closed Bugs (fixed)

[algorithm] compile error boyer_morre_search

Reported by: Akira Takahashi <faithandbrave@…> Owned by: marshall
Milestone: To Be Determined Component: algorithm
Version: Boost 1.50.0 Severity: Problem
Keywords: Cc:


compilation error with Range version boost::algorithm::boyer_moore_search. follow code:

#include <iostream>
#include <string>
#include <boost/algorithm/searching/boyer_moore.hpp>

int main()
    std::string text =
       "the stick, and made believe to worry it: then Alice dodged behind a";
    std::string pattern = "behind";

    // BM法で文字列検索
    decltype(text)::const_iterator it =
        boost::algorithm::boyer_moore_search(text, pattern); // error!

    if (it != text.end()) std::cout << "found" << std::endl;
    else                  std::cout << "not found" << std::endl;

Please see attached patch.

Attachments (1)

boyer_moore.patch (1.3 KB) - added by Akira Takahashi <faithandbrave@…> 5 years ago.
fixed iterator type

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by Akira Takahashi <faithandbrave@…>

fixed iterator type

comment:1 Changed 5 years ago by marshall

(In [79380]) Fixed range-based versions of Boyer-Moore; Added range-based versions of Boyer-Moore-Horspool and Knuth-Pratt-Morris; Refs #7104; will close when merged to release. Thanks to Akira Takahashi for the bug report!

comment:2 Changed 5 years ago by marshall

  • Resolution set to fixed
  • Status changed from new to closed

(In [79538]) Merge Boost.Algorithm changes to release; Fixes #7104

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain marshall.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.