I am trying to construct a regex matcher for a basic string so that I have a generalized regex matching function for any string type. I am getting a syntax error I can't figure out. I have included the compile log and source below.
The specific line giving me grief is line 19 below. I repeat it here: std::match_results<std::basic_string<CharType>::const_iterator> Pieces;
Any insight would be most appreciated.
Regards,
David
Here is the compile log: 08:37:59 **** Incremental Build of configuration Debug for project Test ****
make all
Building file: ../src/Test.cpp
Invoking: GCC C++ Compiler
g++ -std=c++0x -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Test.d" -MT"src/Test.d" -o "src/Test.o" "../src/Test.cpp"
../src/Test.cpp: In function ‘std::vector<std::basic_string<_CharT> >& RegEx(std::vector<std::basic_string<_CharT> >&, const std::basic_string<_CharT>&)’:
../src/Test.cpp:19:65: error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Bi_iter, class _Allocator> class std::match_results’
std::match_results<std::basic_string<CharType>::const_iterator> Pieces;
^
../src/Test.cpp:19:65: error: expected a type, got ‘std::basic_string<_CharT>::const_iterator’
../src/Test.cpp:19:65: error: template argument 2 is invalid
../src/Test.cpp:19:73: error: invalid type in declaration before ‘;’ token
std::match_results<std::basic_string<CharType>::const_iterator> Pieces;
^
make: *** [src/Test.o] Error 1