is_vector_like.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_SCAL_META_IS_VECTOR_LIKE_HPP
2 #define STAN_MATH_PRIM_SCAL_META_IS_VECTOR_LIKE_HPP
3 
5 
6 namespace stan {
7 
8 /**
9  * Template metaprogram indicates whether a type is vector_like.
10  *
11  * A type is vector_like if an instance can be accessed like a
12  * vector, i.e. square brackets.
13  *
14  * Access is_vector_like::value for the result.
15  *
16  * Default behavior is to use the is_vector template metaprogram.
17  *
18  * @tparam T Type to test
19  */
20 template <typename T>
23 };
24 
25 /**
26  * Template metaprogram indicates whether a type is vector_like.
27  *
28  * A type is vector_like if an instance can be accessed like a
29  * vector, i.e. square brackets.
30  *
31  * A C++ array of T is vector_like.
32  *
33  * @tparam T Type to test
34  */
35 template <typename T>
36 struct is_vector_like<T*> {
37  enum { value = true };
38 };
39 
40 /**
41  * Template metaprogram indicates whether a type is vector_like.
42  *
43  * A type is vector_like if an instance can be accessed like a
44  * vector, i.e. square brackets.
45  *
46  * Access is_vector_like::value for the result.
47  *
48  * This metaprogram removes the const qualifier.
49  *
50  * @tparam T Type to test
51  */
52 template <typename T>
55 };
56 } // namespace stan
57 #endif
const XML_Char int const XML_Char * value
Definition: expat.h:331
double T
Definition: Xdiff_gwt.C:5