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/utility
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/utility')
-rw-r--r--3rdParty/Boost/src/boost/utility/detail/in_place_factory_prefix.hpp36
-rw-r--r--3rdParty/Boost/src/boost/utility/detail/in_place_factory_suffix.hpp23
-rw-r--r--3rdParty/Boost/src/boost/utility/in_place_factory.hpp88
-rw-r--r--3rdParty/Boost/src/boost/utility/value_init.hpp258
4 files changed, 147 insertions, 258 deletions
diff --git a/3rdParty/Boost/src/boost/utility/detail/in_place_factory_prefix.hpp b/3rdParty/Boost/src/boost/utility/detail/in_place_factory_prefix.hpp
new file mode 100644
index 0000000..afd76b5
--- /dev/null
+++ b/3rdParty/Boost/src/boost/utility/detail/in_place_factory_prefix.hpp
@@ -0,0 +1,36 @@
+// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
+// Copyright (C) 2007, Tobias Schwinger.
+//
+// Use, modification, and distribution is subject to 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)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+// fernando_cacciola@hotmail.com
+//
+#ifndef BOOST_UTILITY_DETAIL_INPLACE_FACTORY_PREFIX_04APR2007_HPP
+#define BOOST_UTILITY_DETAIL_INPLACE_FACTORY_PREFIX_04APR2007_HPP
+
+#include <new>
+#include <cstddef>
+#include <boost/config.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/punctuation/paren.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+
+#define BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_INIT(z,n,_) BOOST_PP_CAT(m_a,n) BOOST_PP_LPAREN() BOOST_PP_CAT(a,n) BOOST_PP_RPAREN()
+#define BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_DECL(z,n,_) BOOST_PP_CAT(A,n) const& BOOST_PP_CAT(m_a,n);
+
+#define BOOST_MAX_INPLACE_FACTORY_ARITY 10
+
+#undef BOOST_UTILITY_DETAIL_INPLACE_FACTORY_SUFFIX_04APR2007_HPP
+
+#endif
+
diff --git a/3rdParty/Boost/src/boost/utility/detail/in_place_factory_suffix.hpp b/3rdParty/Boost/src/boost/utility/detail/in_place_factory_suffix.hpp
new file mode 100644
index 0000000..58f48c7
--- /dev/null
+++ b/3rdParty/Boost/src/boost/utility/detail/in_place_factory_suffix.hpp
@@ -0,0 +1,23 @@
+// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
+// Copyright (C) 2007, Tobias Schwinger.
+//
+// Use, modification, and distribution is subject to 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)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+// fernando_cacciola@hotmail.com
+//
+#ifndef BOOST_UTILITY_DETAIL_INPLACE_FACTORY_SUFFIX_04APR2007_HPP
+#define BOOST_UTILITY_DETAIL_INPLACE_FACTORY_SUFFIX_04APR2007_HPP
+
+#undef BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_INIT
+#undef BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_DECL
+#undef BOOST_MAX_INPLACE_FACTORY_ARITY
+
+#undef BOOST_UTILITY_DETAIL_INPLACE_FACTORY_PREFIX_04APR2007_HPP
+
+#endif
+
diff --git a/3rdParty/Boost/src/boost/utility/in_place_factory.hpp b/3rdParty/Boost/src/boost/utility/in_place_factory.hpp
new file mode 100644
index 0000000..f84b003
--- /dev/null
+++ b/3rdParty/Boost/src/boost/utility/in_place_factory.hpp
@@ -0,0 +1,88 @@
+// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
+// Copyright (C) 2007, Tobias Schwinger.
+//
+// Use, modification, and distribution is subject to 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)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+// fernando_cacciola@hotmail.com
+//
+#ifndef BOOST_UTILITY_INPLACE_FACTORY_04APR2007_HPP
+#ifndef BOOST_PP_IS_ITERATING
+
+#include <boost/utility/detail/in_place_factory_prefix.hpp>
+
+namespace boost {
+
+class in_place_factory_base {} ;
+
+#define BOOST_PP_ITERATION_LIMITS (0, BOOST_MAX_INPLACE_FACTORY_ARITY)
+#define BOOST_PP_FILENAME_1 <boost/utility/in_place_factory.hpp>
+#include BOOST_PP_ITERATE()
+
+} // namespace boost
+
+#include <boost/utility/detail/in_place_factory_suffix.hpp>
+
+#define BOOST_UTILITY_INPLACE_FACTORY_04APR2007_HPP
+#else
+#define N BOOST_PP_ITERATION()
+
+#if N
+template< BOOST_PP_ENUM_PARAMS(N, class A) >
+#endif
+class BOOST_PP_CAT(in_place_factory,N)
+ :
+ public in_place_factory_base
+{
+public:
+
+ explicit BOOST_PP_CAT(in_place_factory,N)
+ ( BOOST_PP_ENUM_BINARY_PARAMS(N,A,const& a) )
+#if N > 0
+ : BOOST_PP_ENUM(N, BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_INIT, _)
+#endif
+ {}
+
+ template<class T>
+ void* apply(void* address
+ BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) const
+ {
+ return new(address) T( BOOST_PP_ENUM_PARAMS(N, m_a) );
+ }
+
+ template<class T>
+ void* apply(void* address, std::size_t n
+ BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) const
+ {
+ for(char* next = address = this->BOOST_NESTED_TEMPLATE apply<T>(address);
+ !! --n;)
+ this->BOOST_NESTED_TEMPLATE apply<T>(next = next+sizeof(T));
+ return address;
+ }
+
+ BOOST_PP_REPEAT(N, BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_DECL, _)
+};
+
+#if N > 0
+template< BOOST_PP_ENUM_PARAMS(N, class A) >
+inline BOOST_PP_CAT(in_place_factory,N)< BOOST_PP_ENUM_PARAMS(N, A) >
+in_place( BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& a) )
+{
+ return BOOST_PP_CAT(in_place_factory,N)< BOOST_PP_ENUM_PARAMS(N, A) >
+ ( BOOST_PP_ENUM_PARAMS(N, a) );
+}
+#else
+inline in_place_factory0 in_place()
+{
+ return in_place_factory0();
+}
+#endif
+
+#undef N
+#endif
+#endif
+
diff --git a/3rdParty/Boost/src/boost/utility/value_init.hpp b/3rdParty/Boost/src/boost/utility/value_init.hpp
deleted file mode 100644
index 5de9585..0000000
--- a/3rdParty/Boost/src/boost/utility/value_init.hpp
+++ /dev/null
@@ -1,258 +0,0 @@
-// (C) Copyright 2002-2008, Fernando Luis Cacciola Carballal.
-//
-// 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)
-//
-// 21 Ago 2002 (Created) Fernando Cacciola
-// 24 Dec 2007 (Refactored and worked around various compiler bugs) Fernando Cacciola, Niels Dekker
-// 23 May 2008 (Fixed operator= const issue, added initialized_value) Niels Dekker, Fernando Cacciola
-// 21 Ago 2008 (Added swap) Niels Dekker, Fernando Cacciola
-// 20 Feb 2009 (Fixed logical const-ness issues) Niels Dekker, Fernando Cacciola
-// 03 Apr 2010 (Added initialized<T>, suggested by Jeffrey Hellrung, fixing #3472) Niels Dekker
-// 30 May 2010 (Made memset call conditional, fixing #3869) Niels Dekker
-//
-#ifndef BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
-#define BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
-
-// Note: The implementation of boost::value_initialized had to deal with the
-// fact that various compilers haven't fully implemented value-initialization.
-// The constructor of boost::value_initialized<T> works around these compiler
-// issues, by clearing the bytes of T, before constructing the T object it
-// contains. More details on these issues are at libs/utility/value_init.htm
-
-#include <boost/aligned_storage.hpp>
-#include <boost/config.hpp> // For BOOST_NO_COMPLETE_VALUE_INITIALIZATION.
-#include <boost/detail/workaround.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/cv_traits.hpp>
-#include <boost/type_traits/alignment_of.hpp>
-#include <boost/swap.hpp>
-#include <cstring>
-#include <new>
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#if _MSC_VER >= 1310
-// It is safe to ignore the following warning from MSVC 7.1 or higher:
-// "warning C4351: new behavior: elements of array will be default initialized"
-#pragma warning(disable: 4351)
-// It is safe to ignore the following MSVC warning, which may pop up when T is
-// a const type: "warning C4512: assignment operator could not be generated".
-#pragma warning(disable: 4512)
-#endif
-#endif
-
-#ifdef BOOST_NO_COMPLETE_VALUE_INITIALIZATION
- // Implementation detail: The macro BOOST_DETAIL_VALUE_INIT_WORKAROUND_SUGGESTED
- // suggests that a workaround should be applied, because of compiler issues
- // regarding value-initialization.
- #define BOOST_DETAIL_VALUE_INIT_WORKAROUND_SUGGESTED
-#endif
-
-// Implementation detail: The macro BOOST_DETAIL_VALUE_INIT_WORKAROUND
-// switches the value-initialization workaround either on or off.
-#ifndef BOOST_DETAIL_VALUE_INIT_WORKAROUND
- #ifdef BOOST_DETAIL_VALUE_INIT_WORKAROUND_SUGGESTED
- #define BOOST_DETAIL_VALUE_INIT_WORKAROUND 1
- #else
- #define BOOST_DETAIL_VALUE_INIT_WORKAROUND 0
- #endif
-#endif
-
-namespace boost {
-
-template<class T>
-class initialized
-{
- private :
- struct wrapper
- {
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
- typename
-#endif
- remove_const<T>::type data;
-
- wrapper()
- :
- data()
- {
- }
-
- wrapper(T const & arg)
- :
- data(arg)
- {
- }
- };
-
- mutable
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
- typename
-#endif
- aligned_storage<sizeof(wrapper), alignment_of<wrapper>::value>::type x;
-
- wrapper * wrapper_address() const
- {
- return static_cast<wrapper *>( static_cast<void*>(&x));
- }
-
- public :
-
- initialized()
- {
-#if BOOST_DETAIL_VALUE_INIT_WORKAROUND
- std::memset(&x, 0, sizeof(x));
-#endif
- new (wrapper_address()) wrapper();
- }
-
- initialized(initialized const & arg)
- {
- new (wrapper_address()) wrapper( static_cast<wrapper const &>(*(arg.wrapper_address())));
- }
-
- explicit initialized(T const & arg)
- {
- new (wrapper_address()) wrapper(arg);
- }
-
- initialized & operator=(initialized const & arg)
- {
- // Assignment is only allowed when T is non-const.
- BOOST_STATIC_ASSERT( ! is_const<T>::value );
- *wrapper_address() = static_cast<wrapper const &>(*(arg.wrapper_address()));
- return *this;
- }
-
- ~initialized()
- {
- wrapper_address()->wrapper::~wrapper();
- }
-
- T const & data() const
- {
- return wrapper_address()->data;
- }
-
- T& data()
- {
- return wrapper_address()->data;
- }
-
- void swap(initialized & arg)
- {
- ::boost::swap( this->data(), arg.data() );
- }
-
- operator T const &() const
- {
- return wrapper_address()->data;
- }
-
- operator T&()
- {
- return wrapper_address()->data;
- }
-
-} ;
-
-template<class T>
-T const& get ( initialized<T> const& x )
-{
- return x.data() ;
-}
-
-template<class T>
-T& get ( initialized<T>& x )
-{
- return x.data() ;
-}
-
-template<class T>
-void swap ( initialized<T> & lhs, initialized<T> & rhs )
-{
- lhs.swap(rhs) ;
-}
-
-template<class T>
-class value_initialized
-{
- private :
-
- // initialized<T> does value-initialization by default.
- initialized<T> m_data;
-
- public :
-
- value_initialized()
- :
- m_data()
- { }
-
- T const & data() const
- {
- return m_data.data();
- }
-
- T& data()
- {
- return m_data.data();
- }
-
- void swap(value_initialized & arg)
- {
- m_data.swap(arg.m_data);
- }
-
- operator T const &() const
- {
- return m_data;
- }
-
- operator T&()
- {
- return m_data;
- }
-} ;
-
-
-template<class T>
-T const& get ( value_initialized<T> const& x )
-{
- return x.data() ;
-}
-
-template<class T>
-T& get ( value_initialized<T>& x )
-{
- return x.data() ;
-}
-
-template<class T>
-void swap ( value_initialized<T> & lhs, value_initialized<T> & rhs )
-{
- lhs.swap(rhs) ;
-}
-
-
-class initialized_value_t
-{
- public :
-
- template <class T> operator T() const
- {
- return initialized<T>().data();
- }
-};
-
-initialized_value_t const initialized_value = {} ;
-
-
-} // namespace boost
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#endif