id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 3163,Regex use - compile error,scippio@…,John Maddock,"Hi, I have problem in my little test program: {{{ std::string decoded = ""this is standart string with username=\""myusername\"" etc. ""; static const boost::regex regUsername(""username=\""(.*)\""""); boost::cmatch matches; std::string::const_iterator begin; begin = decoded.begin(); while(boost::regex_search(begin, decoded.end(), matches, regUsername)){ std::string text(matches[1].first, matches[1].second); std::cout << ""OUTPUT: "" << text << std::endl; begin = matches[1].second; } }}} compile error: {{{ ccache g++ -o test.o -c -O2 -Wno-deprecated -Wall -Iinc test.cpp test.cpp: In member function ‘void authorization()’: test.cpp:211: error: no matching function for call to ‘regex_search(__gnu_cxx::__normal_iterator, std::allocator > >&, __gnu_cxx::__normal_iterator, std::allocator > >, boost::cmatch&, const boost::regex&)’ test.cpp:214: error: no match for ‘operator=’ in ‘begin = ((const boost::sub_match*)matches.boost::match_results::operator[] [with BidiIterator = const char*, Allocator = std::allocator >](1))->boost::sub_match::.std::pair::second’ /usr/lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/bits/stl_iterator.h:669: note: candidates are: __gnu_cxx::__normal_iterator, std::allocator > >& __gnu_cxx::__normal_iterator, std::allocator > >::operator=(const __gnu_cxx::__normal_iterator, std::allocator > >&) scons: *** [test.o] Error 1 }}} ",Bugs,closed,Boost 1.40.0,regex,Boost 1.39.0,Problem,invalid,"regex,compile",