repo.or.cz
/
rofl0r-df-libgraphics.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fix missing dlfcn.h include
[rofl0r-df-libgraphics.git]
/
g_src
/
bimap.h
blob
968f770bf129699e97ed95587ae637b38a9128bc
1
#ifndef BIMAP_H
2
#define BIMAP_H
3
4
#include <map>
5
6
template
<
typename A
,
typename B
>
7
struct
bimap
{
8
std
::
map
<
A
,
B
>
left
;
9
std
::
map
<
B
,
A
>
right
;
10
11
void
insert
(
A a
,
B b
) {
12
left
.
insert
(
std
::
pair
<
A
,
B
>(
a
,
b
));
13
right
.
insert
(
std
::
pair
<
B
,
A
>(
b
,
a
));
14
}
15
};
16
17
#endif