32 #include <type_traits>
49 using Sacado::mpl::vector;
63 typedef vector<> vec0;
64 static_assert( size<vec0>::value == 0,
"" );
67 typedef typename push_back<vec0,T1>::type vec1;
68 static_assert( is_same< vec1, vector<T1> >::value,
"");
69 static_assert( is_same< at<vec1,0>::type,
T1>::value,
"");
70 static_assert( size<vec1>::value == 1,
"" );
73 typedef typename push_back<vec1,T2>::type vec2;
74 static_assert( is_same< vec2, vector<T1,T2> >::value,
"");
75 static_assert( is_same< at<vec2,0>::type,
T1>::value,
"");
76 static_assert( is_same< at<vec2,1>::type, T2>::value,
"");
77 static_assert( size<vec2>::value == 2,
"" );
80 typedef typename push_back<vec2,T3>::type vec3;
81 static_assert( is_same< vec3, vector<T1,T2,T3> >::value,
"");
82 static_assert( is_same< at<vec3,0>::type,
T1>::value,
"");
83 static_assert( is_same< at<vec3,1>::type, T2>::value,
"");
84 static_assert( is_same< at<vec3,2>::type, T3>::value,
"");
85 static_assert( size<vec3>::value == 3,
"" );
88 typedef typename push_back<vec3,T4>::type vec4;
89 static_assert( is_same< vec4, vector<T1,T2,T3,T4> >::value,
"");
90 static_assert( is_same< at<vec4,0>::type,
T1>::value,
"");
91 static_assert( is_same< at<vec4,1>::type, T2>::value,
"");
92 static_assert( is_same< at<vec4,2>::type, T3>::value,
"");
93 static_assert( is_same< at<vec4,3>::type, T4>::value,
"");
94 static_assert( size<vec4>::value == 4,
"" );
97 typedef typename push_back<vec4,T5>::type vec5;
98 static_assert( is_same< vec5, vector<T1,T2,T3,T4,T5> >::value,
"");
99 static_assert( is_same< at<vec5,0>::type,
T1>::value,
"");
100 static_assert( is_same< at<vec5,1>::type, T2>::value,
"");
101 static_assert( is_same< at<vec5,2>::type, T3>::value,
"");
102 static_assert( is_same< at<vec5,3>::type, T4>::value,
"");
103 static_assert( is_same< at<vec5,4>::type, T5>::value,
"");
104 static_assert( size<vec5>::value == 5,
"" );
107 typedef typename push_back<vec5,T5>::type vec6;
108 static_assert( is_same< vec6, vector<T1,T2,T3,T4,T5,T5> >::value,
"");
109 static_assert( is_same< at<vec6,0>::type,
T1>::value,
"");
110 static_assert( is_same< at<vec6,1>::type, T2>::value,
"");
111 static_assert( is_same< at<vec6,2>::type, T3>::value,
"");
112 static_assert( is_same< at<vec6,3>::type, T4>::value,
"");
113 static_assert( is_same< at<vec6,4>::type, T5>::value,
"");
114 static_assert( is_same< at<vec6,5>::type, T5>::value,
"");
115 static_assert( size<vec6>::value == 6,
"" );
118 typedef typename push_back<vec6,T4>::type vec7;
119 static_assert( is_same< vec7, vector<T1,T2,T3,T4,T5,T5,T4> >::value,
"");
120 static_assert( is_same< at<vec7,0>::type,
T1>::value,
"");
121 static_assert( is_same< at<vec7,1>::type, T2>::value,
"");
122 static_assert( is_same< at<vec7,2>::type, T3>::value,
"");
123 static_assert( is_same< at<vec7,3>::type, T4>::value,
"");
124 static_assert( is_same< at<vec7,4>::type, T5>::value,
"");
125 static_assert( is_same< at<vec7,5>::type, T5>::value,
"");
126 static_assert( is_same< at<vec7,6>::type, T4>::value,
"");
127 static_assert( size<vec7>::value == 7,
"" );
130 typedef typename push_back<vec7,T3>::type vec8;
131 static_assert( is_same< vec8, vector<T1,T2,T3,T4,T5,T5,T4,T3> >::value,
"");
132 static_assert( is_same< vec7, vector<T1,T2,T3,T4,T5,T5,T4> >::value,
"");
133 static_assert( is_same< at<vec8,0>::type,
T1>::value,
"");
134 static_assert( is_same< at<vec8,1>::type, T2>::value,
"");
135 static_assert( is_same< at<vec8,2>::type, T3>::value,
"");
136 static_assert( is_same< at<vec8,3>::type, T4>::value,
"");
137 static_assert( is_same< at<vec8,4>::type, T5>::value,
"");
138 static_assert( is_same< at<vec8,5>::type, T5>::value,
"");
139 static_assert( is_same< at<vec8,6>::type, T4>::value,
"");
140 static_assert( is_same< at<vec8,7>::type, T3>::value,
"");
141 static_assert( size<vec8>::value == 8,
"" );
144 typedef typename push_back<vec8,T2>::type vec9;
145 static_assert( is_same< vec9, vector<T1,T2,T3,T4,T5,T5,T4,T3,T2> >::value,
"");
146 static_assert( is_same< at<vec9,0>::type,
T1>::value,
"");
147 static_assert( is_same< at<vec9,1>::type, T2>::value,
"");
148 static_assert( is_same< at<vec9,2>::type, T3>::value,
"");
149 static_assert( is_same< at<vec9,3>::type, T4>::value,
"");
150 static_assert( is_same< at<vec9,4>::type, T5>::value,
"");
151 static_assert( is_same< at<vec9,5>::type, T5>::value,
"");
152 static_assert( is_same< at<vec9,6>::type, T4>::value,
"");
153 static_assert( is_same< at<vec9,7>::type, T3>::value,
"");
154 static_assert( is_same< at<vec9,8>::type, T2>::value,
"");
155 static_assert( size<vec9>::value == 9,
"" );
158 typedef typename push_back<vec9,T1>::type vec10;
159 static_assert( is_same< vec10, vector<T1,T2,T3,T4,T5,T5,T4,T3,T2,T1> >::value,
"");
160 static_assert( is_same< at<vec10,0>::type,
T1>::value,
"");
161 static_assert( is_same< at<vec10,1>::type, T2>::value,
"");
162 static_assert( is_same< at<vec10,2>::type, T3>::value,
"");
163 static_assert( is_same< at<vec10,3>::type, T4>::value,
"");
164 static_assert( is_same< at<vec10,4>::type, T5>::value,
"");
165 static_assert( is_same< at<vec10,5>::type, T5>::value,
"");
166 static_assert( is_same< at<vec10,6>::type, T4>::value,
"");
167 static_assert( is_same< at<vec10,7>::type, T3>::value,
"");
168 static_assert( is_same< at<vec10,8>::type, T2>::value,
"");
169 static_assert( is_same< at<vec10,9>::type,
T1>::value,
"");
170 static_assert( size<vec10>::value == 10,
"" );
173 typedef typename push_back<vec10,T1>::type vec11;
174 static_assert( is_same< vec11, vector<T1,T2,T3,T4,T5,T5,T4,T3,T2,T1,T1> >::value,
"");
175 static_assert( is_same< at<vec11,0>::type,
T1>::value,
"");
176 static_assert( is_same< at<vec11,1>::type, T2>::value,
"");
177 static_assert( is_same< at<vec11,2>::type, T3>::value,
"");
178 static_assert( is_same< at<vec11,3>::type, T4>::value,
"");
179 static_assert( is_same< at<vec11,4>::type, T5>::value,
"");
180 static_assert( is_same< at<vec11,5>::type, T5>::value,
"");
181 static_assert( is_same< at<vec11,6>::type, T4>::value,
"");
182 static_assert( is_same< at<vec11,7>::type, T3>::value,
"");
183 static_assert( is_same< at<vec11,8>::type, T2>::value,
"");
184 static_assert( is_same< at<vec11,9>::type,
T1>::value,
"");
185 static_assert( is_same< at<vec11,10>::type,
T1>::value,
"");
186 static_assert( size<vec11>::value == 11,
"" );
189 typedef typename push_back<vec11,T2>::type vec12;
190 static_assert( is_same< vec12, vector<T1,T2,T3,T4,T5,T5,T4,T3,T2,T1,T1,T2> >::value,
"");
191 static_assert( is_same< at<vec12,0>::type,
T1>::value,
"");
192 static_assert( is_same< at<vec12,1>::type, T2>::value,
"");
193 static_assert( is_same< at<vec12,2>::type, T3>::value,
"");
194 static_assert( is_same< at<vec12,3>::type, T4>::value,
"");
195 static_assert( is_same< at<vec12,4>::type, T5>::value,
"");
196 static_assert( is_same< at<vec12,5>::type, T5>::value,
"");
197 static_assert( is_same< at<vec12,6>::type, T4>::value,
"");
198 static_assert( is_same< at<vec12,7>::type, T3>::value,
"");
199 static_assert( is_same< at<vec12,8>::type, T2>::value,
"");
200 static_assert( is_same< at<vec12,9>::type,
T1>::value,
"");
201 static_assert( is_same< at<vec12,10>::type,
T1>::value,
"");
202 static_assert( is_same< at<vec12,11>::type, T2>::value,
"");
203 static_assert( size<vec12>::value == 12,
"" );
206 typedef typename push_back<vec12,T3>::type vec13;
207 static_assert( is_same< vec13, vector<T1,T2,T3,T4,T5,T5,T4,T3,T2,T1,T1,T2,T3> >::value,
"");
208 static_assert( is_same< at<vec13,0>::type,
T1>::value,
"");
209 static_assert( is_same< at<vec13,1>::type, T2>::value,
"");
210 static_assert( is_same< at<vec13,2>::type, T3>::value,
"");
211 static_assert( is_same< at<vec13,3>::type, T4>::value,
"");
212 static_assert( is_same< at<vec13,4>::type, T5>::value,
"");
213 static_assert( is_same< at<vec13,5>::type, T5>::value,
"");
214 static_assert( is_same< at<vec13,6>::type, T4>::value,
"");
215 static_assert( is_same< at<vec13,7>::type, T3>::value,
"");
216 static_assert( is_same< at<vec13,8>::type, T2>::value,
"");
217 static_assert( is_same< at<vec13,9>::type,
T1>::value,
"");
218 static_assert( is_same< at<vec13,10>::type,
T1>::value,
"");
219 static_assert( is_same< at<vec13,11>::type, T2>::value,
"");
220 static_assert( is_same< at<vec13,12>::type, T3>::value,
"");
221 static_assert( size<vec13>::value == 13,
"" );
224 typedef typename push_back<vec13,T4>::type vec14;
225 static_assert( is_same< vec14, vector<T1,T2,T3,T4,T5,T5,T4,T3,T2,T1,T1,T2,T3,T4> >::value,
"");
226 static_assert( is_same< at<vec14,0>::type,
T1>::value,
"");
227 static_assert( is_same< at<vec14,1>::type, T2>::value,
"");
228 static_assert( is_same< at<vec14,2>::type, T3>::value,
"");
229 static_assert( is_same< at<vec14,3>::type, T4>::value,
"");
230 static_assert( is_same< at<vec14,4>::type, T5>::value,
"");
231 static_assert( is_same< at<vec14,5>::type, T5>::value,
"");
232 static_assert( is_same< at<vec14,6>::type, T4>::value,
"");
233 static_assert( is_same< at<vec14,7>::type, T3>::value,
"");
234 static_assert( is_same< at<vec14,8>::type, T2>::value,
"");
235 static_assert( is_same< at<vec14,9>::type,
T1>::value,
"");
236 static_assert( is_same< at<vec14,10>::type,
T1>::value,
"");
237 static_assert( is_same< at<vec14,11>::type, T2>::value,
"");
238 static_assert( is_same< at<vec14,12>::type, T3>::value,
"");
239 static_assert( is_same< at<vec14,13>::type, T4>::value,
"");
240 static_assert( size<vec14>::value == 14,
"" );
243 typedef typename push_back<vec14,T5>::type vec15;
244 static_assert( is_same< vec15, vector<T1,T2,T3,T4,T5,T5,T4,T3,T2,T1,T1,T2,T3,T4,T5> >::value,
"");
245 static_assert( is_same< at<vec15,0>::type,
T1>::value,
"");
246 static_assert( is_same< at<vec15,1>::type, T2>::value,
"");
247 static_assert( is_same< at<vec15,2>::type, T3>::value,
"");
248 static_assert( is_same< at<vec15,3>::type, T4>::value,
"");
249 static_assert( is_same< at<vec15,4>::type, T5>::value,
"");
250 static_assert( is_same< at<vec15,5>::type, T5>::value,
"");
251 static_assert( is_same< at<vec15,6>::type, T4>::value,
"");
252 static_assert( is_same< at<vec15,7>::type, T3>::value,
"");
253 static_assert( is_same< at<vec15,8>::type, T2>::value,
"");
254 static_assert( is_same< at<vec15,9>::type,
T1>::value,
"");
255 static_assert( is_same< at<vec15,10>::type,
T1>::value,
"");
256 static_assert( is_same< at<vec15,11>::type, T2>::value,
"");
257 static_assert( is_same< at<vec15,12>::type, T3>::value,
"");
258 static_assert( is_same< at<vec15,13>::type, T4>::value,
"");
259 static_assert( is_same< at<vec15,14>::type, T5>::value,
"");
260 static_assert( size<vec15>::value == 15,
"" );
286 int main(
int argc,
char* argv[] ) {
TEUCHOS_UNIT_TEST(Conversion, IsConvertible)
static int runUnitTestsFromMain(int argc, char *argv[])