#include <vector>
#include <set>
#include <algorithm>
struct point // A simple custom point structure
{
int x, y;
};
// Operator created by the wizard
// --------------------------------------------------
inline bool operator< (const point &left, const point &right)
{
if (left.x == right.x)
return (left.y < right.y);
else
return (left.x < right.x);
}
// --------------------------------------------------
int main()
{
std::vector<point> v;
std::sort(v.begin(), v.end()); //Compiles happily with point structures
std::set<point> s;
s.find(point()); //Compiles happily with point structures
return 0;
}
I2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPHNldD4KCiNpbmNsdWRlIDxhbGdvcml0aG0+CgpzdHJ1Y3QgcG9pbnQgLy8gQSBzaW1wbGUgY3VzdG9tIHBvaW50IHN0cnVjdHVyZQp7CiAgICBpbnQgeCwgeTsKfTsKCi8vIE9wZXJhdG9yIGNyZWF0ZWQgYnkgdGhlIHdpemFyZAovLyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQoKaW5saW5lIGJvb2wgb3BlcmF0b3I8IChjb25zdCBwb2ludCAmbGVmdCwgY29uc3QgcG9pbnQgJnJpZ2h0KQp7CglpZiAobGVmdC54ID09IHJpZ2h0LngpCgkJcmV0dXJuIChsZWZ0LnkgPCByaWdodC55KTsKCWVsc2UKCQlyZXR1cm4gKGxlZnQueCA8IHJpZ2h0LngpOwp9CgovLyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQoKaW50IG1haW4oKQp7CglzdGQ6OnZlY3Rvcjxwb2ludD4gdjsKCXN0ZDo6c29ydCh2LmJlZ2luKCksIHYuZW5kKCkpOyAvL0NvbXBpbGVzIGhhcHBpbHkgd2l0aCBwb2ludCBzdHJ1Y3R1cmVzCgkKCXN0ZDo6c2V0PHBvaW50PiBzOwoJcy5maW5kKHBvaW50KCkpOyAvL0NvbXBpbGVzIGhhcHBpbHkgd2l0aCBwb2ludCBzdHJ1Y3R1cmVzCgkKCXJldHVybiAwOwp9