File tree Expand file tree Collapse file tree 2 files changed +62
-62
lines changed Expand file tree Collapse file tree 2 files changed +62
-62
lines changed Original file line number Diff line number Diff line change 21
21
// / \tparam T The exprt-derived class to check for
22
22
// / \param base Reference to a generic \ref exprt
23
23
// / \return true if \a base is of type \a T
24
- template <typename T> bool check_expr_type (const exprt &base);
24
+ template <typename T> bool can_cast_expr (const exprt &base);
25
25
26
26
27
27
// / \brief Cast a constant pointer to a generic exprt to a specific derived
@@ -70,7 +70,7 @@ T expr_dynamic_cast(TExpr *base)
70
70
" The template argument T must be derived from exprt." );
71
71
if (base == nullptr )
72
72
return nullptr ;
73
- if (!check_expr_type <TUnderlying>(*base))
73
+ if (!can_cast_expr <TUnderlying>(*base))
74
74
return nullptr ;
75
75
T value=static_cast <T>(base);
76
76
validate_expr (*value);
@@ -121,7 +121,7 @@ T expr_dynamic_cast(TExpr &base)
121
121
static_assert (
122
122
std::is_base_of<exprt, TUnderlying>::value,
123
123
" The template argument T must be derived from exprt." );
124
- if (!check_expr_type <TUnderlying>(base))
124
+ if (!can_cast_expr <TUnderlying>(base))
125
125
throw std::bad_cast ();
126
126
T value=static_cast <T>(base);
127
127
validate_expr (value);
You can’t perform that action at this time.
0 commit comments