If a pointer is passed as the third argument of the (iterator,
iterator, allocator) constructor with the intention of it being
implicitly converted to the allocator type, it is possible for overload
resolution to favour the (iterator, iterator, enable_if) constructor.
Eliminate this possibility by moving the enable_if to one of the
existing arguments and removing the third argument.
Details
Details
- Reviewers
- None
Diff Detail
Diff Detail
Event Timeline
include/vector | ||
---|---|---|
521–528 | I don't believe this is a correct change. std::vector<int> v( {}, my_weird_iterator ); ... cannot deduce the type of _InputIterator. |
I don't believe this is a correct change.
... cannot deduce the type of _InputIterator.