Boost logo

Boost :

From: Anthony Knittel (anthony_at_[hidden])
Date: 2005-09-01 23:22:51


i've been using the regex library fine to match patterns, but when i
changed my objects so the regex object is stored instead of initialised
each time, i get linking problems. basically it was working fine as:

(simplified code):
bool myclass::myfunction(char* testString) {
    regex mypattern("abcd");
    cmatch result;
    return regex_match(testString, result, mypattern);
}

but when i changed it to store the mypattern object it came up with
linker problems:

class myclass {
    ...
    regex _mypattern;
}

void myclass::myclass() { _mypattern = regex("abcd"); }
bool myfunction(char* testString) {
    cmatch result;
    return regex_match(testString, result, _mypattern);
}

the complaint seems to be about the copy constructor and op= methods,
which are supposedly implemented in the boost_regex library. i'm
linking using -lboost_regex-mgw (with the library path defined in
LIBRARY_PATH);

Anthony


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