File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ void Droid::addFriends(
32
32
[](const auto & spFriend) noexcept {
33
33
return std::visit (
34
34
[](const auto & hero) noexcept {
35
- return WeakHero { std::weak_ptr { hero } };
35
+ return WeakHero { std::weak_ptr<std::decay_t <decltype (hero)>::element_type> {
36
+ hero } };
36
37
},
37
38
spFriend);
38
39
});
Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ void Human::addFriends(std::vector<SharedHero> friends) noexcept
31
31
[](const auto & spFriend) noexcept {
32
32
return std::visit (
33
33
[](const auto & hero) noexcept {
34
- return WeakHero { std::weak_ptr { hero } };
34
+ return WeakHero { std::weak_ptr<std::decay_t <decltype (hero)>::element_type> {
35
+ hero } };
35
36
},
36
37
spFriend);
37
38
});
You can’t perform that action at this time.
0 commit comments