> I think you have done all the wording before you've come up with any use-cases, and I think that's a problem
The use cases are exactly the same as they are for restrict in C, which I assume you’re familiar with.
> void foo(disjoint int *r, disjoint int *s);
> int a, b;
> foo(&a, &b);
> you're telling me that that wouldn't compile?
Correct, that would not compile. You would need to declare a and b like this instead:
disjoint int a, b;
> disjoint int *p1 = ...;
> auto p2 = p1;
> static_assert(std::same_as<decltype(p1), decltype(p2)>); // ???
> If p2's type is the same as p1's, then they're both `disjoint int *` — and so you have two `disjoint int *` objects that point to the same place.
Yes, p1 and p2 both have type ‘disjoint int *’, and they both point to the same object. It is the programmer’s responsibility to use such pointers correctly, exactly the same as it would be with restrict, but with the added type safety that disjoint allows.