Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-12-05 10:42:40


Something else to try:
use | and & instead of || and &&. I've found that to make a difference with
some compilers.
We might have to resort to the type_traits method of using value wrapper
types and logical operator templates. :(

----- Original Message -----
From: "p_michel_andre" <michel.andre_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, December 05, 2001 10:29 AM
Subject: [boost] Re: iterator_adaptor: strange compile error

> --- In boost_at_y..., "p_michel_andre" <michel.andre_at_e...> wrote:
> Some more resarch.
>
> The problem is not in any of the type_traits parts in the expression.
> When i change
> BOOST_STATIC_CONSTANT(bool, forward_iter_with_real_reference =
> (!
> boost::is_convertible<iterator_category*,std::forward_iterator_tag*>::
> value
> || boost::is_same<reference,value_type&>::value
> || boost::is_same<reference,const value_type&>::value));
>
> expands to something like:
> enum { forward_iter_with_real_reference = false || true || false; }
>
> MSVC doesn't think false || true || false is a constant expression!
>
> to
> BOOST_STATIC_CONSTANT(bool, forward_iter_with_real_reference =
> (!
> boost::is_convertible<iterator_category*,std::forward_iterator_tag*>::
> value
> + boost::is_same<reference,value_type&>::value
> + boost::is_same<reference,const value_type&>::value));
> expands to something like:
> enum { forward_iter_with_real_reference = false + true + false; }
>
> But MSVC think false + true + false is a constant expression!
>
> /Michel
>
>
>
> Info: http://www.boost.org Send unsubscribe requests to:
<mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


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