I try to pass a pair of iterators to represent a string sequence:
#include
#include
using namespace std;
int main(int
regex_search
expects a const_iterator
but you are passing a std::string::iterator
.
Make your string const
const string test("abc");
Declare a const_iterator
std::string::const_iterator iter = test.begin();
std::string::const_iterator end = test.end();
Or use cbegin
and cend
auto iter = test.cbegin();
auto end = test.cend();