From 10afd2aa0a35b45300cfb60bea656edf08c2b78c Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 11 Jun 2022 23:06:04 +0200 Subject: refactor: make tuple indices gcc compatible --- include/yacppdic/detail/internal/tuple_indices.hpp | 28 ++++++++++------------ 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/include/yacppdic/detail/internal/tuple_indices.hpp b/include/yacppdic/detail/internal/tuple_indices.hpp index 3a367b6..f2308e6 100644 --- a/include/yacppdic/detail/internal/tuple_indices.hpp +++ b/include/yacppdic/detail/internal/tuple_indices.hpp @@ -11,29 +11,27 @@ class TupleIndices }; template -class IntegerSequence +class TupleIndicesIntSequence { public: - template < - template - typename ToIndexSeq, - typename ToIndexType> - using Convert = ToIndexSeq; - template using ToTupleIndices = TupleIndices<(Values + Sp)...>; }; -template -using MakeIndices = - typename __make_integer_seq:: - template ToTupleIndices; - -template -requires(SizeTwo <= SizeOne) class MakeTupleIndices +template +using MakeIndices = typename +#if __has_builtin(__make_integer_seq) + __make_integer_seq +#else + TupleIndicesIntSequence +#endif + ::template ToTupleIndices; + +template +requires(StartIndex <= EndIndex) class MakeTupleIndices { public: - using type = MakeIndices; + using type = MakeIndices; }; } // namespace yacppdic::internal -- cgit v1.2.3-18-g5258