diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-10-19 01:12:57 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-10-19 01:12:57 -0400 |
commit | c01880ba9cfdeb2677eee9b92ee10507070eb86e (patch) | |
tree | b5f8ad7208414d17781c3e4771c1b58c44def78b /src | |
parent | 2829763fc5f9d222a966402bf073083dbc1da51c (diff) | |
download | vz-c01880ba9cfdeb2677eee9b92ee10507070eb86e.tar.xz |
Support std::complex<T>.
Diffstat (limited to 'src')
-rw-r--r-- | src/vZ/Traits.hpp | 13 |
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 |