Skip to content

Commit 2544971

Browse files
committed
Clang still not quite happy
1 parent 57f31fd commit 2544971

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

samples/star_wars/DroidData.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ void Droid::addFriends(
3232
[](const auto& spFriend) noexcept {
3333
return std::visit(
3434
[](const auto& hero) noexcept {
35-
return WeakHero { std::weak_ptr<std::decay_t<decltype(hero)>::element_type> {
36-
hero } };
35+
return WeakHero {
36+
std::weak_ptr<typename std::decay_t<decltype(hero)>::element_type> { hero }
37+
};
3738
},
3839
spFriend);
3940
});

samples/star_wars/HumanData.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ void Human::addFriends(std::vector<SharedHero> friends) noexcept
3131
[](const auto& spFriend) noexcept {
3232
return std::visit(
3333
[](const auto& hero) noexcept {
34-
return WeakHero { std::weak_ptr<std::decay_t<decltype(hero)>::element_type> {
35-
hero } };
34+
return WeakHero {
35+
std::weak_ptr<typename std::decay_t<decltype(hero)>::element_type> { hero }
36+
};
3637
},
3738
spFriend);
3839
});

0 commit comments

Comments
 (0)