This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Hi,

On 06/10/2013 01:19 AM, Jonathan Wakely wrote:
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.
Something I can tell you (I'm quite tired), is that it fails with 4.5.4. Now, something seems inconsistent here, because I'm pretty sure to have tested quite recently as clean the whole testsuite ran in C++0x mode. Well, maybe not *that* recently, but certainly after 4.5.x. Or maybe wasn't really clean, something worth checking.

About the substance of the issue, I suspect subtleties having to do with the evolution of gcc's "strong using" extension to the ISO facility, but didn't check if the times exactly match.

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]