12 #include <type_traits>
43 typedef vector<> vec0;
47 typedef typename push_back<vec0,T1>::type vec1;
48 static_assert( is_same< vec1, vector<T1> >::
value,
"");
49 static_assert( is_same< at<vec1,0>::type,
T1>::
value,
"");
53 typedef typename push_back<vec1,T2>::type vec2;
54 static_assert( is_same< vec2, vector<T1,T2> >::
value,
"");
55 static_assert( is_same< at<vec2,0>::type,
T1>::
value,
"");
56 static_assert( is_same< at<vec2,1>::type, T2>::
value,
"");
60 typedef typename push_back<vec2,T3>::type vec3;
61 static_assert( is_same< vec3, vector<T1,T2,T3> >::
value,
"");
62 static_assert( is_same< at<vec3,0>::type,
T1>::
value,
"");
63 static_assert( is_same< at<vec3,1>::type, T2>::
value,
"");
64 static_assert( is_same< at<vec3,2>::type, T3>::
value,
"");
68 typedef typename push_back<vec3,T4>::type vec4;
69 static_assert( is_same< vec4, vector<T1,T2,T3,T4> >::
value,
"");
70 static_assert( is_same< at<vec4,0>::type,
T1>::
value,
"");
71 static_assert( is_same< at<vec4,1>::type, T2>::
value,
"");
72 static_assert( is_same< at<vec4,2>::type, T3>::
value,
"");
73 static_assert( is_same< at<vec4,3>::type, T4>::
value,
"");
77 typedef typename push_back<vec4,T5>::type vec5;
78 static_assert( is_same< vec5, vector<T1,T2,T3,T4,T5> >::
value,
"");
79 static_assert( is_same< at<vec5,0>::type,
T1>::
value,
"");
80 static_assert( is_same< at<vec5,1>::type, T2>::
value,
"");
81 static_assert( is_same< at<vec5,2>::type, T3>::
value,
"");
82 static_assert( is_same< at<vec5,3>::type, T4>::
value,
"");
83 static_assert( is_same< at<vec5,4>::type, T5>::
value,
"");
87 typedef typename push_back<vec5,T5>::type vec6;
88 static_assert( is_same< vec6, vector<T1,T2,T3,T4,T5,T5> >::
value,
"");
89 static_assert( is_same< at<vec6,0>::type,
T1>::
value,
"");
90 static_assert( is_same< at<vec6,1>::type, T2>::
value,
"");
91 static_assert( is_same< at<vec6,2>::type, T3>::
value,
"");
92 static_assert( is_same< at<vec6,3>::type, T4>::
value,
"");
93 static_assert( is_same< at<vec6,4>::type, T5>::
value,
"");
94 static_assert( is_same< at<vec6,5>::type, T5>::
value,
"");
98 typedef typename push_back<vec6,T4>::type vec7;
99 static_assert( is_same< vec7, vector<T1,T2,T3,T4,T5,T5,T4> >::
value,
"");
100 static_assert( is_same< at<vec7,0>::type,
T1>::
value,
"");
101 static_assert( is_same< at<vec7,1>::type, T2>::
value,
"");
102 static_assert( is_same< at<vec7,2>::type, T3>::
value,
"");
103 static_assert( is_same< at<vec7,3>::type, T4>::
value,
"");
104 static_assert( is_same< at<vec7,4>::type, T5>::
value,
"");
105 static_assert( is_same< at<vec7,5>::type, T5>::
value,
"");
106 static_assert( is_same< at<vec7,6>::type, T4>::
value,
"");
110 typedef typename push_back<vec7,T3>::type vec8;
111 static_assert( is_same< vec8, vector<T1,T2,T3,T4,T5,T5,T4,T3> >::
value,
"");
112 static_assert( is_same< vec7, vector<T1,T2,T3,T4,T5,T5,T4> >::
value,
"");
113 static_assert( is_same< at<vec8,0>::type,
T1>::
value,
"");
114 static_assert( is_same< at<vec8,1>::type, T2>::
value,
"");
115 static_assert( is_same< at<vec8,2>::type, T3>::
value,
"");
116 static_assert( is_same< at<vec8,3>::type, T4>::
value,
"");
117 static_assert( is_same< at<vec8,4>::type, T5>::
value,
"");
118 static_assert( is_same< at<vec8,5>::type, T5>::
value,
"");
119 static_assert( is_same< at<vec8,6>::type, T4>::
value,
"");
120 static_assert( is_same< at<vec8,7>::type, T3>::
value,
"");
124 typedef typename push_back<vec8,T2>::type vec9;
125 static_assert( is_same< vec9, vector<T1,T2,T3,T4,T5,T5,T4,T3,T2> >::
value,
"");
126 static_assert( is_same< at<vec9,0>::type,
T1>::
value,
"");
127 static_assert( is_same< at<vec9,1>::type, T2>::
value,
"");
128 static_assert( is_same< at<vec9,2>::type, T3>::
value,
"");
129 static_assert( is_same< at<vec9,3>::type, T4>::
value,
"");
130 static_assert( is_same< at<vec9,4>::type, T5>::
value,
"");
131 static_assert( is_same< at<vec9,5>::type, T5>::
value,
"");
132 static_assert( is_same< at<vec9,6>::type, T4>::
value,
"");
133 static_assert( is_same< at<vec9,7>::type, T3>::
value,
"");
134 static_assert( is_same< at<vec9,8>::type, T2>::
value,
"");
138 typedef typename push_back<vec9,T1>::type vec10;
139 static_assert( is_same< vec10, vector<T1,T2,T3,T4,T5,T5,T4,T3,T2,T1> >::
value,
"");
140 static_assert( is_same< at<vec10,0>::type,
T1>::
value,
"");
141 static_assert( is_same< at<vec10,1>::type, T2>::
value,
"");
142 static_assert( is_same< at<vec10,2>::type, T3>::
value,
"");
143 static_assert( is_same< at<vec10,3>::type, T4>::
value,
"");
144 static_assert( is_same< at<vec10,4>::type, T5>::
value,
"");
145 static_assert( is_same< at<vec10,5>::type, T5>::
value,
"");
146 static_assert( is_same< at<vec10,6>::type, T4>::
value,
"");
147 static_assert( is_same< at<vec10,7>::type, T3>::
value,
"");
148 static_assert( is_same< at<vec10,8>::type, T2>::
value,
"");
149 static_assert( is_same< at<vec10,9>::type,
T1>::
value,
"");
153 typedef typename push_back<vec10,T1>::type vec11;
154 static_assert( is_same< vec11, vector<T1,T2,T3,T4,T5,T5,T4,T3,T2,T1,T1> >::
value,
"");
155 static_assert( is_same< at<vec11,0>::type,
T1>::
value,
"");
156 static_assert( is_same< at<vec11,1>::type, T2>::
value,
"");
157 static_assert( is_same< at<vec11,2>::type, T3>::
value,
"");
158 static_assert( is_same< at<vec11,3>::type, T4>::
value,
"");
159 static_assert( is_same< at<vec11,4>::type, T5>::
value,
"");
160 static_assert( is_same< at<vec11,5>::type, T5>::
value,
"");
161 static_assert( is_same< at<vec11,6>::type, T4>::
value,
"");
162 static_assert( is_same< at<vec11,7>::type, T3>::
value,
"");
163 static_assert( is_same< at<vec11,8>::type, T2>::
value,
"");
164 static_assert( is_same< at<vec11,9>::type,
T1>::
value,
"");
165 static_assert( is_same< at<vec11,10>::type,
T1>::
value,
"");
169 typedef typename push_back<vec11,T2>::type vec12;
170 static_assert( is_same< vec12, vector<T1,T2,T3,T4,T5,T5,T4,T3,T2,T1,T1,T2> >::
value,
"");
171 static_assert( is_same< at<vec12,0>::type,
T1>::
value,
"");
172 static_assert( is_same< at<vec12,1>::type, T2>::
value,
"");
173 static_assert( is_same< at<vec12,2>::type, T3>::
value,
"");
174 static_assert( is_same< at<vec12,3>::type, T4>::
value,
"");
175 static_assert( is_same< at<vec12,4>::type, T5>::
value,
"");
176 static_assert( is_same< at<vec12,5>::type, T5>::
value,
"");
177 static_assert( is_same< at<vec12,6>::type, T4>::
value,
"");
178 static_assert( is_same< at<vec12,7>::type, T3>::
value,
"");
179 static_assert( is_same< at<vec12,8>::type, T2>::
value,
"");
180 static_assert( is_same< at<vec12,9>::type,
T1>::
value,
"");
181 static_assert( is_same< at<vec12,10>::type,
T1>::
value,
"");
182 static_assert( is_same< at<vec12,11>::type, T2>::
value,
"");
186 typedef typename push_back<vec12,T3>::type vec13;
187 static_assert( is_same< vec13, vector<T1,T2,T3,T4,T5,T5,T4,T3,T2,T1,T1,T2,T3> >::
value,
"");
188 static_assert( is_same< at<vec13,0>::type,
T1>::
value,
"");
189 static_assert( is_same< at<vec13,1>::type, T2>::
value,
"");
190 static_assert( is_same< at<vec13,2>::type, T3>::
value,
"");
191 static_assert( is_same< at<vec13,3>::type, T4>::
value,
"");
192 static_assert( is_same< at<vec13,4>::type, T5>::
value,
"");
193 static_assert( is_same< at<vec13,5>::type, T5>::
value,
"");
194 static_assert( is_same< at<vec13,6>::type, T4>::
value,
"");
195 static_assert( is_same< at<vec13,7>::type, T3>::
value,
"");
196 static_assert( is_same< at<vec13,8>::type, T2>::
value,
"");
197 static_assert( is_same< at<vec13,9>::type,
T1>::
value,
"");
198 static_assert( is_same< at<vec13,10>::type,
T1>::
value,
"");
199 static_assert( is_same< at<vec13,11>::type, T2>::
value,
"");
200 static_assert( is_same< at<vec13,12>::type, T3>::
value,
"");
204 typedef typename push_back<vec13,T4>::type vec14;
205 static_assert( is_same< vec14, vector<T1,T2,T3,T4,T5,T5,T4,T3,T2,T1,T1,T2,T3,T4> >::
value,
"");
206 static_assert( is_same< at<vec14,0>::type,
T1>::
value,
"");
207 static_assert( is_same< at<vec14,1>::type, T2>::
value,
"");
208 static_assert( is_same< at<vec14,2>::type, T3>::
value,
"");
209 static_assert( is_same< at<vec14,3>::type, T4>::
value,
"");
210 static_assert( is_same< at<vec14,4>::type, T5>::
value,
"");
211 static_assert( is_same< at<vec14,5>::type, T5>::
value,
"");
212 static_assert( is_same< at<vec14,6>::type, T4>::
value,
"");
213 static_assert( is_same< at<vec14,7>::type, T3>::
value,
"");
214 static_assert( is_same< at<vec14,8>::type, T2>::
value,
"");
215 static_assert( is_same< at<vec14,9>::type,
T1>::
value,
"");
216 static_assert( is_same< at<vec14,10>::type,
T1>::
value,
"");
217 static_assert( is_same< at<vec14,11>::type, T2>::
value,
"");
218 static_assert( is_same< at<vec14,12>::type, T3>::
value,
"");
219 static_assert( is_same< at<vec14,13>::type, T4>::
value,
"");
223 typedef typename push_back<vec14,T5>::type vec15;
224 static_assert( is_same< vec15, vector<T1,T2,T3,T4,T5,T5,T4,T3,T2,T1,T1,T2,T3,T4,T5> >::
value,
"");
225 static_assert( is_same< at<vec15,0>::type,
T1>::
value,
"");
226 static_assert( is_same< at<vec15,1>::type, T2>::
value,
"");
227 static_assert( is_same< at<vec15,2>::type, T3>::
value,
"");
228 static_assert( is_same< at<vec15,3>::type, T4>::
value,
"");
229 static_assert( is_same< at<vec15,4>::type, T5>::
value,
"");
230 static_assert( is_same< at<vec15,5>::type, T5>::
value,
"");
231 static_assert( is_same< at<vec15,6>::type, T4>::
value,
"");
232 static_assert( is_same< at<vec15,7>::type, T3>::
value,
"");
233 static_assert( is_same< at<vec15,8>::type, T2>::
value,
"");
234 static_assert( is_same< at<vec15,9>::type,
T1>::
value,
"");
235 static_assert( is_same< at<vec15,10>::type,
T1>::
value,
"");
236 static_assert( is_same< at<vec15,11>::type, T2>::
value,
"");
237 static_assert( is_same< at<vec15,12>::type, T3>::
value,
"");
238 static_assert( is_same< at<vec15,13>::type, T4>::
value,
"");
239 static_assert( is_same< at<vec15,14>::type, T5>::
value,
"");
266 int main(
int argc,
char* argv[] ) {
TEUCHOS_UNIT_TEST(Conversion, IsConvertible)
static int runUnitTestsFromMain(int argc, char *argv[])