mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 08:34:39 +08:00
issue #67
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#define PHMAP_BIDIRECTIONAL 1
|
||||
#include <parallel_hashmap/phmap.h>
|
||||
|
||||
using phmap::flat_hash_map;
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
@@ -18,6 +20,20 @@ int main()
|
||||
|
||||
// and print it
|
||||
std::cout << "bill's email is: " << email["bill"] << "\n";
|
||||
|
||||
phmap::flat_hash_set<int> v1 { 1, 2, 3, 4, 5 };
|
||||
|
||||
for (auto x : v1)
|
||||
cout << (x) << " ";
|
||||
|
||||
auto i1 = v1.end();
|
||||
for ( ;i1 != v1.begin(); --i1)
|
||||
{
|
||||
if (i1 != v1.end())
|
||||
cout << (*i1) << " ";
|
||||
}
|
||||
if (i1 != v1.end())
|
||||
cout << (*i1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user