Why does this fail to compile in C++11 mode?

Jonathan Wakely jwakely.gcc@gmail.com
Sun Jun 9 23:19:00 GMT 2013


Maybe I'm being dumb, but shouldn't this compile with -std=c++11?
It does with -std=c++98

#include <algorithm>

struct X { };

bool operator==(const X&, const X&);

typedef X*           iterator_type;

namespace std
{
  template iterator_type remove(iterator_type, iterator_type, const X&);
}


The example is based on
testsuite/25_algorithms/remove/requirements/explicit_instantiation/2.cc
which fails if tested in C++11 or C++14 mode.



More information about the Libstdc++ mailing list