The following code is rejected by libc++ because the second iterator argument to vector(iterator, iterator) is not deduced (https://godbolt.org/z/q8f9Y7): #include <iterator> #include <iostream> #include <vector> int main() { std::vector<int> v({}, std::istream_iterator<int>{}); } The the following code, however, is accepted (https://godbolt.org/z/nM4Yh4): #include <iterator> #include <iostream> #include <vector> int main() { std::vector<int> v; v.assign({}, std::istream_iterator<int>{}); } I believe this to be a conformance bug. I stumbled on this in my own code when I noticed that a typo in the following code was being accepted: std::vector<int> v(other.cbegin(), other.end()); // note .end(), not .cend() Since the second argument is not deduced, and the first argument is a const iterator, the second argument is implicitly converted to a const iterator. This is a symptom of the same issue, though I think this particular case could arguably be considered a conforming extension.
Rereading what I wrote, I think I was unclear, so I'd like to clarify. I believe the constructor call being rejected is the conformance bug. My mention of the .assign() call was just to show that similar arguments work when passed to a different entity. It is correct that the .assign() call is accepted as written.
The following code compiles w/o error: std::vector<int> v(std::istream_iterator<int>{}, {});