|
|
@@ -46,17 +46,7 @@ struct distance_to<T, std::enable_if_t<has_distance_to<T>{}>> {
|
|
|
using type = decltype(_val(T).distance_to(_val(T)));
|
|
|
};
|
|
|
|
|
|
-template <typename, typename = void> struct sentinal_type {
|
|
|
- using type = void;
|
|
|
-};
|
|
|
-
|
|
|
-template <typename T>
|
|
|
-struct sentinal_type<T, std::void_t<typename T::sentinal_type>> {
|
|
|
- using type = typename T::sentinal_type;
|
|
|
-};
|
|
|
-
|
|
|
template <typename T> using distance_to_t = typename distance_to<T>::type;
|
|
|
-template <typename T> using sentinal_type_t = typename sentinal_type<T>::type;
|
|
|
template <typename T> constexpr bool has_equal_to_v = has_equal_to<T>{};
|
|
|
template <typename T> constexpr bool has_distance_to_v = has_distance_to<T>{};
|
|
|
template <typename T> constexpr bool has_increment_v = has_increment<T>{};
|
|
|
@@ -91,10 +81,6 @@ template <typename D, typename T>
|
|
|
using difference_type_arg_t =
|
|
|
std::enable_if_t<std::is_convertible_v<D, detail::distance_to_t<T>>>;
|
|
|
|
|
|
-template <typename D, typename T>
|
|
|
-using sentinal_type_arg_t =
|
|
|
- std::enable_if_t<std::is_same_v<D, detail::sentinal_type_t<T>>>;
|
|
|
-
|
|
|
template <typename self_type> class facade {
|
|
|
public:
|
|
|
decltype(auto) operator*() const { return self().dereference(); }
|
|
|
@@ -195,16 +181,6 @@ public:
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- template <typename S, typename = sentinal_type_arg_t<S, self_type>>
|
|
|
- friend auto operator==(self_type self, S) {
|
|
|
- return self.at_end();
|
|
|
- }
|
|
|
-
|
|
|
- template <typename S, typename = sentinal_type_arg_t<S, self_type>>
|
|
|
- friend auto operator!=(self_type self, S) {
|
|
|
- return !self.at_end();
|
|
|
- }
|
|
|
-
|
|
|
friend bool operator!=(self_type const & left, self_type const & right) {
|
|
|
return !(left == right);
|
|
|
}
|