ALPSCore reference
is_complex.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1998-2018 ALPS Collaboration. See COPYRIGHT.TXT
3  * All rights reserved. Use is subject to license terms. See LICENSE.TXT
4  * For use in publications, see ACKNOWLEDGE.TXT
5  */
6 
7 /* $Id: obsvalue.h 3435 2009-11-28 14:45:38Z troyer $ */
8 
9 #ifndef ALPS_TYPE_TRAITS_IS_COMPLEX_H
10 #define ALPS_TYPE_TRAITS_IS_COMPLEX_H
11 
12 #include <complex>
13 #include <type_traits>
14 
15 // maybe we can automate this by checking for the existence of a value_type member
16 
17 namespace alps {
18 
19 template <class T>
20 struct is_complex : std::false_type {};
21 
22 template <class T>
23 struct is_complex<std::complex<T> > : std::true_type {};
24 
25 } // end namespace alps
26 
27 #endif // ALPS_TYPE_TRAITS_IS_COMPLEX_H
STL namespace.