#include <set>
#include <string>
#include <iostream>

struct test {
    std::string key;
    std::string data;
};

bool operator<(const test& t, const std::string& str) { return t.key < str; }
bool operator<(const std::string& str, const test& t) { return str < t.key; }
bool operator<(const test& t1, const test& t2) { return t1.key < t2.key; }
std::set<test, std::less<>> s;

int main() {
    test newmember;
    newmember.key = "key";
    newmember.data = "data";
    s.insert(newmember);

    auto it = s.find("key");
    std::cout << it->key << ", " << it->data << std::endl;

	return 0;
}