ALPSCore reference
Main Page
Related Pages
Classes
Files
File List
File Members
alps
type_traits
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>
13
#include <
alps/type_traits/has_value_type.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>
24
struct
is_sequence
:
alps::has_value_type
<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
has_value_type.hpp
std
STL namespace.
alps::is_sequence
Definition:
is_sequence.hpp:24
alps::has_value_type
Definition:
has_value_type.hpp:16
alps
Definition:
boost_array_functions.hpp:24
Generated on Sun Oct 14 2018 12:18:30 for ALPSCore reference by
1.8.11