diff --git a/re2/re2.h b/re2/re2.h index 7ea44e044..13bf39fbe 100644 --- a/re2/re2.h +++ b/re2/re2.h @@ -890,14 +890,12 @@ class RE2::Arg { re2_internal::Parse4ary::value, int>::type; -#if !defined(_MSC_VER) template using CanParseFrom = typename std::enable_if< std::is_member_function_pointer< decltype(static_cast( &T::ParseFrom))>::value, int>::type; -#endif public: Arg() : Arg(nullptr) {} @@ -909,10 +907,8 @@ class RE2::Arg { template = 0> Arg(T* ptr) : arg_(ptr), parser_(DoParse4ary) {} -#if !defined(_MSC_VER) template = 0> Arg(T* ptr) : arg_(ptr), parser_(DoParseFrom) {} -#endif typedef bool (*Parser)(const char* str, size_t n, void* dest); @@ -938,13 +934,11 @@ class RE2::Arg { return re2_internal::Parse(str, n, reinterpret_cast(dest), 10); } -#if !defined(_MSC_VER) template static bool DoParseFrom(const char* str, size_t n, void* dest) { if (dest == NULL) return true; return reinterpret_cast(dest)->ParseFrom(str, n); } -#endif void* arg_; Parser parser_; diff --git a/re2/testing/re2_arg_test.cc b/re2/testing/re2_arg_test.cc index 4b00be358..78d4aee43 100644 --- a/re2/testing/re2_arg_test.cc +++ b/re2/testing/re2_arg_test.cc @@ -135,7 +135,6 @@ TEST(RE2ArgTest, Uint64Test) { } TEST(RE2ArgTest, ParseFromTest) { -#if !defined(_MSC_VER) struct { bool ParseFrom(const char* str, size_t n) { LOG(INFO) << "str = " << str << ", n = " << n; @@ -155,7 +154,6 @@ TEST(RE2ArgTest, ParseFromTest) { } obj2; RE2::Arg arg2(&obj2); EXPECT_FALSE(arg2.Parse("two", 3)); -#endif } TEST(RE2ArgTest, OptionalDoubleTest) {