[iter] Showcase implicit casts

This commit is contained in:
Behdad Esfahbod 2018-12-21 01:59:37 -05:00
parent 879faa2aee
commit 44af738d19
1 changed files with 3 additions and 2 deletions

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;