You have a type which is a coordinate. If you were writing this type from scratch, there are many things from `pair` you wouldn't add. Not because they're time consuming, but because they're not appropriate for `coord_t`.
For example, what good is the piecewise constructor for `pair` in this case? Do you honestly expect users to pass two tuples when creating a `coord_t`? No; it's a pointless interface. It adds nothing useful to the type.
But there are worse issues in this regard. Take the less/greater comparison operators. It makes absolutely no sense to even
ask the question of whether one `coord_t` is less than another. Yet your `pair`-based object provides exactly that. This is not just confusing to the user; it is actively dangerous. It gives the impression that it is reasonable to order `coord_t` objects, when it probably isn't. And even if it is, do you really want them ordered this way? Or do you want to order them in some other way?
So at best, what you've done is made a type that has a poor interface, one with more functions than is actually needed. At worse, you've made a type that has a
misleading interface.
Whereas given the various proposals for automatic "product type" and equality operator generation, you would get a far better object with a better interface, just by doing this:
struct coord_t {int x; int y;};