Re-enabled some STATIC_ASSERTs for MSVC, using bitwise operators to avoid ICEs.

[SVN r12030]
This commit is contained in:
Dave Abrahams
2001-12-13 14:34:11 +00:00
parent 50a502bb81
commit 37aee7c13b

View File

@ -800,22 +800,20 @@ struct iterator_adaptor :
private:
BOOST_STATIC_CONSTANT(bool, is_input_or_output_iter
= (boost::is_convertible<iterator_category*,std::input_iterator_tag*>::value
|| boost::is_convertible<iterator_category*,std::output_iterator_tag*>::value));
| boost::is_convertible<iterator_category*,std::output_iterator_tag*>::value));
// Iterators should satisfy one of the known categories
BOOST_STATIC_ASSERT(is_input_or_output_iter);
#if !defined(BOOST_MSVC)
// Iterators >= ForwardIterator must produce real references
// as required by the C++ standard requirements in Table 74.
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));
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));
// This check gives incorrect results in iter_traits_gen_test.cpp
BOOST_STATIC_ASSERT(forward_iter_with_real_reference);
#endif
public:
iterator_adaptor() { }