Boost logo

Boost :

From: p_michel_andre (michel.andre_at_[hidden])
Date: 2001-12-05 10:29:44


--- 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


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