Boost logo

Boost :

From: Aleksey Gurtovoy (alexy_at_[hidden])
Date: 2001-06-22 09:08:20

John Maddock wrote:
> >BTW, trying to reproduce the errors in the question, I've
> run into another two:
> 1) it seems that 'conversion_traits.hpp' header was checked
> in with some diff data in it, which leads to compilation failure:
> <
> I think that must be your local copy at fault, the version in the
> repository looks OK, as is my local copy...

It was, sorry for the false alarm.

> > 2) on MSVC, the expression 'self::is_input_iter' from the
> following code (boost/iterator_adaptors.hpp, line 367)
> typedef typename
> boost::detail::if_true<(self::is_input_iter)>::template
> then<
> proxy,
> // else
> Pointer
> >::type type;
> in some situations lead to "error C2027: use of undefined
> type ...", there "undefined type" refers to 'self'. AFAIR, 'self::'
> qualification here was a Borland workaround; hmm.. need
> to re-read John's article on coding intergal constant
> expressions to make any useful suggestions here :).
> <
> In short don't do that for VC6 - yes it is required for Borland, and
> required not to be there for VC6, you'll have to add a VC6
> specific ifdef for that.

Indeed, it seems that you are right. Another option, of course, is to use
'boost::mpl' facilities :), something like this:

typedef mpl::logical_and<
     boost::is_convertible<Category*, std::input_iterator_tag*>
   , mpl::logical_not< boost::is_convertible<Category*,
std::forward_iterator_tag*> >
> is_input_iter;
typedef typename mpl::select_type_t<is_input_iter, proxy, Pointer>::type


Boost list run by bdawes at, gregod at, cpdaniel at, john at