Last active
September 14, 2020 14:18
-
-
Save mikeplavsky/255497fdf13d43ede8a826ab004a9b09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://coliru.stacked-crooked.com/a/9d4b378072bef35d