#include <vector>
#include <algorithm>
template <class ED>
struct EdgeData1 {
bool operator< (const EdgeData1<ED>& other) const { return indexTo < other.indexTo; }
int indexTo;
ED edgeData;
};
template <class ED>
struct EdgeData2 {
int indexTo;
ED edgeData;
};
template <class ED>
bool operator<(const EdgeData2<ED>& l, const EdgeData2<ED>& r) { return l.indexTo < r.indexTo; }
std::vector<EdgeData1<int>> v1;
std::vector<EdgeData2<int>> v2;
int main() {
std::is_sorted(cbegin(v1), cend(v1));
std::is_sorted(cbegin(v2), cend(v2));
}
ICAgICNpbmNsdWRlIDx2ZWN0b3I+CiAgICAjaW5jbHVkZSA8YWxnb3JpdGhtPgogICAgIAogICAgdGVtcGxhdGUgPGNsYXNzIEVEPgogICAgc3RydWN0IEVkZ2VEYXRhMSB7CiAgICAgICAgYm9vbCBvcGVyYXRvcjwgKGNvbnN0IEVkZ2VEYXRhMTxFRD4mIG90aGVyKSBjb25zdCB7IHJldHVybiBpbmRleFRvIDwgb3RoZXIuaW5kZXhUbzsgfSAKICAgICAgICBpbnQgaW5kZXhUbzsKICAgICAgICBFRCBlZGdlRGF0YTsKICAgIH07CiAgICAgCiAgICB0ZW1wbGF0ZSA8Y2xhc3MgRUQ+CiAgICBzdHJ1Y3QgRWRnZURhdGEyIHsKICAgICAgICBpbnQgaW5kZXhUbzsKICAgICAgICBFRCBlZGdlRGF0YTsKICAgIH07CiAgICB0ZW1wbGF0ZSA8Y2xhc3MgRUQ+CiAgICBib29sIG9wZXJhdG9yPChjb25zdCBFZGdlRGF0YTI8RUQ+JiBsLCBjb25zdCBFZGdlRGF0YTI8RUQ+JiByKSB7IHJldHVybiBsLmluZGV4VG8gPCByLmluZGV4VG87IH0KICAgICAKICAgIHN0ZDo6dmVjdG9yPEVkZ2VEYXRhMTxpbnQ+PiB2MTsKICAgIHN0ZDo6dmVjdG9yPEVkZ2VEYXRhMjxpbnQ+PiB2MjsKICAgICAKICAgIGludCBtYWluKCkgewogICAgICAgIHN0ZDo6aXNfc29ydGVkKGNiZWdpbih2MSksIGNlbmQodjEpKTsKICAgICAgICBzdGQ6OmlzX3NvcnRlZChjYmVnaW4odjIpLCBjZW5kKHYyKSk7CiAgICB9