Skip to content

Commit

Permalink
Use static_cast<> instead of a C-style cast.
Browse files Browse the repository at this point in the history
Fixes #287.

Change-Id: I8b67c0b5088bb1a06a47017528bfd8e6f1ec4cca
Reviewed-on: https://code-review.googlesource.com/c/re2/+/58230
Reviewed-by: Paul Wankadia <[email protected]>
  • Loading branch information
junyer committed Jan 28, 2021
1 parent c50caed commit dabba45
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions re2/re2.h
Original file line number Diff line number Diff line change
Expand Up @@ -830,8 +830,9 @@ class RE2::Arg {
#if !defined(_MSC_VER)
template <typename T>
using CanParseFrom = typename std::enable_if<
std::is_member_function_pointer<decltype(
(bool (T::*)(const char*, size_t))&T::ParseFrom)>::value,
std::is_member_function_pointer<
decltype(static_cast<bool (T::*)(const char*, size_t)>(
&T::ParseFrom))>::value,
int>::type;
#endif

Expand Down

0 comments on commit dabba45

Please sign in to comment.