From 8b0acc439b64299daca058505085af95254720a1 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sun, 10 Mar 2013 11:06:43 +0100 Subject: [PATCH] NTL_QQ: use NTL's Vec template class when available NTL 6.0.0 replaces the old template-like macros for vectors with a true template class. Use the template class when the macros are not available. Reported-by: David G. Wonnacott Signed-off-by: Sven Verdoolaege --- NTL_QQ.cc | 4 ++++ barvinok/NTL_QQ.h | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/NTL_QQ.cc b/NTL_QQ.cc index 13ce1c6..ac1752c 100644 --- a/NTL_QQ.cc +++ b/NTL_QQ.cc @@ -3,7 +3,9 @@ #include // needed for abort hidden in NTL_vector_impl #include +#ifdef NTL_vector_impl NTL_vector_impl(QQ,vec_QQ); +#endif ZZ QQ::tmp; @@ -36,4 +38,6 @@ std::istream& operator>> (std::istream& is, QQ& q) return is; } +#ifdef NTL_io_vector_impl NTL_io_vector_impl(QQ,vec_QQ); +#endif diff --git a/barvinok/NTL_QQ.h b/barvinok/NTL_QQ.h index ce0cf60..0619c82 100644 --- a/barvinok/NTL_QQ.h +++ b/barvinok/NTL_QQ.h @@ -46,7 +46,11 @@ struct QQ { } }; +#ifdef NTL_vector_decl NTL_vector_decl(QQ,vec_QQ); +#else +typedef Vec vec_QQ; +#endif vec_QQ& operator *= (vec_QQ& a, const ZZ& b); vec_QQ& operator *= (vec_QQ& a, const QQ& b); @@ -54,6 +58,8 @@ vec_QQ& operator *= (vec_QQ& a, const QQ& b); std::ostream& operator<< (std::ostream& os, const QQ& q); std::istream& operator>> (std::istream& os, QQ& q); +#ifdef NTL_io_vector_decl NTL_io_vector_decl(QQ,vec_QQ); +#endif #endif -- 2.11.4.GIT