In order to avoid the Most Vexing Parse I added extra parentheses here:
std::vector v(std::istream_iterator(inp), (std::istream_iterator<