diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-04-11 18:19:17 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-04-11 19:20:07 (GMT) |
commit | 857e44c156a1dbefcb49bb5792c4384cebd8762a (patch) | |
tree | 11947fb81ad9c502627f1b2bb8f090fb8d53c107 /3rdParty/Boost/src/boost/detail | |
parent | 77d4eb7588e113beaa03f3347523b26adefdeb06 (diff) | |
download | swift-857e44c156a1dbefcb49bb5792c4384cebd8762a.zip swift-857e44c156a1dbefcb49bb5792c4384cebd8762a.tar.bz2 |
Updated Boost to 1.42.
Diffstat (limited to '3rdParty/Boost/src/boost/detail')
-rw-r--r-- | 3rdParty/Boost/src/boost/detail/container_fwd.hpp | 14 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/detail/endian.hpp | 2 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/detail/interlocked.hpp | 16 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/detail/no_exceptions_support.hpp | 87 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/detail/scoped_enum_emulation.hpp | 56 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/detail/sp_typeinfo.hpp | 54 | ||||
-rw-r--r-- | 3rdParty/Boost/src/boost/detail/utf8_codecvt_facet.hpp | 21 |
7 files changed, 222 insertions, 28 deletions
diff --git a/3rdParty/Boost/src/boost/detail/container_fwd.hpp b/3rdParty/Boost/src/boost/detail/container_fwd.hpp index f54dedb..bc7f780 100644 --- a/3rdParty/Boost/src/boost/detail/container_fwd.hpp +++ b/3rdParty/Boost/src/boost/detail/container_fwd.hpp @@ -13,12 +13,6 @@ #include <boost/config.hpp> #include <boost/detail/workaround.hpp> -#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) -#define BOOST_HASH_CHAR_TRAITS string_char_traits -#else -#define BOOST_HASH_CHAR_TRAITS char_traits -#endif - #if ((defined(__GLIBCPP__) || defined(__GLIBCXX__)) && defined(_GLIBCXX_DEBUG)) \ || BOOST_WORKAROUND(__BORLANDC__, > 0x551) \ || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x842)) \ @@ -65,7 +59,13 @@ namespace std { template <class T> class allocator; template <class charT, class traits, class Allocator> class basic_string; - template <class charT> struct BOOST_HASH_CHAR_TRAITS; + +#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) + template <class charT> struct string_char_traits; +#else + template <class charT> struct char_traits; +#endif + template <class T> class complex; } diff --git a/3rdParty/Boost/src/boost/detail/endian.hpp b/3rdParty/Boost/src/boost/detail/endian.hpp index 803d7e2..36ddb7e 100644 --- a/3rdParty/Boost/src/boost/detail/endian.hpp +++ b/3rdParty/Boost/src/boost/detail/endian.hpp @@ -50,7 +50,7 @@ # define BOOST_BYTE_ORDER 1234 #elif defined(__sparc) || defined(__sparc__) \ || defined(_POWER) || defined(__powerpc__) \ - || defined(__ppc__) || defined(__hpux) \ + || defined(__ppc__) || defined(__hpux) || defined(__hppa) \ || defined(_MIPSEB) || defined(_POWER) \ || defined(__s390__) # define BOOST_BIG_ENDIAN diff --git a/3rdParty/Boost/src/boost/detail/interlocked.hpp b/3rdParty/Boost/src/boost/detail/interlocked.hpp index b6c8d75..fccebc3 100644 --- a/3rdParty/Boost/src/boost/detail/interlocked.hpp +++ b/3rdParty/Boost/src/boost/detail/interlocked.hpp @@ -54,11 +54,23 @@ extern "C" long __cdecl InterlockedExchangeAdd( long*, long ); #elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN ) +#if defined( __CLRCALL_PURE_OR_CDECL ) + +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * ); +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedDecrement( long volatile * ); +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( long volatile *, long, long ); +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchange( long volatile *, long ); +extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( long volatile *, long ); + +#else + extern "C" long __cdecl _InterlockedIncrement( long volatile * ); extern "C" long __cdecl _InterlockedDecrement( long volatile * ); extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long ); -extern "C" long __cdecl _InterlockedExchange( long volatile *, long); -extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long); +extern "C" long __cdecl _InterlockedExchange( long volatile *, long ); +extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long ); + +#endif # pragma intrinsic( _InterlockedIncrement ) # pragma intrinsic( _InterlockedDecrement ) diff --git a/3rdParty/Boost/src/boost/detail/no_exceptions_support.hpp b/3rdParty/Boost/src/boost/detail/no_exceptions_support.hpp new file mode 100644 index 0000000..d94e358 --- /dev/null +++ b/3rdParty/Boost/src/boost/detail/no_exceptions_support.hpp @@ -0,0 +1,87 @@ +#ifndef BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP_ +#define BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP_ + +#if (defined _MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif + +//---------------------------------------------------------------------- +// (C) Copyright 2004 Pavel Vozenilek. +// 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) +// +// +// This file contains helper macros used when exception support may be +// disabled (as indicated by macro BOOST_NO_EXCEPTIONS). +// +// Before picking up these macros you may consider using RAII techniques +// to deal with exceptions - their syntax can be always the same with +// or without exception support enabled. +// + +/* Example of use: + +void foo() { + BOOST_TRY { + ... + } BOOST_CATCH(const std::bad_alloc&) { + ... + BOOST_RETHROW + } BOOST_CATCH(const std::exception& e) { + ... + } + BOOST_CATCH_END +} + +With exception support enabled it will expand into: + +void foo() { + { try { + ... + } catch (const std::bad_alloc&) { + ... + throw; + } catch (const std::exception& e) { + ... + } + } +} + +With exception support disabled it will expand into: + +void foo() { + { if(true) { + ... + } else if (false) { + ... + } else if (false) { + ... + } + } +} +*/ +//---------------------------------------------------------------------- + +#include <boost/config.hpp> +#include <boost/detail/workaround.hpp> + +#if !(defined BOOST_NO_EXCEPTIONS) +# define BOOST_TRY { try +# define BOOST_CATCH(x) catch(x) +# define BOOST_RETHROW throw; +# define BOOST_CATCH_END } +#else +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +# define BOOST_TRY { if ("") +# define BOOST_CATCH(x) else if (!"") +# else +# define BOOST_TRY { if (true) +# define BOOST_CATCH(x) else if (false) +# endif +# define BOOST_RETHROW +# define BOOST_CATCH_END } +#endif + + +#endif diff --git a/3rdParty/Boost/src/boost/detail/scoped_enum_emulation.hpp b/3rdParty/Boost/src/boost/detail/scoped_enum_emulation.hpp new file mode 100644 index 0000000..644c138 --- /dev/null +++ b/3rdParty/Boost/src/boost/detail/scoped_enum_emulation.hpp @@ -0,0 +1,56 @@ +// scoped_enum_emulation.hpp ---------------------------------------------------------// + +// Copyright Beman Dawes, 2009 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +// Generates C++0x scoped enums if the feature is present, otherwise emulates C++0x +// scoped enums with C++03 namespaces and enums. The Boost.Config BOOST_NO_SCOPED_ENUMS +// macro is used to detect feature support. +// +// See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf for a +// description of the scoped enum feature. Note that the committee changed the name +// from strongly typed enum to scoped enum. +// +// Caution: only the syntax is emulated; the semantics are not emulated and +// the syntax emulation doesn't include being able to specify the underlying +// representation type. +// +// The emulation is via struct rather than namespace to allow use within classes. +// Thanks to Andrey Semashev for pointing that out. +// +// Helpful comments and suggestions were also made by Kjell Elster, Phil Endecott, +// Joel Falcou, Mathias Gaunard, Felipe Magno de Almeida, Matt Calabrese, Vincente +// Botet, and Daniel James. +// +// Sample usage: +// +// BOOST_SCOPED_ENUM_START(algae) { green, red, cyan }; BOOST_SCOPED_ENUM_END +// ... +// BOOST_SCOPED_ENUM(algae) sample( algae::red ); +// void foo( BOOST_SCOPED_ENUM(algae) color ); +// ... +// sample = algae::green; +// foo( algae::cyan ); + +#ifndef BOOST_SCOPED_ENUM_EMULATION_HPP +#define BOOST_SCOPED_ENUM_EMULATION_HPP + +#include <boost/config.hpp> + +#ifdef BOOST_NO_SCOPED_ENUMS + +# define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_t +# define BOOST_SCOPED_ENUM_END }; +# define BOOST_SCOPED_ENUM(name) name::enum_t + +#else + +# define BOOST_SCOPED_ENUM_START(name) enum class name +# define BOOST_SCOPED_ENUM_END +# define BOOST_SCOPED_ENUM(name) name + +#endif + +#endif // BOOST_SCOPED_ENUM_EMULATION_HPP diff --git a/3rdParty/Boost/src/boost/detail/sp_typeinfo.hpp b/3rdParty/Boost/src/boost/detail/sp_typeinfo.hpp index e78c943..636fe27 100644 --- a/3rdParty/Boost/src/boost/detail/sp_typeinfo.hpp +++ b/3rdParty/Boost/src/boost/detail/sp_typeinfo.hpp @@ -19,20 +19,66 @@ #if defined( BOOST_NO_TYPEID ) +#include <boost/current_function.hpp> +#include <functional> + namespace boost { namespace detail { -typedef void* sp_typeinfo; +class sp_typeinfo +{ +private: + + sp_typeinfo( sp_typeinfo const& ); + sp_typeinfo& operator=( sp_typeinfo const& ); + + char const * name_; + +public: + + explicit sp_typeinfo( char const * name ): name_( name ) + { + } + + bool operator==( sp_typeinfo const& rhs ) const + { + return this == &rhs; + } + + bool operator!=( sp_typeinfo const& rhs ) const + { + return this != &rhs; + } + + bool before( sp_typeinfo const& rhs ) const + { + return std::less< sp_typeinfo const* >()( this, &rhs ); + } + + char const* name() const + { + return name_; + } +}; template<class T> struct sp_typeid_ { - static char v_; + static sp_typeinfo ti_; + + static char const * name() + { + return BOOST_CURRENT_FUNCTION; + } }; -template<class T> char sp_typeid_< T >::v_; +template<class T> sp_typeinfo sp_typeid_< T >::ti_( sp_typeid_< T >::name() ); + +template<class T> struct sp_typeid_< T & >: sp_typeid_< T > +{ +}; template<class T> struct sp_typeid_< T const >: sp_typeid_< T > { @@ -50,7 +96,7 @@ template<class T> struct sp_typeid_< T const volatile >: sp_typeid_< T > } // namespace boost -#define BOOST_SP_TYPEID(T) (&boost::detail::sp_typeid_<T>::v_) +#define BOOST_SP_TYPEID(T) (boost::detail::sp_typeid_<T>::ti_) #else diff --git a/3rdParty/Boost/src/boost/detail/utf8_codecvt_facet.hpp b/3rdParty/Boost/src/boost/detail/utf8_codecvt_facet.hpp index ac7e7bf..b777ff9 100644 --- a/3rdParty/Boost/src/boost/detail/utf8_codecvt_facet.hpp +++ b/3rdParty/Boost/src/boost/detail/utf8_codecvt_facet.hpp @@ -79,25 +79,18 @@ // specialized on those types for this to work. #include <locale> -// for mbstate_t -#include <wchar.h> -// for std::size_t -#include <cstddef> +#include <cwchar> // for mbstate_t +#include <cstddef> // for std::size_t #include <boost/config.hpp> #include <boost/detail/workaround.hpp> +#if defined(BOOST_NO_STDC_NAMESPACE) namespace std { - #if defined(__LIBCOMO__) - using ::mbstate_t; - #elif defined(BOOST_DINKUMWARE_STDLIB) && !defined(__BORLANDC__) - using ::mbstate_t; - #elif defined(__SGI_STL_PORT) - #elif defined(BOOST_NO_STDC_NAMESPACE) - using ::mbstate_t; - using ::codecvt; - #endif -} // namespace std + using ::mbstate_t; + using ::size_t; +} +#endif #if !defined(__MSL_CPP__) && !defined(__LIBCOMO__) #define BOOST_CODECVT_DO_LENGTH_CONST const |