|
|
@@ -6,6 +6,7 @@
|
|
|
#include <string_view>
|
|
|
#include <utility>
|
|
|
|
|
|
+#include <jvalidate/compat/hash.h>
|
|
|
#include <jvalidate/detail/anchor.h>
|
|
|
#include <jvalidate/detail/expect.h>
|
|
|
#include <jvalidate/detail/out.h>
|
|
|
@@ -158,3 +159,21 @@ public:
|
|
|
auto operator<=>(Reference const &) const = default;
|
|
|
};
|
|
|
}
|
|
|
+
|
|
|
+template <> struct std::hash<jvalidate::detail::RootReference> {
|
|
|
+ auto operator()(jvalidate::detail::RootReference const & value) const {
|
|
|
+ std::size_t seed = 0;
|
|
|
+ jvalidate::compat::hash_combine(seed, value.uri());
|
|
|
+ jvalidate::compat::hash_combine(seed, value.anchor());
|
|
|
+ return seed;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+template <> struct std::hash<jvalidate::detail::Reference> {
|
|
|
+ auto operator()(jvalidate::detail::Reference const & value) const {
|
|
|
+ std::size_t seed = 0;
|
|
|
+ jvalidate::compat::hash_combine(seed, value.root());
|
|
|
+ jvalidate::compat::hash_combine(seed, value.pointer());
|
|
|
+ return seed;
|
|
|
+ }
|
|
|
+};
|