Boost logo

Boost :

From: Lorenzo Bettini (bettini_at_[hidden])
Date: 2005-06-02 18:08:59


John Maddock wrote:
>> by the way, I saw that it was also asked before (also by myself): do
>> you plan to implement the features "subexpressions that matched" so
>> that one does not have to iterate through all the subexpressions?
>
>
> Sorry, I'm being dense today: what do you mean by that?

instead of checking every what[i].matched as in the following

for (unsigned int i = 1; i < what.size(); ++i) {
        if (what[i].matched) {

I'd like to be able to have the subexpressions that matched accessible
directly. Something like

for (unsigned int i = 1; i < what.submatched.size(); ++i) {

so, if I have, say, 10 subexpressions, and only two matched, instead of
checking every what[i] (for i = 0..9), I could access directly to those
two subexpressions. It'd be much more efficient.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk