This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Why does this fail to compile in C++11 mode?
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Mon, 10 Jun 2013 00:19:37 +0100
- Subject: Why does this fail to compile in C++11 mode?
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.