Ticket #7104 (closed Bugs: fixed)

Opened 5 years ago

Last modified 5 years ago

[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.


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

Change History

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

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

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


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
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.