729 :
public boost::stl_interfaces::proxy_iterator_interface<
730#if !BOOST_STL_INTERFACES_USE_DEDUCED_THIS
733 std::random_access_iterator_tag,
737 using base_type = boost::stl_interfaces::proxy_iterator_interface<
738#if !BOOST_STL_INTERFACES_USE_DEDUCED_THIS
741 std::random_access_iterator_tag,
743 using difference_type = base_type::difference_type;
745 constexpr Iterator ()
noexcept =
default;
748 constexpr Iterator (std::span<const VariantType>::iterator it) noexcept
754 constexpr Iterator (std::span<const UuidRefType>::iterator it) noexcept
761 std::span<const UuidType>::iterator it,
762 const RegistryT * registry) noexcept
763 : it_var_ (std::pair{ it, registry })
767 constexpr VariantType operator* ()
const
771 using T = std::decay_t<
decltype (arg)>;
773 std::is_same_v<T, typename std::span<const VariantType>::iterator>)
778 std::is_same_v<T, typename std::span<const UuidRefType>::iterator>)
780 return arg->get_object ();
786 typename std::span<const UuidType>::iterator,
const RegistryT *>>)
788 return arg.second->find_by_id_or_throw (*arg.first);
794 constexpr Iterator &operator+= (difference_type n)
noexcept
798 using T = std::decay_t<
decltype (arg)>;
800 std::is_same_v<T, typename std::span<const VariantType>::iterator>)
805 std::is_same_v<T, typename std::span<const UuidRefType>::iterator>)
813 typename std::span<const UuidType>::iterator,
const RegistryT *>>)
822 constexpr difference_type operator- (Iterator other)
const
825 [] (
auto &&arg,
auto &&other_arg) -> difference_type {
826 using T = std::decay_t<
decltype (arg)>;
827 using OtherT = std::decay_t<
decltype (other_arg)>;
828 if constexpr (!std::is_same_v<T, OtherT>)
830 throw std::runtime_error (
831 "Comparing iterators of different types");
834 std::is_same_v<T, typename std::span<const VariantType>::iterator>)
836 return arg - other_arg;
839 std::is_same_v<T, typename std::span<const UuidRefType>::iterator>)
841 return arg - other_arg;
847 typename std::span<const UuidType>::iterator,
const RegistryT *>>)
849 return arg.first - other_arg.first;
856 it_var_, other.it_var_);
859 constexpr auto operator<=> (
const Iterator &other)
const
862 [] (
auto &&arg,
auto &&other_arg) -> std::strong_ordering {
863 using T = std::decay_t<
decltype (arg)>;
864 using OtherT = std::decay_t<
decltype (other_arg)>;
865 if constexpr (!std::is_same_v<T, OtherT>)
867 throw std::runtime_error (
868 "Comparing iterators of different types");
871 std::is_same_v<T, typename std::span<const VariantType>::iterator>)
873 return arg <=> other_arg;
876 std::is_same_v<T, typename std::span<const UuidRefType>::iterator>)
878 return arg <=> other_arg;
884 typename std::span<const UuidType>::iterator,
const RegistryT *>>)
886 return arg.first <=> other_arg.first;
890 return std::strong_ordering::equal;
893 it_var_, other.it_var_);
898 typename std::span<const VariantType>::iterator,
899 typename std::span<const UuidRefType>::iterator,
900 std::pair<typename std::span<const UuidType>::iterator,
const RegistryT *>>