summaryrefslogtreecommitdiff
path: root/CyteKit/RegEx.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'CyteKit/RegEx.hpp')
-rw-r--r--CyteKit/RegEx.hpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/CyteKit/RegEx.hpp b/CyteKit/RegEx.hpp
index 8892a3e..40068a7 100644
--- a/CyteKit/RegEx.hpp
+++ b/CyteKit/RegEx.hpp
@@ -58,14 +58,18 @@ class RegEx {
{
}
- RegEx(const char *regex, NSString *data = nil) :
+ RegEx(const char *regex) :
regex_(NULL),
size_(_not(size_t))
{
this->operator =(regex);
+ }
- if (data != nil)
- this->operator ()(data);
+ template <typename Type_>
+ RegEx(const char *regex, const Type_ &data) :
+ RegEx(regex)
+ {
+ this->operator ()(data);
}
void operator =(const char *regex) {