Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r85717 - trunk/boost/range
From: neil_at_[hidden]
Date: 2013-09-16 19:23:38


Author: neilgroves
Date: 2013-09-16 19:23:38 EDT (Mon, 16 Sep 2013)
New Revision: 85717
URL: http://svn.boost.org/trac/boost/changeset/85717

Log:
[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)

Text files modified:
   trunk/boost/range/size_type.hpp | 8 ++++++++
   1 files changed, 8 insertions(+), 0 deletions(-)

Modified: trunk/boost/range/size_type.hpp
==============================================================================
--- trunk/boost/range/size_type.hpp Mon Sep 16 18:38:05 2013 (r85716)
+++ trunk/boost/range/size_type.hpp 2013-09-16 19:23:38 EDT (Mon, 16 Sep 2013) (r85717)
@@ -76,14 +76,22 @@
     struct range_size :
         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>));
+#endif
     };
 
     template< class T >
     struct range_size<const T >
         : detail::range_size<T>
     {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT == 1
         BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept<T>));
+#endif
     };
 
 } // namespace boost


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk