Fix missing deduction guides for weak_ptr
This commit is contained in:
parent
2b8814e472
commit
773bfc6971
1 changed files with 3 additions and 1 deletions
|
|
@ -183,7 +183,9 @@ namespace psemek::ui
|
|||
|
||||
void rich_image_view::post_region_changed()
|
||||
{
|
||||
auto weak_self = std::weak_ptr{std::dynamic_pointer_cast<rich_image_view>(shared_from_this())};
|
||||
// Clang-12.0.0 doesn't have deduction guides for weak_ptr
|
||||
auto self = std::dynamic_pointer_cast<rich_image_view>(shared_from_this());
|
||||
auto weak_self = std::weak_ptr<rich_image_view>{self};
|
||||
post([weak_self]{
|
||||
auto self = weak_self.lock();
|
||||
if (!self) return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue