From 4dda81e93a94dc9ecde81eaf3e7de217b4021415 Mon Sep 17 00:00:00 2001 From: nobody Date: Tue, 21 Mar 2006 02:26:31 +0000 Subject: [PATCH 01/22] This commit was manufactured by cvs2svn to create branch 'RC_1_34_0'. [SVN r33417] From 71a268689d91770aa8cd10b4d0704e78e7ef4ab3 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sun, 30 Apr 2006 03:05:01 +0000 Subject: [PATCH 02/22] merged from trunk [SVN r33868] --- include/boost/detail/is_incrementable.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/boost/detail/is_incrementable.hpp b/include/boost/detail/is_incrementable.hpp index 0ae4eca..cb7d7a7 100755 --- a/include/boost/detail/is_incrementable.hpp +++ b/include/boost/detail/is_incrementable.hpp @@ -4,13 +4,15 @@ #ifndef IS_INCREMENTABLE_DWA200415_HPP # define IS_INCREMENTABLE_DWA200415_HPP -# include # include # include # include # include # include +// Must be the last include +# include + namespace boost { namespace detail { // is_incrementable metafunction @@ -117,5 +119,6 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1, ::boost::detail::is_postfix_incrementable) } // namespace boost +# include #endif // IS_INCREMENTABLE_DWA200415_HPP From 37cd3c6dd2a3475dab194067f2125445df361697 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 17 May 2006 22:33:47 +0000 Subject: [PATCH 03/22] Windows CE patch by Michael Fink [SVN r33986] --- include/boost/detail/interlocked.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/include/boost/detail/interlocked.hpp b/include/boost/detail/interlocked.hpp index 3149319..76a24c3 100644 --- a/include/boost/detail/interlocked.hpp +++ b/include/boost/detail/interlocked.hpp @@ -31,6 +31,22 @@ # define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER InterlockedCompareExchangePointer # define BOOST_INTERLOCKED_EXCHANGE_POINTER InterlockedExchangePointer +#elif defined(_WIN32_WCE) + +// under Windows CE we still have old-style Interlocked* functions + +extern "C" long __cdecl InterlockedIncrement( long* ); +extern "C" long __cdecl InterlockedDecrement( long* ); +extern "C" long __cdecl InterlockedCompareExchange( long*, long, long ); +extern "C" long __cdecl InterlockedExchange( long*, long ); +extern "C" long __cdecl InterlockedExchangeAdd( long*, long ); + +# define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement +# define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement +# define BOOST_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange +# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange +# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd + #elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN ) extern "C" long __cdecl _InterlockedIncrement( long volatile * ); @@ -44,18 +60,25 @@ extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long); # pragma intrinsic( _InterlockedCompareExchange ) # pragma intrinsic( _InterlockedExchange ) # pragma intrinsic( _InterlockedExchangeAdd ) + # if defined(_M_IA64) || defined(_M_AMD64) + extern "C" void* __cdecl _InterlockedCompareExchangePointer( void* volatile *, void*, void* ); extern "C" void* __cdecl _InterlockedExchangePointer( void* volatile *, void* ); + # pragma intrinsic( _InterlockedCompareExchangePointer ) # pragma intrinsic( _InterlockedExchangePointer ) + # define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer # define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer + # else + # define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \ ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare))) # define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange))) + # endif # define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement @@ -77,6 +100,7 @@ extern "C" __declspec(dllimport) long __stdcall InterlockedDecrement( long volat extern "C" __declspec(dllimport) long __stdcall InterlockedCompareExchange( long volatile *, long, long ); extern "C" __declspec(dllimport) long __stdcall InterlockedExchange( long volatile *, long ); extern "C" __declspec(dllimport) long __stdcall InterlockedExchangeAdd( long volatile *, long ); + } // namespace detail } // namespace boost @@ -86,6 +110,7 @@ extern "C" __declspec(dllimport) long __stdcall InterlockedExchangeAdd( long vol # define BOOST_INTERLOCKED_COMPARE_EXCHANGE ::boost::detail::InterlockedCompareExchange # define BOOST_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange # define BOOST_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd + # define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \ ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare))) # define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ From 2f7218cdc4202899d4cfce6ef769f57fd80be655 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Thu, 5 Oct 2006 13:51:07 +0000 Subject: [PATCH 04/22] Make is_reference_to_pointer work properly with an abstract class [SVN r35498] --- include/boost/detail/indirect_traits.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/boost/detail/indirect_traits.hpp b/include/boost/detail/indirect_traits.hpp index 6ee8a10..2d57e15 100755 --- a/include/boost/detail/indirect_traits.hpp +++ b/include/boost/detail/indirect_traits.hpp @@ -388,27 +388,27 @@ typename is_pointer_help::type reference_to_pointer_helper(V&); outer_no_type reference_to_pointer_helper(...); template -struct is_reference_to_pointer +struct reference_to_pointer_impl { static T t; BOOST_STATIC_CONSTANT( bool, value - = (is_reference::value - && sizeof((reference_to_pointer_helper)(t)) == sizeof(inner_yes_type)) + = (sizeof((reference_to_pointer_helper)(t)) == sizeof(inner_yes_type)) ); typedef mpl::bool_ type; - +} + +template +struct is_reference_to_pointer + : mpl::eval_if, reference_to_pointer_impl, mpl::false_>::type +{ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_pointer,(T)) }; template struct is_reference_to_function_pointer - : mpl::if_< - is_reference - , is_pointer_to_function_aux - , mpl::bool_ - >::type + : mpl::eval_if, is_pointer_to_function_aux, false_>::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_function_pointer,(T)) }; From 4039b44fceed03ed6d53b910a4895d7259d997e5 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 6 Oct 2006 15:22:30 +0000 Subject: [PATCH 05/22] Fix typos. [SVN r35503] --- include/boost/detail/indirect_traits.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/detail/indirect_traits.hpp b/include/boost/detail/indirect_traits.hpp index 2d57e15..043adaf 100755 --- a/include/boost/detail/indirect_traits.hpp +++ b/include/boost/detail/indirect_traits.hpp @@ -397,7 +397,7 @@ struct reference_to_pointer_impl ); typedef mpl::bool_ type; -} +}; template struct is_reference_to_pointer @@ -408,7 +408,7 @@ struct is_reference_to_pointer template struct is_reference_to_function_pointer - : mpl::eval_if, is_pointer_to_function_aux, false_>::type +y : mpl::eval_if, is_pointer_to_function_aux, mpl::false_>::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_function_pointer,(T)) }; From 0dc54e7b18921b199e41d363b33e0fea0c6bf3f7 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Mon, 9 Oct 2006 12:29:34 +0000 Subject: [PATCH 06/22] Kill off stray 'y' character. [SVN r35530] --- include/boost/detail/indirect_traits.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/detail/indirect_traits.hpp b/include/boost/detail/indirect_traits.hpp index 043adaf..9b22d6b 100755 --- a/include/boost/detail/indirect_traits.hpp +++ b/include/boost/detail/indirect_traits.hpp @@ -408,7 +408,7 @@ struct is_reference_to_pointer template struct is_reference_to_function_pointer -y : mpl::eval_if, is_pointer_to_function_aux, mpl::false_>::type + : mpl::eval_if, is_pointer_to_function_aux, mpl::false_>::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_function_pointer,(T)) }; From 71ec49242eb9bfdd746fc9ed85b9d26c8d4d623d Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 13 Oct 2006 12:40:40 +0000 Subject: [PATCH 07/22] Added 64-bit Intel processor support. [SVN r35587] --- include/boost/detail/endian.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 5f12fbe..a41f5f2 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -47,7 +47,11 @@ #elif defined(__i386__) || defined(__alpha__) \ || defined(__ia64) || defined(__ia64__) \ || defined(_M_IX86) || defined(_M_IA64) \ - || defined(_M_ALPHA) + || defined(_M_ALPHA) || defined(__amd64) \ + || defined(__amd64__) || defined(_M_AMD64) \ + || defined(__x86_64) || defined(__x86_64__) \ + || defined(_M_X64) + # define BOOST_LITTLE_ENDIAN # define BOOST_BYTE_ORDER 1234 #else From 2551c9baf020c66ec7c0fec13d4d3a20636a8bf6 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 13 Oct 2006 17:08:47 +0000 Subject: [PATCH 08/22] Fix for HP-UX on Itanium. [SVN r35591] --- include/boost/detail/endian.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index a41f5f2..3d85740 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -39,7 +39,7 @@ # define BOOST_BYTE_ORDER __BYTE_ORDER #elif defined(__sparc) || defined(__sparc__) \ || defined(_POWER) || defined(__powerpc__) \ - || defined(__ppc__) || defined(__hppa) \ + || defined(__ppc__) || defined(__hpux) \ || defined(_MIPSEB) || defined(_POWER) \ || defined(__s390__) # define BOOST_BIG_ENDIAN From 8aebcc4fbdad58392a1fdf1f7705cb427e7986e6 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 20 Oct 2006 10:08:21 +0000 Subject: [PATCH 09/22] Updated patch from Boris Gubenko. [SVN r35672] --- include/boost/detail/endian.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 3d85740..524435d 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -37,6 +37,12 @@ # error Unknown machine endianness detected. # endif # define BOOST_BYTE_ORDER __BYTE_ORDER +#elif defined(_BIG_ENDIAN) +# define BOOST_BIG_ENDIAN +# define BOOST_BYTE_ORDER 4321 +#elif defined(_LITTLE_ENDIAN) +# define BOOST_LITTLE_ENDIAN +# define BOOST_BYTE_ORDER 1234 #elif defined(__sparc) || defined(__sparc__) \ || defined(_POWER) || defined(__powerpc__) \ || defined(__ppc__) || defined(__hpux) \ From dc34adabef0422279fb66e13f53e22d43788ad04 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Fri, 1 Dec 2006 11:34:43 +0000 Subject: [PATCH 10/22] Merged L & C issue fixes from trunk to branch. [SVN r36225] --- include/boost/detail/endian.hpp | 4 ++++ include/boost/detail/utf8_codecvt_facet.hpp | 8 +++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 524435d..4cc81ad 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -1,3 +1,7 @@ +// (c) Copyright John Maddock 2001 +// Distributed under the Boost Software License, Version 1.0. (See accompany- +// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + /* * Copyright (c) 1997 * Silicon Graphics Computer Systems, Inc. diff --git a/include/boost/detail/utf8_codecvt_facet.hpp b/include/boost/detail/utf8_codecvt_facet.hpp index 88da207..3826ee6 100644 --- a/include/boost/detail/utf8_codecvt_facet.hpp +++ b/include/boost/detail/utf8_codecvt_facet.hpp @@ -1,9 +1,7 @@ // Copyright © 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu) -// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu). Permission to copy, -// use, modify, sell and distribute this software is granted provided this -// copyright notice appears in all copies. This software is provided "as is" -// without express or implied warranty, and with no claim as to its suitability -// for any purpose. +// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu). +// Distributed under the Boost Software License, Version 1.0. (See accompany- +// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UTF8_CODECVT_FACET_HPP #define BOOST_UTF8_CODECVT_FACET_HPP From 1df1d181c0b8b4ef9b54ddab02fb07301af2281b Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Fri, 1 Dec 2006 14:28:43 +0000 Subject: [PATCH 11/22] Merged a copyright addition from trunk to branch. [SVN r36231] --- include/boost/detail/endian.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 4cc81ad..01a7689 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -1,4 +1,5 @@ -// (c) Copyright John Maddock 2001 +// (c) Copyright Caleb Epstein 2005 +// (c) Copyright John Maddock 2006 // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) From ec6dfefa6ef4c0588d14141f79134551bcaadf88 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Sat, 2 Dec 2006 10:04:37 +0000 Subject: [PATCH 12/22] Corrected wrong order in copyright notices. [SVN r36240] --- include/boost/detail/endian.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 01a7689..6936dba 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -1,5 +1,5 @@ -// (c) Copyright Caleb Epstein 2005 -// (c) Copyright John Maddock 2006 +// Copyright 2005 Caleb Epstein +// Copyright 2006 John Maddock // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) From 49858c1ac40fca131ac512a173499900ef686bac Mon Sep 17 00:00:00 2001 From: nobody Date: Tue, 24 Jul 2007 19:28:14 +0000 Subject: [PATCH 13/22] This commit was manufactured by cvs2svn to create tag 'Version_1_34_1'. [SVN r38286] From 8da5b03c03b13cf4dcf2854cf085910545404e8d Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Fri, 5 Oct 2007 14:25:06 +0000 Subject: [PATCH 14/22] Starting point for releases [SVN r39706] From 9469ab6c882fecf68477a4bf1bc152f9c940ca27 Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Fri, 23 Nov 2007 17:03:14 +0000 Subject: [PATCH 15/22] config, detail, filesystem, system, tools, at 41278. [SVN r41316] --- include/boost/detail/allocator_utilities.hpp | 12 ++- .../boost/detail/has_default_constructor.hpp | 29 ++++++ include/boost/detail/identifier.hpp | 89 +++++++++++++++++++ include/boost/detail/indirect_traits.hpp | 2 +- include/boost/detail/interlocked.hpp | 5 ++ 5 files changed, 134 insertions(+), 3 deletions(-) create mode 100644 include/boost/detail/has_default_constructor.hpp create mode 100644 include/boost/detail/identifier.hpp diff --git a/include/boost/detail/allocator_utilities.hpp b/include/boost/detail/allocator_utilities.hpp index 6929087..5a9a79e 100644 --- a/include/boost/detail/allocator_utilities.hpp +++ b/include/boost/detail/allocator_utilities.hpp @@ -1,4 +1,4 @@ -/* Copyright 2003-2005 Joaquín M López Muñoz. +/* Copyright 2003-2007 Joaquín M López Muñoz. * 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) @@ -30,13 +30,21 @@ namespace detail{ namespace allocator{ /* partial_std_allocator_wrapper inherits the functionality of a std - * allocator while providing a templatized ctor. + * allocator while providing a templatized ctor and other bits missing + * in some stdlib implementation or another. */ template class partial_std_allocator_wrapper:public std::allocator { public: + /* Oddly enough, STLport does not define std::allocator::value_type + * when configured to work without partial template specialization. + * No harm in supplying the definition here unconditionally. + */ + + typedef Type value_type; + partial_std_allocator_wrapper(){}; template diff --git a/include/boost/detail/has_default_constructor.hpp b/include/boost/detail/has_default_constructor.hpp new file mode 100644 index 0000000..319b30a --- /dev/null +++ b/include/boost/detail/has_default_constructor.hpp @@ -0,0 +1,29 @@ + +// (C) Copyright Matthias Troyerk 2006. +// Use, modification and distribution are 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/type_traits for most recent version including documentation. + +#ifndef BOOST_DETAIL_HAS_DEFAULT_CONSTRUCTOR_HPP_INCLUDED +#define BOOST_DETAIL_HAS_DEFAULT_CONSTRUCTOR_HPP_INCLUDED + +#include + +namespace boost { namespace detail { + +/// type trait to check for a default constructor +/// +/// The default implementation just checks for a trivial constructor. +/// Using some compiler magic it might be possible to provide a better default + +template +struct has_default_constructor + : public has_trivial_constructor +{}; + +} } // namespace boost::detail + + +#endif // BOOST_DETAIL_HAS_DEFAULT_CONSTRUCTOR_HPP_INCLUDED diff --git a/include/boost/detail/identifier.hpp b/include/boost/detail/identifier.hpp new file mode 100644 index 0000000..688a664 --- /dev/null +++ b/include/boost/detail/identifier.hpp @@ -0,0 +1,89 @@ +// boost/identifier.hpp ----------------------------------------------------// + +// Copyright Beman Dawes 2006 + +// 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) + +// See documentation at http://www.boost.org/libs/utility + +#ifndef BOOST_IDENTIFIER_HPP +#define BOOST_IDENTIFIER_HPP + +#include +#include +#include + +namespace boost +{ + namespace detail + { + // class template identifier ---------------------------------------------// + + // Always used as a base class so that different instantiations result in + // different class types even if instantiated with the same value type T. + + // Expected usage is that T is often an integer type, best passed by + // value. There is no reason why T can't be a possibly larger class such as + // std::string, best passed by const reference. + + // This implementation uses pass by value, based on expected common uses. + + template + class identifier + { + public: + typedef T value_type; + + const value_type value() const { return m_value; } + void assign( value_type v ) { m_value = v; } + + bool operator==( const D & rhs ) const { return m_value == rhs.m_value; } + bool operator!=( const D & rhs ) const { return m_value != rhs.m_value; } + bool operator< ( const D & rhs ) const { return m_value < rhs.m_value; } + bool operator<=( const D & rhs ) const { return m_value <= rhs.m_value; } + bool operator> ( const D & rhs ) const { return m_value > rhs.m_value; } + bool operator>=( const D & rhs ) const { return m_value >= rhs.m_value; } + + typedef void (*unspecified_bool_type)(D); // without the D, unspecified_bool_type + static void unspecified_bool_true(D){} // conversion allows relational operators + // between different identifier types + + operator unspecified_bool_type() const { return m_value == value_type() ? 0 : unspecified_bool_true; } + bool operator!() const { return m_value == value_type(); } + + // constructors are protected so that class can only be used as a base class + protected: + identifier() {} + explicit identifier( value_type v ) : m_value(v) {} + + #if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 // 1300 == VC++ 7.0 bug workaround + private: + #endif + T m_value; + }; + + //#ifndef BOOST_NO_SFINAE + + // template + // typename enable_if< is_base_of< identifier< typename Id::value_type, Id >, Id >, + // Ostream & >::type operator<<( Ostream & os, const Id & id ) + // { + // return os << id.value(); + // } + + // template + // typename enable_if< is_base_of< identifier< typename Id::value_type, Id >, Id >, + // Istream & >::type operator>>( Istream & is, Id & id ) + // { + // typename Id::value_type v; + // is >> v; + // id.value( v ); + // return is; + // } + //#endif + + } // namespace detail +} // namespace boost + +#endif // BOOST_IDENTIFIER_HPP diff --git a/include/boost/detail/indirect_traits.hpp b/include/boost/detail/indirect_traits.hpp index 9b22d6b..f9c0cd6 100755 --- a/include/boost/detail/indirect_traits.hpp +++ b/include/boost/detail/indirect_traits.hpp @@ -398,7 +398,7 @@ struct reference_to_pointer_impl typedef mpl::bool_ type; }; - + template struct is_reference_to_pointer : mpl::eval_if, reference_to_pointer_impl, mpl::false_>::type diff --git a/include/boost/detail/interlocked.hpp b/include/boost/detail/interlocked.hpp index 76a24c3..258320c 100644 --- a/include/boost/detail/interlocked.hpp +++ b/include/boost/detail/interlocked.hpp @@ -47,6 +47,11 @@ extern "C" long __cdecl InterlockedExchangeAdd( long*, long ); # define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange # define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd +# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \ + ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long*)(dest),(long)(exchange),(long)(compare))) +# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ + ((void*)BOOST_INTERLOCKED_EXCHANGE((long*)(dest),(long)(exchange))) + #elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN ) extern "C" long __cdecl _InterlockedIncrement( long volatile * ); From 22520394e429179c92f1e7d1dcb4cdf40c8e632f Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Sun, 25 Nov 2007 18:07:19 +0000 Subject: [PATCH 16/22] Full merge from trunk at revision 41356 of entire boost-root tree. [SVN r41369] --- include/boost/pending/ct_if.hpp | 104 +++++-------------------- include/boost/pending/integer_log2.hpp | 9 ++- 2 files changed, 24 insertions(+), 89 deletions(-) diff --git a/include/boost/pending/ct_if.hpp b/include/boost/pending/ct_if.hpp index 2f8540d..a9b801e 100644 --- a/include/boost/pending/ct_if.hpp +++ b/include/boost/pending/ct_if.hpp @@ -3,107 +3,39 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -// The ct_if implementation that avoids partial specialization is -// based on the IF class by Ulrich W. Eisenecker and Krzysztof -// Czarnecki. +// This header replaces the implementation of ct_if that preceded the +// introduction of Boost.MPL with a facade that defers to that reviewed and +// accepted library. + +// Author: Ronald Garcia +// Date: 20 October, 2006 + #ifndef BOOST_CT_IF_HPP #define BOOST_CT_IF_HPP -#include -/* - There is a bug in the Borland compiler with regards to using - integers to specialize templates. This made it hard to use ct_if in - the graph library. Changing from 'ct_if' to 'ct_if_t' fixed the - problem. -*/ +// A stub implementation in terms of Boost.MPL -#include // true_type and false_type +#include +#include +#include +// true_type and false_type are used by applications of ct_if +#include namespace boost { - struct ct_if_error { }; - template - struct ct_and { typedef false_type type; }; - template <> struct ct_and { typedef true_type type; }; + struct ct_and : boost::mpl::and_ {}; - template struct ct_not { typedef ct_if_error type; }; - template <> struct ct_not { typedef false_type type; }; - template <> struct ct_not { typedef true_type type; }; + template + struct ct_not : mpl::not_ {}; -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -// agurt, 15/sep/02: in certain cases Borland has problems with -// choosing the right 'ct_if' specialization even though 'cond' -// _does_ equal '1'; the easiest way to fix it is to make first -// 'ct_if' non-type template parameter boolean. -#if !defined(__BORLANDC__) template - struct ct_if { typedef ct_if_error type; }; - template - struct ct_if { typedef A type; }; - template - struct ct_if { typedef B type; }; -#else - template - struct ct_if { typedef A type; }; - template - struct ct_if { typedef B type; }; -#endif + struct ct_if : mpl::if_c {}; template - struct ct_if_t { typedef ct_if_error type; }; - template - struct ct_if_t { typedef A type; }; - template - struct ct_if_t { typedef B type; }; - -#else - - namespace detail { - - template struct IF; - template struct SlectSelector; - struct SelectFirstType; - struct SelectSecondType; - - struct SelectFirstType { - template - struct Template { typedef A type; }; - }; - - struct SelectSecondType { - template - struct Template { typedef B type; }; - }; - - template - struct SlectSelector { - typedef SelectFirstType type; - }; - - template <> - struct SlectSelector<0> { - typedef SelectSecondType type; - }; - - } // namespace detail - - template - struct ct_if - { - typedef typename detail::SlectSelector::type Selector; - typedef typename Selector::template Template::type type; - }; - - template - struct ct_if_t { - typedef typename ct_if::type type; - }; - -#endif + struct ct_if_t : mpl::if_ {}; } // namespace boost diff --git a/include/boost/pending/integer_log2.hpp b/include/boost/pending/integer_log2.hpp index fd8e446..15fd8b5 100644 --- a/include/boost/pending/integer_log2.hpp +++ b/include/boost/pending/integer_log2.hpp @@ -12,14 +12,17 @@ // http://www.boost.org/LICENSE_1_0.txt) // // ------------------------------------------------------ - +// +// $Id$ #ifndef BOOST_INTEGER_LOG2_HPP_GP_20030301 #define BOOST_INTEGER_LOG2_HPP_GP_20030301 -#include -#include // actually used for Borland only +#include +#ifdef __BORLANDC__ +#include +#endif #include "boost/limits.hpp" #include "boost/config.hpp" From 680e819cf3584637d24fbc308eed276664b3bead Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Sun, 25 Nov 2007 18:38:02 +0000 Subject: [PATCH 17/22] Full merge from trunk at revision 41356 of entire boost-root tree. [SVN r41370] --- utf8_codecvt_facet.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utf8_codecvt_facet.cpp b/utf8_codecvt_facet.cpp index 20d79de..8a8c3ca 100644 --- a/utf8_codecvt_facet.cpp +++ b/utf8_codecvt_facet.cpp @@ -139,8 +139,8 @@ std::codecvt_base::result utf8_codecvt_facet::do_out( int shift_exponent = (cont_octet_count) * 6; // Process the first character - *to++ = octet1_modifier_table[cont_octet_count] + - (unsigned char)(*from / (1 << shift_exponent)); + *to++ = static_cast(octet1_modifier_table[cont_octet_count] + + (unsigned char)(*from / (1 << shift_exponent))); // Process the continuation characters // Invariants: At the start of the loop: @@ -150,7 +150,7 @@ std::codecvt_base::result utf8_codecvt_facet::do_out( int i = 0; while (i != cont_octet_count && to != to_end) { shift_exponent -= 6; - *to++ = 0x80 + ((*from / (1 << shift_exponent)) % (1 << 6)); + *to++ = static_cast(0x80 + ((*from / (1 << shift_exponent)) % (1 << 6))); ++i; } // If we filled up the out buffer before encoding the character @@ -199,7 +199,7 @@ int utf8_codecvt_facet::do_length( last_octet_count = (get_octet_count(*from_next)); ++char_count; } - return from_next-from_end; + return static_cast(from_next-from_end); } unsigned int utf8_codecvt_facet::get_octet_count( From df8aaff6da376e6a869eff669a2b2d96a94383b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20M=20L=C3=B3pez=20Mu=C3=B1oz?= Date: Thu, 3 Jul 2008 16:51:53 +0000 Subject: [PATCH 18/22] merged up to rev. 47041 from trunk [SVN r47045] --- include/boost/detail/allocator_utilities.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/detail/allocator_utilities.hpp b/include/boost/detail/allocator_utilities.hpp index 5a9a79e..91b0fa7 100644 --- a/include/boost/detail/allocator_utilities.hpp +++ b/include/boost/detail/allocator_utilities.hpp @@ -1,4 +1,4 @@ -/* Copyright 2003-2007 Joaquín M López Muñoz. +/* Copyright 2003-2008 Joaquin M Lopez Munoz. * 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) From a6af6ca66f623db3f19b7e9cd9619397b0ce1813 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 12 Jul 2008 09:55:08 +0000 Subject: [PATCH 19/22] Merged 43316, 43317, 43318, 43733, 43782, 43873, 43888, 43916, 43950, 44055, 44056, 44058, 44073, 44074, 44132, 44137, 44138, 44140, 44344 from trunk to release [SVN r47339] --- include/boost/detail/interlocked.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/detail/interlocked.hpp b/include/boost/detail/interlocked.hpp index 258320c..b6c8d75 100644 --- a/include/boost/detail/interlocked.hpp +++ b/include/boost/detail/interlocked.hpp @@ -92,7 +92,7 @@ extern "C" void* __cdecl _InterlockedExchangePointer( void* volatile *, void* ); # define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange # define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd -#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) +#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ ) namespace boost { From b328080dbbd31cd58442b433e41f3e26513a252d Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 12 Jul 2008 10:41:24 +0000 Subject: [PATCH 20/22] Merged 44595, 44638, 44707, 44711, 44728 from trunk to release [SVN r47341] --- include/boost/detail/lightweight_thread.hpp | 135 ++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 include/boost/detail/lightweight_thread.hpp diff --git a/include/boost/detail/lightweight_thread.hpp b/include/boost/detail/lightweight_thread.hpp new file mode 100644 index 0000000..6fe70a6 --- /dev/null +++ b/include/boost/detail/lightweight_thread.hpp @@ -0,0 +1,135 @@ +#ifndef BOOST_DETAIL_LIGHTWEIGHT_THREAD_HPP_INCLUDED +#define BOOST_DETAIL_LIGHTWEIGHT_THREAD_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// boost/detail/lightweight_thread.hpp +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// Copyright (c) 2008 Peter Dimov +// +// 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 + +#include +#include +#include + +// pthread_create, pthread_join + +#if defined( BOOST_HAS_PTHREADS ) + +#include + +#else + +#include +#include + +typedef HANDLE pthread_t; + +int pthread_create( pthread_t * thread, void const *, unsigned (__stdcall * start_routine) (void*), void* arg ) +{ + HANDLE h = (HANDLE)_beginthreadex( 0, 0, start_routine, arg, 0, 0 ); + + if( h != 0 ) + { + *thread = h; + return 0; + } + else + { + return EAGAIN; + } +} + +int pthread_join( pthread_t thread, void ** /*value_ptr*/ ) +{ + ::WaitForSingleObject( thread, INFINITE ); + ::CloseHandle( thread ); + return 0; +} + +#endif + +// template int lw_thread_create( pthread_t & pt, F f ); + +namespace boost +{ + +namespace detail +{ + +class lw_abstract_thread +{ +public: + + virtual ~lw_abstract_thread() {} + virtual void run() = 0; +}; + +#if defined( BOOST_HAS_PTHREADS ) + +extern "C" void * lw_thread_routine( void * pv ) +{ + std::auto_ptr pt( static_cast( pv ) ); + + pt->run(); + + return 0; +} + +#else + +unsigned __stdcall lw_thread_routine( void * pv ) +{ + std::auto_ptr pt( static_cast( pv ) ); + + pt->run(); + + return 0; +} + +#endif + +template class lw_thread_impl: public lw_abstract_thread +{ +public: + + explicit lw_thread_impl( F f ): f_( f ) + { + } + + void run() + { + f_(); + } + +private: + + F f_; +}; + +template int lw_thread_create( pthread_t & pt, F f ) +{ + std::auto_ptr p( new lw_thread_impl( f ) ); + + int r = pthread_create( &pt, 0, lw_thread_routine, p.get() ); + + if( r == 0 ) + { + p.release(); + } + + return r; +} + +} // namespace detail +} // namespace boost + +#endif // #ifndef BOOST_DETAIL_LIGHTWEIGHT_THREAD_HPP_INCLUDED From 4ae97fa5cb47aa7140943e5902151459b3ec07d0 Mon Sep 17 00:00:00 2001 From: Gennaro Prota Date: Sun, 24 Aug 2008 18:16:24 +0000 Subject: [PATCH 21/22] boost/pending/: ported revision 48251 ("integer_log2.hpp and lowest_bit.hpp, in boost/pending/: little comment cleanup (svn anchors, etc.); added a static_cast<> to silence (harmless) MSVC++ warnings") from trunk [SVN r48353] --- include/boost/pending/integer_log2.hpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/include/boost/pending/integer_log2.hpp b/include/boost/pending/integer_log2.hpp index 15fd8b5..f4bc846 100644 --- a/include/boost/pending/integer_log2.hpp +++ b/include/boost/pending/integer_log2.hpp @@ -1,20 +1,16 @@ -// ------------------------------------- +// ----------------------------------------------------------- // integer_log2.hpp // // Gives the integer part of the logarithm, in base 2, of a // given number. Behavior is undefined if the argument is <= 0. // -// -// (C) Copyright Gennaro Prota 2003 - 2004. +// Copyright (c) 2003-2004, 2008 Gennaro Prota // // 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) // -// ------------------------------------------------------ -// -// $Id$ - +// ----------------------------------------------------------- #ifndef BOOST_INTEGER_LOG2_HPP_GP_20030301 #define BOOST_INTEGER_LOG2_HPP_GP_20030301 @@ -37,7 +33,7 @@ namespace boost { while (x != 1) { - const T t = x >> n; + const T t = static_cast(x >> n); if (t) { result += n; x = t; From 20c35502cb6690fd1761e2df1e9cda4bb86cbb71 Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Thu, 9 Oct 2008 18:05:35 +0000 Subject: [PATCH 22/22] Merged revisions 43283,43992,44388 via svnmerge from https://svn.boost.org/svn/boost/trunk ........ r43283 | bemandawes | 2008-02-16 18:01:32 -0800 (Sat, 16 Feb 2008) | 1 line Show output of example program ........ r43992 | marshall | 2008-04-01 18:42:32 -0700 (Tue, 01 Apr 2008) | 1 line Replaced all occurrences of non-ASCII copyright symbol with '(c)' for people using non-ASCII code pages ........ r44388 | grafik | 2008-04-13 16:55:58 -0700 (Sun, 13 Apr 2008) | 1 line Move tokenizer tests into canonical test subdir structure. ........ [SVN r49216] --- include/boost/detail/utf8_codecvt_facet.hpp | 2 +- utf8_codecvt_facet.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/detail/utf8_codecvt_facet.hpp b/include/boost/detail/utf8_codecvt_facet.hpp index 3826ee6..ac7e7bf 100644 --- a/include/boost/detail/utf8_codecvt_facet.hpp +++ b/include/boost/detail/utf8_codecvt_facet.hpp @@ -1,4 +1,4 @@ -// Copyright © 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu) +// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu) // Andrew Lumsdaine, Indiana University (lums@osl.iu.edu). // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/utf8_codecvt_facet.cpp b/utf8_codecvt_facet.cpp index 8a8c3ca..658ab6a 100644 --- a/utf8_codecvt_facet.cpp +++ b/utf8_codecvt_facet.cpp @@ -1,7 +1,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // utf8_codecvt_facet.cpp -// Copyright © 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu) +// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu) // Andrew Lumsdaine, Indiana University (lums@osl.iu.edu). // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at