-
-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathmain.cpp
More file actions
32 lines (28 loc) · 897 Bytes
/
main.cpp
File metadata and controls
32 lines (28 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifdef MODULES
# if !defined(ANKERL_UNORDERED_DENSE_STD_MODULE)
# if defined(__cpp_modules) && __cpp_modules >= 201907L && defined(__cpp_lib_modules) && __cpp_lib_modules >= 202207L
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
# define ANKERL_UNORDERED_DENSE_STD_MODULE 1
# else
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
# define ANKERL_UNORDERED_DENSE_STD_MODULE 0
# endif
# endif
# if ANKERL_UNORDERED_DENSE_STD_MODULE
import std;
# else
# include <iostream>
# endif
import ankerl.unordered_dense;
#else
# include <ankerl/unordered_dense.h>
# include <iostream>
#endif
auto main() -> int {
auto map = ankerl::unordered_dense::map<int, std::string>();
map[123] = "hello";
map[987] = "world!";
for (auto const& [key, val] : map) {
std::cout << key << " => " << val << std::endl;
}
}