diff options
author | Tobias Markmann <tm@ayena.de> | 2014-10-19 20:22:58 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2014-10-20 13:49:33 (GMT) |
commit | 6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch) | |
tree | 2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/range/size_type.hpp | |
parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
download | swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2 |
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0.
Updated our update.sh script to stop on error.
Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to
missing include of <iostream> with newer Boost.
Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/range/size_type.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/range/size_type.hpp | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/3rdParty/Boost/src/boost/range/size_type.hpp b/3rdParty/Boost/src/boost/range/size_type.hpp index c6fb54b..db5a59b 100644 --- a/3rdParty/Boost/src/boost/range/size_type.hpp +++ b/3rdParty/Boost/src/boost/range/size_type.hpp @@ -11,15 +11,13 @@ #ifndef BOOST_RANGE_SIZE_TYPE_HPP #define BOOST_RANGE_SIZE_TYPE_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif #include <boost/range/config.hpp> #include <boost/range/difference_type.hpp> -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#include <boost/range/detail/size_type.hpp> -#else +#include <boost/range/concepts.hpp> #include <boost/utility/enable_if.hpp> #include <boost/type_traits/make_unsigned.hpp> @@ -45,8 +43,8 @@ namespace boost template<typename C> static yes_type test(BOOST_DEDUCED_TYPENAME C::size_type x); - template<typename C, typename Arg> - static no_type test(Arg x); + template<typename C> + static no_type test(...); public: static const bool value = sizeof(test<T>(0)) == sizeof(yes_type); @@ -63,7 +61,7 @@ namespace boost template<typename C> struct range_size< C, - BOOST_DEDUCED_TYPENAME enable_if<has_size_type<C>, void>::type + BOOST_DEDUCED_TYPENAME ::boost::enable_if<has_size_type<C>, void>::type > { typedef BOOST_DEDUCED_TYPENAME C::size_type type; @@ -74,16 +72,27 @@ namespace boost template< class T > 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 -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif |