aboutsummaryrefslogtreecommitdiff
path: root/pair.inc.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.inc.h
parentFix c++ compile warnings. (diff)
downloadcalp-329e3092542067f3a99fda328a8118e8d024e054.tar.gz
calp-329e3092542067f3a99fda328a8118e8d024e054.tar.xz
Build, but doesn't link.
Diffstat (limited to 'pair.inc.h')
-rw-r--r--pair.inc.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/pair.inc.h b/pair.inc.h
index c42b2dfd..bfc90756 100644
--- a/pair.inc.h
+++ b/pair.inc.h
@@ -1,7 +1,8 @@
-#if ! (defined(T) && defined(V))
-#error "Both T and V must be defiend here"
-#else
+// #if ! (defined(T) && defined(V))
+// #error "Both T and V must be defiend here"
+// #else
+#if 0
INIT_F(PAIR(T, V)) {
INIT(T, &self->key);
INIT(V, &self->val);
@@ -24,11 +25,16 @@ FMT_F(PAIR(T, V)) {
return sprintf(buf, "<%s, %s>", lbuf, rbuf);
}
-
-int DEEP_COPY(PAIR(T, V)) (PAIR(T, V)* dest, PAIR(T, V)* src) {
- DEEP_COPY(T)(&dest->key, &src->key);
- DEEP_COPY(V)(&dest->val, &src->val);
- return 0;
+#endif
+
+// int DEEP_COPY(PAIR(T, V)) (PAIR(T, V)* dest, PAIR(T, V)* src) {
+template <class T, class V>
+pair<T, V>::pair (pair<T,V>& other) {
+ this->key = new T(*other.key);
+ this->val = new V(*other.val);
+ // DEEP_COPY(T)(&dest->key, &src->key);
+ // DEEP_COPY(V)(&dest->val, &src->val);
+ // return 0;
}
-#endif /* T & V */
+// #endif /* T & V */