Skip to content

Instantly share code, notes, and snippets.

@mikeplavsky
Last active September 14, 2020 14:18
Show Gist options
  • Save mikeplavsky/255497fdf13d43ede8a826ab004a9b09 to your computer and use it in GitHub Desktop.
Save mikeplavsky/255497fdf13d43ede8a826ab004a9b09 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;
struct Lake {
string name;
};
struct Distance{};
int main() {
unordered_map<Lake, Distance> ls = {
{Lake{"Near"},Distance()},
{Lake{"Far"},Distance()}};
for (auto [k,_]: ls) {
cout << k << '\n';
}
}
@mikeplavsky
Copy link
Author

mikeplavsky commented Sep 5, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment