added workaround for borland for bool conversion operator

[SVN r28905]
This commit is contained in:
Pavol Droba
2005-05-14 18:51:59 +00:00
parent c2ddc197aa
commit 4b89a3e223

View File

@ -241,11 +241,18 @@ namespace boost
return m_Begin == m_End; return m_Begin == m_End;
} }
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
operator bool() const
{
return empty();
}
#else
typedef iterator (iterator_range::*unspecified_bool_type) () const; typedef iterator (iterator_range::*unspecified_bool_type) () const;
operator unspecified_bool_type() const operator unspecified_bool_type() const
{ {
return empty() ? 0: &iterator_range::end; return empty() ? 0: &iterator_range::end;
} }
#endif
bool equal( const iterator_range& r ) const bool equal( const iterator_range& r ) const
{ {