Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-02-07 16:41:17


----- Original Message -----
From: <scleary_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, February 07, 2001 9:26 AM
Subject: RE: [boost] A horrifying Borland thought

> > 3) There are problem handling integral constant expressions, in
particular
> > you must refer to integral constant expressions by their fully qualified
> > names, otherwise they are not recognised as such (I've sporadically had
> > this problem with VC6 as well).
>
> Another workaround I've found for this problem is to surround the integral
> constant expression with an extra set of parenthesis (the following code
may
> be a good example for your gotcha's page, John):

Is this a different page than the one Jens authored at
more/borland_cpp.html?

> In any case, it shouldn't be necessary to go the true_struct/false_struct
> route...

Okay, here's an example, highlighted by the current version of
libs/utility/iterator_adaptor_test.cpp:

      typedef typename boost::detail::if_true<(

(::boost::is_convertible<category*,std::input_iterator_tag*>::value)
          &&
(!::boost::is_convertible<category*,std::forward_iterator_tag*>::value)
      )>::template
      then<
        proxy,
   // else
        pointer
>::type type;

It's got parens up the wazoo, I'm not trying to do is_convertible on classes
directly, but rather on the pointers. Have I forgotten anything?

Error E2034 ..\boost/iterator_adaptors.hpp 326: Cannot convert
'is_convertible<Traits::iterator_category *,std::forward_iterator_tag
*>::value' to 'bool'
Error E2034 ..\boost/iterator_adaptors.hpp 326: Cannot convert
'is_convertible<Traits::iterator_category *,std::input_iterator_tag
*>::value' to 'bool'
Error E2396 ..\boost/iterator_adaptors.hpp 326: Template argument must be a
constant expression
Error E2040 ..\boost/iterator_adaptors.hpp 327: Declaration terminated
incorrectly

-Dave


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