[iter] Showcase implicit casts

This commit is contained in:
Behdad Esfahbod committed 2018-12-21 01:59:37 -05:00
1 parent 879faa2aee
commit 44af738d19
1 file changed
+3 -2
+3 -2
View File
@@ -48,9 +48,10 @@ main (int argc, char **argv)
{
const int src[10] = {};
int dst[20];
hb_vector_t<int> v;
array_iter_t<const int> s (src);
array_iter_t<const int> s2 (src);
array_iter_t<const int> s (src); /* Implicit conversion from static array. */
array_iter_t<const int> s2 (v); /* Implicit conversion from vector. */
array_iter_t<int> t (dst);
s2 = s;