Skip to content

Commit

Permalink
table: a bunch of fixes (thanks msvc for accepting invalid code)
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Apr 22, 2024
1 parent a89d1a8 commit 736b0fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/entt/entity/table.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ struct table_iterator {
constexpr table_iterator(It... from) noexcept
: it{from...} {}

template<typename... Other, typename = std::enable_if_t<std::is_constructible_v<It, Other>...>>
template<typename... Other, typename = std::enable_if_t<(std::is_constructible_v<It, Other> && ...)>>
constexpr table_iterator(const table_iterator<Other...> &other) noexcept
: table_iterator{std::get<Other>(other.it)...} {}

constexpr table_iterator &operator++() noexcept {
return (++std::get<It>(it)..., *this);
return (++std::get<It>(it), ...), *this;
}

constexpr table_iterator operator++(int) noexcept {
Expand All @@ -52,7 +52,7 @@ struct table_iterator {
}

constexpr table_iterator &operator--() noexcept {
return (--std::get<It>(it)..., *this);
return (--std::get<It>(it), ...), *this;
}

constexpr table_iterator operator--(int) noexcept {
Expand All @@ -61,7 +61,7 @@ struct table_iterator {
}

constexpr table_iterator &operator+=(const difference_type value) noexcept {
return ((std::get<It>(it) += value)..., *this);
return ((std::get<It>(it) += value), ...), *this;
}

constexpr table_iterator operator+(const difference_type value) const noexcept {
Expand Down

0 comments on commit 736b0fe

Please sign in to comment.