diff --git a/Siv3D/include/Siv3D/detail/Indexed.ipp b/Siv3D/include/Siv3D/detail/Indexed.ipp index ae1110013..c07479d80 100644 --- a/Siv3D/include/Siv3D/detail/Indexed.ipp +++ b/Siv3D/include/Siv3D/detail/Indexed.ipp @@ -20,11 +20,13 @@ namespace s3d struct Iterator { + using value_type = std::tuple::value_type>; + using reference = std::tuple())>; size_t index; It it; constexpr bool operator != (const Iterator& other) const { return it != other.it; } constexpr void operator ++() { ++index; ++it; } - constexpr auto operator *() const { return std::tie(index, *it); } + constexpr auto operator *() const { return reference{ index, *it }; } }; struct IterableWrapper @@ -48,11 +50,13 @@ namespace s3d { struct Iterator { + using value_type = std::tuple::value_type>; + using reference = std::tuple())>; size_t index; It it; constexpr bool operator != (const Iterator& other) const { return it != other.it; } constexpr void operator ++() { --index; ++it; } - constexpr auto operator *() const { return std::tie(index, *it); } + constexpr auto operator *() const { return reference{ index, *it }; } }; struct IterableWrapper