summaryrefslogtreecommitdiffstats
path: root/src/vZ
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-10-19 01:12:57 -0400
committerTavian Barnes <tavianator@gmail.com>2010-10-19 01:12:57 -0400
commitc01880ba9cfdeb2677eee9b92ee10507070eb86e (patch)
treeb5f8ad7208414d17781c3e4771c1b58c44def78b /src/vZ
parent2829763fc5f9d222a966402bf073083dbc1da51c (diff)
downloadvz-c01880ba9cfdeb2677eee9b92ee10507070eb86e.tar.xz
Support std::complex<T>.
Diffstat (limited to 'src/vZ')
-rw-r--r--src/vZ/Traits.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vZ/Traits.hpp b/src/vZ/Traits.hpp
index 2c1496e..1c8f082 100644
--- a/src/vZ/Traits.hpp
+++ b/src/vZ/Traits.hpp
@@ -21,6 +21,8 @@
#ifndef VZ_TRAITS_HPP
#define VZ_TRAITS_HPP
+#include <complex>
+
namespace vZ
{
// Traits class
@@ -36,6 +38,17 @@ namespace vZ
private:
Traits();
};
+
+ // Specialization for std::complex<T>
+ template <typename T>
+ class Traits<std::complex<T> >
+ {
+ public:
+ typedef typename Traits<T>::Scalar Scalar;
+
+ private:
+ Traits();
+ };
}
#endif // VZ_TRAITS_HPP