Modify

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 Clow
Milestone: To Be Determined Component: algorithm
Version: Boost 1.50.0 Severity: Problem
Keywords: Cc:

Description

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@…>

Attachment: boyer_moore.patch added

fixed iterator type

comment:1 Changed 5 years ago by Marshall Clow

(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 Clow

Resolution: fixed
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Marshall Clow.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.