forked from boostorg/range
[boost][range] - fix a very odd compilation problem in range_size that only occurs on clang 4.2 on the Mac (clang 4.2 on linux is fine)
[SVN r85717]
This commit is contained in:
@ -76,14 +76,22 @@ namespace boost
|
|||||||
struct range_size :
|
struct range_size :
|
||||||
detail::range_size<T>
|
detail::range_size<T>
|
||||||
{
|
{
|
||||||
|
// Very strange things happen on some compilers that have the range concept
|
||||||
|
// asserts disabled. This preprocessor condition is clearly redundant on a
|
||||||
|
// working compiler but is vital for at least some compilers such as clang 4.2
|
||||||
|
// but only on the Mac!
|
||||||
|
#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT == 1
|
||||||
BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept<T>));
|
BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept<T>));
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
template< class T >
|
template< class T >
|
||||||
struct range_size<const T >
|
struct range_size<const T >
|
||||||
: detail::range_size<T>
|
: detail::range_size<T>
|
||||||
{
|
{
|
||||||
|
#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT == 1
|
||||||
BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept<T>));
|
BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept<T>));
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
Reference in New Issue
Block a user