diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-03-14 18:35:17 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-03-14 18:35:17 (GMT) |
commit | a135c6ff4dcded5661a2321512960b14cf8c15c8 (patch) | |
tree | b0017ecfe702304f592b9d4e8b943784cff26fb2 /3rdParty/Boost/src/boost/range/concepts.hpp | |
parent | 02d6188ab335e6c62b8341b84579d9549d215118 (diff) | |
download | swift-contrib-a135c6ff4dcded5661a2321512960b14cf8c15c8.zip swift-contrib-a135c6ff4dcded5661a2321512960b14cf8c15c8.tar.bz2 |
Updated Boost to 1.46.1.
This should hopefuily fix a hang on shutdown on Mac OS X.
Resolves: #782
Release-Notes: Fixed a potential hang on shutdown on Mac OS X.
Diffstat (limited to '3rdParty/Boost/src/boost/range/concepts.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/range/concepts.hpp | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/3rdParty/Boost/src/boost/range/concepts.hpp b/3rdParty/Boost/src/boost/range/concepts.hpp index 8e4d2cf..5965293 100644 --- a/3rdParty/Boost/src/boost/range/concepts.hpp +++ b/3rdParty/Boost/src/boost/range/concepts.hpp @@ -98,8 +98,9 @@ namespace boost { // classes: // // The Range algorithms often do not require that the iterators are - // Assignable, but the correct standard conformant iterators - // do require the iterators to be a model of the Assignable concept. + // Assignable or default constructable, but the correct standard + // conformant iterators do require the iterators to be a model of the + // Assignable concept. // Iterators that contains a functor that is not assignable therefore // are not correct models of the standard iterator concepts, // despite being adequate for most algorithms. An example of this @@ -141,6 +142,26 @@ namespace boost { BOOST_DEDUCED_TYPENAME SinglePassIteratorConcept::traversal_category, single_pass_traversal_tag >)); + + BOOST_CONCEPT_USAGE(SinglePassIteratorConcept) + { + Iterator i2(++i); + boost::ignore_unused_variable_warning(i2); + + // deliberately we are loose with the postfix version for the single pass + // iterator due to the commonly poor adherence to the specification means that + // many algorithms would be unusable, whereas actually without the check they + // work + (void)(i++); + + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::reference r1(*i); + boost::ignore_unused_variable_warning(r1); + + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::reference r2(*(++i)); + boost::ignore_unused_variable_warning(r2); + } + private: + Iterator i; #endif }; @@ -160,6 +181,20 @@ namespace boost { BOOST_DEDUCED_TYPENAME ForwardIteratorConcept::traversal_category, forward_traversal_tag >)); + + BOOST_CONCEPT_USAGE(ForwardIteratorConcept) + { + // See the above note in the SinglePassIteratorConcept about the handling of the + // postfix increment. Since with forward and better iterators there is no need + // for a proxy, we can sensibly require that the dereference result + // is convertible to reference. + Iterator i2(i++); + boost::ignore_unused_variable_warning(i2); + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::reference r(*(i++)); + boost::ignore_unused_variable_warning(r); + } + private: + Iterator i; #endif }; |