Использование GRETA (regexp) vs Visual Studio 2005 beta2
От: karamultuk  
Дата: 27.12.05 12:10
Оценка:
Здравствуйте, уважаемые.

Попытался попробовать сабжевый класс (GRETA).
Пример кода:

// greta.cpp : Defines the entry point for the console application.
//

#include <stdafx.h>
#include <iostream>
#include <string>

#include "regexpr2.h"

using namespace std;
using namespace regex;

int main() {
    match_results results1;
    subst_results results2;
    string str( "The book <COST> $12.34" );
    rpattern pat1( "\\$(\\d+)(\\.(\\d\\d))?" );  
    rpattern pat2( "<COST>", "цена");
    // Match a dollar sign followed by one or more digits,
    // optionally followed by a period and two more digits.
    // The double-escapes are necessary to satisfy the compiler.

    match_results::backref_type br = pat1.match( str, results1 );
    subst_results results = pat2.substitute( str, results2 );
    if( br.matched ) {
        cout << "match success!" << endl;
        cout << "price: " << br << endl;
    } else {
        cout << "match failed!" << endl;
    }
    return 0;
}


При попытке компиляции получаю следующую ошибку:
d:\program files\microsoft visual studio 8\!projects\example 1\greta\greta\restack.h(355) : warning C4346: 'regex::hetero_stack<AlignmentT,RuntimeTypeCheckT,AssumePodT,DynamicBlockSizeT,StaticBlockSizeT>::stack_node::header' : dependent name is not a type
prefix with 'typename' to indicate a type

Такое впечатление, что проблема с STL, помогите, пожалуйста разобраться.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.