From dabba45ff69eb6c659a80debfd1604b0cf904a6b Mon Sep 17 00:00:00 2001 From: Paul Wankadia Date: Thu, 28 Jan 2021 09:18:31 -0800 Subject: [PATCH] Use `static_cast<>` instead of a C-style cast. Fixes #287. Change-Id: I8b67c0b5088bb1a06a47017528bfd8e6f1ec4cca Reviewed-on: https://code-review.googlesource.com/c/re2/+/58230 Reviewed-by: Paul Wankadia --- re2/re2.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/re2/re2.h b/re2/re2.h index 15ef0b3f7..09c1fbeb2 100644 --- a/re2/re2.h +++ b/re2/re2.h @@ -830,8 +830,9 @@ class RE2::Arg { #if !defined(_MSC_VER) template using CanParseFrom = typename std::enable_if< - std::is_member_function_pointer::value, + std::is_member_function_pointer< + decltype(static_cast( + &T::ParseFrom))>::value, int>::type; #endif