4 ms·
Because the constructor takes two arguments, a "begin" iterator and an "end" iterator. And pointers count as valid iterators. Normally you wouldn't use the "=
by comex 2y ago
Because the constructor takes two arguments, a "begin" iterator and an "end" iterator. And pointers count as valid iterators.
Normally you wouldn't use the "= {}" syntax to invoke a constructor this way. Instead of `std::vector<int> v = {begin, end}` you would usually write `std::vector<int> v(begin, end)`. But for some reason C++11 decided to make those two things mostly equivalent.