aboutsummaryrefslogtreecommitdiff
path: root/pair.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-02-21 19:57:31 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-02-22 12:43:06 +0100
commit329e3092542067f3a99fda328a8118e8d024e054 (patch)
treec1ccf987b3a616a46405cd7f788b4bc78767f7bf /pair.h
parentFix c++ compile warnings. (diff)
downloadcalp-329e3092542067f3a99fda328a8118e8d024e054.tar.gz
calp-329e3092542067f3a99fda328a8118e8d024e054.tar.xz
Build, but doesn't link.
Diffstat (limited to 'pair.h')
-rw-r--r--pair.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/pair.h b/pair.h
index e96cf180..1862a72d 100644
--- a/pair.h
+++ b/pair.h
@@ -1,19 +1,26 @@
#ifndef PAIR_H
#define PAIR_H
-#define PAIR(T, V) TEMPL2(pair, T, V)
+// #define PAIR(T, V) TEMPL2(pair, T, V)
-#endif /* PAIR_H */
-#if defined(T) && defined(V)
+// #endif /* PAIR_H */
+// #if defined(T) && defined(V)
-typedef struct {
- T key;
- V val;
-} PAIR(T, V);
+template<class T, class V> struct pair {
+ T* key;
+ V* val;
+ pair () { }
+ pair (pair<T,V>& other);
+};
+
+#if 0
INIT_F(PAIR(T, V));
FREE_F(PAIR(T, V));
FMT_F(PAIR(T, V));
-int DEEP_COPY(PAIR(T, V)) (PAIR(T, V)* dest, PAIR(T, V)* src);
+#endif
+// int DEEP_COPY(PAIR(T, V)) (PAIR(T, V)* dest, PAIR(T, V)* src);
+
+#include "pair.inc.h"
#endif