Most Vexing Parse: why do the extra parentheses work?

48 views Asked by At

In order to avoid the Most Vexing Parse I added extra parentheses here:

std::vector<int> v(std::istream_iterator<int>(inp), (std::istream_iterator<int>()));

Where inp is an istringstream created from a std::string.

But why do the extra parentheses work? Why doesn't the compiler ignore them as redundant?

0

There are 0 answers