Boost logo

Boost :

Subject: Re: [boost] clang failing core/detail_iterator_test?
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2014-06-06 17:25:38


On Saturday 07 June 2014 01:09:39 you wrote:
> On Saturday 07 June 2014 00:03:57 Peter Dimov wrote:
> > > I'm having endless trouble trying to get a version of Clang up and
> > > running
> > > here (on Windows), as is customary.
> >
> > I got the latest SVN Clang running, but now the test doesn't fail. Go
> > figure. They must've fixed something.
>
> I can reproduce it locally with clang 3.4. Shows only with -std=c++11 -
> stdlib=libc++. Trying to dig further.

Ok, here's the thing. libc++ only implements std::iterator_traits for class-
type iterators if they have nested iterator_category typedef, and this typedef
is one of the std:: iterator categories. Otherwise std::iterator_traits is
empty.

Replacing

struct C
{
};

with

typedef std::random_access_iterator_tag C;

fixes the compilation for me.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk