mirror of
https://github.com/boostorg/openmethod.git
synced 2026-01-19 04:22:12 +00:00
virtual_shared_ptr: fix static/dynamic cast detection
This commit is contained in:
@@ -103,7 +103,8 @@ struct virtual_traits<std::shared_ptr<Class>, Policy> {
|
||||
|
||||
check_cast<Other>();
|
||||
|
||||
if constexpr (detail::requires_dynamic_cast<Class*, Other>) {
|
||||
if constexpr (detail::requires_dynamic_cast<
|
||||
Class*, typename Other::element_type*>) {
|
||||
return std::dynamic_pointer_cast<
|
||||
typename shared_ptr_traits<Other>::virtual_type>(obj);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user