491 |
public: |
public: |
492 |
// We provide implicit conversions from strings so that users can |
// We provide implicit conversions from strings so that users can |
493 |
// pass in a string or a "const char*" wherever an "RE" is expected. |
// pass in a string or a "const char*" wherever an "RE" is expected. |
|
RE(const char* pat) { Init(pat, NULL); } |
|
|
RE(const char *pat, const RE_Options& option) { Init(pat, &option); } |
|
494 |
RE(const string& pat) { Init(pat, NULL); } |
RE(const string& pat) { Init(pat, NULL); } |
495 |
RE(const string& pat, const RE_Options& option) { Init(pat, &option); } |
RE(const string& pat, const RE_Options& option) { Init(pat, &option); } |
496 |
|
RE(const char* pat) { Init(pat, NULL); } |
497 |
|
RE(const char* pat, const RE_Options& option) { Init(pat, &option); } |
498 |
|
RE(const unsigned char* pat) { |
499 |
|
Init(reinterpret_cast<const char*>(pat), NULL); |
500 |
|
} |
501 |
|
RE(const unsigned char* pat, const RE_Options& option) { |
502 |
|
Init(reinterpret_cast<const char*>(pat), &option); |
503 |
|
} |
504 |
|
|
505 |
// Copy constructor & assignment - note that these are expensive |
// Copy constructor & assignment - note that these are expensive |
506 |
// because they recompile the expression. |
// because they recompile the expression. |