From c7b7aacdcd74278516cabd99b7870e5345d5970f Mon Sep 17 00:00:00 2001
From: yaito3014 <ykakeyama3014@gmail.com>
Date: Thu, 18 Jul 2024 17:15:11 +0900
Subject: [PATCH] fix Indexed

---
 Siv3D/include/Siv3D/detail/Indexed.ipp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

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<size_t, typename std::iterator_traits<It>::value_type>;
+			using reference = std::tuple<size_t, decltype(*std::declval<It&>())>;
 			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<size_t, typename std::iterator_traits<It>::value_type>;
+			using reference = std::tuple<size_t, decltype(*std::declval<It&>())>;
 			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