ALPSCore reference
is_sequence.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_SEQUENCE_H
10 #define ALPS_TYPE_TRAITS_IS_SEQUENCE_H
11 
12 #include <alps/config.hpp>
14 #include <type_traits>
15 #include <valarray>
16 #include <vector>
17 #include <complex>
18 
19 // maybe we can automate this by checking for the existence of a value_type member
20 
21 namespace alps {
22 
23 template <class T>
25 
26 template <class T>
27 struct is_sequence<std::valarray<T> > : std::true_type {};
28 
29 template <class T>
30 struct is_sequence<std::complex<T> > : std::false_type {};
31 
32 template <>
33 struct is_sequence<std::string> : std::false_type {};
34 
35 } // end namespace alps
36 
37 #endif // ALPS_TYPE_TRAITS_ELEMENT_TYPE_H
STL namespace.