#include <map>
#include <string>
#include <tuple>
#include <iostream>

struct myStruct {  int x, y; };
using Key =  std::pair<std::string, std::string>;

namespace something
{
    struct Compare
    {
        bool operator()(const Key& lhs, const Key& rhs) const
        {
            // do the required comparison here
            return std::tie(lhs.first, lhs.second) < std::tie(rhs.first, rhs.second);
        }
    };
}
using myMap = std::map<Key, myStruct, something::Compare>;

int main()
{
	myMap mp =
	{
		{ { "name1", "name2" },{ 3,4 } },
		{ { "aame1", "name2" },{ 8,4 } },
		{ std::make_pair("fame1", "name2"),{ 2,4 } }, // or make pair
		{ std::make_pair("fame1", "bame2"),{ 1,2 } }
	};

	for(const auto& it: mp)
    {
        std::cout << it.first.first << " " << it.first.second << " "
                 << it.second.x << " " << it.second.y << std::endl;
    }

	return 0;
}
