Boost logo

Boost Users :

Subject: [Boost-users] Can the Regex code be placed into a class?
From: Ramon F Herrera (ramon_at_[hidden])
Date: 2009-09-18 12:26:33


The following sample program comes with the Boost Regex distribution. It
compiles and runs fine. Its purpose is to count the number of classes in
the input text file.

http://patriot.net/~ramon/regex_iterator_example.cpp.txt

I am having a real hard time trying to convert the code to a class
(named "Pairs").

The compilation problem occurs in this statement:

std::for_each(m1, m2, &regex_callback);

The compiler suggests to use this statement, which does not compile either:

std::for_each(m1, m2, &Pairs::regex_callback);

Thanks,

-Ramon

http://www.parashift.com/c++-faq-lite/pointers-to-members.html


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net