mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-21 16:42:09 +02:00
Re-enabled some STATIC_ASSERTs for MSVC, using bitwise operators to avoid ICEs.
[SVN r12030]
This commit is contained in:
@ -800,22 +800,20 @@ struct iterator_adaptor :
|
|||||||
private:
|
private:
|
||||||
BOOST_STATIC_CONSTANT(bool, is_input_or_output_iter
|
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::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
|
// Iterators should satisfy one of the known categories
|
||||||
BOOST_STATIC_ASSERT(is_input_or_output_iter);
|
BOOST_STATIC_ASSERT(is_input_or_output_iter);
|
||||||
|
|
||||||
#if !defined(BOOST_MSVC)
|
|
||||||
// Iterators >= ForwardIterator must produce real references
|
// Iterators >= ForwardIterator must produce real references
|
||||||
// as required by the C++ standard requirements in Table 74.
|
// as required by the C++ standard requirements in Table 74.
|
||||||
BOOST_STATIC_CONSTANT(bool, forward_iter_with_real_reference =
|
BOOST_STATIC_CONSTANT(bool, forward_iter_with_real_reference
|
||||||
(!boost::is_convertible<iterator_category*,std::forward_iterator_tag*>::value
|
= ((!boost::is_convertible<iterator_category*,std::forward_iterator_tag*>::value)
|
||||||
|| boost::is_same<reference,value_type&>::value
|
| boost::is_same<reference,value_type&>::value
|
||||||
|| boost::is_same<reference,const value_type&>::value));
|
| boost::is_same<reference,const value_type&>::value));
|
||||||
|
|
||||||
// This check gives incorrect results in iter_traits_gen_test.cpp
|
// This check gives incorrect results in iter_traits_gen_test.cpp
|
||||||
BOOST_STATIC_ASSERT(forward_iter_with_real_reference);
|
BOOST_STATIC_ASSERT(forward_iter_with_real_reference);
|
||||||
#endif
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
iterator_adaptor() { }
|
iterator_adaptor() { }
|
||||||
|
Reference in New Issue
Block a user