From 265ff391e850e18f8da329e488ef4e9011642c67 Mon Sep 17 00:00:00 2001 From: Janis Born Date: Wed, 25 Nov 2015 14:17:06 +0100 Subject: [PATCH] fix c++98 compatibility for Python bridge to VectorT --- src/Python/Vector.hh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/Python/Vector.hh b/src/Python/Vector.hh index e3031709..f00c9e6a 100644 --- a/src/Python/Vector.hh +++ b/src/Python/Vector.hh @@ -151,12 +151,21 @@ void expose_vec(const char *_name) { .def("vectorize", &Vector::vectorize, return_internal_reference<>()) .def(self < self) - .def("norm", &Vector::template norm) - .def("length", &Vector::template length) - .def("sqrnorm", &Vector::template sqrnorm) - .def("normalize", &Vector::template normalize, return_internal_reference<>()) - .def("normalized", &Vector::template normalized) - .def("normalize_cond", &Vector::template normalize_cond, return_internal_reference<>()) +#if (__cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(OPENMESH_VECTOR_LEGACY) + .def("norm", &Vector::template norm) + .def("length", &Vector::template length) + .def("sqrnorm", &Vector::template sqrnorm) + .def("normalize", &Vector::template normalize, return_internal_reference<>()) + .def("normalized", &Vector::template normalized) + .def("normalize_cond", &Vector::template normalize_cond, return_internal_reference<>()) +#else + .def("norm", &Vector::norm) + .def("length", &Vector::length) + .def("sqrnorm", &Vector::sqrnorm) + .def("normalize", &Vector::normalize, return_internal_reference<>()) + .def("normalized", &Vector::normalized) + .def("normalize_cond", &Vector::normalize_cond, return_internal_reference<>()) +#endif .def("l1_norm", &Vector::l1_norm) .def("l8_norm", &Vector::l8_norm)