425 template<
typename...
TYPES>
432 template<
typename...
TYPES>
434 : std::integral_constant<std::size_t, sizeof...(TYPES)> {};
447 template<std::size_t I,
typename... TYPES>
448 struct tuple_element<I,
original::tuple<TYPES...>> {
449 using type = std::tuple_element_t<I, std::tuple<TYPES...>>;
460 template<std::size_t I,
typename... TYPES>
471 template<std::size_t I,
typename... TYPES>
482 template<std::size_t I,
typename... TYPES>
486template <
typename ... TYPES>
487template <original::u_
integer I,
typename T>
489 : cur_elem(
std::forward<T>(cur)) {}
491template<
typename... TYPES>
492template<original::u_
integer I,
typename T>
494 : cur_elem(std::move(other.cur_elem)) {}
496template<
typename... TYPES>
497template<original::u_
integer I,
typename T>
499 : cur_elem(other.cur_elem) {}
501template<
typename... TYPES>
502template<original::u_
integer I,
typename T>
507 cur_elem = std::move(other.cur_elem);
511template <
typename ... TYPES>
512template <original::u_
integer I,
typename T>
518 std::swap(this->cur_elem, other.cur_elem);
521template<
typename... TYPES>
522template<original::u_
integer I,
typename T>
523template<original::u_
integer I_DIFF>
525 staticError<outOfBoundError, (I_DIFF > 0)>::asserts();
530template<
typename... TYPES>
531template<original::u_
integer I,
typename T>
532template<original::u_
integer I_DIFF>
534 staticError<outOfBoundError, (I_DIFF > 0)>::asserts();
539template<
typename... TYPES>
540template<original::u_
integer I,
typename T>
541template<original::u_
integer I_DIFF,
typename E>
543 staticError<outOfBoundError, (I_DIFF > 0)>::asserts();
544 staticError<valueError, !std::is_convertible_v<E, T>>::asserts();
546 cur_elem =
static_cast<T
>(e);
549template<
typename... TYPES>
550template<original::u_
integer I,
typename T>
553 if constexpr (Comparable<T>){
554 if (cur_elem != other.cur_elem)
555 return cur_elem < other.cur_elem ? -1 : 1;
560template<
typename... TYPES>
561template<original::u_
integer I,
typename T>
563 std::stringstream ss;
564 if constexpr (I != 0)
566 ss << formatString(cur_elem);
570template <
typename ... TYPES>
571template <original::u_
integer I,
typename T,
typename TS>
573 : cur_elem(
std::forward<T>(cur)), next(
std::forward<TS>(next_elems)) {}
575template<
typename... TYPES>
576template<original::u_
integer I,
typename T,
typename TS>
578 : cur_elem(std::move(other.cur_elem)), next(std::move(other.next)) {}
580template<
typename... TYPES>
581template<original::u_
integer I,
typename T,
typename TS>
583 : cur_elem(other.cur_elem), next(other.next) {}
585template<
typename... TYPES>
586template<original::u_
integer I,
typename T,
typename TS>
588 tupleImpl&& other)
noexcept -> tupleImpl&
592 cur_elem = std::move(other.cur_elem);
593 next = std::move(other.next);
597template <
typename ... TYPES>
598template <original::u_
integer I,
typename T,
typename TS>
604 std::swap(this->cur_elem, other.cur_elem);
605 this->next.swap(other.next);
608template<
typename... TYPES>
609template<original::u_
integer I,
typename T,
typename TS>
610template<original::u_
integer I_DIFF>
612 if constexpr (I_DIFF == 0){
615 return next.template
get<I_DIFF - 1>();
619template<
typename... TYPES>
620template<original::u_
integer I,
typename T,
typename TS>
621template<original::u_
integer I_DIFF>
623 if constexpr (I_DIFF == 0){
626 return next.template
get<I_DIFF - 1>();
630template<
typename... TYPES>
631template<original::u_
integer I,
typename T,
typename TS>
632template<original::u_
integer I_DIFF,
typename E>
634 if constexpr (I_DIFF == 0){
635 staticError<valueError, !std::is_convertible_v<E, T>>::asserts();
637 cur_elem =
static_cast<T
>(e);
639 next.template set<I_DIFF - 1,
E>(e);
643template<
typename... TYPES>
644template<original::u_
integer I,
typename T,
typename TS>
646 const tupleImpl& other)
const ->
integer
648 if constexpr (Comparable<T>){
649 if (cur_elem != other.cur_elem)
650 return cur_elem < other.cur_elem ? -1 : 1;
655template<
typename... TYPES>
656template<original::u_
integer I,
typename T,
typename TS>
658 std::stringstream ss;
659 if constexpr (I != 0)
661 ss << formatString(cur_elem);
662 ss << formatString(next);
666template <
typename ... TYPES>
669 : cur_elem(
std::forward<T>(cur)), next(
std::forward<TS>(next_elems)...) {}
671template<
typename... TYPES>
674 : cur_elem(cur), next(nt) {}
676template<
typename... TYPES>
679 : cur_elem(std::move(other.cur_elem)), next(std::move(other.next)) {}
681template<
typename... TYPES>
684 : cur_elem(other.cur_elem), next(other.next) {}
686template<
typename... TYPES>
689 tupleImpl&& other)
noexcept -> tupleImpl&
693 cur_elem = std::move(other.cur_elem);
694 next = std::move(other.next);
698template <
typename ... TYPES>
705 std::swap(this->cur_elem, other.cur_elem);
706 this->next.swap(other.next);
709template<
typename... TYPES>
711template<original::u_
integer I_DIFF>
713 if constexpr (I_DIFF == 0){
716 return next.template
get<I_DIFF - 1>();
720template<
typename... TYPES>
722template<original::u_
integer I_DIFF>
724 if constexpr (I_DIFF == 0){
727 return next.template
get<I_DIFF - 1>();
731template<
typename... TYPES>
733template<original::u_
integer I_DIFF,
typename E>
735 if constexpr (I_DIFF == 0){
736 staticError<valueError, !std::is_convertible_v<E, T>>::asserts();
738 cur_elem =
static_cast<T
>(e);
740 next.template set<I_DIFF - 1,
E>(e);
744template<
typename... TYPES>
748 if constexpr (Comparable<T>){
749 if (cur_elem != other.cur_elem)
750 return cur_elem < other.cur_elem ? -1 : 1;
752 return next.compareTo(other.next);
755template<
typename... TYPES>
758 std::stringstream ss;
759 if constexpr (I != 0)
761 ss << formatString(cur_elem);
762 ss << formatString(next);
766template<
typename... TYPES>
769 std::integral_constant<u_integer, BEGIN_IDX>)
const {
770 return tuple<
decltype(this->get<BEGIN_IDX + IDX_S>())...>(this->get<BEGIN_IDX + IDX_S>()...);
773template<
typename... TYPES>
777 indexSequence<T_SIZE...>,
778 indexSequence<O_SIZE...>)
const {
779 return tuple<TYPES..., O_TYPES...>{TYPES(this->get<T_SIZE>())..., O_TYPES(other.template get<O_SIZE>())...};
782template <
typename ... TYPES>
786template<
typename...
TYPES>
789template<
typename...
TYPES>
791 if (
this == &
other)
return *
this;
792 this->elems =
other.elems;
796template<
typename...
TYPES>
798 : elems(std::move(
other.elems)) {}
800template<
typename...
TYPES>
802 if (
this == &
other)
return *
this;
803 this->elems = std::move(
other.elems);
807template <
typename ...
TYPES>
816template<
typename...
TYPES>
821template<
typename... TYPES>
822template<original::u_
integer IDX>
827template<
typename...
TYPES>
828template<original::u_
integer IDX>
833template<
typename...
TYPES>
834template<original::u_
integer IDX,
typename E>
840template<
typename... TYPES>
841template<original::u_
integer BEGIN_IDX, original::u_
integer N_ELEMS>
847 std::make_integer_sequence<u_integer, N_ELEMS>{},
848 std::integral_constant<u_integer, BEGIN_IDX>{}
852template<
typename...
TYPES>
854 return elems.compareTo(
other.elems);
857template<
typename... TYPES>
859 std::stringstream
ss;
860 ss << this->className();
861 ss <<
"(" << elems <<
")";
865template<
typename...
TYPES>