From 34cea300e5711482f9651f2aad5d997670bc52e9 Mon Sep 17 00:00:00 2001 From: Neil Groves Date: Mon, 16 Sep 2013 23:23:38 +0000 Subject: [PATCH] [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] --- include/boost/range/size_type.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/range/size_type.hpp b/include/boost/range/size_type.hpp index dab2f0d..cc99ef3 100644 --- a/include/boost/range/size_type.hpp +++ b/include/boost/range/size_type.hpp @@ -76,14 +76,22 @@ namespace boost struct range_size : detail::range_size { +// 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)); +#endif }; template< class T > struct range_size : detail::range_size { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT == 1 BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept)); +#endif }; } // namespace boost