forked from boostorg/regex
Almost complete regex implementation now...
[SVN r22718]
This commit is contained in:
@@ -53,6 +53,8 @@ public:
|
||||
ogrep_predicate(unsigned int& i, const char* p, iterator start, iterator end) : lines(i), filename(p), last_line(-1), end_of_storage(end), last_line_start(start) {}
|
||||
ogrep_predicate(const ogrep_predicate& o) : lines(o.lines), filename(o.filename), last_line(o.last_line), end_of_storage(o.end_of_storage), last_line_start(o.last_line_start) {}
|
||||
bool operator () (const boost::match_results<iterator, Allocator>& i);
|
||||
private:
|
||||
void operator=(const ogrep_predicate&);
|
||||
};
|
||||
|
||||
// ideally we'd ignor the allocator type and use a template member function
|
||||
|
||||
@@ -19,15 +19,7 @@
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
// case sensitive reg_expression determines our allocator type:
|
||||
typedef boost::reg_expression<char> re_type;
|
||||
typedef re_type::allocator_type allocator_type;
|
||||
|
||||
// now declare static (global) data, including an allocator
|
||||
// instance which we'll pass to all instances that require an allocator.
|
||||
|
||||
extern allocator_type a;
|
||||
|
||||
typedef boost::basic_regex<char> re_type;
|
||||
extern re_type e;
|
||||
|
||||
// flags for output:
|
||||
|
||||
@@ -46,10 +46,7 @@ using std::endl;
|
||||
#include <algorithm>
|
||||
#endif
|
||||
|
||||
allocator_type a;
|
||||
|
||||
re_type e(a);
|
||||
//rei_type ei(a);
|
||||
re_type e;
|
||||
|
||||
// flags for output:
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ int main(int argc, char**argv)
|
||||
double tim;
|
||||
bool result;
|
||||
int iters = 100;
|
||||
double wait_time = std::min(t.elapsed_min() * 1000, 1.0);
|
||||
double wait_time = (std::min)(t.elapsed_min() * 1000, 1.0);
|
||||
|
||||
while(true)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user