Skip to content

Commit

Permalink
fix some warnings due to c++17 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
silverweed committed Sep 8, 2024
1 parent b3fb962 commit ee859ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/EntityGroup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class EntityGroup final : private sf::NonCopyable {

template<typename F, typename...Args,
typename std::enable_if<std::is_same<
typename std::result_of<F(lif::Entity&, Args&&...)>::type, bool>::value,
typename std::invoke_result<F(lif::Entity&, Args&&...)>::type, bool>::value,
std::nullptr_t>::type = nullptr>
void apply(const F& func, Args&&... args) {
for (auto& e : entities)
Expand All @@ -92,7 +92,7 @@ class EntityGroup final : private sf::NonCopyable {
/** Applies a function to all entities. */
template<typename F, typename...Args,
typename std::enable_if<std::is_same<
typename std::result_of<F(lif::Entity&, Args&&...)>::type, void>::value,
typename std::invoke_result<F, lif::Entity&, Args&&...>::type, void>::value,
std::nullptr_t>::type = nullptr>
void apply(const F& func, Args&&... args) {
for (auto& e : entities)
Expand All @@ -102,7 +102,7 @@ class EntityGroup final : private sf::NonCopyable {
/** @see apply */
template<typename F, typename...Args,
typename std::enable_if<std::is_same<
typename std::result_of<F(lif::Entity&, Args&&...)>::type, bool>::value,
typename std::invoke_result<F, lif::Entity&, Args&&...>::type, bool>::value,
std::nullptr_t>::type = nullptr>
void apply(const F& func, Args&&... args) const {
for (const auto& e : entities)
Expand All @@ -113,7 +113,7 @@ class EntityGroup final : private sf::NonCopyable {
/** @see apply */
template<typename F, typename...Args,
typename std::enable_if<std::is_same<
typename std::result_of<F(lif::Entity&, Args&&...)>::type, void>::value,
typename std::invoke_result<F, lif::Entity&, Args&&...>::type, void>::value,
std::nullptr_t>::type = nullptr>
void apply(const F& func, Args&&... args) const {
for (const auto& e : entities)
Expand Down

0 comments on commit ee859ac

Please sign in to comment.