https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112293

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #1)
> This is broken in two ways, you need to include both <algorithm> *and*
> <vector> for this program.

Actually three ways. There is no guarantee that std::vector's iterators have
namespace std as an associated namespace, so begin(v) and end(v) are not
guaranteed to find std::begin and std::end. You should qualify them or add
using declarations.

Reply via email to