summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-03-14 18:35:17 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-03-14 18:35:17 (GMT)
commita135c6ff4dcded5661a2321512960b14cf8c15c8 (patch)
treeb0017ecfe702304f592b9d4e8b943784cff26fb2 /3rdParty/Boost/src/boost/range/detail
parent02d6188ab335e6c62b8341b84579d9549d215118 (diff)
downloadswift-a135c6ff4dcded5661a2321512960b14cf8c15c8.zip
swift-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/detail')
-rw-r--r--3rdParty/Boost/src/boost/range/detail/begin.hpp28
-rw-r--r--3rdParty/Boost/src/boost/range/detail/end.hpp37
-rw-r--r--3rdParty/Boost/src/boost/range/detail/safe_bool.hpp72
3 files changed, 107 insertions, 30 deletions
diff --git a/3rdParty/Boost/src/boost/range/detail/begin.hpp b/3rdParty/Boost/src/boost/range/detail/begin.hpp
index 06c2561..f3da732 100644
--- a/3rdParty/Boost/src/boost/range/detail/begin.hpp
+++ b/3rdParty/Boost/src/boost/range/detail/begin.hpp
@@ -19,9 +19,9 @@
# include <boost/range/value_type.hpp>
#endif
-namespace boost
+namespace boost
{
-
+
namespace range_detail
{
template< typename T >
@@ -30,7 +30,7 @@ namespace boost
//////////////////////////////////////////////////////////////////////
// default
//////////////////////////////////////////////////////////////////////
-
+
template<>
struct range_begin<std_container_>
{
@@ -40,11 +40,11 @@ namespace boost
return c.begin();
};
};
-
+
//////////////////////////////////////////////////////////////////////
// pair
//////////////////////////////////////////////////////////////////////
-
+
template<>
struct range_begin<std_pair_>
{
@@ -54,11 +54,11 @@ namespace boost
return p.first;
}
};
-
+
//////////////////////////////////////////////////////////////////////
// array
//////////////////////////////////////////////////////////////////////
-
+
template<>
struct range_begin<array_>
{
@@ -78,14 +78,16 @@ namespace boost
};
} // namespace 'range_detail'
-
- template< typename C >
- inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
- begin( C& c )
+
+ namespace range_adl_barrier
{
- return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
+ template< typename C >
+ inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
+ begin( C& c )
+ {
+ return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
+ }
}
-
} // namespace 'boost'
diff --git a/3rdParty/Boost/src/boost/range/detail/end.hpp b/3rdParty/Boost/src/boost/range/detail/end.hpp
index d6a7368..8b5f35d 100644
--- a/3rdParty/Boost/src/boost/range/detail/end.hpp
+++ b/3rdParty/Boost/src/boost/range/detail/end.hpp
@@ -24,7 +24,7 @@
# include <boost/range/detail/remove_extent.hpp>
# endif
-namespace boost
+namespace boost
{
namespace range_detail
{
@@ -34,39 +34,39 @@ namespace boost
//////////////////////////////////////////////////////////////////////
// default
//////////////////////////////////////////////////////////////////////
-
+
template<>
struct range_end<std_container_>
{
template< typename C >
- static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
+ static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
fun( C& c )
{
return c.end();
};
};
-
+
//////////////////////////////////////////////////////////////////////
// pair
//////////////////////////////////////////////////////////////////////
-
+
template<>
struct range_end<std_pair_>
{
template< typename P >
- static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type
+ static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type
fun( const P& p )
{
return p.second;
}
};
-
+
//////////////////////////////////////////////////////////////////////
// array
//////////////////////////////////////////////////////////////////////
-
+
template<>
- struct range_end<array_>
+ struct range_end<array_>
{
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)
template< typename T, std::size_t sz >
@@ -82,16 +82,19 @@ namespace boost
}
#endif
};
-
+
} // namespace 'range_detail'
-
- template< typename C >
- inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
- end( C& c )
+
+ namespace range_adl_barrier
{
- return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
- }
-
+ template< typename C >
+ inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
+ end( C& c )
+ {
+ return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
+ }
+ } // namespace range_adl_barrier
+
} // namespace 'boost'
# endif // VC6
diff --git a/3rdParty/Boost/src/boost/range/detail/safe_bool.hpp b/3rdParty/Boost/src/boost/range/detail/safe_bool.hpp
new file mode 100644
index 0000000..182e510
--- /dev/null
+++ b/3rdParty/Boost/src/boost/range/detail/safe_bool.hpp
@@ -0,0 +1,72 @@
+// This header intentionally has no include guards.
+//
+// Copyright (c) 2010 Neil Groves
+// Distributed under the Boost Software License, Version 1.0.
+// See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+//
+// This code utilises the experience gained during the evolution of
+// <boost/smart_ptr/operator_bool.hpp>
+#ifndef BOOST_RANGE_SAFE_BOOL_INCLUDED_HPP
+#define BOOST_RANGE_SAFE_BOOL_INCLUDED_HPP
+
+#include <boost/config.hpp>
+#include <boost/range/config.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+
+template<class DataMemberPtr>
+class safe_bool
+{
+public:
+ typedef safe_bool this_type;
+
+#if (defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570)) || defined(__CINT_)
+ typedef bool unspecified_bool_type;
+ static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr)
+ {
+ return x;
+ }
+#elif defined(_MANAGED)
+ static void unspecified_bool(this_type***)
+ {
+ }
+ typedef void(*unspecified_bool_type)(this_type***);
+ static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr)
+ {
+ return x ? unspecified_bool : 0;
+ }
+#elif \
+ ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \
+ ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \
+ ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) )
+
+ typedef bool (this_type::*unspecified_bool_type)() const;
+
+ static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr)
+ {
+ return x ? &this_type::detail_safe_bool_member_fn : 0;
+ }
+private:
+ bool detail_safe_bool_member_fn() const { return false; }
+#else
+ typedef DataMemberPtr unspecified_bool_type;
+ static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr p)
+ {
+ return x ? p : 0;
+ }
+#endif
+private:
+ safe_bool();
+ safe_bool(const safe_bool&);
+ void operator=(const safe_bool&);
+ ~safe_bool();
+};
+
+ } // namespace range_detail
+} // namespace boost
+
+#endif // include guard