Skip to content

Commit b790f6d

Browse files
committed
Correct casting to pointer instead of reference
1 parent fd0c99d commit b790f6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/cpp2util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ auto is( X const& x ) -> bool {
539539
template< typename C, typename X >
540540
requires (std::is_base_of_v<X, C> && !std::is_same_v<C,X>)
541541
auto is( X const* x ) -> bool {
542-
return dynamic_cast<C const&>(x) != nullptr;
542+
return dynamic_cast<C const*>(x) != nullptr;
543543
}
544544

545545
template< typename C, typename X >

0 commit comments

Comments
 (0)