aboutsummaryrefslogtreecommitdiff
path: root/re2/re2.h
diff options
context:
space:
mode:
authorPaul Wankadia <junyer@google.com>2015-04-10 02:28:27 +1000
committerPaul Wankadia <junyer@google.com>2015-04-09 17:32:59 +0000
commit9a3bcacc4e1fd91ad7c4234a083b7045b273f367 (patch)
tree2ed86171fe30b48c6211a54289238e3b9a522f1c /re2/re2.h
parente69f55cbdaa45e9fe5f8e4354146b3126ded2c11 (diff)
downloadregex-re2-9a3bcacc4e1fd91ad7c4234a083b7045b273f367.tar.gz
Add missing RE2::Arg constructor.
Fixes #4. Change-Id: Id5a118cbfb21e5ad2bfc1996093608ba93b9edd8 Reviewed-on: https://code-review.googlesource.com/2240 Reviewed-by: Russ Cox <rsc@swtch.com>
Diffstat (limited to 're2/re2.h')
-rw-r--r--re2/re2.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/re2/re2.h b/re2/re2.h
index f01c924..85a711f 100644
--- a/re2/re2.h
+++ b/re2/re2.h
@@ -797,12 +797,11 @@ class RE2::Arg {
#undef MAKE_PARSER
- // Generic constructor
- template <class T> Arg(T*, Parser parser);
- // Generic constructor template
+ // Generic constructor templates
template <class T> Arg(T* p)
- : arg_(p), parser_(_RE2_MatchObject<T>::Parse) {
- }
+ : arg_(p), parser_(_RE2_MatchObject<T>::Parse) { }
+ template <class T> Arg(T* p, Parser parser)
+ : arg_(p), parser_(parser) { }
// Parse the data
bool Parse(const char* str, int n) const;