From: Georg Baum Date: Sat, 16 May 2015 11:41:23 +0000 (+0200) Subject: Update boost to version 1.58 X-Git-Tag: 2.2.0alpha1~812 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=96cdd70ec105748a05df885638ce78dd0ee57566;p=features.git Update boost to version 1.58 This is an unmodified subset of boost 1.58, created with boost/extract.sh. --- diff --git a/boost/boost/align/align.hpp b/boost/boost/align/align.hpp new file mode 100644 index 0000000000..1600a243c0 --- /dev/null +++ b/boost/boost/align/align.hpp @@ -0,0 +1,20 @@ +/* + (c) 2014 Glen Joseph Fernandes + glenjofe at gmail dot com + + Distributed under the Boost Software + License, Version 1.0. + http://boost.org/LICENSE_1_0.txt +*/ +#ifndef BOOST_ALIGN_ALIGN_HPP +#define BOOST_ALIGN_ALIGN_HPP + +#include + +#if !defined(BOOST_NO_CXX11_STD_ALIGN) +#include +#else +#include +#endif + +#endif diff --git a/boost/boost/align/detail/address.hpp b/boost/boost/align/detail/address.hpp new file mode 100644 index 0000000000..a4f3a6e84d --- /dev/null +++ b/boost/boost/align/detail/address.hpp @@ -0,0 +1,27 @@ +/* + (c) 2014 Glen Joseph Fernandes + glenjofe at gmail dot com + + Distributed under the Boost Software + License, Version 1.0. + http://boost.org/LICENSE_1_0.txt +*/ +#ifndef BOOST_ALIGN_DETAIL_ADDRESS_HPP +#define BOOST_ALIGN_DETAIL_ADDRESS_HPP + +#include +#include + +namespace boost { + namespace alignment { + namespace detail { +#if defined(BOOST_HAS_INTPTR_T) + typedef boost::uintptr_t address_t; +#else + typedef std::size_t address_t; +#endif + } + } +} + +#endif diff --git a/boost/boost/align/detail/align.hpp b/boost/boost/align/detail/align.hpp new file mode 100644 index 0000000000..e3a90dffda --- /dev/null +++ b/boost/boost/align/detail/align.hpp @@ -0,0 +1,38 @@ +/* + (c) 2014 Glen Joseph Fernandes + glenjofe at gmail dot com + + Distributed under the Boost Software + License, Version 1.0. + http://boost.org/LICENSE_1_0.txt +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGN_HPP +#define BOOST_ALIGN_DETAIL_ALIGN_HPP + +#include +#include +#include +#include + +namespace boost { + namespace alignment { + inline void* align(std::size_t alignment, std::size_t size, + void*& ptr, std::size_t& space) + { + BOOST_ASSERT(detail::is_alignment(alignment)); + std::size_t n = detail::address_t(ptr) & (alignment - 1); + if (n != 0) { + n = alignment - n; + } + void* p = 0; + if (n <= space && size <= space - n) { + p = static_cast(ptr) + n; + ptr = p; + space -= n; + } + return p; + } + } +} + +#endif diff --git a/boost/boost/align/detail/align_cxx11.hpp b/boost/boost/align/detail/align_cxx11.hpp new file mode 100644 index 0000000000..6672a7e0e9 --- /dev/null +++ b/boost/boost/align/detail/align_cxx11.hpp @@ -0,0 +1,20 @@ +/* + (c) 2014 Glen Joseph Fernandes + glenjofe at gmail dot com + + Distributed under the Boost Software + License, Version 1.0. + http://boost.org/LICENSE_1_0.txt +*/ +#ifndef BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP +#define BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP + +#include + +namespace boost { + namespace alignment { + using std::align; + } +} + +#endif diff --git a/boost/boost/align/detail/is_alignment.hpp b/boost/boost/align/detail/is_alignment.hpp new file mode 100644 index 0000000000..532198363f --- /dev/null +++ b/boost/boost/align/detail/is_alignment.hpp @@ -0,0 +1,27 @@ +/* + (c) 2014 Glen Joseph Fernandes + glenjofe at gmail dot com + + Distributed under the Boost Software + License, Version 1.0. + http://boost.org/LICENSE_1_0.txt +*/ +#ifndef BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP +#define BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP + +#include +#include + +namespace boost { + namespace alignment { + namespace detail { + BOOST_CONSTEXPR inline bool is_alignment(std::size_t + value) BOOST_NOEXCEPT + { + return (value > 0) && ((value & (value - 1)) == 0); + } + } + } +} + +#endif diff --git a/boost/boost/aligned_storage.hpp b/boost/boost/aligned_storage.hpp index ce277ab702..b5455f00b6 100644 --- a/boost/boost/aligned_storage.hpp +++ b/boost/boost/aligned_storage.hpp @@ -48,10 +48,10 @@ struct aligned_storage_imp { char buf[size_]; - typename mpl::eval_if_c< + typename ::boost::mpl::eval_if_c< alignment_ == std::size_t(-1) - , mpl::identity - , type_with_alignment + , ::boost::mpl::identity< ::boost::detail::max_align > + , ::boost::type_with_alignment >::type align_; } data_; void* address() const { return const_cast(this); } @@ -76,12 +76,12 @@ class aligned_storage : #else public #endif - detail::aligned_storage::aligned_storage_imp + ::boost::detail::aligned_storage::aligned_storage_imp { public: // constants - typedef detail::aligned_storage::aligned_storage_imp type; + typedef ::boost::detail::aligned_storage::aligned_storage_imp type; BOOST_STATIC_CONSTANT( std::size_t @@ -96,25 +96,11 @@ public: // constants ) ); -#if defined(__GNUC__) &&\ - (__GNUC__ > 3) ||\ - (__GNUC__ == 3 && (__GNUC_MINOR__ > 2 ||\ - (__GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ >=3))) - private: // noncopyable aligned_storage(const aligned_storage&); aligned_storage& operator=(const aligned_storage&); -#else // gcc less than 3.2.3 - -public: // _should_ be noncopyable, but GCC compiler emits error - - aligned_storage(const aligned_storage&); - aligned_storage& operator=(const aligned_storage&); - -#endif // gcc < 3.2.3 workaround - public: // structors aligned_storage() @@ -132,46 +118,22 @@ public: // accessors return static_cast(this)->address(); } -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - const void* address() const { return static_cast(this)->address(); } - -#else // MSVC6 - - const void* address() const; - -#endif // MSVC6 workaround - }; -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - -// MSVC6 seems not to like inline functions with const void* returns, so we -// declare the following here: - -template -const void* aligned_storage::address() const -{ - return const_cast< aligned_storage* >(this)->address(); -} - -#endif // MSVC6 workaround - -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // // Make sure that is_pod recognises aligned_storage<>::type // as a POD (Note that aligned_storage<> itself is not a POD): // template -struct is_pod > +struct is_pod< ::boost::detail::aligned_storage::aligned_storage_imp > BOOST_TT_AUX_BOOL_C_BASE(true) { BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(true) }; -#endif } // namespace boost diff --git a/boost/boost/any.hpp b/boost/boost/any.hpp index 771393530d..437de2c023 100644 --- a/boost/boost/any.hpp +++ b/boost/boost/any.hpp @@ -3,7 +3,7 @@ #ifndef BOOST_ANY_INCLUDED #define BOOST_ANY_INCLUDED -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -15,11 +15,12 @@ // when: July 2001, April 2013 - May 2013 #include -#include #include "boost/config.hpp" +#include #include #include +#include #include #include #include @@ -28,22 +29,7 @@ #include #include #include - -// See boost/python/type_id.hpp -// TODO: add BOOST_TYPEID_COMPARE_BY_NAME to config.hpp -# if (defined(__GNUC__) && __GNUC__ >= 3) \ - || defined(_AIX) \ - || ( defined(__sgi) && defined(__host_mips)) \ - || (defined(__hpux) && defined(__HP_aCC)) \ - || (defined(linux) && defined(__INTEL_COMPILER) && defined(__ICC)) -# define BOOST_AUX_ANY_TYPE_ID_NAME -#include -# endif - -#if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable: 4172) // Mistakenly warns: returning address of local variable or temporary -#endif +#include namespace boost { @@ -58,7 +44,9 @@ namespace boost template any(const ValueType & value) - : content(new holder::type>(value)) + : content(new holder< + BOOST_DEDUCED_TYPENAME remove_cv::type>::type + >(value)) { } @@ -149,9 +137,9 @@ namespace boost any().swap(*this); } - const std::type_info & type() const BOOST_NOEXCEPT + const boost::typeindex::type_info& type() const BOOST_NOEXCEPT { - return content ? content->type() : typeid(void); + return content ? content->type() : boost::typeindex::type_id().type_info(); } #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS @@ -170,7 +158,7 @@ namespace boost public: // queries - virtual const std::type_info & type() const BOOST_NOEXCEPT = 0; + virtual const boost::typeindex::type_info& type() const BOOST_NOEXCEPT = 0; virtual placeholder * clone() const = 0; @@ -194,9 +182,9 @@ namespace boost #endif public: // queries - virtual const std::type_info & type() const BOOST_NOEXCEPT + virtual const boost::typeindex::type_info& type() const BOOST_NOEXCEPT { - return typeid(ValueType); + return boost::typeindex::type_id().type_info(); } virtual placeholder * clone() const @@ -237,7 +225,12 @@ namespace boost lhs.swap(rhs); } - class BOOST_SYMBOL_VISIBLE bad_any_cast : public std::bad_cast + class BOOST_SYMBOL_VISIBLE bad_any_cast : +#ifndef BOOST_NO_RTTI + public std::bad_cast +#else + public std::exception +#endif { public: virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW @@ -250,13 +243,8 @@ namespace boost template ValueType * any_cast(any * operand) BOOST_NOEXCEPT { - return operand && -#ifdef BOOST_AUX_ANY_TYPE_ID_NAME - std::strcmp(operand->type().name(), typeid(ValueType).name()) == 0 -#else - operand->type() == typeid(ValueType) -#endif - ? &static_cast *>(operand->content)->held + return operand && operand->type() == boost::typeindex::type_id() + ? &static_cast::type> *>(operand->content)->held : 0; } @@ -271,15 +259,6 @@ namespace boost { typedef BOOST_DEDUCED_TYPENAME remove_reference::type nonref; -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - // If 'nonref' is still reference type, it means the user has not - // specialized 'remove_reference'. - - // Please use BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION macro - // to generate specialization of remove_reference for your class - // See type traits library documentation for details - BOOST_STATIC_ASSERT(!is_reference::value); -#endif nonref * result = any_cast(&operand); if(!result) @@ -302,26 +281,19 @@ namespace boost inline ValueType any_cast(const any & operand) { typedef BOOST_DEDUCED_TYPENAME remove_reference::type nonref; - -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - // The comment in the above version of 'any_cast' explains when this - // assert is fired and what to do. - BOOST_STATIC_ASSERT(!is_reference::value); -#endif - return any_cast(const_cast(operand)); } #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template - inline ValueType&& any_cast(any&& operand) + inline ValueType any_cast(any&& operand) { BOOST_STATIC_ASSERT_MSG( - boost::is_rvalue_reference::value + boost::is_rvalue_reference::value /*true if ValueType is rvalue or just a value*/ || boost::is_const< typename boost::remove_reference::type >::value, "boost::any_cast shall not be used for getting nonconst references to temporary objects" ); - return any_cast(operand); + return any_cast(operand); } #endif @@ -350,8 +322,4 @@ namespace boost // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -#if defined(_MSC_VER) -#pragma warning(pop) -#endif - #endif diff --git a/boost/boost/assert.hpp b/boost/boost/assert.hpp index ccc776a438..1713d9bb1d 100644 --- a/boost/boost/assert.hpp +++ b/boost/boost/assert.hpp @@ -2,18 +2,19 @@ // boost/assert.hpp - BOOST_ASSERT(expr) // BOOST_ASSERT_MSG(expr, msg) // BOOST_VERIFY(expr) +// BOOST_VERIFY_MSG(expr, msg) // // Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. -// Copyright (c) 2007 Peter Dimov +// Copyright (c) 2007, 2014 Peter Dimov // Copyright (c) Beman Dawes 2011 // -// 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) +// 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 // // Note: There are no include guards. This is intentional. // -// See http://www.boost.org/libs/utility/assert.html for documentation. +// See http://www.boost.org/libs/assert/assert.html for documentation. // // @@ -22,120 +23,56 @@ // boostinspect:naassert_macro // -//--------------------------------------------------------------------------------------// -// BOOST_ASSERT // -//--------------------------------------------------------------------------------------// +// +// BOOST_ASSERT, BOOST_ASSERT_MSG +// #undef BOOST_ASSERT +#undef BOOST_ASSERT_MSG -#if defined(BOOST_DISABLE_ASSERTS) +#if defined(BOOST_DISABLE_ASSERTS) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && defined(NDEBUG) ) # define BOOST_ASSERT(expr) ((void)0) +# define BOOST_ASSERT_MSG(expr, msg) ((void)0) -#elif defined(BOOST_ENABLE_ASSERT_HANDLER) +#elif defined(BOOST_ENABLE_ASSERT_HANDLER) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && !defined(NDEBUG) ) -#include +#include // for BOOST_LIKELY #include namespace boost { - void assertion_failed(char const * expr, - char const * function, char const * file, long line); // user defined + void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined + void assertion_failed_msg(char const * expr, char const * msg, char const * function, char const * file, long line); // user defined } // namespace boost -#define BOOST_ASSERT(expr) (BOOST_LIKELY(!!(expr)) \ - ? ((void)0) \ - : ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) +#define BOOST_ASSERT(expr) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) +#define BOOST_ASSERT_MSG(expr, msg) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) #else -# include // .h to support old libraries w/o - effect is the same -# define BOOST_ASSERT(expr) assert(expr) -#endif - -//--------------------------------------------------------------------------------------// -// BOOST_ASSERT_MSG // -//--------------------------------------------------------------------------------------// - -# undef BOOST_ASSERT_MSG - -#if defined(BOOST_DISABLE_ASSERTS) || defined(NDEBUG) - - #define BOOST_ASSERT_MSG(expr, msg) ((void)0) -#elif defined(BOOST_ENABLE_ASSERT_HANDLER) - - #include - #include - - namespace boost - { - void assertion_failed_msg(char const * expr, char const * msg, - char const * function, char const * file, long line); // user defined - } // namespace boost +# include // .h to support old libraries w/o - effect is the same - #define BOOST_ASSERT_MSG(expr, msg) (BOOST_LIKELY(!!(expr)) \ - ? ((void)0) \ - : ::boost::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) +# define BOOST_ASSERT(expr) assert(expr) +# define BOOST_ASSERT_MSG(expr, msg) assert((expr)&&(msg)) -#else - #ifndef BOOST_ASSERT_HPP - #define BOOST_ASSERT_HPP - #include - #include - #include - #include - - // IDE's like Visual Studio perform better if output goes to std::cout or - // some other stream, so allow user to configure output stream: - #ifndef BOOST_ASSERT_MSG_OSTREAM - # define BOOST_ASSERT_MSG_OSTREAM std::cerr - #endif - - namespace boost - { - namespace assertion - { - namespace detail - { - // Note: The template is needed to make the function non-inline and avoid linking errors - template< typename CharT > - BOOST_NOINLINE void assertion_failed_msg(CharT const * expr, char const * msg, char const * function, - char const * file, long line) - { - BOOST_ASSERT_MSG_OSTREAM - << "***** Internal Program Error - assertion (" << expr << ") failed in " - << function << ":\n" - << file << '(' << line << "): " << msg << std::endl; -#ifdef UNDER_CE - // The Windows CE CRT library does not have abort() so use exit(-1) instead. - std::exit(-1); -#else - std::abort(); -#endif - } - } // detail - } // assertion - } // detail - #endif - - #define BOOST_ASSERT_MSG(expr, msg) (BOOST_LIKELY(!!(expr)) \ - ? ((void)0) \ - : ::boost::assertion::detail::assertion_failed_msg(#expr, msg, \ - BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) #endif -//--------------------------------------------------------------------------------------// -// BOOST_VERIFY // -//--------------------------------------------------------------------------------------// +// +// BOOST_VERIFY, BOOST_VERIFY_MSG +// #undef BOOST_VERIFY +#undef BOOST_VERIFY_MSG #if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) ) # define BOOST_VERIFY(expr) ((void)(expr)) +# define BOOST_VERIFY_MSG(expr, msg) ((void)(expr)) #else # define BOOST_VERIFY(expr) BOOST_ASSERT(expr) +# define BOOST_VERIFY_MSG(expr, msg) BOOST_ASSERT_MSG(expr,msg) #endif diff --git a/boost/boost/bind/arg.hpp b/boost/boost/bind/arg.hpp index 0d5cd03a74..c879bb408b 100644 --- a/boost/boost/bind/arg.hpp +++ b/boost/boost/bind/arg.hpp @@ -21,6 +21,7 @@ #include #include +#include namespace boost { @@ -33,8 +34,7 @@ template< int I > struct arg template< class T > arg( T const & /* t */ ) { - // static assert I == is_placeholder::value - typedef char T_must_be_placeholder[ I == is_placeholder::value? 1: -1 ]; + BOOST_STATIC_ASSERT( I == is_placeholder::value ); } }; diff --git a/boost/boost/bind/bind.hpp b/boost/boost/bind/bind.hpp index fb670979d3..924d0551ec 100644 --- a/boost/boost/bind/bind.hpp +++ b/boost/boost/bind/bind.hpp @@ -859,7 +859,295 @@ public: // bind_t -#ifndef BOOST_NO_VOID_RETURNS +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + +template< class A > struct list_add_cref +{ + typedef A const & type; +}; + +template< class A > struct list_add_cref< A& > +{ + typedef A & type; +}; + +template class bind_t +{ +private: + + F f_; + L l_; + +public: + + typedef typename result_traits::type result_type; + typedef bind_t this_type; + + bind_t( F f, L const & l ): f_( f ), l_( l ) {} + + // + + result_type operator()() + { + list0 a; + return l_( type(), f_, a, 0 ); + } + + result_type operator()() const + { + list0 a; + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1 ) + { + list1< typename list_add_cref::type > a( a1 ); + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1 ) const + { + list1< typename list_add_cref::type > a( a1 ); + return l_(type(), f_, a, 0); + } + + template result_type operator()( A1 && a1, A2 && a2 ) + { + list2< typename list_add_cref::type, typename list_add_cref::type > a( a1, a2 ); + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2 ) const + { + list2< typename list_add_cref::type, typename list_add_cref::type > a( a1, a2 ); + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3 ) + { + list3< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3 ) const + { + list3< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) + { + list4< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) const + { + list4< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) + { + list5< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) const + { + list5< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) + { + list6< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5, a6 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) const + { + list6< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5, a6 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) + { + list7< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5, a6, a7 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) const + { + list7< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5, a6, a7 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) + { + list8< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5, a6, a7, a8 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) const + { + list8< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5, a6, a7, a8 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) + { + list9< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5, a6, a7, a8, a9 ); + + return l_( type(), f_, a, 0 ); + } + + template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) const + { + list9< + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type, + typename list_add_cref::type + > a( a1, a2, a3, a4, a5, a6, a7, a8, a9 ); + + return l_( type(), f_, a, 0 ); + } + + // + + template result_type eval( A & a ) + { + return l_( type(), f_, a, 0 ); + } + + template result_type eval( A & a ) const + { + return l_( type(), f_, a, 0 ); + } + + template void accept( V & v ) const + { +#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ ) + using boost::visit_each; +#endif + + BOOST_BIND_VISIT_EACH( v, f_, 0 ); + l_.accept( v ); + } + + bool compare( this_type const & rhs ) const + { + return ref_compare( f_, rhs.f_, 0 ) && l_ == rhs.l_; + } +}; + +#elif !defined( BOOST_NO_VOID_RETURNS ) template class bind_t { @@ -875,7 +1163,7 @@ public: }; -#else +#else // no void returns template struct bind_t_generator { diff --git a/boost/boost/bind/bind_mf_cc.hpp b/boost/boost/bind/bind_mf_cc.hpp index 88be8222f3..9c3d290e27 100644 --- a/boost/boost/bind/bind_mf_cc.hpp +++ b/boost/boost/bind/bind_mf_cc.hpp @@ -34,6 +34,26 @@ template(F(f), list_type(a1)); } +template + _bi::bind_t, typename _bi::list_av_1::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} + +template + _bi::bind_t, typename _bi::list_av_1::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} + // 1 template(F(f), list_type(a1, a2)); } +template + _bi::bind_t, typename _bi::list_av_2::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} + +template + _bi::bind_t, typename _bi::list_av_2::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} + // 2 template(F(f), list_type(a1, a2, a3)); } +template + _bi::bind_t, typename _bi::list_av_3::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} + +template + _bi::bind_t, typename _bi::list_av_3::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} + // 3 template(F(f), list_type(a1, a2, a3, a4)); } +template + _bi::bind_t, typename _bi::list_av_4::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t, typename _bi::list_av_4::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} + // 4 template(F(f), list_type(a1, a2, a3, a4, a5)); } +template + _bi::bind_t, typename _bi::list_av_5::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t, typename _bi::list_av_5::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} + // 5 template(F(f), list_type(a1, a2, a3, a4, a5, a6)); } +template + _bi::bind_t, typename _bi::list_av_6::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t, typename _bi::list_av_6::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} + // 6 template(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); } +template + _bi::bind_t, typename _bi::list_av_7::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t, typename _bi::list_av_7::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} + // 7 template(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); } +template + _bi::bind_t, typename _bi::list_av_8::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t, typename _bi::list_av_8::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + // 8 template::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); } + +template + _bi::bind_t, typename _bi::list_av_9::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + +template + _bi::bind_t, typename _bi::list_av_9::type> + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} diff --git a/boost/boost/call_traits.hpp b/boost/boost/call_traits.hpp index 5253a6de58..2c1328e94d 100644 --- a/boost/boost/call_traits.hpp +++ b/boost/boost/call_traits.hpp @@ -5,7 +5,7 @@ // // See http://www.boost.org/libs/utility for most recent version including documentation. -// See boost/detail/call_traits.hpp and boost/detail/ob_call_traits.hpp +// See boost/detail/call_traits.hpp // for full copyright notices. #ifndef BOOST_CALL_TRAITS_HPP @@ -15,10 +15,6 @@ #include #endif -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#include -#else #include -#endif #endif // BOOST_CALL_TRAITS_HPP diff --git a/boost/boost/checked_delete.hpp b/boost/boost/checked_delete.hpp index 9bb84e8e1b..fb71c789c8 100644 --- a/boost/boost/checked_delete.hpp +++ b/boost/boost/checked_delete.hpp @@ -1,69 +1,17 @@ -#ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED -#define BOOST_CHECKED_DELETE_HPP_INCLUDED +/* + * Copyright (c) 2014 Glen Fernandes + * + * 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) + */ -// MS compatible compilers support #pragma once +#ifndef BOOST_CHECKED_DELETE_HPP +#define BOOST_CHECKED_DELETE_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// boost/checked_delete.hpp -// -// Copyright (c) 2002, 2003 Peter Dimov -// Copyright (c) 2003 Daniel Frey -// Copyright (c) 2003 Howard Hinnant -// -// 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 http://www.boost.org/libs/utility/checked_delete.html for documentation. -// - -namespace boost -{ - -// verify that types are complete for increased safety - -template inline void checked_delete(T * x) -{ - // intentionally complex - simplification causes regressions - typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; - (void) sizeof(type_must_be_complete); - delete x; -} - -template inline void checked_array_delete(T * x) -{ - typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; - (void) sizeof(type_must_be_complete); - delete [] x; -} +// The header file at this path is deprecated; +// use boost/core/checked_delete.hpp instead. -template struct checked_deleter -{ - typedef void result_type; - typedef T * argument_type; +#include - void operator()(T * x) const - { - // boost:: disables ADL - boost::checked_delete(x); - } -}; - -template struct checked_array_deleter -{ - typedef void result_type; - typedef T * argument_type; - - void operator()(T * x) const - { - boost::checked_array_delete(x); - } -}; - -} // namespace boost - -#endif // #ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED +#endif diff --git a/boost/boost/concept/assert.hpp b/boost/boost/concept/assert.hpp index 80eca817ac..cf98179522 100644 --- a/boost/boost/concept/assert.hpp +++ b/boost/boost/concept/assert.hpp @@ -18,8 +18,7 @@ # if !defined(BOOST_NO_OLD_CONCEPT_SUPPORT) \ && !defined(BOOST_NO_SFINAE) \ \ - && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4)) \ - && !(BOOST_WORKAROUND(__GNUC__, == 2)) + && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4)) // Note: gcc-2.96 through 3.3.x have some SFINAE, but no ability to // check for the presence of particularmember functions. diff --git a/boost/boost/concept/detail/concept_def.hpp b/boost/boost/concept/detail/concept_def.hpp index 79f628e999..750561ee30 100644 --- a/boost/boost/concept/detail/concept_def.hpp +++ b/boost/boost/concept/detail/concept_def.hpp @@ -15,7 +15,6 @@ // // Also defines an equivalent SomeNameConcept for backward compatibility. // Maybe in the next release we can kill off the "Concept" suffix for good. -#if BOOST_WORKAROUND(__GNUC__, <= 3) # define BOOST_concept(name, params) \ template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ struct name; /* forward declaration */ \ @@ -24,26 +23,10 @@ struct BOOST_PP_CAT(name,Concept) \ : name< BOOST_PP_SEQ_ENUM(params) > \ { \ - /* at least 2.96 and 3.4.3 both need this */ \ - BOOST_PP_CAT(name,Concept)(); \ }; \ \ template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ struct name -#else -# define BOOST_concept(name, params) \ - template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ - struct name; /* forward declaration */ \ - \ - template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ - struct BOOST_PP_CAT(name,Concept) \ - : name< BOOST_PP_SEQ_ENUM(params) > \ - { \ - }; \ - \ - template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ - struct name -#endif // Helper for BOOST_concept, above. # define BOOST_CONCEPT_typename(r, ignored, index, t) \ diff --git a/boost/boost/concept/detail/general.hpp b/boost/boost/concept/detail/general.hpp index e3014c1b87..c88a1edd3a 100644 --- a/boost/boost/concept/detail/general.hpp +++ b/boost/boost/concept/detail/general.hpp @@ -65,10 +65,19 @@ struct requirement_ # endif +// Version check from https://svn.boost.org/trac/boost/changeset/82886 +// (boost/static_assert.hpp) +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7))) +#define BOOST_CONCEPT_UNUSED_TYPEDEF __attribute__((unused)) +#else +#define BOOST_CONCEPT_UNUSED_TYPEDEF /**/ +#endif + # define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ typedef ::boost::concepts::detail::instantiate< \ &::boost::concepts::requirement_::failed> \ - BOOST_PP_CAT(boost_concept_check,__LINE__) + BOOST_PP_CAT(boost_concept_check,__LINE__) \ + BOOST_CONCEPT_UNUSED_TYPEDEF }} diff --git a/boost/boost/concept/detail/msvc.hpp b/boost/boost/concept/detail/msvc.hpp index 9fbd2505d2..078dd22330 100644 --- a/boost/boost/concept/detail/msvc.hpp +++ b/boost/boost/concept/detail/msvc.hpp @@ -6,12 +6,17 @@ # include # include +# include # ifdef BOOST_OLD_CONCEPT_SUPPORT # include # include # endif +# ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable:4100) +# endif namespace boost { namespace concepts { @@ -111,4 +116,8 @@ enum \ # endif }} +# ifdef BOOST_MSVC +# pragma warning(pop) +# endif + #endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP diff --git a/boost/boost/concept/usage.hpp b/boost/boost/concept/usage.hpp index 21547c31f4..e73370fb37 100644 --- a/boost/boost/concept/usage.hpp +++ b/boost/boost/concept/usage.hpp @@ -10,12 +10,6 @@ namespace boost { namespace concepts { -# if BOOST_WORKAROUND(__GNUC__, == 2) - -# define BOOST_CONCEPT_USAGE(model) ~model() - -# else - template struct usage_requirements { @@ -37,8 +31,6 @@ struct usage_requirements # endif -# endif - }} // namespace boost::concepts #endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP diff --git a/boost/boost/concept_check.hpp b/boost/boost/concept_check.hpp index bf5a2af783..2d6fa32332 100644 --- a/boost/boost/concept_check.hpp +++ b/boost/boost/concept_check.hpp @@ -32,6 +32,12 @@ # include # include +#if (defined _MSC_VER) +# pragma warning( push ) +# pragma warning( disable : 4510 ) // default constructor could not be generated +# pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required +#endif + namespace boost { @@ -175,11 +181,6 @@ namespace boost TT b; }; -#if (defined _MSC_VER) -# pragma warning( push ) -# pragma warning( disable : 4510 ) // default constructor could not be generated -# pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required -#endif // The SGI STL version of Assignable requires copy constructor and operator= BOOST_concept(SGIAssignable,(TT)) { @@ -202,9 +203,6 @@ namespace boost TT a; TT b; }; -#if (defined _MSC_VER) -# pragma warning( pop ) -#endif BOOST_concept(Convertible,(X)(Y)) { @@ -562,10 +560,10 @@ namespace boost : ForwardIterator { BOOST_CONCEPT_USAGE(Mutable_ForwardIterator) { - *i++ = *i; // require postincrement and assignment + *i++ = *j; // require postincrement and assignment } private: - TT i; + TT i, j; }; BOOST_concept(BidirectionalIterator,(TT)) @@ -591,10 +589,10 @@ namespace boost { BOOST_CONCEPT_USAGE(Mutable_BidirectionalIterator) { - *i-- = *i; // require postdecrement and assignment + *i-- = *j; // require postdecrement and assignment } private: - TT i; + TT i, j; }; BOOST_concept(RandomAccessIterator,(TT)) @@ -820,9 +818,8 @@ namespace boost BOOST_CONCEPT_USAGE(Sequence) { S - c(n), - c2(n, t), - c3(first, last); + c(n, t), + c2(first, last); c.insert(p, t); c.insert(p, n, t); @@ -835,7 +832,6 @@ namespace boost ignore_unused_variable_warning(c); ignore_unused_variable_warning(c2); - ignore_unused_variable_warning(c3); ignore_unused_variable_warning(r); const_constraints(c); } @@ -880,7 +876,7 @@ namespace boost typename BackInsertionSequence::const_reference r = cc.back(); ignore_unused_variable_warning(r); - }; + } S c; typename S::value_type t; }; @@ -1077,6 +1073,10 @@ namespace boost }; } // namespace boost +#if (defined _MSC_VER) +# pragma warning( pop ) +#endif + # include #endif // BOOST_CONCEPT_CHECKS_HPP diff --git a/boost/boost/config.hpp b/boost/boost/config.hpp index 6ec3645c24..d49bb27cd5 100644 --- a/boost/boost/config.hpp +++ b/boost/boost/config.hpp @@ -20,6 +20,10 @@ // if we don't have a user config, then use the default location: #if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG) # define BOOST_USER_CONFIG +#if 0 +// For dependency trackers: +# include +#endif #endif // include it first: #ifdef BOOST_USER_CONFIG diff --git a/boost/boost/config/auto_link.hpp b/boost/boost/config/auto_link.hpp index 13cbad4360..56a16b0b38 100644 --- a/boost/boost/config/auto_link.hpp +++ b/boost/boost/config/auto_link.hpp @@ -156,11 +156,16 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. // vc11: # define BOOST_LIB_TOOLSET "vc110" -# elif defined(BOOST_MSVC) +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1900) // vc12: # define BOOST_LIB_TOOLSET "vc120" +# elif defined(BOOST_MSVC) + + // vc14: +# define BOOST_LIB_TOOLSET "vc140" + # elif defined(__BORLANDC__) // CBuilder 6: @@ -382,6 +387,11 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. # ifdef BOOST_LIB_DIAGNOSTIC # pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") # endif +#elif defined(BOOST_LIB_BUILDID) +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") +# ifdef BOOST_LIB_DIAGNOSTIC +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") +# endif #else # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") # ifdef BOOST_LIB_DIAGNOSTIC diff --git a/boost/boost/config/compiler/borland.hpp b/boost/boost/config/compiler/borland.hpp index a8f5baaeb7..80dd230034 100644 --- a/boost/boost/config/compiler/borland.hpp +++ b/boost/boost/config/compiler/borland.hpp @@ -194,6 +194,37 @@ #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif #if __BORLANDC__ >= 0x590 # define BOOST_HAS_TR1_HASH diff --git a/boost/boost/config/compiler/clang.hpp b/boost/boost/config/compiler/clang.hpp index b57e26c5ac..47ea65b0a2 100644 --- a/boost/boost/config/compiler/clang.hpp +++ b/boost/boost/config/compiler/clang.hpp @@ -10,6 +10,19 @@ #define BOOST_HAS_PRAGMA_ONCE +// Detecting `-fms-extension` compiler flag assuming that _MSC_VER defined when that flag is used. +#if defined (_MSC_VER) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4)) +# define BOOST_HAS_PRAGMA_DETECT_MISMATCH +#endif + +// When compiling with clang before __has_extension was defined, +// even if one writes 'defined(__has_extension) && __has_extension(xxx)', +// clang reports a compiler error. So the only workaround found is: + +#ifndef __has_extension +#define __has_extension __has_feature +#endif + #if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif @@ -39,6 +52,19 @@ // Clang supports "long long" in all compilation modes. #define BOOST_HAS_LONG_LONG +// +// We disable this if the compiler is really nvcc as it +// doesn't actually support __int128 as of CUDA_VERSION=5000 +// even though it defines __SIZEOF_INT128__. +// See https://svn.boost.org/trac/boost/ticket/10418 +// Only re-enable this for nvcc if you're absolutely sure +// of the circumstances under which it's supported: +// +#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) +# define BOOST_HAS_INT128 +#endif + + // // Dynamic shared object (DSO) and dynamic-link library (DLL) support // @@ -63,7 +89,10 @@ # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #endif -#if !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) +// +// Currently clang on Windows using VC++ RTL does not support C++11's char16_t or char32_t +// +#if defined(_MSC_VER) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_CHAR32_T #endif @@ -124,6 +153,10 @@ # define BOOST_NO_CXX11_RAW_LITERALS #endif +#if !__has_feature(cxx_reference_qualified_functions) +# define BOOST_NO_CXX11_REF_QUALIFIERS +#endif + #if !__has_feature(cxx_generalized_initializers) # define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #endif @@ -156,7 +189,7 @@ # define BOOST_NO_CXX11_USER_DEFINED_LITERALS #endif -#if !(__has_feature(cxx_alignas) || __has_extension(cxx_alignas)) +#if !__has_feature(cxx_alignas) # define BOOST_NO_CXX11_ALIGNAS #endif @@ -168,8 +201,66 @@ # define BOOST_NO_CXX11_INLINE_NAMESPACES #endif -// Clang always supports variadic macros -// Clang always supports extern templates +#if !__has_feature(cxx_override_control) +# define BOOST_NO_CXX11_FINAL +#endif + +#if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__)) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif + +#if !__has_feature(__cxx_decltype_auto__) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif + +#if !__has_feature(__cxx_aggregate_nsdmi__) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif + +#if !__has_feature(__cxx_init_captures__) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif + +#if !__has_feature(__cxx_generic_lambdas__) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif + +// clang < 3.5 has a defect with dependent type, like following. +// +// template +// constexpr typename enable_if >::type foo(T &) +// { } // error: no return statement in constexpr function +// +// This issue also affects C++11 mode, but C++11 constexpr requires return stmt. +// Therefore we don't care such case. +// +// Note that we can't check Clang version directly as the numbering system changes depending who's +// creating the Clang release (see https://github.com/boostorg/config/pull/39#issuecomment-59927873) +// so instead verify that we have a feature that was introduced at the same time as working C++14 +// constexpr (generic lambda's in this case): +// +#if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__) +# define BOOST_NO_CXX14_CONSTEXPR +#endif + +#if !__has_feature(__cxx_return_type_deduction__) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif + +#if !__has_feature(__cxx_variable_templates__) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +#if __cplusplus < 201400 +// All versions with __cplusplus above this value seem to support this: +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif + + +// Unused attribute: +#if defined(__GNUC__) && (__GNUC__ >= 4) +# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) +#endif #ifndef BOOST_COMPILER # define BOOST_COMPILER "Clang version " __clang_version__ diff --git a/boost/boost/config/compiler/codegear.hpp b/boost/boost/config/compiler/codegear.hpp index 00e0bb949c..02bd792a15 100644 --- a/boost/boost/config/compiler/codegear.hpp +++ b/boost/boost/config/compiler/codegear.hpp @@ -120,6 +120,37 @@ #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif // // TR1 macros: diff --git a/boost/boost/config/compiler/common_edg.hpp b/boost/boost/config/compiler/common_edg.hpp index 70e7efa2e8..b92e574d60 100644 --- a/boost/boost/config/compiler/common_edg.hpp +++ b/boost/boost/config/compiler/common_edg.hpp @@ -104,6 +104,37 @@ #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif #ifdef c_plusplus // EDG has "long long" in non-strict mode diff --git a/boost/boost/config/compiler/cray.hpp b/boost/boost/config/compiler/cray.hpp index 3ce29f0114..3f66043357 100644 --- a/boost/boost/config/compiler/cray.hpp +++ b/boost/boost/config/compiler/cray.hpp @@ -1,4 +1,5 @@ // (C) Copyright John Maddock 2011. +// (C) Copyright Cray, Inc. 2013 // 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) @@ -9,8 +10,8 @@ #define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE) -#if _RELEASE < 7 -# error "Boost is not configured for Cray compilers prior to version 7, please try the configure script." +#if _RELEASE < 8 +# error "Boost is not configured for Cray compilers prior to version 8, please try the configure script." #endif // @@ -22,12 +23,14 @@ #include "boost/config/compiler/common_edg.hpp" + // -// Cray peculiarities, probably version 7 specific: // -#undef BOOST_NO_CXX11_AUTO_DECLARATIONS -#undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_AUTO_DECLARATIONS +#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_HAS_NRVO +#define BOOST_NO_CXX11_VARIADIC_MACROS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_UNICODE_LITERALS @@ -55,11 +58,35 @@ #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CHAR16_T -#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + + //#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG #define BOOST_MATH_DISABLE_STD_FPCLASSIFY //#define BOOST_HAS_FPCLASSIFY -#define BOOST_SP_USE_PTHREADS -#define BOOST_AC_USE_PTHREADS +#define BOOST_SP_USE_PTHREADS +#define BOOST_AC_USE_PTHREADS + +/* everything that follows is working around what are thought to be + * compiler shortcomings. Revist all of these regularly. + */ + +//#define BOOST_USE_ENUM_STATIC_ASSERT +//#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS //(this may be implied by the previous #define + +// These constants should be provided by the +// compiler, at least when -hgnu is asserted on the command line. + +#ifndef __ATOMIC_RELAXED +#define __ATOMIC_RELAXED 0 +#define __ATOMIC_CONSUME 1 +#define __ATOMIC_ACQUIRE 2 +#define __ATOMIC_RELEASE 3 +#define __ATOMIC_ACQ_REL 4 +#define __ATOMIC_SEQ_CST 5 +#endif + + diff --git a/boost/boost/config/compiler/digitalmars.hpp b/boost/boost/config/compiler/digitalmars.hpp index 7de6adb100..a3d293c7b5 100644 --- a/boost/boost/config/compiler/digitalmars.hpp +++ b/boost/boost/config/compiler/digitalmars.hpp @@ -80,6 +80,37 @@ #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif #if (__DMC__ <= 0x840) #error "Compiler not supported or configured - please reconfigure" diff --git a/boost/boost/config/compiler/gcc.hpp b/boost/boost/config/compiler/gcc.hpp index aa628e5a76..41705df039 100644 --- a/boost/boost/config/compiler/gcc.hpp +++ b/boost/boost/config/compiler/gcc.hpp @@ -16,8 +16,13 @@ // // Define BOOST_GCC so we know this is "real" GCC and not some pretender: // +#define BOOST_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #if !defined(__CUDACC__) -#define BOOST_GCC (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#define BOOST_GCC BOOST_GCC_VERSION +#endif + +#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) +# define BOOST_GCC_CXX11 #endif #if __GNUC__ == 3 @@ -42,11 +47,11 @@ #endif // GCC prior to 3.4 had #pragma once too but it didn't work well with filesystem links -#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +#if BOOST_GCC_VERSION >= 30400 #define BOOST_HAS_PRAGMA_ONCE #endif -#if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 ) +#if BOOST_GCC_VERSION < 40400 // Previous versions of GCC did not completely implement value-initialization: // GCC Bug 30111, "Value-initialization of POD base class doesn't initialize // members", reported by Jonathan Wakely in 2006, @@ -74,8 +79,12 @@ // // gcc has "long long" +// Except on Darwin with standard compliance enabled (-pedantic) +// Apple gcc helpfully defines this macro we can query // -#define BOOST_HAS_LONG_LONG +#if !defined(__DARWIN_NO_LONG_LONG) +# define BOOST_HAS_LONG_LONG +#endif // // gcc implements the named return value optimization since version 3.1 @@ -110,7 +119,7 @@ // // RTTI and typeinfo detection is possible post gcc-4.3: // -#if __GNUC__ * 100 + __GNUC_MINOR__ >= 403 +#if BOOST_GCC_VERSION > 40300 # ifndef __GXX_RTTI # ifndef BOOST_NO_TYPEID # define BOOST_NO_TYPEID @@ -137,7 +146,7 @@ // C++0x features in 4.3.n and later // -#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && defined(__GXX_EXPERIMENTAL_CXX0X__) +#if (BOOST_GCC_VERSION >= 40300) && defined(BOOST_GCC_CXX11) // C++0x features are only enabled when -std=c++0x or -std=gnu++0x are // passed on the command line, which in turn defines // __GXX_EXPERIMENTAL_CXX0X__. @@ -150,19 +159,11 @@ # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS # define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_STATIC_ASSERT - -// Variadic templates compiler: -// http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html -# if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__)) -# define BOOST_HAS_VARIADIC_TMPL -# else -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -# endif #endif // C++0x features in 4.4.n and later // -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if (BOOST_GCC_VERSION < 40400) || !defined(BOOST_GCC_CXX11) # define BOOST_NO_CXX11_AUTO_DECLARATIONS # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS # define BOOST_NO_CXX11_CHAR16_T @@ -172,20 +173,21 @@ # define BOOST_NO_CXX11_DELETED_FUNCTIONS # define BOOST_NO_CXX11_TRAILING_RESULT_TYPES # define BOOST_NO_CXX11_INLINE_NAMESPACES +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES #endif -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) +#if BOOST_GCC_VERSION < 40500 # define BOOST_NO_SFINAE_EXPR #endif // GCC 4.5 forbids declaration of defaulted functions in private or protected sections -#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && (__GNUC__ == 4 && __GNUC_MINOR__ <= 5) +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 5) || !defined(BOOST_GCC_CXX11) # define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS #endif // C++0x features in 4.5.0 and later // -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if (BOOST_GCC_VERSION < 40500) || !defined(BOOST_GCC_CXX11) # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_LAMBDAS # define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS @@ -195,7 +197,7 @@ // C++0x features in 4.5.1 and later // -#if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40501) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if (BOOST_GCC_VERSION < 40501) || !defined(BOOST_GCC_CXX11) // scoped enums have a serious bug in 4.4.0, so define BOOST_NO_CXX11_SCOPED_ENUMS before 4.5.1 // See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064 # define BOOST_NO_CXX11_SCOPED_ENUMS @@ -203,7 +205,7 @@ // C++0x features in 4.6.n and later // -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11) #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR @@ -213,21 +215,55 @@ // C++0x features in 4.7.n and later // -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if (BOOST_GCC_VERSION < 40700) || !defined(BOOST_GCC_CXX11) +# define BOOST_NO_CXX11_FINAL # define BOOST_NO_CXX11_TEMPLATE_ALIASES # define BOOST_NO_CXX11_USER_DEFINED_LITERALS +# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS #endif // C++0x features in 4.8.n and later // -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11) # define BOOST_NO_CXX11_ALIGNAS #endif // C++0x features in 4.8.1 and later // -#if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40801) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if (BOOST_GCC_VERSION < 40801) || !defined(BOOST_GCC_CXX11) # define BOOST_NO_CXX11_DECLTYPE_N3276 +# define BOOST_NO_CXX11_REF_QUALIFIERS +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif + +// C++14 features in 4.9.0 and later +// +#if (BOOST_GCC_VERSION < 40900) || (__cplusplus < 201300) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +# define BOOST_NO_CXX14_DECLTYPE_AUTO +# if !((BOOST_GCC_VERSION >= 40801) && (BOOST_GCC_VERSION < 40900) && defined(BOOST_GCC_CXX11)) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +# endif +#endif + + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +// +// Unused attribute: +#if __GNUC__ >= 4 +# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) #endif #ifndef BOOST_COMPILER @@ -243,12 +279,12 @@ // versions check: // we don't know gcc prior to version 3.30: -#if (__GNUC__ < 3) || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3)) +#if (BOOST_GCC_VERSION< 30300) # error "Compiler not configured - please reconfigure" #endif // -// last known and checked version is 4.6 (Pre-release): -#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6)) +// last known and checked version is 4.9: +#if (BOOST_GCC_VERSION > 40900) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # else @@ -258,4 +294,3 @@ # endif #endif - diff --git a/boost/boost/config/compiler/gcc_xml.hpp b/boost/boost/config/compiler/gcc_xml.hpp index d2e0c74f89..c11f29dd01 100644 --- a/boost/boost/config/compiler/gcc_xml.hpp +++ b/boost/boost/config/compiler/gcc_xml.hpp @@ -58,6 +58,37 @@ # define BOOST_NO_CXX11_ALIGNAS # define BOOST_NO_CXX11_TRAILING_RESULT_TYPES # define BOOST_NO_CXX11_INLINE_NAMESPACES +# define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif #define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__ diff --git a/boost/boost/config/compiler/hp_acc.hpp b/boost/boost/config/compiler/hp_acc.hpp index f08dca44ac..fb63839a57 100644 --- a/boost/boost/config/compiler/hp_acc.hpp +++ b/boost/boost/config/compiler/hp_acc.hpp @@ -122,6 +122,7 @@ #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS /* See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and diff --git a/boost/boost/config/compiler/intel.hpp b/boost/boost/config/compiler/intel.hpp index 3f0eaa18db..b47610c16f 100644 --- a/boost/boost/config/compiler/intel.hpp +++ b/boost/boost/config/compiler/intel.hpp @@ -17,7 +17,11 @@ #include "boost/config/compiler/common_edg.hpp" #if defined(__INTEL_COMPILER) +#if __INTEL_COMPILER == 9999 +# define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1. +#else # define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER +#endif #elif defined(__ICL) # define BOOST_INTEL_CXX_VERSION __ICL #elif defined(__ICC) @@ -34,11 +38,18 @@ # define BOOST_INTEL_STDCXX0X #endif -#ifdef BOOST_INTEL_STDCXX0X -#define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) -#else -#define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +#ifdef __GNUC__ +# define BOOST_INTEL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#endif + +#if !defined(BOOST_COMPILER) +# if defined(BOOST_INTEL_STDCXX0X) +# define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +# else +# define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +# endif #endif + #define BOOST_INTEL BOOST_INTEL_CXX_VERSION #if defined(_WIN32) || defined(_WIN64) @@ -157,6 +168,24 @@ template<> struct assert_intrinsic_wchar_t {}; #define BOOST_UNLIKELY(x) __builtin_expect(x, 0) #endif +// RTTI +// __RTTI is the EDG macro +// __INTEL_RTTI__ is the Intel macro +// __GXX_RTTI is the g++ macro +// _CPPRTTI is the MSVC++ macro +#if !defined(__RTTI) && !defined(__INTEL_RTTI__) && !defined(__GXX_RTTI) && !defined(_CPPRTTI) + +#if !defined(BOOST_NO_RTTI) +# define BOOST_NO_RTTI +#endif + +// in MS mode, static typeid works even when RTTI is off +#if !defined(_MSC_VER) && !defined(BOOST_NO_TYPEID) +# define BOOST_NO_TYPEID +#endif + +#endif + // // versions check: // we don't support Intel prior to version 6.0: @@ -184,7 +213,7 @@ template<> struct assert_intrinsic_wchar_t {}; // (Niels Dekker, LKEB, May 2010) // Apparently Intel 12.1 (compiler version number 9999 !!) has the same issue (compiler regression). #if defined(__INTEL_COMPILER) -# if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999) || (defined(_WIN32) && (__INTEL_COMPILER < 1500)) +# if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999) || (defined(_WIN32) && (__INTEL_COMPILER < 1600)) # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION # endif #endif @@ -199,74 +228,187 @@ template<> struct assert_intrinsic_wchar_t {}; #endif // // C++0x features -// - ICC added static_assert in 11.0 (first version with C++0x support) +// For each feature we need to check both the Intel compiler version, +// and the version of MSVC or GCC that we are emulating. +// See http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/ +// for a list of which features were implemented in which Intel releases. // #if defined(BOOST_INTEL_STDCXX0X) -# undef BOOST_NO_CXX11_STATIC_ASSERT -// -// These pass our test cases, but aren't officially supported according to: -// http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/ -// -//# undef BOOST_NO_CXX11_LAMBDAS -//# undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -//# undef BOOST_NO_CXX11_DECLTYPE -//# undef BOOST_NO_CXX11_AUTO_DECLARATIONS -//# undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#endif - -#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION >= 1200) -//# undef BOOST_NO_CXX11_RVALUE_REFERENCES // Enabling this breaks Filesystem and Exception libraries -//# undef BOOST_NO_CXX11_SCOPED_ENUMS // doesn't really work!! -# undef BOOST_NO_CXX11_DELETED_FUNCTIONS -# undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -# undef BOOST_NO_CXX11_LAMBDAS -# undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -# undef BOOST_NO_CXX11_DECLTYPE -# undef BOOST_NO_CXX11_AUTO_DECLARATIONS -# undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -# undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#endif - -// icl Version 12.1.0.233 Build 20110811 and possibly some other builds -// had an incorrect __INTEL_COMPILER value of 9999. Intel say this has been fixed. -#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION > 1200) -# undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -# undef BOOST_NO_CXX11_NULLPTR -# undef BOOST_NO_CXX11_RVALUE_REFERENCES -# undef BOOST_NO_SFINAE_EXPR -# undef BOOST_NO_CXX11_TEMPLATE_ALIASES -# undef BOOST_NO_CXX11_VARIADIC_TEMPLATES - -// http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/ -// continues to list scoped enum support as "Partial" -//# undef BOOST_NO_CXX11_SCOPED_ENUMS -#endif -#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION >= 1310) && !defined(_MSC_VER) -# undef BOOST_NO_CXX11_INLINE_NAMESPACES +// BOOST_NO_CXX11_CONSTEXPR: +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && !defined(_MSC_VER) +// Available in earlier Intel versions, but fail our tests: +# undef BOOST_NO_CXX11_CONSTEXPR +#endif +// BOOST_NO_CXX11_NULLPTR: +#if (BOOST_INTEL_CXX_VERSION >= 1210) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_NULLPTR +#endif +// BOOST_NO_CXX11_TEMPLATE_ALIASES +#if (BOOST_INTEL_CXX_VERSION >= 1210) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_TEMPLATE_ALIASES +#endif + +// BOOST_NO_CXX11_DECLTYPE +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_DECLTYPE +#endif + +// BOOST_NO_CXX11_DECLTYPE_N3276 +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_DECLTYPE_N3276 +#endif + +// BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) # undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -// This one generates internal compiler errors in multiprecision, disabled for now: -//# undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -// This one generates errors when used with conditional exception specifications, for example in multiprecision: -//# undef BOOST_NO_CXX11_NOEXCEPT -# undef BOOST_NO_CXX11_RANGE_BASED_FOR +#endif + +// BOOST_NO_CXX11_RVALUE_REFERENCES +#if (BOOST_INTEL_CXX_VERSION >= 1300) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +// This is available from earlier Intel versions, but breaks Filesystem and other libraries: +# undef BOOST_NO_CXX11_RVALUE_REFERENCES +#endif + +// BOOST_NO_CXX11_STATIC_ASSERT +#if (BOOST_INTEL_CXX_VERSION >= 1110) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_STATIC_ASSERT +#endif + +// BOOST_NO_CXX11_VARIADIC_TEMPLATES +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_VARIADIC_TEMPLATES +#endif + +// BOOST_NO_CXX11_VARIADIC_MACROS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40200)) && (!defined(_MSC_VER) || (_MSC_VER >= 1400)) +# undef BOOST_NO_CXX11_VARIADIC_MACROS +#endif + +// BOOST_NO_CXX11_AUTO_DECLARATIONS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_AUTO_DECLARATIONS +#endif + +// BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +#endif + +// BOOST_NO_CXX11_CHAR16_T +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +# undef BOOST_NO_CXX11_CHAR16_T +#endif + +// BOOST_NO_CXX11_CHAR32_T +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +# undef BOOST_NO_CXX11_CHAR32_T +#endif + +// BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#endif + +// BOOST_NO_CXX11_DELETED_FUNCTIONS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_DELETED_FUNCTIONS +#endif + +// BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) +# undef BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#endif + +// BOOST_NO_CXX11_SCOPED_ENUMS +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40501)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) +// This is available but broken in earlier Intel releases. # undef BOOST_NO_CXX11_SCOPED_ENUMS +#endif + +// BOOST_NO_SFINAE_EXPR +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +# undef BOOST_NO_SFINAE_EXPR +#endif + +// BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +// This is available in earlier Intel releases, but breaks Multiprecision: +# undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#endif + +// BOOST_NO_CXX11_LAMBDAS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +# undef BOOST_NO_CXX11_LAMBDAS +#endif + +// BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) +# undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS +#endif + +// BOOST_NO_CXX11_RANGE_BASED_FOR +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) +# undef BOOST_NO_CXX11_RANGE_BASED_FOR +#endif + +// BOOST_NO_CXX11_RAW_LITERALS +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_RAW_LITERALS +#endif + +// BOOST_NO_CXX11_UNICODE_LITERALS +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +# undef BOOST_NO_CXX11_UNICODE_LITERALS +#endif + +// BOOST_NO_CXX11_NOEXCEPT +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) +// Available in earlier Intel release, but generates errors when used with +// conditional exception specifications, for example in multiprecision: +# undef BOOST_NO_CXX11_NOEXCEPT +#endif + +// BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) # undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #endif -#if (BOOST_INTEL_CXX_VERSION >= 1310) -# undef BOOST_NO_SFINAE_EXPR -#endif -#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION >= 1400) && !defined(_MSC_VER) -# undef BOOST_NO_CXX11_UNICODE_LITERALS -# undef BOOST_NO_CXX11_RAW_LITERALS -// This one generates errors when used with conditional exception specifications, for example in multiprecision: -//# undef BOOST_NO_CXX11_NOEXCEPT -// This breaks multiprecision: -//# undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -# undef BOOST_NO_CXX11_HDR_THREAD -# undef BOOST_NO_CXX11_CHAR32_T -# undef BOOST_NO_CXX11_CHAR16_T + +// BOOST_NO_CXX11_USER_DEFINED_LITERALS +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) +# undef BOOST_NO_CXX11_USER_DEFINED_LITERALS +#endif + +// BOOST_NO_CXX11_ALIGNAS +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) +# undef BOOST_NO_CXX11_ALIGNAS +#endif + +// BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) +# undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#endif + +// BOOST_NO_CXX11_INLINE_NAMESPACES +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) +# undef BOOST_NO_CXX11_INLINE_NAMESPACES +#endif + +// BOOST_NO_CXX11_REF_QUALIFIERS +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) +# undef BOOST_NO_CXX11_REF_QUALIFIERS +#endif + +// BOOST_NO_CXX11_FINAL +#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) +# undef BOOST_NO_CXX11_FINAL #endif +#endif + +// +// Broken in all versions up to 15: +#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS + #if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION <= 1310) # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST @@ -278,20 +420,6 @@ template<> struct assert_intrinsic_wchar_t {}; # define BOOST_NO_CXX11_HDR_TUPLE #endif -#if defined(_MSC_VER) && (_MSC_VER <= 1700) -// -// Although the Intel compiler is capable of supporting these, it appears not to in MSVC compatibility mode: -// -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -# define BOOST_NO_CXX11_DELETED_FUNCTIONS -# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -# define BOOST_NO_CXX11_TEMPLATE_ALIASES -# if(BOOST_INTEL_CXX_VERSION < 1310) -# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -# endif -#endif - #if (BOOST_INTEL_CXX_VERSION < 1200) // // fenv.h appears not to work with Intel prior to 12.0: @@ -299,11 +427,18 @@ template<> struct assert_intrinsic_wchar_t {}; # define BOOST_NO_FENV_H #endif +// Intel 13.10 fails to access defaulted functions of a base class declared in private or protected sections, +// producing the following errors: +// error #453: protected function "..." (declared at ...") is not accessible through a "..." pointer or object +#if (BOOST_INTEL_CXX_VERSION <= 1310) +# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS +#endif + #if defined(_MSC_VER) && (_MSC_VER >= 1600) # define BOOST_HAS_STDINT_H #endif -#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310) +#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310) && !defined(__CUDACC__) # define BOOST_HAS_INT128 #endif diff --git a/boost/boost/config/compiler/metrowerks.hpp b/boost/boost/config/compiler/metrowerks.hpp index e17278607c..c930143450 100644 --- a/boost/boost/config/compiler/metrowerks.hpp +++ b/boost/boost/config/compiler/metrowerks.hpp @@ -123,6 +123,37 @@ #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif #define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) diff --git a/boost/boost/config/compiler/mpw.hpp b/boost/boost/config/compiler/mpw.hpp index 69104674d4..76045bcd3f 100644 --- a/boost/boost/config/compiler/mpw.hpp +++ b/boost/boost/config/compiler/mpw.hpp @@ -72,6 +72,37 @@ #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif // // versions check: diff --git a/boost/boost/config/compiler/pathscale.hpp b/boost/boost/config/compiler/pathscale.hpp index 567d83cc19..7c211c4517 100644 --- a/boost/boost/config/compiler/pathscale.hpp +++ b/boost/boost/config/compiler/pathscale.hpp @@ -80,4 +80,35 @@ # define BOOST_NO_CXX11_ALIGNAS # define BOOST_NO_CXX11_TRAILING_RESULT_TYPES # define BOOST_NO_CXX11_INLINE_NAMESPACES +# define BOOST_NO_CXX11_REF_QUALIFIERS +# define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif #endif diff --git a/boost/boost/config/compiler/pgi.hpp b/boost/boost/config/compiler/pgi.hpp index d50cbef82d..e5605c9ec2 100644 --- a/boost/boost/config/compiler/pgi.hpp +++ b/boost/boost/config/compiler/pgi.hpp @@ -118,7 +118,37 @@ #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif // // version check: // probably nothing to do here? diff --git a/boost/boost/config/compiler/sunpro_cc.hpp b/boost/boost/config/compiler/sunpro_cc.hpp index 486d5c432b..2fd6d3ece0 100644 --- a/boost/boost/config/compiler/sunpro_cc.hpp +++ b/boost/boost/config/compiler/sunpro_cc.hpp @@ -86,26 +86,22 @@ # define BOOST_SYMBOL_VISIBLE __global #endif - - -// -// Issues that effect all known versions: -// +#if (__SUNPRO_CC < 0x5130) +// C++03 features in 12.4: #define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#define BOOST_NO_SFINAE_EXPR #define BOOST_NO_ADL_BARRIER +#define BOOST_NO_CXX11_VARIADIC_MACROS +#endif -// -// C++0x features -// -# define BOOST_HAS_LONG_LONG - +#if (__SUNPRO_CC < 0x5130) || (__cplusplus < 201100) +// C++11 only featuires in 12.4: #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE -#define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS @@ -120,18 +116,63 @@ #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS -#define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_VARIADIC_MACROS -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_FINAL +#endif +// +// Issues that effect all known versions: +// +// Variadic templates pass our test case, but enabling this +// causes the compiler to issue a signal 11 and bail out +// in various libraries. The others fail our test cases. +// +#define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +// +// C++0x features +// +# define BOOST_HAS_LONG_LONG + + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif // // Version // diff --git a/boost/boost/config/compiler/vacpp.hpp b/boost/boost/config/compiler/vacpp.hpp index 17c02f9106..6c228eab6e 100644 --- a/boost/boost/config/compiler/vacpp.hpp +++ b/boost/boost/config/compiler/vacpp.hpp @@ -129,3 +129,34 @@ #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) +# define BOOST_NO_CXX14_BINARY_LITERALS +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +# define BOOST_NO_CXX14_DECLTYPE_AUTO +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) +# define BOOST_NO_CXX14_GENERIC_LAMBDAS +#endif +#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#endif +#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif diff --git a/boost/boost/config/compiler/visualc.hpp b/boost/boost/config/compiler/visualc.hpp index 695fa94306..ce6bbeec78 100644 --- a/boost/boost/config/compiler/visualc.hpp +++ b/boost/boost/config/compiler/visualc.hpp @@ -57,11 +57,6 @@ # define BOOST_NO_CXX11_VARIADIC_MACROS #endif -#if defined(UNDER_CE) -// Windows CE does not have a conforming signature for swprintf -# define BOOST_NO_SWPRINTF -#endif - #if _MSC_VER < 1500 // 140X == VC++ 8.0 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS #endif @@ -91,16 +86,6 @@ # define BOOST_NO_INTRINSIC_WCHAR_T #endif -#if defined(_WIN32_WCE) || defined(UNDER_CE) -# define BOOST_NO_SWPRINTF -#endif - -// we have ThreadEx or GetSystemTimeAsFileTime unless we're running WindowsCE -#if !defined(_WIN32_WCE) && !defined(UNDER_CE) -# define BOOST_HAS_THREADEX -# define BOOST_HAS_GETSYSTEMTIMEASFILETIME -#endif - // // check for exception handling support: #if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) @@ -119,8 +104,11 @@ #if (_MSC_VER >= 1400) && !defined(_DEBUG) # define BOOST_HAS_NRVO #endif +#if _MSC_VER >= 1600 // 160X == VC++ 10.0 +# define BOOST_HAS_PRAGMA_DETECT_MISMATCH +#endif // -// disable Win32 API's if compiler extentions are +// disable Win32 API's if compiler extensions are // turned off: // #if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32) @@ -164,6 +152,7 @@ // C++11 features supported by VC++ 11 (aka 2012) // #if _MSC_VER < 1700 +# define BOOST_NO_CXX11_FINAL # define BOOST_NO_CXX11_RANGE_BASED_FOR # define BOOST_NO_CXX11_SCOPED_ENUMS #endif // _MSC_VER < 1700 @@ -180,20 +169,45 @@ # define BOOST_NO_CXX11_TRAILING_RESULT_TYPES # define BOOST_NO_CXX11_VARIADIC_TEMPLATES # define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +# define BOOST_NO_CXX11_DECLTYPE_N3276 +#endif + +// C++11 features supported by VC++ 14 (aka 2015) Preview +// +#if (_MSC_FULL_VER < 190022310) +# define BOOST_NO_CXX11_NOEXCEPT +# define BOOST_NO_CXX11_REF_QUALIFIERS +# define BOOST_NO_CXX11_USER_DEFINED_LITERALS +# define BOOST_NO_CXX11_ALIGNAS +# define BOOST_NO_CXX11_INLINE_NAMESPACES +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_CHAR32_T +# define BOOST_NO_CXX11_UNICODE_LITERALS +# define BOOST_NO_CXX14_DECLTYPE_AUTO +# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +# define BOOST_NO_CXX14_BINARY_LITERALS +# define BOOST_NO_CXX14_GENERIC_LAMBDAS #endif // C++11 features not supported by any versions -#define BOOST_NO_CXX11_CHAR16_T -#define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#define BOOST_NO_CXX11_ALIGNAS -#define BOOST_NO_CXX11_INLINE_NAMESPACES + +// C++ 14: +#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif +#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +# define BOOST_NO_CXX14_CONSTEXPR +#endif +#if (__cplusplus < 201304) // There's no SD6 check for this.... +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +#endif +#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif // // prefix and suffix headers: @@ -230,6 +244,8 @@ # define BOOST_COMPILER_VERSION evc11 # elif _MSC_VER < 1900 # define BOOST_COMPILER_VERSION evc12 +# elif _MSC_VER < 2000 +# define BOOST_COMPILER_VERSION evc14 # else # if defined(BOOST_ASSERT_CONFIG) # error "Unknown EVC++ compiler version - please run the configure tests and report the results" @@ -257,6 +273,8 @@ # define BOOST_COMPILER_VERSION 11.0 # elif _MSC_VER < 1900 # define BOOST_COMPILER_VERSION 12.0 +# elif _MSC_VER < 2000 +# define BOOST_COMPILER_VERSION 14.0 # else # define BOOST_COMPILER_VERSION _MSC_VER # endif @@ -266,8 +284,8 @@ #endif // -// last known and checked version is 18.00.20827.3 (VC12 RC, aka 2013 RC): -#if (_MSC_VER > 1800 && _MSC_FULL_VER > 180020827) +// last known and checked version is 19.00.22129 (VC14 Preview): +#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190022310) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # else diff --git a/boost/boost/config/platform/haiku.hpp b/boost/boost/config/platform/haiku.hpp new file mode 100644 index 0000000000..e3910d8424 --- /dev/null +++ b/boost/boost/config/platform/haiku.hpp @@ -0,0 +1,33 @@ +// (C) Copyright Jessica Hamilton 2014. +// 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 for most recent version. + +// Haiku specific config options: + +#define BOOST_PLATFORM "Haiku" + +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_STDINT_H +#define BOOST_HASH_NO_EXTENSIONS + +#ifndef BOOST_DISABLE_THREADS +# define BOOST_HAS_THREADS +#endif + +#define BOOST_NO_CXX11_HDR_TYPE_TRAITS +#define BOOST_NO_CXX11_ATOMIC_SMART_PTR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_VARIADIC_MACROS + +// +// thread API's not auto detected: +// +#define BOOST_HAS_SCHED_YIELD +#define BOOST_HAS_PTHREAD_YIELD +#define BOOST_HAS_GETTIMEOFDAY + +// boilerplate code: +#include diff --git a/boost/boost/config/platform/linux.hpp b/boost/boost/config/platform/linux.hpp index a02aff7856..6fa5f45be4 100644 --- a/boost/boost/config/platform/linux.hpp +++ b/boost/boost/config/platform/linux.hpp @@ -72,7 +72,9 @@ // boilerplate code: #define BOOST_HAS_UNISTD_H #include +#ifdef __USE_GNU #define BOOST_HAS_PTHREAD_YIELD +#endif #ifndef __GNUC__ // diff --git a/boost/boost/config/platform/solaris.hpp b/boost/boost/config/platform/solaris.hpp index 9f9256664b..6e4efc9e56 100644 --- a/boost/boost/config/platform/solaris.hpp +++ b/boost/boost/config/platform/solaris.hpp @@ -23,6 +23,9 @@ # undef BOOST_HAS_PTHREADS #endif - +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#define BOOST_HAS_LOG1P +#define BOOST_HAS_EXPM1 diff --git a/boost/boost/config/platform/win32.hpp b/boost/boost/config/platform/win32.hpp index 6ab59f4e91..60a29abe83 100644 --- a/boost/boost/config/platform/win32.hpp +++ b/boost/boost/config/platform/win32.hpp @@ -41,8 +41,10 @@ #endif #if defined(__MINGW32__) && (__GNUC__ >= 4) -# define BOOST_HAS_EXPM1 -# define BOOST_HAS_LOG1P +// Mingw has these functions but there are persistent problems +// with calls to these crashing, so disable for now: +//# define BOOST_HAS_EXPM1 +//# define BOOST_HAS_LOG1P # define BOOST_HAS_GETTIMEOFDAY #endif // @@ -55,14 +57,21 @@ // all translation units (needed for shared_ptr etc). // -#ifdef _WIN32_WCE +#ifndef BOOST_HAS_PTHREADS +# define BOOST_HAS_WINTHREADS +#endif + +// +// WinCE configuration: +// +#if defined(_WIN32_WCE) || defined(UNDER_CE) # define BOOST_NO_ANSI_APIS +// Windows CE does not have a conforming signature for swprintf +# define BOOST_NO_SWPRINTF #else # define BOOST_HAS_GETSYSTEMTIMEASFILETIME -#endif - -#ifndef BOOST_HAS_PTHREADS -# define BOOST_HAS_WINTHREADS +# define BOOST_HAS_THREADEX +# define BOOST_HAS_GETSYSTEMTIMEASFILETIME #endif #ifndef BOOST_DISABLE_WIN32 diff --git a/boost/boost/config/select_compiler_config.hpp b/boost/boost/config/select_compiler_config.hpp index 0eeb7ad3ee..3d8bdd878b 100644 --- a/boost/boost/config/select_compiler_config.hpp +++ b/boost/boost/config/select_compiler_config.hpp @@ -39,7 +39,8 @@ // Intel # define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" -#elif defined __clang__ +#elif defined __clang__ && !defined(__CUDACC__) +// when using clang and cuda at same time, you want to appear as gcc // Clang C++ emulates GCC, so it has to appear early. # define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp" @@ -112,3 +113,32 @@ # error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)" #endif + +#if 0 +// +// This section allows dependency scanners to find all the headers we *might* include: +// +#include "boost/config/compiler/gcc_xml.hpp" +#include "boost/config/compiler/cray.hpp" +#include "boost/config/compiler/comeau.hpp" +#include "boost/config/compiler/pathscale.hpp" +#include "boost/config/compiler/intel.hpp" +#include "boost/config/compiler/clang.hpp" +#include "boost/config/compiler/digitalmars.hpp" +#include "boost/config/compiler/gcc.hpp" +#include "boost/config/compiler/kai.hpp" +#include "boost/config/compiler/sgi_mipspro.hpp" +#include "boost/config/compiler/compaq_cxx.hpp" +#include "boost/config/compiler/greenhills.hpp" +#include "boost/config/compiler/codegear.hpp" +#include "boost/config/compiler/borland.hpp" +#include "boost/config/compiler/metrowerks.hpp" +#include "boost/config/compiler/sunpro_cc.hpp" +#include "boost/config/compiler/hp_acc.hpp" +#include "boost/config/compiler/mpw.hpp" +#include "boost/config/compiler/vacpp.hpp" +#include "boost/config/compiler/pgi.hpp" +#include "boost/config/compiler/visualc.hpp" + +#endif + diff --git a/boost/boost/config/select_platform_config.hpp b/boost/boost/config/select_platform_config.hpp index 2af61d2d46..acd1409ebc 100644 --- a/boost/boost/config/select_platform_config.hpp +++ b/boost/boost/config/select_platform_config.hpp @@ -41,6 +41,10 @@ // win32: # define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp" +#elif defined(__HAIKU__) +// Haiku +# define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp" + #elif defined(__BEOS__) // BeOS # define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp" @@ -101,5 +105,29 @@ #endif +#if 0 +// +// This section allows dependency scanners to find all the files we *might* include: +// +# include "boost/config/platform/linux.hpp" +# include "boost/config/platform/bsd.hpp" +# include "boost/config/platform/solaris.hpp" +# include "boost/config/platform/irix.hpp" +# include "boost/config/platform/hpux.hpp" +# include "boost/config/platform/cygwin.hpp" +# include "boost/config/platform/win32.hpp" +# include "boost/config/platform/beos.hpp" +# include "boost/config/platform/macos.hpp" +# include "boost/config/platform/aix.hpp" +# include "boost/config/platform/amigaos.hpp" +# include "boost/config/platform/qnxnto.hpp" +# include "boost/config/platform/vxworks.hpp" +# include "boost/config/platform/symbian.hpp" +# include "boost/config/platform/cray.hpp" +# include "boost/config/platform/vms.hpp" +# include + +#endif + diff --git a/boost/boost/config/select_stdlib_config.hpp b/boost/boost/config/select_stdlib_config.hpp index 96ede00222..e270a8813a 100644 --- a/boost/boost/config/select_stdlib_config.hpp +++ b/boost/boost/config/select_stdlib_config.hpp @@ -28,13 +28,19 @@ #else -// If our std lib was not some version of STLport, then include as it is about -// the smallest of the std lib headers that includes real C++ stuff. (Some std libs do not -// include their C++-related macros in so this additional include makes sure -// we get those definitions) -// (again do not rely on this header being included since users can short-circuit this -// header if they know whose std lib they are using.) -#include +// If our std lib was not some version of STLport, and has not otherwise +// been detected, then include as it is about +// the smallest of the std lib headers that includes real C++ stuff. +// Some std libs do not include their C++-related macros in +// so this additional include makes sure we get those definitions. +// Note: do not rely on this header being included since users can short-circuit this +// #include if they know whose std lib they are using. +#if !defined(__LIBCOMO__) && !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)\ + && !defined(_LIBCPP_VERSION) && !defined(__GLIBCPP__) && !defined(__GLIBCXX__)\ + && !defined(__STL_CONFIG_H) && !defined(__MSL_CPP__) && !defined(__IBMCPP__)\ + && !defined(MSIPL_COMPILE_H) && !defined(_YVALS) && !defined(_CPPLIB_VER) +#include +#endif #if defined(__LIBCOMO__) // Comeau STL: @@ -81,5 +87,19 @@ #endif - +#if 0 +// +// This section allows dependency scanners to find all the files we *might* include: +// +# include "boost/config/stdlib/stlport.hpp" +# include "boost/config/stdlib/libcomo.hpp" +# include "boost/config/stdlib/roguewave.hpp" +# include "boost/config/stdlib/libcpp.hpp" +# include "boost/config/stdlib/libstdcpp3.hpp" +# include "boost/config/stdlib/sgi.hpp" +# include "boost/config/stdlib/msl.hpp" +# include "boost/config/stdlib/vacpp.hpp" +# include "boost/config/stdlib/modena.hpp" +# include "boost/config/stdlib/dinkumware.hpp" +#endif diff --git a/boost/boost/config/stdlib/dinkumware.hpp b/boost/boost/config/stdlib/dinkumware.hpp index a8b68be7e8..404e68634b 100644 --- a/boost/boost/config/stdlib/dinkumware.hpp +++ b/boost/boost/config/stdlib/dinkumware.hpp @@ -86,9 +86,18 @@ # define BOOST_NO_STD_LOCALE #endif +// Fix for VC++ 8.0 on up ( I do not have a previous version to test ) +// or clang-cl. If exceptions are off you must manually include the +// header before including the header. Admittedly +// trying to use Boost libraries or the standard C++ libraries without +// exception support is not suggested but currently clang-cl ( v 3.4 ) +// does not support exceptions and must be compiled with exceptions off. +#if !_HAS_EXCEPTIONS && ((defined(BOOST_MSVC) && BOOST_MSVC >= 1400) || (defined(__clang__) && defined(_MSC_VER))) +#include +#endif #include -#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) -# define BOOST_NO_STD_TYPEINFO +#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) +# define BOOST_NO_STD_TYPEINFO #endif // C++0x headers implemented in 520 (as shipped by Microsoft) @@ -125,7 +134,6 @@ # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR #endif @@ -133,8 +141,22 @@ // #if !defined(_CPPLIB_VER) || _CPPLIB_VER < 610 # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_ALLOCATOR +// 540 has std::align but it is not a conforming implementation +# define BOOST_NO_CXX11_STD_ALIGN +#endif + +#if defined(BOOST_INTEL) && (BOOST_INTEL <= 1400) +// Intel's compiler can't handle this header yet: +# define BOOST_NO_CXX11_HDR_ATOMIC #endif + +// 520..610 have std::addressof, but it doesn't support functions +// +# define BOOST_NO_CXX11_ADDRESSOF + #ifdef _CPPLIB_VER # define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER #else @@ -146,12 +168,3 @@ #else # define BOOST_STDLIB "Dinkumware standard library version 1.x" #endif - - - - - - - - - diff --git a/boost/boost/config/stdlib/libcomo.hpp b/boost/boost/config/stdlib/libcomo.hpp index 29490f1b13..5aacfb2a7c 100644 --- a/boost/boost/config/stdlib/libcomo.hpp +++ b/boost/boost/config/stdlib/libcomo.hpp @@ -58,6 +58,9 @@ # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF // // Intrinsic type_traits support. diff --git a/boost/boost/config/stdlib/libcpp.hpp b/boost/boost/config/stdlib/libcpp.hpp index 3d574407ec..eee2d75d21 100644 --- a/boost/boost/config/stdlib/libcpp.hpp +++ b/boost/boost/config/stdlib/libcpp.hpp @@ -23,6 +23,38 @@ # define BOOST_NO_CXX11_HDR_TUPLE #endif +// BOOST_NO_CXX11_ALLOCATOR should imply no support for the C++11 +// allocator model. The C++11 allocator model requires a conforming +// std::allocator_traits which is only possible with C++11 template +// aliases since members rebind_alloc and rebind_traits require it. +#if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES) +# define BOOST_NO_CXX11_ALLOCATOR +#endif + +#if __cplusplus < 201103 +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_CODECVT +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +# define BOOST_NO_CXX11_NUMERIC_LIMITS +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF +#endif + // // These appear to be unusable/incomplete so far: // @@ -30,6 +62,7 @@ # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_HDR_ATOMIC // libc++ uses a non-standard messages_base #define BOOST_NO_STD_MESSAGES diff --git a/boost/boost/config/stdlib/libstdcpp3.hpp b/boost/boost/config/stdlib/libstdcpp3.hpp index 976ab76bae..e4ff8542e3 100644 --- a/boost/boost/config/stdlib/libstdcpp3.hpp +++ b/boost/boost/config/stdlib/libstdcpp3.hpp @@ -36,7 +36,8 @@ || defined(_GLIBCXX__PTHREADS) \ || defined(_GLIBCXX_HAS_GTHREADS) \ || defined(_WIN32) \ - || defined(_AIX) + || defined(_AIX) \ + || defined(__HAIKU__) // // If the std lib has thread support turned on, then turn it on in Boost // as well. We do this because some gcc-3.4 std lib headers define _REENTANT @@ -91,6 +92,14 @@ # endif #endif +// +// Decide whether we have C++11 support turned on: +// +#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103) +# define BOOST_LIBSTDCXX11 +#endif +// +// Decide which version of libstdc++ we have, normally // stdlibc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly // __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the stdlibc++ // developers. He also commented: @@ -102,12 +111,57 @@ // // Another resource for understanding stdlibc++ features is: // http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x +// +// However, using the GCC version number fails when the compiler is clang since this +// only ever claims to emulate GCC-4.2, see https://svn.boost.org/trac/boost/ticket/7473 +// for a long discussion on this issue. What we can do though is use clang's __has_include +// to detect the presence of a C++11 header that was introduced with a specific GCC release. +// We still have to be careful though as many such headers were buggy and/or incomplete when +// first introduced, so we only check for headers that were fully featured from day 1, and then +// use that to infer the underlying GCC version: +// +#ifdef __clang__ + +#if __has_include() +# define BOOST_LIBSTDCXX_VERSION 50000 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40900 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40800 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40700 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40600 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40500 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40400 +#elif __has_include() +# define BOOST_LIBSTDCXX_VERSION 40300 +#endif +// +// GCC 4.8 and 9 add working versions of and respectively. +// However, we have no test for these as the headers were present but broken +// in early GCC versions. +// +#endif + +#if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130) && (__cplusplus >= 201103L) +// +// Oracle Solaris compiler uses it's own verison of libstdc++ but doesn't +// set __GNUC__ +// +#define BOOST_LIBSTDCXX_VERSION 40800 +#endif + +#if !defined(BOOST_LIBSTDCXX_VERSION) +# define BOOST_LIBSTDCXX_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#endif // C++0x headers in GCC 4.3.0 and later // -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if (BOOST_LIBSTDCXX_VERSION < 40300) || !defined(BOOST_LIBSTDCXX11) # define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET @@ -116,7 +170,7 @@ // C++0x headers in GCC 4.4.0 and later // -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if (BOOST_LIBSTDCXX_VERSION < 40400) || !defined(BOOST_LIBSTDCXX11) # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST @@ -129,14 +183,9 @@ # define BOOST_HAS_TR1_COMPLEX_OVERLOADS #endif -#if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) && (!defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) || !defined(BOOST_NO_CXX11_HDR_MUTEX)) -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_MUTEX -#endif - // C++0x features in GCC 4.5.0 and later // -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if (BOOST_LIBSTDCXX_VERSION < 40500) || !defined(BOOST_LIBSTDCXX11) # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_RANDOM @@ -144,23 +193,68 @@ // C++0x features in GCC 4.6.0 and later // -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if (BOOST_LIBSTDCXX_VERSION < 40600) || !defined(BOOST_LIBSTDCXX11) # define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_ADDRESSOF #endif // C++0x features in GCC 4.7.0 and later // -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__) -// Note that although existed prior to 4.7, "stead_clock" is spelled "monotonic_clock" +#if (BOOST_LIBSTDCXX_VERSION < 40700) || !defined(BOOST_LIBSTDCXX11) +// Note that although existed prior to 4.7, "steady_clock" is spelled "monotonic_clock" // so 4.7.0 is the first truely conforming one. # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_ALLOCATOR #endif -// C++0x headers not yet (fully!) implemented +// C++0x features in GCC 4.8.0 and later // +#if (BOOST_LIBSTDCXX_VERSION < 40800) || !defined(BOOST_LIBSTDCXX11) +// Note that although existed prior to gcc 4.8 it was largely unimplemented for many types: +# define BOOST_NO_CXX11_HDR_ATOMIC # define BOOST_NO_CXX11_HDR_THREAD +#endif +#if (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11) +// Although is present and compilable against, the actual implementation is not functional +// even for the simplest patterns such as "\d" or "[0-9]". This is the case at least in gcc up to 4.8, inclusively. +# define BOOST_NO_CXX11_HDR_REGEX +#endif + +#if defined(__clang_major__) && ((__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 7))) +// As of clang-3.6, libstdc++ header throws up errors with clang: +# define BOOST_NO_CXX11_HDR_ATOMIC +#endif + +// C++0x headers not yet (fully!) implemented +// # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_STD_ALIGN + +// +// Headers not present on Solaris with the Oracle compiler: +#if defined(__SUNPRO_CC) +#define BOOST_NO_CXX11_HDR_FUTURE +#define BOOST_NO_CXX11_HDR_FORWARD_LIST +#define BOOST_NO_CXX11_HDR_ATOMIC +#endif + +#if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) + // Headers not always available: +# ifndef BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# endif +# ifndef BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_MUTEX +# endif +# ifndef BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_THREAD +# endif +#endif + +#if (!defined(_GTHREAD_USE_MUTEX_TIMEDLOCK) || (_GTHREAD_USE_MUTEX_TIMEDLOCK == 0)) && !defined(BOOST_NO_CXX11_HDR_MUTEX) +// Timed mutexes are not always available: +# define BOOST_NO_CXX11_HDR_MUTEX +#endif // --- end --- diff --git a/boost/boost/config/stdlib/modena.hpp b/boost/boost/config/stdlib/modena.hpp index b483b6e024..f2a83888c0 100644 --- a/boost/boost/config/stdlib/modena.hpp +++ b/boost/boost/config/stdlib/modena.hpp @@ -47,6 +47,9 @@ # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF #define BOOST_STDLIB "Modena C++ standard library" diff --git a/boost/boost/config/stdlib/msl.hpp b/boost/boost/config/stdlib/msl.hpp index 4f9a2da6ee..b8f43a1286 100644 --- a/boost/boost/config/stdlib/msl.hpp +++ b/boost/boost/config/stdlib/msl.hpp @@ -71,6 +71,9 @@ # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF #define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__) diff --git a/boost/boost/config/stdlib/roguewave.hpp b/boost/boost/config/stdlib/roguewave.hpp index cb80f57082..2b4e8636c5 100644 --- a/boost/boost/config/stdlib/roguewave.hpp +++ b/boost/boost/config/stdlib/roguewave.hpp @@ -183,4 +183,7 @@ # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF diff --git a/boost/boost/config/stdlib/sgi.hpp b/boost/boost/config/stdlib/sgi.hpp index ae9b6ad908..bda77c2275 100644 --- a/boost/boost/config/stdlib/sgi.hpp +++ b/boost/boost/config/stdlib/sgi.hpp @@ -141,6 +141,9 @@ # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF #define BOOST_STDLIB "SGI standard library" diff --git a/boost/boost/config/stdlib/stlport.hpp b/boost/boost/config/stdlib/stlport.hpp index bcc30b99e7..fd5d3a5a6c 100644 --- a/boost/boost/config/stdlib/stlport.hpp +++ b/boost/boost/config/stdlib/stlport.hpp @@ -231,6 +231,9 @@ namespace boost { using std::min; using std::max; } # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF #define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT) diff --git a/boost/boost/config/stdlib/vacpp.hpp b/boost/boost/config/stdlib/vacpp.hpp index 9d16946552..a58ec1c5e1 100644 --- a/boost/boost/config/stdlib/vacpp.hpp +++ b/boost/boost/config/stdlib/vacpp.hpp @@ -47,6 +47,9 @@ # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_STD_ALIGN +# define BOOST_NO_CXX11_ADDRESSOF #define BOOST_STDLIB "Visual Age default standard library" diff --git a/boost/boost/config/suffix.hpp b/boost/boost/config/suffix.hpp index c55579ea62..c0ba333918 100644 --- a/boost/boost/config/suffix.hpp +++ b/boost/boost/config/suffix.hpp @@ -1,5 +1,5 @@ // Boost config.hpp configuration header file ------------------------------// -// boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file +// boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file // Copyright (c) 2001-2003 John Maddock // Copyright (c) 2001 Darin Adler @@ -591,12 +591,33 @@ namespace std{ using ::type_info; } # define BOOST_NOINLINE __declspec(noinline) # elif defined(__GNUC__) && __GNUC__ > 3 // Clang also defines __GNUC__ (as 4) -# define BOOST_NOINLINE __attribute__ ((__noinline__)) +# if defined(__CUDACC__) + // nvcc doesn't always parse __noinline__, + // see: https://svn.boost.org/trac/boost/ticket/9392 +# define BOOST_NOINLINE __attribute__ ((noinline)) +# else +# define BOOST_NOINLINE __attribute__ ((__noinline__)) +# endif # else # define BOOST_NOINLINE # endif #endif +// BOOST_NORETURN ---------------------------------------------// +// Macro to use before a function declaration/definition to designate +// the function as not returning normally (i.e. with a return statement +// or by leaving the function scope, if the function return type is void). +#if !defined(BOOST_NORETURN) +# if defined(_MSC_VER) +# define BOOST_NORETURN __declspec(noreturn) +# elif defined(__GNUC__) +# define BOOST_NORETURN __attribute__ ((__noreturn__)) +# else +# define BOOST_NO_NORETURN +# define BOOST_NORETURN +# endif +#endif + // Branch prediction hints // These macros are intended to wrap conditional expressions that yield true or false // @@ -625,6 +646,11 @@ namespace std{ using ::type_info; } # define BOOST_ALIGNMENT(x) #endif +// Lack of non-public defaulted functions is implied by the lack of any defaulted functions +#if !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) && defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) +# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS +#endif + // Defaulted and deleted function declaration helpers // These macros are intended to be inside a class definition. // BOOST_DEFAULTED_FUNCTION accepts the function declaration and its @@ -660,7 +686,7 @@ namespace std{ using ::type_info; } // Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined // #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276) -#define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE +#define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE #endif // -------------------- Deprecated macros for 1.50 --------------------------- @@ -913,6 +939,18 @@ namespace std{ using ::type_info; } #define BOOST_CONSTEXPR constexpr #define BOOST_CONSTEXPR_OR_CONST constexpr #endif +#if defined(BOOST_NO_CXX14_CONSTEXPR) +#define BOOST_CXX14_CONSTEXPR +#else +#define BOOST_CXX14_CONSTEXPR constexpr +#endif + +// +// Unused variable/typedef workarounds: +// +#ifndef BOOST_ATTRIBUTE_UNUSED +# define BOOST_ATTRIBUTE_UNUSED +#endif #define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST @@ -936,6 +974,22 @@ namespace std{ using ::type_info; } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL) #define BOOST_HAS_VARIADIC_TMPL #endif +// +// Set BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS when +// BOOST_NO_CXX11_VARIADIC_TEMPLATES is set: +// +#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS) +# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS +#endif +// +// Finish off with checks for macros that are depricated / no longer supported, +// if any of these are set then it's very likely that much of Boost will no +// longer work. So stop with a #error for now, but give the user a chance +// to continue at their own risk if they really want to: +// +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_CONFIG_ALLOW_DEPRECATED) +# error "You are using a compiler which lacks features which are now a minimum requirement in order to use Boost, define BOOST_CONFIG_ALLOW_DEPRECATED if you want to continue at your own risk!!!" +#endif #endif diff --git a/boost/boost/config/user.hpp b/boost/boost/config/user.hpp index 5a4a9d4776..28e7476afd 100644 --- a/boost/boost/config/user.hpp +++ b/boost/boost/config/user.hpp @@ -85,8 +85,7 @@ // (this macro is used to turn on __declspec(dllimport) modifiers, so that // the compiler knows which symbols to look for in a dll rather than in a // static library). Note that there may be some libraries that can only -// be statically linked (Boost.Test for example) and others which may only -// be dynamically linked (Boost.Threads for example), in these cases this +// be linked in one way (statically or dynamically), in these cases this // macro has no effect. // #define BOOST_ALL_DYN_LINK @@ -97,9 +96,9 @@ // BOOST_REGEX_DYN_LINK etc (this macro is used to turn on __declspec(dllimport) // modifiers, so that the compiler knows which symbols to look for in a dll // rather than in a static library). -// Note that there may be some libraries that can only be statically linked -// (Boost.Test for example) and others which may only be dynamically linked -// (Boost.Threads for example), in these cases this macro is unsupported. +// Note that there may be some libraries that can only +// be linked in one way (statically or dynamically), +// in these cases this macro is unsupported. // #define BOOST_WHATEVER_DYN_LINK // BOOST_ALL_NO_LIB: Tells the config system not to automatically select @@ -120,5 +119,15 @@ // that feature off. // #define BOOST_WHATEVER_NO_LIB - +// BOOST_LIB_BUILDID: Set to the same value as the value passed to Boost.Build's +// --buildid command line option. For example if you built using: +// +// bjam address-model=64 --buildid=amd64 +// +// then compile your code with: +// +// -DBOOST_LIB_BUILDID = amd64 +// +// to ensure the correct libraries are selected at link time. +// #define BOOST_LIB_BUILDID amd64 diff --git a/boost/boost/container/container_fwd.hpp b/boost/boost/container/container_fwd.hpp index 271cc8b191..a9b421c2b2 100644 --- a/boost/boost/container/container_fwd.hpp +++ b/boost/boost/container/container_fwd.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost +// (C) Copyright Ion Gaztanaga 2005-2014. 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) // @@ -11,15 +11,46 @@ #ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP #define BOOST_CONTAINER_CONTAINER_FWD_HPP -#if defined(_MSC_VER) -# pragma once +#ifndef BOOST_CONFIG_HPP +# include #endif -////////////////////////////////////////////////////////////////////////////// -// Standard predeclarations -////////////////////////////////////////////////////////////////////////////// +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif -/// @cond +//! \file +//! This header file forward declares the following containers: +//! - boost::container::vector +//! - boost::container::stable_vector +//! - boost::container::static_vector +//! - boost::container::slist +//! - boost::container::list +//! - boost::container::set +//! - boost::container::multiset +//! - boost::container::map +//! - boost::container::multimap +//! - boost::container::flat_set +//! - boost::container::flat_multiset +//! - boost::container::flat_map +//! - boost::container::flat_multimap +//! - boost::container::basic_string +//! - boost::container::string +//! - boost::container::wstring +//! +//! It forward declares the following allocators: +//! - boost::container::allocator +//! - boost::container::node_allocator +//! - boost::container::adaptive_pool +//! +//! And finally it defines the following types + +#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + +//Std forward declarations +#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP + #include +#endif namespace boost{ namespace intrusive{ @@ -27,18 +58,12 @@ namespace intrusive{ }} namespace boost{ namespace container{ namespace container_detail{ - -namespace bi = boost::intrusive; - + namespace bi = boost::intrusive; }}} -#include -#include -#include -#include -#include +#include -/// @endcond +#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED ////////////////////////////////////////////////////////////////////////////// // Containers @@ -47,89 +72,153 @@ namespace bi = boost::intrusive; namespace boost { namespace container { -//vector class +//! Enumeration used to configure ordered associative containers +//! with a concrete tree implementation. +enum tree_type_enum +{ + red_black_tree, + avl_tree, + scapegoat_tree, + splay_tree +}; + +#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + +template +class new_allocator; + template > + ,class Allocator = new_allocator > class vector; -//vector class template > + ,class Allocator = new_allocator > class stable_vector; -//vector class +template +class static_vector; + +template < class T, std::size_t N + , class Allocator= new_allocator > +class small_vector; + template > + ,class Allocator = new_allocator > class deque; -//list class template > + ,class Allocator = new_allocator > class list; -//slist class template > + ,class Allocator = new_allocator > class slist; -//set class +template +struct tree_opt; + +typedef tree_opt tree_assoc_defaults; + template - ,class Allocator = std::allocator > + ,class Allocator = new_allocator + ,class Options = tree_assoc_defaults > class set; -//multiset class template - ,class Allocator = std::allocator > + ,class Allocator = new_allocator + ,class Options = tree_assoc_defaults > class multiset; -//map class template - ,class Allocator = std::allocator > > + ,class Allocator = new_allocator > + ,class Options = tree_assoc_defaults > class map; -//multimap class template - ,class Allocator = std::allocator > > + ,class Allocator = new_allocator > + ,class Options = tree_assoc_defaults > class multimap; -//flat_set class template - ,class Allocator = std::allocator > + ,class Allocator = new_allocator > class flat_set; -//flat_multiset class template - ,class Allocator = std::allocator > + ,class Allocator = new_allocator > class flat_multiset; -//flat_map class template - ,class Allocator = std::allocator > > + ,class Allocator = new_allocator > > class flat_map; -//flat_multimap class template - ,class Allocator = std::allocator > > + ,class Allocator = new_allocator > > class flat_multimap; -//basic_string class template - ,class Allocator = std::allocator > + ,class Allocator = new_allocator > class basic_string; +typedef basic_string + + ,new_allocator > +string; + +typedef basic_string + + ,new_allocator > +wstring; + +static const std::size_t ADP_nodes_per_block = 256u; +static const std::size_t ADP_max_free_blocks = 2u; +static const std::size_t ADP_overhead_percent = 1u; +static const std::size_t ADP_only_alignment = 0u; + +template < class T + , std::size_t NodesPerBlock = ADP_nodes_per_block + , std::size_t MaxFreeBlocks = ADP_max_free_blocks + , std::size_t OverheadPercent = ADP_overhead_percent + , unsigned Version = 2 + > +class adaptive_pool; + +template < class T + , unsigned Version = 2 + , unsigned int AllocationDisableMask = 0> +class allocator; + +static const std::size_t NodeAlloc_nodes_per_block = 256u; + +template + < class T + , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block + , std::size_t Version = 2> +class node_allocator; + +#else + +//! Default options for tree-based associative containers +//! - tree_type +//! - optimize_size +typedef implementation_defined tree_assoc_defaults; + +#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + //! Type used to tag that the input range is //! guaranteed to be ordered struct ordered_range_t @@ -149,17 +238,26 @@ struct ordered_unique_range_t //! guaranteed to be ordered and unique static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t(); -//! Type used to tag that the input range is -//! guaranteed to be ordered and unique +//! Type used to tag that the inserted values +//! should be default initialized struct default_init_t {}; -//! Value used to tag that the input range is -//! guaranteed to be ordered and unique +//! Value used to tag that the inserted values +//! should be default initialized static const default_init_t default_init = default_init_t(); -/// @cond +#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + +//! Type used to tag that the inserted values +//! should be value initialized +struct value_init_t +{}; + +//! Value used to tag that the inserted values +//! should be value initialized +static const value_init_t value_init = value_init_t(); -namespace detail_really_deep_namespace { +namespace container_detail_really_deep_namespace { //Otherwise, gcc issues a warning of previously defined //anonymous_instance and unique_instance @@ -175,7 +273,8 @@ struct dummy } //detail_really_deep_namespace { -/// @endcond + +#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED }} //namespace boost { namespace container { diff --git a/boost/boost/container/detail/std_fwd.hpp b/boost/boost/container/detail/std_fwd.hpp new file mode 100644 index 0000000000..a2931c134b --- /dev/null +++ b/boost/boost/container/detail/std_fwd.hpp @@ -0,0 +1,74 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2014-2014. 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 http://www.boost.org/libs/container for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP +#define BOOST_CONTAINER_DETAIL_STD_FWD_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif + +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +////////////////////////////////////////////////////////////////////////////// +// Standard predeclarations +////////////////////////////////////////////////////////////////////////////// + +#if defined(__clang__) && defined(_LIBCPP_VERSION) + #define BOOST_CONTAINER_CLANG_INLINE_STD_NS + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wc++11-extensions" + #define BOOST_CONTAINER_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD + #define BOOST_CONTAINER_STD_NS_END _LIBCPP_END_NAMESPACE_STD +#elif defined(BOOST_GNU_STDLIB) && defined(_GLIBCXX_BEGIN_NAMESPACE_VERSION) //GCC >= 4.6 + #define BOOST_CONTAINER_STD_NS_BEG namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION + #define BOOST_CONTAINER_STD_NS_END _GLIBCXX_END_NAMESPACE_VERSION } // namespace +#elif defined(BOOST_GNU_STDLIB) && defined(_GLIBCXX_BEGIN_NAMESPACE) //GCC >= 4.2 + #define BOOST_CONTAINER_STD_NS_BEG _GLIBCXX_BEGIN_NAMESPACE(std) + #define BOOST_CONTAINER_STD_NS_END _GLIBCXX_END_NAMESPACE +#else + #define BOOST_CONTAINER_STD_NS_BEG namespace std{ + #define BOOST_CONTAINER_STD_NS_END } +#endif + +BOOST_CONTAINER_STD_NS_BEG + +template +class allocator; + +template +struct less; + +template +struct pair; + +template +struct char_traits; + +struct input_iterator_tag; +struct forward_iterator_tag; +struct bidirectional_iterator_tag; +struct random_access_iterator_tag; + +template +class insert_iterator; + +struct allocator_arg_t; + +BOOST_CONTAINER_STD_NS_END + +#ifdef BOOST_CONTAINER_CLANG_INLINE_STD_NS + #pragma GCC diagnostic pop + #undef BOOST_CONTAINER_CLANG_INLINE_STD_NS +#endif //BOOST_CONTAINER_CLANG_INLINE_STD_NS + +#endif //#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP diff --git a/boost/boost/core/addressof.hpp b/boost/boost/core/addressof.hpp new file mode 100644 index 0000000000..889b5825e1 --- /dev/null +++ b/boost/boost/core/addressof.hpp @@ -0,0 +1,162 @@ +// Copyright (C) 2002 Brad King (brad.king@kitware.com) +// Douglas Gregor (gregod@cs.rpi.edu) +// +// Copyright (C) 2002, 2008, 2013 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) + +// For more information, see http://www.boost.org + +#ifndef BOOST_CORE_ADDRESSOF_HPP +#define BOOST_CORE_ADDRESSOF_HPP + +# include +# include +# include + +namespace boost +{ + +namespace detail +{ + +template struct addr_impl_ref +{ + T & v_; + + BOOST_FORCEINLINE addr_impl_ref( T & v ): v_( v ) {} + BOOST_FORCEINLINE operator T& () const { return v_; } + +private: + addr_impl_ref & operator=(const addr_impl_ref &); +}; + +template struct addressof_impl +{ + static BOOST_FORCEINLINE T * f( T & v, long ) + { + return reinterpret_cast( + &const_cast(reinterpret_cast(v))); + } + + static BOOST_FORCEINLINE T * f( T * v, int ) + { + return v; + } +}; + +#if !defined( BOOST_NO_CXX11_NULLPTR ) + +#if !defined( BOOST_NO_CXX11_DECLTYPE ) && ( ( defined( __clang__ ) && !defined( _LIBCPP_VERSION ) ) || defined( __INTEL_COMPILER ) ) + + typedef decltype(nullptr) addr_nullptr_t; + +#else + + typedef std::nullptr_t addr_nullptr_t; + +#endif + +template<> struct addressof_impl< addr_nullptr_t > +{ + typedef addr_nullptr_t T; + + static BOOST_FORCEINLINE T * f( T & v, int ) + { + return &v; + } +}; + +template<> struct addressof_impl< addr_nullptr_t const > +{ + typedef addr_nullptr_t const T; + + static BOOST_FORCEINLINE T * f( T & v, int ) + { + return &v; + } +}; + +template<> struct addressof_impl< addr_nullptr_t volatile > +{ + typedef addr_nullptr_t volatile T; + + static BOOST_FORCEINLINE T * f( T & v, int ) + { + return &v; + } +}; + +template<> struct addressof_impl< addr_nullptr_t const volatile > +{ + typedef addr_nullptr_t const volatile T; + + static BOOST_FORCEINLINE T * f( T & v, int ) + { + return &v; + } +}; + +#endif + +} // namespace detail + +template +BOOST_FORCEINLINE +T * addressof( T & v ) +{ +#if (defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) ) || (defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5120)) + + return boost::detail::addressof_impl::f( v, 0 ); + +#else + + return boost::detail::addressof_impl::f( boost::detail::addr_impl_ref( v ), 0 ); + +#endif +} + +#if defined( __SUNPRO_CC ) && BOOST_WORKAROUND( __SUNPRO_CC, BOOST_TESTED_AT( 0x590 ) ) + +namespace detail +{ + +template struct addressof_addp +{ + typedef T * type; +}; + +} // namespace detail + +template< class T, std::size_t N > +BOOST_FORCEINLINE +typename detail::addressof_addp< T[N] >::type addressof( T (&t)[N] ) +{ + return &t; +} + +#endif + +// Borland doesn't like casting an array reference to a char reference +// but these overloads work around the problem. +#if defined( __BORLANDC__ ) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +template +BOOST_FORCEINLINE +T (*addressof(T (&t)[N]))[N] +{ + return reinterpret_cast(&t); +} + +template +BOOST_FORCEINLINE +const T (*addressof(const T (&t)[N]))[N] +{ + return reinterpret_cast(&t); +} +#endif + +} // namespace boost + +#endif // BOOST_CORE_ADDRESSOF_HPP diff --git a/boost/boost/core/checked_delete.hpp b/boost/boost/core/checked_delete.hpp new file mode 100644 index 0000000000..b086e03e88 --- /dev/null +++ b/boost/boost/core/checked_delete.hpp @@ -0,0 +1,69 @@ +#ifndef BOOST_CORE_CHECKED_DELETE_HPP +#define BOOST_CORE_CHECKED_DELETE_HPP + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/checked_delete.hpp +// +// Copyright (c) 2002, 2003 Peter Dimov +// Copyright (c) 2003 Daniel Frey +// Copyright (c) 2003 Howard Hinnant +// +// 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 http://www.boost.org/libs/core/doc/html/core/checked_delete.html for documentation. +// + +namespace boost +{ + +// verify that types are complete for increased safety + +template inline void checked_delete(T * x) +{ + // intentionally complex - simplification causes regressions + typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); + delete x; +} + +template inline void checked_array_delete(T * x) +{ + typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); + delete [] x; +} + +template struct checked_deleter +{ + typedef void result_type; + typedef T * argument_type; + + void operator()(T * x) const + { + // boost:: disables ADL + boost::checked_delete(x); + } +}; + +template struct checked_array_deleter +{ + typedef void result_type; + typedef T * argument_type; + + void operator()(T * x) const + { + boost::checked_array_delete(x); + } +}; + +} // namespace boost + +#endif // #ifndef BOOST_CORE_CHECKED_DELETE_HPP diff --git a/boost/boost/core/demangle.hpp b/boost/boost/core/demangle.hpp new file mode 100644 index 0000000000..eebd0ce0f1 --- /dev/null +++ b/boost/boost/core/demangle.hpp @@ -0,0 +1,121 @@ +#ifndef BOOST_CORE_DEMANGLE_HPP_INCLUDED +#define BOOST_CORE_DEMANGLE_HPP_INCLUDED + +// core::demangle +// +// Copyright 2014 Peter Dimov +// Copyright 2014 Andrey Semashev +// +// 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 + +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#if defined( __clang__ ) && defined( __has_include ) +# if __has_include() +# define BOOST_CORE_HAS_CXXABI_H +# endif +#elif defined( __GLIBCXX__ ) || defined( __GLIBCPP__ ) +# define BOOST_CORE_HAS_CXXABI_H +#endif + +#if defined( BOOST_CORE_HAS_CXXABI_H ) +# include +# include +# include +#endif + +namespace boost +{ + +namespace core +{ + +inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT; +inline void demangle_free( char const * name ) BOOST_NOEXCEPT; + +class scoped_demangled_name +{ +private: + char const * m_p; + +public: + explicit scoped_demangled_name( char const * name ) BOOST_NOEXCEPT : + m_p( demangle_alloc( name ) ) + { + } + + ~scoped_demangled_name() BOOST_NOEXCEPT + { + demangle_free( m_p ); + } + + char const * get() const BOOST_NOEXCEPT + { + return m_p; + } + + BOOST_DELETED_FUNCTION(scoped_demangled_name( scoped_demangled_name const& )) + BOOST_DELETED_FUNCTION(scoped_demangled_name& operator= ( scoped_demangled_name const& )) +}; + + +#if defined( BOOST_CORE_HAS_CXXABI_H ) + +inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT +{ + int status = 0; + std::size_t size = 0; + return abi::__cxa_demangle( name, NULL, &size, &status ); +} + +inline void demangle_free( char const * name ) BOOST_NOEXCEPT +{ + std::free( const_cast< char* >( name ) ); +} + +inline std::string demangle( char const * name ) +{ + scoped_demangled_name demangled_name( name ); + char const * const p = demangled_name.get(); + if( p ) + { + return p; + } + else + { + return name; + } +} + +#else + +inline char const * demangle_alloc( char const * name ) BOOST_NOEXCEPT +{ + return name; +} + +inline void demangle_free( char const * ) BOOST_NOEXCEPT +{ +} + +inline std::string demangle( char const * name ) +{ + return name; +} + +#endif + +} // namespace core + +} // namespace boost + +#undef BOOST_CORE_HAS_CXXABI_H + +#endif // #ifndef BOOST_CORE_DEMANGLE_HPP_INCLUDED diff --git a/boost/boost/core/enable_if.hpp b/boost/boost/core/enable_if.hpp new file mode 100644 index 0000000000..a3302b18a1 --- /dev/null +++ b/boost/boost/core/enable_if.hpp @@ -0,0 +1,119 @@ +// Boost enable_if library + +// Copyright 2003 (c) The Trustees of Indiana University. + +// 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) + +// Authors: Jaakko Jarvi (jajarvi at osl.iu.edu) +// Jeremiah Willcock (jewillco at osl.iu.edu) +// Andrew Lumsdaine (lums at osl.iu.edu) + + +#ifndef BOOST_CORE_ENABLE_IF_HPP +#define BOOST_CORE_ENABLE_IF_HPP + +#include "boost/config.hpp" + +// Even the definition of enable_if causes problems on some compilers, +// so it's macroed out for all compilers that do not support SFINAE + +#ifndef BOOST_NO_SFINAE + +namespace boost +{ + + template + struct enable_if_c { + typedef T type; + }; + + template + struct enable_if_c {}; + + template + struct enable_if : public enable_if_c {}; + + template + struct lazy_enable_if_c { + typedef typename T::type type; + }; + + template + struct lazy_enable_if_c {}; + + template + struct lazy_enable_if : public lazy_enable_if_c {}; + + + template + struct disable_if_c { + typedef T type; + }; + + template + struct disable_if_c {}; + + template + struct disable_if : public disable_if_c {}; + + template + struct lazy_disable_if_c { + typedef typename T::type type; + }; + + template + struct lazy_disable_if_c {}; + + template + struct lazy_disable_if : public lazy_disable_if_c {}; + +} // namespace boost + +#else + +namespace boost { + + namespace detail { typedef void enable_if_default_T; } + + template + struct enable_if_does_not_work_on_this_compiler; + + template + struct enable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct disable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_enable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_disable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct enable_if : enable_if_does_not_work_on_this_compiler + { }; + + template + struct disable_if : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_enable_if : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_disable_if : enable_if_does_not_work_on_this_compiler + { }; + +} // namespace boost + +#endif // BOOST_NO_SFINAE + +#endif diff --git a/boost/boost/core/explicit_operator_bool.hpp b/boost/boost/core/explicit_operator_bool.hpp new file mode 100644 index 0000000000..a8936e2cd6 --- /dev/null +++ b/boost/boost/core/explicit_operator_bool.hpp @@ -0,0 +1,154 @@ +/* + * Copyright Andrey Semashev 2007 - 2013. + * 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) + */ + +/*! + * \file explicit_operator_bool.hpp + * \author Andrey Semashev + * \date 08.03.2009 + * + * This header defines a compatibility macro that implements an unspecified + * \c bool operator idiom, which is superseded with explicit conversion operators in + * C++11. + */ + +#ifndef BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP +#define BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) + +/*! + * \brief The macro defines an explicit operator of conversion to \c bool + * + * The macro should be used inside the definition of a class that has to + * support the conversion. The class should also implement operator!, + * in terms of which the conversion operator will be implemented. + */ +#define BOOST_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE explicit operator bool () const\ + {\ + return !this->operator! ();\ + } + +/*! + * \brief The macro defines a noexcept explicit operator of conversion to \c bool + * + * The macro should be used inside the definition of a class that has to + * support the conversion. The class should also implement operator!, + * in terms of which the conversion operator will be implemented. + */ +#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\ + BOOST_FORCEINLINE explicit operator bool () const BOOST_NOEXCEPT\ + {\ + return !this->operator! ();\ + } + +/*! + * \brief The macro defines a constexpr explicit operator of conversion to \c bool + * + * The macro should be used inside the definition of a class that has to + * support the conversion. The class should also implement operator!, + * in terms of which the conversion operator will be implemented. + */ +#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE BOOST_CONSTEXPR explicit operator bool () const BOOST_NOEXCEPT\ + {\ + return !this->operator! ();\ + } + +#else // !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) + +#if (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) && !defined(BOOST_NO_COMPILER_CONFIG) +// Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it +#define BOOST_NO_UNSPECIFIED_BOOL +#endif // (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) && !defined(BOOST_NO_COMPILER_CONFIG) + +#if !defined(BOOST_NO_UNSPECIFIED_BOOL) + +namespace boost { + +namespace detail { + +#if !defined(_MSC_VER) && !defined(__IBMCPP__) + + struct unspecified_bool + { + // NOTE TO THE USER: If you see this in error messages then you tried + // to apply an unsupported operator on the object that supports + // explicit conversion to bool. + struct OPERATORS_NOT_ALLOWED; + static void true_value(OPERATORS_NOT_ALLOWED*) {} + }; + typedef void (*unspecified_bool_type)(unspecified_bool::OPERATORS_NOT_ALLOWED*); + +#else + + // MSVC and VACPP are too eager to convert pointer to function to void* even though they shouldn't + struct unspecified_bool + { + // NOTE TO THE USER: If you see this in error messages then you tried + // to apply an unsupported operator on the object that supports + // explicit conversion to bool. + struct OPERATORS_NOT_ALLOWED; + void true_value(OPERATORS_NOT_ALLOWED*) {} + }; + typedef void (unspecified_bool::*unspecified_bool_type)(unspecified_bool::OPERATORS_NOT_ALLOWED*); + +#endif + +} // namespace detail + +} // namespace boost + +#define BOOST_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE operator boost::detail::unspecified_bool_type () const\ + {\ + return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\ + } + +#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\ + BOOST_FORCEINLINE operator boost::detail::unspecified_bool_type () const BOOST_NOEXCEPT\ + {\ + return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\ + } + +#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE BOOST_CONSTEXPR operator boost::detail::unspecified_bool_type () const BOOST_NOEXCEPT\ + {\ + return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\ + } + +#else // !defined(BOOST_NO_UNSPECIFIED_BOOL) + +#define BOOST_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE operator bool () const\ + {\ + return !this->operator! ();\ + } + +#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\ + BOOST_FORCEINLINE operator bool () const BOOST_NOEXCEPT\ + {\ + return !this->operator! ();\ + } + +#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\ + BOOST_FORCEINLINE BOOST_CONSTEXPR operator bool () const BOOST_NOEXCEPT\ + {\ + return !this->operator! ();\ + } + +#endif // !defined(BOOST_NO_UNSPECIFIED_BOOL) + +#endif // !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) + +#endif // BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP diff --git a/boost/boost/core/no_exceptions_support.hpp b/boost/boost/core/no_exceptions_support.hpp new file mode 100644 index 0000000000..a697f01a52 --- /dev/null +++ b/boost/boost/core/no_exceptions_support.hpp @@ -0,0 +1,44 @@ +#ifndef BOOST_CORE_NO_EXCEPTIONS_SUPPORT_HPP +#define BOOST_CORE_NO_EXCEPTIONS_SUPPORT_HPP + +#if defined(_MSC_VER) +# 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. +//---------------------------------------------------------------------- + +#include +#include + +#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/boost/boost/core/noncopyable.hpp b/boost/boost/core/noncopyable.hpp new file mode 100644 index 0000000000..6ae8c244dd --- /dev/null +++ b/boost/boost/core/noncopyable.hpp @@ -0,0 +1,48 @@ +// Boost noncopyable.hpp header file --------------------------------------// + +// (C) Copyright Beman Dawes 1999-2003. 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 http://www.boost.org/libs/utility for documentation. + +#ifndef BOOST_CORE_NONCOPYABLE_HPP +#define BOOST_CORE_NONCOPYABLE_HPP + +#include + +namespace boost { + +// Private copy constructor and copy assignment ensure classes derived from +// class noncopyable cannot be copied. + +// Contributed by Dave Abrahams + +namespace noncopyable_ // protection from unintended ADL +{ + class noncopyable + { + protected: +#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) + BOOST_CONSTEXPR noncopyable() = default; + ~noncopyable() = default; +#else + noncopyable() {} + ~noncopyable() {} +#endif +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) + noncopyable( const noncopyable& ) = delete; + noncopyable& operator=( const noncopyable& ) = delete; +#else + private: // emphasize the following members are private + noncopyable( const noncopyable& ); + noncopyable& operator=( const noncopyable& ); +#endif + }; +} + +typedef noncopyable_::noncopyable noncopyable; + +} // namespace boost + +#endif // BOOST_CORE_NONCOPYABLE_HPP diff --git a/boost/boost/core/ref.hpp b/boost/boost/core/ref.hpp new file mode 100644 index 0000000000..47dc858007 --- /dev/null +++ b/boost/boost/core/ref.hpp @@ -0,0 +1,301 @@ +#ifndef BOOST_CORE_REF_HPP +#define BOOST_CORE_REF_HPP + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +#include +#include +#include + +// +// ref.hpp - ref/cref, useful helper functions +// +// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) +// Copyright (C) 2001, 2002 Peter Dimov +// Copyright (C) 2002 David Abrahams +// +// Copyright (C) 2014 Glen Joseph Fernandes +// glenfe at live dot com +// Copyright (C) 2014 Agustin Berge +// +// 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 http://www.boost.org/libs/core/doc/html/core/ref.html for documentation. +// + +/** + @file +*/ + +/** + Boost namespace. +*/ +namespace boost +{ + +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 ) + + struct ref_workaround_tag {}; + +#endif + +// reference_wrapper + +/** + @brief Contains a reference to an object of type `T`. + + `reference_wrapper` is primarily used to "feed" references to + function templates (algorithms) that take their parameter by + value. It provides an implicit conversion to `T&`, which + usually allows the function templates to work on references + unmodified. +*/ +template class reference_wrapper +{ +public: + /** + Type `T`. + */ + typedef T type; + + /** + Constructs a `reference_wrapper` object that stores a + reference to `t`. + + @remark Does not throw. + */ + BOOST_FORCEINLINE explicit reference_wrapper(T& t): t_(boost::addressof(t)) {} + +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 ) + + BOOST_FORCEINLINE explicit reference_wrapper( T & t, ref_workaround_tag ): t_( boost::addressof( t ) ) {} + +#endif + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + /** + @remark Construction from a temporary object is disabled. + */ + BOOST_DELETED_FUNCTION(reference_wrapper(T&& t)) +public: +#endif + + /** + @return The stored reference. + @remark Does not throw. + */ + BOOST_FORCEINLINE operator T& () const { return *t_; } + + /** + @return The stored reference. + @remark Does not throw. + */ + BOOST_FORCEINLINE T& get() const { return *t_; } + + /** + @return A pointer to the object referenced by the stored + reference. + @remark Does not throw. + */ + BOOST_FORCEINLINE T* get_pointer() const { return t_; } + +private: + + T* t_; +}; + +// ref + +/** + @cond +*/ +#if defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) +# define BOOST_REF_CONST +#else +# define BOOST_REF_CONST const +#endif +/** + @endcond +*/ + +/** + @return `reference_wrapper(t)` + @remark Does not throw. +*/ +template BOOST_FORCEINLINE reference_wrapper BOOST_REF_CONST ref( T & t ) +{ +#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 ) + + return reference_wrapper( t, ref_workaround_tag() ); + +#else + + return reference_wrapper( t ); + +#endif +} + +// cref + +/** + @return `reference_wrapper(t)` + @remark Does not throw. +*/ +template BOOST_FORCEINLINE reference_wrapper BOOST_REF_CONST cref( T const & t ) +{ + return reference_wrapper(t); +} + +#undef BOOST_REF_CONST + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + +/** + @cond +*/ +#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) +# define BOOST_REF_DELETE +#else +# define BOOST_REF_DELETE = delete +#endif +/** + @endcond +*/ + +/** + @remark Construction from a temporary object is disabled. +*/ +template void ref(T const&&) BOOST_REF_DELETE; + +/** + @remark Construction from a temporary object is disabled. +*/ +template void cref(T const&&) BOOST_REF_DELETE; + +#undef BOOST_REF_DELETE + +#endif + +// is_reference_wrapper + +/** + @brief Determine if a type `T` is an instantiation of + `reference_wrapper`. + + The value static constant will be true if the type `T` is a + specialization of `reference_wrapper`. +*/ +template struct is_reference_wrapper +{ + BOOST_STATIC_CONSTANT( bool, value = false ); +}; + +/** + @cond +*/ +template struct is_reference_wrapper< reference_wrapper > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +#if !defined(BOOST_NO_CV_SPECIALIZATIONS) + +template struct is_reference_wrapper< reference_wrapper const > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +template struct is_reference_wrapper< reference_wrapper volatile > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +template struct is_reference_wrapper< reference_wrapper const volatile > +{ + BOOST_STATIC_CONSTANT( bool, value = true ); +}; + +#endif // !defined(BOOST_NO_CV_SPECIALIZATIONS) + +/** + @endcond +*/ + + +// unwrap_reference + +/** + @brief Find the type in a `reference_wrapper`. + + The `typedef` type is `T::type` if `T` is a + `reference_wrapper`, `T` otherwise. +*/ +template struct unwrap_reference +{ + typedef T type; +}; + +/** + @cond +*/ +template struct unwrap_reference< reference_wrapper > +{ + typedef T type; +}; + +#if !defined(BOOST_NO_CV_SPECIALIZATIONS) + +template struct unwrap_reference< reference_wrapper const > +{ + typedef T type; +}; + +template struct unwrap_reference< reference_wrapper volatile > +{ + typedef T type; +}; + +template struct unwrap_reference< reference_wrapper const volatile > +{ + typedef T type; +}; + +#endif // !defined(BOOST_NO_CV_SPECIALIZATIONS) + +/** + @endcond +*/ + +// unwrap_ref + +/** + @return `unwrap_reference::type&(t)` + @remark Does not throw. +*/ +template BOOST_FORCEINLINE typename unwrap_reference::type& unwrap_ref( T & t ) +{ + return t; +} + +// get_pointer + +/** + @cond +*/ +template BOOST_FORCEINLINE T* get_pointer( reference_wrapper const & r ) +{ + return r.get_pointer(); +} +/** + @endcond +*/ + +} // namespace boost + +#endif // #ifndef BOOST_CORE_REF_HPP diff --git a/boost/boost/core/swap.hpp b/boost/boost/core/swap.hpp new file mode 100644 index 0000000000..baa1be970d --- /dev/null +++ b/boost/boost/core/swap.hpp @@ -0,0 +1,60 @@ +// Copyright (C) 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker +// +// 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) +// For more information, see http://www.boost.org + + +#ifndef BOOST_CORE_SWAP_HPP +#define BOOST_CORE_SWAP_HPP + +// Note: the implementation of this utility contains various workarounds: +// - swap_impl is put outside the boost namespace, to avoid infinite +// recursion (causing stack overflow) when swapping objects of a primitive +// type. +// - swap_impl has a using-directive, rather than a using-declaration, +// because some compilers (including MSVC 7.1, Borland 5.9.3, and +// Intel 8.1) don't do argument-dependent lookup when it has a +// using-declaration instead. +// - boost::swap has two template arguments, instead of one, to +// avoid ambiguity when swapping objects of a Boost type that does +// not have its own boost::swap overload. + +#include //for std::swap (C++11) +#include //for std::swap (C++98) +#include //for std::size_t +#include + +namespace boost_swap_impl +{ + template + BOOST_GPU_ENABLED + void swap_impl(T& left, T& right) + { + using namespace std;//use std::swap if argument dependent lookup fails + swap(left,right); + } + + template + BOOST_GPU_ENABLED + void swap_impl(T (& left)[N], T (& right)[N]) + { + for (std::size_t i = 0; i < N; ++i) + { + ::boost_swap_impl::swap_impl(left[i], right[i]); + } + } +} + +namespace boost +{ + template + BOOST_GPU_ENABLED + void swap(T1& left, T2& right) + { + ::boost_swap_impl::swap_impl(left, right); + } +} + +#endif diff --git a/boost/boost/core/typeinfo.hpp b/boost/boost/core/typeinfo.hpp new file mode 100644 index 0000000000..e67b4a3198 --- /dev/null +++ b/boost/boost/core/typeinfo.hpp @@ -0,0 +1,151 @@ +#ifndef BOOST_CORE_TYPEINFO_HPP_INCLUDED +#define BOOST_CORE_TYPEINFO_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// core::typeinfo, BOOST_CORE_TYPEID +// +// Copyright 2007, 2014 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 + +#if defined( BOOST_NO_TYPEID ) + +#include +#include + +namespace boost +{ + +namespace core +{ + +class typeinfo +{ +private: + + typeinfo( typeinfo const& ); + typeinfo& operator=( typeinfo const& ); + + char const * name_; + +public: + + explicit typeinfo( char const * name ): name_( name ) + { + } + + bool operator==( typeinfo const& rhs ) const + { + return this == &rhs; + } + + bool operator!=( typeinfo const& rhs ) const + { + return this != &rhs; + } + + bool before( typeinfo const& rhs ) const + { + return std::less< typeinfo const* >()( this, &rhs ); + } + + char const* name() const + { + return name_; + } +}; + +inline char const * demangled_name( core::typeinfo const & ti ) +{ + return ti.name(); +} + +} // namespace core + +namespace detail +{ + +template struct core_typeid_ +{ + static boost::core::typeinfo ti_; + + static char const * name() + { + return BOOST_CURRENT_FUNCTION; + } +}; + +#if defined(__SUNPRO_CC) +// see #4199, the Sun Studio compiler gets confused about static initialization +// constructor arguments. But an assignment works just fine. +template boost::core::typeinfo core_typeid_< T >::ti_ = core_typeid_< T >::name(); +#else +template boost::core::typeinfo core_typeid_< T >::ti_(core_typeid_< T >::name()); +#endif + +template struct core_typeid_< T & >: core_typeid_< T > +{ +}; + +template struct core_typeid_< T const >: core_typeid_< T > +{ +}; + +template struct core_typeid_< T volatile >: core_typeid_< T > +{ +}; + +template struct core_typeid_< T const volatile >: core_typeid_< T > +{ +}; + +} // namespace detail + +} // namespace boost + +#define BOOST_CORE_TYPEID(T) (boost::detail::core_typeid_::ti_) + +#else + +#include +#include + +namespace boost +{ + +namespace core +{ + +#if defined( BOOST_NO_STD_TYPEINFO ) + +typedef ::type_info typeinfo; + +#else + +typedef std::type_info typeinfo; + +#endif + +inline std::string demangled_name( core::typeinfo const & ti ) +{ + return core::demangle( ti.name() ); +} + +} // namespace core + +} // namespace boost + +#define BOOST_CORE_TYPEID(T) typeid(T) + +#endif + +#endif // #ifndef BOOST_CORE_TYPEINFO_HPP_INCLUDED diff --git a/boost/boost/cstdint.hpp b/boost/boost/cstdint.hpp index 98faeae019..69888352da 100644 --- a/boost/boost/cstdint.hpp +++ b/boost/boost/cstdint.hpp @@ -140,7 +140,7 @@ namespace boost } // namespace boost -#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__) || defined(__VMS) +#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__) || defined(__VMS) || defined(__SOLARIS9__) || defined(__NetBSD__) // FreeBSD and Tru64 have an that contains much of what we need. # include @@ -374,7 +374,7 @@ namespace boost || (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \ || defined(__CYGWIN__) \ || defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \ - || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) + || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(sun) namespace boost { using ::intptr_t; @@ -492,7 +492,7 @@ INT#_C macros if they're not already defined (John Maddock). // 64-bit types + intmax_t and uintmax_t ----------------------------------// #ifndef INT64_C # if defined(BOOST_HAS_LONG_LONG) && \ - (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_LLONG_MAX)) + (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_ULLONG_MAX) || defined(_LLONG_MAX)) # if defined(__hpux) // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions @@ -501,7 +501,8 @@ INT#_C macros if they're not already defined (John Maddock). # elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || \ (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || \ (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) || \ - (defined(_LLONG_MAX) && _LLONG_MAX == 18446744073709551615ULL) + (defined(_ULLONG_MAX) && _ULLONG_MAX == 18446744073709551615ULL) || \ + (defined(_LLONG_MAX) && _LLONG_MAX == 9223372036854775807LL) # define INT64_C(value) value##LL # define UINT64_C(value) value##uLL diff --git a/boost/boost/current_function.hpp b/boost/boost/current_function.hpp index cb36e35c36..5c113f8093 100644 --- a/boost/boost/current_function.hpp +++ b/boost/boost/current_function.hpp @@ -12,11 +12,11 @@ // // Copyright (c) 2002 Peter Dimov and Multi Media Ltd. // -// 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) +// 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 // -// http://www.boost.org/libs/utility/current_function.html +// http://www.boost.org/libs/assert/current_function.html // namespace boost @@ -52,6 +52,10 @@ inline void current_function_helper() # define BOOST_CURRENT_FUNCTION __func__ +#elif defined(__cplusplus) && (__cplusplus >= 201103) + +# define BOOST_CURRENT_FUNCTION __func__ + #else # define BOOST_CURRENT_FUNCTION "(unknown)" @@ -65,4 +69,3 @@ inline void current_function_helper() } // namespace boost #endif // #ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED - diff --git a/boost/boost/detail/basic_pointerbuf.hpp b/boost/boost/detail/basic_pointerbuf.hpp new file mode 100644 index 0000000000..1d8cf373b3 --- /dev/null +++ b/boost/boost/detail/basic_pointerbuf.hpp @@ -0,0 +1,139 @@ +//----------------------------------------------------------------------------- +// boost detail/templated_streams.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2013 John Maddock, Antony Polukhin +// +// +// 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) + +#ifndef BOOST_DETAIL_BASIC_POINTERBUF_HPP +#define BOOST_DETAIL_BASIC_POINTERBUF_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +#include "boost/config.hpp" +#include + +namespace boost { namespace detail { + +// +// class basic_pointerbuf: +// acts as a stream buffer which wraps around a pair of pointers: +// +template +class basic_pointerbuf : public BufferT { +protected: + typedef BufferT base_type; + typedef basic_pointerbuf this_type; + typedef typename base_type::int_type int_type; + typedef typename base_type::char_type char_type; + typedef typename base_type::pos_type pos_type; + typedef ::std::streamsize streamsize; + typedef typename base_type::off_type off_type; + +public: + basic_pointerbuf() : base_type() { setbuf(0, 0); } + const charT* getnext() { return this->gptr(); } + +#ifndef BOOST_NO_USING_TEMPLATE + using base_type::pptr; + using base_type::pbase; +#else + charT* pptr() const { return base_type::pptr(); } + charT* pbase() const { return base_type::pbase(); } +#endif + +protected: + // VC mistakenly assumes that `setbuf` and other functions are not referenced. + // Marking those functions with `inline` suppresses the warnings. + // There must be no harm from marking virtual functions as inline: inline virtual + // call can be inlined ONLY when the compiler knows the "exact class". + inline base_type* setbuf(char_type* s, streamsize n); + inline typename this_type::pos_type seekpos(pos_type sp, ::std::ios_base::openmode which); + inline typename this_type::pos_type seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which); + +private: + basic_pointerbuf& operator=(const basic_pointerbuf&); + basic_pointerbuf(const basic_pointerbuf&); +}; + +template +BufferT* +basic_pointerbuf::setbuf(char_type* s, streamsize n) +{ + this->setg(s, s, s + n); + return this; +} + +template +typename basic_pointerbuf::pos_type +basic_pointerbuf::seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) +{ + typedef typename boost::int_t::least cast_type; + + if(which & ::std::ios_base::out) + return pos_type(off_type(-1)); + std::ptrdiff_t size = this->egptr() - this->eback(); + std::ptrdiff_t pos = this->gptr() - this->eback(); + charT* g = this->eback(); + switch(static_cast(way)) + { + case ::std::ios_base::beg: + if((off < 0) || (off > size)) + return pos_type(off_type(-1)); + else + this->setg(g, g + off, g + size); + break; + case ::std::ios_base::end: + if((off < 0) || (off > size)) + return pos_type(off_type(-1)); + else + this->setg(g, g + size - off, g + size); + break; + case ::std::ios_base::cur: + { + std::ptrdiff_t newpos = static_cast(pos + off); + if((newpos < 0) || (newpos > size)) + return pos_type(off_type(-1)); + else + this->setg(g, g + newpos, g + size); + break; + } + default: ; + } +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4244) +#endif + return static_cast(this->gptr() - this->eback()); +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif +} + +template +typename basic_pointerbuf::pos_type +basic_pointerbuf::seekpos(pos_type sp, ::std::ios_base::openmode which) +{ + if(which & ::std::ios_base::out) + return pos_type(off_type(-1)); + off_type size = static_cast(this->egptr() - this->eback()); + charT* g = this->eback(); + if(off_type(sp) <= size) + { + this->setg(g, g + off_type(sp), g + size); + } + return pos_type(off_type(-1)); +} + +}} // namespace boost::detail + +#endif // BOOST_DETAIL_BASIC_POINTERBUF_HPP + diff --git a/boost/boost/detail/container_fwd.hpp b/boost/boost/detail/container_fwd.hpp index ef17498063..04ce972738 100644 --- a/boost/boost/detail/container_fwd.hpp +++ b/boost/boost/detail/container_fwd.hpp @@ -8,7 +8,7 @@ #if !defined(BOOST_DETAIL_CONTAINER_FWD_HPP) #define BOOST_DETAIL_CONTAINER_FWD_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1020) && \ +#if defined(_MSC_VER) && \ !defined(BOOST_DETAIL_TEST_CONFIG_ONLY) # pragma once #endif @@ -119,12 +119,7 @@ namespace std template class allocator; template class basic_string; -#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) - - template struct string_char_traits; -#else template struct char_traits; -#endif #if defined(BOOST_CONTAINER_FWD_COMPLEX_STRUCT) template struct complex; diff --git a/boost/boost/detail/endian.hpp b/boost/boost/detail/endian.hpp index 3e37db93de..f576c26b89 100644 --- a/boost/boost/detail/endian.hpp +++ b/boost/boost/detail/endian.hpp @@ -1,4 +1,4 @@ -// Copyright 2013 Redshift Software Inc +// Copyright 2013 Rene Rivera // 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/boost/boost/detail/fenv.hpp b/boost/boost/detail/fenv.hpp index f048706416..b268f5c1cc 100644 --- a/boost/boost/detail/fenv.hpp +++ b/boost/boost/detail/fenv.hpp @@ -14,7 +14,7 @@ #if !defined(BOOST_DETAIL_FENV_HPP) #define BOOST_DETAIL_FENV_HPP -/* If we're using clang + glibc, we have to get hacky. +/* If we're using clang + glibc, we have to get hacky. * See http://llvm.org/bugs/show_bug.cgi?id=6907 */ #if defined(__clang__) && (__clang_major__ < 3) && \ defined(__GNU_LIBRARY__) && /* up to version 5 */ \ @@ -61,14 +61,41 @@ using ::feholdexcept; } } +#elif defined(__MINGW32__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 + + // MinGW (32-bit) has a bug in mingw32/bits/c++config.h, it does not define _GLIBCXX_HAVE_FENV_H, + // which prevents the C fenv.h header contents to be included in the C++ wrapper header fenv.h. This is at least + // the case with gcc 4.8.1 packages tested so far, up to 4.8.1-4. Note that there is no issue with + // MinGW-w64. + // To work around the bug we avoid including the C++ wrapper header and include the C header directly + // and import all relevant symbols into std:: ourselves. + + #include <../include/fenv.h> + + namespace std { + using ::fenv_t; + using ::fexcept_t; + using ::fegetexceptflag; + using ::fesetexceptflag; + using ::feclearexcept; + using ::feraiseexcept; + using ::fetestexcept; + using ::fegetround; + using ::fesetround; + using ::fegetenv; + using ::fesetenv; + using ::feupdateenv; + using ::feholdexcept; + } + #else /* if we're not using GNU's C stdlib, fenv.h should work with clang */ + #if defined(__SUNPRO_CC) /* lol suncc */ #include #endif - + #include #endif #endif /* BOOST_DETAIL_FENV_HPP */ - diff --git a/boost/boost/detail/indirect_traits.hpp b/boost/boost/detail/indirect_traits.hpp index f9c0cd6a04..6294e40f6a 100644 --- a/boost/boost/detail/indirect_traits.hpp +++ b/boost/boost/detail/indirect_traits.hpp @@ -16,7 +16,6 @@ # include # include -# include # include # include @@ -26,15 +25,11 @@ # include # include -# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# include -# endif namespace boost { namespace detail { namespace indirect_traits { -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct is_reference_to_const : mpl::false_ { @@ -199,284 +194,6 @@ struct is_pointer_to_class BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_pointer_to_class,(T)) }; -# else - -using namespace boost::detail::is_function_ref_tester_; - -typedef char (&inner_yes_type)[3]; -typedef char (&inner_no_type)[2]; -typedef char (&outer_no_type)[1]; - -template -struct is_const_help -{ - typedef typename mpl::if_< - is_const - , inner_yes_type - , inner_no_type - >::type type; -}; - -template -struct is_volatile_help -{ - typedef typename mpl::if_< - is_volatile - , inner_yes_type - , inner_no_type - >::type type; -}; - -template -struct is_pointer_help -{ - typedef typename mpl::if_< - is_pointer - , inner_yes_type - , inner_no_type - >::type type; -}; - -template -struct is_class_help -{ - typedef typename mpl::if_< - is_class - , inner_yes_type - , inner_no_type - >::type type; -}; - -template -struct is_reference_to_function_aux -{ - static T t; - BOOST_STATIC_CONSTANT( - bool, value = sizeof(detail::is_function_ref_tester(t,0)) == sizeof(::boost::type_traits::yes_type)); - typedef mpl::bool_ type; - }; - -template -struct is_reference_to_function - : mpl::if_, is_reference_to_function_aux, mpl::bool_ >::type -{ -}; - -template -struct is_pointer_to_function_aux -{ - static T t; - BOOST_STATIC_CONSTANT( - bool, value - = sizeof(::boost::type_traits::is_function_ptr_tester(t)) == sizeof(::boost::type_traits::yes_type)); - typedef mpl::bool_ type; -}; - -template -struct is_pointer_to_function - : mpl::if_, is_pointer_to_function_aux, mpl::bool_ >::type -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_pointer_to_function,(T)) -}; - -struct false_helper1 -{ - template - struct apply : mpl::false_ - { - }; -}; - -template -typename is_const_help::type reference_to_const_helper(V&); -outer_no_type -reference_to_const_helper(...); - -struct true_helper1 -{ - template - struct apply - { - static T t; - BOOST_STATIC_CONSTANT( - bool, value - = sizeof(reference_to_const_helper(t)) == sizeof(inner_yes_type)); - typedef mpl::bool_ type; - }; -}; - -template -struct is_reference_to_const_helper1 : true_helper1 -{ -}; - -template <> -struct is_reference_to_const_helper1 : false_helper1 -{ -}; - - -template -struct is_reference_to_const - : is_reference_to_const_helper1::value>::template apply -{ -}; - - -template -struct is_reference_to_non_const_helper1 -{ - template - struct apply - { - static T t; - BOOST_STATIC_CONSTANT( - bool, value - = sizeof(reference_to_const_helper(t)) == sizeof(inner_no_type)); - - typedef mpl::bool_ type; - }; -}; - -template <> -struct is_reference_to_non_const_helper1 : false_helper1 -{ -}; - - -template -struct is_reference_to_non_const - : is_reference_to_non_const_helper1::value>::template apply -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_non_const,(T)) -}; - - -template -typename is_volatile_help::type reference_to_volatile_helper(V&); -outer_no_type -reference_to_volatile_helper(...); - -template -struct is_reference_to_volatile_helper1 -{ - template - struct apply - { - static T t; - BOOST_STATIC_CONSTANT( - bool, value - = sizeof(reference_to_volatile_helper(t)) == sizeof(inner_yes_type)); - typedef mpl::bool_ type; - }; -}; - -template <> -struct is_reference_to_volatile_helper1 : false_helper1 -{ -}; - - -template -struct is_reference_to_volatile - : is_reference_to_volatile_helper1::value>::template apply -{ -}; - -template -typename is_pointer_help::type reference_to_pointer_helper(V&); -outer_no_type reference_to_pointer_helper(...); - -template -struct reference_to_pointer_impl -{ - static T t; - BOOST_STATIC_CONSTANT( - bool, value - = (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::eval_if, is_pointer_to_function_aux, mpl::false_>::type -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_function_pointer,(T)) -}; - - -template -struct is_member_function_pointer_help - : mpl::if_, inner_yes_type, inner_no_type> -{}; - -template -typename is_member_function_pointer_help::type member_function_pointer_helper(V&); -outer_no_type member_function_pointer_helper(...); - -template -struct is_pointer_to_member_function_aux -{ - static T t; - BOOST_STATIC_CONSTANT( - bool, value - = sizeof((member_function_pointer_helper)(t)) == sizeof(inner_yes_type)); - typedef mpl::bool_ type; -}; - -template -struct is_reference_to_member_function_pointer - : mpl::if_< - is_reference - , is_pointer_to_member_function_aux - , mpl::bool_ - >::type -{ - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_member_function_pointer,(T)) -}; - -template -typename is_class_help::type reference_to_class_helper(V const volatile&); -outer_no_type reference_to_class_helper(...); - -template -struct is_reference_to_class -{ - static T t; - BOOST_STATIC_CONSTANT( - bool, value - = (is_reference::value - & (sizeof(reference_to_class_helper(t)) == sizeof(inner_yes_type))) - ); - typedef mpl::bool_ type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_class,(T)) -}; - -template -typename is_class_help::type pointer_to_class_helper(V const volatile*); -outer_no_type pointer_to_class_helper(...); - -template -struct is_pointer_to_class -{ - static T t; - BOOST_STATIC_CONSTANT( - bool, value - = (is_pointer::value - && sizeof(pointer_to_class_helper(t)) == sizeof(inner_yes_type)) - ); - typedef mpl::bool_ type; -}; -# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } diff --git a/boost/boost/detail/interlocked.hpp b/boost/boost/detail/interlocked.hpp deleted file mode 100644 index 1152f710b1..0000000000 --- a/boost/boost/detail/interlocked.hpp +++ /dev/null @@ -1,210 +0,0 @@ -#ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED -#define BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED - -// -// boost/detail/interlocked.hpp -// -// Copyright 2005 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 - -// MS compatible compilers support #pragma once -#ifdef BOOST_HAS_PRAGMA_ONCE -#pragma once -#endif - -#if defined( BOOST_USE_WINDOWS_H ) - -# include - -# 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 -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER InterlockedCompareExchangePointer -# define BOOST_INTERLOCKED_EXCHANGE_POINTER InterlockedExchangePointer - -#elif defined( BOOST_USE_INTRIN_H ) - -#include - -# 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 - -# if defined(_M_IA64) || defined(_M_AMD64) || defined(__x86_64__) || defined(__x86_64) - -# 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 - -#elif defined(_WIN32_WCE) - -#if _WIN32_WCE >= 0x600 - -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 ); - -# 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 - -#else -// 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 - -#endif - -# 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 ) - -#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1500 - -#include - -#elif 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 ); - -#endif - -# if defined(_M_IA64) || defined(_M_AMD64) - -extern "C" void* __cdecl _InterlockedCompareExchangePointer( void* volatile *, void*, void* ); -extern "C" void* __cdecl _InterlockedExchangePointer( void* volatile *, void* ); - -# 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 -# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange -# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange -# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd - -// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets. -#elif defined(__MINGW64_VERSION_MAJOR) - -// MinGW-w64 provides intrin.h for both 32 and 64-bit targets. -#include - -# 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 -# if defined(__x86_64__) || defined(__x86_64) -# 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 - -#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ ) - -#define BOOST_INTERLOCKED_IMPORT __declspec(dllimport) - -namespace boost -{ - -namespace detail -{ - -extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedIncrement( long volatile * ); -extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedDecrement( long volatile * ); -extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedCompareExchange( long volatile *, long, long ); -extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchange( long volatile *, long ); -extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchangeAdd( long volatile *, long ); - -# if defined(_M_IA64) || defined(_M_AMD64) -extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* ); -extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer( void* volatile *, void* ); -# endif - -} // namespace detail - -} // namespace boost - -# define BOOST_INTERLOCKED_INCREMENT ::boost::detail::InterlockedIncrement -# define BOOST_INTERLOCKED_DECREMENT ::boost::detail::InterlockedDecrement -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE ::boost::detail::InterlockedCompareExchange -# define BOOST_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange -# define BOOST_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd - -# if defined(_M_IA64) || defined(_M_AMD64) -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER ::boost::detail::InterlockedCompareExchangePointer -# define BOOST_INTERLOCKED_EXCHANGE_POINTER ::boost::detail::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 - -#else - -# error "Interlocked intrinsics not available" - -#endif - -#endif // #ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED diff --git a/boost/boost/detail/is_function_ref_tester.hpp b/boost/boost/detail/is_function_ref_tester.hpp deleted file mode 100644 index 8e7d1d77f4..0000000000 --- a/boost/boost/detail/is_function_ref_tester.hpp +++ /dev/null @@ -1,136 +0,0 @@ - -// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, -// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. -// 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) - -#if !defined(BOOST_PP_IS_ITERATING) - -///// header body - -#ifndef BOOST_DETAIL_IS_FUNCTION_REF_TESTER_HPP_INCLUDED -#define BOOST_DETAIL_IS_FUNCTION_REF_TESTER_HPP_INCLUDED - -#include "boost/type_traits/detail/yes_no_type.hpp" -#include "boost/type_traits/config.hpp" - -#if defined(BOOST_TT_PREPROCESSING_MODE) -# include "boost/preprocessor/iterate.hpp" -# include "boost/preprocessor/enum_params.hpp" -# include "boost/preprocessor/comma_if.hpp" -#endif - -namespace boost { -namespace detail { -namespace is_function_ref_tester_ { - -template -boost::type_traits::no_type BOOST_TT_DECL is_function_ref_tester(T& ...); - -#if !defined(BOOST_TT_PREPROCESSING_MODE) -// preprocessor-generated part, don't edit by hand! - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24), int); - -#else - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, 25, "boost/detail/is_function_ref_tester.hpp")) -#include BOOST_PP_ITERATE() - -#endif // BOOST_TT_PREPROCESSING_MODE - -} // namespace detail -} // namespace python -} // namespace boost - -#endif // BOOST_DETAIL_IS_FUNCTION_REF_TESTER_HPP_INCLUDED - -///// iteration - -#else -#define i BOOST_PP_FRAME_ITERATION(1) - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(BOOST_PP_ENUM_PARAMS(i,T)), int); - -#undef i -#endif // BOOST_PP_IS_ITERATING - diff --git a/boost/boost/detail/iterator.hpp b/boost/boost/detail/iterator.hpp index 5bb9c6269c..c2e8f1e2a5 100644 --- a/boost/boost/detail/iterator.hpp +++ b/boost/boost/detail/iterator.hpp @@ -3,492 +3,24 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -// Boost versions of -// -// std::iterator_traits<>::iterator_category -// std::iterator_traits<>::difference_type -// std::distance() -// -// ...for all compilers and iterators -// -// Additionally, if X is a pointer -// std::iterator_traits::pointer - -// Otherwise, if partial specialization is supported or X is not a pointer -// std::iterator_traits::value_type -// std::iterator_traits::pointer -// std::iterator_traits::reference -// -// See http://www.boost.org for most recent version including documentation. - -// Revision History -// 04 Mar 2001 - More attempted fixes for Intel C++ (David Abrahams) -// 03 Mar 2001 - Put all implementation into namespace -// boost::detail::iterator_traits_. Some progress made on fixes -// for Intel compiler. (David Abrahams) -// 02 Mar 2001 - Changed BOOST_MSVC to BOOST_MSVC_STD_ITERATOR in a few -// places. (Jeremy Siek) -// 19 Feb 2001 - Improved workarounds for stock MSVC6; use yes_type and -// no_type from type_traits.hpp; stopped trying to remove_cv -// before detecting is_pointer, in honor of the new type_traits -// semantics. (David Abrahams) -// 13 Feb 2001 - Make it work with nearly all standard-conforming iterators -// under raw VC6. The one category remaining which will fail is -// that of iterators derived from std::iterator but not -// boost::iterator and which redefine difference_type. -// 11 Feb 2001 - Clean away code which can never be used (David Abrahams) -// 09 Feb 2001 - Always have a definition for each traits member, even if it -// can't be properly deduced. These will be incomplete types in -// some cases (undefined), but it helps suppress MSVC errors -// elsewhere (David Abrahams) -// 07 Feb 2001 - Support for more of the traits members where possible, making -// this useful as a replacement for std::iterator_traits when -// used as a default template parameter. -// 06 Feb 2001 - Removed useless #includes of standard library headers -// (David Abrahams) - #ifndef ITERATOR_DWA122600_HPP_ -# define ITERATOR_DWA122600_HPP_ - -# include -# include - -// STLPort 4.0 and betas have a bug when debugging is enabled and there is no -// partial specialization: instead of an iterator_category typedef, the standard -// container iterators have _Iterator_category. -// -// Also, whether debugging is enabled or not, there is a broken specialization -// of std::iterator which has no -// typedefs but iterator_category. -# if defined(__SGI_STL_PORT) - -# if (__SGI_STL_PORT <= 0x410) && !defined(__STL_CLASS_PARTIAL_SPECIALIZATION) && defined(__STL_DEBUG) -# define BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF -# endif - -# define BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION - -# endif // STLPort <= 4.1b4 && no partial specialization - -# if !defined(BOOST_NO_STD_ITERATOR_TRAITS) \ - && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_MSVC_STD_ITERATOR) - -namespace boost { namespace detail { - -// Define a new template so it can be specialized -template -struct iterator_traits - : std::iterator_traits -{}; -using std::distance; - -}} // namespace boost::detail - -# else - -# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_MSVC_STD_ITERATOR) - -// This is the case where everything conforms except BOOST_NO_STD_ITERATOR_TRAITS - -namespace boost { namespace detail { - -// Rogue Wave Standard Library fools itself into thinking partial -// specialization is missing on some platforms (e.g. Sun), so fails to -// supply iterator_traits! -template -struct iterator_traits -{ - typedef typename Iterator::value_type value_type; - typedef typename Iterator::reference reference; - typedef typename Iterator::pointer pointer; - typedef typename Iterator::difference_type difference_type; - typedef typename Iterator::iterator_category iterator_category; -}; - -template -struct iterator_traits -{ - typedef T value_type; - typedef T& reference; - typedef T* pointer; - typedef std::ptrdiff_t difference_type; - typedef std::random_access_iterator_tag iterator_category; -}; - -template -struct iterator_traits -{ - typedef T value_type; - typedef T const& reference; - typedef T const* pointer; - typedef std::ptrdiff_t difference_type; - typedef std::random_access_iterator_tag iterator_category; -}; - -}} // namespace boost::detail - -# else - -# include -# include -# include - -# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# include -# include -# endif -# ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION -# include -# endif - -# include -# include -# include - -// should be the last #include -# include "boost/type_traits/detail/bool_trait_def.hpp" - -namespace boost { namespace detail { - -BOOST_MPL_HAS_XXX_TRAIT_DEF(value_type) -BOOST_MPL_HAS_XXX_TRAIT_DEF(reference) -BOOST_MPL_HAS_XXX_TRAIT_DEF(pointer) -BOOST_MPL_HAS_XXX_TRAIT_DEF(difference_type) -BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator_category) - -// is_mutable_iterator -- -// -// A metafunction returning true iff T is a mutable iterator type -// with a nested value_type. Will only work portably with iterators -// whose operator* returns a reference, but that seems to be OK for -// the iterators supplied by Dinkumware. Some input iterators may -// compile-time if they arrive here, and if the compiler is strict -// about not taking the address of an rvalue. - -// This one detects ordinary mutable iterators - the result of -// operator* is convertible to the value_type. -template -type_traits::yes_type is_mutable_iterator_helper(T const*, BOOST_DEDUCED_TYPENAME T::value_type*); - -// Since you can't take the address of an rvalue, the guts of -// is_mutable_iterator_impl will fail if we use &*t directly. This -// makes sure we can still work with non-lvalue iterators. -template T* mutable_iterator_lvalue_helper(T& x); -int mutable_iterator_lvalue_helper(...); - - -// This one detects output iterators such as ostream_iterator which -// return references to themselves. -template -type_traits::yes_type is_mutable_iterator_helper(T const*, T const*); - -type_traits::no_type is_mutable_iterator_helper(...); - -template -struct is_mutable_iterator_impl -{ - static T t; - - BOOST_STATIC_CONSTANT( - bool, value = sizeof( - detail::is_mutable_iterator_helper( - (T*)0 - , mutable_iterator_lvalue_helper(*t) // like &*t - )) - == sizeof(type_traits::yes_type) - ); -}; - -BOOST_TT_AUX_BOOL_TRAIT_DEF1( - is_mutable_iterator,T,::boost::detail::is_mutable_iterator_impl::value) - - -// is_full_iterator_traits -- -// -// A metafunction returning true iff T has all the requisite nested -// types to satisfy the requirements for a fully-conforming -// iterator_traits implementation. -template -struct is_full_iterator_traits_impl -{ - enum { value = - has_value_type::value - & has_reference::value - & has_pointer::value - & has_difference_type::value - & has_iterator_category::value - }; -}; - -BOOST_TT_AUX_BOOL_TRAIT_DEF1( - is_full_iterator_traits,T,::boost::detail::is_full_iterator_traits_impl::value) +#define ITERATOR_DWA122600_HPP_ +// This header is obsolete and will be deprecated. -# ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF -BOOST_MPL_HAS_XXX_TRAIT_DEF(_Iterator_category) - -// is_stlport_40_debug_iterator -- -// -// A metafunction returning true iff T has all the requisite nested -// types to satisfy the requirements of an STLPort 4.0 debug iterator -// iterator_traits implementation. -template -struct is_stlport_40_debug_iterator_impl -{ - enum { value = - has_value_type::value - & has_reference::value - & has_pointer::value - & has_difference_type::value - & has__Iterator_category::value - }; -}; - -BOOST_TT_AUX_BOOL_TRAIT_DEF1( - is_stlport_40_debug_iterator,T,::boost::detail::is_stlport_40_debug_iterator_impl::value) - -template -struct stlport_40_debug_iterator_traits -{ - typedef typename T::value_type value_type; - typedef typename T::reference reference; - typedef typename T::pointer pointer; - typedef typename T::difference_type difference_type; - typedef typename T::_Iterator_category iterator_category; -}; -# endif // BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF - -template struct pointer_iterator_traits; - -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -template -struct pointer_iterator_traits -{ - typedef typename remove_const::type value_type; - typedef T* pointer; - typedef T& reference; - typedef std::random_access_iterator_tag iterator_category; - typedef std::ptrdiff_t difference_type; -}; -# else - -// In case of no template partial specialization, and if T is a -// pointer, iterator_traits::value_type can still be computed. For -// some basic types, remove_pointer is manually defined in -// type_traits/broken_compiler_spec.hpp. For others, do it yourself. - -template class please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_on_cv_unqualified_pointee; - -template -struct pointer_value_type - : mpl::if_< - is_same::type> - , please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_on_cv_unqualified_pointee

- , typename remove_const< - typename remove_pointer

::type - >::type - > -{ -}; - - -template -struct pointer_reference - : mpl::if_< - is_same::type> - , please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_on_cv_unqualified_pointee

- , typename remove_pointer

::type& - > -{ -}; - -template -struct pointer_iterator_traits -{ - typedef T pointer; - typedef std::random_access_iterator_tag iterator_category; - typedef std::ptrdiff_t difference_type; - - typedef typename pointer_value_type::type value_type; - typedef typename pointer_reference::type reference; -}; - -# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -// We'll sort iterator types into one of these classifications, from which we -// can determine the difference_type, pointer, reference, and value_type -template -struct standard_iterator_traits -{ - typedef typename Iterator::difference_type difference_type; - typedef typename Iterator::value_type value_type; - typedef typename Iterator::pointer pointer; - typedef typename Iterator::reference reference; - typedef typename Iterator::iterator_category iterator_category; -}; - -template -struct msvc_stdlib_mutable_traits - : std::iterator_traits -{ - typedef typename std::iterator_traits::distance_type difference_type; - typedef typename std::iterator_traits::value_type* pointer; - typedef typename std::iterator_traits::value_type& reference; -}; +#include -template -struct msvc_stdlib_const_traits - : std::iterator_traits +namespace boost { - typedef typename std::iterator_traits::distance_type difference_type; - typedef const typename std::iterator_traits::value_type* pointer; - typedef const typename std::iterator_traits::value_type& reference; -}; -# ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION -template -struct is_bad_output_iterator - : is_base_and_derived< - std::iterator - , Iterator> +namespace detail { -}; -struct bad_output_iterator_traits -{ - typedef void value_type; - typedef void difference_type; - typedef std::output_iterator_tag iterator_category; - typedef void pointer; - typedef void reference; -}; -# endif - -// If we're looking at an MSVC6 (old Dinkumware) ``standard'' -// iterator, this will generate an appropriate traits class. -template -struct msvc_stdlib_iterator_traits - : mpl::if_< - is_mutable_iterator - , msvc_stdlib_mutable_traits - , msvc_stdlib_const_traits - >::type -{}; - -template -struct non_pointer_iterator_traits - : mpl::if_< - // if the iterator contains all the right nested types... - is_full_iterator_traits - // Use a standard iterator_traits implementation - , standard_iterator_traits -# ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF - // Check for STLPort 4.0 broken _Iterator_category type - , mpl::if_< - is_stlport_40_debug_iterator - , stlport_40_debug_iterator_traits -# endif - // Otherwise, assume it's a Dinkum iterator - , msvc_stdlib_iterator_traits -# ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF - >::type -# endif - >::type -{ -}; - -template -struct iterator_traits_aux - : mpl::if_< - is_pointer - , pointer_iterator_traits - , non_pointer_iterator_traits - >::type -{ -}; - -template -struct iterator_traits -{ - // Explicit forwarding from base class needed to keep MSVC6 happy - // under some circumstances. - private: -# ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION - typedef - typename mpl::if_< - is_bad_output_iterator - , bad_output_iterator_traits - , iterator_traits_aux - >::type base; -# else - typedef iterator_traits_aux base; -# endif - public: - typedef typename base::value_type value_type; - typedef typename base::pointer pointer; - typedef typename base::reference reference; - typedef typename base::difference_type difference_type; - typedef typename base::iterator_category iterator_category; -}; - -// This specialization cuts off ETI (Early Template Instantiation) for MSVC. -template <> struct iterator_traits -{ - typedef int value_type; - typedef int pointer; - typedef int reference; - typedef int difference_type; - typedef int iterator_category; -}; - -}} // namespace boost::detail - -# endif // workarounds - -namespace boost { namespace detail { - -namespace iterator_traits_ -{ - template - struct distance_select - { - static Difference execute(Iterator i1, const Iterator i2, ...) - { - Difference result = 0; - while (i1 != i2) - { - ++i1; - ++result; - } - return result; - } - - static Difference execute(Iterator i1, const Iterator i2, std::random_access_iterator_tag*) - { - return i2 - i1; - } - }; -} // namespace boost::detail::iterator_traits_ - -template -inline typename iterator_traits::difference_type -distance(Iterator first, Iterator last) -{ - typedef typename iterator_traits::difference_type diff_t; - typedef typename ::boost::detail::iterator_traits::iterator_category iterator_category; - - return iterator_traits_::distance_select::execute( - first, last, (iterator_category*)0); -} - -}} - -# endif +using std::iterator_traits; +using std::distance; +} // namespace detail -# undef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF -# undef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION +} // namespace boost #endif // ITERATOR_DWA122600_HPP_ diff --git a/boost/boost/detail/no_exceptions_support.hpp b/boost/boost/detail/no_exceptions_support.hpp index d94e35834f..7d17454a73 100644 --- a/boost/boost/detail/no_exceptions_support.hpp +++ b/boost/boost/detail/no_exceptions_support.hpp @@ -1,87 +1,17 @@ -#ifndef BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP_ -#define BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP_ +/* + * Copyright (c) 2014 Glen Fernandes + * + * 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) + */ -#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: +#ifndef BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP +#define BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP -void foo() { - { try { - ... - } catch (const std::bad_alloc&) { - ... - throw; - } catch (const std::exception& e) { - ... - } - } -} +// The header file at this path is deprecated; +// use boost/core/no_exceptions_support.hpp instead. -With exception support disabled it will expand into: +#include -void foo() { - { if(true) { - ... - } else if (false) { - ... - } else if (false) { - ... - } - } -} -*/ -//---------------------------------------------------------------------- - -#include -#include - -#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/boost/boost/detail/ob_call_traits.hpp b/boost/boost/detail/ob_call_traits.hpp deleted file mode 100644 index eb4df7a30f..0000000000 --- a/boost/boost/detail/ob_call_traits.hpp +++ /dev/null @@ -1,168 +0,0 @@ -// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. -// 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/utility for most recent version including documentation. -// -// Crippled version for crippled compilers: -// see libs/utility/call_traits.htm -// - -/* Release notes: - 01st October 2000: - Fixed call_traits on VC6, using "poor man's partial specialisation", - using ideas taken from "Generative programming" by Krzysztof Czarnecki - & Ulrich Eisenecker. -*/ - -#ifndef BOOST_OB_CALL_TRAITS_HPP -#define BOOST_OB_CALL_TRAITS_HPP - -#ifndef BOOST_CONFIG_HPP -#include -#endif - -#ifndef BOOST_ARITHMETIC_TYPE_TRAITS_HPP -#include -#endif -#ifndef BOOST_COMPOSITE_TYPE_TRAITS_HPP -#include -#endif - -namespace boost{ - -#ifdef BOOST_MSVC6_MEMBER_TEMPLATES -// -// use member templates to emulate -// partial specialisation: -// -namespace detail{ - -template -struct standard_call_traits -{ - typedef T value_type; - typedef T& reference; - typedef const T& const_reference; - typedef const T& param_type; -}; -template -struct simple_call_traits -{ - typedef T value_type; - typedef T& reference; - typedef const T& const_reference; - typedef const T param_type; -}; -template -struct reference_call_traits -{ - typedef T value_type; - typedef T reference; - typedef T const_reference; - typedef T param_type; -}; - -template -struct call_traits_chooser -{ - template - struct rebind - { - typedef standard_call_traits type; - }; -}; - -template <> -struct call_traits_chooser -{ - template - struct rebind - { - typedef simple_call_traits type; - }; -}; - -template <> -struct call_traits_chooser -{ - template - struct rebind - { - typedef reference_call_traits type; - }; -}; - -template -struct call_traits_sizeof_chooser2 -{ - template - struct small_rebind - { - typedef simple_call_traits small_type; - }; -}; - -template<> -struct call_traits_sizeof_chooser2 -{ - template - struct small_rebind - { - typedef standard_call_traits small_type; - }; -}; - -template <> -struct call_traits_chooser -{ - template - struct rebind - { - enum { sizeof_choice = (sizeof(T) <= sizeof(void*)) }; - typedef call_traits_sizeof_chooser2<(sizeof(T) <= sizeof(void*))> chooser; - typedef typename chooser::template small_rebind bound_type; - typedef typename bound_type::small_type type; - }; -}; - -} // namespace detail -template -struct call_traits -{ -private: - typedef detail::call_traits_chooser< - ::boost::is_pointer::value, - ::boost::is_arithmetic::value, - ::boost::is_reference::value - > chooser; - typedef typename chooser::template rebind bound_type; - typedef typename bound_type::type call_traits_type; -public: - typedef typename call_traits_type::value_type value_type; - typedef typename call_traits_type::reference reference; - typedef typename call_traits_type::const_reference const_reference; - typedef typename call_traits_type::param_type param_type; -}; - -#else -// -// sorry call_traits is completely non-functional -// blame your broken compiler: -// - -template -struct call_traits -{ - typedef T value_type; - typedef T& reference; - typedef const T& const_reference; - typedef const T& param_type; -}; - -#endif // member templates - -} - -#endif // BOOST_OB_CALL_TRAITS_HPP diff --git a/boost/boost/detail/reference_content.hpp b/boost/boost/detail/reference_content.hpp index daf56a8b19..36b80d244e 100644 --- a/boost/boost/detail/reference_content.hpp +++ b/boost/boost/detail/reference_content.hpp @@ -15,13 +15,8 @@ #include "boost/config.hpp" -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # include "boost/mpl/bool.hpp" # include "boost/type_traits/has_nothrow_copy.hpp" -#else -# include "boost/mpl/if.hpp" -# include "boost/type_traits/is_reference.hpp" -#endif #include "boost/mpl/void.hpp" @@ -78,7 +73,6 @@ public: // queries template struct make_reference_content; -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct make_reference_content @@ -92,19 +86,6 @@ struct make_reference_content< T& > typedef reference_content type; }; -#else // defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -template -struct make_reference_content - : mpl::if_< - is_reference - , reference_content - , T - > -{ -}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION workaround template <> struct make_reference_content< mpl::void_ > @@ -124,7 +105,6 @@ struct make_reference_content< mpl::void_ > // reference_content type traits specializations // -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct has_nothrow_copy< @@ -134,7 +114,6 @@ struct has_nothrow_copy< { }; -#endif // !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) } // namespace boost diff --git a/boost/boost/detail/sp_typeinfo.hpp b/boost/boost/detail/sp_typeinfo.hpp index 43fae78ef1..4e4de55b05 100644 --- a/boost/boost/detail/sp_typeinfo.hpp +++ b/boost/boost/detail/sp_typeinfo.hpp @@ -9,104 +9,15 @@ // detail/sp_typeinfo.hpp // +// Deprecated, please use boost/core/typeinfo.hpp +// // Copyright 2007 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 - -#if defined( BOOST_NO_TYPEID ) - -#include -#include - -namespace boost -{ - -namespace detail -{ - -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 struct sp_typeid_ -{ - static sp_typeinfo ti_; - - static char const * name() - { - return BOOST_CURRENT_FUNCTION; - } -}; +// 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) -#if defined(__SUNPRO_CC) -// see #4199, the Sun Studio compiler gets confused about static initialization -// constructor arguments. But an assignment works just fine. -template sp_typeinfo sp_typeid_< T >::ti_ = sp_typeid_< T >::name(); -#else -template sp_typeinfo sp_typeid_< T >::ti_(sp_typeid_< T >::name()); -#endif - -template struct sp_typeid_< T & >: sp_typeid_< T > -{ -}; - -template struct sp_typeid_< T const >: sp_typeid_< T > -{ -}; - -template struct sp_typeid_< T volatile >: sp_typeid_< T > -{ -}; - -template struct sp_typeid_< T const volatile >: sp_typeid_< T > -{ -}; - -} // namespace detail - -} // namespace boost - -#define BOOST_SP_TYPEID(T) (boost::detail::sp_typeid_::ti_) - -#else - -#include +#include namespace boost { @@ -114,22 +25,12 @@ namespace boost namespace detail { -#if defined( BOOST_NO_STD_TYPEINFO ) - -typedef ::type_info sp_typeinfo; - -#else - -typedef std::type_info sp_typeinfo; - -#endif +typedef boost::core::typeinfo sp_typeinfo; } // namespace detail } // namespace boost -#define BOOST_SP_TYPEID(T) typeid(T) - -#endif +#define BOOST_SP_TYPEID(T) BOOST_CORE_TYPEID(T) #endif // #ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED diff --git a/boost/boost/exception/detail/attribute_noreturn.hpp b/boost/boost/exception/detail/attribute_noreturn.hpp deleted file mode 100644 index ae9f031efe..0000000000 --- a/boost/boost/exception/detail/attribute_noreturn.hpp +++ /dev/null @@ -1,17 +0,0 @@ -//Copyright (c) 2009 Emil Dotchevski and Reverge Studios, Inc. - -//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) - -#ifndef UUID_61531AB0680611DEADD5846855D89593 -#define UUID_61531AB0680611DEADD5846855D89593 - -#if defined(_MSC_VER) -#define BOOST_ATTRIBUTE_NORETURN __declspec(noreturn) -#elif defined(__GNUC__) -#define BOOST_ATTRIBUTE_NORETURN __attribute__((__noreturn__)) -#else -#define BOOST_ATTRIBUTE_NORETURN -#endif - -#endif diff --git a/boost/boost/exception/exception.hpp b/boost/boost/exception/exception.hpp index 31d43178df..d762cf827e 100644 --- a/boost/boost/exception/exception.hpp +++ b/boost/boost/exception/exception.hpp @@ -207,6 +207,12 @@ boost class exception { + // + public: + template void set( typename Tag::type const & ); + template typename Tag::type const * get() const; + // + protected: exception(): diff --git a/boost/boost/format/detail/config_macros.hpp b/boost/boost/format/detail/config_macros.hpp index 1f01b1789b..44d1e86c63 100644 --- a/boost/boost/format/detail/config_macros.hpp +++ b/boost/boost/format/detail/config_macros.hpp @@ -49,12 +49,6 @@ #define BOOST_NO_OVERLOAD_FOR_NON_CONST #endif -// gcc-2.95's native stringstream is not usable -#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) -#define BOOST_FORMAT_IGNORE_STRINGSTREAM -#endif - - // **** Workaround for io streams, stlport and msvc. #ifdef BOOST_IO_NEEDS_USING_DECLARATION namespace boost { @@ -80,6 +74,10 @@ namespace boost { // -end N.S. boost #endif // needs_using_declaration +#if ! defined(BOOST_NO_STD_LOCALE) +#include +#endif + // *** hide std::locale if it doesnt exist. // this typedef is either std::locale or int, avoids placing ifdefs everywhere diff --git a/boost/boost/format/detail/msvc_disambiguater.hpp b/boost/boost/format/detail/msvc_disambiguater.hpp index f12e5e97b2..c2692c4435 100644 --- a/boost/boost/format/detail/msvc_disambiguater.hpp +++ b/boost/boost/format/detail/msvc_disambiguater.hpp @@ -14,9 +14,7 @@ #ifndef BOOST_MSVC_DISAMBIGUATER_HPP #define BOOST_MSVC_DISAMBIGUATER_HPP -#if BOOST_WORKAROUND( BOOST_MSVC, <= 1300) || \ - BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) - // this whole header is specifically for msvc up to 7.0 +#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) #include #include @@ -51,6 +49,6 @@ struct disambiguater } // namespace io } // namespace boost -#endif // -BOOST_MSVC +#endif // -__DECCXX_VER #endif // -BOOST_MSVC_DISAMBIGUATER_HPP diff --git a/boost/boost/format/detail/workarounds_stlport.hpp b/boost/boost/format/detail/workarounds_stlport.hpp index eb35dc1708..5d435b98a0 100644 --- a/boost/boost/format/detail/workarounds_stlport.hpp +++ b/boost/boost/format/detail/workarounds_stlport.hpp @@ -13,12 +13,6 @@ #ifndef BOOST_MACROS_STLPORT_HPP #define BOOST_MACROS_STLPORT_HPP -#if defined(_STLPORT_VERSION) && BOOST_WORKAROUND( BOOST_MSVC, <= 1300) -// msvc-6-stlport fails to find basic_string::append( iterator, iterator) when linking -// might affect other MSwindows compilers -#define BOOST_NO_STRING_APPEND -#endif - // *** This should go to "boost/config/stdlib/stlport.hpp". // If the streams are not native and there are problems with using templates diff --git a/boost/boost/format/feed_args.hpp b/boost/boost/format/feed_args.hpp index 53243dccc8..dcfd955b36 100644 --- a/boost/boost/format/feed_args.hpp +++ b/boost/boost/format/feed_args.hpp @@ -70,9 +70,8 @@ namespace detail { } // -mk_str(..) -#if BOOST_WORKAROUND( BOOST_MSVC, <= 1300) || \ - BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) -// MSVC needs to be tricked to disambiguate this simple overload.. +#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) +// __DECCXX needs to be tricked to disambiguate this simple overload.. // the trick is in "boost/format/msvc_disambiguater.hpp" template< class Ch, class Tr, class T> inline @@ -115,7 +114,40 @@ namespace detail { os << x ; } #endif -#endif // -msvc workaround +#endif // -__DECCXX workaround + + template< class Ch, class Tr, class T> + void call_put_head(BOOST_IO_STD basic_ostream & os, const void* x) { + put_head(os, *(typename ::boost::remove_reference::type*)x); + } + + template< class Ch, class Tr, class T> + void call_put_last(BOOST_IO_STD basic_ostream & os, const void* x) { + put_last(os, *(T*)x); + } + + template< class Ch, class Tr> + struct put_holder { + template + put_holder(T& t) + : arg(&t), + put_head(&call_put_head), + put_last(&call_put_last) + {} + const void* arg; + void (*put_head)(BOOST_IO_STD basic_ostream & os, const void* x); + void (*put_last)(BOOST_IO_STD basic_ostream & os, const void* x); + }; + + template< class Ch, class Tr> inline + void put_head( BOOST_IO_STD basic_ostream & os, const put_holder& t) { + t.put_head(os, t.arg); + } + + template< class Ch, class Tr> inline + void put_last( BOOST_IO_STD basic_ostream & os, const put_holder& t) { + t.put_last(os, t.arg); + } template< class Ch, class Tr, class Alloc, class T> @@ -258,7 +290,7 @@ namespace detail { template basic_format& - feed (basic_format& self, T x) { + feed_impl (basic_format& self, T x) { if(self.dumped_) self.clear(); distribute (self, x); ++self.cur_arg_; @@ -268,6 +300,12 @@ namespace detail { } return self; } + + template inline + basic_format& + feed (basic_format& self, T x) { + return feed_impl&>(self, put_holder(x)); + } } // namespace detail } // namespace io diff --git a/boost/boost/format/format_class.hpp b/boost/boost/format/format_class.hpp index 4555e56ec3..2ac59ef280 100644 --- a/boost/boost/format/format_class.hpp +++ b/boost/boost/format/format_class.hpp @@ -126,7 +126,7 @@ namespace boost { template friend basic_format& - io::detail::feed (basic_format&, T); + io::detail::feed_impl (basic_format&, T); template friend void io::detail::distribute (basic_format&, T); diff --git a/boost/boost/format/format_fwd.hpp b/boost/boost/format/format_fwd.hpp index be3228af3c..16b8565468 100644 --- a/boost/boost/format/format_fwd.hpp +++ b/boost/boost/format/format_fwd.hpp @@ -21,18 +21,12 @@ namespace boost { template , class Alloc = std::allocator > -#else - class Tr = std::string_char_traits, class Alloc = std::alloc > -#endif + class Tr = BOOST_IO_STD char_traits, class Alloc = std::allocator > class basic_format; typedef basic_format format; -#if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_STD_WSTREAMBUF) \ - && !defined(BOOST_FORMAT_IGNORE_STRINGSTREAM) +#if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_STD_WSTREAMBUF) typedef basic_format wformat; #endif diff --git a/boost/boost/format/internals.hpp b/boost/boost/format/internals.hpp index b0d874a1fb..1c67006aee 100644 --- a/boost/boost/format/internals.hpp +++ b/boost/boost/format/internals.hpp @@ -104,6 +104,15 @@ namespace detail { template void stream_format_state:: apply_on (basic_ios & os, boost::io::detail::locale_t * loc_default) const { + // If a locale is available, set it first. "os.fill(fill_);" may chrash otherwise. +#if !defined(BOOST_NO_STD_LOCALE) + if(loc_) + os.imbue(loc_.get()); + else if(loc_default) + os.imbue(*loc_default); +#else + (void) loc_default; // keep compiler quiet if we don't support locales +#endif // set the state of this stream according to our params if(width_ != -1) os.width(width_); @@ -114,14 +123,6 @@ namespace detail { os.flags(flags_); os.clear(rdstate_); os.exceptions(exceptions_); -#if !defined(BOOST_NO_STD_LOCALE) - if(loc_) - os.imbue(loc_.get()); - else if(loc_default) - os.imbue(*loc_default); -#else - (void) loc_default; // keep compiler quiet if we don't support locales -#endif } template diff --git a/boost/boost/format/internals_fwd.hpp b/boost/boost/format/internals_fwd.hpp index e44eb3c132..18cf122412 100644 --- a/boost/boost/format/internals_fwd.hpp +++ b/boost/boost/format/internals_fwd.hpp @@ -50,6 +50,10 @@ namespace detail { template basic_format& feed (basic_format& self, T x); + + template + basic_format& + feed_impl (basic_format& self, T x); } // namespace detail diff --git a/boost/boost/format/parsing.hpp b/boost/boost/format/parsing.hpp index b14ca82c98..27c53ba8d7 100644 --- a/boost/boost/format/parsing.hpp +++ b/boost/boost/format/parsing.hpp @@ -390,11 +390,7 @@ namespace detail { void append_string(String& dst, const String& src, const typename String::size_type beg, const typename String::size_type end) { -#if !defined(BOOST_NO_STRING_APPEND) dst.append(src.begin()+beg, src.begin()+end); -#else - dst += src.substr(beg, end-beg); -#endif } } // detail namespace @@ -475,7 +471,8 @@ namespace detail { if( !ordered_args) { if(max_argN >= 0 ) { // dont mix positional with non-positionnal directives if(exceptions() & io::bad_format_string_bit) - boost::throw_exception(io::bad_format_string(max_argN, 0)); + boost::throw_exception( + io::bad_format_string(static_cast(max_argN), 0)); // else do nothing. => positionnal arguments are processed as non-positionnal } // set things like it would have been with positional directives : diff --git a/boost/boost/function/function_base.hpp b/boost/boost/function/function_base.hpp index 78b7dd1e99..9e01ef94af 100644 --- a/boost/boost/function/function_base.hpp +++ b/boost/boost/function/function_base.hpp @@ -56,7 +56,7 @@ // need to use std::type_info::name to compare instead of operator==. #if defined( BOOST_NO_TYPEID ) # define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y)) -#elif (defined(__GNUC__) && __GNUC__ >= 3) \ +#elif defined(__GNUC__) \ || defined(_AIX) \ || ( defined(__sgi) && defined(__host_mips)) # include @@ -66,11 +66,11 @@ # define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y)) #endif -#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 || defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406 && !defined(BOOST_STRICT_CONFIG) +#if defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406 && !defined(BOOST_STRICT_CONFIG) # define BOOST_FUNCTION_TARGET_FIX(x) x #else # define BOOST_FUNCTION_TARGET_FIX(x) -#endif // not MSVC +#endif // __ICL etc #if !BOOST_WORKAROUND(__BORLANDC__, < 0x5A0) # define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \ @@ -294,7 +294,7 @@ namespace boost { } else if (op == destroy_functor_tag) out_buffer.func_ptr = 0; else if (op == check_functor_type_tag) { - const detail::sp_typeinfo& check_type + const boost::detail::sp_typeinfo& check_type = *out_buffer.type.type; if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) out_buffer.obj_ptr = &in_buffer.func_ptr; @@ -661,11 +661,7 @@ public: } template -#if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300) - const Functor* target( Functor * = 0 ) const -#else const Functor* target() const -#endif { if (!vtable) return 0; @@ -683,11 +679,7 @@ public: template bool contains(const F& f) const { -#if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300) - if (const F* fp = this->target( (F*)0 )) -#else if (const F* fp = this->template target()) -#endif { return function_equal(*fp, f); } else { diff --git a/boost/boost/function/function_fwd.hpp b/boost/boost/function/function_fwd.hpp index fb318c990a..e79b504899 100644 --- a/boost/boost/function/function_fwd.hpp +++ b/boost/boost/function/function_fwd.hpp @@ -19,8 +19,7 @@ namespace boost { namespace python { namespace objects { }}} #endif -#if defined (BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - || defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) \ +#if defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) \ || !(defined(BOOST_STRICT_CONFIG) || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540) # define BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX #endif diff --git a/boost/boost/function/function_template.hpp b/boost/boost/function/function_template.hpp index 73ed72ef40..ab7abc5143 100644 --- a/boost/boost/function/function_template.hpp +++ b/boost/boost/function/function_template.hpp @@ -26,7 +26,13 @@ #define BOOST_FUNCTION_PARMS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_PARM,BOOST_PP_EMPTY) -#define BOOST_FUNCTION_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, a) +#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES +# define BOOST_FUNCTION_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, a) +#else +# include +# define BOOST_FUNCTION_ARG(J,I,D) ::boost::forward< BOOST_PP_CAT(T,I) >(BOOST_PP_CAT(a,I)) +# define BOOST_FUNCTION_ARGS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_ARG,BOOST_PP_EMPTY) +#endif #define BOOST_FUNCTION_ARG_TYPE(J,I,D) \ typedef BOOST_PP_CAT(T,I) BOOST_PP_CAT(BOOST_PP_CAT(arg, BOOST_PP_INC(I)),_type); @@ -914,10 +920,10 @@ namespace boost { template void assign_to(Functor f) { - using detail::function::vtable_base; + using boost::detail::function::vtable_base; - typedef typename detail::function::get_function_tag::type tag; - typedef detail::function::BOOST_FUNCTION_GET_INVOKER get_invoker; + typedef typename boost::detail::function::get_function_tag::type tag; + typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER get_invoker; typedef typename get_invoker:: template apply @@ -935,11 +941,12 @@ namespace boost { if (stored_vtable.assign_to(f, functor)) { std::size_t value = reinterpret_cast(&stored_vtable.base); + // coverity[pointless_expression]: suppress coverity warnings on apparant if(const). if (boost::has_trivial_copy_constructor::value && boost::has_trivial_destructor::value && - detail::function::function_allows_small_object_optimization::value) - value |= static_cast(0x01); - vtable = reinterpret_cast(value); + boost::detail::function::function_allows_small_object_optimization::value) + value |= static_cast(0x01); + vtable = reinterpret_cast(value); } else vtable = 0; } @@ -947,10 +954,10 @@ namespace boost { template void assign_to_a(Functor f,Allocator a) { - using detail::function::vtable_base; + using boost::detail::function::vtable_base; - typedef typename detail::function::get_function_tag::type tag; - typedef detail::function::BOOST_FUNCTION_GET_INVOKER get_invoker; + typedef typename boost::detail::function::get_function_tag::type tag; + typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER get_invoker; typedef typename get_invoker:: template apply_a(&stored_vtable.base); + // coverity[pointless_expression]: suppress coverity warnings on apparant if(const). if (boost::has_trivial_copy_constructor::value && boost::has_trivial_destructor::value && - detail::function::function_allows_small_object_optimization::value) + boost::detail::function::function_allows_small_object_optimization::value) value |= static_cast(0x01); - vtable = reinterpret_cast(value); + vtable = reinterpret_cast(value); } else vtable = 0; } @@ -1174,6 +1182,9 @@ public: #undef BOOST_FUNCTION_TEMPLATE_ARGS #undef BOOST_FUNCTION_PARMS #undef BOOST_FUNCTION_PARM +#ifdef BOOST_FUNCTION_ARG +# undef BOOST_FUNCTION_ARG +#endif #undef BOOST_FUNCTION_ARGS #undef BOOST_FUNCTION_ARG_TYPE #undef BOOST_FUNCTION_ARG_TYPES diff --git a/boost/boost/functional.hpp b/boost/boost/functional.hpp index 3e0588e00f..b618485c10 100644 --- a/boost/boost/functional.hpp +++ b/boost/boost/functional.hpp @@ -6,7 +6,7 @@ // Boost functional.hpp header file // See http://www.boost.org/libs/functional for documentation. // ------------------------------------------------------------------------------ -// $Id: functional.hpp 36246 2006-12-02 14:17:26Z andreas_huber69 $ +// $Id$ // ------------------------------------------------------------------------------ #ifndef BOOST_FUNCTIONAL_HPP diff --git a/boost/boost/functional/hash/detail/float_functions.hpp b/boost/boost/functional/hash/detail/float_functions.hpp index 4b8374d471..f3db52f9cc 100644 --- a/boost/boost/functional/hash/detail/float_functions.hpp +++ b/boost/boost/functional/hash/detail/float_functions.hpp @@ -7,12 +7,12 @@ #define BOOST_FUNCTIONAL_HASH_DETAIL_FLOAT_FUNCTIONS_HPP #include -#include - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once #endif +#include + // Set BOOST_HASH_CONFORMANT_FLOATS to 1 for libraries known to have // sufficiently good floating point support to not require any // workarounds. diff --git a/boost/boost/functional/hash/detail/hash_float.hpp b/boost/boost/functional/hash/detail/hash_float.hpp index 7c3de31ae3..eb9264f737 100644 --- a/boost/boost/functional/hash/detail/hash_float.hpp +++ b/boost/boost/functional/hash/detail/hash_float.hpp @@ -6,11 +6,11 @@ #if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HEADER) #define BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HEADER -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once +#include +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once #endif -#include #include #include #include @@ -68,7 +68,7 @@ namespace boost std::size_t seed = 0; if (length >= sizeof(std::size_t)) { - seed = *(std::size_t*) ptr; + std::memcpy(&seed, ptr, sizeof(std::size_t)); length -= sizeof(std::size_t); ptr += sizeof(std::size_t); diff --git a/boost/boost/functional/hash/detail/limits.hpp b/boost/boost/functional/hash/detail/limits.hpp index f5b520ea9d..4a971a6ac2 100644 --- a/boost/boost/functional/hash/detail/limits.hpp +++ b/boost/boost/functional/hash/detail/limits.hpp @@ -9,8 +9,9 @@ #if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER) #define BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once +#include +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once #endif #include diff --git a/boost/boost/functional/hash/extensions.hpp b/boost/boost/functional/hash/extensions.hpp index 998c08e46d..eafaefe85d 100644 --- a/boost/boost/functional/hash/extensions.hpp +++ b/boost/boost/functional/hash/extensions.hpp @@ -13,6 +13,11 @@ #if !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP) #define BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP +#include +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once +#endif + #include #include #include @@ -32,18 +37,10 @@ # include #endif -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - #if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) #include #endif -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -#include -#endif - namespace boost { template @@ -232,11 +229,7 @@ namespace boost template struct inner { -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) static std::size_t call(Array const& v) -#else - static std::size_t call(Array& v) -#endif { const int size = sizeof(v) / sizeof(*v); return boost::hash_range(v, v + size); @@ -298,8 +291,6 @@ namespace boost template struct hash_impl; -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template <> struct hash_impl { @@ -320,58 +311,6 @@ namespace boost #endif }; }; - -#else // Visual C++ 6.5 - - // Visual C++ 6.5 has problems with nested member functions and - // applying const to const types in templates. So we get this: - - template - struct hash_impl_msvc - { - template - struct inner - : public std::unary_function - { - std::size_t operator()(T const& val) const - { - return hash_detail::call_hash::call(val); - } - - std::size_t operator()(T& val) const - { - return hash_detail::call_hash::call(val); - } - }; - }; - - template <> - struct hash_impl_msvc - { - template - struct inner - : public std::unary_function - { - std::size_t operator()(T& val) const - { - return hash_detail::call_hash::call(val); - } - }; - }; - - template - struct hash_impl_msvc2 - : public hash_impl_msvc::value> - ::BOOST_NESTED_TEMPLATE inner {}; - - template <> - struct hash_impl - { - template - struct inner : public hash_impl_msvc2 {}; - }; - -#endif // Visual C++ 6.5 } #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } diff --git a/boost/boost/functional/hash/hash.hpp b/boost/boost/functional/hash/hash.hpp index 0adf9c9017..3e5ab5bcf9 100644 --- a/boost/boost/functional/hash/hash.hpp +++ b/boost/boost/functional/hash/hash.hpp @@ -1,11 +1,17 @@ -// Copyright 2005-2009 Daniel James. +// Copyright 2005-2014 Daniel James. // 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) // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf // issue 6.18. +// +// This also contains public domain code from MurmurHash. From the +// MurmurHash header: + +// MurmurHash3 was written by Austin Appleby, and is placed in the public +// domain. The author hereby disclaims copyright to this source code. #if !defined(BOOST_FUNCTIONAL_HASH_HASH_HPP) #define BOOST_FUNCTIONAL_HASH_HASH_HPP @@ -18,6 +24,7 @@ #include #include #include +#include #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #include @@ -29,11 +36,15 @@ #if defined(BOOST_MSVC) #pragma warning(push) + +#if BOOST_MSVC >= 1400 #pragma warning(disable:6295) // Ill-defined for-loop : 'unsigned int' values // are always of range '0' to '4294967295'. // Loop executes infinitely. #endif +#endif + #if BOOST_WORKAROUND(__GNUC__, < 3) \ && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) #define BOOST_HASH_CHAR_TRAITS string_char_traits @@ -41,6 +52,12 @@ #define BOOST_HASH_CHAR_TRAITS char_traits #endif +#if defined(_MSC_VER) +# define BOOST_FUNCTIONAL_HASH_ROTL32(x, r) _rotl(x,r) +#else +# define BOOST_FUNCTIONAL_HASH_ROTL32(x, r) (x << r) | (x >> (32 - r)) +#endif + namespace boost { namespace hash_detail @@ -188,6 +205,51 @@ namespace boost return seed; } + + template + inline void hash_combine_impl(SizeT& seed, SizeT value) + { + seed ^= value + 0x9e3779b9 + (seed<<6) + (seed>>2); + } + + template + inline void hash_combine_impl(boost::uint32_t& h1, + boost::uint32_t k1) + { + const uint32_t c1 = 0xcc9e2d51; + const uint32_t c2 = 0x1b873593; + + k1 *= c1; + k1 = BOOST_FUNCTIONAL_HASH_ROTL32(k1,15); + k1 *= c2; + + h1 ^= k1; + h1 = BOOST_FUNCTIONAL_HASH_ROTL32(h1,13); + h1 = h1*5+0xe6546b64; + } + + +// Don't define 64-bit hash combine on platforms with 64 bit integers, +// and also not for 32-bit gcc as it warns about the 64-bit constant. +#if !defined(BOOST_NO_INT64_T) && \ + !(defined(__GNUC__) && ULONG_MAX == 0xffffffff) + + template + inline void hash_combine_impl(boost::uint64_t& h, + boost::uint64_t k) + { + const uint64_t m = UINT64_C(0xc6a4a7935bd1e995); + const int r = 47; + + k *= m; + k ^= k >> r; + k *= m; + + h ^= k; + h *= m; + } + +#endif // BOOST_NO_INT64_T } template @@ -244,16 +306,11 @@ namespace boost #endif #endif -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template - inline void hash_combine(std::size_t& seed, T& v) -#else template inline void hash_combine(std::size_t& seed, T const& v) -#endif { boost::hash hasher; - seed ^= hasher(v) + 0x9e3779b9 + (seed<<6) + (seed>>2); + return boost::hash_detail::hash_combine_impl(seed, hasher(v)); } #if defined(BOOST_MSVC) @@ -358,27 +415,6 @@ namespace boost // // These are undefined later. -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) -#define BOOST_HASH_SPECIALIZE(type) \ - template <> struct hash \ - : public std::unary_function \ - { \ - std::size_t operator()(type v) const \ - { \ - return boost::hash_value(v); \ - } \ - }; - -#define BOOST_HASH_SPECIALIZE_REF(type) \ - template <> struct hash \ - : public std::unary_function \ - { \ - std::size_t operator()(type const& v) const \ - { \ - return boost::hash_value(v); \ - } \ - }; -#else #define BOOST_HASH_SPECIALIZE(type) \ template <> struct hash \ : public std::unary_function \ @@ -387,15 +423,6 @@ namespace boost { \ return boost::hash_value(v); \ } \ - }; \ - \ - template <> struct hash \ - : public std::unary_function \ - { \ - std::size_t operator()(const type v) const \ - { \ - return boost::hash_value(v); \ - } \ }; #define BOOST_HASH_SPECIALIZE_REF(type) \ @@ -406,17 +433,7 @@ namespace boost { \ return boost::hash_value(v); \ } \ - }; \ - \ - template <> struct hash \ - : public std::unary_function \ - { \ - std::size_t operator()(type const& v) const \ - { \ - return boost::hash_value(v); \ - } \ }; -#endif BOOST_HASH_SPECIALIZE(bool) BOOST_HASH_SPECIALIZE(char) @@ -524,6 +541,7 @@ namespace boost } #undef BOOST_HASH_CHAR_TRAITS +#undef BOOST_FUNCTIONAL_HASH_ROTL32 #if defined(BOOST_MSVC) #pragma warning(pop) diff --git a/boost/boost/functional/hash/hash_fwd.hpp b/boost/boost/functional/hash/hash_fwd.hpp index 1d51b07f2d..01fe012ed6 100644 --- a/boost/boost/functional/hash/hash_fwd.hpp +++ b/boost/boost/functional/hash/hash_fwd.hpp @@ -10,11 +10,11 @@ #if !defined(BOOST_FUNCTIONAL_HASH_FWD_HPP) #define BOOST_FUNCTIONAL_HASH_FWD_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once +#include +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once #endif -#include #include #include @@ -22,11 +22,7 @@ namespace boost { template struct hash; -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template void hash_combine(std::size_t& seed, T& v); -#else template void hash_combine(std::size_t& seed, T const& v); -#endif template std::size_t hash_range(It, It); template void hash_range(std::size_t&, It, It); diff --git a/boost/boost/functional/hash_fwd.hpp b/boost/boost/functional/hash_fwd.hpp index b640988618..eea9073884 100644 --- a/boost/boost/functional/hash_fwd.hpp +++ b/boost/boost/functional/hash_fwd.hpp @@ -3,5 +3,9 @@ // 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 +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once +#endif +#include diff --git a/boost/boost/integer.hpp b/boost/boost/integer.hpp index 35a1e10988..9fa0019484 100644 --- a/boost/boost/integer.hpp +++ b/boost/boost/integer.hpp @@ -42,15 +42,15 @@ namespace boost // fast integers from least integers // int_fast_t<> works correctly for unsigned too, in spite of the name. template< typename LeastInt > - struct int_fast_t - { - typedef LeastInt fast; + struct int_fast_t + { + typedef LeastInt fast; typedef fast type; }; // imps may specialize namespace detail{ - // convert category to type + // convert category to type template< int Category > struct int_least_helper {}; // default is empty template< int Category > struct uint_least_helper {}; // default is empty @@ -91,7 +91,8 @@ namespace boost template <> struct exact_signed_base_helper { typedef int exact; }; template <> struct exact_unsigned_base_helper { typedef unsigned int exact; }; #endif -#if ULONG_MAX != UINT_MAX +#if ULONG_MAX != UINT_MAX && ( !defined __TI_COMPILER_VERSION__ || \ + ( __TI_COMPILER_VERSION__ >= 7000000 && !defined __TI_40BIT_LONG__ ) ) template <> struct exact_signed_base_helper { typedef long exact; }; template <> struct exact_unsigned_base_helper { typedef unsigned long exact; }; #endif @@ -111,11 +112,11 @@ namespace boost // signed template< int Bits > // bits (including sign) required - struct int_t : public detail::exact_signed_base_helper + struct int_t : public boost::detail::exact_signed_base_helper { BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::intmax_t) * CHAR_BIT), "No suitable signed integer type with the requested number of bits is available."); - typedef typename detail::int_least_helper + typedef typename boost::detail::int_least_helper < #ifdef BOOST_HAS_LONG_LONG (Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) + @@ -132,13 +133,13 @@ namespace boost // unsigned template< int Bits > // bits required - struct uint_t : public detail::exact_unsigned_base_helper + struct uint_t : public boost::detail::exact_unsigned_base_helper { BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::uintmax_t) * CHAR_BIT), "No suitable unsigned integer type with the requested number of bits is available."); #if (defined(__BORLANDC__) || defined(__CODEGEAR__)) && defined(BOOST_NO_INTEGRAL_INT64_T) // It's really not clear why this workaround should be needed... shrug I guess! JM - BOOST_STATIC_CONSTANT(int, s = + BOOST_STATIC_CONSTANT(int, s = 6 + (Bits <= ::std::numeric_limits::digits) + (Bits <= ::std::numeric_limits::digits) + @@ -146,8 +147,8 @@ namespace boost (Bits <= ::std::numeric_limits::digits)); typedef typename detail::int_least_helper< ::boost::uint_t::s>::least least; #else - typedef typename detail::uint_least_helper - < + typedef typename boost::detail::uint_least_helper + < #ifdef BOOST_HAS_LONG_LONG (Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) + #else @@ -166,16 +167,16 @@ namespace boost // integer templates specifying extreme value ----------------------------// // signed -#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) template< boost::long_long_type MaxValue > // maximum value to require support #else template< long MaxValue > // maximum value to require support #endif - struct int_max_value_t + struct int_max_value_t { - typedef typename detail::int_least_helper + typedef typename boost::detail::int_least_helper < -#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) (MaxValue <= ::boost::integer_traits::const_max) + #else 1 + @@ -188,16 +189,16 @@ namespace boost typedef typename int_fast_t::type fast; }; -#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) template< boost::long_long_type MinValue > // minimum value to require support #else template< long MinValue > // minimum value to require support #endif - struct int_min_value_t + struct int_min_value_t { - typedef typename detail::int_least_helper + typedef typename boost::detail::int_least_helper < -#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) +#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) (MinValue >= ::boost::integer_traits::const_min) + #else 1 + @@ -216,12 +217,12 @@ namespace boost #else template< unsigned long MaxValue > // minimum value to require support #endif - struct uint_value_t + struct uint_value_t { #if (defined(__BORLANDC__) || defined(__CODEGEAR__)) // It's really not clear why this workaround should be needed... shrug I guess! JM #if defined(BOOST_NO_INTEGRAL_INT64_T) - BOOST_STATIC_CONSTANT(unsigned, which = + BOOST_STATIC_CONSTANT(unsigned, which = 1 + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + @@ -229,7 +230,7 @@ namespace boost (MaxValue <= ::boost::integer_traits::const_max)); typedef typename detail::int_least_helper< ::boost::uint_value_t::which>::least least; #else // BOOST_NO_INTEGRAL_INT64_T - BOOST_STATIC_CONSTANT(unsigned, which = + BOOST_STATIC_CONSTANT(unsigned, which = 1 + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + @@ -239,8 +240,8 @@ namespace boost typedef typename detail::uint_least_helper< ::boost::uint_value_t::which>::least least; #endif // BOOST_NO_INTEGRAL_INT64_T #else - typedef typename detail::uint_least_helper - < + typedef typename boost::detail::uint_least_helper + < #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) (MaxValue <= ::boost::integer_traits::const_max) + #else diff --git a/boost/boost/integer_fwd.hpp b/boost/boost/integer_fwd.hpp index 20eff2bcf6..10577ae294 100644 --- a/boost/boost/integer_fwd.hpp +++ b/boost/boost/integer_fwd.hpp @@ -158,6 +158,29 @@ template struct static_unsigned_max; + +// From + +#ifdef BOOST_NO_INTEGRAL_INT64_T + typedef unsigned long static_gcd_type; +#else + typedef boost::uintmax_t static_gcd_type; +#endif + +template < static_gcd_type Value1, static_gcd_type Value2 > + struct static_gcd; +template < static_gcd_type Value1, static_gcd_type Value2 > + struct static_lcm; + + +// From + +template < typename IntegerType > + class gcd_evaluator; +template < typename IntegerType > + class lcm_evaluator; + + } // namespace boost diff --git a/boost/boost/integer_traits.hpp b/boost/boost/integer_traits.hpp index d896e46e5d..94eb00d31e 100644 --- a/boost/boost/integer_traits.hpp +++ b/boost/boost/integer_traits.hpp @@ -5,7 +5,7 @@ * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * - * $Id: integer_traits.hpp 85813 2013-09-21 20:17:00Z jewillco $ + * $Id$ * * Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers */ @@ -119,11 +119,6 @@ class integer_traits // - Mac OS X with native library // - gcc on FreeBSD, OpenBSD and NetBSD public detail::integer_traits_base -#elif defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 2) && !defined(__SGI_STL_PORT) - // No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as unsigned int. - // - gcc 2.95.x on HP-UX - // (also, std::numeric_limits appears to return the wrong values). - public detail::integer_traits_base #else #error No WCHAR_MIN and WCHAR_MAX present, please adjust integer_traits<> for your compiler. #endif diff --git a/boost/boost/iterator.hpp b/boost/boost/iterator.hpp index 6adab0e695..c9c6197950 100644 --- a/boost/boost/iterator.hpp +++ b/boost/boost/iterator.hpp @@ -1,59 +1,20 @@ -// iterator.hpp workarounds for non-conforming standard libraries ---------// - // (C) Copyright Beman Dawes 2000. 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 http://www.boost.org/libs/utility for documentation. - -// Revision History -// 12 Jan 01 added for std::ptrdiff_t (Jens Maurer) -// 28 Jun 00 Workarounds to deal with known MSVC bugs (David Abrahams) -// 26 Jun 00 Initial version (Jeremy Siek) - #ifndef BOOST_ITERATOR_HPP #define BOOST_ITERATOR_HPP +// This header is obsolete and will be deprecated. + #include #include // std::ptrdiff_t -#include namespace boost { -# if defined(BOOST_NO_STD_ITERATOR) && !defined(BOOST_MSVC_STD_ITERATOR) - template - struct iterator - { - typedef T value_type; - typedef Distance difference_type; - typedef Pointer pointer; - typedef Reference reference; - typedef Category iterator_category; - }; -# else - // declare iterator_base in namespace detail to work around MSVC bugs which - // prevent derivation from an identically-named class in a different namespace. - namespace detail { - template -# if !defined(BOOST_MSVC_STD_ITERATOR) - struct iterator_base : std::iterator {}; -# else - struct iterator_base : std::iterator - { - typedef Reference reference; - typedef Pointer pointer; - typedef Distance difference_type; - }; -# endif - } +using std::iterator; - template - struct iterator : boost::detail::iterator_base {}; -# endif } // namespace boost #endif // BOOST_ITERATOR_HPP diff --git a/boost/boost/iterator/detail/config_def.hpp b/boost/boost/iterator/detail/config_def.hpp index fa8d667d97..117e75a76d 100644 --- a/boost/boost/iterator/detail/config_def.hpp +++ b/boost/boost/iterator/detail/config_def.hpp @@ -46,8 +46,7 @@ #endif -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ - || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x5A0)) \ +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x5A0)) \ || (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \ || BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) \ || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) @@ -88,8 +87,7 @@ # define BOOST_NO_IS_CONVERTIBLE // "is_convertible doesn't work for simple types" #endif -#if BOOST_WORKAROUND(__GNUC__, == 2) \ - || BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4) && !defined(__EDG_VERSION__) \ +#if BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4) && !defined(__EDG_VERSION__) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) # define BOOST_NO_IS_CONVERTIBLE_TEMPLATE // The following program fails to compile: @@ -116,16 +114,9 @@ # define BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY #endif -# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) -# define BOOST_ARG_DEPENDENT_TYPENAME typename -# else -# define BOOST_ARG_DEPENDENT_TYPENAME -# endif +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -# if BOOST_WORKAROUND(__GNUC__, == 2) && BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(95)) \ - || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) - -// GCC-2.95 eagerly instantiates templated constructors and conversion +// GCC-2.95 (obsolete) eagerly instantiates templated constructors and conversion // operators in convertibility checks, causing premature errors. // // Borland's problems are harder to diagnose due to lack of an diff --git a/boost/boost/iterator/detail/config_undef.hpp b/boost/boost/iterator/detail/config_undef.hpp index 9dcd1d525f..bf1b8d708c 100644 --- a/boost/boost/iterator/detail/config_undef.hpp +++ b/boost/boost/iterator/detail/config_undef.hpp @@ -14,7 +14,6 @@ #undef BOOST_NO_IS_CONVERTIBLE #undef BOOST_NO_IS_CONVERTIBLE_TEMPLATE #undef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY -#undef BOOST_ARG_DEPENDENT_TYPENAME #undef BOOST_NO_LVALUE_RETURN_DETECTION #undef BOOST_NO_ONE_WAY_ITERATOR_INTEROP diff --git a/boost/boost/iterator/detail/enable_if.hpp b/boost/boost/iterator/detail/enable_if.hpp index 0fd36fc4bc..071f5fe81d 100644 --- a/boost/boost/iterator/detail/enable_if.hpp +++ b/boost/boost/iterator/detail/enable_if.hpp @@ -35,7 +35,7 @@ namespace boost typedef T type; }; }; - + // // For compilers that don't support "Substitution Failure Is Not An Error" // enable_if falls back to always enabled. See comments @@ -70,11 +70,8 @@ namespace boost : enabled<(Cond::value)>::template base # else : mpl::identity -# endif +# endif { -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - typedef Return type; -# endif }; } // namespace iterators diff --git a/boost/boost/iterator/detail/facade_iterator_category.hpp b/boost/boost/iterator/detail/facade_iterator_category.hpp index 2c4771d5aa..67fdf446b0 100644 --- a/boost/boost/iterator/detail/facade_iterator_category.hpp +++ b/boost/boost/iterator/detail/facade_iterator_category.hpp @@ -30,10 +30,13 @@ // iterator_category deduction for iterator_facade // +namespace boost { +namespace iterators { + // forward declaration -namespace boost { struct use_default; } +struct use_default; -namespace boost { namespace detail { +namespace detail { struct input_output_iterator_tag : std::input_iterator_tag @@ -63,9 +66,9 @@ struct iterator_writability_disabled , boost::detail::indirect_traits::is_reference_to_const , is_const > -# else +# else : is_const -# endif +# endif {}; @@ -73,16 +76,10 @@ struct iterator_writability_disabled // Convert an iterator_facade's traversal category, Value parameter, // and ::reference type to an appropriate old-style category. // -// If writability has been disabled per the above metafunction, the -// result will not be convertible to output_iterator_tag. -// -// Otherwise, if Traversal == single_pass_traversal_tag, the following -// conditions will result in a tag that is convertible both to -// input_iterator_tag and output_iterator_tag: -// -// 1. Reference is a reference to non-const -// 2. Reference is not a reference and is convertible to Value +// Due to changeset 21683, this now never results in a category convertible +// to output_iterator_tag. // +// Change at: https://svn.boost.org/trac/boost/changeset/21683 template struct iterator_facade_default_category : mpl::eval_if< @@ -102,7 +99,7 @@ struct iterator_facade_default_category , typename mpl::eval_if< mpl::and_< is_convertible - + // check for readability , is_convertible > @@ -138,7 +135,6 @@ template struct iterator_category_with_traversal : Category, Traversal { -# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) // Make sure this isn't used to build any categories where // convertibility to Traversal is redundant. Should just use the // Category element in that case. @@ -153,8 +149,7 @@ struct iterator_category_with_traversal BOOST_MPL_ASSERT_NOT((is_iterator_traversal)); # if !BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310)) BOOST_MPL_ASSERT((is_iterator_traversal)); -# endif -# endif +# endif }; // Computes an iterator_category tag whose traversal is Traversal and @@ -162,14 +157,12 @@ struct iterator_category_with_traversal template struct facade_iterator_category_impl { -# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) BOOST_MPL_ASSERT_NOT((is_iterator_category)); -# endif - + typedef typename iterator_facade_default_category< Traversal,ValueParam,Reference >::type category; - + typedef typename mpl::if_< is_same< Traversal @@ -193,7 +186,7 @@ struct facade_iterator_category { }; -}} // namespace boost::detail +}}} // namespace boost::iterators::detail # include diff --git a/boost/boost/iterator/detail/minimum_category.hpp b/boost/boost/iterator/detail/minimum_category.hpp deleted file mode 100644 index 96501ddd46..0000000000 --- a/boost/boost/iterator/detail/minimum_category.hpp +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright David Abrahams 2003. 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) -#ifndef MINIMUM_CATEGORY_DWA20031119_HPP -# define MINIMUM_CATEGORY_DWA20031119_HPP - -# include -# include - -# include - -namespace boost { namespace detail { -// -// Returns the minimum category type or error_type -// if T1 and T2 are unrelated. -// -// For compilers not supporting is_convertible this only -// works with the new boost return and traversal category -// types. The exact boost _types_ are required. No derived types -// will work. -// -// -template -struct minimum_category_impl -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -{ - template struct apply - { - typedef T2 type; - }; - typedef void type; -} -# endif -; - -template -struct error_not_related_by_convertibility; - -template <> -struct minimum_category_impl -{ - template struct apply - { - typedef T2 type; - }; -}; - -template <> -struct minimum_category_impl -{ - template struct apply - { - typedef T1 type; - }; -}; - -template <> -struct minimum_category_impl -{ - template struct apply - { - BOOST_STATIC_ASSERT((is_same::value)); - typedef T1 type; - }; -}; - -template <> -struct minimum_category_impl -{ - template struct apply - : error_not_related_by_convertibility - { - }; -}; - -template -struct minimum_category -{ - typedef minimum_category_impl< -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround - is_same::value || -# endif - ::boost::is_convertible::value - , ::boost::is_convertible::value -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround - || is_same::value -# endif - > outer; - - typedef typename outer::template apply inner; - typedef typename inner::type type; - - BOOST_MPL_AUX_LAMBDA_SUPPORT(2,minimum_category,(T1,T2)) -}; - -template <> -struct minimum_category -{ - template - struct apply : minimum_category - {}; - - BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,minimum_category,(mpl::_1,mpl::_2)) -}; - -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround -template <> -struct minimum_category -{ - typedef int type; -}; -# endif - -}} // namespace boost::detail - -#endif // MINIMUM_CATEGORY_DWA20031119_HPP diff --git a/boost/boost/iterator/interoperable.hpp b/boost/boost/iterator/interoperable.hpp index c13dd9b47b..6f3c872a27 100644 --- a/boost/boost/iterator/interoperable.hpp +++ b/boost/boost/iterator/interoperable.hpp @@ -14,8 +14,8 @@ # include // must appear last -namespace boost -{ +namespace boost { +namespace iterators { // // Meta function that determines whether two @@ -27,7 +27,7 @@ namespace boost // standards requirements on constant/mutable container // iterators (23.1 [lib.container.requirements]). // - // For compilers that don't support is_convertible + // For compilers that don't support is_convertible // is_interoperable gives false positives. See comments // on operator implementation for consequences. // @@ -40,9 +40,13 @@ namespace boost is_convertible< A, B > , is_convertible< B, A > > # endif - { + { }; +} // namespace iterators + +using iterators::is_interoperable; + } // namespace boost # include diff --git a/boost/boost/iterator/iterator_adaptor.hpp b/boost/boost/iterator/iterator_adaptor.hpp index 9f2fbb0efe..87cfd0583f 100644 --- a/boost/boost/iterator/iterator_adaptor.hpp +++ b/boost/boost/iterator/iterator_adaptor.hpp @@ -31,28 +31,33 @@ #include -namespace boost -{ +namespace boost { +namespace iterators { + // Used as a default template argument internally, merely to // indicate "use the default", this can also be passed by users // explicitly in order to specify that the default should be used. struct use_default; - -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - // the incompleteness of use_default causes massive problems for - // is_convertible (naturally). This workaround is fortunately not - // needed for vc6/vc7. - template - struct is_convertible - : mpl::false_ {}; -# endif - + +} // namespace iterators + +using iterators::use_default; + +// the incompleteness of use_default causes massive problems for +// is_convertible (naturally). This workaround is fortunately not +// needed for vc6/vc7. +template +struct is_convertible + : mpl::false_ {}; + +namespace iterators { + namespace detail { - // + // // Result type used in enable_if_convertible meta function. - // This can be an incomplete type, as only pointers to + // This can be an incomplete type, as only pointers to // enable_if_convertible< ... >::type are used. // We could have used void for this, but conversion to // void* is just to easy. @@ -73,7 +78,7 @@ namespace boost // public iterator_adaptor< adapted_iterator, Iterator > // { // public: - // + // // ... // // template @@ -92,38 +97,23 @@ namespace boost // and not at the actual instantiation. // // enable_if_interoperable can be safely used in user code. It falls back to - // always enabled for compilers that don't support enable_if or is_convertible. - // There is no need for compiler specific workarounds in user code. + // always enabled for compilers that don't support enable_if or is_convertible. + // There is no need for compiler specific workarounds in user code. // // The operators implementation relies on boost::is_convertible not returning // false positives for user/library defined iterator types. See comments // on operator implementation for consequences. // -# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - - template - struct enable_if_convertible - { - typedef typename mpl::if_< - mpl::or_< - is_same - , is_convertible - > - , boost::detail::enable_type - , int& - >::type type; - }; - -# elif defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_SFINAE) - +# if defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_SFINAE) + template struct enable_if_convertible { - typedef boost::detail::enable_type type; + typedef boost::iterators::detail::enable_type type; }; - -# elif BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292)) && BOOST_MSVC > 1300 - + +# elif BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292)) + // For some reason vc7.1 needs us to "cut off" instantiation // of is_convertible in a few cases. template @@ -133,22 +123,22 @@ namespace boost is_same , is_convertible > - , boost::detail::enable_type + , boost::iterators::detail::enable_type > {}; - -# else - + +# else + template struct enable_if_convertible : iterators::enable_if< is_convertible - , boost::detail::enable_type + , boost::iterators::detail::enable_type > {}; - + # endif - + // // Default template argument handling for iterator_adaptor // @@ -180,9 +170,9 @@ namespace boost { typedef iterator_facade< Derived - + # ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY - , typename boost::detail::ia_dflt_help< + , typename boost::iterators::detail::ia_dflt_help< Value , mpl::eval_if< is_same @@ -191,17 +181,17 @@ namespace boost > >::type # else - , typename boost::detail::ia_dflt_help< + , typename boost::iterators::detail::ia_dflt_help< Value, iterator_value >::type # endif - - , typename boost::detail::ia_dflt_help< + + , typename boost::iterators::detail::ia_dflt_help< Traversal , iterator_traversal >::type - , typename boost::detail::ia_dflt_help< + , typename boost::iterators::detail::ia_dflt_help< Reference , mpl::eval_if< is_same @@ -210,13 +200,13 @@ namespace boost > >::type - , typename boost::detail::ia_dflt_help< + , typename boost::iterators::detail::ia_dflt_help< Difference, iterator_difference >::type > type; }; - + // workaround for aC++ CR JAGaf33512 template inline void iterator_adaptor_assert_traversal () @@ -224,7 +214,7 @@ namespace boost BOOST_STATIC_ASSERT((is_convertible::value)); } } - + // // Iterator Adaptor // @@ -259,14 +249,14 @@ namespace boost , class Difference = use_default > class iterator_adaptor - : public boost::detail::iterator_adaptor_base< + : public boost::iterators::detail::iterator_adaptor_base< Derived, Base, Value, Traversal, Reference, Difference >::type { friend class iterator_core_access; protected: - typedef typename boost::detail::iterator_adaptor_base< + typedef typename boost::iterators::detail::iterator_adaptor_base< Derived, Base, Value, Traversal, Reference, Difference >::type super_t; public: @@ -285,7 +275,7 @@ namespace boost protected: // for convenience in derived classes typedef iterator_adaptor iterator_adaptor_; - + // // lvalue access to the Base object for Derived // @@ -301,13 +291,13 @@ namespace boost // to prevent temptation for Derived classes to use it, which // will often result in an error. Derived classes should use // base_reference(), above, to get direct access to m_iterator. - // + // typename super_t::reference dereference() const { return *m_iterator; } template < class OtherDerived, class OtherIterator, class V, class C, class R, class D - > + > bool equal(iterator_adaptor const& x) const { // Maybe readd with same_distance @@ -322,17 +312,17 @@ namespace boost >::type my_traversal; # define BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(cat) \ - boost::detail::iterator_adaptor_assert_traversal(); + boost::iterators::detail::iterator_adaptor_assert_traversal(); void advance(typename super_t::difference_type n) { BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(random_access_traversal_tag) m_iterator += n; } - + void increment() { ++m_iterator; } - void decrement() + void decrement() { BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(bidirectional_traversal_tag) --m_iterator; @@ -340,7 +330,7 @@ namespace boost template < class OtherDerived, class OtherIterator, class V, class C, class R, class D - > + > typename super_t::difference_type distance_to( iterator_adaptor const& y) const { @@ -353,11 +343,16 @@ namespace boost } # undef BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL - + private: // data members Base m_iterator; }; +} // namespace iterators + +using iterators::iterator_adaptor; +using iterators::enable_if_convertible; + } // namespace boost #include diff --git a/boost/boost/iterator/iterator_categories.hpp b/boost/boost/iterator/iterator_categories.hpp index 1740d9818a..31b2a9d3ec 100644 --- a/boost/boost/iterator/iterator_categories.hpp +++ b/boost/boost/iterator/iterator_categories.hpp @@ -22,6 +22,7 @@ # include namespace boost { +namespace iterators { // // Traversal Categories @@ -29,34 +30,34 @@ namespace boost { struct no_traversal_tag {}; -struct incrementable_traversal_tag +struct incrementable_traversal_tag : no_traversal_tag { // incrementable_traversal_tag() {} // incrementable_traversal_tag(std::output_iterator_tag const&) {}; }; - + struct single_pass_traversal_tag : incrementable_traversal_tag { // single_pass_traversal_tag() {} // single_pass_traversal_tag(std::input_iterator_tag const&) {}; }; - + struct forward_traversal_tag : single_pass_traversal_tag { // forward_traversal_tag() {} // forward_traversal_tag(std::forward_iterator_tag const&) {}; }; - + struct bidirectional_traversal_tag : forward_traversal_tag { // bidirectional_traversal_tag() {}; // bidirectional_traversal_tag(std::bidirectional_iterator_tag const&) {}; }; - + struct random_access_traversal_tag : bidirectional_traversal_tag { @@ -65,7 +66,7 @@ struct random_access_traversal_tag }; namespace detail -{ +{ // // Convert a "strictly old-style" iterator category to a traversal // tag. This is broken out into a separate metafunction to reduce @@ -97,51 +98,8 @@ namespace detail > {}; -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template <> - struct old_category_to_traversal - { - typedef int type; - }; -# endif - - template - struct pure_traversal_tag - : mpl::eval_if< - is_convertible - , mpl::identity - , mpl::eval_if< - is_convertible - , mpl::identity - , mpl::eval_if< - is_convertible - , mpl::identity - , mpl::eval_if< - is_convertible - , mpl::identity - , mpl::eval_if< - is_convertible - , mpl::identity - , void - > - > - > - > - > - { - }; - -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template <> - struct pure_traversal_tag - { - typedef int type; - }; -# endif - } // namespace detail - // // Convert an iterator category into a traversal tag // @@ -150,7 +108,7 @@ struct iterator_category_to_traversal : mpl::eval_if< // if already convertible to a traversal tag, we're done. is_convertible , mpl::identity - , boost::detail::old_category_to_traversal + , boost::iterators::detail::old_category_to_traversal > {}; @@ -181,6 +139,82 @@ struct iterator_traversal {}; # endif +// +// Convert an iterator traversal to one of the traversal tags. +// +template +struct pure_traversal_tag + : mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , void + > + > + > + > + > +{ +}; + +// This import is needed for backward compatibility with Boost.Range: +// boost/range/detail/demote_iterator_traversal_tag.hpp +// It should be removed when that header is fixed. +namespace detail { +using iterators::pure_traversal_tag; +} // namespace detail + +// +// Trait to retrieve one of the iterator traversal tags from the iterator category or traversal. +// +template +struct pure_iterator_traversal + : pure_traversal_tag::type> +{}; + +# ifdef BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT +template <> +struct pure_iterator_traversal +{ + template + struct apply : pure_iterator_traversal + {}; +}; +template <> +struct pure_iterator_traversal + : pure_iterator_traversal +{}; +# endif + +} // namespace iterators + +using iterators::no_traversal_tag; +using iterators::incrementable_traversal_tag; +using iterators::single_pass_traversal_tag; +using iterators::forward_traversal_tag; +using iterators::bidirectional_traversal_tag; +using iterators::random_access_traversal_tag; +using iterators::iterator_category_to_traversal; +using iterators::iterator_traversal; + +// This import is needed for backward compatibility with Boost.Range: +// boost/range/detail/demote_iterator_traversal_tag.hpp +// It should be removed when that header is fixed. +namespace detail { +using iterators::pure_traversal_tag; +} // namespace detail + } // namespace boost #include diff --git a/boost/boost/iterator/iterator_concepts.hpp b/boost/boost/iterator/iterator_concepts.hpp index ced1112a61..1a9f7d6398 100644 --- a/boost/boost/iterator/iterator_concepts.hpp +++ b/boost/boost/iterator/iterator_concepts.hpp @@ -56,7 +56,7 @@ namespace boost_concepts private: Iterator i; }; - + template < typename Iterator , typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type @@ -78,7 +78,7 @@ namespace boost_concepts , typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type > struct WritableIteratorConcept : WritableIterator {}; - + BOOST_concept(SwappableIterator,(Iterator)) { BOOST_CONCEPT_USAGE(SwappableIterator) @@ -93,7 +93,7 @@ namespace boost_concepts BOOST_concept(LvalueIterator,(Iterator)) { typedef typename boost::detail::iterator_traits::value_type value_type; - + BOOST_CONCEPT_USAGE(LvalueIterator) { value_type& r = const_cast(*i); @@ -103,7 +103,7 @@ namespace boost_concepts Iterator i; }; - + //=========================================================================== // Iterator Traversal Concepts @@ -145,7 +145,7 @@ namespace boost_concepts , boost::DefaultConstructible { typedef typename boost::detail::iterator_traits::difference_type difference_type; - + BOOST_MPL_ASSERT((boost::is_integral)); BOOST_MPL_ASSERT_RELATION(std::numeric_limits::is_signed, ==, true); @@ -155,7 +155,7 @@ namespace boost_concepts , boost::forward_traversal_tag > )); }; - + BOOST_concept(BidirectionalTraversal,(Iterator)) : ForwardTraversal { @@ -192,14 +192,14 @@ namespace boost_concepts i = i - n; n = i - j; } - + private: typename BidirectionalTraversal::difference_type n; Iterator i, j; }; //=========================================================================== - // Iterator Interoperability + // Iterator Interoperability namespace detail { @@ -248,19 +248,10 @@ namespace boost_concepts BOOST_concept(InteroperableIterator,(Iterator)(ConstIterator)) { private: - typedef typename boost::detail::pure_traversal_tag< - typename boost::iterator_traversal< - Iterator - >::type - >::type traversal_category; - - typedef typename boost::detail::pure_traversal_tag< - typename boost::iterator_traversal< - ConstIterator - >::type - >::type const_traversal_category; - - public: + typedef typename boost::iterators::pure_iterator_traversal::type traversal_category; + typedef typename boost::iterators::pure_iterator_traversal::type const_traversal_category; + + public: BOOST_CONCEPT_ASSERT((SinglePassIterator)); BOOST_CONCEPT_ASSERT((SinglePassIterator)); @@ -271,7 +262,7 @@ namespace boost_concepts ci = i; } - + private: Iterator i; ConstIterator ci; diff --git a/boost/boost/iterator/iterator_facade.hpp b/boost/boost/iterator/iterator_facade.hpp index d84b402d59..c08a869bbd 100644 --- a/boost/boost/iterator/iterator_facade.hpp +++ b/boost/boost/iterator/iterator_facade.hpp @@ -7,9 +7,11 @@ #ifndef BOOST_ITERATOR_FACADE_23022003THW_HPP #define BOOST_ITERATOR_FACADE_23022003THW_HPP +#include #include #include #include +#include #include #include @@ -36,8 +38,9 @@ #include // this goes last -namespace boost -{ +namespace boost { +namespace iterators { + // This forward declaration is required for the friend declaration // in iterator_core_access template class iterator_facade; @@ -56,6 +59,12 @@ namespace boost }; }; + // The type trait checks if the category or traversal is at least as advanced as the specified required traversal + template< typename CategoryOrTraversal, typename Required > + struct is_traversal_at_least : + public boost::is_convertible< typename iterator_category_to_traversal< CategoryOrTraversal >::type, Required > + {}; + // // enable if for use in operator implementation. // @@ -64,28 +73,31 @@ namespace boost , class Facade2 , class Return > - struct enable_if_interoperable -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - { - typedef typename mpl::if_< - mpl::or_< - is_convertible - , is_convertible + struct enable_if_interoperable : + public boost::iterators::enable_if< + is_interoperable< Facade1, Facade2 > + , Return + > + {}; + + // + // enable if for use in implementation of operators specific for random access traversal. + // + template < + class Facade1 + , class Facade2 + , class Return + > + struct enable_if_interoperable_and_random_access_traversal : + public boost::iterators::enable_if< + mpl::and_< + is_interoperable< Facade1, Facade2 > + , is_traversal_at_least< typename iterator_category< Facade1 >::type, random_access_traversal_tag > + , is_traversal_at_least< typename iterator_category< Facade2 >::type, random_access_traversal_tag > > , Return - , int[3] - >::type type; - }; -#else - : ::boost::iterators::enable_if< - mpl::or_< - is_convertible - , is_convertible - > - , Return > {}; -#endif // // Generates associated types for an iterator_facade with the @@ -94,7 +106,7 @@ namespace boost template < class ValueParam , class CategoryOrTraversal - , class Reference + , class Reference , class Difference > struct iterator_facade_types @@ -102,16 +114,16 @@ namespace boost typedef typename facade_iterator_category< CategoryOrTraversal, ValueParam, Reference >::type iterator_category; - + typedef typename remove_const::type value_type; - + // Not the real associated pointer type typedef typename mpl::eval_if< - boost::detail::iterator_writability_disabled + boost::iterators::detail::iterator_writability_disabled , add_pointer , add_pointer >::type pointer; - + # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && (BOOST_WORKAROUND(_STLPORT_VERSION, BOOST_TESTED_AT(0x452)) \ || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, BOOST_TESTED_AT(310))) \ @@ -157,7 +169,7 @@ namespace boost private: mutable value_type stored_value; }; - + // // In general, we can't determine that such an iterator isn't // writable -- we also need to store a copy of the old iterator so @@ -209,7 +221,7 @@ namespace boost { return stored_iterator; } - + private: mutable value_type stored_value; Iterator stored_iterator; @@ -221,7 +233,7 @@ namespace boost struct is_non_proxy_reference_impl { static Reference r; - + template static typename mpl::if_< is_convertible< @@ -231,17 +243,17 @@ namespace boost , char[1] , char[2] >::type& helper(R const&); - + BOOST_STATIC_CONSTANT(bool, value = sizeof(helper(r)) == 1); }; - + template struct is_non_proxy_reference : mpl::bool_< is_non_proxy_reference_impl::value > {}; -# else +# else template struct is_non_proxy_reference : is_convertible< @@ -250,8 +262,8 @@ namespace boost , Value const volatile* > {}; -# endif - +# endif + // A metafunction to choose the result type of postfix ++ // // Because the C++98 input iterator requirements say that *r++ has @@ -273,7 +285,7 @@ namespace boost mpl::and_< // A proxy is only needed for readable iterators is_convertible - + // No multipass iterator can have values that disappear // before positions can be re-visited , mpl::not_< @@ -325,15 +337,6 @@ namespace boost } }; -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - // Deal with ETI - template<> - struct operator_arrow_dispatch - { - typedef int result_type; - }; -# endif - // A proxy return type for operator[], needed to deal with // iterators that may invalidate referents upon destruction. // Consider the temporary iterator in *(a + n) @@ -378,7 +381,7 @@ namespace boost > > {}; - + template struct operator_brackets_result { @@ -408,28 +411,34 @@ namespace boost : # ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP iterator_difference -# elif BOOST_WORKAROUND(BOOST_MSVC, < 1300) - mpl::if_< - is_convertible - , typename I1::difference_type - , typename I2::difference_type - > -# else +# else mpl::eval_if< is_convertible , iterator_difference , iterator_difference > -# endif +# endif {}; }; + + template < + class Derived + , class Value + , class CategoryOrTraversal + , class Reference + , class Difference + , bool IsBidirectionalTraversal + , bool IsRandomAccessTraversal + > + class iterator_facade_base; + } // namespace detail // Macros which describe the declarations of binary operators # ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY -# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \ +# define BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, enabler) \ template < \ class Derived1, class V1, class TC1, class Reference1, class Difference1 \ , class Derived2, class V2, class TC2, class Reference2, class Difference2 \ @@ -438,24 +447,33 @@ namespace boost operator op( \ iterator_facade const& lhs \ , iterator_facade const& rhs) -# else -# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \ +# else +# define BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, enabler) \ template < \ class Derived1, class V1, class TC1, class Reference1, class Difference1 \ , class Derived2, class V2, class TC2, class Reference2, class Difference2 \ > \ - prefix typename boost::detail::enable_if_interoperable< \ + prefix typename enabler< \ Derived1, Derived2 \ , typename mpl::apply2::type \ >::type \ operator op( \ iterator_facade const& lhs \ , iterator_facade const& rhs) -# endif +# endif + +# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \ + BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable) + +# define BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(prefix, op, result_type) \ + BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL(prefix, op, result_type, boost::iterators::detail::enable_if_interoperable_and_random_access_traversal) # define BOOST_ITERATOR_FACADE_PLUS_HEAD(prefix,args) \ template \ - prefix Derived operator+ args + prefix typename boost::iterators::enable_if< \ + boost::iterators::detail::is_traversal_at_least< TC, boost::iterators::random_access_traversal_tag >, \ + Derived \ + >::type operator+ args // // Helper class for granting access to the iterator core interface. @@ -468,41 +486,49 @@ namespace boost // class iterator_core_access { -# if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) +# if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) // Tasteless as this may seem, making all members public allows member templates // to work in the absence of member template friends. public: # else - + template friend class iterator_facade; + template + friend class detail::iterator_facade_base; # define BOOST_ITERATOR_FACADE_RELATION(op) \ - BOOST_ITERATOR_FACADE_INTEROP_HEAD(friend,op, boost::detail::always_bool2); + BOOST_ITERATOR_FACADE_INTEROP_HEAD(friend,op, boost::iterators::detail::always_bool2); BOOST_ITERATOR_FACADE_RELATION(==) BOOST_ITERATOR_FACADE_RELATION(!=) - BOOST_ITERATOR_FACADE_RELATION(<) - BOOST_ITERATOR_FACADE_RELATION(>) - BOOST_ITERATOR_FACADE_RELATION(<=) - BOOST_ITERATOR_FACADE_RELATION(>=) # undef BOOST_ITERATOR_FACADE_RELATION - BOOST_ITERATOR_FACADE_INTEROP_HEAD( - friend, -, boost::detail::choose_difference_type) +# define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op) \ + BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(friend,op, boost::iterators::detail::always_bool2); + + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<=) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>=) + +# undef BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION + + BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD( + friend, -, boost::iterators::detail::choose_difference_type) ; BOOST_ITERATOR_FACADE_PLUS_HEAD( friend inline - , (iterator_facade const& - , typename Derived::difference_type) + , (iterator_facade const& + , typename Derived::difference_type) ) ; BOOST_ITERATOR_FACADE_PLUS_HEAD( friend inline , (typename Derived::difference_type - , iterator_facade const&) + , iterator_facade const&) ) ; @@ -573,167 +599,199 @@ namespace boost return *static_cast(&facade); } - private: // objects of this class are useless - iterator_core_access(); //undefined + BOOST_DELETED_FUNCTION(iterator_core_access()) }; - // - // iterator_facade - use as a public base class for defining new - // standard-conforming iterators. - // - template < - class Derived // The derived iterator type being constructed - , class Value - , class CategoryOrTraversal - , class Reference = Value& - , class Difference = std::ptrdiff_t - > - class iterator_facade + namespace detail { + + // Implementation for forward traversal iterators + template < + class Derived + , class Value + , class CategoryOrTraversal + , class Reference + , class Difference + > + class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false > # ifdef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE - : public boost::detail::iterator_facade_types< - Value, CategoryOrTraversal, Reference, Difference - >::base + : public boost::iterators::detail::iterator_facade_types< + Value, CategoryOrTraversal, Reference, Difference + >::base # undef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE # endif - { - private: - // - // Curiously Recurring Template interface. - // - Derived& derived() - { - return *static_cast(this); - } + { + private: + typedef boost::iterators::detail::iterator_facade_types< + Value, CategoryOrTraversal, Reference, Difference + > associated_types; - Derived const& derived() const - { - return *static_cast(this); - } + typedef boost::iterators::detail::operator_arrow_dispatch< + Reference + , typename associated_types::pointer + > operator_arrow_dispatch_; - typedef boost::detail::iterator_facade_types< - Value, CategoryOrTraversal, Reference, Difference - > associated_types; + public: + typedef typename associated_types::value_type value_type; + typedef Reference reference; + typedef Difference difference_type; - typedef boost::detail::operator_arrow_dispatch< - Reference - , typename associated_types::pointer - > operator_arrow_dispatch_; + typedef typename operator_arrow_dispatch_::result_type pointer; - protected: - // For use by derived classes - typedef iterator_facade iterator_facade_; - - public: + typedef typename associated_types::iterator_category iterator_category; - typedef typename associated_types::value_type value_type; - typedef Reference reference; - typedef Difference difference_type; + public: + reference operator*() const + { + return iterator_core_access::dereference(this->derived()); + } - typedef typename operator_arrow_dispatch_::result_type pointer; + pointer operator->() const + { + return operator_arrow_dispatch_::apply(*this->derived()); + } - typedef typename associated_types::iterator_category iterator_category; + Derived& operator++() + { + iterator_core_access::increment(this->derived()); + return this->derived(); + } - reference operator*() const - { - return iterator_core_access::dereference(this->derived()); - } + protected: + // + // Curiously Recurring Template interface. + // + Derived& derived() + { + return *static_cast(this); + } - pointer operator->() const - { - return operator_arrow_dispatch_::apply(*this->derived()); - } - - typename boost::detail::operator_brackets_result::type - operator[](difference_type n) const - { - typedef boost::detail::use_operator_brackets_proxy use_proxy; - - return boost::detail::make_operator_brackets_result( - this->derived() + n - , use_proxy() - ); - } + Derived const& derived() const + { + return *static_cast(this); + } + }; - Derived& operator++() - { - iterator_core_access::increment(this->derived()); - return this->derived(); - } + // Implementation for bidirectional traversal iterators + template < + class Derived + , class Value + , class CategoryOrTraversal + , class Reference + , class Difference + > + class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > : + public iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, false, false > + { + public: + Derived& operator--() + { + iterator_core_access::decrement(this->derived()); + return this->derived(); + } -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - typename boost::detail::postfix_increment_result::type - operator++(int) - { - typename boost::detail::postfix_increment_result::type - tmp(this->derived()); - ++*this; - return tmp; - } -# endif - - Derived& operator--() - { - iterator_core_access::decrement(this->derived()); - return this->derived(); - } + Derived operator--(int) + { + Derived tmp(this->derived()); + --*this; + return tmp; + } + }; - Derived operator--(int) - { - Derived tmp(this->derived()); - --*this; - return tmp; - } + // Implementation for random access traversal iterators + template < + class Derived + , class Value + , class CategoryOrTraversal + , class Reference + , class Difference + > + class iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, true > : + public iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > + { + private: + typedef iterator_facade_base< Derived, Value, CategoryOrTraversal, Reference, Difference, true, false > base_type; - Derived& operator+=(difference_type n) - { - iterator_core_access::advance(this->derived(), n); - return this->derived(); - } + public: + typedef typename base_type::reference reference; + typedef typename base_type::difference_type difference_type; - Derived& operator-=(difference_type n) - { - iterator_core_access::advance(this->derived(), -n); - return this->derived(); - } + public: + typename boost::iterators::detail::operator_brackets_result::type + operator[](difference_type n) const + { + typedef boost::iterators::detail::use_operator_brackets_proxy use_proxy; - Derived operator-(difference_type x) const - { - Derived result(this->derived()); - return result -= x; - } + return boost::iterators::detail::make_operator_brackets_result( + this->derived() + n + , use_proxy() + ); + } -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - // There appears to be a bug which trashes the data of classes - // derived from iterator_facade when they are assigned unless we - // define this assignment operator. This bug is only revealed - // (so far) in STLPort debug mode, but it's clearly a codegen - // problem so we apply the workaround for all MSVC6. - iterator_facade& operator=(iterator_facade const&) - { - return *this; - } -# endif + Derived& operator+=(difference_type n) + { + iterator_core_access::advance(this->derived(), n); + return this->derived(); + } + + Derived& operator-=(difference_type n) + { + iterator_core_access::advance(this->derived(), -n); + return this->derived(); + } + + Derived operator-(difference_type x) const + { + Derived result(this->derived()); + return result -= x; + } + }; + + } // namespace detail + + // + // iterator_facade - use as a public base class for defining new + // standard-conforming iterators. + // + template < + class Derived // The derived iterator type being constructed + , class Value + , class CategoryOrTraversal + , class Reference = Value& + , class Difference = std::ptrdiff_t + > + class iterator_facade : + public detail::iterator_facade_base< + Derived, + Value, + CategoryOrTraversal, + Reference, + Difference, + detail::is_traversal_at_least< CategoryOrTraversal, bidirectional_traversal_tag >::value, + detail::is_traversal_at_least< CategoryOrTraversal, random_access_traversal_tag >::value + > + { + protected: + // For use by derived classes + typedef iterator_facade iterator_facade_; }; -# if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) template - inline typename boost::detail::postfix_increment_result::type + inline typename boost::iterators::detail::postfix_increment_result::type operator++( iterator_facade& i , int ) { - typename boost::detail::postfix_increment_result::type + typename boost::iterators::detail::postfix_increment_result::type tmp(*static_cast(&i)); - + ++i; - + return tmp; } -# endif - + // // Comparison operator implementation. The library supplied operators // enables the user to provide fully interoperable constant/mutable @@ -824,7 +882,7 @@ namespace boost # define BOOST_ITERATOR_FACADE_RELATION(op, return_prefix, base_op) \ BOOST_ITERATOR_FACADE_INTEROP( \ op \ - , boost::detail::always_bool2 \ + , boost::iterators::detail::always_bool2 \ , return_prefix \ , base_op \ ) @@ -832,21 +890,50 @@ namespace boost BOOST_ITERATOR_FACADE_RELATION(==, return, equal) BOOST_ITERATOR_FACADE_RELATION(!=, return !, equal) - BOOST_ITERATOR_FACADE_RELATION(<, return 0 >, distance_from) - BOOST_ITERATOR_FACADE_RELATION(>, return 0 <, distance_from) - BOOST_ITERATOR_FACADE_RELATION(<=, return 0 >=, distance_from) - BOOST_ITERATOR_FACADE_RELATION(>=, return 0 <=, distance_from) # undef BOOST_ITERATOR_FACADE_RELATION + +# define BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS(op, result_type, return_prefix, base_op) \ + BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD(inline, op, result_type) \ + { \ + /* For those compilers that do not support enable_if */ \ + BOOST_STATIC_ASSERT(( \ + is_interoperable< Derived1, Derived2 >::value && \ + boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived1 >::type, random_access_traversal_tag >::value && \ + boost::iterators::detail::is_traversal_at_least< typename iterator_category< Derived2 >::type, random_access_traversal_tag >::value \ + )); \ + return_prefix iterator_core_access::base_op( \ + *static_cast(&lhs) \ + , *static_cast(&rhs) \ + , BOOST_ITERATOR_CONVERTIBLE(Derived2,Derived1) \ + ); \ + } + +# define BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(op, return_prefix, base_op) \ + BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS( \ + op \ + , boost::iterators::detail::always_bool2 \ + , return_prefix \ + , base_op \ + ) + + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<, return 0 >, distance_from) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>, return 0 <, distance_from) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(<=, return 0 >=, distance_from) + BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION(>=, return 0 <=, distance_from) + +# undef BOOST_ITERATOR_FACADE_RANDOM_ACCESS_RELATION + // operator- requires an additional part in the static assertion - BOOST_ITERATOR_FACADE_INTEROP( + BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS( - - , boost::detail::choose_difference_type + , boost::iterators::detail::choose_difference_type , return , distance_from ) + # undef BOOST_ITERATOR_FACADE_INTEROP -# undef BOOST_ITERATOR_FACADE_INTEROP_HEAD +# undef BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS # define BOOST_ITERATOR_FACADE_PLUS(args) \ BOOST_ITERATOR_FACADE_PLUS_HEAD(inline, args) \ @@ -855,18 +942,28 @@ namespace boost return tmp += n; \ } -BOOST_ITERATOR_FACADE_PLUS(( - iterator_facade const& i - , typename Derived::difference_type n -)) + BOOST_ITERATOR_FACADE_PLUS(( + iterator_facade const& i + , typename Derived::difference_type n + )) -BOOST_ITERATOR_FACADE_PLUS(( - typename Derived::difference_type n + BOOST_ITERATOR_FACADE_PLUS(( + typename Derived::difference_type n , iterator_facade const& i -)) + )) + # undef BOOST_ITERATOR_FACADE_PLUS # undef BOOST_ITERATOR_FACADE_PLUS_HEAD +# undef BOOST_ITERATOR_FACADE_INTEROP_HEAD +# undef BOOST_ITERATOR_FACADE_INTEROP_RANDOM_ACCESS_HEAD +# undef BOOST_ITERATOR_FACADE_INTEROP_HEAD_IMPL + +} // namespace iterators + +using iterators::iterator_core_access; +using iterators::iterator_facade; + } // namespace boost #include diff --git a/boost/boost/iterator/iterator_traits.hpp b/boost/boost/iterator/iterator_traits.hpp index 960970e8db..1a5f1e0d60 100644 --- a/boost/boost/iterator/iterator_traits.hpp +++ b/boost/boost/iterator/iterator_traits.hpp @@ -8,20 +8,12 @@ # include # include -namespace boost { +namespace boost { +namespace iterators { -// Unfortunately, g++ 2.95.x chokes when we define a class template -// iterator_category which has the same name as its -// std::iterator_category() function, probably due in part to the -// "std:: is visible globally" hack it uses. Use -// BOOST_ITERATOR_CATEGORY to write code that's portable to older -// GCCs. - -# if BOOST_WORKAROUND(__GNUC__, <= 2) -# define BOOST_ITERATOR_CATEGORY iterator_category_ -# else -# define BOOST_ITERATOR_CATEGORY iterator_category -# endif +// Macro for supporting old compilers, no longer needed but kept +// for backwards compatibility (it was documented). +#define BOOST_ITERATOR_CATEGORY iterator_category template @@ -29,20 +21,20 @@ struct iterator_value { typedef typename boost::detail::iterator_traits::value_type type; }; - + template struct iterator_reference { typedef typename boost::detail::iterator_traits::reference type; }; - - + + template struct iterator_pointer { typedef typename boost::detail::iterator_traits::pointer type; }; - + template struct iterator_difference { @@ -50,43 +42,19 @@ struct iterator_difference }; template -struct BOOST_ITERATOR_CATEGORY +struct iterator_category { typedef typename boost::detail::iterator_traits::iterator_category type; }; -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -template <> -struct iterator_value -{ - typedef void type; -}; - -template <> -struct iterator_reference -{ - typedef void type; -}; +} // namespace iterators -template <> -struct iterator_pointer -{ - typedef void type; -}; - -template <> -struct iterator_difference -{ - typedef void type; -}; - -template <> -struct BOOST_ITERATOR_CATEGORY -{ - typedef void type; -}; -# endif +using iterators::iterator_value; +using iterators::iterator_reference; +using iterators::iterator_pointer; +using iterators::iterator_difference; +using iterators::iterator_category; -} // namespace boost::iterator +} // namespace boost #endif // ITERATOR_TRAITS_DWA200347_HPP diff --git a/boost/boost/iterator/minimum_category.hpp b/boost/boost/iterator/minimum_category.hpp new file mode 100644 index 0000000000..15679bc77d --- /dev/null +++ b/boost/boost/iterator/minimum_category.hpp @@ -0,0 +1,95 @@ +// Copyright David Abrahams 2003. 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) +#ifndef BOOST_ITERATOR_MINIMUM_CATEGORY_HPP_INCLUDED_ +# define BOOST_ITERATOR_MINIMUM_CATEGORY_HPP_INCLUDED_ + +# include +# include +# include + +# include +# include + +namespace boost { +namespace iterators { +namespace detail { + +template +struct minimum_category_impl; + +template +struct error_not_related_by_convertibility; + +template <> +struct minimum_category_impl +{ + template struct apply + { + typedef T2 type; + }; +}; + +template <> +struct minimum_category_impl +{ + template struct apply + { + typedef T1 type; + }; +}; + +template <> +struct minimum_category_impl +{ + template struct apply + { + BOOST_STATIC_ASSERT((is_same::value)); + typedef T1 type; + }; +}; + +template <> +struct minimum_category_impl +{ + template struct apply + : error_not_related_by_convertibility + { + }; +}; + +} // namespace detail + +// +// Returns the minimum category type or fails to compile +// if T1 and T2 are unrelated. +// +template +struct minimum_category +{ + typedef boost::iterators::detail::minimum_category_impl< + ::boost::is_convertible::value + , ::boost::is_convertible::value + > outer; + + typedef typename outer::template apply inner; + typedef typename inner::type type; + + BOOST_MPL_AUX_LAMBDA_SUPPORT(2,minimum_category,(T1,T2)) +}; + +template <> +struct minimum_category +{ + template + struct apply : minimum_category + {}; + + BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,minimum_category,(mpl::_1,mpl::_2)) +}; + +} // namespace iterators + +} // namespace boost + +#endif // BOOST_ITERATOR_MINIMUM_CATEGORY_HPP_INCLUDED_ diff --git a/boost/boost/iterator/reverse_iterator.hpp b/boost/boost/iterator/reverse_iterator.hpp index 79cc7f2ca5..3bef39e4b6 100644 --- a/boost/boost/iterator/reverse_iterator.hpp +++ b/boost/boost/iterator/reverse_iterator.hpp @@ -11,8 +11,8 @@ #include #include -namespace boost -{ +namespace boost { +namespace iterators { // // @@ -28,7 +28,7 @@ namespace boost public: reverse_iterator() {} - explicit reverse_iterator(Iterator x) + explicit reverse_iterator(Iterator x) : super_t(x) {} template @@ -41,7 +41,7 @@ namespace boost private: typename super_t::reference dereference() const { return *boost::prior(this->base()); } - + void increment() { --this->base_reference(); } void decrement() { ++this->base_reference(); } @@ -59,11 +59,16 @@ namespace boost }; template - reverse_iterator make_reverse_iterator(BidirectionalIterator x) + inline reverse_iterator make_reverse_iterator(BidirectionalIterator x) { return reverse_iterator(x); } +} // namespace iterators + +using iterators::reverse_iterator; +using iterators::make_reverse_iterator; + } // namespace boost #endif // BOOST_REVERSE_ITERATOR_23022003THW_HPP diff --git a/boost/boost/lexical_cast.hpp b/boost/boost/lexical_cast.hpp index ed2291d85b..dc3d7e3fb7 100644 --- a/boost/boost/lexical_cast.hpp +++ b/boost/boost/lexical_cast.hpp @@ -1,16 +1,10 @@ -#ifndef BOOST_LEXICAL_CAST_INCLUDED -#define BOOST_LEXICAL_CAST_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// Boost lexical_cast.hpp header -------------------------------------------// +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. // -// See http://www.boost.org/libs/conversion for documentation. -// See end of this header for rights and permissions. +// 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) // // what: lexical_cast custom keyword cast // who: contributed by Kevlin Henney, @@ -19,2546 +13,53 @@ // Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, // Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, // Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters -// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2013 - -#include -#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING) -#define BOOST_LCAST_NO_WCHAR_T -#endif +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#ifndef BOOST_NO_STD_LOCALE -# include -#else -# ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE - // Getting error at this point means, that your STL library is old/lame/misconfigured. - // If nothing can be done with STL library, define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE, - // but beware: lexical_cast will understand only 'C' locale delimeters and thousands - // separators. -# error "Unable to use header. Define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE to force " -# error "boost::lexical_cast to use only 'C' locale during conversions." -# endif -#endif - -#ifdef BOOST_NO_STRINGSTREAM -#include -#else -#include -#endif - -#ifdef BOOST_NO_TYPEID -#define BOOST_LCAST_THROW_BAD_CAST(S, T) throw_exception(bad_lexical_cast()) -#else -#define BOOST_LCAST_THROW_BAD_CAST(Source, Target) \ - throw_exception(bad_lexical_cast(typeid(Source), typeid(Target))) -#endif - -namespace boost -{ - // exception used to indicate runtime lexical_cast failure - class BOOST_SYMBOL_VISIBLE bad_lexical_cast : - // workaround MSVC bug with std::bad_cast when _HAS_EXCEPTIONS == 0 -#if defined(BOOST_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS - public std::exception -#else - public std::bad_cast -#endif - -#if defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, < 0x560 ) - // under bcc32 5.5.1 bad_cast doesn't derive from exception - , public std::exception -#endif - - { - public: - bad_lexical_cast() BOOST_NOEXCEPT : -#ifndef BOOST_NO_TYPEID - source(&typeid(void)), target(&typeid(void)) -#else - source(0), target(0) // this breaks getters -#endif - { - } - - bad_lexical_cast( - const std::type_info &source_type_arg, - const std::type_info &target_type_arg) BOOST_NOEXCEPT : - source(&source_type_arg), target(&target_type_arg) - { - } - - const std::type_info &source_type() const - { - return *source; - } - const std::type_info &target_type() const - { - return *target; - } - -#ifndef BOOST_NO_CXX11_NOEXCEPT - virtual const char *what() const noexcept -#else - virtual const char *what() const throw() -#endif - { - return "bad lexical cast: " - "source type value could not be interpreted as target"; - } +#ifndef BOOST_LEXICAL_CAST_INCLUDED +#define BOOST_LEXICAL_CAST_INCLUDED -#ifndef BOOST_NO_CXX11_NOEXCEPT - virtual ~bad_lexical_cast() BOOST_NOEXCEPT -#else - virtual ~bad_lexical_cast() throw() +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once #endif - {} - private: - const std::type_info *source; - const std::type_info *target; - }; - - namespace detail // widest_char - { - template - struct widest_char - { - typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< - (sizeof(TargetChar) > sizeof(SourceChar)) - , TargetChar - , SourceChar >::type type; - }; - } -} // namespace boost -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(__SUNPRO_CC) && !defined(__PGIC__) - -#include -#include - -#ifndef BOOST_NO_CXX11_HDR_ARRAY -#include +#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING) +#define BOOST_LCAST_NO_WCHAR_T #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#ifndef BOOST_NO_CWCHAR -# include -#endif - -namespace boost { - - namespace detail // is_char_or_wchar<...> - { - // returns true, if T is one of the character types - template < typename T > - struct is_char_or_wchar - { - typedef boost::type_traits::ice_or< - boost::is_same< T, char >::value, - #ifndef BOOST_LCAST_NO_WCHAR_T - boost::is_same< T, wchar_t >::value, - #endif - #ifndef BOOST_NO_CXX11_CHAR16_T - boost::is_same< T, char16_t >::value, - #endif - #ifndef BOOST_NO_CXX11_CHAR32_T - boost::is_same< T, char32_t >::value, - #endif - boost::is_same< T, unsigned char >::value, - boost::is_same< T, signed char >::value - > result_type; - - BOOST_STATIC_CONSTANT(bool, value = (result_type::value) ); - }; - } - - namespace detail // normalize_single_byte_char - { - // Converts signed/unsigned char to char - template < class Char > - struct normalize_single_byte_char - { - typedef Char type; - }; - - template <> - struct normalize_single_byte_char< signed char > - { - typedef char type; - }; - - template <> - struct normalize_single_byte_char< unsigned char > - { - typedef char type; - }; - } - - namespace detail // deduce_character_type_later - { - // Helper type, meaning that stram character for T must be deduced - // at Stage 2 (See deduce_source_char and deduce_target_char) - template < class T > struct deduce_character_type_later {}; - } - - namespace detail // stream_char_common - { - // Selectors to choose stream character type (common for Source and Target) - // Returns one of char, wchar_t, char16_t, char32_t or deduce_character_type_later types - // Executed on Stage 1 (See deduce_source_char and deduce_target_char) - template < typename Type > - struct stream_char_common: public boost::mpl::if_c< - boost::detail::is_char_or_wchar< Type >::value, - Type, - boost::detail::deduce_character_type_later< Type > - > {}; - - template < typename Char > - struct stream_char_common< Char* >: public boost::mpl::if_c< - boost::detail::is_char_or_wchar< Char >::value, - Char, - boost::detail::deduce_character_type_later< Char* > - > {}; - - template < typename Char > - struct stream_char_common< const Char* >: public boost::mpl::if_c< - boost::detail::is_char_or_wchar< Char >::value, - Char, - boost::detail::deduce_character_type_later< const Char* > - > {}; - - template < typename Char > - struct stream_char_common< boost::iterator_range< Char* > >: public boost::mpl::if_c< - boost::detail::is_char_or_wchar< Char >::value, - Char, - boost::detail::deduce_character_type_later< boost::iterator_range< Char* > > - > {}; - - template < typename Char > - struct stream_char_common< boost::iterator_range< const Char* > >: public boost::mpl::if_c< - boost::detail::is_char_or_wchar< Char >::value, - Char, - boost::detail::deduce_character_type_later< boost::iterator_range< const Char* > > - > {}; - - template < class Char, class Traits, class Alloc > - struct stream_char_common< std::basic_string< Char, Traits, Alloc > > - { - typedef Char type; - }; - - template < class Char, class Traits, class Alloc > - struct stream_char_common< boost::container::basic_string< Char, Traits, Alloc > > - { - typedef Char type; - }; - - template < typename Char, std::size_t N > - struct stream_char_common< boost::array< Char, N > >: public boost::mpl::if_c< - boost::detail::is_char_or_wchar< Char >::value, - Char, - boost::detail::deduce_character_type_later< boost::array< Char, N > > - > {}; - - template < typename Char, std::size_t N > - struct stream_char_common< boost::array< const Char, N > >: public boost::mpl::if_c< - boost::detail::is_char_or_wchar< Char >::value, - Char, - boost::detail::deduce_character_type_later< boost::array< const Char, N > > - > {}; - -#ifndef BOOST_NO_CXX11_HDR_ARRAY - template < typename Char, std::size_t N > - struct stream_char_common< std::array >: public boost::mpl::if_c< - boost::detail::is_char_or_wchar< Char >::value, - Char, - boost::detail::deduce_character_type_later< std::array< Char, N > > - > {}; - - template < typename Char, std::size_t N > - struct stream_char_common< std::array< const Char, N > >: public boost::mpl::if_c< - boost::detail::is_char_or_wchar< Char >::value, - Char, - boost::detail::deduce_character_type_later< std::array< const Char, N > > - > {}; -#endif - -#ifdef BOOST_HAS_INT128 - template <> struct stream_char_common< boost::int128_type >: public boost::mpl::identity< char > {}; - template <> struct stream_char_common< boost::uint128_type >: public boost::mpl::identity< char > {}; -#endif - -#if !defined(BOOST_LCAST_NO_WCHAR_T) && defined(BOOST_NO_INTRINSIC_WCHAR_T) - template <> - struct stream_char_common< wchar_t > - { - typedef char type; - }; -#endif - } - - namespace detail // deduce_source_char_impl - { - // If type T is `deduce_character_type_later` type, then tries to deduce - // character type using boost::has_left_shift metafunction. - // Otherwise supplied type T is a character type, that must be normalized - // using normalize_single_byte_char. - // Executed at Stage 2 (See deduce_source_char and deduce_target_char) - template < class Char > - struct deduce_source_char_impl - { - typedef BOOST_DEDUCED_TYPENAME boost::detail::normalize_single_byte_char< Char >::type type; - }; - - template < class T > - struct deduce_source_char_impl< deduce_character_type_later< T > > - { - typedef boost::has_left_shift< std::basic_ostream< char >, T > result_t; - -#if defined(BOOST_LCAST_NO_WCHAR_T) - BOOST_STATIC_ASSERT_MSG((result_t::value), - "Source type is not std::ostream`able and std::wostream`s are not supported by your STL implementation"); - typedef char type; -#else - typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< - result_t::value, char, wchar_t - >::type type; - - BOOST_STATIC_ASSERT_MSG((result_t::value || boost::has_left_shift< std::basic_ostream< type >, T >::value), - "Source type is neither std::ostream`able nor std::wostream`able"); -#endif - }; - } - - namespace detail // deduce_target_char_impl - { - // If type T is `deduce_character_type_later` type, then tries to deduce - // character type using boost::has_right_shift metafunction. - // Otherwise supplied type T is a character type, that must be normalized - // using normalize_single_byte_char. - // Executed at Stage 2 (See deduce_source_char and deduce_target_char) - template < class Char > - struct deduce_target_char_impl - { - typedef BOOST_DEDUCED_TYPENAME normalize_single_byte_char< Char >::type type; - }; - - template < class T > - struct deduce_target_char_impl< deduce_character_type_later > - { - typedef boost::has_right_shift, T > result_t; - -#if defined(BOOST_LCAST_NO_WCHAR_T) - BOOST_STATIC_ASSERT_MSG((result_t::value), - "Target type is not std::istream`able and std::wistream`s are not supported by your STL implementation"); - typedef char type; -#else - typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< - result_t::value, char, wchar_t - >::type type; - - BOOST_STATIC_ASSERT_MSG((result_t::value || boost::has_right_shift, T >::value), - "Target type is neither std::istream`able nor std::wistream`able"); -#endif - }; - } - - namespace detail // deduce_target_char and deduce_source_char - { - // We deduce stream character types in two stages. - // - // Stage 1 is common for Target and Source. At Stage 1 we get - // non normalized character type (may contain unsigned/signed char) - // or deduce_character_type_later where T is the original type. - // Stage 1 is executed by stream_char_common - // - // At Stage 2 we normalize character types or try to deduce character - // type using metafunctions. - // Stage 2 is executed by deduce_target_char_impl and - // deduce_source_char_impl - // - // deduce_target_char and deduce_source_char functions combine - // both stages - - template < class T > - struct deduce_target_char - { - typedef BOOST_DEDUCED_TYPENAME stream_char_common< T >::type stage1_type; - typedef BOOST_DEDUCED_TYPENAME deduce_target_char_impl< stage1_type >::type stage2_type; - - typedef stage2_type type; - }; - - template < class T > - struct deduce_source_char - { - typedef BOOST_DEDUCED_TYPENAME stream_char_common< T >::type stage1_type; - typedef BOOST_DEDUCED_TYPENAME deduce_source_char_impl< stage1_type >::type stage2_type; - - typedef stage2_type type; - }; - } - - namespace detail // deduce_char_traits template - { - // We are attempting to get char_traits<> from Source or Tagret - // template parameter. Otherwise we'll be using std::char_traits - template < class Char, class Target, class Source > - struct deduce_char_traits - { - typedef std::char_traits< Char > type; - }; - - template < class Char, class Traits, class Alloc, class Source > - struct deduce_char_traits< Char - , std::basic_string< Char, Traits, Alloc > - , Source - > - { - typedef Traits type; - }; - - template < class Char, class Target, class Traits, class Alloc > - struct deduce_char_traits< Char - , Target - , std::basic_string< Char, Traits, Alloc > - > - { - typedef Traits type; - }; - - template < class Char, class Traits, class Alloc, class Source > - struct deduce_char_traits< Char - , boost::container::basic_string< Char, Traits, Alloc > - , Source - > - { - typedef Traits type; - }; - - template < class Char, class Target, class Traits, class Alloc > - struct deduce_char_traits< Char - , Target - , boost::container::basic_string< Char, Traits, Alloc > - > - { - typedef Traits type; - }; - - template < class Char, class Traits, class Alloc1, class Alloc2 > - struct deduce_char_traits< Char - , std::basic_string< Char, Traits, Alloc1 > - , std::basic_string< Char, Traits, Alloc2 > - > - { - typedef Traits type; - }; - - template - struct deduce_char_traits< Char - , boost::container::basic_string< Char, Traits, Alloc1 > - , boost::container::basic_string< Char, Traits, Alloc2 > - > - { - typedef Traits type; - }; - - template < class Char, class Traits, class Alloc1, class Alloc2 > - struct deduce_char_traits< Char - , boost::container::basic_string< Char, Traits, Alloc1 > - , std::basic_string< Char, Traits, Alloc2 > - > - { - typedef Traits type; - }; - - template < class Char, class Traits, class Alloc1, class Alloc2 > - struct deduce_char_traits< Char - , std::basic_string< Char, Traits, Alloc1 > - , boost::container::basic_string< Char, Traits, Alloc2 > - > - { - typedef Traits type; - }; - } - - namespace detail // array_to_pointer_decay - { - template - struct array_to_pointer_decay - { - typedef T type; - }; - - template - struct array_to_pointer_decay - { - typedef const T * type; - }; - } - - namespace detail // is_this_float_conversion_optimized - { - // this metafunction evaluates to true, if we have optimized comnversion - // from Float type to Char array. - // Must be in sync with lexical_stream_limited_src::shl_real_type(...) - template - struct is_this_float_conversion_optimized - { - typedef boost::type_traits::ice_and< - boost::is_float::value, -#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__) - boost::type_traits::ice_or< - boost::type_traits::ice_eq::value, - boost::is_same::value - >::value -#else - boost::type_traits::ice_eq::value -#endif - > result_type; - - BOOST_STATIC_CONSTANT(bool, value = (result_type::value) ); - }; - } - - namespace detail // lcast_src_length - { - // Return max. length of string representation of Source; - template< class Source // Source type of lexical_cast. - > - struct lcast_src_length - { - BOOST_STATIC_CONSTANT(std::size_t, value = 1); - // To check coverage, build the test with - // bjam --v2 profile optimization=off - static void check_coverage() {} - }; - - // Helper for integral types. - // Notes on length calculation: - // Max length for 32bit int with grouping "\1" and thousands_sep ',': - // "-2,1,4,7,4,8,3,6,4,7" - // ^ - is_signed - // ^ - 1 digit not counted by digits10 - // ^^^^^^^^^^^^^^^^^^ - digits10 * 2 - // - // Constant is_specialized is used instead of constant 1 - // to prevent buffer overflow in a rare case when - // doesn't add missing specialization for - // numeric_limits for some integral type T. - // When is_specialized is false, the whole expression is 0. - template - struct lcast_src_length_integral - { -#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS - BOOST_STATIC_CONSTANT(std::size_t, value = - std::numeric_limits::is_signed + - std::numeric_limits::is_specialized + /* == 1 */ - std::numeric_limits::digits10 * 2 - ); -#else - BOOST_STATIC_CONSTANT(std::size_t, value = 156); - BOOST_STATIC_ASSERT(sizeof(Source) * CHAR_BIT <= 256); -#endif - }; - -#define BOOST_LCAST_DEF(T) \ - template<> struct lcast_src_length \ - : lcast_src_length_integral \ - { static void check_coverage() {} }; - - BOOST_LCAST_DEF(short) - BOOST_LCAST_DEF(unsigned short) - BOOST_LCAST_DEF(int) - BOOST_LCAST_DEF(unsigned int) - BOOST_LCAST_DEF(long) - BOOST_LCAST_DEF(unsigned long) -#if defined(BOOST_HAS_LONG_LONG) - BOOST_LCAST_DEF(boost::ulong_long_type) - BOOST_LCAST_DEF(boost::long_long_type ) -#elif defined(BOOST_HAS_MS_INT64) - BOOST_LCAST_DEF(unsigned __int64) - BOOST_LCAST_DEF( __int64) -#endif -#ifdef BOOST_HAS_INT128 - BOOST_LCAST_DEF(boost::int128_type) - BOOST_LCAST_DEF(boost::uint128_type) -#endif - -#undef BOOST_LCAST_DEF - -#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION - // Helper for floating point types. - // -1.23456789e-123456 - // ^ sign - // ^ leading digit - // ^ decimal point - // ^^^^^^^^ lcast_precision::value - // ^ "e" - // ^ exponent sign - // ^^^^^^ exponent (assumed 6 or less digits) - // sign + leading digit + decimal point + "e" + exponent sign == 5 - template - struct lcast_src_length_floating - { - BOOST_STATIC_ASSERT( - std::numeric_limits::max_exponent10 <= 999999L && - std::numeric_limits::min_exponent10 >= -999999L - ); - BOOST_STATIC_CONSTANT(std::size_t, value = - 5 + lcast_precision::value + 6 - ); - }; - - template<> - struct lcast_src_length - : lcast_src_length_floating - { - static void check_coverage() {} - }; - - template<> - struct lcast_src_length - : lcast_src_length_floating - { - static void check_coverage() {} - }; - - template<> - struct lcast_src_length - : lcast_src_length_floating - { - static void check_coverage() {} - }; - -#endif // #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION - } - - namespace detail // lexical_cast_stream_traits - { - template - struct lexical_cast_stream_traits { - typedef BOOST_DEDUCED_TYPENAME boost::detail::array_to_pointer_decay::type src; - typedef BOOST_DEDUCED_TYPENAME boost::remove_cv::type no_cv_src; - - typedef boost::detail::deduce_source_char deduce_src_char_metafunc; - typedef BOOST_DEDUCED_TYPENAME deduce_src_char_metafunc::type src_char_t; - typedef BOOST_DEDUCED_TYPENAME boost::detail::deduce_target_char::type target_char_t; - - typedef BOOST_DEDUCED_TYPENAME boost::detail::widest_char< - target_char_t, src_char_t - >::type char_type; - -#if !defined(BOOST_NO_CXX11_CHAR16_T) && defined(BOOST_NO_CXX11_UNICODE_LITERALS) - BOOST_STATIC_ASSERT_MSG(( !boost::is_same::value - && !boost::is_same::value), - "Your compiler does not have full support for char16_t" ); -#endif -#if !defined(BOOST_NO_CXX11_CHAR32_T) && defined(BOOST_NO_CXX11_UNICODE_LITERALS) - BOOST_STATIC_ASSERT_MSG(( !boost::is_same::value - && !boost::is_same::value), - "Your compiler does not have full support for char32_t" ); -#endif - - typedef BOOST_DEDUCED_TYPENAME boost::detail::deduce_char_traits< - char_type, Target, no_cv_src - >::type traits; - - typedef boost::type_traits::ice_and< - boost::is_same::value, // source is not a wide character based type - boost::type_traits::ice_ne::value, // target type is based on wide character - boost::type_traits::ice_not< - boost::detail::is_char_or_wchar::value // single character widening is optimized - >::value // and does not requires stringbuffer - > is_string_widening_required_t; - - typedef boost::type_traits::ice_not< boost::type_traits::ice_or< - boost::is_integral::value, - boost::detail::is_this_float_conversion_optimized::value, - boost::detail::is_char_or_wchar< - BOOST_DEDUCED_TYPENAME deduce_src_char_metafunc::stage1_type // if we did not get character type at stage1 - >::value // then we have no optimization for that type - >::value > is_source_input_not_optimized_t; - - // If we have an optimized conversion for - // Source, we do not need to construct stringbuf. - BOOST_STATIC_CONSTANT(bool, requires_stringbuf = - (boost::type_traits::ice_or< - is_string_widening_required_t::value, is_source_input_not_optimized_t::value - >::value) - ); - - typedef boost::detail::lcast_src_length len_t; - }; - } - - namespace detail // '0', '+' and '-' constants - { - template < typename Char > struct lcast_char_constants; - - template<> - struct lcast_char_constants - { - BOOST_STATIC_CONSTANT(char, zero = '0'); - BOOST_STATIC_CONSTANT(char, minus = '-'); - BOOST_STATIC_CONSTANT(char, plus = '+'); - BOOST_STATIC_CONSTANT(char, lowercase_e = 'e'); - BOOST_STATIC_CONSTANT(char, capital_e = 'E'); - BOOST_STATIC_CONSTANT(char, c_decimal_separator = '.'); - }; - -#ifndef BOOST_LCAST_NO_WCHAR_T - template<> - struct lcast_char_constants - { - BOOST_STATIC_CONSTANT(wchar_t, zero = L'0'); - BOOST_STATIC_CONSTANT(wchar_t, minus = L'-'); - BOOST_STATIC_CONSTANT(wchar_t, plus = L'+'); - BOOST_STATIC_CONSTANT(wchar_t, lowercase_e = L'e'); - BOOST_STATIC_CONSTANT(wchar_t, capital_e = L'E'); - BOOST_STATIC_CONSTANT(wchar_t, c_decimal_separator = L'.'); - }; -#endif - -#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) - template<> - struct lcast_char_constants - { - BOOST_STATIC_CONSTANT(char16_t, zero = u'0'); - BOOST_STATIC_CONSTANT(char16_t, minus = u'-'); - BOOST_STATIC_CONSTANT(char16_t, plus = u'+'); - BOOST_STATIC_CONSTANT(char16_t, lowercase_e = u'e'); - BOOST_STATIC_CONSTANT(char16_t, capital_e = u'E'); - BOOST_STATIC_CONSTANT(char16_t, c_decimal_separator = u'.'); - }; -#endif - -#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) - template<> - struct lcast_char_constants - { - BOOST_STATIC_CONSTANT(char32_t, zero = U'0'); - BOOST_STATIC_CONSTANT(char32_t, minus = U'-'); - BOOST_STATIC_CONSTANT(char32_t, plus = U'+'); - BOOST_STATIC_CONSTANT(char32_t, lowercase_e = U'e'); - BOOST_STATIC_CONSTANT(char32_t, capital_e = U'E'); - BOOST_STATIC_CONSTANT(char32_t, c_decimal_separator = U'.'); - }; -#endif - } - - namespace detail // lcast_to_unsigned - { - template - inline - BOOST_DEDUCED_TYPENAME make_unsigned::type lcast_to_unsigned(T value) BOOST_NOEXCEPT - { - typedef BOOST_DEDUCED_TYPENAME boost::make_unsigned::type result_type; - return static_cast( - value < 0 ? 0u - static_cast(value) : value - ); - } - } - - namespace detail // lcast_put_unsigned - { - template - CharT* lcast_put_unsigned(const T n_param, CharT* finish) - { -#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS - BOOST_STATIC_ASSERT(!std::numeric_limits::is_signed); -#endif - - typedef typename Traits::int_type int_type; - CharT const czero = lcast_char_constants::zero; - int_type const zero = Traits::to_int_type(czero); - BOOST_DEDUCED_TYPENAME boost::mpl::if_c< - (sizeof(int_type) > sizeof(T)) - , int_type - , T - >::type n = n_param; - -#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE - std::locale loc; - if (loc != std::locale::classic()) { - typedef std::numpunct numpunct; - numpunct const& np = BOOST_USE_FACET(numpunct, loc); - std::string const grouping = np.grouping(); - std::string::size_type const grouping_size = grouping.size(); - - if ( grouping_size && grouping[0] > 0 ) - { - -#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS - // Check that ulimited group is unreachable: - BOOST_STATIC_ASSERT(std::numeric_limits::digits10 < CHAR_MAX); -#endif - CharT thousands_sep = np.thousands_sep(); - std::string::size_type group = 0; // current group number - char last_grp_size = grouping[0]; - char left = last_grp_size; - - do - { - if(left == 0) - { - ++group; - if(group < grouping_size) - { - char const grp_size = grouping[group]; - last_grp_size = grp_size <= 0 ? static_cast(CHAR_MAX) : grp_size; - } - - left = last_grp_size; - --finish; - Traits::assign(*finish, thousands_sep); - } - - --left; - - --finish; - int_type const digit = static_cast(n % 10U); - Traits::assign(*finish, Traits::to_char_type(zero + digit)); - n /= 10; - } while(n); - return finish; - } - } -#endif - { - do - { - --finish; - int_type const digit = static_cast(n % 10U); - Traits::assign(*finish, Traits::to_char_type(zero + digit)); - n /= 10; - } while(n); - } - - return finish; - } - } - - namespace detail // lcast_ret_unsigned - { - template - inline bool lcast_ret_unsigned(T& value, const CharT* const begin, const CharT* end) - { -#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS - BOOST_STATIC_ASSERT(!std::numeric_limits::is_signed); - - // GCC when used with flag -std=c++0x may not have std::numeric_limits - // specializations for __int128 and unsigned __int128 types. - // Try compilation with -std=gnu++0x or -std=gnu++11. - // - // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40856 - BOOST_STATIC_ASSERT_MSG(std::numeric_limits::is_specialized, - "std::numeric_limits are not specialized for integral type passed to boost::lexical_cast" - ); -#endif - CharT const czero = lcast_char_constants::zero; - --end; - value = 0; - - if (begin > end || *end < czero || *end >= czero + 10) - return false; - value = static_cast(*end - czero); - --end; - T multiplier = 1; - bool multiplier_overflowed = false; - -#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE - std::locale loc; - if (loc != std::locale::classic()) { - typedef std::numpunct numpunct; - numpunct const& np = BOOST_USE_FACET(numpunct, loc); - std::string const& grouping = np.grouping(); - std::string::size_type const grouping_size = grouping.size(); - - /* According to Programming languages - C++ - * we MUST check for correct grouping - */ - if (grouping_size && grouping[0] > 0) - { - unsigned char current_grouping = 0; - CharT const thousands_sep = np.thousands_sep(); - char remained = static_cast(grouping[current_grouping] - 1); - bool shall_we_return = true; - - for(;end>=begin; --end) - { - if (remained) { - T const multiplier_10 = static_cast(multiplier * 10); - if (multiplier_10 / 10 != multiplier) multiplier_overflowed = true; - - T const dig_value = static_cast(*end - czero); - T const new_sub_value = static_cast(multiplier_10 * dig_value); - - if (*end < czero || *end >= czero + 10 - /* detecting overflow */ - || (dig_value && new_sub_value / dig_value != multiplier_10) - || static_cast((std::numeric_limits::max)()-new_sub_value) < value - || (multiplier_overflowed && dig_value) - ) - return false; - - value = static_cast(value + new_sub_value); - multiplier = static_cast(multiplier * 10); - --remained; - } else { - if ( !Traits::eq(*end, thousands_sep) ) //|| begin == end ) return false; - { - /* - * According to Programming languages - C++ - * Digit grouping is checked. That is, the positions of discarded - * separators is examined for consistency with - * use_facet >(loc ).grouping() - * - * BUT what if there is no separators at all and grouping() - * is not empty? Well, we have no extraced separators, so we - * won`t check them for consistency. This will allow us to - * work with "C" locale from other locales - */ - shall_we_return = false; - break; - } else { - if ( begin == end ) return false; - if (current_grouping < grouping_size-1 ) ++current_grouping; - remained = grouping[current_grouping]; - } - } - } - - if (shall_we_return) return true; - } - } -#endif - { - while ( begin <= end ) - { - T const multiplier_10 = static_cast(multiplier * 10); - if (multiplier_10 / 10 != multiplier) multiplier_overflowed = true; - - T const dig_value = static_cast(*end - czero); - T const new_sub_value = static_cast(multiplier_10 * dig_value); - - if (*end < czero || *end >= czero + 10 - /* detecting overflow */ - || (dig_value && new_sub_value / dig_value != multiplier_10) - || static_cast((std::numeric_limits::max)()-new_sub_value) < value - || (multiplier_overflowed && dig_value) - ) - return false; - - value = static_cast(value + new_sub_value); - multiplier = static_cast(multiplier * 10); - --end; - } - } - return true; - } - } - - namespace detail - { - template - bool lc_iequal(const CharT* val, const CharT* lcase, const CharT* ucase, unsigned int len) BOOST_NOEXCEPT { - for( unsigned int i=0; i < len; ++i ) { - if ( val[i] != lcase[i] && val[i] != ucase[i] ) return false; - } - - return true; - } - - /* Returns true and sets the correct value if found NaN or Inf. */ - template - inline bool parse_inf_nan_impl(const CharT* begin, const CharT* end, T& value - , const CharT* lc_NAN, const CharT* lc_nan - , const CharT* lc_INFINITY, const CharT* lc_infinity - , const CharT opening_brace, const CharT closing_brace) BOOST_NOEXCEPT - { - using namespace std; - if (begin == end) return false; - const CharT minus = lcast_char_constants::minus; - const CharT plus = lcast_char_constants::plus; - const int inifinity_size = 8; - - bool has_minus = false; - /* Parsing +/- */ - if( *begin == minus) - { - ++ begin; - has_minus = true; - } - else if( *begin == plus ) ++begin; - - if( end-begin < 3 ) return false; - if( lc_iequal(begin, lc_nan, lc_NAN, 3) ) - { - begin += 3; - if (end != begin) /* It is 'nan(...)' or some bad input*/ - { - if(end-begin<2) return false; // bad input - -- end; - if( *begin != opening_brace || *end != closing_brace) return false; // bad input - } - - if( !has_minus ) value = std::numeric_limits::quiet_NaN(); - else value = (boost::math::changesign) (std::numeric_limits::quiet_NaN()); - return true; - } else - if (( /* 'INF' or 'inf' */ - end-begin==3 - && - lc_iequal(begin, lc_infinity, lc_INFINITY, 3) - ) - || - ( /* 'INFINITY' or 'infinity' */ - end-begin==inifinity_size - && - lc_iequal(begin, lc_infinity, lc_INFINITY, inifinity_size) - ) - ) - { - if( !has_minus ) value = std::numeric_limits::infinity(); - else value = (boost::math::changesign) (std::numeric_limits::infinity()); - return true; - } - - return false; - } - - template - bool put_inf_nan_impl(CharT* begin, CharT*& end, const T& value - , const CharT* lc_nan - , const CharT* lc_infinity) BOOST_NOEXCEPT - { - using namespace std; - const CharT minus = lcast_char_constants::minus; - if ( (boost::math::isnan)(value) ) - { - if ( (boost::math::signbit)(value) ) - { - *begin = minus; - ++ begin; - } - - memcpy(begin, lc_nan, 3 * sizeof(CharT)); - end = begin + 3; - return true; - } else if ( (boost::math::isinf)(value) ) - { - if ( (boost::math::signbit)(value) ) - { - *begin = minus; - ++ begin; - } - - memcpy(begin, lc_infinity, 3 * sizeof(CharT)); - end = begin + 3; - return true; - } - - return false; - } - - -#ifndef BOOST_LCAST_NO_WCHAR_T - template - bool parse_inf_nan(const wchar_t* begin, const wchar_t* end, T& value) BOOST_NOEXCEPT - { - return parse_inf_nan_impl(begin, end, value - , L"NAN", L"nan" - , L"INFINITY", L"infinity" - , L'(', L')'); - } - - template - bool put_inf_nan(wchar_t* begin, wchar_t*& end, const T& value) BOOST_NOEXCEPT - { - return put_inf_nan_impl(begin, end, value, L"nan", L"infinity"); - } - -#endif -#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) - template - bool parse_inf_nan(const char16_t* begin, const char16_t* end, T& value) BOOST_NOEXCEPT - { - return parse_inf_nan_impl(begin, end, value - , u"NAN", u"nan" - , u"INFINITY", u"infinity" - , u'(', u')'); - } - - template - bool put_inf_nan(char16_t* begin, char16_t*& end, const T& value) BOOST_NOEXCEPT - { - return put_inf_nan_impl(begin, end, value, u"nan", u"infinity"); - } -#endif -#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) - template - bool parse_inf_nan(const char32_t* begin, const char32_t* end, T& value) BOOST_NOEXCEPT - { - return parse_inf_nan_impl(begin, end, value - , U"NAN", U"nan" - , U"INFINITY", U"infinity" - , U'(', U')'); - } - - template - bool put_inf_nan(char32_t* begin, char32_t*& end, const T& value) BOOST_NOEXCEPT - { - return put_inf_nan_impl(begin, end, value, U"nan", U"infinity"); - } -#endif - - template - bool parse_inf_nan(const CharT* begin, const CharT* end, T& value) BOOST_NOEXCEPT - { - return parse_inf_nan_impl(begin, end, value - , "NAN", "nan" - , "INFINITY", "infinity" - , '(', ')'); - } - - template - bool put_inf_nan(CharT* begin, CharT*& end, const T& value) BOOST_NOEXCEPT - { - return put_inf_nan_impl(begin, end, value, "nan", "infinity"); - } - } - - - namespace detail // lcast_ret_float - { - -// Silence buggy MS warnings like C4244: '+=' : conversion from 'int' to 'unsigned short', possible loss of data -#if defined(_MSC_VER) && (_MSC_VER == 1400) -# pragma warning(push) -# pragma warning(disable:4244) -#endif - template - struct mantissa_holder_type - { - /* Can not be used with this type */ - }; - - template <> - struct mantissa_holder_type - { - typedef unsigned int type; - typedef double wide_result_t; - }; - - template <> - struct mantissa_holder_type - { -#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS - typedef long double wide_result_t; -#if defined(BOOST_HAS_LONG_LONG) - typedef boost::ulong_long_type type; -#elif defined(BOOST_HAS_MS_INT64) - typedef unsigned __int64 type; -#endif -#endif - }; - - template - inline bool lcast_ret_float(T& value, const CharT* begin, const CharT* end) - { - -#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE - std::locale loc; - typedef std::numpunct numpunct; - numpunct const& np = BOOST_USE_FACET(numpunct, loc); - std::string const grouping( - (loc == std::locale::classic()) - ? std::string() - : np.grouping() - ); - std::string::size_type const grouping_size = grouping.size(); - CharT const thousands_sep = static_cast(grouping_size ? np.thousands_sep() : 0); - CharT const decimal_point = np.decimal_point(); - bool found_grouping = false; - std::string::size_type last_grouping_pos = grouping_size - 1; -#else - CharT const decimal_point = lcast_char_constants::c_decimal_separator; -#endif - - CharT const czero = lcast_char_constants::zero; - CharT const minus = lcast_char_constants::minus; - CharT const plus = lcast_char_constants::plus; - CharT const capital_e = lcast_char_constants::capital_e; - CharT const lowercase_e = lcast_char_constants::lowercase_e; - - value = static_cast(0); - - if (parse_inf_nan(begin, end, value)) return true; - - typedef typename Traits::int_type int_type; - typedef BOOST_DEDUCED_TYPENAME mantissa_holder_type::type mantissa_type; - typedef BOOST_DEDUCED_TYPENAME mantissa_holder_type::wide_result_t wide_result_t; - int_type const zero = Traits::to_int_type(czero); - if (begin == end) return false; - - /* Getting the plus/minus sign */ - bool has_minus = false; - if (Traits::eq(*begin, minus) ) { - ++ begin; - has_minus = true; - if (begin == end) return false; - } else if (Traits::eq(*begin, plus) ) { - ++begin; - if (begin == end) return false; - } - - bool found_decimal = false; - bool found_number_before_exp = false; - int pow_of_10 = 0; - mantissa_type mantissa=0; - bool is_mantissa_full = false; - - char length_since_last_delim = 0; - - while ( begin != end ) - { - if (found_decimal) { - /* We allow no thousand_separators after decimal point */ - - mantissa_type tmp_mantissa = mantissa * 10u; - if (Traits::eq(*begin, lowercase_e) || Traits::eq(*begin, capital_e)) break; - if ( *begin < czero || *begin >= czero + 10 ) return false; - if ( is_mantissa_full - || tmp_mantissa / 10u != mantissa - || (std::numeric_limits::max)()-(*begin - zero) < tmp_mantissa - ) { - is_mantissa_full = true; - ++ begin; - continue; - } - - -- pow_of_10; - mantissa = tmp_mantissa; - mantissa += *begin - zero; - - found_number_before_exp = true; - } else { - - if (*begin >= czero && *begin < czero + 10) { - - /* Checking for mantissa overflow. If overflow will - * occur, them we only increase multiplyer - */ - mantissa_type tmp_mantissa = mantissa * 10u; - if( !is_mantissa_full - && tmp_mantissa / 10u == mantissa - && (std::numeric_limits::max)()-(*begin - zero) >= tmp_mantissa - ) - { - mantissa = tmp_mantissa; - mantissa += *begin - zero; - } else - { - is_mantissa_full = true; - ++ pow_of_10; - } - - found_number_before_exp = true; - ++ length_since_last_delim; - } else if (Traits::eq(*begin, decimal_point) || Traits::eq(*begin, lowercase_e) || Traits::eq(*begin, capital_e)) { -#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE - /* If ( we need to check grouping - * and ( grouping missmatches - * or grouping position is incorrect - * or we are using the grouping position 0 twice - * ) - * ) then return error - */ - if( grouping_size && found_grouping - && ( - length_since_last_delim != grouping[0] - || last_grouping_pos>1 - || (last_grouping_pos==0 && grouping_size>1) - ) - ) return false; -#endif - - if(Traits::eq(*begin, decimal_point)) { - ++ begin; - found_decimal = true; - if (!found_number_before_exp && begin==end) return false; - continue; - }else { - if (!found_number_before_exp) return false; - break; - } - } -#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE - else if (grouping_size && Traits::eq(*begin, thousands_sep)){ - if(found_grouping) - { - /* It is not he first time, when we find thousands separator, - * so we need to chek, is the distance between two groupings - * equal to grouping[last_grouping_pos] */ - - if (length_since_last_delim != grouping[last_grouping_pos] ) - { - if (!last_grouping_pos) return false; - else - { - -- last_grouping_pos; - if (length_since_last_delim != grouping[last_grouping_pos]) return false; - } - } else - /* We are calling the grouping[0] twice, when grouping size is more than 1 */ - if (grouping_size>1u && last_grouping_pos+1 grouping[last_grouping_pos] ) return false; - } - - length_since_last_delim = 0; - ++ begin; - - /* Delimiter at the end '100,' */ - if (begin == end) return false; - continue; - } -#endif - else return false; - } - - ++begin; - } - - // Exponent found - if ( begin != end && (Traits::eq(*begin, lowercase_e) || Traits::eq(*begin, capital_e)) ) { - ++ begin; - if ( begin == end ) return false; - - bool exp_has_minus = false; - if(Traits::eq(*begin, minus)) { - exp_has_minus = true; - ++ begin; - if ( begin == end ) return false; - } else if (Traits::eq(*begin, plus)) { - ++ begin; - if ( begin == end ) return false; - } - - int exp_pow_of_10 = 0; - while ( begin != end ) - { - if ( *begin < czero - || *begin >= czero + 10 - || exp_pow_of_10 * 10 < exp_pow_of_10) /* Overflows are checked lower more precisely*/ - return false; - - exp_pow_of_10 *= 10; - exp_pow_of_10 += *begin - zero; - ++ begin; - }; - - if ( exp_pow_of_10 ) { - /* Overflows are checked lower */ - if ( exp_has_minus ) { - pow_of_10 -= exp_pow_of_10; - } else { - pow_of_10 += exp_pow_of_10; - } - } - } - - /* We need a more accurate algorithm... We can not use current algorithm - * with long doubles (and with doubles if sizeof(double)==sizeof(long double)). - */ - const wide_result_t result = std::pow(static_cast(10.0), pow_of_10) * mantissa; - value = static_cast( has_minus ? (boost::math::changesign)(result) : result); - - if ( (boost::math::isinf)(value) || (boost::math::isnan)(value) ) return false; - - return true; - } -// Unsilence buggy MS warnings like C4244: '+=' : conversion from 'int' to 'unsigned short', possible loss of data -#if defined(_MSC_VER) && (_MSC_VER == 1400) -# pragma warning(pop) -#endif - } - - namespace detail // parser_buf - { - // - // class parser_buf: - // acts as a stream buffer which wraps around a pair of pointers - // - // This class is copied (and slightly changed) from - // boost/regex/v4/cpp_regex_traits.hpp - // Thanks John Maddock for it! (previous version had some - // problems with libc++ and some other STL implementations) - template - class parser_buf : public BufferType { - typedef BufferType base_type; - typedef typename base_type::int_type int_type; - typedef typename base_type::char_type char_type; - typedef typename base_type::pos_type pos_type; - typedef ::std::streamsize streamsize; - typedef typename base_type::off_type off_type; - - public: - parser_buf() : base_type() { setbuf(0, 0); } - const charT* getnext() { return this->gptr(); } -#ifndef BOOST_NO_USING_TEMPLATE - using base_type::pptr; - using base_type::pbase; -#else - charT* pptr() const { return base_type::pptr(); } - charT* pbase() const { return base_type::pbase(); } -#endif - base_type* setbuf(char_type* s, streamsize n) { - this->setg(s, s, s + n); - return this; - } - - pos_type seekpos(pos_type sp, ::std::ios_base::openmode which) { - if(which & ::std::ios_base::out) - return pos_type(off_type(-1)); - off_type size = static_cast(this->egptr() - this->eback()); - charT* g = this->eback(); - if(off_type(sp) <= size) - { - this->setg(g, g + off_type(sp), g + size); - } - return pos_type(off_type(-1)); - } - - pos_type seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) { - typedef typename boost::int_t::least cast_type; - - if(which & ::std::ios_base::out) - return pos_type(off_type(-1)); - std::ptrdiff_t size = this->egptr() - this->eback(); - std::ptrdiff_t pos = this->gptr() - this->eback(); - charT* g = this->eback(); - switch(static_cast(way)) - { - case ::std::ios_base::beg: - if((off < 0) || (off > size)) - return pos_type(off_type(-1)); - else - this->setg(g, g + off, g + size); - break; - case ::std::ios_base::end: - if((off < 0) || (off > size)) - return pos_type(off_type(-1)); - else - this->setg(g, g + size - off, g + size); - break; - case ::std::ios_base::cur: - { - std::ptrdiff_t newpos = static_cast(pos + off); - if((newpos < 0) || (newpos > size)) - return pos_type(off_type(-1)); - else - this->setg(g, g + newpos, g + size); - break; - } - default: ; - } -#ifdef BOOST_MSVC -#pragma warning(push) -#pragma warning(disable:4244) -#endif - return static_cast(this->gptr() - this->eback()); -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - } - private: - parser_buf& operator=(const parser_buf&); - parser_buf(const parser_buf&); - }; - } - - namespace detail - { - struct do_not_construct_out_stream_t{}; - } - - namespace detail // optimized stream wrapper - { - // String representation of Source has an upper limit. - template< class CharT // a result of widest_char transformation - , class Traits // usually char_traits - , bool RequiresStringbuffer - > - class lexical_stream_limited_src - { - -#if defined(BOOST_NO_STRINGSTREAM) - typedef std::ostrstream out_stream_t; -#elif defined(BOOST_NO_STD_LOCALE) - typedef std::ostringstream out_stream_t; - typedef parser_buf buffer_t; -#else - typedef std::basic_ostringstream out_stream_t; - typedef parser_buf, CharT> buffer_t; -#endif - typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< - RequiresStringbuffer, - out_stream_t, - do_not_construct_out_stream_t - >::type deduced_out_stream_t; - - // A string representation of Source is written to [start, finish). - CharT* start; - CharT* finish; - deduced_out_stream_t out_stream; - - public: - lexical_stream_limited_src(CharT* sta, CharT* fin) BOOST_NOEXCEPT - : start(sta) - , finish(fin) - {} - - private: - // Undefined: - lexical_stream_limited_src(lexical_stream_limited_src const&); - void operator=(lexical_stream_limited_src const&); - -/************************************ HELPER FUNCTIONS FOR OPERATORS << ( ... ) ********************************/ - bool shl_char(CharT ch) BOOST_NOEXCEPT - { - Traits::assign(*start, ch); - finish = start + 1; - return true; - } - -#ifndef BOOST_LCAST_NO_WCHAR_T - template - bool shl_char(T ch) - { - BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)) , - "boost::lexical_cast does not support narrowing of char types." - "Use boost::locale instead" ); -#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE - std::locale loc; - CharT const w = BOOST_USE_FACET(std::ctype, loc).widen(ch); -#else - CharT const w = static_cast(ch); -#endif - Traits::assign(*start, w); - finish = start + 1; - return true; - } -#endif - - bool shl_char_array(CharT const* str) BOOST_NOEXCEPT - { - start = const_cast(str); - finish = start + Traits::length(str); - return true; - } - - template - bool shl_char_array(T const* str) - { - BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)), - "boost::lexical_cast does not support narrowing of char types." - "Use boost::locale instead" ); - return shl_input_streamable(str); - } - - bool shl_char_array_limited(CharT const* str, std::size_t max_size) BOOST_NOEXCEPT - { - start = const_cast(str); - finish = std::find(start, start + max_size, Traits::to_char_type(0)); - return true; - } - - template - bool shl_input_streamable(InputStreamable& input) - { -#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE) - // If you have compilation error at this point, than your STL library - // does not support such conversions. Try updating it. - BOOST_STATIC_ASSERT((boost::is_same::value)); -#endif - -#ifndef BOOST_NO_EXCEPTIONS - out_stream.exceptions(std::ios::badbit); - try { -#endif - bool const result = !(out_stream << input).fail(); - const buffer_t* const p = static_cast( - static_cast*>(out_stream.rdbuf()) - ); - start = p->pbase(); - finish = p->pptr(); - return result; -#ifndef BOOST_NO_EXCEPTIONS - } catch (const ::std::ios_base::failure& /*f*/) { - return false; - } -#endif - } - - template - inline bool shl_signed(T n) - { - start = lcast_put_unsigned(lcast_to_unsigned(n), finish); - if(n < 0) - { - --start; - CharT const minus = lcast_char_constants::minus; - Traits::assign(*start, minus); - } - return true; - } - - template - bool shl_real_type(const T& val, SomeCharT* begin, SomeCharT*& end) - { - if (put_inf_nan(begin, end, val)) return true; - lcast_set_precision(out_stream, &val); - return shl_input_streamable(val); - } - - static bool shl_real_type(float val, char* begin, char*& end) - { using namespace std; - if (put_inf_nan(begin, end, val)) return true; - const double val_as_double = val; - end = begin + -#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) - sprintf_s(begin, end-begin, -#else - sprintf(begin, -#endif - "%.*g", static_cast(boost::detail::lcast_get_precision()), val_as_double); - return end > begin; - } - - static bool shl_real_type(double val, char* begin, char*& end) - { using namespace std; - if (put_inf_nan(begin, end, val)) return true; - end = begin + -#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) - sprintf_s(begin, end-begin, -#else - sprintf(begin, -#endif - "%.*g", static_cast(boost::detail::lcast_get_precision()), val); - return end > begin; - } - -#ifndef __MINGW32__ - static bool shl_real_type(long double val, char* begin, char*& end) - { using namespace std; - if (put_inf_nan(begin, end, val)) return true; - end = begin + -#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) - sprintf_s(begin, end-begin, -#else - sprintf(begin, -#endif - "%.*Lg", static_cast(boost::detail::lcast_get_precision()), val ); - return end > begin; - } -#endif - - -#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__) - static bool shl_real_type(float val, wchar_t* begin, wchar_t*& end) - { using namespace std; - if (put_inf_nan(begin, end, val)) return true; - const double val_as_double = val; - end = begin + swprintf(begin, end-begin, - L"%.*g", - static_cast(boost::detail::lcast_get_precision()), - val_as_double ); - return end > begin; - } - - static bool shl_real_type(double val, wchar_t* begin, wchar_t*& end) - { using namespace std; - if (put_inf_nan(begin, end, val)) return true; - end = begin + swprintf(begin, end-begin, - L"%.*g", static_cast(boost::detail::lcast_get_precision()), val ); - return end > begin; - } - - static bool shl_real_type(long double val, wchar_t* begin, wchar_t*& end) - { using namespace std; - if (put_inf_nan(begin, end, val)) return true; - end = begin + swprintf(begin, end-begin, - L"%.*Lg", static_cast(boost::detail::lcast_get_precision()), val ); - return end > begin; - } -#endif - -/************************************ OPERATORS << ( ... ) ********************************/ - public: - template - bool operator<<(std::basic_string const& str) BOOST_NOEXCEPT - { - start = const_cast(str.data()); - finish = start + str.length(); - return true; - } - - template - bool operator<<(boost::container::basic_string const& str) BOOST_NOEXCEPT - { - start = const_cast(str.data()); - finish = start + str.length(); - return true; - } - - bool operator<<(bool value) BOOST_NOEXCEPT - { - CharT const czero = lcast_char_constants::zero; - Traits::assign(*start, Traits::to_char_type(czero + value)); - finish = start + 1; - return true; - } - - bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT - { - start = rng.begin(); - finish = rng.end(); - return true; - } - - bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT - { - start = const_cast(rng.begin()); - finish = const_cast(rng.end()); - return true; - } - - bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT - { - return (*this) << iterator_range( - const_cast(reinterpret_cast(rng.begin())), - const_cast(reinterpret_cast(rng.end())) - ); - } - - bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT - { - return (*this) << iterator_range( - const_cast(reinterpret_cast(rng.begin())), - const_cast(reinterpret_cast(rng.end())) - ); - } - - bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT - { - return (*this) << iterator_range( - reinterpret_cast(rng.begin()), - reinterpret_cast(rng.end()) - ); - } - - bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT - { - return (*this) << iterator_range( - reinterpret_cast(rng.begin()), - reinterpret_cast(rng.end()) - ); - } - - bool operator<<(char ch) { return shl_char(ch); } - bool operator<<(unsigned char ch) { return ((*this) << static_cast(ch)); } - bool operator<<(signed char ch) { return ((*this) << static_cast(ch)); } -#if !defined(BOOST_LCAST_NO_WCHAR_T) - bool operator<<(wchar_t const* str) { return shl_char_array(str); } - bool operator<<(wchar_t * str) { return shl_char_array(str); } -#ifndef BOOST_NO_INTRINSIC_WCHAR_T - bool operator<<(wchar_t ch) { return shl_char(ch); } -#endif -#endif -#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) - bool operator<<(char16_t ch) { return shl_char(ch); } - bool operator<<(char16_t * str) { return shl_char_array(str); } - bool operator<<(char16_t const * str) { return shl_char_array(str); } -#endif -#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) - bool operator<<(char32_t ch) { return shl_char(ch); } - bool operator<<(char32_t * str) { return shl_char_array(str); } - bool operator<<(char32_t const * str) { return shl_char_array(str); } -#endif - bool operator<<(unsigned char const* ch) { return ((*this) << reinterpret_cast(ch)); } - bool operator<<(unsigned char * ch) { return ((*this) << reinterpret_cast(ch)); } - bool operator<<(signed char const* ch) { return ((*this) << reinterpret_cast(ch)); } - bool operator<<(signed char * ch) { return ((*this) << reinterpret_cast(ch)); } - bool operator<<(char const* str) { return shl_char_array(str); } - bool operator<<(char* str) { return shl_char_array(str); } - bool operator<<(short n) { return shl_signed(n); } - bool operator<<(int n) { return shl_signed(n); } - bool operator<<(long n) { return shl_signed(n); } - bool operator<<(unsigned short n) { start = lcast_put_unsigned(n, finish); return true; } - bool operator<<(unsigned int n) { start = lcast_put_unsigned(n, finish); return true; } - bool operator<<(unsigned long n) { start = lcast_put_unsigned(n, finish); return true; } - -#if defined(BOOST_HAS_LONG_LONG) - bool operator<<(boost::ulong_long_type n) { start = lcast_put_unsigned(n, finish); return true; } - bool operator<<(boost::long_long_type n) { return shl_signed(n); } -#elif defined(BOOST_HAS_MS_INT64) - bool operator<<(unsigned __int64 n) { start = lcast_put_unsigned(n, finish); return true; } - bool operator<<( __int64 n) { return shl_signed(n); } -#endif - -#ifdef BOOST_HAS_INT128 - bool operator<<(const boost::uint128_type& n) { start = lcast_put_unsigned(n, finish); return true; } - bool operator<<(const boost::int128_type& n) { return shl_signed(n); } -#endif - - bool operator<<(float val) { return shl_real_type(val, start, finish); } - bool operator<<(double val) { return shl_real_type(val, start, finish); } - bool operator<<(long double val) { -#ifndef __MINGW32__ - return shl_real_type(val, start, finish); -#else - return shl_real_type(static_cast(val), start, finish); -#endif - } - - template - bool operator<<(boost::array const& input) BOOST_NOEXCEPT - { return shl_char_array_limited(input.begin(), N); } - - template - bool operator<<(boost::array const& input) BOOST_NOEXCEPT - { return ((*this) << reinterpret_cast const& >(input)); } - - template - bool operator<<(boost::array const& input) BOOST_NOEXCEPT - { return ((*this) << reinterpret_cast const& >(input)); } - - template - bool operator<<(boost::array const& input) BOOST_NOEXCEPT - { return shl_char_array_limited(input.begin(), N); } - - template - bool operator<<(boost::array const& input) BOOST_NOEXCEPT - { return ((*this) << reinterpret_cast const& >(input)); } - - template - bool operator<<(boost::array const& input) BOOST_NOEXCEPT - { return ((*this) << reinterpret_cast const& >(input)); } - -#ifndef BOOST_NO_CXX11_HDR_ARRAY - template - bool operator<<(std::array const& input) BOOST_NOEXCEPT - { - if (input.size()) return shl_char_array_limited(&input[0], N); - else return true; - } - - template - bool operator<<(std::array const& input) BOOST_NOEXCEPT - { return ((*this) << reinterpret_cast const& >(input)); } - - template - bool operator<<(std::array const& input) BOOST_NOEXCEPT - { return ((*this) << reinterpret_cast const& >(input)); } - - template - bool operator<<(std::array const& input) BOOST_NOEXCEPT - { - if (input.size()) return shl_char_array_limited(&input[0], N); - else return true; - } - - template - bool operator<<(std::array const& input) BOOST_NOEXCEPT - { return ((*this) << reinterpret_cast const& >(input)); } - - template - bool operator<<(std::array const& input) BOOST_NOEXCEPT - { return ((*this) << reinterpret_cast const& >(input)); } -#endif - - template - bool operator<<(const InStreamable& input) { return shl_input_streamable(input); } - -/************************************ HELPER FUNCTIONS FOR OPERATORS >> ( ... ) ********************************/ - private: - - template - bool shr_unsigned(Type& output) - { - if (start == finish) return false; - CharT const minus = lcast_char_constants::minus; - CharT const plus = lcast_char_constants::plus; - bool has_minus = false; - - /* We won`t use `start' any more, so no need in decrementing it after */ - if ( Traits::eq(minus,*start) ) - { - ++start; - has_minus = true; - } else if ( Traits::eq( plus, *start ) ) - { - ++start; - } - - bool const succeed = lcast_ret_unsigned(output, start, finish); - - if (has_minus) { - output = static_cast(0u - output); - } - - return succeed; - } - - template - bool shr_signed(Type& output) - { - if (start == finish) return false; - CharT const minus = lcast_char_constants::minus; - CharT const plus = lcast_char_constants::plus; - typedef BOOST_DEDUCED_TYPENAME make_unsigned::type utype; - utype out_tmp =0; - bool has_minus = false; - - /* We won`t use `start' any more, so no need in decrementing it after */ - if ( Traits::eq(minus,*start) ) - { - ++start; - has_minus = true; - } else if ( Traits::eq(plus, *start) ) - { - ++start; - } - - bool succeed = lcast_ret_unsigned(out_tmp, start, finish); - if (has_minus) { - utype const comp_val = (static_cast(1) << std::numeric_limits::digits); - succeed = succeed && out_tmp<=comp_val; - output = static_cast(0u - out_tmp); - } else { - utype const comp_val = static_cast((std::numeric_limits::max)()); - succeed = succeed && out_tmp<=comp_val; - output = out_tmp; - } - return succeed; - } - - template - bool shr_using_base_class(InputStreamable& output) - { - BOOST_STATIC_ASSERT_MSG( - (!boost::is_pointer::value), - "boost::lexical_cast can not convert to pointers" - ); - -#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE) - BOOST_STATIC_ASSERT_MSG((boost::is_same::value), - "boost::lexical_cast can not convert, because your STL library does not " - "support such conversions. Try updating it." - ); -#endif - -#if defined(BOOST_NO_STRINGSTREAM) - std::istrstream stream(start, finish - start); -#else - - buffer_t buf; - buf.setbuf(start, finish - start); -#if defined(BOOST_NO_STD_LOCALE) - std::istream stream(&buf); -#else - std::basic_istream stream(&buf); -#endif // BOOST_NO_STD_LOCALE -#endif // BOOST_NO_STRINGSTREAM - -#ifndef BOOST_NO_EXCEPTIONS - stream.exceptions(std::ios::badbit); - try { -#endif - stream.unsetf(std::ios::skipws); - lcast_set_precision(stream, static_cast(0)); - - return stream >> output && - stream.get() == -#if defined(__GNUC__) && (__GNUC__<3) && defined(BOOST_NO_STD_WSTRING) - // GCC 2.9x lacks std::char_traits<>::eof(). - // We use BOOST_NO_STD_WSTRING to filter out STLport and libstdc++-v3 - // configurations, which do provide std::char_traits<>::eof(). - - EOF; -#else - Traits::eof(); -#endif - -#ifndef BOOST_NO_EXCEPTIONS - } catch (const ::std::ios_base::failure& /*f*/) { - return false; - } -#endif - } - - template - inline bool shr_xchar(T& output) - { - BOOST_STATIC_ASSERT_MSG(( sizeof(CharT) == sizeof(T) ), - "boost::lexical_cast does not support narrowing of character types." - "Use boost::locale instead" ); - bool const ok = (finish - start == 1); - if (ok) { - CharT out; - Traits::assign(out, *start); - output = static_cast(out); - } - return ok; - } - -/************************************ OPERATORS >> ( ... ) ********************************/ - public: - bool operator>>(unsigned short& output) { return shr_unsigned(output); } - bool operator>>(unsigned int& output) { return shr_unsigned(output); } - bool operator>>(unsigned long int& output) { return shr_unsigned(output); } - bool operator>>(short& output) { return shr_signed(output); } - bool operator>>(int& output) { return shr_signed(output); } - bool operator>>(long int& output) { return shr_signed(output); } -#if defined(BOOST_HAS_LONG_LONG) - bool operator>>(boost::ulong_long_type& output) { return shr_unsigned(output); } - bool operator>>(boost::long_long_type& output) { return shr_signed(output); } -#elif defined(BOOST_HAS_MS_INT64) - bool operator>>(unsigned __int64& output) { return shr_unsigned(output); } - bool operator>>(__int64& output) { return shr_signed(output); } -#endif - -#ifdef BOOST_HAS_INT128 - bool operator>>(boost::uint128_type& output) { return shr_unsigned(output); } - bool operator>>(boost::int128_type& output) { return shr_signed(output); } -#endif - - bool operator>>(char& output) { return shr_xchar(output); } - bool operator>>(unsigned char& output) { return shr_xchar(output); } - bool operator>>(signed char& output) { return shr_xchar(output); } -#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) - bool operator>>(wchar_t& output) { return shr_xchar(output); } -#endif -#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) - bool operator>>(char16_t& output) { return shr_xchar(output); } -#endif -#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) - bool operator>>(char32_t& output) { return shr_xchar(output); } -#endif - template - bool operator>>(std::basic_string& str) { str.assign(start, finish); return true; } - - template - bool operator>>(boost::container::basic_string& str) { str.assign(start, finish); return true; } - - - private: - template - bool shr_std_array(ArrayT& output) BOOST_NOEXCEPT - { - using namespace std; - const std::size_t size = finish - start; - if (size > N - 1) { // `-1` because we need to store \0 at the end - return false; - } - - memcpy(&output[0], start, size * sizeof(CharT)); - output[size] = Traits::to_char_type(0); - return true; - } - - public: - - template - bool operator>>(boost::array& output) BOOST_NOEXCEPT - { - return shr_std_array(output); - } - - template - bool operator>>(boost::array& output) - { - return ((*this) >> reinterpret_cast& >(output)); - } - - template - bool operator>>(boost::array& output) - { - return ((*this) >> reinterpret_cast& >(output)); - } - -#ifndef BOOST_NO_CXX11_HDR_ARRAY - template - bool operator>>(std::array& output) BOOST_NOEXCEPT - { - return shr_std_array(output); - } - - template - bool operator>>(std::array& output) - { - return ((*this) >> reinterpret_cast& >(output)); - } - - template - bool operator>>(std::array& output) - { - return ((*this) >> reinterpret_cast& >(output)); - } -#endif - - - /* - * case "-0" || "0" || "+0" : output = false; return true; - * case "1" || "+1": output = true; return true; - * default: return false; - */ - bool operator>>(bool& output) BOOST_NOEXCEPT - { - CharT const zero = lcast_char_constants::zero; - CharT const plus = lcast_char_constants::plus; - CharT const minus = lcast_char_constants::minus; - - switch(finish-start) - { - case 1: - output = Traits::eq(start[0], zero+1); - return output || Traits::eq(start[0], zero ); - case 2: - if ( Traits::eq( plus, *start) ) - { - ++start; - output = Traits::eq(start[0], zero +1); - return output || Traits::eq(start[0], zero ); - } else - { - output = false; - return Traits::eq( minus, *start) - && Traits::eq( zero, start[1]); - } - default: - output = false; // Suppress warning about uninitalized variable - return false; - } - } - - bool operator>>(float& output) { return lcast_ret_float(output,start,finish); } - - private: - // Not optimised converter - template - bool float_types_converter_internal(T& output, int /*tag*/) { - if (parse_inf_nan(start, finish, output)) return true; - bool return_value = shr_using_base_class(output); - - /* Some compilers and libraries successfully - * parse 'inf', 'INFINITY', '1.0E', '1.0E-'... - * We are trying to provide a unified behaviour, - * so we just forbid such conversions (as some - * of the most popular compilers/libraries do) - * */ - CharT const minus = lcast_char_constants::minus; - CharT const plus = lcast_char_constants::plus; - CharT const capital_e = lcast_char_constants::capital_e; - CharT const lowercase_e = lcast_char_constants::lowercase_e; - if ( return_value && - ( - Traits::eq(*(finish-1), lowercase_e) // 1.0e - || Traits::eq(*(finish-1), capital_e) // 1.0E - || Traits::eq(*(finish-1), minus) // 1.0e- or 1.0E- - || Traits::eq(*(finish-1), plus) // 1.0e+ or 1.0E+ - ) - ) return false; - - return return_value; - } - - // Optimised converter - bool float_types_converter_internal(double& output,char /*tag*/) { - return lcast_ret_float(output,start,finish); - } - public: - - bool operator>>(double& output) - { - /* - * Some compilers implement long double as double. In that case these types have - * same size, same precision, same max and min values... And it means, - * that current implementation of lcast_ret_float cannot be used for type - * double, because it will give a big precision loss. - * */ - boost::mpl::if_c< -#if (defined(BOOST_HAS_LONG_LONG) || defined(BOOST_HAS_MS_INT64)) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) - boost::type_traits::ice_eq< sizeof(double), sizeof(long double) >::value, -#else - 1, -#endif - int, - char - >::type tag = 0; - - return float_types_converter_internal(output, tag); - } - - bool operator>>(long double& output) - { - int tag = 0; - return float_types_converter_internal(output, tag); - } - - // Generic istream-based algorithm. - // lcast_streambuf_for_target::value is true. - template - bool operator>>(InputStreamable& output) { return shr_using_base_class(output); } - }; - } - - namespace detail - { - template - struct is_stdstring - { - BOOST_STATIC_CONSTANT(bool, value = false ); - }; - - template - struct is_stdstring< std::basic_string > - { - BOOST_STATIC_CONSTANT(bool, value = true ); - }; - - template - struct is_stdstring< boost::container::basic_string > - { - BOOST_STATIC_CONSTANT(bool, value = true ); - }; - - template - struct is_arithmetic_and_not_xchars - { - BOOST_STATIC_CONSTANT(bool, value = - ( - boost::type_traits::ice_and< - boost::is_arithmetic::value, - boost::is_arithmetic::value, - boost::type_traits::ice_not< - detail::is_char_or_wchar::value - >::value, - boost::type_traits::ice_not< - detail::is_char_or_wchar::value - >::value - >::value - ) - ); - }; - - /* - * is_xchar_to_xchar::value is true, when - * Target and Souce are the same char types, or when - * Target and Souce are char types of the same size. - */ - template - struct is_xchar_to_xchar - { - BOOST_STATIC_CONSTANT(bool, value = - ( - boost::type_traits::ice_or< - boost::type_traits::ice_and< - is_same::value, - is_char_or_wchar::value - >::value, - boost::type_traits::ice_and< - boost::type_traits::ice_eq< sizeof(char),sizeof(Target)>::value, - boost::type_traits::ice_eq< sizeof(char),sizeof(Source)>::value, - is_char_or_wchar::value, - is_char_or_wchar::value - >::value - >::value - ) - ); - }; - - template - struct is_char_array_to_stdstring - { - BOOST_STATIC_CONSTANT(bool, value = false ); - }; - - template - struct is_char_array_to_stdstring< std::basic_string, CharT* > - { - BOOST_STATIC_CONSTANT(bool, value = true ); - }; - - template - struct is_char_array_to_stdstring< std::basic_string, const CharT* > - { - BOOST_STATIC_CONSTANT(bool, value = true ); - }; - - template - struct is_char_array_to_stdstring< boost::container::basic_string, CharT* > - { - BOOST_STATIC_CONSTANT(bool, value = true ); - }; - - template - struct is_char_array_to_stdstring< boost::container::basic_string, const CharT* > - { - BOOST_STATIC_CONSTANT(bool, value = true ); - }; - -#if (defined _MSC_VER) -# pragma warning( push ) -# pragma warning( disable : 4701 ) // possible use of ... before initialization -# pragma warning( disable : 4702 ) // unreachable code -# pragma warning( disable : 4267 ) // conversion from 'size_t' to 'unsigned int' -#endif - template - struct lexical_cast_do_cast - { - static inline Target lexical_cast_impl(const Source& arg) - { - typedef lexical_cast_stream_traits stream_trait; - - typedef detail::lexical_stream_limited_src< - BOOST_DEDUCED_TYPENAME stream_trait::char_type, - BOOST_DEDUCED_TYPENAME stream_trait::traits, - stream_trait::requires_stringbuf - > interpreter_type; - - // Target type must be default constructible - Target result; - - BOOST_DEDUCED_TYPENAME stream_trait::char_type buf[stream_trait::len_t::value + 1]; - stream_trait::len_t::check_coverage(); - - interpreter_type interpreter(buf, buf + stream_trait::len_t::value + 1); - - // Disabling ADL, by directly specifying operators. - if(!(interpreter.operator <<(arg) && interpreter.operator >>(result))) - BOOST_LCAST_THROW_BAD_CAST(Source, Target); - - return result; - } - }; -#if (defined _MSC_VER) -# pragma warning( pop ) -#endif - - template - struct lexical_cast_copy - { - static inline const Source& lexical_cast_impl(const Source &arg) BOOST_NOEXCEPT - { - return arg; - } - }; - - template - struct detect_precision_loss - { - typedef boost::numeric::Trunc Rounder; - typedef Source source_type ; - - typedef BOOST_DEDUCED_TYPENAME mpl::if_< - boost::is_arithmetic, Source, Source const& - >::type argument_type ; - - static source_type nearbyint ( argument_type s ) - { - const source_type near_int = Rounder::nearbyint(s); - if (near_int) { - const source_type orig_div_round = s / near_int; - const source_type eps = std::numeric_limits::epsilon(); - - if ((orig_div_round > 1 ? orig_div_round - 1 : 1 - orig_div_round) > eps) - BOOST_LCAST_THROW_BAD_CAST(Source, Target); - } - - return s ; - } - - typedef typename Rounder::round_style round_style; - } ; - - template - struct nothrow_overflow_handler - { - void operator() ( boost::numeric::range_check_result r ) - { - if (r != boost::numeric::cInRange) - BOOST_LCAST_THROW_BAD_CAST(Source, Target); - } - } ; - - template - struct lexical_cast_dynamic_num_not_ignoring_minus - { - static inline Target lexical_cast_impl(const Source &arg) - { - return boost::numeric::converter< - Target, - Source, - boost::numeric::conversion_traits, - nothrow_overflow_handler, - detect_precision_loss - >::convert(arg); - } - }; - - template - struct lexical_cast_dynamic_num_ignoring_minus - { - static inline Target lexical_cast_impl(const Source &arg) - { - typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if_c< - boost::is_float::value, - boost::mpl::identity, - boost::make_unsigned - >::type usource_t; - - typedef boost::numeric::converter< - Target, - usource_t, - boost::numeric::conversion_traits, - nothrow_overflow_handler, - detect_precision_loss - > converter_t; - - return ( - arg < 0 ? static_cast(0u - converter_t::convert(0u - arg)) : converter_t::convert(arg) - ); - } - }; - - /* - * lexical_cast_dynamic_num follows the rules: - * 1) If Source can be converted to Target without precision loss and - * without overflows, then assign Source to Target and return - * - * 2) If Source is less than 0 and Target is an unsigned integer, - * then negate Source, check the requirements of rule 1) and if - * successful, assign static_casted Source to Target and return - * - * 3) Otherwise throw a bad_lexical_cast exception - * - * - * Rule 2) required because boost::lexical_cast has the behavior of - * stringstream, which uses the rules of scanf for conversions. And - * in the C99 standard for unsigned input value minus sign is - * optional, so if a negative number is read, no errors will arise - * and the result will be the two's complement. - */ - template - struct lexical_cast_dynamic_num - { - static inline Target lexical_cast_impl(const Source &arg) - { - typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< - boost::type_traits::ice_and< - boost::type_traits::ice_or< - boost::is_signed::value, - boost::is_float::value - >::value, - boost::type_traits::ice_not< - boost::is_same::value - >::value, - boost::type_traits::ice_not< - boost::is_same::value - >::value, - boost::is_unsigned::value - >::value, - lexical_cast_dynamic_num_ignoring_minus, - lexical_cast_dynamic_num_not_ignoring_minus - >::type caster_type; - - return caster_type::lexical_cast_impl(arg); - } - }; - } +#include +#include +namespace boost +{ template inline Target lexical_cast(const Source &arg) { - typedef BOOST_DEDUCED_TYPENAME boost::detail::array_to_pointer_decay::type src; - - typedef BOOST_DEDUCED_TYPENAME boost::type_traits::ice_or< - boost::detail::is_xchar_to_xchar::value, - boost::detail::is_char_array_to_stdstring::value, - boost::type_traits::ice_and< - boost::is_same::value, - boost::detail::is_stdstring::value - >::value - > shall_we_copy_t; - - typedef BOOST_DEDUCED_TYPENAME - boost::detail::is_arithmetic_and_not_xchars shall_we_copy_with_dynamic_check_t; + Target result; - typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< - shall_we_copy_t::value, - boost::detail::lexical_cast_copy, - BOOST_DEDUCED_TYPENAME boost::mpl::if_c< - shall_we_copy_with_dynamic_check_t::value, - boost::detail::lexical_cast_dynamic_num, - boost::detail::lexical_cast_do_cast - >::type - >::type caster_type; + if (!boost::conversion::detail::try_lexical_convert(arg, result)) { + boost::conversion::detail::throw_bad_cast(); + } - return caster_type::lexical_cast_impl(arg); + return result; } template inline Target lexical_cast(const char* chars, std::size_t count) - { + { return ::boost::lexical_cast( ::boost::iterator_range(chars, chars + count) ); } - template inline Target lexical_cast(const unsigned char* chars, std::size_t count) { - return ::boost::lexical_cast( + return ::boost::lexical_cast( ::boost::iterator_range(chars, chars + count) - ); - } + ); + } template inline Target lexical_cast(const signed char* chars, std::size_t count) @@ -2598,150 +99,6 @@ namespace boost { } // namespace boost -#else // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -namespace boost { - namespace detail - { - - // selectors for choosing stream character type - template - struct stream_char - { - typedef char type; - }; - -#ifndef BOOST_LCAST_NO_WCHAR_T -#ifndef BOOST_NO_INTRINSIC_WCHAR_T - template<> - struct stream_char - { - typedef wchar_t type; - }; -#endif - - template<> - struct stream_char - { - typedef wchar_t type; - }; - - template<> - struct stream_char - { - typedef wchar_t type; - }; - - template<> - struct stream_char - { - typedef wchar_t type; - }; -#endif - - // stream wrapper for handling lexical conversions - template - class lexical_stream - { - private: - typedef typename widest_char< - typename stream_char::type, - typename stream_char::type>::type char_type; - - typedef Traits traits_type; - - public: - lexical_stream(char_type* = 0, char_type* = 0) - { - stream.unsetf(std::ios::skipws); - lcast_set_precision(stream, static_cast(0), static_cast(0) ); - } - ~lexical_stream() - { - #if defined(BOOST_NO_STRINGSTREAM) - stream.freeze(false); - #endif - } - bool operator<<(const Source &input) - { - return !(stream << input).fail(); - } - template - bool operator>>(InputStreamable &output) - { - return !is_pointer::value && - stream >> output && - stream.get() == -#if defined(__GNUC__) && (__GNUC__<3) && defined(BOOST_NO_STD_WSTRING) -// GCC 2.9x lacks std::char_traits<>::eof(). -// We use BOOST_NO_STD_WSTRING to filter out STLport and libstdc++-v3 -// configurations, which do provide std::char_traits<>::eof(). - - EOF; -#else - traits_type::eof(); -#endif - } - - bool operator>>(std::string &output) - { - #if defined(BOOST_NO_STRINGSTREAM) - stream << '\0'; - #endif - stream.str().swap(output); - return true; - } - #ifndef BOOST_LCAST_NO_WCHAR_T - bool operator>>(std::wstring &output) - { - stream.str().swap(output); - return true; - } - #endif - - private: - #if defined(BOOST_NO_STRINGSTREAM) - std::strstream stream; - #elif defined(BOOST_NO_STD_LOCALE) - std::stringstream stream; - #else - std::basic_stringstream stream; - #endif - }; - } - - // call-by-value fallback version (deprecated) - - template - Target lexical_cast(Source arg) - { - typedef typename detail::widest_char< - BOOST_DEDUCED_TYPENAME detail::stream_char::type - , BOOST_DEDUCED_TYPENAME detail::stream_char::type - >::type char_type; - - typedef std::char_traits traits; - detail::lexical_stream interpreter; - Target result; - - if(!(interpreter << arg && interpreter >> result)) - BOOST_LCAST_THROW_BAD_CAST(Source, Target); - return result; - } - -} // namespace boost - -#endif - -// Copyright Kevlin Henney, 2000-2005. -// Copyright Alexander Nasonov, 2006-2010. -// Copyright Antony Polukhin, 2011-2013. -// -// 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) - -#undef BOOST_LCAST_THROW_BAD_CAST #undef BOOST_LCAST_NO_WCHAR_T #endif // BOOST_LEXICAL_CAST_INCLUDED diff --git a/boost/boost/lexical_cast/bad_lexical_cast.hpp b/boost/boost/lexical_cast/bad_lexical_cast.hpp new file mode 100644 index 0000000000..093121565e --- /dev/null +++ b/boost/boost/lexical_cast/bad_lexical_cast.hpp @@ -0,0 +1,101 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// 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) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_BAD_LEXICAL_CAST_HPP +#define BOOST_LEXICAL_CAST_BAD_LEXICAL_CAST_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#include +#include +#include + +namespace boost +{ + // exception used to indicate runtime lexical_cast failure + class BOOST_SYMBOL_VISIBLE bad_lexical_cast : + // workaround MSVC bug with std::bad_cast when _HAS_EXCEPTIONS == 0 +#if defined(BOOST_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS + public std::exception +#else + public std::bad_cast +#endif + +#if defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, < 0x560 ) + // under bcc32 5.5.1 bad_cast doesn't derive from exception + , public std::exception +#endif + + { + public: + bad_lexical_cast() BOOST_NOEXCEPT +#ifndef BOOST_NO_TYPEID + : source(&typeid(void)), target(&typeid(void)) +#endif + {} + + virtual const char *what() const BOOST_NOEXCEPT_OR_NOTHROW { + return "bad lexical cast: " + "source type value could not be interpreted as target"; + } + + virtual ~bad_lexical_cast() BOOST_NOEXCEPT_OR_NOTHROW + {} + +#ifndef BOOST_NO_TYPEID + bad_lexical_cast( + const std::type_info &source_type_arg, + const std::type_info &target_type_arg) BOOST_NOEXCEPT + : source(&source_type_arg), target(&target_type_arg) + {} + + const std::type_info &source_type() const BOOST_NOEXCEPT { + return *source; + } + + const std::type_info &target_type() const BOOST_NOEXCEPT { + return *target; + } + + private: + const std::type_info *source; + const std::type_info *target; +#endif + }; + + namespace conversion { namespace detail { +#ifdef BOOST_NO_TYPEID + template + inline void throw_bad_cast() { + boost::throw_exception(bad_lexical_cast()); + } +#else + template + inline void throw_bad_cast() { + boost::throw_exception(bad_lexical_cast(typeid(S), typeid(T))); + } +#endif + }} // namespace conversion::detail + + +} // namespace boost + +#endif // BOOST_LEXICAL_CAST_BAD_LEXICAL_CAST_HPP + diff --git a/boost/boost/lexical_cast/detail/converter_lexical.hpp b/boost/boost/lexical_cast/detail/converter_lexical.hpp new file mode 100644 index 0000000000..961dbde277 --- /dev/null +++ b/boost/boost/lexical_cast/detail/converter_lexical.hpp @@ -0,0 +1,495 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// 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) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_HPP +#define BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING) +#define BOOST_LCAST_NO_WCHAR_T +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#ifndef BOOST_NO_CXX11_HDR_ARRAY +#include +#endif + +#include +#include +#include + +#include + +namespace boost { + + namespace detail // normalize_single_byte_char + { + // Converts signed/unsigned char to char + template < class Char > + struct normalize_single_byte_char + { + typedef Char type; + }; + + template <> + struct normalize_single_byte_char< signed char > + { + typedef char type; + }; + + template <> + struct normalize_single_byte_char< unsigned char > + { + typedef char type; + }; + } + + namespace detail // deduce_character_type_later + { + // Helper type, meaning that stram character for T must be deduced + // at Stage 2 (See deduce_source_char and deduce_target_char) + template < class T > struct deduce_character_type_later {}; + } + + namespace detail // stream_char_common + { + // Selectors to choose stream character type (common for Source and Target) + // Returns one of char, wchar_t, char16_t, char32_t or deduce_character_type_later types + // Executed on Stage 1 (See deduce_source_char and deduce_target_char) + template < typename Type > + struct stream_char_common: public boost::mpl::if_c< + boost::detail::is_character< Type >::value, + Type, + boost::detail::deduce_character_type_later< Type > + > {}; + + template < typename Char > + struct stream_char_common< Char* >: public boost::mpl::if_c< + boost::detail::is_character< Char >::value, + Char, + boost::detail::deduce_character_type_later< Char* > + > {}; + + template < typename Char > + struct stream_char_common< const Char* >: public boost::mpl::if_c< + boost::detail::is_character< Char >::value, + Char, + boost::detail::deduce_character_type_later< const Char* > + > {}; + + template < typename Char > + struct stream_char_common< boost::iterator_range< Char* > >: public boost::mpl::if_c< + boost::detail::is_character< Char >::value, + Char, + boost::detail::deduce_character_type_later< boost::iterator_range< Char* > > + > {}; + + template < typename Char > + struct stream_char_common< boost::iterator_range< const Char* > >: public boost::mpl::if_c< + boost::detail::is_character< Char >::value, + Char, + boost::detail::deduce_character_type_later< boost::iterator_range< const Char* > > + > {}; + + template < class Char, class Traits, class Alloc > + struct stream_char_common< std::basic_string< Char, Traits, Alloc > > + { + typedef Char type; + }; + + template < class Char, class Traits, class Alloc > + struct stream_char_common< boost::container::basic_string< Char, Traits, Alloc > > + { + typedef Char type; + }; + + template < typename Char, std::size_t N > + struct stream_char_common< boost::array< Char, N > >: public boost::mpl::if_c< + boost::detail::is_character< Char >::value, + Char, + boost::detail::deduce_character_type_later< boost::array< Char, N > > + > {}; + + template < typename Char, std::size_t N > + struct stream_char_common< boost::array< const Char, N > >: public boost::mpl::if_c< + boost::detail::is_character< Char >::value, + Char, + boost::detail::deduce_character_type_later< boost::array< const Char, N > > + > {}; + +#ifndef BOOST_NO_CXX11_HDR_ARRAY + template < typename Char, std::size_t N > + struct stream_char_common< std::array >: public boost::mpl::if_c< + boost::detail::is_character< Char >::value, + Char, + boost::detail::deduce_character_type_later< std::array< Char, N > > + > {}; + + template < typename Char, std::size_t N > + struct stream_char_common< std::array< const Char, N > >: public boost::mpl::if_c< + boost::detail::is_character< Char >::value, + Char, + boost::detail::deduce_character_type_later< std::array< const Char, N > > + > {}; +#endif + +#ifdef BOOST_HAS_INT128 + template <> struct stream_char_common< boost::int128_type >: public boost::mpl::identity< char > {}; + template <> struct stream_char_common< boost::uint128_type >: public boost::mpl::identity< char > {}; +#endif + +#if !defined(BOOST_LCAST_NO_WCHAR_T) && defined(BOOST_NO_INTRINSIC_WCHAR_T) + template <> + struct stream_char_common< wchar_t > + { + typedef char type; + }; +#endif + } + + namespace detail // deduce_source_char_impl + { + // If type T is `deduce_character_type_later` type, then tries to deduce + // character type using boost::has_left_shift metafunction. + // Otherwise supplied type T is a character type, that must be normalized + // using normalize_single_byte_char. + // Executed at Stage 2 (See deduce_source_char and deduce_target_char) + template < class Char > + struct deduce_source_char_impl + { + typedef BOOST_DEDUCED_TYPENAME boost::detail::normalize_single_byte_char< Char >::type type; + }; + + template < class T > + struct deduce_source_char_impl< deduce_character_type_later< T > > + { + typedef boost::has_left_shift< std::basic_ostream< char >, T > result_t; + +#if defined(BOOST_LCAST_NO_WCHAR_T) + BOOST_STATIC_ASSERT_MSG((result_t::value), + "Source type is not std::ostream`able and std::wostream`s are not supported by your STL implementation"); + typedef char type; +#else + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + result_t::value, char, wchar_t + >::type type; + + BOOST_STATIC_ASSERT_MSG((result_t::value || boost::has_left_shift< std::basic_ostream< type >, T >::value), + "Source type is neither std::ostream`able nor std::wostream`able"); +#endif + }; + } + + namespace detail // deduce_target_char_impl + { + // If type T is `deduce_character_type_later` type, then tries to deduce + // character type using boost::has_right_shift metafunction. + // Otherwise supplied type T is a character type, that must be normalized + // using normalize_single_byte_char. + // Executed at Stage 2 (See deduce_source_char and deduce_target_char) + template < class Char > + struct deduce_target_char_impl + { + typedef BOOST_DEDUCED_TYPENAME normalize_single_byte_char< Char >::type type; + }; + + template < class T > + struct deduce_target_char_impl< deduce_character_type_later > + { + typedef boost::has_right_shift, T > result_t; + +#if defined(BOOST_LCAST_NO_WCHAR_T) + BOOST_STATIC_ASSERT_MSG((result_t::value), + "Target type is not std::istream`able and std::wistream`s are not supported by your STL implementation"); + typedef char type; +#else + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + result_t::value, char, wchar_t + >::type type; + + BOOST_STATIC_ASSERT_MSG((result_t::value || boost::has_right_shift, T >::value), + "Target type is neither std::istream`able nor std::wistream`able"); +#endif + }; + } + + namespace detail // deduce_target_char and deduce_source_char + { + // We deduce stream character types in two stages. + // + // Stage 1 is common for Target and Source. At Stage 1 we get + // non normalized character type (may contain unsigned/signed char) + // or deduce_character_type_later where T is the original type. + // Stage 1 is executed by stream_char_common + // + // At Stage 2 we normalize character types or try to deduce character + // type using metafunctions. + // Stage 2 is executed by deduce_target_char_impl and + // deduce_source_char_impl + // + // deduce_target_char and deduce_source_char functions combine + // both stages + + template < class T > + struct deduce_target_char + { + typedef BOOST_DEDUCED_TYPENAME stream_char_common< T >::type stage1_type; + typedef BOOST_DEDUCED_TYPENAME deduce_target_char_impl< stage1_type >::type stage2_type; + + typedef stage2_type type; + }; + + template < class T > + struct deduce_source_char + { + typedef BOOST_DEDUCED_TYPENAME stream_char_common< T >::type stage1_type; + typedef BOOST_DEDUCED_TYPENAME deduce_source_char_impl< stage1_type >::type stage2_type; + + typedef stage2_type type; + }; + } + + namespace detail // extract_char_traits template + { + // We are attempting to get char_traits<> from T + // template parameter. Otherwise we'll be using std::char_traits + template < class Char, class T > + struct extract_char_traits + : boost::false_type + { + typedef std::char_traits< Char > trait_t; + }; + + template < class Char, class Traits, class Alloc > + struct extract_char_traits< Char, std::basic_string< Char, Traits, Alloc > > + : boost::true_type + { + typedef Traits trait_t; + }; + + template < class Char, class Traits, class Alloc> + struct extract_char_traits< Char, boost::container::basic_string< Char, Traits, Alloc > > + : boost::true_type + { + typedef Traits trait_t; + }; + } + + namespace detail // array_to_pointer_decay + { + template + struct array_to_pointer_decay + { + typedef T type; + }; + + template + struct array_to_pointer_decay + { + typedef const T * type; + }; + } + + namespace detail // lcast_src_length + { + // Return max. length of string representation of Source; + template< class Source, // Source type of lexical_cast. + class Enable = void // helper type + > + struct lcast_src_length + { + BOOST_STATIC_CONSTANT(std::size_t, value = 1); + }; + + // Helper for integral types. + // Notes on length calculation: + // Max length for 32bit int with grouping "\1" and thousands_sep ',': + // "-2,1,4,7,4,8,3,6,4,7" + // ^ - is_signed + // ^ - 1 digit not counted by digits10 + // ^^^^^^^^^^^^^^^^^^ - digits10 * 2 + // + // Constant is_specialized is used instead of constant 1 + // to prevent buffer overflow in a rare case when + // doesn't add missing specialization for + // numeric_limits for some integral type T. + // When is_specialized is false, the whole expression is 0. + template + struct lcast_src_length< + Source, BOOST_DEDUCED_TYPENAME boost::enable_if >::type + > + { +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + BOOST_STATIC_CONSTANT(std::size_t, value = + std::numeric_limits::is_signed + + std::numeric_limits::is_specialized + /* == 1 */ + std::numeric_limits::digits10 * 2 + ); +#else + BOOST_STATIC_CONSTANT(std::size_t, value = 156); + BOOST_STATIC_ASSERT(sizeof(Source) * CHAR_BIT <= 256); +#endif + }; + +#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION + // Helper for floating point types. + // -1.23456789e-123456 + // ^ sign + // ^ leading digit + // ^ decimal point + // ^^^^^^^^ lcast_precision::value + // ^ "e" + // ^ exponent sign + // ^^^^^^ exponent (assumed 6 or less digits) + // sign + leading digit + decimal point + "e" + exponent sign == 5 + template + struct lcast_src_length< + Source, BOOST_DEDUCED_TYPENAME boost::enable_if >::type + > + { + BOOST_STATIC_ASSERT( + std::numeric_limits::max_exponent10 <= 999999L && + std::numeric_limits::min_exponent10 >= -999999L + ); + + BOOST_STATIC_CONSTANT(std::size_t, value = + 5 + lcast_precision::value + 6 + ); + }; +#endif // #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION + } + + namespace detail // lexical_cast_stream_traits + { + template + struct lexical_cast_stream_traits { + typedef BOOST_DEDUCED_TYPENAME boost::detail::array_to_pointer_decay::type src; + typedef BOOST_DEDUCED_TYPENAME boost::remove_cv::type no_cv_src; + + typedef boost::detail::deduce_source_char deduce_src_char_metafunc; + typedef BOOST_DEDUCED_TYPENAME deduce_src_char_metafunc::type src_char_t; + typedef BOOST_DEDUCED_TYPENAME boost::detail::deduce_target_char::type target_char_t; + + typedef BOOST_DEDUCED_TYPENAME boost::detail::widest_char< + target_char_t, src_char_t + >::type char_type; + +#if !defined(BOOST_NO_CXX11_CHAR16_T) && defined(BOOST_NO_CXX11_UNICODE_LITERALS) + BOOST_STATIC_ASSERT_MSG(( !boost::is_same::value + && !boost::is_same::value), + "Your compiler does not have full support for char16_t" ); +#endif +#if !defined(BOOST_NO_CXX11_CHAR32_T) && defined(BOOST_NO_CXX11_UNICODE_LITERALS) + BOOST_STATIC_ASSERT_MSG(( !boost::is_same::value + && !boost::is_same::value), + "Your compiler does not have full support for char32_t" ); +#endif + + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + boost::detail::extract_char_traits::value, + BOOST_DEDUCED_TYPENAME boost::detail::extract_char_traits, + BOOST_DEDUCED_TYPENAME boost::detail::extract_char_traits + >::type::trait_t traits; + + typedef boost::type_traits::ice_and< + boost::is_same::value, // source is not a wide character based type + boost::type_traits::ice_ne::value, // target type is based on wide character + boost::type_traits::ice_not< + boost::detail::is_character::value // single character widening is optimized + >::value // and does not requires stringbuffer + > is_string_widening_required_t; + + typedef boost::type_traits::ice_not< boost::type_traits::ice_or< + boost::is_integral::value, + boost::detail::is_character< + BOOST_DEDUCED_TYPENAME deduce_src_char_metafunc::stage1_type // if we did not get character type at stage1 + >::value // then we have no optimization for that type + >::value > is_source_input_not_optimized_t; + + // If we have an optimized conversion for + // Source, we do not need to construct stringbuf. + BOOST_STATIC_CONSTANT(bool, requires_stringbuf = + (boost::type_traits::ice_or< + is_string_widening_required_t::value, is_source_input_not_optimized_t::value + >::value) + ); + + typedef boost::detail::lcast_src_length len_t; + }; + } + + namespace detail + { + template + struct lexical_converter_impl + { + typedef lexical_cast_stream_traits stream_trait; + + typedef detail::lexical_istream_limited_src< + BOOST_DEDUCED_TYPENAME stream_trait::char_type, + BOOST_DEDUCED_TYPENAME stream_trait::traits, + stream_trait::requires_stringbuf, + stream_trait::len_t::value + 1 + > i_interpreter_type; + + typedef detail::lexical_ostream_limited_src< + BOOST_DEDUCED_TYPENAME stream_trait::char_type, + BOOST_DEDUCED_TYPENAME stream_trait::traits + > o_interpreter_type; + + static inline bool try_convert(const Source& arg, Target& result) { + i_interpreter_type i_interpreter; + + // Disabling ADL, by directly specifying operators. + if (!(i_interpreter.operator <<(arg))) + return false; + + o_interpreter_type out(i_interpreter.cbegin(), i_interpreter.cend()); + + // Disabling ADL, by directly specifying operators. + if(!(out.operator >>(result))) + return false; + + return true; + } + }; + } + +} // namespace boost + +#undef BOOST_LCAST_NO_WCHAR_T + +#endif // BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_HPP + diff --git a/boost/boost/lexical_cast/detail/converter_lexical_streams.hpp b/boost/boost/lexical_cast/detail/converter_lexical_streams.hpp new file mode 100644 index 0000000000..2d6617dadd --- /dev/null +++ b/boost/boost/lexical_cast/detail/converter_lexical_streams.hpp @@ -0,0 +1,788 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// 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) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_STREAMS_HPP +#define BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_STREAMS_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + + +#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING) +#define BOOST_LCAST_NO_WCHAR_T +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#ifndef BOOST_NO_STD_LOCALE +# include +#else +# ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE + // Getting error at this point means, that your STL library is old/lame/misconfigured. + // If nothing can be done with STL library, define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE, + // but beware: lexical_cast will understand only 'C' locale delimeters and thousands + // separators. +# error "Unable to use header. Define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE to force " +# error "boost::lexical_cast to use only 'C' locale during conversions." +# endif +#endif + +#ifdef BOOST_NO_STRINGSTREAM +#include +#else +#include +#endif + +#include +#include +#include + +#include + +#ifndef BOOST_NO_CXX11_HDR_ARRAY +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef BOOST_NO_CWCHAR +# include +#endif + +namespace boost { + + namespace detail // basic_unlockedbuf + { + // acts as a stream buffer which wraps around a pair of pointers + // and gives acces to internals + template + class basic_unlockedbuf : public basic_pointerbuf { + public: + typedef basic_pointerbuf base_type; + typedef BOOST_DEDUCED_TYPENAME base_type::streamsize streamsize; + +#ifndef BOOST_NO_USING_TEMPLATE + using base_type::pptr; + using base_type::pbase; + using base_type::setbuf; +#else + charT* pptr() const { return base_type::pptr(); } + charT* pbase() const { return base_type::pbase(); } + BufferType* setbuf(char_type* s, streamsize n) { return base_type::setbuf(s, n); } +#endif + }; + } + + namespace detail + { + struct do_not_construct_out_stream_t{}; + + template + struct out_stream_helper_trait { +#if defined(BOOST_NO_STRINGSTREAM) + typedef std::ostrstream out_stream_t; + typedef void buffer_t; +#elif defined(BOOST_NO_STD_LOCALE) + typedef std::ostringstream out_stream_t; + typedef basic_unlockedbuf buffer_t; +#else + typedef std::basic_ostringstream + out_stream_t; + typedef basic_unlockedbuf, CharT> + buffer_t; +#endif + }; + } + + namespace detail // optimized stream wrappers + { + template< class CharT // a result of widest_char transformation + , class Traits + , bool RequiresStringbuffer + , std::size_t CharacterBufferSize + > + class lexical_istream_limited_src: boost::noncopyable { + typedef BOOST_DEDUCED_TYPENAME out_stream_helper_trait::buffer_t + buffer_t; + + typedef BOOST_DEDUCED_TYPENAME out_stream_helper_trait::out_stream_t + out_stream_t; + + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + RequiresStringbuffer, + out_stream_t, + do_not_construct_out_stream_t + >::type deduced_out_stream_t; + + // A string representation of Source is written to `buffer`. + deduced_out_stream_t out_stream; + CharT buffer[CharacterBufferSize]; + + // After the `operator <<` finishes, `[start, finish)` is + // the range to output by `operator >>` + const CharT* start; + const CharT* finish; + + public: + lexical_istream_limited_src() BOOST_NOEXCEPT + : start(buffer) + , finish(buffer + CharacterBufferSize) + {} + + const CharT* cbegin() const BOOST_NOEXCEPT { + return start; + } + + const CharT* cend() const BOOST_NOEXCEPT { + return finish; + } + + private: + // Undefined: + lexical_istream_limited_src(lexical_istream_limited_src const&); + void operator=(lexical_istream_limited_src const&); + +/************************************ HELPER FUNCTIONS FOR OPERATORS << ( ... ) ********************************/ + bool shl_char(CharT ch) BOOST_NOEXCEPT { + Traits::assign(buffer[0], ch); + finish = start + 1; + return true; + } + +#ifndef BOOST_LCAST_NO_WCHAR_T + template + bool shl_char(T ch) { + BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)) , + "boost::lexical_cast does not support narrowing of char types." + "Use boost::locale instead" ); +#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE + std::locale loc; + CharT const w = BOOST_USE_FACET(std::ctype, loc).widen(ch); +#else + CharT const w = static_cast(ch); +#endif + Traits::assign(buffer[0], w); + finish = start + 1; + return true; + } +#endif + + bool shl_char_array(CharT const* str) BOOST_NOEXCEPT { + start = str; + finish = start + Traits::length(str); + return true; + } + + template + bool shl_char_array(T const* str) { + BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)), + "boost::lexical_cast does not support narrowing of char types." + "Use boost::locale instead" ); + return shl_input_streamable(str); + } + + bool shl_char_array_limited(CharT const* str, std::size_t max_size) BOOST_NOEXCEPT { + start = str; + finish = std::find(start, start + max_size, Traits::to_char_type(0)); + return true; + } + + template + bool shl_input_streamable(InputStreamable& input) { +#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE) + // If you have compilation error at this point, than your STL library + // does not support such conversions. Try updating it. + BOOST_STATIC_ASSERT((boost::is_same::value)); +#endif + +#ifndef BOOST_NO_EXCEPTIONS + out_stream.exceptions(std::ios::badbit); + try { +#endif + bool const result = !(out_stream << input).fail(); + const buffer_t* const p = static_cast( + static_cast*>(out_stream.rdbuf()) + ); + start = p->pbase(); + finish = p->pptr(); + return result; +#ifndef BOOST_NO_EXCEPTIONS + } catch (const ::std::ios_base::failure& /*f*/) { + return false; + } +#endif + } + + template + inline bool shl_unsigned(const T n) { + CharT* tmp_finish = buffer + CharacterBufferSize; + start = lcast_put_unsigned(n, tmp_finish).convert(); + finish = tmp_finish; + return true; + } + + template + inline bool shl_signed(const T n) { + CharT* tmp_finish = buffer + CharacterBufferSize; + typedef BOOST_DEDUCED_TYPENAME boost::make_unsigned::type utype; + CharT* tmp_start = lcast_put_unsigned(lcast_to_unsigned(n), tmp_finish).convert(); + if (n < 0) { + --tmp_start; + CharT const minus = lcast_char_constants::minus; + Traits::assign(*tmp_start, minus); + } + start = tmp_start; + finish = tmp_finish; + return true; + } + + template + bool shl_real_type(const T& val, SomeCharT* /*begin*/) { + lcast_set_precision(out_stream, &val); + return shl_input_streamable(val); + } + + bool shl_real_type(float val, char* begin) { + using namespace std; + const double val_as_double = val; + finish = start + +#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) + sprintf_s(begin, CharacterBufferSize, +#else + sprintf(begin, +#endif + "%.*g", static_cast(boost::detail::lcast_get_precision()), val_as_double); + return finish > start; + } + + bool shl_real_type(double val, char* begin) { + using namespace std; + finish = start + +#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) + sprintf_s(begin, CharacterBufferSize, +#else + sprintf(begin, +#endif + "%.*g", static_cast(boost::detail::lcast_get_precision()), val); + return finish > start; + } + +#ifndef __MINGW32__ + bool shl_real_type(long double val, char* begin) { + using namespace std; + finish = start + +#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) + sprintf_s(begin, CharacterBufferSize, +#else + sprintf(begin, +#endif + "%.*Lg", static_cast(boost::detail::lcast_get_precision()), val ); + return finish > start; + } +#endif + + +#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__) + bool shl_real_type(float val, wchar_t* begin) { + using namespace std; + const double val_as_double = val; + finish = start + swprintf(begin, CharacterBufferSize, + L"%.*g", + static_cast(boost::detail::lcast_get_precision()), + val_as_double ); + return finish > start; + } + + bool shl_real_type(double val, wchar_t* begin) { + using namespace std; + finish = start + swprintf(begin, CharacterBufferSize, + L"%.*g", static_cast(boost::detail::lcast_get_precision()), val ); + return finish > start; + } + + bool shl_real_type(long double val, wchar_t* begin) { + using namespace std; + finish = start + swprintf(begin, CharacterBufferSize, + L"%.*Lg", static_cast(boost::detail::lcast_get_precision()), val ); + return finish > start; + } +#endif + template + bool shl_real(T val) { + CharT* tmp_finish = buffer + CharacterBufferSize; + if (put_inf_nan(buffer, tmp_finish, val)) { + finish = tmp_finish; + return true; + } + + return shl_real_type(val, static_cast(buffer)); + } + +/************************************ OPERATORS << ( ... ) ********************************/ + public: + template + bool operator<<(std::basic_string const& str) BOOST_NOEXCEPT { + start = str.data(); + finish = start + str.length(); + return true; + } + + template + bool operator<<(boost::container::basic_string const& str) BOOST_NOEXCEPT { + start = str.data(); + finish = start + str.length(); + return true; + } + + bool operator<<(bool value) BOOST_NOEXCEPT { + CharT const czero = lcast_char_constants::zero; + Traits::assign(buffer[0], Traits::to_char_type(czero + value)); + finish = start + 1; + return true; + } + + template + BOOST_DEDUCED_TYPENAME boost::disable_if, bool>::type + operator<<(const iterator_range& rng) BOOST_NOEXCEPT { + return (*this) << iterator_range(rng.begin(), rng.end()); + } + + bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT { + start = rng.begin(); + finish = rng.end(); + return true; + } + + bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT { + return (*this) << iterator_range( + reinterpret_cast(rng.begin()), + reinterpret_cast(rng.end()) + ); + } + + bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT { + return (*this) << iterator_range( + reinterpret_cast(rng.begin()), + reinterpret_cast(rng.end()) + ); + } + + bool operator<<(char ch) { return shl_char(ch); } + bool operator<<(unsigned char ch) { return ((*this) << static_cast(ch)); } + bool operator<<(signed char ch) { return ((*this) << static_cast(ch)); } +#if !defined(BOOST_LCAST_NO_WCHAR_T) + bool operator<<(wchar_t const* str) { return shl_char_array(str); } + bool operator<<(wchar_t * str) { return shl_char_array(str); } +#ifndef BOOST_NO_INTRINSIC_WCHAR_T + bool operator<<(wchar_t ch) { return shl_char(ch); } +#endif +#endif +#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) + bool operator<<(char16_t ch) { return shl_char(ch); } + bool operator<<(char16_t * str) { return shl_char_array(str); } + bool operator<<(char16_t const * str) { return shl_char_array(str); } +#endif +#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) + bool operator<<(char32_t ch) { return shl_char(ch); } + bool operator<<(char32_t * str) { return shl_char_array(str); } + bool operator<<(char32_t const * str) { return shl_char_array(str); } +#endif + bool operator<<(unsigned char const* ch) { return ((*this) << reinterpret_cast(ch)); } + bool operator<<(unsigned char * ch) { return ((*this) << reinterpret_cast(ch)); } + bool operator<<(signed char const* ch) { return ((*this) << reinterpret_cast(ch)); } + bool operator<<(signed char * ch) { return ((*this) << reinterpret_cast(ch)); } + bool operator<<(char const* str) { return shl_char_array(str); } + bool operator<<(char* str) { return shl_char_array(str); } + bool operator<<(short n) { return shl_signed(n); } + bool operator<<(int n) { return shl_signed(n); } + bool operator<<(long n) { return shl_signed(n); } + bool operator<<(unsigned short n) { return shl_unsigned(n); } + bool operator<<(unsigned int n) { return shl_unsigned(n); } + bool operator<<(unsigned long n) { return shl_unsigned(n); } + +#if defined(BOOST_HAS_LONG_LONG) + bool operator<<(boost::ulong_long_type n) { return shl_unsigned(n); } + bool operator<<(boost::long_long_type n) { return shl_signed(n); } +#elif defined(BOOST_HAS_MS_INT64) + bool operator<<(unsigned __int64 n) { return shl_unsigned(n); } + bool operator<<( __int64 n) { return shl_signed(n); } +#endif + +#ifdef BOOST_HAS_INT128 + bool operator<<(const boost::uint128_type& n) { return shl_unsigned(n); } + bool operator<<(const boost::int128_type& n) { return shl_signed(n); } +#endif + bool operator<<(float val) { return shl_real(val); } + bool operator<<(double val) { return shl_real(val); } + bool operator<<(long double val) { +#ifndef __MINGW32__ + return shl_real(val); +#else + return shl_real(static_cast(val)); +#endif + } + + // Adding constness to characters. Constness does not change layout + template + BOOST_DEDUCED_TYPENAME boost::disable_if, bool>::type + operator<<(boost::array const& input) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG( + (sizeof(boost::array) == sizeof(boost::array)), + "boost::array and boost::array must have exactly the same layout." + ); + return ((*this) << reinterpret_cast const& >(input)); + } + + template + bool operator<<(boost::array const& input) BOOST_NOEXCEPT { + return shl_char_array_limited(input.begin(), N); + } + + template + bool operator<<(boost::array const& input) BOOST_NOEXCEPT { + return ((*this) << reinterpret_cast const& >(input)); + } + + template + bool operator<<(boost::array const& input) BOOST_NOEXCEPT { + return ((*this) << reinterpret_cast const& >(input)); + } + +#ifndef BOOST_NO_CXX11_HDR_ARRAY + // Making a Boost.Array from std::array + template + bool operator<<(std::array const& input) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG( + (sizeof(std::array) == sizeof(boost::array)), + "std::array and boost::array must have exactly the same layout. " + "Bug in implementation of std::array or boost::array." + ); + return ((*this) << reinterpret_cast const& >(input)); + } +#endif + template + bool operator<<(const InStreamable& input) { return shl_input_streamable(input); } + }; + + + template + class lexical_ostream_limited_src: boost::noncopyable { + //`[start, finish)` is the range to output by `operator >>` + const CharT* start; + const CharT* const finish; + + public: + lexical_ostream_limited_src(const CharT* begin, const CharT* end) BOOST_NOEXCEPT + : start(begin) + , finish(end) + {} + +/************************************ HELPER FUNCTIONS FOR OPERATORS >> ( ... ) ********************************/ + private: + template + bool shr_unsigned(Type& output) { + if (start == finish) return false; + CharT const minus = lcast_char_constants::minus; + CharT const plus = lcast_char_constants::plus; + bool const has_minus = Traits::eq(minus, *start); + + /* We won`t use `start' any more, so no need in decrementing it after */ + if (has_minus || Traits::eq(plus, *start)) { + ++start; + } + + bool const succeed = lcast_ret_unsigned(output, start, finish).convert(); + + if (has_minus) { + output = static_cast(0u - output); + } + + return succeed; + } + + template + bool shr_signed(Type& output) { + if (start == finish) return false; + CharT const minus = lcast_char_constants::minus; + CharT const plus = lcast_char_constants::plus; + typedef BOOST_DEDUCED_TYPENAME make_unsigned::type utype; + utype out_tmp = 0; + bool const has_minus = Traits::eq(minus, *start); + + /* We won`t use `start' any more, so no need in decrementing it after */ + if (has_minus || Traits::eq(plus, *start)) { + ++start; + } + + bool succeed = lcast_ret_unsigned(out_tmp, start, finish).convert(); + if (has_minus) { + utype const comp_val = (static_cast(1) << std::numeric_limits::digits); + succeed = succeed && out_tmp<=comp_val; + output = static_cast(0u - out_tmp); + } else { + utype const comp_val = static_cast((std::numeric_limits::max)()); + succeed = succeed && out_tmp<=comp_val; + output = static_cast(out_tmp); + } + return succeed; + } + + template + bool shr_using_base_class(InputStreamable& output) + { + BOOST_STATIC_ASSERT_MSG( + (!boost::is_pointer::value), + "boost::lexical_cast can not convert to pointers" + ); + +#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE) + BOOST_STATIC_ASSERT_MSG((boost::is_same::value), + "boost::lexical_cast can not convert, because your STL library does not " + "support such conversions. Try updating it." + ); +#endif + typedef BOOST_DEDUCED_TYPENAME out_stream_helper_trait::buffer_t + buffer_t; + +#if defined(BOOST_NO_STRINGSTREAM) + std::istrstream stream(start, finish - start); +#else + + buffer_t buf; + // Usually `istream` and `basic_istream` do not modify + // content of buffer; `buffer_t` assures that this is true + buf.setbuf(const_cast(start), finish - start); +#if defined(BOOST_NO_STD_LOCALE) + std::istream stream(&buf); +#else + std::basic_istream stream(&buf); +#endif // BOOST_NO_STD_LOCALE +#endif // BOOST_NO_STRINGSTREAM + +#ifndef BOOST_NO_EXCEPTIONS + stream.exceptions(std::ios::badbit); + try { +#endif + stream.unsetf(std::ios::skipws); + lcast_set_precision(stream, static_cast(0)); + + return (stream >> output) + && (stream.get() == Traits::eof()); + +#ifndef BOOST_NO_EXCEPTIONS + } catch (const ::std::ios_base::failure& /*f*/) { + return false; + } +#endif + } + + template + inline bool shr_xchar(T& output) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG(( sizeof(CharT) == sizeof(T) ), + "boost::lexical_cast does not support narrowing of character types." + "Use boost::locale instead" ); + bool const ok = (finish - start == 1); + if (ok) { + CharT out; + Traits::assign(out, *start); + output = static_cast(out); + } + return ok; + } + + template + bool shr_std_array(ArrayT& output) BOOST_NOEXCEPT { + using namespace std; + const std::size_t size = static_cast(finish - start); + if (size > N - 1) { // `-1` because we need to store \0 at the end + return false; + } + + memcpy(&output[0], start, size * sizeof(CharT)); + output[size] = Traits::to_char_type(0); + return true; + } + +/************************************ OPERATORS >> ( ... ) ********************************/ + public: + bool operator>>(unsigned short& output) { return shr_unsigned(output); } + bool operator>>(unsigned int& output) { return shr_unsigned(output); } + bool operator>>(unsigned long int& output) { return shr_unsigned(output); } + bool operator>>(short& output) { return shr_signed(output); } + bool operator>>(int& output) { return shr_signed(output); } + bool operator>>(long int& output) { return shr_signed(output); } +#if defined(BOOST_HAS_LONG_LONG) + bool operator>>(boost::ulong_long_type& output) { return shr_unsigned(output); } + bool operator>>(boost::long_long_type& output) { return shr_signed(output); } +#elif defined(BOOST_HAS_MS_INT64) + bool operator>>(unsigned __int64& output) { return shr_unsigned(output); } + bool operator>>(__int64& output) { return shr_signed(output); } +#endif + +#ifdef BOOST_HAS_INT128 + bool operator>>(boost::uint128_type& output) { return shr_unsigned(output); } + bool operator>>(boost::int128_type& output) { return shr_signed(output); } +#endif + + bool operator>>(char& output) { return shr_xchar(output); } + bool operator>>(unsigned char& output) { return shr_xchar(output); } + bool operator>>(signed char& output) { return shr_xchar(output); } +#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) + bool operator>>(wchar_t& output) { return shr_xchar(output); } +#endif +#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) + bool operator>>(char16_t& output) { return shr_xchar(output); } +#endif +#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) + bool operator>>(char32_t& output) { return shr_xchar(output); } +#endif + template + bool operator>>(std::basic_string& str) { + str.assign(start, finish); return true; + } + + template + bool operator>>(boost::container::basic_string& str) { + str.assign(start, finish); return true; + } + + template + bool operator>>(boost::array& output) BOOST_NOEXCEPT { + return shr_std_array(output); + } + + template + bool operator>>(boost::array& output) BOOST_NOEXCEPT { + return ((*this) >> reinterpret_cast& >(output)); + } + + template + bool operator>>(boost::array& output) BOOST_NOEXCEPT { + return ((*this) >> reinterpret_cast& >(output)); + } + +#ifndef BOOST_NO_CXX11_HDR_ARRAY + template + bool operator>>(std::array& output) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG( + (sizeof(boost::array) == sizeof(boost::array)), + "std::array and boost::array must have exactly the same layout." + ); + return ((*this) >> reinterpret_cast& >(output)); + } +#endif + + bool operator>>(bool& output) BOOST_NOEXCEPT { + output = false; // Suppress warning about uninitalized variable + + if (start == finish) return false; + CharT const zero = lcast_char_constants::zero; + CharT const plus = lcast_char_constants::plus; + CharT const minus = lcast_char_constants::minus; + + const CharT* const dec_finish = finish - 1; + output = Traits::eq(*dec_finish, zero + 1); + if (!output && !Traits::eq(*dec_finish, zero)) { + return false; // Does not ends on '0' or '1' + } + + if (start == dec_finish) return true; + + // We may have sign at the beginning + if (Traits::eq(plus, *start) || (Traits::eq(minus, *start) && !output)) { + ++ start; + } + + // Skipping zeros + while (start != dec_finish) { + if (!Traits::eq(zero, *start)) { + return false; // Not a zero => error + } + + ++ start; + } + + return true; + } + + private: + // Not optimised converter + template + bool float_types_converter_internal(T& output) { + if (parse_inf_nan(start, finish, output)) return true; + bool const return_value = shr_using_base_class(output); + + /* Some compilers and libraries successfully + * parse 'inf', 'INFINITY', '1.0E', '1.0E-'... + * We are trying to provide a unified behaviour, + * so we just forbid such conversions (as some + * of the most popular compilers/libraries do) + * */ + CharT const minus = lcast_char_constants::minus; + CharT const plus = lcast_char_constants::plus; + CharT const capital_e = lcast_char_constants::capital_e; + CharT const lowercase_e = lcast_char_constants::lowercase_e; + if ( return_value && + ( + Traits::eq(*(finish-1), lowercase_e) // 1.0e + || Traits::eq(*(finish-1), capital_e) // 1.0E + || Traits::eq(*(finish-1), minus) // 1.0e- or 1.0E- + || Traits::eq(*(finish-1), plus) // 1.0e+ or 1.0E+ + ) + ) return false; + + return return_value; + } + + public: + bool operator>>(float& output) { return float_types_converter_internal(output); } + bool operator>>(double& output) { return float_types_converter_internal(output); } + bool operator>>(long double& output) { return float_types_converter_internal(output); } + + // Generic istream-based algorithm. + // lcast_streambuf_for_target::value is true. + template + bool operator>>(InputStreamable& output) { + return shr_using_base_class(output); + } + }; + } +} // namespace boost + +#undef BOOST_LCAST_NO_WCHAR_T + +#endif // BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_HPP + diff --git a/boost/boost/lexical_cast/detail/converter_numeric.hpp b/boost/boost/lexical_cast/detail/converter_numeric.hpp new file mode 100644 index 0000000000..54f7a35ff4 --- /dev/null +++ b/boost/boost/lexical_cast/detail/converter_numeric.hpp @@ -0,0 +1,180 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// 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) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_DETAIL_CONVERTER_NUMERIC_HPP +#define BOOST_LEXICAL_CAST_DETAIL_CONVERTER_NUMERIC_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { namespace detail { + +template +struct detect_precision_loss +{ + typedef Source source_type; + typedef boost::numeric::Trunc Rounder; + typedef BOOST_DEDUCED_TYPENAME mpl::if_< + boost::is_arithmetic, Source, Source const& + >::type argument_type ; + + static inline source_type nearbyint(argument_type s, bool& is_ok) BOOST_NOEXCEPT { + const source_type near_int = Rounder::nearbyint(s); + if (near_int && is_ok) { + const source_type orig_div_round = s / near_int; + const source_type eps = std::numeric_limits::epsilon(); + + is_ok = !((orig_div_round > 1 ? orig_div_round - 1 : 1 - orig_div_round) > eps); + } + + return s; + } + + typedef typename Rounder::round_style round_style; +}; + +template +struct fake_precision_loss: public Base +{ + typedef Source source_type ; + typedef BOOST_DEDUCED_TYPENAME mpl::if_< + boost::is_arithmetic, Source, Source const& + >::type argument_type ; + + static inline source_type nearbyint(argument_type s, bool& /*is_ok*/) BOOST_NOEXCEPT { + return s; + } +}; + +struct nothrow_overflow_handler +{ + inline bool operator() ( boost::numeric::range_check_result r ) const BOOST_NOEXCEPT { + return (r == boost::numeric::cInRange); + } +}; + +template +inline bool noexcept_numeric_convert(const Source& arg, Target& result) BOOST_NOEXCEPT { + typedef boost::numeric::converter< + Target, + Source, + boost::numeric::conversion_traits, + nothrow_overflow_handler, + detect_precision_loss + > converter_orig_t; + + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + boost::is_base_of< detect_precision_loss, converter_orig_t >::value, + converter_orig_t, + fake_precision_loss + >::type converter_t; + + bool res = nothrow_overflow_handler()(converter_t::out_of_range(arg)); + result = converter_t::low_level_convert(converter_t::nearbyint(arg, res)); + return res; +} + +template +struct lexical_cast_dynamic_num_not_ignoring_minus +{ + static inline bool try_convert(const Source &arg, Target& result) BOOST_NOEXCEPT { + return noexcept_numeric_convert(arg, result); + } +}; + +template +struct lexical_cast_dynamic_num_ignoring_minus +{ + static inline bool try_convert(const Source &arg, Target& result) BOOST_NOEXCEPT { + typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if_c< + boost::is_float::value, + boost::mpl::identity, + boost::make_unsigned + >::type usource_t; + + if (arg < 0) { + const bool res = noexcept_numeric_convert(0u - arg, result); + result = static_cast(0u - result); + return res; + } else { + return noexcept_numeric_convert(arg, result); + } + } +}; + +/* + * lexical_cast_dynamic_num follows the rules: + * 1) If Source can be converted to Target without precision loss and + * without overflows, then assign Source to Target and return + * + * 2) If Source is less than 0 and Target is an unsigned integer, + * then negate Source, check the requirements of rule 1) and if + * successful, assign static_casted Source to Target and return + * + * 3) Otherwise throw a bad_lexical_cast exception + * + * + * Rule 2) required because boost::lexical_cast has the behavior of + * stringstream, which uses the rules of scanf for conversions. And + * in the C99 standard for unsigned input value minus sign is + * optional, so if a negative number is read, no errors will arise + * and the result will be the two's complement. + */ +template +struct dynamic_num_converter_impl +{ + static inline bool try_convert(const Source &arg, Target& result) BOOST_NOEXCEPT { + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + boost::type_traits::ice_and< + boost::is_unsigned::value, + boost::type_traits::ice_or< + boost::is_signed::value, + boost::is_float::value + >::value, + boost::type_traits::ice_not< + boost::is_same::value + >::value, + boost::type_traits::ice_not< + boost::is_same::value + >::value + >::value, + lexical_cast_dynamic_num_ignoring_minus, + lexical_cast_dynamic_num_not_ignoring_minus + >::type caster_type; + + return caster_type::try_convert(arg, result); + } +}; + +}} // namespace boost::detail + +#endif // BOOST_LEXICAL_CAST_DETAIL_CONVERTER_NUMERIC_HPP + diff --git a/boost/boost/lexical_cast/detail/inf_nan.hpp b/boost/boost/lexical_cast/detail/inf_nan.hpp new file mode 100644 index 0000000000..c10457ecd2 --- /dev/null +++ b/boost/boost/lexical_cast/detail/inf_nan.hpp @@ -0,0 +1,197 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// 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) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_DETAIL_INF_NAN_HPP +#define BOOST_LEXICAL_CAST_DETAIL_INF_NAN_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING) +#define BOOST_LCAST_NO_WCHAR_T +#endif + +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { + namespace detail + { + template + bool lc_iequal(const CharT* val, const CharT* lcase, const CharT* ucase, unsigned int len) BOOST_NOEXCEPT { + for( unsigned int i=0; i < len; ++i ) { + if ( val[i] != lcase[i] && val[i] != ucase[i] ) return false; + } + + return true; + } + + /* Returns true and sets the correct value if found NaN or Inf. */ + template + inline bool parse_inf_nan_impl(const CharT* begin, const CharT* end, T& value + , const CharT* lc_NAN, const CharT* lc_nan + , const CharT* lc_INFINITY, const CharT* lc_infinity + , const CharT opening_brace, const CharT closing_brace) BOOST_NOEXCEPT + { + using namespace std; + if (begin == end) return false; + const CharT minus = lcast_char_constants::minus; + const CharT plus = lcast_char_constants::plus; + const int inifinity_size = 8; // == sizeof("infinity") - 1 + + /* Parsing +/- */ + bool const has_minus = (*begin == minus); + if (has_minus || *begin == plus) { + ++ begin; + } + + if (end - begin < 3) return false; + if (lc_iequal(begin, lc_nan, lc_NAN, 3)) { + begin += 3; + if (end != begin) { + /* It is 'nan(...)' or some bad input*/ + + if (end - begin < 2) return false; // bad input + -- end; + if (*begin != opening_brace || *end != closing_brace) return false; // bad input + } + + if( !has_minus ) value = std::numeric_limits::quiet_NaN(); + else value = (boost::math::changesign) (std::numeric_limits::quiet_NaN()); + return true; + } else if ( + ( /* 'INF' or 'inf' */ + end - begin == 3 // 3 == sizeof('inf') - 1 + && lc_iequal(begin, lc_infinity, lc_INFINITY, 3) + ) + || + ( /* 'INFINITY' or 'infinity' */ + end - begin == inifinity_size + && lc_iequal(begin, lc_infinity, lc_INFINITY, inifinity_size) + ) + ) + { + if( !has_minus ) value = std::numeric_limits::infinity(); + else value = (boost::math::changesign) (std::numeric_limits::infinity()); + return true; + } + + return false; + } + + template + bool put_inf_nan_impl(CharT* begin, CharT*& end, const T& value + , const CharT* lc_nan + , const CharT* lc_infinity) BOOST_NOEXCEPT + { + using namespace std; + const CharT minus = lcast_char_constants::minus; + if ((boost::math::isnan)(value)) { + if ((boost::math::signbit)(value)) { + *begin = minus; + ++ begin; + } + + memcpy(begin, lc_nan, 3 * sizeof(CharT)); + end = begin + 3; + return true; + } else if ((boost::math::isinf)(value)) { + if ((boost::math::signbit)(value)) { + *begin = minus; + ++ begin; + } + + memcpy(begin, lc_infinity, 3 * sizeof(CharT)); + end = begin + 3; + return true; + } + + return false; + } + + +#ifndef BOOST_LCAST_NO_WCHAR_T + template + bool parse_inf_nan(const wchar_t* begin, const wchar_t* end, T& value) BOOST_NOEXCEPT { + return parse_inf_nan_impl(begin, end, value + , L"NAN", L"nan" + , L"INFINITY", L"infinity" + , L'(', L')'); + } + + template + bool put_inf_nan(wchar_t* begin, wchar_t*& end, const T& value) BOOST_NOEXCEPT { + return put_inf_nan_impl(begin, end, value, L"nan", L"infinity"); + } + +#endif +#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) + template + bool parse_inf_nan(const char16_t* begin, const char16_t* end, T& value) BOOST_NOEXCEPT { + return parse_inf_nan_impl(begin, end, value + , u"NAN", u"nan" + , u"INFINITY", u"infinity" + , u'(', u')'); + } + + template + bool put_inf_nan(char16_t* begin, char16_t*& end, const T& value) BOOST_NOEXCEPT { + return put_inf_nan_impl(begin, end, value, u"nan", u"infinity"); + } +#endif +#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) + template + bool parse_inf_nan(const char32_t* begin, const char32_t* end, T& value) BOOST_NOEXCEPT { + return parse_inf_nan_impl(begin, end, value + , U"NAN", U"nan" + , U"INFINITY", U"infinity" + , U'(', U')'); + } + + template + bool put_inf_nan(char32_t* begin, char32_t*& end, const T& value) BOOST_NOEXCEPT { + return put_inf_nan_impl(begin, end, value, U"nan", U"infinity"); + } +#endif + + template + bool parse_inf_nan(const CharT* begin, const CharT* end, T& value) BOOST_NOEXCEPT { + return parse_inf_nan_impl(begin, end, value + , "NAN", "nan" + , "INFINITY", "infinity" + , '(', ')'); + } + + template + bool put_inf_nan(CharT* begin, CharT*& end, const T& value) BOOST_NOEXCEPT { + return put_inf_nan_impl(begin, end, value, "nan", "infinity"); + } + } +} // namespace boost + +#undef BOOST_LCAST_NO_WCHAR_T + +#endif // BOOST_LEXICAL_CAST_DETAIL_INF_NAN_HPP + diff --git a/boost/boost/lexical_cast/detail/is_character.hpp b/boost/boost/lexical_cast/detail/is_character.hpp new file mode 100644 index 0000000000..e967f58525 --- /dev/null +++ b/boost/boost/lexical_cast/detail/is_character.hpp @@ -0,0 +1,57 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// 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) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_DETAIL_IS_CHARACTER_HPP +#define BOOST_LEXICAL_CAST_DETAIL_IS_CHARACTER_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#include + +namespace boost { + + namespace detail // is_character<...> + { + // returns true, if T is one of the character types + template < typename T > + struct is_character + { + typedef boost::type_traits::ice_or< + boost::is_same< T, char >::value, + #if !defined(BOOST_NO_STRINGSTREAM) && !defined(BOOST_NO_STD_WSTRING) + boost::is_same< T, wchar_t >::value, + #endif + #ifndef BOOST_NO_CXX11_CHAR16_T + boost::is_same< T, char16_t >::value, + #endif + #ifndef BOOST_NO_CXX11_CHAR32_T + boost::is_same< T, char32_t >::value, + #endif + boost::is_same< T, unsigned char >::value, + boost::is_same< T, signed char >::value + > result_type; + + BOOST_STATIC_CONSTANT(bool, value = (result_type::value) ); + }; + } +} + +#endif // BOOST_LEXICAL_CAST_DETAIL_IS_CHARACTER_HPP + diff --git a/boost/boost/lexical_cast/detail/lcast_char_constants.hpp b/boost/boost/lexical_cast/detail/lcast_char_constants.hpp new file mode 100644 index 0000000000..fd651ee3e9 --- /dev/null +++ b/boost/boost/lexical_cast/detail/lcast_char_constants.hpp @@ -0,0 +1,46 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// 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) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_DETAIL_LCAST_CHAR_CONSTANTS_HPP +#define BOOST_LEXICAL_CAST_DETAIL_LCAST_CHAR_CONSTANTS_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost +{ + namespace detail // '0', '-', '+', 'e', 'E' and '.' constants + { + template < typename Char > + struct lcast_char_constants { + // We check in tests assumption that static casted character is + // equal to correctly written C++ literal: U'0' == static_cast('0') + BOOST_STATIC_CONSTANT(Char, zero = static_cast('0')); + BOOST_STATIC_CONSTANT(Char, minus = static_cast('-')); + BOOST_STATIC_CONSTANT(Char, plus = static_cast('+')); + BOOST_STATIC_CONSTANT(Char, lowercase_e = static_cast('e')); + BOOST_STATIC_CONSTANT(Char, capital_e = static_cast('E')); + BOOST_STATIC_CONSTANT(Char, c_decimal_separator = static_cast('.')); + }; + } +} // namespace boost + + +#endif // BOOST_LEXICAL_CAST_DETAIL_LCAST_CHAR_CONSTANTS_HPP + diff --git a/boost/boost/lexical_cast/detail/lcast_unsigned_converters.hpp b/boost/boost/lexical_cast/detail/lcast_unsigned_converters.hpp new file mode 100644 index 0000000000..efe91ede9a --- /dev/null +++ b/boost/boost/lexical_cast/detail/lcast_unsigned_converters.hpp @@ -0,0 +1,295 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// 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) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_DETAIL_LCAST_UNSIGNED_CONVERTERS_HPP +#define BOOST_LEXICAL_CAST_DETAIL_LCAST_UNSIGNED_CONVERTERS_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#ifndef BOOST_NO_STD_LOCALE +# include +#else +# ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE + // Getting error at this point means, that your STL library is old/lame/misconfigured. + // If nothing can be done with STL library, define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE, + // but beware: lexical_cast will understand only 'C' locale delimeters and thousands + // separators. +# error "Unable to use header. Define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE to force " +# error "boost::lexical_cast to use only 'C' locale during conversions." +# endif +#endif + +#include +#include +#include +#include + +namespace boost +{ + namespace detail // lcast_to_unsigned + { + template + inline + BOOST_DEDUCED_TYPENAME boost::make_unsigned::type lcast_to_unsigned(const T value) BOOST_NOEXCEPT { + typedef BOOST_DEDUCED_TYPENAME boost::make_unsigned::type result_type; + return value < 0 + ? static_cast(0u - static_cast(value)) + : static_cast(value); + } + } + + namespace detail // lcast_put_unsigned + { + template + class lcast_put_unsigned: boost::noncopyable { + typedef BOOST_DEDUCED_TYPENAME Traits::int_type int_type; + BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + (sizeof(int_type) > sizeof(T)) + , int_type + , T + >::type m_value; + CharT* m_finish; + CharT const m_czero; + int_type const m_zero; + + public: + lcast_put_unsigned(const T n_param, CharT* finish) BOOST_NOEXCEPT + : m_value(n_param), m_finish(finish) + , m_czero(lcast_char_constants::zero), m_zero(Traits::to_int_type(m_czero)) + { +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + BOOST_STATIC_ASSERT(!std::numeric_limits::is_signed); +#endif + } + + CharT* convert() { +#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE + std::locale loc; + if (loc == std::locale::classic()) { + return main_convert_loop(); + } + + typedef std::numpunct numpunct; + numpunct const& np = BOOST_USE_FACET(numpunct, loc); + std::string const grouping = np.grouping(); + std::string::size_type const grouping_size = grouping.size(); + + if (!grouping_size || grouping[0] <= 0) { + return main_convert_loop(); + } + +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + // Check that ulimited group is unreachable: + BOOST_STATIC_ASSERT(std::numeric_limits::digits10 < CHAR_MAX); +#endif + CharT const thousands_sep = np.thousands_sep(); + std::string::size_type group = 0; // current group number + char last_grp_size = grouping[0]; + char left = last_grp_size; + + do { + if (left == 0) { + ++group; + if (group < grouping_size) { + char const grp_size = grouping[group]; + last_grp_size = (grp_size <= 0 ? static_cast(CHAR_MAX) : grp_size); + } + + left = last_grp_size; + --m_finish; + Traits::assign(*m_finish, thousands_sep); + } + + --left; + } while (main_convert_iteration()); + + return m_finish; +#else + return main_convert_loop(); +#endif + } + + private: + inline bool main_convert_iteration() BOOST_NOEXCEPT { + --m_finish; + int_type const digit = static_cast(m_value % 10U); + Traits::assign(*m_finish, Traits::to_char_type(m_zero + digit)); + m_value /= 10; + return !!m_value; // suppressing warnings + } + + inline CharT* main_convert_loop() BOOST_NOEXCEPT { + while (main_convert_iteration()); + return m_finish; + } + }; + } + + namespace detail // lcast_ret_unsigned + { + template + class lcast_ret_unsigned: boost::noncopyable { + bool m_multiplier_overflowed; + T m_multiplier; + T& m_value; + const CharT* const m_begin; + const CharT* m_end; + + public: + lcast_ret_unsigned(T& value, const CharT* const begin, const CharT* end) BOOST_NOEXCEPT + : m_multiplier_overflowed(false), m_multiplier(1), m_value(value), m_begin(begin), m_end(end) + { +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + BOOST_STATIC_ASSERT(!std::numeric_limits::is_signed); + + // GCC when used with flag -std=c++0x may not have std::numeric_limits + // specializations for __int128 and unsigned __int128 types. + // Try compilation with -std=gnu++0x or -std=gnu++11. + // + // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40856 + BOOST_STATIC_ASSERT_MSG(std::numeric_limits::is_specialized, + "std::numeric_limits are not specialized for integral type passed to boost::lexical_cast" + ); +#endif + } + + inline bool convert() { + CharT const czero = lcast_char_constants::zero; + --m_end; + m_value = static_cast(0); + + if (m_begin > m_end || *m_end < czero || *m_end >= czero + 10) + return false; + m_value = static_cast(*m_end - czero); + --m_end; + +#ifdef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE + return main_convert_loop(); +#else + std::locale loc; + if (loc == std::locale::classic()) { + return main_convert_loop(); + } + + typedef std::numpunct numpunct; + numpunct const& np = BOOST_USE_FACET(numpunct, loc); + std::string const& grouping = np.grouping(); + std::string::size_type const grouping_size = grouping.size(); + + /* According to Programming languages - C++ + * we MUST check for correct grouping + */ + if (!grouping_size || grouping[0] <= 0) { + return main_convert_loop(); + } + + unsigned char current_grouping = 0; + CharT const thousands_sep = np.thousands_sep(); + char remained = static_cast(grouping[current_grouping] - 1); + + for (;m_end >= m_begin; --m_end) + { + if (remained) { + if (!main_convert_iteration()) { + return false; + } + --remained; + } else { + if ( !Traits::eq(*m_end, thousands_sep) ) //|| begin == end ) return false; + { + /* + * According to Programming languages - C++ + * Digit grouping is checked. That is, the positions of discarded + * separators is examined for consistency with + * use_facet >(loc ).grouping() + * + * BUT what if there is no separators at all and grouping() + * is not empty? Well, we have no extraced separators, so we + * won`t check them for consistency. This will allow us to + * work with "C" locale from other locales + */ + return main_convert_loop(); + } else { + if (m_begin == m_end) return false; + if (current_grouping < grouping_size - 1) ++current_grouping; + remained = grouping[current_grouping]; + } + } + } /*for*/ + + return true; +#endif + } + + private: + // Iteration that does not care about grouping/separators and assumes that all + // input characters are digits + inline bool main_convert_iteration() BOOST_NOEXCEPT { + CharT const czero = lcast_char_constants::zero; + T const maxv = (std::numeric_limits::max)(); + + m_multiplier_overflowed = m_multiplier_overflowed || (maxv/10 < m_multiplier); + m_multiplier = static_cast(m_multiplier * 10); + + T const dig_value = static_cast(*m_end - czero); + T const new_sub_value = static_cast(m_multiplier * dig_value); + + // We must correctly handle situations like `000000000000000000000000000001`. + // So we take care of overflow only if `dig_value` is not '0'. + if (*m_end < czero || *m_end >= czero + 10 // checking for correct digit + || (dig_value && ( // checking for overflow of ... + m_multiplier_overflowed // ... multiplier + || static_cast(maxv / dig_value) < m_multiplier // ... subvalue + || static_cast(maxv - new_sub_value) < m_value // ... whole expression + )) + ) return false; + + m_value = static_cast(m_value + new_sub_value); + + return true; + } + + bool main_convert_loop() BOOST_NOEXCEPT { + for ( ; m_end >= m_begin; --m_end) { + if (!main_convert_iteration()) { + return false; + } + } + + return true; + } + }; + } +} // namespace boost + +#endif // BOOST_LEXICAL_CAST_DETAIL_LCAST_UNSIGNED_CONVERTERS_HPP + diff --git a/boost/boost/lexical_cast/detail/widest_char.hpp b/boost/boost/lexical_cast/detail/widest_char.hpp new file mode 100644 index 0000000000..013aaf119d --- /dev/null +++ b/boost/boost/lexical_cast/detail/widest_char.hpp @@ -0,0 +1,40 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// 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) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_DETAIL_WIDEST_CHAR_HPP +#define BOOST_LEXICAL_CAST_DETAIL_WIDEST_CHAR_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace detail { + + template + struct widest_char { + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + (sizeof(TargetChar) > sizeof(SourceChar)) + , TargetChar + , SourceChar + >::type type; + }; + +}} // namespace boost::detail + +#endif // BOOST_LEXICAL_CAST_DETAIL_WIDEST_CHAR_HPP + diff --git a/boost/boost/lexical_cast/try_lexical_convert.hpp b/boost/boost/lexical_cast/try_lexical_convert.hpp new file mode 100644 index 0000000000..a9e0a0aa2f --- /dev/null +++ b/boost/boost/lexical_cast/try_lexical_convert.hpp @@ -0,0 +1,198 @@ +// Copyright Kevlin Henney, 2000-2005. +// Copyright Alexander Nasonov, 2006-2010. +// Copyright Antony Polukhin, 2011-2014. +// +// 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) +// +// what: lexical_cast custom keyword cast +// who: contributed by Kevlin Henney, +// enhanced with contributions from Terje Slettebo, +// with additional fixes and suggestions from Gennaro Prota, +// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, +// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, +// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014 + +#ifndef BOOST_LEXICAL_CAST_TRY_LEXICAL_CONVERT_HPP +#define BOOST_LEXICAL_CAST_TRY_LEXICAL_CONVERT_HPP + +#include +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +namespace boost { + namespace detail + { + template + struct is_stdstring + : boost::false_type + {}; + + template + struct is_stdstring< std::basic_string > + : boost::true_type + {}; + + template + struct is_stdstring< boost::container::basic_string > + : boost::true_type + {}; + + template + struct is_arithmetic_and_not_xchars + { + BOOST_STATIC_CONSTANT(bool, value = ( + boost::type_traits::ice_and< + boost::type_traits::ice_not< + boost::detail::is_character::value + >::value, + boost::type_traits::ice_not< + boost::detail::is_character::value + >::value, + boost::is_arithmetic::value, + boost::is_arithmetic::value + >::value + )); + }; + + /* + * is_xchar_to_xchar::value is true, + * Target and Souce are char types of the same size 1 (char, signed char, unsigned char). + */ + template + struct is_xchar_to_xchar + { + BOOST_STATIC_CONSTANT(bool, value = ( + boost::type_traits::ice_and< + boost::type_traits::ice_eq::value, + boost::type_traits::ice_eq::value, + boost::detail::is_character::value, + boost::detail::is_character::value + >::value + )); + }; + + template + struct is_char_array_to_stdstring + : boost::false_type + {}; + + template + struct is_char_array_to_stdstring< std::basic_string, CharT* > + : boost::true_type + {}; + + template + struct is_char_array_to_stdstring< std::basic_string, const CharT* > + : boost::true_type + {}; + + template + struct is_char_array_to_stdstring< boost::container::basic_string, CharT* > + : boost::true_type + {}; + + template + struct is_char_array_to_stdstring< boost::container::basic_string, const CharT* > + : boost::true_type + {}; + + template + struct copy_converter_impl + { +// MSVC fail to forward an array (DevDiv#555157 "SILENT BAD CODEGEN triggered by perfect forwarding", +// fixed in 2013 RTM). +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && (!defined(BOOST_MSVC) || BOOST_MSVC >= 1800) + template + static inline bool try_convert(T&& arg, Target& result) { + result = static_cast(arg); // eqaul to `result = std::forward(arg);` + return true; + } +#else + static inline bool try_convert(const Source& arg, Target& result) { + result = arg; + return true; + } +#endif + }; + } + + namespace conversion { namespace detail { + + template + inline bool try_lexical_convert(const Source& arg, Target& result) + { + typedef BOOST_DEDUCED_TYPENAME boost::detail::array_to_pointer_decay::type src; + + typedef BOOST_DEDUCED_TYPENAME boost::type_traits::ice_or< + boost::detail::is_xchar_to_xchar::value, + boost::detail::is_char_array_to_stdstring::value, + boost::type_traits::ice_and< + boost::is_same::value, + boost::detail::is_stdstring::value + >::value, + boost::type_traits::ice_and< + boost::is_same::value, + boost::detail::is_character::value + >::value + > shall_we_copy_t; + + typedef boost::detail::is_arithmetic_and_not_xchars + shall_we_copy_with_dynamic_check_t; + + // We do evaluate second `if_` lazily to avoid unnecessary instantiations + // of `shall_we_copy_with_dynamic_check_t` and improve compilation times. + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + shall_we_copy_t::value, + boost::mpl::identity >, + boost::mpl::if_< + shall_we_copy_with_dynamic_check_t, + boost::detail::dynamic_num_converter_impl, + boost::detail::lexical_converter_impl + > + >::type caster_type_lazy; + + typedef BOOST_DEDUCED_TYPENAME caster_type_lazy::type caster_type; + + return caster_type::try_convert(arg, result); + } + + template + inline bool try_lexical_convert(const CharacterT* chars, std::size_t count, Target& result) + { + BOOST_STATIC_ASSERT_MSG( + boost::detail::is_character::value, + "This overload of try_lexical_convert is meant to be used only with arrays of characters." + ); + return ::boost::conversion::detail::try_lexical_convert( + ::boost::iterator_range(chars, chars + count), result + ); + } + + }} // namespace conversion::detail + + namespace conversion { + // ADL barrier + using ::boost::conversion::detail::try_lexical_convert; + } + +} // namespace boost + +#endif // BOOST_LEXICAL_CAST_TRY_LEXICAL_CONVERT_HPP + diff --git a/boost/boost/math/policies/policy.hpp b/boost/boost/math/policies/policy.hpp index 24334c7d04..71309fa116 100644 --- a/boost/boost/math/policies/policy.hpp +++ b/boost/boost/math/policies/policy.hpp @@ -94,8 +94,7 @@ namespace policies{ #define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200 #endif -#if !defined(__BORLANDC__) \ - && !(defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) +#if !defined(__BORLANDC__) #define BOOST_MATH_META_INT(type, name, Default)\ template struct name : public boost::mpl::int_{};\ namespace detail{\ @@ -816,7 +815,7 @@ struct precision #ifdef BOOST_MATH_USE_FLOAT128 template -struct precision<__float128, Policy> +struct precision { typedef mpl::int_<113> type; }; @@ -851,6 +850,11 @@ inline int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) typedef mpl::bool_< std::numeric_limits::is_specialized > tag_type; return detail::digits_imp(tag_type()); } +template +inline int digits_base10(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) +{ + return boost::math::policies::digits() * 301 / 1000L; +} template inline unsigned long get_max_series_iterations() diff --git a/boost/boost/math/special_functions/detail/fp_traits.hpp b/boost/boost/math/special_functions/detail/fp_traits.hpp index 50c034d303..09dc5169aa 100644 --- a/boost/boost/math/special_functions/detail/fp_traits.hpp +++ b/boost/boost/math/special_functions/detail/fp_traits.hpp @@ -351,6 +351,13 @@ struct fp_traits_non_native // the Intel extended double precision format (80 bits) and // the IEEE extended double precision format with 15 exponent bits (128 bits). +#elif defined(__GNUC__) && (LDBL_MANT_DIG == 106) + +// +// Define nothing here and fall though to generic_tag: +// We have GCC's "double double" in effect, and any attempt +// to handle it via bit-fiddling is pretty much doomed to fail... +// // long double (>64 bits), PowerPC --------------------------------------------- @@ -546,7 +553,10 @@ struct select_native && !defined(__DECCXX)\ && !defined(__osf__) \ && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)\ - && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY) + && !defined(__FAST_MATH__)\ + && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)\ + && !defined(BOOST_INTEL)\ + && !defined(sun) # define BOOST_MATH_USE_STD_FPCLASSIFY #endif diff --git a/boost/boost/math/special_functions/fpclassify.hpp b/boost/boost/math/special_functions/fpclassify.hpp index 75f57b03b8..8e75fae0f2 100644 --- a/boost/boost/math/special_functions/fpclassify.hpp +++ b/boost/boost/math/special_functions/fpclassify.hpp @@ -309,7 +309,7 @@ namespace detail { if(std::numeric_limits::is_specialized) return isfinite_impl(x, generic_tag()); #endif - (void)x; // warning supression. + (void)x; // warning suppression. return true; } @@ -348,7 +348,7 @@ inline bool (isfinite)(long double x) { //!< \brief return true if floating-point type t is finite. typedef detail::fp_traits::type traits; typedef traits::method method; - typedef boost::is_floating_point::type fp_tag; + //typedef boost::is_floating_point::type fp_tag; typedef long double value_type; return detail::isfinite_impl(static_cast(x), method()); } @@ -419,7 +419,7 @@ inline bool (isnormal)(long double x) { typedef detail::fp_traits::type traits; typedef traits::method method; - typedef boost::is_floating_point::type fp_tag; + //typedef boost::is_floating_point::type fp_tag; typedef long double value_type; return detail::isnormal_impl(static_cast(x), method()); } @@ -453,7 +453,7 @@ namespace detail { if(std::numeric_limits::is_specialized) return isinf_impl(x, generic_tag()); #endif - (void)x; // warning supression. + (void)x; // warning suppression. return false; } @@ -508,7 +508,7 @@ inline bool (isinf)(long double x) { typedef detail::fp_traits::type traits; typedef traits::method method; - typedef boost::is_floating_point::type fp_tag; + //typedef boost::is_floating_point::type fp_tag; typedef long double value_type; return detail::isinf_impl(static_cast(x), method()); } @@ -541,7 +541,7 @@ namespace detail { if(std::numeric_limits::is_specialized) return isnan_impl(x, generic_tag()); #endif - (void)x; // warning supression + (void)x; // warning suppression return false; } @@ -594,7 +594,7 @@ inline bool (isnan)(long double x) { //!< \brief return true if floating-point type t is NaN (Not A Number). typedef detail::fp_traits::type traits; typedef traits::method method; - typedef boost::is_floating_point::type fp_tag; + //typedef boost::is_floating_point::type fp_tag; return detail::isnan_impl(x, method()); } #endif diff --git a/boost/boost/math/special_functions/math_fwd.hpp b/boost/boost/math/special_functions/math_fwd.hpp index 9de38ec086..96f60726a6 100644 --- a/boost/boost/math/special_functions/math_fwd.hpp +++ b/boost/boost/math/special_functions/math_fwd.hpp @@ -27,6 +27,7 @@ #include // for argument promotion. #include #include +#include #include #define BOOST_NO_MACRO_EXPAND /**/ @@ -145,6 +146,12 @@ namespace boost typename tools::promote_args::type ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol); // derivative of incomplete beta + // Binomial: + template + T binomial_coefficient(unsigned n, unsigned k, const Policy& pol); + template + T binomial_coefficient(unsigned n, unsigned k); + // erf & erfc error functions. template // Error function. typename tools::promote_args::type erf(RT z); @@ -176,7 +183,7 @@ namespace boost legendre_p(int l, T x); template - typename tools::promote_args::type + typename boost::enable_if_c::value, typename tools::promote_args::type>::type legendre_p(int l, T x, const Policy& pol); template @@ -184,7 +191,7 @@ namespace boost legendre_q(unsigned l, T x); template - typename tools::promote_args::type + typename boost::enable_if_c::value, typename tools::promote_args::type>::type legendre_q(unsigned l, T x, const Policy& pol); template @@ -298,6 +305,14 @@ namespace boost typename tools::promote_args::type ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol); + template + typename tools::promote_args::type + ellint_rg(T1 x, T2 y, T3 z); + + template + typename tools::promote_args::type + ellint_rg(T1 x, T2 y, T3 z, const Policy& pol); + template typename tools::promote_args::type ellint_2(T k); @@ -316,6 +331,27 @@ namespace boost template typename tools::promote_args::type ellint_1(T1 k, T2 phi, const Policy& pol); + template + typename tools::promote_args::type ellint_d(T k); + + template + typename tools::promote_args::type ellint_d(T1 k, T2 phi); + + template + typename tools::promote_args::type ellint_d(T1 k, T2 phi, const Policy& pol); + + template + typename tools::promote_args::type jacobi_zeta(T1 k, T2 phi); + + template + typename tools::promote_args::type jacobi_zeta(T1 k, T2 phi, const Policy& pol); + + template + typename tools::promote_args::type heuman_lambda(T1 k, T2 phi); + + template + typename tools::promote_args::type heuman_lambda(T1 k, T2 phi, const Policy& pol); + namespace detail{ template @@ -463,6 +499,20 @@ namespace boost template typename tools::promote_args::type digamma(T x, const Policy&); + // trigamma: + template + typename tools::promote_args::type trigamma(T x); + + template + typename tools::promote_args::type trigamma(T x, const Policy&); + + // polygamma: + template + typename tools::promote_args::type polygamma(int n, T x); + + template + typename tools::promote_args::type polygamma(int n, T x, const Policy&); + // Hypotenuse function sqrt(x ^ 2 + y ^ 2). template typename tools::promote_args::type @@ -580,39 +630,63 @@ namespace boost // Bessel functions: template typename detail::bessel_traits::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol); + template + typename detail::bessel_traits::result_type cyl_bessel_j_prime(T1 v, T2 x, const Policy& pol); template typename detail::bessel_traits >::result_type cyl_bessel_j(T1 v, T2 x); + template + typename detail::bessel_traits >::result_type cyl_bessel_j_prime(T1 v, T2 x); template typename detail::bessel_traits::result_type sph_bessel(unsigned v, T x, const Policy& pol); + template + typename detail::bessel_traits::result_type sph_bessel_prime(unsigned v, T x, const Policy& pol); template typename detail::bessel_traits >::result_type sph_bessel(unsigned v, T x); + template + typename detail::bessel_traits >::result_type sph_bessel_prime(unsigned v, T x); template typename detail::bessel_traits::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol); + template + typename detail::bessel_traits::result_type cyl_bessel_i_prime(T1 v, T2 x, const Policy& pol); template typename detail::bessel_traits >::result_type cyl_bessel_i(T1 v, T2 x); + template + typename detail::bessel_traits >::result_type cyl_bessel_i_prime(T1 v, T2 x); template typename detail::bessel_traits::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol); + template + typename detail::bessel_traits::result_type cyl_bessel_k_prime(T1 v, T2 x, const Policy& pol); template typename detail::bessel_traits >::result_type cyl_bessel_k(T1 v, T2 x); + template + typename detail::bessel_traits >::result_type cyl_bessel_k_prime(T1 v, T2 x); template typename detail::bessel_traits::result_type cyl_neumann(T1 v, T2 x, const Policy& pol); + template + typename detail::bessel_traits::result_type cyl_neumann_prime(T1 v, T2 x, const Policy& pol); template typename detail::bessel_traits >::result_type cyl_neumann(T1 v, T2 x); + template + typename detail::bessel_traits >::result_type cyl_neumann_prime(T1 v, T2 x); template typename detail::bessel_traits::result_type sph_neumann(unsigned v, T x, const Policy& pol); + template + typename detail::bessel_traits::result_type sph_neumann_prime(unsigned v, T x, const Policy& pol); template typename detail::bessel_traits >::result_type sph_neumann(unsigned v, T x); + template + typename detail::bessel_traits >::result_type sph_neumann_prime(unsigned v, T x); template typename detail::bessel_traits::result_type cyl_bessel_j_zero(T v, int m, const Policy& pol); @@ -701,35 +775,35 @@ namespace boost typename tools::promote_args::type airy_bi_prime(T x); template - T airy_ai_zero(unsigned m); + T airy_ai_zero(int m); template - T airy_ai_zero(unsigned m, const Policy&); + T airy_ai_zero(int m, const Policy&); template OutputIterator airy_ai_zero( - unsigned start_index, + int start_index, unsigned number_of_zeros, OutputIterator out_it); template OutputIterator airy_ai_zero( - unsigned start_index, + int start_index, unsigned number_of_zeros, OutputIterator out_it, const Policy&); template - T airy_bi_zero(unsigned m); + T airy_bi_zero(int m); template - T airy_bi_zero(unsigned m, const Policy&); + T airy_bi_zero(int m, const Policy&); template OutputIterator airy_bi_zero( - unsigned start_index, + int start_index, unsigned number_of_zeros, OutputIterator out_it); template OutputIterator airy_bi_zero( - unsigned start_index, + int start_index, unsigned number_of_zeros, OutputIterator out_it, const Policy&); @@ -920,6 +994,35 @@ namespace boost template typename tools::promote_args::type float_advance(const T& val, int distance); + template + T unchecked_bernoulli_b2n(const std::size_t n); + template + T bernoulli_b2n(const int i, const Policy &pol); + template + T bernoulli_b2n(const int i); + template + OutputIterator bernoulli_b2n(const int start_index, + const unsigned number_of_bernoullis_b2n, + OutputIterator out_it, + const Policy& pol); + template + OutputIterator bernoulli_b2n(const int start_index, + const unsigned number_of_bernoullis_b2n, + OutputIterator out_it); + template + T tangent_t2n(const int i, const Policy &pol); + template + T tangent_t2n(const int i); + template + OutputIterator tangent_t2n(const int start_index, + const unsigned number_of_bernoullis_b2n, + OutputIterator out_it, + const Policy& pol); + template + OutputIterator tangent_t2n(const int start_index, + const unsigned number_of_bernoullis_b2n, + OutputIterator out_it); + } // namespace math } // namespace boost @@ -998,6 +1101,8 @@ namespace boost template \ inline typename boost::math::tools::promote_args::type \ ibeta_derivative(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta_derivative(a, b, x, Policy()); }\ +\ + template T binomial_coefficient(unsigned n, unsigned k){ return ::boost::math::binomial_coefficient(n, k, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type erf(RT z) { return ::boost::math::erf(z, Policy()); }\ @@ -1075,11 +1180,27 @@ namespace boost inline typename boost::math::tools::promote_args::type \ ellint_rj(T1 x, T2 y, T3 z, T4 p){ return boost::math::ellint_rj(x, y, z, p, Policy()); }\ \ + template \ + inline typename boost::math::tools::promote_args::type \ + ellint_rg(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rg(x, y, z, Policy()); }\ + \ template \ inline typename boost::math::tools::promote_args::type ellint_2(T k){ return boost::math::ellint_2(k, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type ellint_2(T1 k, T2 phi){ return boost::math::ellint_2(k, phi, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type ellint_d(T k){ return boost::math::ellint_d(k, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type ellint_d(T1 k, T2 phi){ return boost::math::ellint_d(k, phi, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type jacobi_zeta(T1 k, T2 phi){ return boost::math::jacobi_zeta(k, phi, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type heuman_lambda(T1 k, T2 phi){ return boost::math::heuman_lambda(k, phi, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type ellint_1(T k){ return boost::math::ellint_1(k, Policy()); }\ @@ -1152,6 +1273,12 @@ namespace boost template \ inline typename boost::math::tools::promote_args::type digamma(T x){ return boost::math::digamma(x, Policy()); }\ \ + template \ + inline typename boost::math::tools::promote_args::type trigamma(T x){ return boost::math::trigamma(x, Policy()); }\ +\ + template \ + inline typename boost::math::tools::promote_args::type polygamma(int n, T x){ return boost::math::polygamma(n, x, Policy()); }\ + \ template \ inline typename boost::math::tools::promote_args::type \ hypot(T1 x, T2 y){ return boost::math::hypot(x, y, Policy()); }\ @@ -1193,26 +1320,50 @@ namespace boost template \ inline typename boost::math::detail::bessel_traits::result_type cyl_bessel_j(T1 v, T2 x)\ { return boost::math::cyl_bessel_j(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type cyl_bessel_j_prime(T1 v, T2 x)\ + { return boost::math::cyl_bessel_j_prime(v, x, Policy()); }\ \ template \ inline typename boost::math::detail::bessel_traits::result_type sph_bessel(unsigned v, T x)\ { return boost::math::sph_bessel(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type sph_bessel_prime(unsigned v, T x)\ + { return boost::math::sph_bessel_prime(v, x, Policy()); }\ \ template \ inline typename boost::math::detail::bessel_traits::result_type \ cyl_bessel_i(T1 v, T2 x) { return boost::math::cyl_bessel_i(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type \ + cyl_bessel_i_prime(T1 v, T2 x) { return boost::math::cyl_bessel_i_prime(v, x, Policy()); }\ \ template \ inline typename boost::math::detail::bessel_traits::result_type \ cyl_bessel_k(T1 v, T2 x) { return boost::math::cyl_bessel_k(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type \ + cyl_bessel_k_prime(T1 v, T2 x) { return boost::math::cyl_bessel_k_prime(v, x, Policy()); }\ \ template \ inline typename boost::math::detail::bessel_traits::result_type \ cyl_neumann(T1 v, T2 x){ return boost::math::cyl_neumann(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type \ + cyl_neumann_prime(T1 v, T2 x){ return boost::math::cyl_neumann_prime(v, x, Policy()); }\ \ template \ inline typename boost::math::detail::bessel_traits::result_type \ sph_neumann(unsigned v, T x){ return boost::math::sph_neumann(v, x, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type \ + sph_neumann_prime(unsigned v, T x){ return boost::math::sph_neumann_prime(v, x, Policy()); }\ \ template \ inline typename boost::math::detail::bessel_traits::result_type cyl_bessel_j_zero(T v, int m)\ @@ -1398,6 +1549,20 @@ template \ OutputIterator airy_bi_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\ { return boost::math::airy_bi_zero(start_index, number_of_zeros, out_it, Policy()); }\ \ + template \ + T bernoulli_b2n(const int i)\ + { return boost::math::bernoulli_b2n(i, Policy()); }\ + template \ + OutputIterator bernoulli_b2n(int start_index, unsigned number_of_bernoullis_b2n, OutputIterator out_it)\ + { return boost::math::bernoulli_b2n(start_index, number_of_bernoullis_b2n, out_it, Policy()); }\ + \ + template \ + T tangent_t2n(const int i)\ + { return boost::math::tangent_t2n(i, Policy()); }\ + template \ + OutputIterator tangent_t2n(int start_index, unsigned number_of_bernoullis_b2n, OutputIterator out_it)\ + { return boost::math::tangent_t2n(start_index, number_of_bernoullis_b2n, out_it, Policy()); }\ + \ diff --git a/boost/boost/math/special_functions/sign.hpp b/boost/boost/math/special_functions/sign.hpp index 75fb01292a..3324c90a87 100644 --- a/boost/boost/math/special_functions/sign.hpp +++ b/boost/boost/math/special_functions/sign.hpp @@ -31,7 +31,10 @@ namespace detail { } #endif - template + // Generic versions first, note that these do not handle + // signed zero or NaN. + + template inline int signbit_impl(T x, generic_tag const&) { return x < 0; @@ -43,7 +46,25 @@ namespace detail { return x < 0; } - template +#if defined(__GNUC__) && (LDBL_MANT_DIG == 106) + // + // Special handling for GCC's "double double" type, + // in this case the sign is the same as the sign we + // get by casting to double, no overflow/underflow + // can occur since the exponents are the same magnitude + // for the two types: + // + inline int signbit_impl(long double x, generic_tag const&) + { + return (boost::math::signbit)(static_cast(x)); + } + inline int signbit_impl(long double x, generic_tag const&) + { + return (boost::math::signbit)(static_cast(x)); + } +#endif + + template inline int signbit_impl(T x, ieee_copy_all_bits_tag const&) { typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; @@ -65,6 +86,9 @@ namespace detail { } // Changesign + + // Generic versions first, note that these do not handle + // signed zero or NaN. template inline T (changesign_impl)(T x, generic_tag const&) @@ -77,7 +101,27 @@ namespace detail { { return -x; } - +#if defined(__GNUC__) && (LDBL_MANT_DIG == 106) + // + // Special handling for GCC's "double double" type, + // in this case we need to change the sign of both + // components of the "double double": + // + inline long double (changesign_impl)(long double x, generic_tag const&) + { + double* pd = reinterpret_cast(&x); + pd[0] = boost::math::changesign(pd[0]); + pd[1] = boost::math::changesign(pd[1]); + return x; + } + inline long double (changesign_impl)(long double x, generic_tag const&) + { + double* pd = reinterpret_cast(&x); + pd[0] = boost::math::changesign(pd[0]); + pd[1] = boost::math::changesign(pd[1]); + return x; + } +#endif template inline T changesign_impl(T x, ieee_copy_all_bits_tag const&) diff --git a/boost/boost/math/tools/config.hpp b/boost/boost/math/tools/config.hpp index 6dfb629b58..23cba0c9a9 100644 --- a/boost/boost/math/tools/config.hpp +++ b/boost/boost/math/tools/config.hpp @@ -13,6 +13,7 @@ #include #include // for boost::uintmax_t #include +#include #include // for min and max #include #include @@ -20,6 +21,9 @@ #if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) # include #endif +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +# include +#endif #include @@ -46,6 +50,10 @@ // are disabled for now. (JM 2012). # define BOOST_MATH_NO_REAL_CONCEPT_TESTS #endif +#ifdef sun +// Any use of __float128 in program startup code causes a segfault (tested JM 2015, Solaris 11). +# define BOOST_MATH_DISABLE_FLOAT128 +#endif #if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106)) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) // // Darwin's rather strange "double double" is rather hard to @@ -109,7 +117,7 @@ # define BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY #endif -#if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) +#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) # include "boost/type.hpp" # include "boost/non_type.hpp" @@ -143,12 +151,12 @@ # define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) -#endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +#endif // __SUNPRO_CC #if (defined(__SUNPRO_CC) || defined(__hppa) || defined(__GNUC__)) && !defined(BOOST_MATH_SMALL_CONSTANT) // Sun's compiler emits a hard error if a constant underflows, // as does aCC on PA-RISC, while gcc issues a large number of warnings: -# define BOOST_MATH_SMALL_CONSTANT(x) 0 +# define BOOST_MATH_SMALL_CONSTANT(x) 0.0 #else # define BOOST_MATH_SMALL_CONSTANT(x) x #endif @@ -210,13 +218,28 @@ // // Test whether to support __float128: // -#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__) +#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__) \ + && !defined(BOOST_MATH_DISABLE_FLOAT128) || defined(BOOST_MATH_USE_FLOAT128) // // Only enable this when the compiler really is GCC as clang and probably // intel too don't support __float128 yet :-( // +#ifndef BOOST_MATH_USE_FLOAT128 # define BOOST_MATH_USE_FLOAT128 #endif + +# if defined(BOOST_INTEL) && defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION >= 1310) && defined(__GNUC__) +# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) +# define BOOST_MATH_FLOAT128_TYPE __float128 +# endif +# elif defined(__GNUC__) +# define BOOST_MATH_FLOAT128_TYPE __float128 +# endif + +# ifndef BOOST_MATH_FLOAT128_TYPE +# define BOOST_MATH_FLOAT128_TYPE _Quad +# endif +#endif // // Check for WinCE with no iostream support: // @@ -283,9 +306,35 @@ void suppress_unused_variable_warning(const T&) { } +namespace detail{ + +template +struct is_integer_for_rounding +{ + static const bool value = boost::is_integral::value +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + || (std::numeric_limits::is_specialized && std::numeric_limits::is_integer) +#endif + ; +}; + +} + }} // namespace boost namespace math -#if ((defined(__linux__) && !defined(__UCLIBC__)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(BOOST_NO_FENV_H) +#ifdef __GLIBC_PREREQ +# if __GLIBC_PREREQ(2,14) +# define BOOST_MATH_HAVE_FIXED_GLIBC +# endif +#endif + +#if ((defined(__linux__) && !defined(__UCLIBC__) && !defined(BOOST_MATH_HAVE_FIXED_GLIBC)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(BOOST_NO_FENV_H) +// +// This code was introduced in response to this glibc bug: http://sourceware.org/bugzilla/show_bug.cgi?id=2445 +// Basically powl and expl can return garbage when the result is small and certain exception flags are set +// on entrance to these functions. This appears to have been fixed in Glibc 2.14 (May 2011). +// Much more information in this message thread: https://groups.google.com/forum/#!topic/boost-list/ZT99wtIFlb4 +// #include diff --git a/boost/boost/math/tools/user.hpp b/boost/boost/math/tools/user.hpp index c1bdaf7d87..08a7e53d9e 100644 --- a/boost/boost/math/tools/user.hpp +++ b/boost/boost/math/tools/user.hpp @@ -91,6 +91,14 @@ // Maximum root finding steps permitted: // // define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200 +// +// Enable use of __float128 in numeric constants: +// +// #define BOOST_MATH_USE_FLOAT128 +// +// Disable use of __float128 in numeric_constants even if the compiler looks to support it: +// +// #define BOOST_MATH_DISABLE_FLOAT128 #endif // BOOST_MATH_TOOLS_USER_HPP diff --git a/boost/boost/memory_order.hpp b/boost/boost/memory_order.hpp deleted file mode 100644 index 4945af623b..0000000000 --- a/boost/boost/memory_order.hpp +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef BOOST_MEMORY_ORDER_HPP_INCLUDED -#define BOOST_MEMORY_ORDER_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// boost/memory_order.hpp -// -// Defines enum boost::memory_order per the C++0x working draft -// -// Copyright (c) 2008, 2009 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) - - -namespace boost -{ - -// -// Enum values are chosen so that code that needs to insert -// a trailing fence for acquire semantics can use a single -// test such as: -// -// if( mo & memory_order_acquire ) { ...fence... } -// -// For leading fences one can use: -// -// if( mo & memory_order_release ) { ...fence... } -// -// Architectures such as Alpha that need a fence on consume -// can use: -// -// if( mo & ( memory_order_acquire | memory_order_consume ) ) { ...fence... } -// - -enum memory_order -{ - memory_order_relaxed = 0, - memory_order_acquire = 1, - memory_order_release = 2, - memory_order_acq_rel = 3, // acquire | release - memory_order_seq_cst = 7, // acq_rel | 4 - memory_order_consume = 8 -}; - -} // namespace boost - -#endif // #ifndef BOOST_MEMORY_ORDER_HPP_INCLUDED diff --git a/boost/boost/move/core.hpp b/boost/boost/move/core.hpp new file mode 100644 index 0000000000..408a7138fa --- /dev/null +++ b/boost/boost/move/core.hpp @@ -0,0 +1,452 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. +// 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 http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file +//! This header implements macros to define movable classes and +//! move-aware functions + +#ifndef BOOST_MOVE_CORE_HPP +#define BOOST_MOVE_CORE_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include +#include + +//boost_move_no_copy_constructor_or_assign typedef +//used to detect noncopyable types for other Boost libraries. +#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + #define BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE) \ + private:\ + TYPE(TYPE &);\ + TYPE& operator=(TYPE &);\ + public:\ + typedef int boost_move_no_copy_constructor_or_assign; \ + private:\ + // +#else + #define BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE) \ + public:\ + TYPE(TYPE const &) = delete;\ + TYPE& operator=(TYPE const &) = delete;\ + public:\ + typedef int boost_move_no_copy_constructor_or_assign; \ + private:\ + // +#endif //BOOST_NO_CXX11_DELETED_FUNCTIONS + +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #include + + //Move emulation rv breaks standard aliasing rules so add workarounds for some compilers + #if defined(__GNUC__) && (__GNUC__ >= 4) && \ + (\ + defined(BOOST_GCC) || \ + (defined(BOOST_INTEL) && (BOOST_INTEL_CXX_VERSION >= 1300)) \ + ) + #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS __attribute__((__may_alias__)) + #else + #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS + #endif + + namespace boost { + + ////////////////////////////////////////////////////////////////////////////// + // + // struct rv + // + ////////////////////////////////////////////////////////////////////////////// + template + class rv + : public ::boost::move_detail::if_c + < ::boost::move_detail::is_class::value + , T + , ::boost::move_detail::nat + >::type + { + rv(); + ~rv() throw(); + rv(rv const&); + void operator=(rv const&); + } BOOST_MOVE_ATTRIBUTE_MAY_ALIAS; + + + ////////////////////////////////////////////////////////////////////////////// + // + // is_rv + // + ////////////////////////////////////////////////////////////////////////////// + + namespace move_detail { + + template + struct is_rv + //Derive from integral constant because some Boost code assummes it has + //a "type" internal typedef + : integral_constant::value > + {}; + + } //namespace move_detail { + + ////////////////////////////////////////////////////////////////////////////// + // + // has_move_emulation_enabled + // + ////////////////////////////////////////////////////////////////////////////// + template + struct has_move_emulation_enabled + : ::boost::move_detail::has_move_emulation_enabled_impl + {}; + + } //namespace boost { + + #define BOOST_RV_REF(TYPE)\ + ::boost::rv< TYPE >& \ + // + + #define BOOST_RV_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\ + ::boost::rv< TYPE >& \ + // + + #define BOOST_RV_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\ + ::boost::rv< TYPE >& \ + // + + #define BOOST_RV_REF_BEG\ + ::boost::rv< \ + // + + #define BOOST_RV_REF_END\ + >& \ + // + + #define BOOST_FWD_REF(TYPE)\ + const TYPE & \ + // + + #define BOOST_COPY_ASSIGN_REF(TYPE)\ + const ::boost::rv< TYPE >& \ + // + + #define BOOST_COPY_ASSIGN_REF_BEG \ + const ::boost::rv< \ + // + + #define BOOST_COPY_ASSIGN_REF_END \ + >& \ + // + + #define BOOST_COPY_ASSIGN_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\ + const ::boost::rv< TYPE >& \ + // + + #define BOOST_COPY_ASSIGN_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\ + const ::boost::rv< TYPE >& \ + // + + #define BOOST_CATCH_CONST_RLVALUE(TYPE)\ + const ::boost::rv< TYPE >& \ + // + + namespace boost { + namespace move_detail { + + template + inline typename ::boost::move_detail::enable_if_c + < ::boost::move_detail::is_lvalue_reference::value || + !::boost::has_move_emulation_enabled::value + , T&>::type + move_return(T& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < !::boost::move_detail::is_lvalue_reference::value && + ::boost::has_move_emulation_enabled::value + , ::boost::rv&>::type + move_return(T& x) BOOST_NOEXCEPT + { + return *static_cast< ::boost::rv* >(::boost::move_detail::addressof(x)); + } + + template + inline typename ::boost::move_detail::enable_if_c + < !::boost::move_detail::is_lvalue_reference::value && + ::boost::has_move_emulation_enabled::value + , ::boost::rv&>::type + move_return(::boost::rv& x) BOOST_NOEXCEPT + { + return x; + } + + } //namespace move_detail { + } //namespace boost { + + #define BOOST_MOVE_RET(RET_TYPE, REF)\ + boost::move_detail::move_return< RET_TYPE >(REF) + // + + #define BOOST_MOVE_BASE(BASE_TYPE, ARG) \ + ::boost::move((BASE_TYPE&)(ARG)) + // + + ////////////////////////////////////////////////////////////////////////////// + // + // BOOST_MOVABLE_BUT_NOT_COPYABLE + // + ////////////////////////////////////////////////////////////////////////////// + #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\ + BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\ + public:\ + operator ::boost::rv&() \ + { return *static_cast< ::boost::rv* >(this); }\ + operator const ::boost::rv&() const \ + { return *static_cast* >(this); }\ + private:\ + // + + ////////////////////////////////////////////////////////////////////////////// + // + // BOOST_COPYABLE_AND_MOVABLE + // + ////////////////////////////////////////////////////////////////////////////// + + #define BOOST_COPYABLE_AND_MOVABLE(TYPE)\ + public:\ + TYPE& operator=(TYPE &t)\ + { this->operator=(static_cast &>(const_cast(t))); return *this;}\ + public:\ + operator ::boost::rv&() \ + { return *static_cast< ::boost::rv* >(this); }\ + operator const ::boost::rv&() const \ + { return *static_cast* >(this); }\ + private:\ + // + + #define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\ + public:\ + operator ::boost::rv&() \ + { return *static_cast< ::boost::rv* >(this); }\ + operator const ::boost::rv&() const \ + { return *static_cast* >(this); }\ + private:\ + // + + namespace boost{ + namespace move_detail{ + + template< class T> + struct forward_type + { typedef const T &type; }; + + template< class T> + struct forward_type< boost::rv > + { typedef T type; }; + + }} + +#else //BOOST_NO_CXX11_RVALUE_REFERENCES + + //! This macro marks a type as movable but not copyable, disabling copy construction + //! and assignment. The user will need to write a move constructor/assignment as explained + //! in the documentation to fully write a movable but not copyable class. + #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\ + BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\ + public:\ + typedef int boost_move_emulation_t;\ + // + + //! This macro marks a type as copyable and movable. + //! The user will need to write a move constructor/assignment and a copy assignment + //! as explained in the documentation to fully write a copyable and movable class. + #define BOOST_COPYABLE_AND_MOVABLE(TYPE)\ + // + + #if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + #define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\ + // + #endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + namespace boost { + + //!This trait yields to a compile-time true boolean if T was marked as + //!BOOST_MOVABLE_BUT_NOT_COPYABLE or BOOST_COPYABLE_AND_MOVABLE and + //!rvalue references are not available on the platform. False otherwise. + template + struct has_move_emulation_enabled + { + static const bool value = false; + }; + + } //namespace boost{ + + //!This macro is used to achieve portable syntax in move + //!constructors and assignments for classes marked as + //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE + #define BOOST_RV_REF(TYPE)\ + TYPE && \ + // + + //!This macro is used to achieve portable syntax in move + //!constructors and assignments for template classes marked as + //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE. + //!As macros have problems with comma-separated template arguments, + //!the template argument must be preceded with BOOST_RV_REF_BEG + //!and ended with BOOST_RV_REF_END + #define BOOST_RV_REF_BEG\ + \ + // + + //!This macro is used to achieve portable syntax in move + //!constructors and assignments for template classes marked as + //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE. + //!As macros have problems with comma-separated template arguments, + //!the template argument must be preceded with BOOST_RV_REF_BEG + //!and ended with BOOST_RV_REF_END + #define BOOST_RV_REF_END\ + && \ + + //!This macro is used to achieve portable syntax in copy + //!assignment for classes marked as BOOST_COPYABLE_AND_MOVABLE. + #define BOOST_COPY_ASSIGN_REF(TYPE)\ + const TYPE & \ + // + + //! This macro is used to implement portable perfect forwarding + //! as explained in the documentation. + #define BOOST_FWD_REF(TYPE)\ + TYPE && \ + // + + #if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #define BOOST_RV_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\ + TYPE && \ + // + + #define BOOST_RV_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\ + TYPE && \ + // + + #define BOOST_COPY_ASSIGN_REF_BEG \ + const \ + // + + #define BOOST_COPY_ASSIGN_REF_END \ + & \ + // + + #define BOOST_COPY_ASSIGN_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\ + const TYPE & \ + // + + #define BOOST_COPY_ASSIGN_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\ + const TYPE& \ + // + + #define BOOST_CATCH_CONST_RLVALUE(TYPE)\ + const TYPE & \ + // + + #endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #if !defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED) + + //!This macro is used to achieve portable move return semantics. + //!The C++11 Standard allows implicit move returns when the object to be returned + //!is designated by a lvalue and: + //! - The criteria for elision of a copy operation are met OR + //! - The criteria would be met save for the fact that the source object is a function parameter + //! + //!For C++11 conforming compilers this macros only yields to REF: + //! return BOOST_MOVE_RET(RET_TYPE, REF); -> return REF; + //! + //!For compilers without rvalue references + //!this macro does an explicit move if the move emulation is activated + //!and the return type (RET_TYPE) is not a reference. + //! + //!For non-conforming compilers with rvalue references like Visual 2010 & 2012, + //!an explicit move is performed if RET_TYPE is not a reference. + //! + //! Caution: When using this macro in non-conforming or C++03 + //!compilers, a move will be performed even if the C++11 standard does not allow it + //!(e.g. returning a static variable). The user is responsible for using this macro + //!only to return local objects that met C++11 criteria. + #define BOOST_MOVE_RET(RET_TYPE, REF)\ + REF + // + + #else //!defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #include + + namespace boost { + namespace move_detail { + + template + inline typename ::boost::move_detail::enable_if_c + < ::boost::move_detail::is_lvalue_reference::value + , T&>::type + move_return(T& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < !::boost::move_detail::is_lvalue_reference::value + , Ret && >::type + move_return(T&& t) BOOST_NOEXCEPT + { + return static_cast< Ret&& >(t); + } + + } //namespace move_detail { + } //namespace boost { + + #define BOOST_MOVE_RET(RET_TYPE, REF)\ + boost::move_detail::move_return< RET_TYPE >(REF) + // + + #endif //!defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED) + + //!This macro is used to achieve portable optimal move constructors. + //! + //!When implementing the move constructor, in C++03 compilers the moved-from argument must be + //!cast to the base type before calling `::boost::move()` due to rvalue reference limitations. + //! + //!In C++11 compilers the cast from a rvalue reference of a derived type to a rvalue reference of + //!a base type is implicit. + #define BOOST_MOVE_BASE(BASE_TYPE, ARG) \ + ::boost::move((BASE_TYPE&)(ARG)) + // + + namespace boost { + namespace move_detail { + + template< class T> struct forward_type { typedef T type; }; + + }} + +#endif //BOOST_NO_CXX11_RVALUE_REFERENCES + +#include + +#endif //#ifndef BOOST_MOVE_CORE_HPP diff --git a/boost/boost/move/detail/config_begin.hpp b/boost/boost/move/detail/config_begin.hpp new file mode 100644 index 0000000000..342390b816 --- /dev/null +++ b/boost/boost/move/detail/config_begin.hpp @@ -0,0 +1,19 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. 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 http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_CONFIG_HPP +#include +#endif + +#ifdef BOOST_MSVC +# pragma warning (push) +# pragma warning (disable : 4324) // structure was padded due to __declspec(align()) +# pragma warning (disable : 4675) // "function": resolved overload was found by argument-dependent lookup +# pragma warning (disable : 4996) // "function": was declared deprecated (_CRT_SECURE_NO_DEPRECATE/_SCL_SECURE_NO_WARNINGS) +#endif diff --git a/boost/boost/move/detail/config_end.hpp b/boost/boost/move/detail/config_end.hpp new file mode 100644 index 0000000000..71a99e93c9 --- /dev/null +++ b/boost/boost/move/detail/config_end.hpp @@ -0,0 +1,12 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. 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 http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// +#if defined BOOST_MSVC +# pragma warning (pop) +#endif diff --git a/boost/boost/move/detail/meta_utils.hpp b/boost/boost/move/detail/meta_utils.hpp new file mode 100644 index 0000000000..682c89cfe8 --- /dev/null +++ b/boost/boost/move/detail/meta_utils.hpp @@ -0,0 +1,367 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2015. +// 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 http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file + +#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP +#define BOOST_MOVE_DETAIL_META_UTILS_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif +#include +#include //for std::size_t + +//Small meta-typetraits to support move + +namespace boost { + +//Forward declare boost::rv +template class rv; + +namespace move_detail { + +////////////////////////////////////// +// nat +////////////////////////////////////// +struct nat{}; + +////////////////////////////////////// +// natify +////////////////////////////////////// +template struct natify{}; + +////////////////////////////////////// +// remove_reference +////////////////////////////////////// +template +struct remove_reference +{ + typedef T type; +}; + +template +struct remove_reference +{ + typedef T type; +}; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template +struct remove_reference +{ + typedef T type; +}; + +#else + +template +struct remove_reference< rv > +{ + typedef T type; +}; + +template +struct remove_reference< rv &> +{ + typedef T type; +}; + +template +struct remove_reference< const rv &> +{ + typedef T type; +}; + + +#endif + +////////////////////////////////////// +// add_const +////////////////////////////////////// +template +struct add_const +{ + typedef const T type; +}; + +template +struct add_const +{ + typedef const T& type; +}; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template +struct add_const +{ + typedef T&& type; +}; + +#endif + +////////////////////////////////////// +// add_lvalue_reference +////////////////////////////////////// +template +struct add_lvalue_reference +{ typedef T& type; }; + +template struct add_lvalue_reference { typedef T& type; }; +template<> struct add_lvalue_reference { typedef void type; }; +template<> struct add_lvalue_reference { typedef const void type; }; +template<> struct add_lvalue_reference { typedef volatile void type; }; +template<> struct add_lvalue_reference{ typedef const volatile void type; }; + +template +struct add_const_lvalue_reference +{ + typedef typename remove_reference::type t_unreferenced; + typedef typename add_const::type t_unreferenced_const; + typedef typename add_lvalue_reference + ::type type; +}; + +////////////////////////////////////// +// is_lvalue_reference +////////////////////////////////////// +template +struct is_lvalue_reference +{ + static const bool value = false; +}; + +template +struct is_lvalue_reference +{ + static const bool value = true; +}; + +////////////////////////////////////// +// is_class_or_union +////////////////////////////////////// +template +struct is_class_or_union +{ + struct twochar { char dummy[2]; }; + template + static char is_class_or_union_tester(void(U::*)(void)); + template + static twochar is_class_or_union_tester(...); + static const bool value = sizeof(is_class_or_union_tester(0)) == sizeof(char); +}; + +////////////////////////////////////// +// addressof +////////////////////////////////////// +template +struct addr_impl_ref +{ + T & v_; + inline addr_impl_ref( T & v ): v_( v ) {} + inline operator T& () const { return v_; } + + private: + addr_impl_ref & operator=(const addr_impl_ref &); +}; + +template +struct addressof_impl +{ + static inline T * f( T & v, long ) + { + return reinterpret_cast( + &const_cast(reinterpret_cast(v))); + } + + static inline T * f( T * v, int ) + { return v; } +}; + +template +inline T * addressof( T & v ) +{ + return ::boost::move_detail::addressof_impl::f + ( ::boost::move_detail::addr_impl_ref( v ), 0 ); +} + +////////////////////////////////////// +// has_pointer_type +////////////////////////////////////// +template +struct has_pointer_type +{ + struct two { char c[2]; }; + template static two test(...); + template static char test(typename U::pointer* = 0); + static const bool value = sizeof(test(0)) == 1; +}; + +////////////////////////////////////// +// is_convertible +////////////////////////////////////// +#if defined(_MSC_VER) && (_MSC_VER >= 1400) + +//use intrinsic since in MSVC +//overaligned types can't go through ellipsis +template +struct is_convertible +{ + static const bool value = __is_convertible_to(T, U); +}; + +#else + +template +class is_convertible +{ + typedef typename add_lvalue_reference::type t_reference; + typedef char true_t; + class false_t { char dummy[2]; }; + static false_t dispatch(...); + static true_t dispatch(U); + static t_reference trigger(); + public: + static const bool value = sizeof(dispatch(trigger())) == sizeof(true_t); +}; + +#endif + +////////////////////////////////////////////////////////////////////////////// +// +// has_move_emulation_enabled_impl +// +////////////////////////////////////////////////////////////////////////////// +template +struct has_move_emulation_enabled_impl + : is_convertible< T, ::boost::rv& > +{}; + +template +struct has_move_emulation_enabled_impl +{ static const bool value = false; }; + +template +struct has_move_emulation_enabled_impl< ::boost::rv > +{ static const bool value = false; }; + +////////////////////////////////////////////////////////////////////////////// +// +// is_rv_impl +// +////////////////////////////////////////////////////////////////////////////// + +template +struct is_rv_impl +{ static const bool value = false; }; + +template +struct is_rv_impl< rv > +{ static const bool value = true; }; + +template +struct is_rv_impl< const rv > +{ static const bool value = true; }; + +// Code from Jeffrey Lee Hellrung, many thanks + +template< class T > +struct is_rvalue_reference +{ static const bool value = false; }; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template< class T > +struct is_rvalue_reference< T&& > +{ static const bool value = true; }; + +#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template< class T > +struct is_rvalue_reference< boost::rv& > +{ static const bool value = true; }; + +template< class T > +struct is_rvalue_reference< const boost::rv& > +{ static const bool value = true; }; + +#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template< class T > +struct add_rvalue_reference +{ typedef T&& type; }; + +#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +namespace detail_add_rvalue_reference +{ + template< class T + , bool emulation = has_move_emulation_enabled_impl::value + , bool rv = is_rv_impl::value > + struct add_rvalue_reference_impl { typedef T type; }; + + template< class T, bool emulation> + struct add_rvalue_reference_impl< T, emulation, true > { typedef T & type; }; + + template< class T, bool rv > + struct add_rvalue_reference_impl< T, true, rv > { typedef ::boost::rv& type; }; +} // namespace detail_add_rvalue_reference + +template< class T > +struct add_rvalue_reference + : detail_add_rvalue_reference::add_rvalue_reference_impl +{ }; + +template< class T > +struct add_rvalue_reference +{ typedef T & type; }; + +#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +template< class T > struct remove_rvalue_reference { typedef T type; }; + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template< class T > struct remove_rvalue_reference< T&& > { typedef T type; }; +#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template< class T > struct remove_rvalue_reference< rv > { typedef T type; }; + template< class T > struct remove_rvalue_reference< const rv > { typedef T type; }; + template< class T > struct remove_rvalue_reference< volatile rv > { typedef T type; }; + template< class T > struct remove_rvalue_reference< const volatile rv > { typedef T type; }; + template< class T > struct remove_rvalue_reference< rv& > { typedef T type; }; + template< class T > struct remove_rvalue_reference< const rv& > { typedef T type; }; + template< class T > struct remove_rvalue_reference< volatile rv& > { typedef T type; }; + template< class T > struct remove_rvalue_reference< const volatile rv& >{ typedef T type; }; +#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + +// Ideas from Boost.Move review, Jeffrey Lee Hellrung: +// +//- TypeTraits metafunctions is_lvalue_reference, add_lvalue_reference, and remove_lvalue_reference ? +// Perhaps add_reference and remove_reference can be modified so that they behave wrt emulated rvalue +// references the same as wrt real rvalue references, i.e., add_reference< rv& > -> T& rather than +// rv& (since T&& & -> T&). +// +//- Add'l TypeTraits has_[trivial_]move_{constructor,assign}...? +// +//- An as_lvalue(T& x) function, which amounts to an identity operation in C++0x, but strips emulated +// rvalue references in C++03. This may be necessary to prevent "accidental moves". + +} //namespace move_detail { +} //namespace boost { + +#endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP diff --git a/boost/boost/move/detail/meta_utils_core.hpp b/boost/boost/move/detail/meta_utils_core.hpp new file mode 100644 index 0000000000..283242bd03 --- /dev/null +++ b/boost/boost/move/detail/meta_utils_core.hpp @@ -0,0 +1,118 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2015-2015. +// 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 http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file + +#ifndef BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP +#define BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +//Small meta-typetraits to support move + +namespace boost { +namespace move_detail { + +////////////////////////////////////// +// if_c +////////////////////////////////////// +template +struct if_c +{ + typedef T1 type; +}; + +template +struct if_c +{ + typedef T2 type; +}; + +////////////////////////////////////// +// if_ +////////////////////////////////////// +template +struct if_ : if_c<0 != T1::value, T2, T3> +{}; + +//enable_if_ +template +struct enable_if_c +{ + typedef T type; +}; + +////////////////////////////////////// +// enable_if_c +////////////////////////////////////// +template +struct enable_if_c {}; + +////////////////////////////////////// +// enable_if +////////////////////////////////////// +template +struct enable_if : enable_if_c {}; + +////////////////////////////////////// +// disable_if +////////////////////////////////////// +template +struct disable_if : enable_if_c {}; + +////////////////////////////////////// +// integral_constant +////////////////////////////////////// +template +struct integral_constant +{ + static const T value = v; + typedef T value_type; + typedef integral_constant type; +}; + +typedef integral_constant true_type; +typedef integral_constant false_type; + +////////////////////////////////////// +// identity +////////////////////////////////////// +template +struct identity +{ + typedef T type; +}; + +////////////////////////////////////// +// is_same +////////////////////////////////////// +template +struct is_same +{ + static const bool value = false; +}; + +template +struct is_same +{ + static const bool value = true; +}; + +} //namespace move_detail { +} //namespace boost { + +#endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP diff --git a/boost/boost/move/detail/type_traits.hpp b/boost/boost/move/detail/type_traits.hpp new file mode 100644 index 0000000000..ac0bbcd493 --- /dev/null +++ b/boost/boost/move/detail/type_traits.hpp @@ -0,0 +1,1003 @@ +////////////////////////////////////////////////////////////////////////////// +// (C) Copyright John Maddock 2000. +// (C) Copyright Ion Gaztanaga 2005-2015. +// +// 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 http://www.boost.org/libs/move for documentation. +// +// The alignment and Type traits implementation comes from +// John Maddock's TypeTraits library. +// +// Some other tricks come from Howard Hinnant's papers and StackOverflow replies +////////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_MOVE_DETAIL_TYPE_TRAITS_HPP +#define BOOST_MOVE_DETAIL_TYPE_TRAITS_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include +#include + +// move/detail +#include +// other +#include +#include +// std +#include + +//Use of Boost.TypeTraits leads to long preprocessed source code due to +//MPL dependencies. We'll use intrinsics directly and make or own +//simplified version of TypeTraits. +//If someday Boost.TypeTraits dependencies are minimized, we should +//revisit this file redirecting code to Boost.TypeTraits traits. + +//These traits don't care about volatile, reference or other checks +//made by Boost.TypeTraits because no volatile or reference types +//can be hold in Boost.Containers. This helps to avoid any Boost.TypeTraits +//dependency. + +// Helper macros for builtin compiler support. +// If your compiler has builtin support for any of the following +// traits concepts, then redefine the appropriate macros to pick +// up on the compiler support: +// +// (these should largely ignore cv-qualifiers) +// BOOST_MOVE_IS_POD(T) should evaluate to true if T is a POD type +// BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect +// BOOST_MOVE_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy +// BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(boost::move(t)) <==> memcpy +// BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy +// BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = boost::move(u) <==> memcpy +// BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect +// BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw +// BOOST_MOVE_HAS_NOTHROW_COPY(T) should evaluate to true if T(t) can not throw +// BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) should evaluate to true if t = u can not throw +// BOOST_MOVE_IS_ENUM(T) should evaluate to true it t is a union type. +// +// The following can also be defined: when detected our implementation is greatly simplified. +// +// BOOST_ALIGNMENT_OF(T) should evaluate to the alignment requirements of type T. + +#if defined(__MSL_CPP__) && (__MSL_CPP__ >= 0x8000) + // Metrowerks compiler is acquiring intrinsic type traits support + // post version 8. We hook into the published interface to pick up + // user defined specializations as well as compiler intrinsics as + // and when they become available: +# include +# define BOOST_MOVE_IS_UNION(T) BOOST_STD_EXTENSION_NAMESPACE::is_union::value +# define BOOST_MOVE_IS_POD(T) BOOST_STD_EXTENSION_NAMESPACE::is_POD::value +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_default_ctor::value +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_copy_ctor::value +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_assignment::value +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_dtor::value +#endif + +#if (defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215))\ + || (defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1500)) +# define BOOST_MOVE_IS_UNION(T) __is_union(T) +# define BOOST_MOVE_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T)) +# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T) +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T)|| ::boost::move_detail::is_pod::value) +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) || ::boost::move_detail::is_pod::value) +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || ::boost::move_detail::is_pod::value) +# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) || ::boost::move_detail::is_trivially_default_constructible::value) +# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) || ::boost::move_detail::is_trivially_copy_constructible::value) +# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) || ::boost::move_detail::is_trivially_copy_assignable::value) + +# define BOOST_MOVE_IS_ENUM(T) __is_enum(T) +# if defined(_MSC_VER) && (_MSC_VER >= 1700) +# define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__has_trivial_move_constructor(T) || ::boost::move_detail::is_pod::value) +# define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) (__has_trivial_move_assign(T) || ::boost::move_detail::is_pod::value) +# endif +#endif + +#if defined(BOOST_CLANG) && defined(__has_feature) + +# if __has_feature(is_union) +# define BOOST_MOVE_IS_UNION(T) __is_union(T) +# endif +# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_pod) +# define BOOST_MOVE_IS_POD(T) __is_pod(T) +# endif +# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty) +# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T) +# endif +# if __has_feature(has_trivial_constructor) +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# endif +# if __has_feature(has_trivial_copy) +# //There are problems with deleted copy constructors detected as trivially copyable. +# //http://stackoverflow.com/questions/12754886/has-trivial-copy-behaves-differently-in-clang-and-gcc-whos-right +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && ::boost::move_detail::is_copy_constructible::value) +# endif +# if __has_feature(has_trivial_assign) +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) ) +# endif +# if __has_feature(has_trivial_destructor) +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) +# endif +# if __has_feature(has_nothrow_constructor) +# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) +# endif +# if __has_feature(has_nothrow_copy) +# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T)) +# endif +# if __has_feature(is_nothrow_copy_assignable) +# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T)) +# endif +# if __has_feature(is_enum) +# define BOOST_MOVE_IS_ENUM(T) __is_enum(T) +# endif +# if __has_feature(has_trivial_move_constructor) +# define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) __has_trivial_move_constructor(T) +# endif +# if __has_feature(has_trivial_move_assign) +# define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) __has_trivial_move_assign(T) +# endif +# define BOOST_MOVE_ALIGNMENT_OF(T) __alignof(T) +#endif + +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) && !defined(BOOST_CLANG) + +#ifdef BOOST_INTEL +# define BOOST_MOVE_INTEL_TT_OPTS || ::boost::move_detail::is_pod::value +#else +# define BOOST_MOVE_INTEL_TT_OPTS +#endif + +# define BOOST_MOVE_IS_UNION(T) __is_union(T) +# define BOOST_MOVE_IS_POD(T) __is_pod(T) +# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T) +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) ((__has_trivial_constructor(T) BOOST_MOVE_INTEL_TT_OPTS)) +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) ((__has_trivial_copy(T) BOOST_MOVE_INTEL_TT_OPTS)) +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_MOVE_INTEL_TT_OPTS) ) +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_MOVE_INTEL_TT_OPTS) +# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) BOOST_MOVE_INTEL_TT_OPTS) +# define BOOST_MOVE_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_MOVE_INTEL_TT_OPTS)) +# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_MOVE_INTEL_TT_OPTS)) + +# define BOOST_MOVE_IS_ENUM(T) __is_enum(T) +# if (!defined(unix) && !defined(__unix__)) || defined(__LP64__) + // GCC sometimes lies about alignment requirements + // of type double on 32-bit unix platforms, use the + // old implementation instead in that case: +# define BOOST_MOVE_ALIGNMENT_OF(T) __alignof__(T) +# endif +#endif + +#if defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600) + +# define BOOST_MOVE_IS_UNION(T) __is_union(T) +# define BOOST_MOVE_IS_POD(T) __is_pod(T) +# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T) +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T)) +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T)) +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) +# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) +# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T)) +# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T)) + +# define BOOST_MOVE_IS_ENUM(T) __is_enum(T) +# define BOOST_MOVE_ALIGNMENT_OF(T) __alignof__(T) +#endif + +# if defined(__CODEGEARC__) +# define BOOST_MOVE_IS_UNION(T) __is_union(T) +# define BOOST_MOVE_IS_POD(T) __is_pod(T) +# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T) +# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T)) +# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T)) +# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T)) +# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T)) +# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T)) +# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T)) +# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T)) + +# define BOOST_MOVE_IS_ENUM(T) __is_enum(T) +# define BOOST_MOVE_ALIGNMENT_OF(T) alignof(T) + +#endif + +//Fallback definitions + +#ifdef BOOST_MOVE_IS_UNION + #define BOOST_MOVE_IS_UNION_IMPL(T) BOOST_MOVE_IS_UNION(T) +#else + #define BOOST_MOVE_IS_UNION_IMPL(T) false +#endif + +#ifdef BOOST_MOVE_IS_POD + #define BOOST_MOVE_IS_POD_IMPL(T) BOOST_MOVE_IS_POD(T) +#else + #define BOOST_MOVE_IS_POD_IMPL(T) \ + (::boost::move_detail::is_scalar::value || ::boost::move_detail::is_void::value) +#endif + +#ifdef BOOST_MOVE_IS_EMPTY + #define BOOST_MOVE_IS_EMPTY_IMPL(T) BOOST_MOVE_IS_EMPTY(T) +#else + #define BOOST_MOVE_IS_EMPTY_IMPL(T) ::boost::move_detail::is_empty_nonintrinsic::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_COPY + #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_COPY(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR + #define BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_COPY + #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_COPY(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR + #define BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_ASSIGN + #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN + #define BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T) BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR + #define BOOST_MOVE_IS_TRIVIALLY_DESTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) +#else + #define BOOST_MOVE_IS_TRIVIALLY_DESTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR + #define BOOST_MOVE_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) +#else + #define BOOST_MOVE_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_NOTHROW_COPY + #define BOOST_MOVE_IS_NOTHROW_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_NOTHROW_COPY(T) +#else + #define BOOST_MOVE_IS_NOTHROW_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_NOTHROW_MOVE + #define BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_NOTHROW_MOVE(T) +#else + #define BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_NOTHROW_ASSIGN + #define BOOST_MOVE_IS_NOTHROW_COPY_ASSIGNABLE(T) BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) +#else + #define BOOST_MOVE_IS_NOTHROW_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN + #define BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T) BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN(T) +#else + #define BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T) ::boost::move_detail::is_pod::value +#endif + +#ifdef BOOST_MOVE_IS_ENUM + #define BOOST_MOVE_IS_ENUM_IMPL(T) BOOST_MOVE_IS_ENUM(T) +#else + #define BOOST_MOVE_IS_ENUM_IMPL(T) ::boost::move_detail::is_enum_nonintrinsic::value +#endif + +namespace boost { +namespace move_detail { + +////////////////////////// +// is_reference +////////////////////////// +template +struct is_reference +{ static const bool value = false; }; + +template +struct is_reference +{ static const bool value = true; }; + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +template +struct is_reference +{ static const bool value = true; }; +#endif + +////////////////////////// +// is_pointer +////////////////////////// +template +struct is_pointer +{ static const bool value = false; }; + +template +struct is_pointer +{ static const bool value = true; }; + +////////////////////////// +// add_reference +////////////////////////// +template +struct add_reference +{ typedef T& type; }; + +template +struct add_reference +{ typedef T& type; }; + +template<> +struct add_reference +{ typedef nat &type; }; + +template<> +struct add_reference +{ typedef const nat &type; }; + +////////////////////////// +// add_const_reference +////////////////////////// +template +struct add_const_reference +{ typedef const T &type; }; + +template +struct add_const_reference +{ typedef T& type; }; + +////////////////////////// +// remove_const +////////////////////////// +template +struct remove_const +{ typedef T type; }; + +template +struct remove_const< const T> +{ typedef T type; }; + +////////////////////////// +// remove_cv +////////////////////////// +template struct remove_cv { typedef T type; }; +template struct remove_cv { typedef T type; }; +template struct remove_cv { typedef T type; }; +template struct remove_cv { typedef T type; }; + +////////////////////////// +// make_unsigned +////////////////////////// +template +struct make_unsigned_impl { typedef T type; }; +template <> struct make_unsigned_impl { typedef unsigned char type; }; +template <> struct make_unsigned_impl { typedef unsigned short type; }; +template <> struct make_unsigned_impl { typedef unsigned int type; }; +template <> struct make_unsigned_impl { typedef unsigned long type; }; +#ifdef BOOST_HAS_LONG_LONG +template <> struct make_unsigned_impl< ::boost::long_long_type > { typedef ::boost::ulong_long_type type; }; +#endif + +template +struct make_unsigned + : make_unsigned_impl::type> +{}; + +////////////////////////// +// is_floating_point +////////////////////////// +template struct is_floating_point_cv { static const bool value = false; }; +template<> struct is_floating_point_cv { static const bool value = true; }; +template<> struct is_floating_point_cv { static const bool value = true; }; +template<> struct is_floating_point_cv { static const bool value = true; }; + +template +struct is_floating_point + : is_floating_point_cv::type> +{}; + +////////////////////////// +// is_integral +////////////////////////// +template struct is_integral_cv { static const bool value = false; }; +template<> struct is_integral_cv< bool>{ static const bool value = true; }; +template<> struct is_integral_cv< char>{ static const bool value = true; }; +template<> struct is_integral_cv< unsigned char>{ static const bool value = true; }; +template<> struct is_integral_cv< signed char>{ static const bool value = true; }; +#ifndef BOOST_NO_CXX11_CHAR16_T +template<> struct is_integral_cv< char16_t>{ static const bool value = true; }; +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T +template<> struct is_integral_cv< char32_t>{ static const bool value = true; }; +#endif +#ifndef BOOST_NO_INTRINSIC_WCHAR_T +template<> struct is_integral_cv< wchar_t>{ static const bool value = true; }; +#endif +template<> struct is_integral_cv< short>{ static const bool value = true; }; +template<> struct is_integral_cv< unsigned short>{ static const bool value = true; }; +template<> struct is_integral_cv< int>{ static const bool value = true; }; +template<> struct is_integral_cv< unsigned int>{ static const bool value = true; }; +template<> struct is_integral_cv< long>{ static const bool value = true; }; +template<> struct is_integral_cv< unsigned long>{ static const bool value = true; }; +#ifdef BOOST_HAS_LONG_LONG +template<> struct is_integral_cv< ::boost:: long_long_type>{ static const bool value = true; }; +template<> struct is_integral_cv< ::boost::ulong_long_type>{ static const bool value = true; }; +#endif + +template +struct is_integral + : public is_integral_cv::type> +{}; + +////////////////////////////////////// +// remove_all_extents +////////////////////////////////////// +template +struct remove_all_extents +{ typedef T type;}; + +template +struct remove_all_extents +{ typedef typename remove_all_extents::type type; }; + +template +struct remove_all_extents +{ typedef typename remove_all_extents::type type;}; + +////////////////////////// +// is_scalar +////////////////////////// +template +struct is_scalar +{ static const bool value = is_integral::value || is_floating_point::value; }; + +////////////////////////// +// is_void +////////////////////////// +template +struct is_void_cv +{ static const bool value = false; }; + +template<> +struct is_void_cv +{ static const bool value = true; }; + +template +struct is_void + : is_void_cv::type> +{}; + +////////////////////////////////////// +// is_array +////////////////////////////////////// +template +struct is_array +{ static const bool value = false; }; + +template +struct is_array +{ static const bool value = true; }; + +template +struct is_array +{ static const bool value = true; }; + +////////////////////////////////////// +// is_member_pointer +////////////////////////////////////// +template struct is_member_pointer_cv { static const bool value = false; }; +template struct is_member_pointer_cv { static const bool value = true; }; + +template +struct is_member_pointer + : is_member_pointer_cv::type> +{}; + +////////////////////////////////////// +// is_nullptr_t +////////////////////////////////////// +template +struct is_nullptr_t_cv +{ static const bool value = false; }; + +#if !defined(BOOST_NO_CXX11_NULLPTR) +template <> +struct is_nullptr_t_cv + #if !defined(BOOST_NO_CXX11_DECLTYPE) + + #else + + #endif +{ static const bool value = true; }; +#endif + +template +struct is_nullptr_t + : is_nullptr_t_cv::type> +{}; + +////////////////////////////////////// +// is_function +////////////////////////////////////// +//Inspired by libc++, thanks to Howard Hinnant +//For a function to pointer an lvalue of function type T can be implicitly converted to a prvalue +//pointer to that function. This does not apply to non-static member functions because lvalues +//that refer to non-static member functions do not exist. +template +struct is_reference_convertible_to_pointer +{ + struct twochar { char dummy[2]; }; + template static char test(U*); + template static twochar test(...); + static T& source(); + static const bool value = sizeof(char) == sizeof(test(source())); +}; +//Filter out: +// - class types that might have implicit conversions +// - void (to avoid forming a reference to void later) +// - references (e.g.: filtering reference to functions) +// - nullptr_t (convertible to pointer) +template < class T + , bool Filter = is_class_or_union::value || + is_void::value || + is_reference::value || + is_nullptr_t::value > +struct is_function_impl +{ static const bool value = is_reference_convertible_to_pointer::value; }; + +template +struct is_function_impl +{ static const bool value = false; }; + +template +struct is_function + : is_function_impl +{}; + +////////////////////////////////////// +// is_union +////////////////////////////////////// +template +struct is_union_noextents_cv +{ static const bool value = BOOST_MOVE_IS_UNION_IMPL(T); }; + +template +struct is_union + : is_union_noextents_cv::type>::type> +{}; + +////////////////////////////////////// +// is_class +////////////////////////////////////// +template +struct is_class +{ + static const bool value = is_class_or_union::value && ! is_union::value; +}; + + +////////////////////////////////////// +// is_arithmetic +////////////////////////////////////// +template +struct is_arithmetic +{ + static const bool value = is_floating_point::value || + is_integral::value; +}; + +////////////////////////////////////// +// is_member_function_pointer +////////////////////////////////////// +template +struct is_member_function_pointer_cv +{ + static const bool value = false; +}; + +template +struct is_member_function_pointer_cv + : is_function +{}; + +template +struct is_member_function_pointer + : is_member_function_pointer_cv::type> +{}; + +////////////////////////////////////// +// is_enum +////////////////////////////////////// +#if !defined(BOOST_MOVE_IS_ENUM) +//Based on (http://howardhinnant.github.io/TypeHiearchy.pdf) +template +struct is_enum_nonintrinsic +{ + static const bool value = !is_arithmetic::value && + !is_reference::value && + !is_class_or_union::value && + !is_array::value && + !is_void::value && + !is_nullptr_t::value && + !is_member_pointer::value && + !is_pointer::value && + !is_function::value; +}; +#endif + +template +struct is_enum +{ static const bool value = BOOST_MOVE_IS_ENUM_IMPL(T); }; + +////////////////////////////////////// +// is_pod +////////////////////////////////////// +template +struct is_pod_noextents_cv //for non-c++11 compilers, a safe fallback +{ static const bool value = BOOST_MOVE_IS_POD_IMPL(T); }; + +template +struct is_pod + : is_pod_noextents_cv::type>::type> +{}; + +////////////////////////////////////// +// is_empty +////////////////////////////////////// +#if !defined(BOOST_MOVE_IS_EMPTY) + +template +struct empty_helper_t1 : public T +{ + empty_helper_t1(); // hh compiler bug workaround + int i[256]; + private: + + empty_helper_t1(const empty_helper_t1&); + empty_helper_t1& operator=(const empty_helper_t1&); +}; + +struct empty_helper_t2 { int i[256]; }; + +template ::value > +struct is_empty_nonintrinsic +{ + static const bool value = false; +}; + +template +struct is_empty_nonintrinsic +{ + static const bool value = sizeof(empty_helper_t1) == sizeof(empty_helper_t2); +}; +#endif + +template +struct is_empty +{ static const bool value = BOOST_MOVE_IS_EMPTY_IMPL(T); }; + +////////////////////////////////////// +// is_copy_constructible +////////////////////////////////////// +template +struct is_copy_constructible +{ + typedef char yes_type; + struct no_type { char dummy[2]; }; + template static typename add_reference::type source(); + + // Intel compiler has problems with SFINAE for copy constructors and deleted functions: + // + // error: function *function_name* cannot be referenced -- it is a deleted function + // static yes_type test(U&, decltype(U(boost::declval()))* = 0); + // ^ + // MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See: + // https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken + #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_INTEL_CXX_VERSION) &&\ + !(defined(BOOST_MSVC) && _MSC_VER == 1800) + static no_type test(...); + #ifdef BOOST_NO_CXX11_DECLTYPE + template + static yes_type test(U&, bool_()))>* = 0); + #else + template + static yes_type test(U&, decltype(U(source()))* = 0); + #endif + #else + template + static no_type test(U&, typename U::boost_move_no_copy_constructor_or_assign* = 0); + static yes_type test(...); + #endif + + static const bool value = sizeof(test(source())) == sizeof(yes_type); +}; + +////////////////////////////////////// +// is_trivially_destructible +////////////////////////////////////// +template +struct is_trivially_destructible +{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_DESTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_trivially_default_constructible +////////////////////////////////////// +template +struct is_trivially_default_constructible +{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_trivially_copy_constructible +////////////////////////////////////// +template +struct is_trivially_copy_constructible +{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_trivially_move_constructible +////////////////////////////////////// +template +struct is_trivially_move_constructible +{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_trivially_copy_assignable +////////////////////////////////////// +template +struct is_trivially_copy_assignable +{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T); }; + +////////////////////////////////////// +// is_trivially_move_assignable +////////////////////////////////////// +template +struct is_trivially_move_assignable +{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T); }; + +////////////////////////////////////// +// is_nothrow_default_constructible +////////////////////////////////////// +template +struct is_nothrow_default_constructible + : is_pod +{ static const bool value = BOOST_MOVE_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_nothrow_copy_constructible +////////////////////////////////////// +template +struct is_nothrow_copy_constructible +{ static const bool value = BOOST_MOVE_IS_NOTHROW_COPY_CONSTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_nothrow_move_constructible +////////////////////////////////////// +template +struct is_nothrow_move_constructible +{ static const bool value = BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T); }; + +////////////////////////////////////// +// is_nothrow_copy_assignable +////////////////////////////////////// +template +struct is_nothrow_copy_assignable +{ static const bool value = BOOST_MOVE_IS_NOTHROW_COPY_ASSIGNABLE(T); }; + +////////////////////////////////////// +// is_nothrow_move_assignable +////////////////////////////////////// +template +struct is_nothrow_move_assignable +{ static const bool value = BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T); }; + +////////////////////////////////////// +// is_nothrow_swappable +////////////////////////////////////// +template +struct is_nothrow_swappable +{ + static const bool value = is_empty::value || is_pod::value; +}; + +////////////////////////////////////// +// alignment_of +////////////////////////////////////// +template +struct alignment_of_hack +{ + T t1; + char c; + T t2; + alignment_of_hack(); +}; + +template +struct alignment_logic +{ static const std::size_t value = A < S ? A : S; }; + +template< typename T > +struct alignment_of_impl +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) + // With MSVC both the native __alignof operator + // and our own logic gets things wrong from time to time :-( + // Using a combination of the two seems to make the most of a bad job: + : alignment_logic< sizeof(alignment_of_hack) - 2*sizeof(T), __alignof(T)> +{}; +#elif !defined(BOOST_MOVE_ALIGNMENT_OF) + : alignment_logic< sizeof(alignment_of_hack) - 2*sizeof(T), sizeof(T)> +{}; +#else +{ static const std::size_t value = BOOST_MOVE_ALIGNMENT_OF(T); }; +#endif + +template< typename T > +struct alignment_of + : alignment_of_impl +{}; + +class alignment_dummy; +typedef void (*function_ptr)(); +typedef int (alignment_dummy::*member_ptr); +typedef int (alignment_dummy::*member_function_ptr)(); +struct alignment_struct +{ long double dummy[4]; }; + +///////////////////////////// +// max_align_t +///////////////////////////// +//This is not standard, but should work with all compilers +union max_align +{ + char char_; + short short_; + int int_; + long long_; + #ifdef BOOST_HAS_LONG_LONG + ::boost::long_long_type long_long_; + #endif + float float_; + double double_; + void * void_ptr_; + long double long_double_[4]; + alignment_dummy *unknown_class_ptr_; + function_ptr function_ptr_; + member_function_ptr member_function_ptr_; + alignment_struct alignment_struct_; +}; + +typedef union max_align max_align_t; + +///////////////////////////// +// aligned_storage +///////////////////////////// + +#if !defined(BOOST_NO_ALIGNMENT) + +template +struct aligned_storage_impl; + +#define BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(A)\ +template\ +struct BOOST_ALIGNMENT(A) aligned_storage_impl\ +{\ + char dummy[Len];\ + typedef aligned_storage_impl type;\ +};\ +// + +//Up to 4K alignment (typical page size) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x2) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x4) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x8) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x10) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x20) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x40) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x80) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x100) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x200) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x400) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x800) +BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1000) + +#undef BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT + +#else //BOOST_NO_ALIGNMENT + +template +union aligned_union +{ + T aligner; + char dummy[Len]; +}; + +template +struct aligned_next; + +template +struct aligned_next +{ + BOOST_STATIC_ASSERT((alignment_of::value == Align)); + typedef aligned_union type; +}; + +//End of search defaults to max_align_t +template +struct aligned_next +{ typedef aligned_union type; }; + +//Now define a search list through types +#define BOOST_MOVE_ALIGNED_NEXT_STEP(TYPE, NEXT_TYPE)\ + template\ + struct aligned_next\ + : aligned_next::value>\ + {};\ + // + BOOST_MOVE_ALIGNED_NEXT_STEP(long double, max_align_t) + BOOST_MOVE_ALIGNED_NEXT_STEP(double, long double) + #ifdef BOOST_HAS_LONG_LONG + BOOST_MOVE_ALIGNED_NEXT_STEP(::boost::long_long_type, double) + BOOST_MOVE_ALIGNED_NEXT_STEP(long, ::boost::long_long_type) + #else + BOOST_MOVE_ALIGNED_NEXT_STEP(long, double) + #endif + BOOST_MOVE_ALIGNED_NEXT_STEP(int, long) + BOOST_MOVE_ALIGNED_NEXT_STEP(short, int) + BOOST_MOVE_ALIGNED_NEXT_STEP(char, short) +#undef BOOST_MOVE_ALIGNED_NEXT_STEP + +template +struct aligned_storage_impl + : aligned_next::value> +{}; + +#endif + +template::value> +struct aligned_storage +{ + //Sanity checks for input parameters + BOOST_STATIC_ASSERT(Align > 0); + + //Sanity checks for output type + typedef typename aligned_storage_impl::type type; + static const std::size_t value = alignment_of::value; + BOOST_STATIC_ASSERT(value >= Align); + BOOST_STATIC_ASSERT((value % Align) == 0); + + //Just in case someone instantiates aligned_storage + //instead of aligned_storage::type (typical error). + private: + aligned_storage(); +}; + +} //namespace move_detail { +} //namespace boost { + +#include + +#endif //#ifndef BOOST_MOVE_DETAIL_TYPE_TRAITS_HPP diff --git a/boost/boost/move/detail/workaround.hpp b/boost/boost/move/detail/workaround.hpp new file mode 100644 index 0000000000..67ba161345 --- /dev/null +++ b/boost/boost/move/detail/workaround.hpp @@ -0,0 +1,45 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2014-2014. 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 http://www.boost.org/libs/interprocess for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP +#define BOOST_MOVE_DETAIL_WORKAROUND_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + #define BOOST_MOVE_PERFECT_FORWARDING +#endif + +//Macros for documentation purposes. For code, expands to the argument +#define BOOST_MOVE_IMPDEF(TYPE) TYPE +#define BOOST_MOVE_SEEDOC(TYPE) TYPE +#define BOOST_MOVE_DOC0PTR(TYPE) TYPE +#define BOOST_MOVE_DOC1ST(TYPE1, TYPE2) TYPE2 +#define BOOST_MOVE_I , +#define BOOST_MOVE_DOCIGN(T1) T1 + +#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5) && !defined(__clang__) + //Pre-standard rvalue binding rules + #define BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES +#elif defined(_MSC_VER) && (_MSC_VER == 1600) + //Standard rvalue binding rules but with some bugs + #define BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG + #define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG +#elif defined(_MSC_VER) && (_MSC_VER == 1700) + #define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG +#endif + +#endif //#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP diff --git a/boost/boost/move/traits.hpp b/boost/boost/move/traits.hpp new file mode 100644 index 0000000000..b48b8f61d2 --- /dev/null +++ b/boost/boost/move/traits.hpp @@ -0,0 +1,77 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2009-2012. +// 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 http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file + +#ifndef BOOST_MOVE_TRAITS_HPP +#define BOOST_MOVE_TRAITS_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +#include +#endif +#include +#include + +namespace boost { + +//! If this trait yields to true +//! (has_trivial_destructor_after_move <T>::value == true) +//! means that if T is used as argument of a move construction/assignment, +//! there is no need to call T's destructor. +//! This optimization tipically is used to improve containers' performance. +//! +//! By default this trait is true if the type has trivial destructor, +//! every class should specialize this trait if it wants to improve performance +//! when inserted in containers. +template +struct has_trivial_destructor_after_move + : ::boost::move_detail::is_trivially_destructible +{}; + +//! By default this traits returns +//!

boost::is_nothrow_move_constructible::value && boost::is_nothrow_move_assignable::value 
. +//! Classes with non-throwing move constructor +//! and assignment can specialize this trait to obtain some performance improvements. +template +struct has_nothrow_move +{ + static const bool value = boost::move_detail::is_nothrow_move_constructible::value && + boost::move_detail::is_nothrow_move_assignable::value; +}; + +namespace move_detail { + +template +struct is_nothrow_move_constructible_or_uncopyable +{ + //The standard requires is_nothrow_move_constructible for move_if_noexcept + //but a user (usually in C++03) might specialize has_nothrow_move which includes it + static const bool value = is_nothrow_move_constructible::value || + has_nothrow_move::value || + !is_copy_constructible::value; +}; + +} //move_detail { +} //namespace boost { + +#include + +#endif //#ifndef BOOST_MOVE_TRAITS_HPP diff --git a/boost/boost/move/utility.hpp b/boost/boost/move/utility.hpp new file mode 100644 index 0000000000..8f9c20b65f --- /dev/null +++ b/boost/boost/move/utility.hpp @@ -0,0 +1,149 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. +// 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 http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file +//! This header includes core utilities from and defines +//! some more advanced utilities such as: + +#ifndef BOOST_MOVE_MOVE_UTILITY_HPP +#define BOOST_MOVE_MOVE_UTILITY_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include +#include +#include + +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + namespace boost { + + ////////////////////////////////////////////////////////////////////////////// + // + // move_if_noexcept() + // + ////////////////////////////////////////////////////////////////////////////// + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && !has_move_emulation_enabled::value + , typename ::boost::move_detail::add_const::type & + >::type + move_if_noexcept(T& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && has_move_emulation_enabled::value + && ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value, rv&>::type + move_if_noexcept(T& x) BOOST_NOEXCEPT + { + return *static_cast* >(::boost::move_detail::addressof(x)); + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && has_move_emulation_enabled::value + && ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value + , rv& + >::type + move_if_noexcept(rv& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && has_move_emulation_enabled::value + && !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value + , typename ::boost::move_detail::add_const::type & + >::type + move_if_noexcept(T& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && has_move_emulation_enabled::value + && !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value + , typename ::boost::move_detail::add_const::type & + >::type + move_if_noexcept(rv& x) BOOST_NOEXCEPT + { + return x; + } + + } //namespace boost + +#else //#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) + #include + + namespace boost{ + + using ::std::move_if_noexcept; + + } //namespace boost + + #else //!BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE + + namespace boost { + + ////////////////////////////////////////////////////////////////////////////// + // + // move_if_noexcept() + // + ////////////////////////////////////////////////////////////////////////////// + #if defined(BOOST_MOVE_DOXYGEN_INVOKED) + //! This function provides a way to convert a reference into a rvalue reference + //! in compilers with rvalue references. For other compilers converts T & into + //! ::boost::rv & so that move emulation is activated. Reference + //! would be converted to rvalue reference only if input type is nothrow move + //! constructible or if it has no copy constructor. In all other cases const + //! reference would be returned + template + rvalue_reference_or_const_lvalue_reference move_if_noexcept(input_reference) noexcept; + + #else //BOOST_MOVE_DOXYGEN_INVOKED + + template + typename ::boost::move_detail::enable_if_c + < ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value, T&&>::type + move_if_noexcept(T& x) BOOST_NOEXCEPT + { return ::boost::move(x); } + + template + typename ::boost::move_detail::enable_if_c + < !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable::value, const T&>::type + move_if_noexcept(T& x) BOOST_NOEXCEPT + { return x; } + + #endif //BOOST_MOVE_DOXYGEN_INVOKED + + } //namespace boost { + + #endif //#if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) + +#endif //BOOST_NO_CXX11_RVALUE_REFERENCES + +#include + +#endif //#ifndef BOOST_MOVE_MOVE_UTILITY_HPP diff --git a/boost/boost/move/utility_core.hpp b/boost/boost/move/utility_core.hpp new file mode 100644 index 0000000000..7b88bc142a --- /dev/null +++ b/boost/boost/move/utility_core.hpp @@ -0,0 +1,295 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2012-2012. +// 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 http://www.boost.org/libs/move for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +//! \file +//! This header defines core utilities to ease the development +//! of move-aware functions. This header minimizes dependencies +//! from other libraries. + +#ifndef BOOST_MOVE_MOVE_UTILITY_CORE_HPP +#define BOOST_MOVE_MOVE_UTILITY_CORE_HPP + +#ifndef BOOST_CONFIG_HPP +# include +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) +# pragma once +#endif + +#include +#include +#include +#include + +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + namespace boost { + + template + struct enable_move_utility_emulation + { + static const bool value = true; + }; + + ////////////////////////////////////////////////////////////////////////////// + // + // move() + // + ////////////////////////////////////////////////////////////////////////////// + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && !has_move_emulation_enabled::value, T&>::type + move(T& x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && has_move_emulation_enabled::value, rv&>::type + move(T& x) BOOST_NOEXCEPT + { + return *static_cast* >(::boost::move_detail::addressof(x)); + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && has_move_emulation_enabled::value, rv&>::type + move(rv& x) BOOST_NOEXCEPT + { + return x; + } + + ////////////////////////////////////////////////////////////////////////////// + // + // forward() + // + ////////////////////////////////////////////////////////////////////////////// + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && ::boost::move_detail::is_rv::value, T &>::type + forward(const typename ::boost::move_detail::identity::type &x) BOOST_NOEXCEPT + { + return const_cast(x); + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && !::boost::move_detail::is_rv::value, const T &>::type + forward(const typename ::boost::move_detail::identity::type &x) BOOST_NOEXCEPT + { + return x; + } + + ////////////////////////////////////////////////////////////////////////////// + // + // move_if_not_lvalue_reference() + // + ////////////////////////////////////////////////////////////////////////////// + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && + ::boost::move_detail::is_rv::value + , T &>::type + move_if_not_lvalue_reference(const typename ::boost::move_detail::identity::type &x) BOOST_NOEXCEPT + { + return const_cast(x); + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && + !::boost::move_detail::is_rv::value && + (::boost::move_detail::is_lvalue_reference::value || + !has_move_emulation_enabled::value) + , typename ::boost::move_detail::add_lvalue_reference::type + >::type + move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference::type &x) BOOST_NOEXCEPT + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if_c + < enable_move_utility_emulation::value && + !::boost::move_detail::is_rv::value && + (!::boost::move_detail::is_lvalue_reference::value && + has_move_emulation_enabled::value) + , rv& + >::type + move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference::type &x) BOOST_NOEXCEPT + { + return move(x); + } + + } //namespace boost + +#else //#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + #if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) + #include + + namespace boost{ + + using ::std::move; + using ::std::forward; + + } //namespace boost + + #else //!BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE + + namespace boost { + + //! This trait's internal boolean `value` is false in compilers with rvalue references + //! and true in compilers without rvalue references. + //! + //! A user can specialize this trait for a type T to false to SFINAE out `move` and `forward` + //! so that the user can define a different move emulation for that type in namespace boost + //! (e.g. another Boost library for its types) and avoid any overload ambiguity. + template + struct enable_move_utility_emulation + { + static const bool value = false; + }; + + ////////////////////////////////////////////////////////////////////////////// + // + // move + // + ////////////////////////////////////////////////////////////////////////////// + + #if defined(BOOST_MOVE_DOXYGEN_INVOKED) + //! This function provides a way to convert a reference into a rvalue reference + //! in compilers with rvalue references. For other compilers if `T` is Boost.Move + //! enabled type then it converts `T&` into ::boost::rv & so that + //! move emulation is activated, else it returns `T &`. + template + rvalue_reference move(input_reference) noexcept; + + #elif defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) + + //Old move approach, lvalues could bind to rvalue references + template + inline typename ::boost::move_detail::remove_reference::type && move(T&& t) BOOST_NOEXCEPT + { return t; } + + #else //BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES + + template + inline typename ::boost::move_detail::remove_reference::type && move(T&& t) BOOST_NOEXCEPT + { return static_cast::type &&>(t); } + + #endif //BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES + + ////////////////////////////////////////////////////////////////////////////// + // + // forward + // + ////////////////////////////////////////////////////////////////////////////// + + + #if defined(BOOST_MOVE_DOXYGEN_INVOKED) + //! This function provides limited form of forwarding that is usually enough for + //! in-place construction and avoids the exponential overloading for + //! achieve the limited forwarding in C++03. + //! + //! For compilers with rvalue references this function provides perfect forwarding. + //! + //! Otherwise: + //! * If input_reference binds to const ::boost::rv & then it output_reference is + //! ::boost::rv & + //! + //! * Else, output_reference is equal to input_reference. + template output_reference forward(input_reference) noexcept; + #elif defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) + + //Old move approach, lvalues could bind to rvalue references + + template + inline T&& forward(typename ::boost::move_detail::identity::type&& t) BOOST_NOEXCEPT + { return t; } + + #else //Old move + + template + inline T&& forward(typename ::boost::move_detail::remove_reference::type& t) BOOST_NOEXCEPT + { return static_cast(t); } + + template + inline T&& forward(typename ::boost::move_detail::remove_reference::type&& t) BOOST_NOEXCEPT + { + //"boost::forward error: 'T' is a lvalue reference, can't forward as rvalue."; + BOOST_STATIC_ASSERT(!boost::move_detail::is_lvalue_reference::value); + return static_cast(t); + } + + #endif //BOOST_MOVE_DOXYGEN_INVOKED + + ////////////////////////////////////////////////////////////////////////////// + // + // move_if_not_lvalue_reference + // + ////////////////////////////////////////////////////////////////////////////// + + + #if defined(BOOST_MOVE_DOXYGEN_INVOKED) + template output_reference move_if_not_lvalue_reference(input_reference) noexcept; + #elif defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) + + //Old move approach, lvalues could bind to rvalue references + + template + inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::identity::type&& t) BOOST_NOEXCEPT + { return t; } + + #else //Old move + + template + inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference::type& t) BOOST_NOEXCEPT + { return static_cast(t); } + + template + inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference::type&& t) BOOST_NOEXCEPT + { + //"boost::forward error: 'T' is a lvalue reference, can't forward as rvalue."; + BOOST_STATIC_ASSERT(!boost::move_detail::is_lvalue_reference::value); + return static_cast(t); + } + + #endif //BOOST_MOVE_DOXYGEN_INVOKED + + } //namespace boost { + + #endif //#if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) + +#endif //BOOST_NO_CXX11_RVALUE_REFERENCES + +#if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + +namespace boost{ +namespace move_detail{ + +template +typename boost::move_detail::add_rvalue_reference::type declval(); + +} //namespace move_detail{ +} //namespace boost{ + +#endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED) + + +#include + +#endif //#ifndef BOOST_MOVE_MOVE_UTILITY_CORE_HPP diff --git a/boost/boost/mpl/O1_size.hpp b/boost/boost/mpl/O1_size.hpp index 8baaa79be3..98bd3a7459 100644 --- a/boost/boost/mpl/O1_size.hpp +++ b/boost/boost/mpl/O1_size.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/O1_size_fwd.hpp b/boost/boost/mpl/O1_size_fwd.hpp index d97538277d..c84a7a56ae 100644 --- a/boost/boost/mpl/O1_size_fwd.hpp +++ b/boost/boost/mpl/O1_size_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: O1_size_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { diff --git a/boost/boost/mpl/advance.hpp b/boost/boost/mpl/advance.hpp index d811a80918..1af600417f 100644 --- a/boost/boost/mpl/advance.hpp +++ b/boost/boost/mpl/advance.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: advance.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/advance_fwd.hpp b/boost/boost/mpl/advance_fwd.hpp index 08ba5fc40c..803841019d 100644 --- a/boost/boost/mpl/advance_fwd.hpp +++ b/boost/boost/mpl/advance_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: advance_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/always.hpp b/boost/boost/mpl/always.hpp index 5094b3ee93..5fe71321e1 100644 --- a/boost/boost/mpl/always.hpp +++ b/boost/boost/mpl/always.hpp @@ -10,11 +10,11 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: always.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ -#include +#include #include #include @@ -23,8 +23,7 @@ namespace boost { namespace mpl { template< typename Value > struct always { template< - typename T - BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(1, typename T, na) + BOOST_MPL_PP_DEFAULT_PARAMS(BOOST_MPL_LIMIT_METAFUNCTION_ARITY, typename T, na) > struct apply { @@ -32,7 +31,7 @@ template< typename Value > struct always }; }; -BOOST_MPL_AUX_ARITY_SPEC(1, always) +BOOST_MPL_AUX_ARITY_SPEC(0, always) }} diff --git a/boost/boost/mpl/and.hpp b/boost/boost/mpl/and.hpp index da257c8fc2..454aaf2e96 100644 --- a/boost/boost/mpl/and.hpp +++ b/boost/boost/mpl/and.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: and.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include @@ -28,7 +28,7 @@ // 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(and)' // has to be checked in a separate condition, otherwise GCC complains // about 'and' being an alternative token -#if defined(_MSC_VER) +#if defined(_MSC_VER) && !defined(__clang__) #ifndef __GCCXML__ #if defined(and) # pragma push_macro("and") @@ -41,7 +41,7 @@ # define BOOST_MPL_PREPROCESSED_HEADER and.hpp # include -#if defined(_MSC_VER) +#if defined(_MSC_VER) && !defined(__clang__) #ifndef __GCCXML__ #if defined(and) # pragma pop_macro("and") diff --git a/boost/boost/mpl/apply.hpp b/boost/boost/mpl/apply.hpp index b0455bc06e..581eb6810e 100644 --- a/boost/boost/mpl/apply.hpp +++ b/boost/boost/mpl/apply.hpp @@ -14,9 +14,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/apply_fwd.hpp b/boost/boost/mpl/apply_fwd.hpp index 8cbdfaf97d..5f5fa78916 100644 --- a/boost/boost/mpl/apply_fwd.hpp +++ b/boost/boost/mpl/apply_fwd.hpp @@ -14,9 +14,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: apply_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/apply_wrap.hpp b/boost/boost/mpl/apply_wrap.hpp index 5c5c6df601..b807779cfa 100644 --- a/boost/boost/mpl/apply_wrap.hpp +++ b/boost/boost/mpl/apply_wrap.hpp @@ -14,9 +14,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: apply_wrap.hpp 49272 2008-10-11 06:50:46Z agurtovoy $ -// $Date: 2008-10-10 23:50:46 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49272 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/arg.hpp b/boost/boost/mpl/arg.hpp index c323a1a6e7..f51adfaeab 100644 --- a/boost/boost/mpl/arg.hpp +++ b/boost/boost/mpl/arg.hpp @@ -15,9 +15,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: arg.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/arg_fwd.hpp b/boost/boost/mpl/arg_fwd.hpp index f79e0561cb..7346dc3555 100644 --- a/boost/boost/mpl/arg_fwd.hpp +++ b/boost/boost/mpl/arg_fwd.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: arg_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/assert.hpp b/boost/boost/mpl/assert.hpp index 7a5818e9e4..4d860a4cae 100644 --- a/boost/boost/mpl/assert.hpp +++ b/boost/boost/mpl/assert.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: assert.hpp 86514 2013-10-29 13:15:03Z bemandawes $ -// $Date: 2013-10-29 06:15:03 -0700 (Tue, 29 Oct 2013) $ -// $Revision: 86514 $ +// $Id$ +// $Date$ +// $Revision$ #include #include @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -55,7 +56,7 @@ // and GCC (which issues "unused variable" warnings when static constants are used // at a function scope) #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ - || (BOOST_MPL_CFG_GCC != 0) + || (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0) # define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr } #else # define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr) diff --git a/boost/boost/mpl/at.hpp b/boost/boost/mpl/at.hpp index d247d71ad4..aa90e59c16 100644 --- a/boost/boost/mpl/at.hpp +++ b/boost/boost/mpl/at.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: at.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/at_fwd.hpp b/boost/boost/mpl/at_fwd.hpp index a4825f0d56..6aaae38351 100644 --- a/boost/boost/mpl/at_fwd.hpp +++ b/boost/boost/mpl/at_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: at_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { diff --git a/boost/boost/mpl/aux_/O1_size_impl.hpp b/boost/boost/mpl/aux_/O1_size_impl.hpp index 614730dff9..3bcbd0f787 100644 --- a/boost/boost/mpl/aux_/O1_size_impl.hpp +++ b/boost/boost/mpl/aux_/O1_size_impl.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: O1_size_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/adl_barrier.hpp b/boost/boost/mpl/aux_/adl_barrier.hpp index 077f46fc0f..3968c242ad 100644 --- a/boost/boost/mpl/aux_/adl_barrier.hpp +++ b/boost/boost/mpl/aux_/adl_barrier.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: adl_barrier.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/advance_backward.hpp b/boost/boost/mpl/aux_/advance_backward.hpp index d44c59f8ef..df56793211 100644 --- a/boost/boost/mpl/aux_/advance_backward.hpp +++ b/boost/boost/mpl/aux_/advance_backward.hpp @@ -14,9 +14,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: advance_backward.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/aux_/advance_forward.hpp b/boost/boost/mpl/aux_/advance_forward.hpp index 4edd3ead79..62b0101c67 100644 --- a/boost/boost/mpl/aux_/advance_forward.hpp +++ b/boost/boost/mpl/aux_/advance_forward.hpp @@ -14,9 +14,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: advance_forward.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/aux_/arg_typedef.hpp b/boost/boost/mpl/aux_/arg_typedef.hpp index ed5e5bd723..362db16006 100644 --- a/boost/boost/mpl/aux_/arg_typedef.hpp +++ b/boost/boost/mpl/aux_/arg_typedef.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: arg_typedef.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/arithmetic_op.hpp b/boost/boost/mpl/aux_/arithmetic_op.hpp index 0a310b7ced..0171db5db6 100644 --- a/boost/boost/mpl/aux_/arithmetic_op.hpp +++ b/boost/boost/mpl/aux_/arithmetic_op.hpp @@ -9,9 +9,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: arithmetic_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/aux_/arity.hpp b/boost/boost/mpl/aux_/arity.hpp index adedcc6b5c..d13ab4aded 100644 --- a/boost/boost/mpl/aux_/arity.hpp +++ b/boost/boost/mpl/aux_/arity.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: arity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/arity_spec.hpp b/boost/boost/mpl/aux_/arity_spec.hpp index 6ae5cc72bd..7c8221428d 100644 --- a/boost/boost/mpl/aux_/arity_spec.hpp +++ b/boost/boost/mpl/aux_/arity_spec.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: arity_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/at_impl.hpp b/boost/boost/mpl/aux_/at_impl.hpp index 4af7cfed87..923937480e 100644 --- a/boost/boost/mpl/aux_/at_impl.hpp +++ b/boost/boost/mpl/aux_/at_impl.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: at_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/begin_end_impl.hpp b/boost/boost/mpl/aux_/begin_end_impl.hpp index 1a220a24ad..58b70dd101 100644 --- a/boost/boost/mpl/aux_/begin_end_impl.hpp +++ b/boost/boost/mpl/aux_/begin_end_impl.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: begin_end_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/clear_impl.hpp b/boost/boost/mpl/aux_/clear_impl.hpp index 3850086ca5..20b270c0ce 100644 --- a/boost/boost/mpl/aux_/clear_impl.hpp +++ b/boost/boost/mpl/aux_/clear_impl.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: clear_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/common_name_wknd.hpp b/boost/boost/mpl/aux_/common_name_wknd.hpp index a6c7898b22..00758b243e 100644 --- a/boost/boost/mpl/aux_/common_name_wknd.hpp +++ b/boost/boost/mpl/aux_/common_name_wknd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: common_name_wknd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/comparison_op.hpp b/boost/boost/mpl/aux_/comparison_op.hpp index f0850a4d03..2df72d300a 100644 --- a/boost/boost/mpl/aux_/comparison_op.hpp +++ b/boost/boost/mpl/aux_/comparison_op.hpp @@ -9,9 +9,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: comparison_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/aux_/config/adl.hpp b/boost/boost/mpl/aux_/config/adl.hpp index d6ead717ea..e9bdf1156b 100644 --- a/boost/boost/mpl/aux_/config/adl.hpp +++ b/boost/boost/mpl/aux_/config/adl.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: adl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/config/arrays.hpp b/boost/boost/mpl/aux_/config/arrays.hpp index d801cf7c3d..a9ea68ad67 100644 --- a/boost/boost/mpl/aux_/config/arrays.hpp +++ b/boost/boost/mpl/aux_/config/arrays.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: arrays.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/config/bcc.hpp b/boost/boost/mpl/aux_/config/bcc.hpp index f4817ca628..fe4941a598 100644 --- a/boost/boost/mpl/aux_/config/bcc.hpp +++ b/boost/boost/mpl/aux_/config/bcc.hpp @@ -10,7 +10,7 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: bcc.hpp 49272 2008-10-11 06:50:46Z agurtovoy $ +// $Id$ // $Date: 2004-09-02 10:41:37 -0500 (Thu, 02 Sep 2004) $ // $Revision: 24874 $ diff --git a/boost/boost/mpl/aux_/config/bind.hpp b/boost/boost/mpl/aux_/config/bind.hpp index 02a7814201..10bcb94b8b 100644 --- a/boost/boost/mpl/aux_/config/bind.hpp +++ b/boost/boost/mpl/aux_/config/bind.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: bind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/config/compiler.hpp b/boost/boost/mpl/aux_/config/compiler.hpp index e80ccde7f0..7d3e3b6622 100644 --- a/boost/boost/mpl/aux_/config/compiler.hpp +++ b/boost/boost/mpl/aux_/config/compiler.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: compiler.hpp 53189 2009-05-22 20:07:55Z hkaiser $ -// $Date: 2009-05-22 13:07:55 -0700 (Fri, 22 May 2009) $ -// $Revision: 53189 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_CFG_COMPILER_DIR) diff --git a/boost/boost/mpl/aux_/config/ctps.hpp b/boost/boost/mpl/aux_/config/ctps.hpp index 9a4aaf724e..af78f47ffd 100644 --- a/boost/boost/mpl/aux_/config/ctps.hpp +++ b/boost/boost/mpl/aux_/config/ctps.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: ctps.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp b/boost/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp index f5f53f7c5a..9f8ea8c67f 100644 --- a/boost/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp +++ b/boost/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: dmc_ambiguous_ctps.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/config/dtp.hpp b/boost/boost/mpl/aux_/config/dtp.hpp index e53929bb84..4379b6b2fc 100644 --- a/boost/boost/mpl/aux_/config/dtp.hpp +++ b/boost/boost/mpl/aux_/config/dtp.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: dtp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/config/eti.hpp b/boost/boost/mpl/aux_/config/eti.hpp index c3fd1c60c9..519d433d35 100644 --- a/boost/boost/mpl/aux_/config/eti.hpp +++ b/boost/boost/mpl/aux_/config/eti.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: eti.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/config/forwarding.hpp b/boost/boost/mpl/aux_/config/forwarding.hpp index 0919d07268..b4296ad961 100644 --- a/boost/boost/mpl/aux_/config/forwarding.hpp +++ b/boost/boost/mpl/aux_/config/forwarding.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: forwarding.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/config/gcc.hpp b/boost/boost/mpl/aux_/config/gcc.hpp index b9d8f7d32f..080495de17 100644 --- a/boost/boost/mpl/aux_/config/gcc.hpp +++ b/boost/boost/mpl/aux_/config/gcc.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: gcc.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if defined(__GNUC__) && !defined(__EDG_VERSION__) # define BOOST_MPL_CFG_GCC ((__GNUC__ << 8) | __GNUC_MINOR__) diff --git a/boost/boost/mpl/aux_/config/gpu.hpp b/boost/boost/mpl/aux_/config/gpu.hpp new file mode 100644 index 0000000000..0e5ed784c4 --- /dev/null +++ b/boost/boost/mpl/aux_/config/gpu.hpp @@ -0,0 +1,35 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_GPU_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_GPU_HPP_INCLUDED + +// Copyright Eric Niebler 2014 +// +// 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 http://www.boost.org/libs/mpl for documentation. + +// $Id$ +// $Date$ +// $Revision$ + +#include + +#if !defined(BOOST_MPL_CFG_GPU_ENABLED) \ + +# define BOOST_MPL_CFG_GPU_ENABLED BOOST_GPU_ENABLED + +#endif + +#if defined __CUDACC__ + +# define BOOST_MPL_CFG_GPU 1 + +#else + +# define BOOST_MPL_CFG_GPU 0 + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_GPU_HPP_INCLUDED diff --git a/boost/boost/mpl/aux_/config/has_apply.hpp b/boost/boost/mpl/aux_/config/has_apply.hpp index cc52ebac50..4dc01c6647 100644 --- a/boost/boost/mpl/aux_/config/has_apply.hpp +++ b/boost/boost/mpl/aux_/config/has_apply.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: has_apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/config/has_xxx.hpp b/boost/boost/mpl/aux_/config/has_xxx.hpp index 1139b684ca..b0f2f8c23e 100644 --- a/boost/boost/mpl/aux_/config/has_xxx.hpp +++ b/boost/boost/mpl/aux_/config/has_xxx.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: has_xxx.hpp 63518 2010-07-02 08:32:03Z agurtovoy $ -// $Date: 2010-07-02 01:32:03 -0700 (Fri, 02 Jul 2010) $ -// $Revision: 63518 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/config/integral.hpp b/boost/boost/mpl/aux_/config/integral.hpp index 6a891604e3..144542d9c3 100644 --- a/boost/boost/mpl/aux_/config/integral.hpp +++ b/boost/boost/mpl/aux_/config/integral.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: integral.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/config/intel.hpp b/boost/boost/mpl/aux_/config/intel.hpp index 141a95233e..5bd9159173 100644 --- a/boost/boost/mpl/aux_/config/intel.hpp +++ b/boost/boost/mpl/aux_/config/intel.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: intel.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ // BOOST_INTEL_CXX_VERSION is defined here: diff --git a/boost/boost/mpl/aux_/config/lambda.hpp b/boost/boost/mpl/aux_/config/lambda.hpp index 7be16bf7c6..93fbafe071 100644 --- a/boost/boost/mpl/aux_/config/lambda.hpp +++ b/boost/boost/mpl/aux_/config/lambda.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: lambda.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/config/msvc.hpp b/boost/boost/mpl/aux_/config/msvc.hpp index fe89cda30b..8a6b924627 100644 --- a/boost/boost/mpl/aux_/config/msvc.hpp +++ b/boost/boost/mpl/aux_/config/msvc.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: msvc.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ // BOOST_MSVC is defined here: diff --git a/boost/boost/mpl/aux_/config/msvc_typename.hpp b/boost/boost/mpl/aux_/config/msvc_typename.hpp index 603e2755ea..feedc16db8 100644 --- a/boost/boost/mpl/aux_/config/msvc_typename.hpp +++ b/boost/boost/mpl/aux_/config/msvc_typename.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: msvc_typename.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/config/nttp.hpp b/boost/boost/mpl/aux_/config/nttp.hpp index f8bd39efab..11125a9bff 100644 --- a/boost/boost/mpl/aux_/config/nttp.hpp +++ b/boost/boost/mpl/aux_/config/nttp.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: nttp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/config/overload_resolution.hpp b/boost/boost/mpl/aux_/config/overload_resolution.hpp index 9de579ff5b..61e4486e9b 100644 --- a/boost/boost/mpl/aux_/config/overload_resolution.hpp +++ b/boost/boost/mpl/aux_/config/overload_resolution.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: overload_resolution.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/config/pp_counter.hpp b/boost/boost/mpl/aux_/config/pp_counter.hpp index 4592272f8b..e7fb8d66c6 100644 --- a/boost/boost/mpl/aux_/config/pp_counter.hpp +++ b/boost/boost/mpl/aux_/config/pp_counter.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: pp_counter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_AUX_PP_COUNTER) # include diff --git a/boost/boost/mpl/aux_/config/preprocessor.hpp b/boost/boost/mpl/aux_/config/preprocessor.hpp index 39190c4fdd..82ebc68fe0 100644 --- a/boost/boost/mpl/aux_/config/preprocessor.hpp +++ b/boost/boost/mpl/aux_/config/preprocessor.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: preprocessor.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/config/static_constant.hpp b/boost/boost/mpl/aux_/config/static_constant.hpp index 02cf9c4ed4..ece38fb0e9 100644 --- a/boost/boost/mpl/aux_/config/static_constant.hpp +++ b/boost/boost/mpl/aux_/config/static_constant.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: static_constant.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) // BOOST_STATIC_CONSTANT is defined here: diff --git a/boost/boost/mpl/aux_/config/ttp.hpp b/boost/boost/mpl/aux_/config/ttp.hpp index 879ec1ddca..3aff3f84df 100644 --- a/boost/boost/mpl/aux_/config/ttp.hpp +++ b/boost/boost/mpl/aux_/config/ttp.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: ttp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/config/typeof.hpp b/boost/boost/mpl/aux_/config/typeof.hpp index 2244d2cd14..cde6179c67 100644 --- a/boost/boost/mpl/aux_/config/typeof.hpp +++ b/boost/boost/mpl/aux_/config/typeof.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: typeof.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/config/use_preprocessed.hpp b/boost/boost/mpl/aux_/config/use_preprocessed.hpp index 4494366d8d..8fd5c60755 100644 --- a/boost/boost/mpl/aux_/config/use_preprocessed.hpp +++ b/boost/boost/mpl/aux_/config/use_preprocessed.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: use_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ // #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS diff --git a/boost/boost/mpl/aux_/config/workaround.hpp b/boost/boost/mpl/aux_/config/workaround.hpp index 8ec172f672..82c632982d 100644 --- a/boost/boost/mpl/aux_/config/workaround.hpp +++ b/boost/boost/mpl/aux_/config/workaround.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: workaround.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/contains_impl.hpp b/boost/boost/mpl/aux_/contains_impl.hpp index 2dcb609c95..b80caeafed 100644 --- a/boost/boost/mpl/aux_/contains_impl.hpp +++ b/boost/boost/mpl/aux_/contains_impl.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: contains_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/count_args.hpp b/boost/boost/mpl/aux_/count_args.hpp index 1ab000db14..b432d370eb 100644 --- a/boost/boost/mpl/aux_/count_args.hpp +++ b/boost/boost/mpl/aux_/count_args.hpp @@ -9,9 +9,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: count_args.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/empty_impl.hpp b/boost/boost/mpl/aux_/empty_impl.hpp index 0b4b979873..cfe55ae252 100644 --- a/boost/boost/mpl/aux_/empty_impl.hpp +++ b/boost/boost/mpl/aux_/empty_impl.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: empty_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/fold_impl.hpp b/boost/boost/mpl/aux_/fold_impl.hpp index cc640224da..97c88c5b29 100644 --- a/boost/boost/mpl/aux_/fold_impl.hpp +++ b/boost/boost/mpl/aux_/fold_impl.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: fold_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/aux_/fold_impl_body.hpp b/boost/boost/mpl/aux_/fold_impl_body.hpp index 0750990ae3..02dd645f72 100644 --- a/boost/boost/mpl/aux_/fold_impl_body.hpp +++ b/boost/boost/mpl/aux_/fold_impl_body.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: fold_impl_body.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ # include # include diff --git a/boost/boost/mpl/aux_/full_lambda.hpp b/boost/boost/mpl/aux_/full_lambda.hpp index e931199915..918aff5c09 100644 --- a/boost/boost/mpl/aux_/full_lambda.hpp +++ b/boost/boost/mpl/aux_/full_lambda.hpp @@ -14,9 +14,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: full_lambda.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/aux_/has_apply.hpp b/boost/boost/mpl/aux_/has_apply.hpp index cfb496e3bb..9c16a35498 100644 --- a/boost/boost/mpl/aux_/has_apply.hpp +++ b/boost/boost/mpl/aux_/has_apply.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: has_apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/has_begin.hpp b/boost/boost/mpl/aux_/has_begin.hpp index c2b3bdbb5b..4ee415cbb9 100644 --- a/boost/boost/mpl/aux_/has_begin.hpp +++ b/boost/boost/mpl/aux_/has_begin.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: has_begin.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/has_rebind.hpp b/boost/boost/mpl/aux_/has_rebind.hpp index f07e79e567..eb4eda613c 100644 --- a/boost/boost/mpl/aux_/has_rebind.hpp +++ b/boost/boost/mpl/aux_/has_rebind.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: has_rebind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/has_size.hpp b/boost/boost/mpl/aux_/has_size.hpp index 23588af0be..ff29913f9b 100644 --- a/boost/boost/mpl/aux_/has_size.hpp +++ b/boost/boost/mpl/aux_/has_size.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: has_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/has_tag.hpp b/boost/boost/mpl/aux_/has_tag.hpp index 915a8b6221..3912a76af6 100644 --- a/boost/boost/mpl/aux_/has_tag.hpp +++ b/boost/boost/mpl/aux_/has_tag.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: has_tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/has_type.hpp b/boost/boost/mpl/aux_/has_type.hpp index 4f05072b5f..6744ef5b06 100644 --- a/boost/boost/mpl/aux_/has_type.hpp +++ b/boost/boost/mpl/aux_/has_type.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: has_type.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/include_preprocessed.hpp b/boost/boost/mpl/aux_/include_preprocessed.hpp index 162b05cc0d..c13434c8eb 100644 --- a/boost/boost/mpl/aux_/include_preprocessed.hpp +++ b/boost/boost/mpl/aux_/include_preprocessed.hpp @@ -9,9 +9,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/insert_range_impl.hpp b/boost/boost/mpl/aux_/insert_range_impl.hpp index d7357b46a0..baffb54a2d 100644 --- a/boost/boost/mpl/aux_/insert_range_impl.hpp +++ b/boost/boost/mpl/aux_/insert_range_impl.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: insert_range_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/inserter_algorithm.hpp b/boost/boost/mpl/aux_/inserter_algorithm.hpp index 2d7e1d928a..20ae8161c7 100644 --- a/boost/boost/mpl/aux_/inserter_algorithm.hpp +++ b/boost/boost/mpl/aux_/inserter_algorithm.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: inserter_algorithm.hpp 55648 2009-08-18 05:16:53Z agurtovoy $ -// $Date: 2009-08-17 22:16:53 -0700 (Mon, 17 Aug 2009) $ -// $Revision: 55648 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/integral_wrapper.hpp b/boost/boost/mpl/aux_/integral_wrapper.hpp index d36e7cbb2d..6bc05f7e96 100644 --- a/boost/boost/mpl/aux_/integral_wrapper.hpp +++ b/boost/boost/mpl/aux_/integral_wrapper.hpp @@ -7,9 +7,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: integral_wrapper.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! @@ -77,7 +77,7 @@ struct AUX_WRAPPER_NAME // functions that return objects of both arithmetic ('int', 'long', // 'double', etc.) and wrapped integral types (for an example, see // "mpl/example/power.cpp") - operator AUX_WRAPPER_VALUE_TYPE() const { return static_cast(this->value); } + BOOST_CONSTEXPR operator AUX_WRAPPER_VALUE_TYPE() const { return static_cast(this->value); } }; #if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) diff --git a/boost/boost/mpl/aux_/is_msvc_eti_arg.hpp b/boost/boost/mpl/aux_/is_msvc_eti_arg.hpp index 917b57cbc3..4989940bad 100644 --- a/boost/boost/mpl/aux_/is_msvc_eti_arg.hpp +++ b/boost/boost/mpl/aux_/is_msvc_eti_arg.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: is_msvc_eti_arg.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/iter_apply.hpp b/boost/boost/mpl/aux_/iter_apply.hpp index fee4d811c1..41dfdfadd5 100644 --- a/boost/boost/mpl/aux_/iter_apply.hpp +++ b/boost/boost/mpl/aux_/iter_apply.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: iter_apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/iter_fold_if_impl.hpp b/boost/boost/mpl/aux_/iter_fold_if_impl.hpp index ad80250d0b..6372e83de4 100644 --- a/boost/boost/mpl/aux_/iter_fold_if_impl.hpp +++ b/boost/boost/mpl/aux_/iter_fold_if_impl.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: iter_fold_if_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/aux_/iter_fold_impl.hpp b/boost/boost/mpl/aux_/iter_fold_impl.hpp index 7bc572078d..b4d2922f51 100644 --- a/boost/boost/mpl/aux_/iter_fold_impl.hpp +++ b/boost/boost/mpl/aux_/iter_fold_impl.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: iter_fold_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/aux_/iter_push_front.hpp b/boost/boost/mpl/aux_/iter_push_front.hpp index 3a01b0360c..35ccc4dfbb 100644 --- a/boost/boost/mpl/aux_/iter_push_front.hpp +++ b/boost/boost/mpl/aux_/iter_push_front.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: iter_push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/joint_iter.hpp b/boost/boost/mpl/aux_/joint_iter.hpp index e78028d644..277580eebf 100644 --- a/boost/boost/mpl/aux_/joint_iter.hpp +++ b/boost/boost/mpl/aux_/joint_iter.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: joint_iter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/lambda_arity_param.hpp b/boost/boost/mpl/aux_/lambda_arity_param.hpp index 5418f2c904..63cfcd4f17 100644 --- a/boost/boost/mpl/aux_/lambda_arity_param.hpp +++ b/boost/boost/mpl/aux_/lambda_arity_param.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: lambda_arity_param.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/lambda_no_ctps.hpp b/boost/boost/mpl/aux_/lambda_no_ctps.hpp index 1c383b4279..9e0d0203a7 100644 --- a/boost/boost/mpl/aux_/lambda_no_ctps.hpp +++ b/boost/boost/mpl/aux_/lambda_no_ctps.hpp @@ -14,9 +14,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: lambda_no_ctps.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/aux_/lambda_spec.hpp b/boost/boost/mpl/aux_/lambda_spec.hpp index 52b1dcd55c..6ffacc0a6d 100644 --- a/boost/boost/mpl/aux_/lambda_spec.hpp +++ b/boost/boost/mpl/aux_/lambda_spec.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: lambda_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/lambda_support.hpp b/boost/boost/mpl/aux_/lambda_support.hpp index 2d25348ff6..5b2af58583 100644 --- a/boost/boost/mpl/aux_/lambda_support.hpp +++ b/boost/boost/mpl/aux_/lambda_support.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: lambda_support.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/largest_int.hpp b/boost/boost/mpl/aux_/largest_int.hpp index 1b9f1cf985..feaa1eca72 100644 --- a/boost/boost/mpl/aux_/largest_int.hpp +++ b/boost/boost/mpl/aux_/largest_int.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: largest_int.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/logical_op.hpp b/boost/boost/mpl/aux_/logical_op.hpp index d964049343..0ba2510262 100644 --- a/boost/boost/mpl/aux_/logical_op.hpp +++ b/boost/boost/mpl/aux_/logical_op.hpp @@ -7,9 +7,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: logical_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! diff --git a/boost/boost/mpl/aux_/msvc_dtw.hpp b/boost/boost/mpl/aux_/msvc_dtw.hpp index b8953f59db..d595b231f3 100644 --- a/boost/boost/mpl/aux_/msvc_dtw.hpp +++ b/boost/boost/mpl/aux_/msvc_dtw.hpp @@ -7,9 +7,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: msvc_dtw.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! diff --git a/boost/boost/mpl/aux_/msvc_eti_base.hpp b/boost/boost/mpl/aux_/msvc_eti_base.hpp index 61bd38ab5b..0d8ace6964 100644 --- a/boost/boost/mpl/aux_/msvc_eti_base.hpp +++ b/boost/boost/mpl/aux_/msvc_eti_base.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: msvc_eti_base.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/msvc_is_class.hpp b/boost/boost/mpl/aux_/msvc_is_class.hpp index 54a2c5766c..acd40e3307 100644 --- a/boost/boost/mpl/aux_/msvc_is_class.hpp +++ b/boost/boost/mpl/aux_/msvc_is_class.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: msvc_is_class.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/msvc_never_true.hpp b/boost/boost/mpl/aux_/msvc_never_true.hpp index ca35adca9c..2df9b81172 100644 --- a/boost/boost/mpl/aux_/msvc_never_true.hpp +++ b/boost/boost/mpl/aux_/msvc_never_true.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: msvc_never_true.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/msvc_type.hpp b/boost/boost/mpl/aux_/msvc_type.hpp index 643fd83e99..bea244f319 100644 --- a/boost/boost/mpl/aux_/msvc_type.hpp +++ b/boost/boost/mpl/aux_/msvc_type.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: msvc_type.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/na.hpp b/boost/boost/mpl/aux_/na.hpp index b75fcdd28d..f079c1e78c 100644 --- a/boost/boost/mpl/aux_/na.hpp +++ b/boost/boost/mpl/aux_/na.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: na.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/na_assert.hpp b/boost/boost/mpl/aux_/na_assert.hpp index df88ba3e56..1983c09061 100644 --- a/boost/boost/mpl/aux_/na_assert.hpp +++ b/boost/boost/mpl/aux_/na_assert.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: na_assert.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/na_fwd.hpp b/boost/boost/mpl/aux_/na_fwd.hpp index 2409fc8a13..4388241939 100644 --- a/boost/boost/mpl/aux_/na_fwd.hpp +++ b/boost/boost/mpl/aux_/na_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: na_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/na_spec.hpp b/boost/boost/mpl/aux_/na_spec.hpp index 6cd7721ca8..d052fce18e 100644 --- a/boost/boost/mpl/aux_/na_spec.hpp +++ b/boost/boost/mpl/aux_/na_spec.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: na_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/aux_/nested_type_wknd.hpp b/boost/boost/mpl/aux_/nested_type_wknd.hpp index cc4628672a..4207abdbc5 100644 --- a/boost/boost/mpl/aux_/nested_type_wknd.hpp +++ b/boost/boost/mpl/aux_/nested_type_wknd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: nested_type_wknd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/nttp_decl.hpp b/boost/boost/mpl/aux_/nttp_decl.hpp index 65e2929130..8c344d874d 100644 --- a/boost/boost/mpl/aux_/nttp_decl.hpp +++ b/boost/boost/mpl/aux_/nttp_decl.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: nttp_decl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/numeric_cast_utils.hpp b/boost/boost/mpl/aux_/numeric_cast_utils.hpp index 11f04edd7b..a7ac85a99d 100644 --- a/boost/boost/mpl/aux_/numeric_cast_utils.hpp +++ b/boost/boost/mpl/aux_/numeric_cast_utils.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: numeric_cast_utils.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/numeric_op.hpp b/boost/boost/mpl/aux_/numeric_op.hpp index 896935cc44..5492557013 100644 --- a/boost/boost/mpl/aux_/numeric_op.hpp +++ b/boost/boost/mpl/aux_/numeric_op.hpp @@ -13,9 +13,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: numeric_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/aux_/preprocessor/add.hpp b/boost/boost/mpl/aux_/preprocessor/add.hpp index 26a70e7563..53e646ef6a 100644 --- a/boost/boost/mpl/aux_/preprocessor/add.hpp +++ b/boost/boost/mpl/aux_/preprocessor/add.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: add.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/preprocessor/def_params_tail.hpp b/boost/boost/mpl/aux_/preprocessor/def_params_tail.hpp index c51636e68f..cab3989d1c 100644 --- a/boost/boost/mpl/aux_/preprocessor/def_params_tail.hpp +++ b/boost/boost/mpl/aux_/preprocessor/def_params_tail.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: def_params_tail.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/preprocessor/default_params.hpp b/boost/boost/mpl/aux_/preprocessor/default_params.hpp index 66d6d0397a..c3548c6c9b 100644 --- a/boost/boost/mpl/aux_/preprocessor/default_params.hpp +++ b/boost/boost/mpl/aux_/preprocessor/default_params.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: default_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/preprocessor/enum.hpp b/boost/boost/mpl/aux_/preprocessor/enum.hpp index 11541a050c..64c5e6a8f6 100644 --- a/boost/boost/mpl/aux_/preprocessor/enum.hpp +++ b/boost/boost/mpl/aux_/preprocessor/enum.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: enum.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/preprocessor/ext_params.hpp b/boost/boost/mpl/aux_/preprocessor/ext_params.hpp index a89535d6b2..f5e6e502cd 100644 --- a/boost/boost/mpl/aux_/preprocessor/ext_params.hpp +++ b/boost/boost/mpl/aux_/preprocessor/ext_params.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: ext_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/preprocessor/filter_params.hpp b/boost/boost/mpl/aux_/preprocessor/filter_params.hpp index fefd984778..7c0df4f7d5 100644 --- a/boost/boost/mpl/aux_/preprocessor/filter_params.hpp +++ b/boost/boost/mpl/aux_/preprocessor/filter_params.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: filter_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #define BOOST_MPL_PP_FILTER_PARAMS_0(p1,p2,p3,p4,p5,p6,p7,p8,p9) #define BOOST_MPL_PP_FILTER_PARAMS_1(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1 diff --git a/boost/boost/mpl/aux_/preprocessor/params.hpp b/boost/boost/mpl/aux_/preprocessor/params.hpp index ac861ecc40..acad321903 100644 --- a/boost/boost/mpl/aux_/preprocessor/params.hpp +++ b/boost/boost/mpl/aux_/preprocessor/params.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/preprocessor/partial_spec_params.hpp b/boost/boost/mpl/aux_/preprocessor/partial_spec_params.hpp index e2e1fa900d..de5535cea8 100644 --- a/boost/boost/mpl/aux_/preprocessor/partial_spec_params.hpp +++ b/boost/boost/mpl/aux_/preprocessor/partial_spec_params.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: partial_spec_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/preprocessor/range.hpp b/boost/boost/mpl/aux_/preprocessor/range.hpp index e69a9e1945..d66eeb559c 100644 --- a/boost/boost/mpl/aux_/preprocessor/range.hpp +++ b/boost/boost/mpl/aux_/preprocessor/range.hpp @@ -10,14 +10,21 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: range.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include +#include +#include + +#define BOOST_MPL_PP_RANGE_ITEM(z,n,_) (n) #define BOOST_MPL_PP_RANGE(first, length) \ - BOOST_PP_SEQ_SUBSEQ((0)(1)(2)(3)(4)(5)(6)(7)(8)(9), first, length) \ + BOOST_PP_SEQ_SUBSEQ( \ + BOOST_PP_REPEAT(BOOST_PP_ADD(first,length), BOOST_MPL_PP_RANGE_ITEM, _), \ + first, length \ + ) \ /**/ #endif // BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED diff --git a/boost/boost/mpl/aux_/preprocessor/repeat.hpp b/boost/boost/mpl/aux_/preprocessor/repeat.hpp index 2c314eca17..0511367665 100644 --- a/boost/boost/mpl/aux_/preprocessor/repeat.hpp +++ b/boost/boost/mpl/aux_/preprocessor/repeat.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: repeat.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/preprocessor/sub.hpp b/boost/boost/mpl/aux_/preprocessor/sub.hpp index 7f5e2913a8..c794c749fa 100644 --- a/boost/boost/mpl/aux_/preprocessor/sub.hpp +++ b/boost/boost/mpl/aux_/preprocessor/sub.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: sub.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/preprocessor/tuple.hpp b/boost/boost/mpl/aux_/preprocessor/tuple.hpp index ed59407c5e..755bbc58e4 100644 --- a/boost/boost/mpl/aux_/preprocessor/tuple.hpp +++ b/boost/boost/mpl/aux_/preprocessor/tuple.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: tuple.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #define BOOST_MPL_PP_TUPLE_11_ELEM_0(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e0 #define BOOST_MPL_PP_TUPLE_11_ELEM_1(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e1 diff --git a/boost/boost/mpl/aux_/push_back_impl.hpp b/boost/boost/mpl/aux_/push_back_impl.hpp index 732c43c802..27e7a60443 100644 --- a/boost/boost/mpl/aux_/push_back_impl.hpp +++ b/boost/boost/mpl/aux_/push_back_impl.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: push_back_impl.hpp 55679 2009-08-20 07:50:16Z agurtovoy $ -// $Date: 2009-08-20 00:50:16 -0700 (Thu, 20 Aug 2009) $ -// $Revision: 55679 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/push_front_impl.hpp b/boost/boost/mpl/aux_/push_front_impl.hpp index ae1bc22d33..5b83ee7645 100644 --- a/boost/boost/mpl/aux_/push_front_impl.hpp +++ b/boost/boost/mpl/aux_/push_front_impl.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: push_front_impl.hpp 55679 2009-08-20 07:50:16Z agurtovoy $ -// $Date: 2009-08-20 00:50:16 -0700 (Thu, 20 Aug 2009) $ -// $Revision: 55679 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/reverse_fold_impl.hpp b/boost/boost/mpl/aux_/reverse_fold_impl.hpp index 9c17c01295..a27a35fa13 100644 --- a/boost/boost/mpl/aux_/reverse_fold_impl.hpp +++ b/boost/boost/mpl/aux_/reverse_fold_impl.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: reverse_fold_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/aux_/reverse_fold_impl_body.hpp b/boost/boost/mpl/aux_/reverse_fold_impl_body.hpp index c815e0aed9..0f80010667 100644 --- a/boost/boost/mpl/aux_/reverse_fold_impl_body.hpp +++ b/boost/boost/mpl/aux_/reverse_fold_impl_body.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: reverse_fold_impl_body.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ # include # include diff --git a/boost/boost/mpl/aux_/sequence_wrapper.hpp b/boost/boost/mpl/aux_/sequence_wrapper.hpp index 8b49c74ed0..3f5e553039 100644 --- a/boost/boost/mpl/aux_/sequence_wrapper.hpp +++ b/boost/boost/mpl/aux_/sequence_wrapper.hpp @@ -13,9 +13,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: sequence_wrapper.hpp 49271 2008-10-11 06:46:00Z agurtovoy $ -// $Date: 2008-10-10 23:46:00 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49271 $ +// $Id$ +// $Date$ +// $Revision$ # include # include diff --git a/boost/boost/mpl/aux_/size_impl.hpp b/boost/boost/mpl/aux_/size_impl.hpp index 73dc50d19b..50f5ee9189 100644 --- a/boost/boost/mpl/aux_/size_impl.hpp +++ b/boost/boost/mpl/aux_/size_impl.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: size_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/static_cast.hpp b/boost/boost/mpl/aux_/static_cast.hpp index 8c12128e30..f72d1c7c9b 100644 --- a/boost/boost/mpl/aux_/static_cast.hpp +++ b/boost/boost/mpl/aux_/static_cast.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: static_cast.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/template_arity.hpp b/boost/boost/mpl/aux_/template_arity.hpp index 5e3f6e012a..f011159825 100644 --- a/boost/boost/mpl/aux_/template_arity.hpp +++ b/boost/boost/mpl/aux_/template_arity.hpp @@ -14,9 +14,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: template_arity.hpp 61584 2010-04-26 18:48:26Z agurtovoy $ -// $Date: 2010-04-26 11:48:26 -0700 (Mon, 26 Apr 2010) $ -// $Revision: 61584 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/template_arity_fwd.hpp b/boost/boost/mpl/aux_/template_arity_fwd.hpp index 44bc9d2146..19d63a3961 100644 --- a/boost/boost/mpl/aux_/template_arity_fwd.hpp +++ b/boost/boost/mpl/aux_/template_arity_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: template_arity_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { namespace aux { diff --git a/boost/boost/mpl/aux_/traits_lambda_spec.hpp b/boost/boost/mpl/aux_/traits_lambda_spec.hpp index c9b60fe78f..4a7ff26b58 100644 --- a/boost/boost/mpl/aux_/traits_lambda_spec.hpp +++ b/boost/boost/mpl/aux_/traits_lambda_spec.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: traits_lambda_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/type_wrapper.hpp b/boost/boost/mpl/aux_/type_wrapper.hpp index 6d6091bd35..f3ac3079a9 100644 --- a/boost/boost/mpl/aux_/type_wrapper.hpp +++ b/boost/boost/mpl/aux_/type_wrapper.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: type_wrapper.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/aux_/value_wknd.hpp b/boost/boost/mpl/aux_/value_wknd.hpp index 7baa8bf7eb..23fefde021 100644 --- a/boost/boost/mpl/aux_/value_wknd.hpp +++ b/boost/boost/mpl/aux_/value_wknd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: value_wknd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/aux_/yes_no.hpp b/boost/boost/mpl/aux_/yes_no.hpp index ebcb00dbbd..21a18a21c2 100644 --- a/boost/boost/mpl/aux_/yes_no.hpp +++ b/boost/boost/mpl/aux_/yes_no.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: yes_no.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/back_fwd.hpp b/boost/boost/mpl/back_fwd.hpp index c8b1fe9db4..119722c31a 100644 --- a/boost/boost/mpl/back_fwd.hpp +++ b/boost/boost/mpl/back_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: back_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { diff --git a/boost/boost/mpl/back_inserter.hpp b/boost/boost/mpl/back_inserter.hpp index ce2a2849a4..8fc4083c3a 100644 --- a/boost/boost/mpl/back_inserter.hpp +++ b/boost/boost/mpl/back_inserter.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: back_inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/begin_end.hpp b/boost/boost/mpl/begin_end.hpp index 6c3accc77c..b7074afd20 100644 --- a/boost/boost/mpl/begin_end.hpp +++ b/boost/boost/mpl/begin_end.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: begin_end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/begin_end_fwd.hpp b/boost/boost/mpl/begin_end_fwd.hpp index d1edaca7c8..70ef9efec4 100644 --- a/boost/boost/mpl/begin_end_fwd.hpp +++ b/boost/boost/mpl/begin_end_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: begin_end_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { diff --git a/boost/boost/mpl/bind.hpp b/boost/boost/mpl/bind.hpp index 25e46b4ff8..63ee3f27e2 100644 --- a/boost/boost/mpl/bind.hpp +++ b/boost/boost/mpl/bind.hpp @@ -15,9 +15,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: bind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/bind_fwd.hpp b/boost/boost/mpl/bind_fwd.hpp index 35795ac00e..4746edd60b 100644 --- a/boost/boost/mpl/bind_fwd.hpp +++ b/boost/boost/mpl/bind_fwd.hpp @@ -14,9 +14,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: bind_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/bool.hpp b/boost/boost/mpl/bool.hpp index cabf22f2ce..0a6180cedf 100644 --- a/boost/boost/mpl/bool.hpp +++ b/boost/boost/mpl/bool.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: bool.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include @@ -26,7 +26,7 @@ template< bool C_ > struct bool_ typedef integral_c_tag tag; typedef bool_ type; typedef bool value_type; - operator bool() const { return this->value; } + BOOST_CONSTEXPR operator bool() const { return this->value; } }; #if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) diff --git a/boost/boost/mpl/bool_fwd.hpp b/boost/boost/mpl/bool_fwd.hpp index e71ab9cc78..e629252848 100644 --- a/boost/boost/mpl/bool_fwd.hpp +++ b/boost/boost/mpl/bool_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: bool_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/clear.hpp b/boost/boost/mpl/clear.hpp index 9cf16fab46..c6b95edf4b 100644 --- a/boost/boost/mpl/clear.hpp +++ b/boost/boost/mpl/clear.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: clear.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/clear_fwd.hpp b/boost/boost/mpl/clear_fwd.hpp index e660bc26e9..d14a1d2b24 100644 --- a/boost/boost/mpl/clear_fwd.hpp +++ b/boost/boost/mpl/clear_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: clear_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { diff --git a/boost/boost/mpl/comparison.hpp b/boost/boost/mpl/comparison.hpp index 223b9efe17..99dca9dd80 100644 --- a/boost/boost/mpl/comparison.hpp +++ b/boost/boost/mpl/comparison.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: comparison.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/contains.hpp b/boost/boost/mpl/contains.hpp index 620fe41e73..02c2aa4f8b 100644 --- a/boost/boost/mpl/contains.hpp +++ b/boost/boost/mpl/contains.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: contains.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/contains_fwd.hpp b/boost/boost/mpl/contains_fwd.hpp index af7721a594..c7c667285d 100644 --- a/boost/boost/mpl/contains_fwd.hpp +++ b/boost/boost/mpl/contains_fwd.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: contains_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { diff --git a/boost/boost/mpl/copy.hpp b/boost/boost/mpl/copy.hpp index 6849ec87ab..6eafba3982 100644 --- a/boost/boost/mpl/copy.hpp +++ b/boost/boost/mpl/copy.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: copy.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/deref.hpp b/boost/boost/mpl/deref.hpp index 15479e17c5..1105ec9038 100644 --- a/boost/boost/mpl/deref.hpp +++ b/boost/boost/mpl/deref.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: deref.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/distance.hpp b/boost/boost/mpl/distance.hpp index 8ecd3c1b26..95f4f33510 100644 --- a/boost/boost/mpl/distance.hpp +++ b/boost/boost/mpl/distance.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: distance.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/distance_fwd.hpp b/boost/boost/mpl/distance_fwd.hpp index 766ceb4290..a69a7c5140 100644 --- a/boost/boost/mpl/distance_fwd.hpp +++ b/boost/boost/mpl/distance_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: distance_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/empty.hpp b/boost/boost/mpl/empty.hpp index e25c04c3ba..1185324c1b 100644 --- a/boost/boost/mpl/empty.hpp +++ b/boost/boost/mpl/empty.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/empty_fwd.hpp b/boost/boost/mpl/empty_fwd.hpp index 4bf68681e5..551c9660ab 100644 --- a/boost/boost/mpl/empty_fwd.hpp +++ b/boost/boost/mpl/empty_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: empty_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { diff --git a/boost/boost/mpl/equal_to.hpp b/boost/boost/mpl/equal_to.hpp index 359031c5c5..5dfc87dbe2 100644 --- a/boost/boost/mpl/equal_to.hpp +++ b/boost/boost/mpl/equal_to.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: equal_to.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #define AUX778076_OP_NAME equal_to #define AUX778076_OP_TOKEN == diff --git a/boost/boost/mpl/eval_if.hpp b/boost/boost/mpl/eval_if.hpp index f1a5b7002f..e892703fd8 100644 --- a/boost/boost/mpl/eval_if.hpp +++ b/boost/boost/mpl/eval_if.hpp @@ -4,15 +4,15 @@ // Copyright Aleksey Gurtovoy 2000-2004 // -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at +// 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 http://www.boost.org/libs/mpl for documentation. -// $Id: eval_if.hpp 61921 2010-05-11 21:33:24Z neilgroves $ -// $Date: 2010-05-11 14:33:24 -0700 (Tue, 11 May 2010) $ -// $Revision: 61921 $ +// $Id$ +// $Date$ +// $Revision$ #include #include @@ -43,7 +43,7 @@ struct eval_if BOOST_MPL_AUX_LAMBDA_SUPPORT(3,eval_if,(C,F1,F2)) }; -// (almost) copy & paste in order to save one more +// (almost) copy & paste in order to save one more // recursively nested template instantiation to user template< bool C diff --git a/boost/boost/mpl/find.hpp b/boost/boost/mpl/find.hpp index 7b094239b8..31a8b0eb89 100644 --- a/boost/boost/mpl/find.hpp +++ b/boost/boost/mpl/find.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: find.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/find_if.hpp b/boost/boost/mpl/find_if.hpp index a066e7120b..83a007e77e 100644 --- a/boost/boost/mpl/find_if.hpp +++ b/boost/boost/mpl/find_if.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: find_if.hpp 49274 2008-10-11 07:22:05Z agurtovoy $ -// $Date: 2008-10-11 00:22:05 -0700 (Sat, 11 Oct 2008) $ -// $Revision: 49274 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/fold.hpp b/boost/boost/mpl/fold.hpp index e5e02bd712..0bc67ef3d6 100644 --- a/boost/boost/mpl/fold.hpp +++ b/boost/boost/mpl/fold.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/front_fwd.hpp b/boost/boost/mpl/front_fwd.hpp index 62750010eb..f01282a77b 100644 --- a/boost/boost/mpl/front_fwd.hpp +++ b/boost/boost/mpl/front_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: front_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { diff --git a/boost/boost/mpl/front_inserter.hpp b/boost/boost/mpl/front_inserter.hpp index 7220f768bb..0a6b197ef8 100644 --- a/boost/boost/mpl/front_inserter.hpp +++ b/boost/boost/mpl/front_inserter.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: front_inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/greater.hpp b/boost/boost/mpl/greater.hpp index c73276b2b3..b1f0a2cf13 100644 --- a/boost/boost/mpl/greater.hpp +++ b/boost/boost/mpl/greater.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: greater.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #define AUX778076_OP_NAME greater #define AUX778076_OP_TOKEN > diff --git a/boost/boost/mpl/greater_equal.hpp b/boost/boost/mpl/greater_equal.hpp index 119710f87c..7a06a62e8e 100644 --- a/boost/boost/mpl/greater_equal.hpp +++ b/boost/boost/mpl/greater_equal.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: greater_equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #define AUX778076_OP_NAME greater_equal #define AUX778076_OP_TOKEN >= diff --git a/boost/boost/mpl/has_xxx.hpp b/boost/boost/mpl/has_xxx.hpp index 121bc4853f..82e67ddca4 100644 --- a/boost/boost/mpl/has_xxx.hpp +++ b/boost/boost/mpl/has_xxx.hpp @@ -12,9 +12,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: has_xxx.hpp 64146 2010-07-19 00:46:31Z djwalker $ -// $Date: 2010-07-18 17:46:31 -0700 (Sun, 18 Jul 2010) $ -// $Revision: 64146 $ +// $Id$ +// $Date$ +// $Revision$ #include #include @@ -155,10 +155,11 @@ template<> struct trait \ // SFINAE-based implementations below are derived from a USENET newsgroup's // posting by Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST) -# elif BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ +# elif BOOST_WORKAROUND(BOOST_MSVC, <= 1400) \ + || (BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1800)) && defined(__CUDACC__)) \ || BOOST_WORKAROUND(__IBMCPP__, <= 700) -// MSVC 7.1+ & VACPP +// MSVC 7.1 & MSVC 8.0 & VACPP // agurt, 15/jun/05: replace overload-based SFINAE implementation with SFINAE // applied to partial specialization to fix some apparently random failures @@ -290,18 +291,24 @@ struct trait \ # if !defined(BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES) # if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) # define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 1 +# else +# define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 0 # endif # endif # if !defined(BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION) # if (defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS)) # define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 1 +# else +# define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 0 # endif # endif # if !defined(BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE) # if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) # define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 1 +# else +# define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 0 # endif # endif diff --git a/boost/boost/mpl/identity.hpp b/boost/boost/mpl/identity.hpp index 5424f7103b..190d2f53f6 100644 --- a/boost/boost/mpl/identity.hpp +++ b/boost/boost/mpl/identity.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: identity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/if.hpp b/boost/boost/mpl/if.hpp index 245c993d98..b6bdf6c692 100644 --- a/boost/boost/mpl/if.hpp +++ b/boost/boost/mpl/if.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/insert_range.hpp b/boost/boost/mpl/insert_range.hpp index 30baf1d910..0c362f5ae1 100644 --- a/boost/boost/mpl/insert_range.hpp +++ b/boost/boost/mpl/insert_range.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: insert_range.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/insert_range_fwd.hpp b/boost/boost/mpl/insert_range_fwd.hpp index de85c0e646..d9c946f2a9 100644 --- a/boost/boost/mpl/insert_range_fwd.hpp +++ b/boost/boost/mpl/insert_range_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: insert_range_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { diff --git a/boost/boost/mpl/inserter.hpp b/boost/boost/mpl/inserter.hpp index 0c014d17b8..964df7f692 100644 --- a/boost/boost/mpl/inserter.hpp +++ b/boost/boost/mpl/inserter.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { diff --git a/boost/boost/mpl/int.hpp b/boost/boost/mpl/int.hpp index 14db5482ec..b7fa0a765f 100644 --- a/boost/boost/mpl/int.hpp +++ b/boost/boost/mpl/int.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: int.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/int_fwd.hpp b/boost/boost/mpl/int_fwd.hpp index 87b043c104..03d20c1cd6 100644 --- a/boost/boost/mpl/int_fwd.hpp +++ b/boost/boost/mpl/int_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: int_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/integral_c.hpp b/boost/boost/mpl/integral_c.hpp index e270dc500a..7a692dcab6 100644 --- a/boost/boost/mpl/integral_c.hpp +++ b/boost/boost/mpl/integral_c.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: integral_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/integral_c_fwd.hpp b/boost/boost/mpl/integral_c_fwd.hpp index 7fcbfd59d8..05e311daa1 100644 --- a/boost/boost/mpl/integral_c_fwd.hpp +++ b/boost/boost/mpl/integral_c_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: integral_c_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/integral_c_tag.hpp b/boost/boost/mpl/integral_c_tag.hpp index 27da563c7d..b6046920f8 100644 --- a/boost/boost/mpl/integral_c_tag.hpp +++ b/boost/boost/mpl/integral_c_tag.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: integral_c_tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/is_placeholder.hpp b/boost/boost/mpl/is_placeholder.hpp index 565df89cb2..9f79ef102c 100644 --- a/boost/boost/mpl/is_placeholder.hpp +++ b/boost/boost/mpl/is_placeholder.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: is_placeholder.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/iter_fold.hpp b/boost/boost/mpl/iter_fold.hpp index 1b52dd43c2..1b56b79040 100644 --- a/boost/boost/mpl/iter_fold.hpp +++ b/boost/boost/mpl/iter_fold.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: iter_fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/iter_fold_if.hpp b/boost/boost/mpl/iter_fold_if.hpp index 01847ef541..0115b7b224 100644 --- a/boost/boost/mpl/iter_fold_if.hpp +++ b/boost/boost/mpl/iter_fold_if.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: iter_fold_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/iterator_range.hpp b/boost/boost/mpl/iterator_range.hpp index 995ddc0334..a637e2241a 100644 --- a/boost/boost/mpl/iterator_range.hpp +++ b/boost/boost/mpl/iterator_range.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: iterator_range.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/iterator_tags.hpp b/boost/boost/mpl/iterator_tags.hpp index fce273446b..7c3116ab45 100644 --- a/boost/boost/mpl/iterator_tags.hpp +++ b/boost/boost/mpl/iterator_tags.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: iterator_tags.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/joint_view.hpp b/boost/boost/mpl/joint_view.hpp index 2672fad348..cd9cddac7e 100644 --- a/boost/boost/mpl/joint_view.hpp +++ b/boost/boost/mpl/joint_view.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: joint_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/lambda.hpp b/boost/boost/mpl/lambda.hpp index 05c27167e8..cc8f6075ce 100644 --- a/boost/boost/mpl/lambda.hpp +++ b/boost/boost/mpl/lambda.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: lambda.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/lambda_fwd.hpp b/boost/boost/mpl/lambda_fwd.hpp index 16c73e4ad8..57b0426410 100644 --- a/boost/boost/mpl/lambda_fwd.hpp +++ b/boost/boost/mpl/lambda_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: lambda_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/less.hpp b/boost/boost/mpl/less.hpp index 33a570c2c8..63da5aa4ef 100644 --- a/boost/boost/mpl/less.hpp +++ b/boost/boost/mpl/less.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: less.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #define AUX778076_OP_NAME less #define AUX778076_OP_TOKEN < diff --git a/boost/boost/mpl/less_equal.hpp b/boost/boost/mpl/less_equal.hpp index 8b9a4ffe89..3d668c2790 100644 --- a/boost/boost/mpl/less_equal.hpp +++ b/boost/boost/mpl/less_equal.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: less_equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #define AUX778076_OP_NAME less_equal #define AUX778076_OP_TOKEN <= diff --git a/boost/boost/mpl/limits/arity.hpp b/boost/boost/mpl/limits/arity.hpp index 9da70ab34d..8c3eb362ce 100644 --- a/boost/boost/mpl/limits/arity.hpp +++ b/boost/boost/mpl/limits/arity.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: arity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) # define BOOST_MPL_LIMIT_METAFUNCTION_ARITY 5 diff --git a/boost/boost/mpl/limits/list.hpp b/boost/boost/mpl/limits/list.hpp index 6ae7387dca..b22d6a7b81 100644 --- a/boost/boost/mpl/limits/list.hpp +++ b/boost/boost/mpl/limits/list.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: list.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_LIMIT_LIST_SIZE) # define BOOST_MPL_LIMIT_LIST_SIZE 20 diff --git a/boost/boost/mpl/limits/unrolling.hpp b/boost/boost/mpl/limits/unrolling.hpp index 3914f0aaab..6dba94222e 100644 --- a/boost/boost/mpl/limits/unrolling.hpp +++ b/boost/boost/mpl/limits/unrolling.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: unrolling.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_LIMIT_UNROLLING) # define BOOST_MPL_LIMIT_UNROLLING 4 diff --git a/boost/boost/mpl/limits/vector.hpp b/boost/boost/mpl/limits/vector.hpp index 5de3811c40..9007589168 100644 --- a/boost/boost/mpl/limits/vector.hpp +++ b/boost/boost/mpl/limits/vector.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: vector.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_LIMIT_VECTOR_SIZE) # define BOOST_MPL_LIMIT_VECTOR_SIZE 20 diff --git a/boost/boost/mpl/list.hpp b/boost/boost/mpl/list.hpp index 6d968314a8..cff8a4ddd8 100644 --- a/boost/boost/mpl/list.hpp +++ b/boost/boost/mpl/list.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: list.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/list/aux_/O1_size.hpp b/boost/boost/mpl/list/aux_/O1_size.hpp index 0d93dabe28..ccbc3f1b32 100644 --- a/boost/boost/mpl/list/aux_/O1_size.hpp +++ b/boost/boost/mpl/list/aux_/O1_size.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/list/aux_/begin_end.hpp b/boost/boost/mpl/list/aux_/begin_end.hpp index 7fbddad59e..b568bee21c 100644 --- a/boost/boost/mpl/list/aux_/begin_end.hpp +++ b/boost/boost/mpl/list/aux_/begin_end.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: begin_end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/list/aux_/clear.hpp b/boost/boost/mpl/list/aux_/clear.hpp index 3deafe7a0b..b16162f7c0 100644 --- a/boost/boost/mpl/list/aux_/clear.hpp +++ b/boost/boost/mpl/list/aux_/clear.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: clear.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/list/aux_/empty.hpp b/boost/boost/mpl/list/aux_/empty.hpp index c282cfe3db..95f9243947 100644 --- a/boost/boost/mpl/list/aux_/empty.hpp +++ b/boost/boost/mpl/list/aux_/empty.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/list/aux_/front.hpp b/boost/boost/mpl/list/aux_/front.hpp index eb0b689e4b..9bea1fd342 100644 --- a/boost/boost/mpl/list/aux_/front.hpp +++ b/boost/boost/mpl/list/aux_/front.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/list/aux_/include_preprocessed.hpp b/boost/boost/mpl/list/aux_/include_preprocessed.hpp index 4e7f6e4501..4f7cab2609 100644 --- a/boost/boost/mpl/list/aux_/include_preprocessed.hpp +++ b/boost/boost/mpl/list/aux_/include_preprocessed.hpp @@ -7,9 +7,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! diff --git a/boost/boost/mpl/list/aux_/item.hpp b/boost/boost/mpl/list/aux_/item.hpp index 24b5e40602..8505deb284 100644 --- a/boost/boost/mpl/list/aux_/item.hpp +++ b/boost/boost/mpl/list/aux_/item.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/list/aux_/iterator.hpp b/boost/boost/mpl/list/aux_/iterator.hpp index 4d0431fd79..6b5ea78630 100644 --- a/boost/boost/mpl/list/aux_/iterator.hpp +++ b/boost/boost/mpl/list/aux_/iterator.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/list/aux_/numbered.hpp b/boost/boost/mpl/list/aux_/numbered.hpp index 7b661e51e2..0cd49a6d36 100644 --- a/boost/boost/mpl/list/aux_/numbered.hpp +++ b/boost/boost/mpl/list/aux_/numbered.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: numbered.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if defined(BOOST_PP_IS_ITERATING) diff --git a/boost/boost/mpl/list/aux_/numbered_c.hpp b/boost/boost/mpl/list/aux_/numbered_c.hpp index 0c8e9f6d11..0006fd6cfc 100644 --- a/boost/boost/mpl/list/aux_/numbered_c.hpp +++ b/boost/boost/mpl/list/aux_/numbered_c.hpp @@ -9,9 +9,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: numbered_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if defined(BOOST_PP_IS_ITERATING) diff --git a/boost/boost/mpl/list/aux_/pop_front.hpp b/boost/boost/mpl/list/aux_/pop_front.hpp index 9c72228971..46a0414569 100644 --- a/boost/boost/mpl/list/aux_/pop_front.hpp +++ b/boost/boost/mpl/list/aux_/pop_front.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: pop_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/list/aux_/push_back.hpp b/boost/boost/mpl/list/aux_/push_back.hpp index 8e9c34ba1c..8f3b73e430 100644 --- a/boost/boost/mpl/list/aux_/push_back.hpp +++ b/boost/boost/mpl/list/aux_/push_back.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: push_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/list/aux_/push_front.hpp b/boost/boost/mpl/list/aux_/push_front.hpp index 942508b7a7..fcfbe4ab3e 100644 --- a/boost/boost/mpl/list/aux_/push_front.hpp +++ b/boost/boost/mpl/list/aux_/push_front.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/list/aux_/size.hpp b/boost/boost/mpl/list/aux_/size.hpp index 9d7191f2e1..f5e7feafda 100644 --- a/boost/boost/mpl/list/aux_/size.hpp +++ b/boost/boost/mpl/list/aux_/size.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/list/aux_/tag.hpp b/boost/boost/mpl/list/aux_/tag.hpp index e1a75337ad..f5ed2bbfe6 100644 --- a/boost/boost/mpl/list/aux_/tag.hpp +++ b/boost/boost/mpl/list/aux_/tag.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { namespace aux { diff --git a/boost/boost/mpl/list/list0.hpp b/boost/boost/mpl/list/list0.hpp index 3ecdac34c8..8e06b8d088 100644 --- a/boost/boost/mpl/list/list0.hpp +++ b/boost/boost/mpl/list/list0.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: list0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/list/list0_c.hpp b/boost/boost/mpl/list/list0_c.hpp index 066661faa5..807ca1c2c9 100644 --- a/boost/boost/mpl/list/list0_c.hpp +++ b/boost/boost/mpl/list/list0_c.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: list0_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/list/list10.hpp b/boost/boost/mpl/list/list10.hpp index 23546948c3..d32d0d8c77 100644 --- a/boost/boost/mpl/list/list10.hpp +++ b/boost/boost/mpl/list/list10.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: list10.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/list/list10_c.hpp b/boost/boost/mpl/list/list10_c.hpp index b1c8e1b274..25c8f9defb 100644 --- a/boost/boost/mpl/list/list10_c.hpp +++ b/boost/boost/mpl/list/list10_c.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: list10_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/list/list20.hpp b/boost/boost/mpl/list/list20.hpp index 29f7d5dde3..724cabd237 100644 --- a/boost/boost/mpl/list/list20.hpp +++ b/boost/boost/mpl/list/list20.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: list20.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/list/list20_c.hpp b/boost/boost/mpl/list/list20_c.hpp index d7f772ce9c..0026f695ac 100644 --- a/boost/boost/mpl/list/list20_c.hpp +++ b/boost/boost/mpl/list/list20_c.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: list20_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/list/list30.hpp b/boost/boost/mpl/list/list30.hpp index 704cbdf6f6..a9004c7376 100644 --- a/boost/boost/mpl/list/list30.hpp +++ b/boost/boost/mpl/list/list30.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: list30.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/list/list30_c.hpp b/boost/boost/mpl/list/list30_c.hpp index 54fd22f925..c996574778 100644 --- a/boost/boost/mpl/list/list30_c.hpp +++ b/boost/boost/mpl/list/list30_c.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: list30_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/list/list40.hpp b/boost/boost/mpl/list/list40.hpp index 11d12e36aa..02f869efbe 100644 --- a/boost/boost/mpl/list/list40.hpp +++ b/boost/boost/mpl/list/list40.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: list40.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/list/list40_c.hpp b/boost/boost/mpl/list/list40_c.hpp index 0ae99fc08c..808d599dd9 100644 --- a/boost/boost/mpl/list/list40_c.hpp +++ b/boost/boost/mpl/list/list40_c.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: list40_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/list/list50.hpp b/boost/boost/mpl/list/list50.hpp index 4050a81cb0..f16c68ceba 100644 --- a/boost/boost/mpl/list/list50.hpp +++ b/boost/boost/mpl/list/list50.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: list50.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/list/list50_c.hpp b/boost/boost/mpl/list/list50_c.hpp index 4b5b654038..20692d898e 100644 --- a/boost/boost/mpl/list/list50_c.hpp +++ b/boost/boost/mpl/list/list50_c.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: list50_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/logical.hpp b/boost/boost/mpl/logical.hpp index f8b8fc3dba..c8236b5fe8 100644 --- a/boost/boost/mpl/logical.hpp +++ b/boost/boost/mpl/logical.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: logical.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/long.hpp b/boost/boost/mpl/long.hpp index 1c79afd3d6..c455267341 100644 --- a/boost/boost/mpl/long.hpp +++ b/boost/boost/mpl/long.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: long.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/long_fwd.hpp b/boost/boost/mpl/long_fwd.hpp index 17accd3976..5f62f2b81c 100644 --- a/boost/boost/mpl/long_fwd.hpp +++ b/boost/boost/mpl/long_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: long_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/minus.hpp b/boost/boost/mpl/minus.hpp index 123b8afecb..9f29f74b54 100644 --- a/boost/boost/mpl/minus.hpp +++ b/boost/boost/mpl/minus.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: minus.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #define AUX778076_OP_NAME minus #define AUX778076_OP_TOKEN - diff --git a/boost/boost/mpl/multiplies.hpp b/boost/boost/mpl/multiplies.hpp index 1c0ec9f54e..53c39d98a4 100644 --- a/boost/boost/mpl/multiplies.hpp +++ b/boost/boost/mpl/multiplies.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: multiplies.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/negate.hpp b/boost/boost/mpl/negate.hpp index 3d51caf38c..d6aa065459 100644 --- a/boost/boost/mpl/negate.hpp +++ b/boost/boost/mpl/negate.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: negate.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/next.hpp b/boost/boost/mpl/next.hpp index fcfb01bb11..954b2226c6 100644 --- a/boost/boost/mpl/next.hpp +++ b/boost/boost/mpl/next.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: next.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/next_prior.hpp b/boost/boost/mpl/next_prior.hpp index c65d4c4d10..d45fa20eaa 100644 --- a/boost/boost/mpl/next_prior.hpp +++ b/boost/boost/mpl/next_prior.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: next_prior.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/not.hpp b/boost/boost/mpl/not.hpp index 9886d7d8b2..d5f6025579 100644 --- a/boost/boost/mpl/not.hpp +++ b/boost/boost/mpl/not.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: not.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/not_equal_to.hpp b/boost/boost/mpl/not_equal_to.hpp index b6997dffdf..11ef3424c9 100644 --- a/boost/boost/mpl/not_equal_to.hpp +++ b/boost/boost/mpl/not_equal_to.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: not_equal_to.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #define AUX778076_OP_NAME not_equal_to #define AUX778076_OP_TOKEN != diff --git a/boost/boost/mpl/numeric_cast.hpp b/boost/boost/mpl/numeric_cast.hpp index f890e44ee8..6541470445 100644 --- a/boost/boost/mpl/numeric_cast.hpp +++ b/boost/boost/mpl/numeric_cast.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: numeric_cast.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/or.hpp b/boost/boost/mpl/or.hpp index 16b42c1439..f9704d5166 100644 --- a/boost/boost/mpl/or.hpp +++ b/boost/boost/mpl/or.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: or.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include @@ -29,7 +29,7 @@ // 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(or)' // has to be checked in a separate condition, otherwise GCC complains // about 'or' being an alternative token -#if defined(_MSC_VER) +#if defined(_MSC_VER) && !defined(__clang__) #ifndef __GCCXML__ #if defined(or) # pragma push_macro("or") @@ -42,7 +42,7 @@ # define BOOST_MPL_PREPROCESSED_HEADER or.hpp # include -#if defined(_MSC_VER) +#if defined(_MSC_VER) && !defined(__clang__) #ifndef __GCCXML__ #if defined(or) # pragma pop_macro("or") diff --git a/boost/boost/mpl/pair.hpp b/boost/boost/mpl/pair.hpp index 9336ca19ea..67c01d73ce 100644 --- a/boost/boost/mpl/pair.hpp +++ b/boost/boost/mpl/pair.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: pair.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/placeholders.hpp b/boost/boost/mpl/placeholders.hpp index 891a81851a..df0373ca57 100644 --- a/boost/boost/mpl/placeholders.hpp +++ b/boost/boost/mpl/placeholders.hpp @@ -15,9 +15,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: placeholders.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) diff --git a/boost/boost/mpl/plus.hpp b/boost/boost/mpl/plus.hpp index 9f68c49bdc..455920b5d1 100644 --- a/boost/boost/mpl/plus.hpp +++ b/boost/boost/mpl/plus.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: plus.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #define AUX778076_OP_NAME plus #define AUX778076_OP_TOKEN + diff --git a/boost/boost/mpl/pop_back_fwd.hpp b/boost/boost/mpl/pop_back_fwd.hpp index c8209a790a..70957046cd 100644 --- a/boost/boost/mpl/pop_back_fwd.hpp +++ b/boost/boost/mpl/pop_back_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: pop_back_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { diff --git a/boost/boost/mpl/pop_front_fwd.hpp b/boost/boost/mpl/pop_front_fwd.hpp index eb78347b98..719c8b218a 100644 --- a/boost/boost/mpl/pop_front_fwd.hpp +++ b/boost/boost/mpl/pop_front_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: pop_front_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { diff --git a/boost/boost/mpl/prior.hpp b/boost/boost/mpl/prior.hpp index b8f0dff2d5..849802cfa1 100644 --- a/boost/boost/mpl/prior.hpp +++ b/boost/boost/mpl/prior.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: prior.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/protect.hpp b/boost/boost/mpl/protect.hpp index e3daa4feef..80574c2750 100644 --- a/boost/boost/mpl/protect.hpp +++ b/boost/boost/mpl/protect.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: protect.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/push_back.hpp b/boost/boost/mpl/push_back.hpp index 2e8ad068ec..95a2587be6 100644 --- a/boost/boost/mpl/push_back.hpp +++ b/boost/boost/mpl/push_back.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: push_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/push_back_fwd.hpp b/boost/boost/mpl/push_back_fwd.hpp index ef04ff537f..7a4f7a754a 100644 --- a/boost/boost/mpl/push_back_fwd.hpp +++ b/boost/boost/mpl/push_back_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: push_back_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { diff --git a/boost/boost/mpl/push_front.hpp b/boost/boost/mpl/push_front.hpp index ca943bbee5..e4d0dfb7fb 100644 --- a/boost/boost/mpl/push_front.hpp +++ b/boost/boost/mpl/push_front.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/push_front_fwd.hpp b/boost/boost/mpl/push_front_fwd.hpp index fa3667ca56..d6ad5af572 100644 --- a/boost/boost/mpl/push_front_fwd.hpp +++ b/boost/boost/mpl/push_front_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: push_front_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { diff --git a/boost/boost/mpl/quote.hpp b/boost/boost/mpl/quote.hpp index 53b57124af..242c2e7afb 100644 --- a/boost/boost/mpl/quote.hpp +++ b/boost/boost/mpl/quote.hpp @@ -14,9 +14,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: quote.hpp 49272 2008-10-11 06:50:46Z agurtovoy $ -// $Date: 2008-10-10 23:50:46 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49272 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/remove_if.hpp b/boost/boost/mpl/remove_if.hpp index 1275bd43dc..bbe6564b09 100644 --- a/boost/boost/mpl/remove_if.hpp +++ b/boost/boost/mpl/remove_if.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: remove_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/reverse_fold.hpp b/boost/boost/mpl/reverse_fold.hpp index bcf3157d18..87c26a9a84 100644 --- a/boost/boost/mpl/reverse_fold.hpp +++ b/boost/boost/mpl/reverse_fold.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: reverse_fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/same_as.hpp b/boost/boost/mpl/same_as.hpp index c82cfd7caa..4be20bc33e 100644 --- a/boost/boost/mpl/same_as.hpp +++ b/boost/boost/mpl/same_as.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: same_as.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/sequence_tag.hpp b/boost/boost/mpl/sequence_tag.hpp index 479175e3cb..f87d92b28b 100644 --- a/boost/boost/mpl/sequence_tag.hpp +++ b/boost/boost/mpl/sequence_tag.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: sequence_tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/sequence_tag_fwd.hpp b/boost/boost/mpl/sequence_tag_fwd.hpp index 07a6707e00..4b0ed6f6b7 100644 --- a/boost/boost/mpl/sequence_tag_fwd.hpp +++ b/boost/boost/mpl/sequence_tag_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: sequence_tag_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { diff --git a/boost/boost/mpl/size.hpp b/boost/boost/mpl/size.hpp index 54b13cbb27..12ffefbb78 100644 --- a/boost/boost/mpl/size.hpp +++ b/boost/boost/mpl/size.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/size_fwd.hpp b/boost/boost/mpl/size_fwd.hpp index 8702da7f88..c72628dd1e 100644 --- a/boost/boost/mpl/size_fwd.hpp +++ b/boost/boost/mpl/size_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: size_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ namespace boost { namespace mpl { diff --git a/boost/boost/mpl/size_t.hpp b/boost/boost/mpl/size_t.hpp index 54a05c6a22..99e9b41d0d 100644 --- a/boost/boost/mpl/size_t.hpp +++ b/boost/boost/mpl/size_t.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: size_t.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/size_t_fwd.hpp b/boost/boost/mpl/size_t_fwd.hpp index 396a521ffe..ffdf4b32dc 100644 --- a/boost/boost/mpl/size_t_fwd.hpp +++ b/boost/boost/mpl/size_t_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: size_t_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include // make sure 'size_t' is placed into 'std' diff --git a/boost/boost/mpl/string.hpp b/boost/boost/mpl/string.hpp index c62d8ab9bc..345918f902 100644 --- a/boost/boost/mpl/string.hpp +++ b/boost/boost/mpl/string.hpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include @@ -59,7 +59,7 @@ namespace boost { namespace mpl #define BOOST_MPL_MULTICHAR_LENGTH(c) \ (std::size_t)((c0xffffff)+(c>0xffff)+(c>0xff)+1)) - #if defined(BOOST_LITTLE_ENDIAN) && defined(__SUNPRO_CC) + #if defined(BOOST_ENDIAN_LITTLE_BYTE) && defined(__SUNPRO_CC) #define BOOST_MPL_MULTICHAR_AT(c,i) \ (char)(0xff&((unsigned)(c)>>(8*(std::size_t)(i)))) diff --git a/boost/boost/mpl/tag.hpp b/boost/boost/mpl/tag.hpp index fc0aee233b..858627753d 100644 --- a/boost/boost/mpl/tag.hpp +++ b/boost/boost/mpl/tag.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/times.hpp b/boost/boost/mpl/times.hpp index c73256df79..f309557c6b 100644 --- a/boost/boost/mpl/times.hpp +++ b/boost/boost/mpl/times.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: times.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #define AUX778076_OP_NAME times #define AUX778076_OP_TOKEN * diff --git a/boost/boost/mpl/vector.hpp b/boost/boost/mpl/vector.hpp index 833f193150..479983d5ce 100644 --- a/boost/boost/mpl/vector.hpp +++ b/boost/boost/mpl/vector.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: vector.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/vector/aux_/O1_size.hpp b/boost/boost/mpl/vector/aux_/O1_size.hpp index 3ca8d214cf..ac9e3cf887 100644 --- a/boost/boost/mpl/vector/aux_/O1_size.hpp +++ b/boost/boost/mpl/vector/aux_/O1_size.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/at.hpp b/boost/boost/mpl/vector/aux_/at.hpp index 9da05956c9..0a7583ccf1 100644 --- a/boost/boost/mpl/vector/aux_/at.hpp +++ b/boost/boost/mpl/vector/aux_/at.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: at.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/back.hpp b/boost/boost/mpl/vector/aux_/back.hpp index ce84c7a019..b66363ec11 100644 --- a/boost/boost/mpl/vector/aux_/back.hpp +++ b/boost/boost/mpl/vector/aux_/back.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/begin_end.hpp b/boost/boost/mpl/vector/aux_/begin_end.hpp index d79ef9a072..aa34451566 100644 --- a/boost/boost/mpl/vector/aux_/begin_end.hpp +++ b/boost/boost/mpl/vector/aux_/begin_end.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: begin_end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/mpl/vector/aux_/clear.hpp b/boost/boost/mpl/vector/aux_/clear.hpp index 3308518a2a..b06d8be752 100644 --- a/boost/boost/mpl/vector/aux_/clear.hpp +++ b/boost/boost/mpl/vector/aux_/clear.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: clear.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/empty.hpp b/boost/boost/mpl/vector/aux_/empty.hpp index 84c879222f..5490a5f72f 100644 --- a/boost/boost/mpl/vector/aux_/empty.hpp +++ b/boost/boost/mpl/vector/aux_/empty.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/front.hpp b/boost/boost/mpl/vector/aux_/front.hpp index ff2414eeb6..a358db52cf 100644 --- a/boost/boost/mpl/vector/aux_/front.hpp +++ b/boost/boost/mpl/vector/aux_/front.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/include_preprocessed.hpp b/boost/boost/mpl/vector/aux_/include_preprocessed.hpp index 5c16008218..a676116f60 100644 --- a/boost/boost/mpl/vector/aux_/include_preprocessed.hpp +++ b/boost/boost/mpl/vector/aux_/include_preprocessed.hpp @@ -9,9 +9,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/item.hpp b/boost/boost/mpl/vector/aux_/item.hpp index da2b01ba93..71538ceb41 100644 --- a/boost/boost/mpl/vector/aux_/item.hpp +++ b/boost/boost/mpl/vector/aux_/item.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/iterator.hpp b/boost/boost/mpl/vector/aux_/iterator.hpp index 770ed15d0e..32df315696 100644 --- a/boost/boost/mpl/vector/aux_/iterator.hpp +++ b/boost/boost/mpl/vector/aux_/iterator.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/numbered.hpp b/boost/boost/mpl/vector/aux_/numbered.hpp index 04265a39a4..b3f03873ba 100644 --- a/boost/boost/mpl/vector/aux_/numbered.hpp +++ b/boost/boost/mpl/vector/aux_/numbered.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: numbered.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/numbered_c.hpp b/boost/boost/mpl/vector/aux_/numbered_c.hpp index 6a7cf40e5d..4c159f948c 100644 --- a/boost/boost/mpl/vector/aux_/numbered_c.hpp +++ b/boost/boost/mpl/vector/aux_/numbered_c.hpp @@ -11,9 +11,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: numbered_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/pop_back.hpp b/boost/boost/mpl/vector/aux_/pop_back.hpp index a43a3a6b7d..1d95e355c0 100644 --- a/boost/boost/mpl/vector/aux_/pop_back.hpp +++ b/boost/boost/mpl/vector/aux_/pop_back.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: pop_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/pop_front.hpp b/boost/boost/mpl/vector/aux_/pop_front.hpp index a448d25bf3..c94b8711c4 100644 --- a/boost/boost/mpl/vector/aux_/pop_front.hpp +++ b/boost/boost/mpl/vector/aux_/pop_front.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: pop_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/push_back.hpp b/boost/boost/mpl/vector/aux_/push_back.hpp index d8783ccb48..527828c9ba 100644 --- a/boost/boost/mpl/vector/aux_/push_back.hpp +++ b/boost/boost/mpl/vector/aux_/push_back.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: push_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/push_front.hpp b/boost/boost/mpl/vector/aux_/push_front.hpp index 26b5f0002c..f315de58b7 100644 --- a/boost/boost/mpl/vector/aux_/push_front.hpp +++ b/boost/boost/mpl/vector/aux_/push_front.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/size.hpp b/boost/boost/mpl/vector/aux_/size.hpp index 41b7be635b..c131e8866d 100644 --- a/boost/boost/mpl/vector/aux_/size.hpp +++ b/boost/boost/mpl/vector/aux_/size.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/tag.hpp b/boost/boost/mpl/vector/aux_/tag.hpp index 0f37e92adb..90d16e38c0 100644 --- a/boost/boost/mpl/vector/aux_/tag.hpp +++ b/boost/boost/mpl/vector/aux_/tag.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/aux_/vector0.hpp b/boost/boost/mpl/vector/aux_/vector0.hpp index b3bb13bbaa..402667360d 100644 --- a/boost/boost/mpl/vector/aux_/vector0.hpp +++ b/boost/boost/mpl/vector/aux_/vector0.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: vector0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/vector0.hpp b/boost/boost/mpl/vector/vector0.hpp index 9d18104eb7..39759ddc24 100644 --- a/boost/boost/mpl/vector/vector0.hpp +++ b/boost/boost/mpl/vector/vector0.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: vector0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/vector0_c.hpp b/boost/boost/mpl/vector/vector0_c.hpp index eb1dcf98b1..0e60215ddd 100644 --- a/boost/boost/mpl/vector/vector0_c.hpp +++ b/boost/boost/mpl/vector/vector0_c.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: vector0_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/vector/vector10.hpp b/boost/boost/mpl/vector/vector10.hpp index 848dd82c0b..53a2a163ae 100644 --- a/boost/boost/mpl/vector/vector10.hpp +++ b/boost/boost/mpl/vector/vector10.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: vector10.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/vector/vector10_c.hpp b/boost/boost/mpl/vector/vector10_c.hpp index 4e6cf3b6e4..be52d2f7f3 100644 --- a/boost/boost/mpl/vector/vector10_c.hpp +++ b/boost/boost/mpl/vector/vector10_c.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: vector10_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/vector/vector20.hpp b/boost/boost/mpl/vector/vector20.hpp index 173eacfffe..96d1b9f45c 100644 --- a/boost/boost/mpl/vector/vector20.hpp +++ b/boost/boost/mpl/vector/vector20.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: vector20.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/vector/vector20_c.hpp b/boost/boost/mpl/vector/vector20_c.hpp index c6b7187c26..3913f26026 100644 --- a/boost/boost/mpl/vector/vector20_c.hpp +++ b/boost/boost/mpl/vector/vector20_c.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: vector20_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/vector/vector30.hpp b/boost/boost/mpl/vector/vector30.hpp index 476ec354b9..b2f0a5eb05 100644 --- a/boost/boost/mpl/vector/vector30.hpp +++ b/boost/boost/mpl/vector/vector30.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: vector30.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/vector/vector30_c.hpp b/boost/boost/mpl/vector/vector30_c.hpp index c20d8f980e..94cdab465a 100644 --- a/boost/boost/mpl/vector/vector30_c.hpp +++ b/boost/boost/mpl/vector/vector30_c.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: vector30_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/vector/vector40.hpp b/boost/boost/mpl/vector/vector40.hpp index 69203d0cb4..2d2ef8195c 100644 --- a/boost/boost/mpl/vector/vector40.hpp +++ b/boost/boost/mpl/vector/vector40.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: vector40.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/vector/vector40_c.hpp b/boost/boost/mpl/vector/vector40_c.hpp index bd7310c148..25e2ebf3d2 100644 --- a/boost/boost/mpl/vector/vector40_c.hpp +++ b/boost/boost/mpl/vector/vector40_c.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: vector40_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/vector/vector50.hpp b/boost/boost/mpl/vector/vector50.hpp index 4c3e23181f..dc2d5c20a4 100644 --- a/boost/boost/mpl/vector/vector50.hpp +++ b/boost/boost/mpl/vector/vector50.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: vector50.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/vector/vector50_c.hpp b/boost/boost/mpl/vector/vector50_c.hpp index 2d2e705601..7388bf404b 100644 --- a/boost/boost/mpl/vector/vector50_c.hpp +++ b/boost/boost/mpl/vector/vector50_c.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: vector50_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include diff --git a/boost/boost/mpl/void.hpp b/boost/boost/mpl/void.hpp index ad5aa56460..3dcbdd1d0e 100644 --- a/boost/boost/mpl/void.hpp +++ b/boost/boost/mpl/void.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: void.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/mpl/void_fwd.hpp b/boost/boost/mpl/void_fwd.hpp index 9643dec302..86078b5c9e 100644 --- a/boost/boost/mpl/void_fwd.hpp +++ b/boost/boost/mpl/void_fwd.hpp @@ -10,9 +10,9 @@ // // See http://www.boost.org/libs/mpl for documentation. -// $Id: void_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $Id$ +// $Date$ +// $Revision$ #include diff --git a/boost/boost/next_prior.hpp b/boost/boost/next_prior.hpp index e1d2e42891..7854ec436a 100644 --- a/boost/boost/next_prior.hpp +++ b/boost/boost/next_prior.hpp @@ -13,6 +13,17 @@ #define BOOST_NEXT_PRIOR_HPP_INCLUDED #include +#if defined(_MSC_VER) && _MSC_VER <= 1310 +#include +#include +#endif +#include +#include +#include +#include +#include +#include +#include namespace boost { @@ -26,14 +37,118 @@ namespace boost { // Contributed by Dave Abrahams +namespace next_prior_detail { + +template< typename T, typename Distance, bool HasPlus = has_plus< T, Distance >::value > +struct next_impl2 +{ + static T call(T x, Distance n) + { + std::advance(x, n); + return x; + } +}; + +template< typename T, typename Distance > +struct next_impl2< T, Distance, true > +{ + static T call(T x, Distance n) + { + return x + n; + } +}; + + +template< typename T, typename Distance, bool HasPlusAssign = has_plus_assign< T, Distance >::value > +struct next_impl1 : + public next_impl2< T, Distance > +{ +}; + +template< typename T, typename Distance > +struct next_impl1< T, Distance, true > +{ + static T call(T x, Distance n) + { + x += n; + return x; + } +}; + + +template< + typename T, + typename Distance, + typename PromotedDistance = typename integral_promotion< Distance >::type, +#if !defined(_MSC_VER) || _MSC_VER > 1310 + bool IsUInt = is_unsigned< PromotedDistance >::value +#else + // MSVC 7.1 has problems with applying is_unsigned to non-integral types + bool IsUInt = mpl::and_< is_integral< PromotedDistance >, is_unsigned< PromotedDistance > >::value +#endif +> +struct prior_impl3 +{ + static T call(T x, Distance n) + { + std::advance(x, -n); + return x; + } +}; + +template< typename T, typename Distance, typename PromotedDistance > +struct prior_impl3< T, Distance, PromotedDistance, true > +{ + static T call(T x, Distance n) + { + typedef typename make_signed< PromotedDistance >::type signed_distance; + std::advance(x, -static_cast< signed_distance >(static_cast< PromotedDistance >(n))); + return x; + } +}; + + +template< typename T, typename Distance, bool HasMinus = has_minus< T, Distance >::value > +struct prior_impl2 : + public prior_impl3< T, Distance > +{ +}; + +template< typename T, typename Distance > +struct prior_impl2< T, Distance, true > +{ + static T call(T x, Distance n) + { + return x - n; + } +}; + + +template< typename T, typename Distance, bool HasMinusAssign = has_minus_assign< T, Distance >::value > +struct prior_impl1 : + public prior_impl2< T, Distance > +{ +}; + +template< typename T, typename Distance > +struct prior_impl1< T, Distance, true > +{ + static T call(T x, Distance n) + { + x -= n; + return x; + } +}; + +} // namespace next_prior_detail + template inline T next(T x) { return ++x; } template inline T next(T x, Distance n) { - std::advance(x, n); - return x; + return next_prior_detail::next_impl1< T, Distance >::call(x, n); } template @@ -42,8 +157,7 @@ inline T prior(T x) { return --x; } template inline T prior(T x, Distance n) { - std::advance(x, -n); - return x; + return next_prior_detail::prior_impl1< T, Distance >::call(x, n); } } // namespace boost diff --git a/boost/boost/noncopyable.hpp b/boost/boost/noncopyable.hpp index eb8e2e70da..e998ee864a 100644 --- a/boost/boost/noncopyable.hpp +++ b/boost/boost/noncopyable.hpp @@ -1,48 +1,17 @@ -// Boost noncopyable.hpp header file --------------------------------------// +/* + * Copyright (c) 2014 Glen Fernandes + * + * 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) + */ -// (C) Copyright Beman Dawes 1999-2003. 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) +#ifndef BOOST_NONCOPYABLE_HPP +#define BOOST_NONCOPYABLE_HPP -// See http://www.boost.org/libs/utility for documentation. +// The header file at this path is deprecated; +// use boost/core/noncopyable.hpp instead. -#ifndef BOOST_NONCOPYABLE_HPP_INCLUDED -#define BOOST_NONCOPYABLE_HPP_INCLUDED +#include -#include - -namespace boost { - -// Private copy constructor and copy assignment ensure classes derived from -// class noncopyable cannot be copied. - -// Contributed by Dave Abrahams - -namespace noncopyable_ // protection from unintended ADL -{ - class noncopyable - { - protected: -#ifndef BOOST_NO_DEFAULTED_FUNCTIONS - BOOST_CONSTEXPR noncopyable() = default; - ~noncopyable() = default; -#else - noncopyable() {} - ~noncopyable() {} #endif -#ifndef BOOST_NO_DELETED_FUNCTIONS - noncopyable( const noncopyable& ) = delete; - noncopyable& operator=( const noncopyable& ) = delete; -#else - private: // emphasize the following members are private - noncopyable( const noncopyable& ); - noncopyable& operator=( const noncopyable& ); -#endif - }; -} - -typedef noncopyable_::noncopyable noncopyable; - -} // namespace boost - -#endif // BOOST_NONCOPYABLE_HPP_INCLUDED diff --git a/boost/boost/none.hpp b/boost/boost/none.hpp index e9fc0627fe..87a6c707ce 100644 --- a/boost/boost/none.hpp +++ b/boost/boost/none.hpp @@ -1,4 +1,5 @@ // Copyright (C) 2003, Fernando Luis Cacciola Carballal. +// Copyright (C) 2014 Andrzej Krzemienski. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at @@ -20,7 +21,31 @@ namespace boost { +#ifdef BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE none_t const none = (static_cast(0)) ; +#else + +namespace detail { namespace optional_detail { + + // the trick here is to make boost::none defined once as a global but in a header file + template + struct none_instance + { + static const T instance; + }; + + template + const T none_instance::instance = T(); // global, but because 'tis a template, no cpp file required + +} } // namespace detail::optional_detail + + +namespace { + // TU-local + const none_t& none = detail::optional_detail::none_instance::instance; +} + +#endif } // namespace boost diff --git a/boost/boost/none_t.hpp b/boost/boost/none_t.hpp index 63ad92652a..13ce455b16 100644 --- a/boost/boost/none_t.hpp +++ b/boost/boost/none_t.hpp @@ -1,4 +1,5 @@ // Copyright (C) 2003, Fernando Luis Cacciola Carballal. +// Copyright (C) 2014 Andrzej Krzemienski. // // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -14,9 +15,12 @@ namespace boost { +#ifdef BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE namespace detail { struct none_helper{}; } - typedef int detail::none_helper::*none_t ; +#else +class none_t {}; +#endif } // namespace boost diff --git a/boost/boost/operators.hpp b/boost/boost/operators.hpp index b524cee381..82c374ebb5 100644 --- a/boost/boost/operators.hpp +++ b/boost/boost/operators.hpp @@ -97,14 +97,7 @@ namespace boost { namespace detail { -template class empty_base { - -// Helmut Zeisel, empty base class optimization bug with GCC 3.0.0 -#if defined(__GNUC__) && __GNUC__==3 && __GNUC_MINOR__==0 && __GNU_PATCHLEVEL__==0 - bool dummy; -#endif - -}; +template class empty_base {}; } // namespace detail } // namespace boost @@ -711,7 +704,6 @@ struct random_access_iteratable // the xxxx, xxxx1, and xxxx2 templates, importing them into boost:: as // necessary. // -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // is_chained_base<> - a traits class used to distinguish whether an operator // template argument is being used for base class chaining, or is specifying a @@ -809,24 +801,6 @@ BOOST_OPERATOR_TEMPLATE2(template_name##2) \ BOOST_OPERATOR_TEMPLATE1(template_name##1) -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -# define BOOST_OPERATOR_TEMPLATE4(template_name4) \ - BOOST_IMPORT_TEMPLATE4(template_name4) -# define BOOST_OPERATOR_TEMPLATE3(template_name3) \ - BOOST_IMPORT_TEMPLATE3(template_name3) -# define BOOST_OPERATOR_TEMPLATE2(template_name2) \ - BOOST_IMPORT_TEMPLATE2(template_name2) -# define BOOST_OPERATOR_TEMPLATE1(template_name1) \ - BOOST_IMPORT_TEMPLATE1(template_name1) - - // In this case we can only assume that template_name<> is equivalent to the - // more commonly needed template_name1<> form. -# define BOOST_OPERATOR_TEMPLATE(template_name) \ - template > \ - struct template_name : template_name##1 {}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace boost { @@ -897,14 +871,10 @@ struct operators2 , bitwise2 > > {}; -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct operators : operators2 {}; template struct operators -#else -template struct operators -#endif : totally_ordered +#if __cplusplus < 201103L +#include // to make converting-ctor std::string(char const*) visible +#endif + +namespace boost { + +class bad_optional_access : public std::logic_error +{ +public: + bad_optional_access() + : std::logic_error("Attempted to access the value of an uninitialized optional object.") + {} +}; + +} // namespace boost + +#endif diff --git a/boost/boost/optional/optional.hpp b/boost/boost/optional/optional.hpp index 0d6dba405d..afcb8079e2 100644 --- a/boost/boost/optional/optional.hpp +++ b/boost/boost/optional/optional.hpp @@ -1,4 +1,5 @@ // Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal. +// Copyright (C) 2014, 2015 Andrzej Krzemienski. // // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -11,58 +12,59 @@ // // Revisions: // 27 Apr 2008 (improved swap) Fernando Cacciola, Niels Dekker, Thorsten Ottosen +// 05 May 2014 (Added move semantics) Andrzej Krzemienski // #ifndef BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP #define BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP #include #include +#include #include #include +#include +#include +#include +#include #include #include #include #include +#include #include +#include +#include +#include +#include +#include #include +#include +#include #include #include #include #include +#include #include -#include #include #include +#include #include +#include -#include -#if BOOST_WORKAROUND(BOOST_MSVC, == 1200) -// VC6.0 has the following bug: -// When a templated assignment operator exist, an implicit conversion -// constructing an optional is used when assigment of the form: -// optional opt ; opt = T(...); -// is compiled. -// However, optional's ctor is _explicit_ and the assignemt shouldn't compile. -// Therefore, for VC6.0 templated assignment is disabled. -// -#define BOOST_OPTIONAL_NO_CONVERTING_ASSIGNMENT -#endif -#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) -// VC7.0 has the following bug: -// When both a non-template and a template copy-ctor exist -// and the templated version is made 'explicit', the explicit is also -// given to the non-templated version, making the class non-implicitely-copyable. -// -#define BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR +#include + +#if (defined BOOST_NO_CXX11_RVALUE_REFERENCES) || (defined BOOST_OPTIONAL_CONFIG_NO_RVALUE_REFERENCES) +#define BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES #endif -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION,<=700) -// AFAICT only VC7.1 correctly resolves the overload set +#if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION,<=700) +// AFAICT only Intel 7 correctly resolves the overload set // that includes the in-place factory taking functions, -// so for the other VC versions, in-place factory support +// so for the other icc versions, in-place factory support // is disabled #define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT #endif @@ -83,8 +85,7 @@ #define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION #endif -#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) > 302 \ - && !defined(__INTEL_COMPILER) +#if defined(__GNUC__) && !defined(__INTEL_COMPILER) // GCC since 3.3 has may_alias attribute that helps to alleviate optimizer issues with // regard to violation of the strict aliasing rules. The optional< T > storage type is marked // with this attribute in order to let the compiler know that it will alias objects of type T @@ -115,7 +116,6 @@ class typed_in_place_factory_base ; template void swap ( optional& x, optional& y ); namespace optional_detail { - // This local class is used instead of that in "aligned_storage.hpp" // because I've found the 'official' class to ICE BCB5.5 // when some types are used with optional<> @@ -127,7 +127,7 @@ class aligned_storage union // This works around GCC warnings about breaking strict aliasing rules when casting storage address to T* #if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS) - __attribute__((may_alias)) + __attribute__((__may_alias__)) #endif dummy_u { @@ -152,22 +152,49 @@ struct types_when_isnt_ref { typedef T const& reference_const_type ; typedef T & reference_type ; +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + typedef T && rval_reference_type ; + typedef T && reference_type_of_temporary_wrapper; +#ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES + // GCC 4.4 has support for an early draft of rvalue references. The conforming version below + // causes warnings about returning references to a temporary. + static T&& move(T&& r) { return r; } +#else + static rval_reference_type move(reference_type r) { return boost::move(r); } +#endif +#endif typedef T const* pointer_const_type ; typedef T * pointer_type ; typedef T const& argument_type ; } ; + template struct types_when_is_ref { typedef BOOST_DEDUCED_TYPENAME remove_reference::type raw_type ; - typedef raw_type& reference_const_type ; - typedef raw_type& reference_type ; - typedef raw_type* pointer_const_type ; - typedef raw_type* pointer_type ; - typedef raw_type& argument_type ; + typedef raw_type& reference_const_type ; + typedef raw_type& reference_type ; +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + typedef BOOST_DEDUCED_TYPENAME remove_const::type&& rval_reference_type ; + typedef raw_type& reference_type_of_temporary_wrapper; + static reference_type move(reference_type r) { return r; } +#endif + typedef raw_type* pointer_const_type ; + typedef raw_type* pointer_type ; + typedef raw_type& argument_type ; } ; +template +void prevent_binding_rvalue_ref_to_optional_lvalue_ref() +{ +#ifndef BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES + BOOST_STATIC_ASSERT_MSG( + !boost::is_lvalue_reference::value || !boost::is_rvalue_reference::value, + "binding rvalue references to optional lvalue references is disallowed"); +#endif +} + struct optional_tag {} ; template @@ -201,10 +228,12 @@ class optional_base : public optional_tag typedef BOOST_DEDUCED_TYPENAME mpl::if_::type types ; protected: - typedef bool (this_type::*unspecified_bool_type)() const; - typedef BOOST_DEDUCED_TYPENAME types::reference_type reference_type ; typedef BOOST_DEDUCED_TYPENAME types::reference_const_type reference_const_type ; +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + typedef BOOST_DEDUCED_TYPENAME types::rval_reference_type rval_reference_type ; + typedef BOOST_DEDUCED_TYPENAME types::reference_type_of_temporary_wrapper reference_type_of_temporary_wrapper ; +#endif typedef BOOST_DEDUCED_TYPENAME types::pointer_type pointer_type ; typedef BOOST_DEDUCED_TYPENAME types::pointer_const_type pointer_const_type ; typedef BOOST_DEDUCED_TYPENAME types::argument_type argument_type ; @@ -230,6 +259,17 @@ class optional_base : public optional_tag construct(val); } +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // move-construct an optional initialized from an rvalue-ref to 'val'. + // Can throw if T::T(T&&) does + optional_base ( rval_reference_type val ) + : + m_initialized(false) + { + construct( boost::move(val) ); + } +#endif + // Creates an optional initialized with 'val' IFF cond is true, otherwise creates an uninitialzed optional. // Can throw if T::T(T const&) does optional_base ( bool cond, argument_type val ) @@ -250,7 +290,29 @@ class optional_base : public optional_tag construct(rhs.get_impl()); } +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Creates a deep move of another optional + // Can throw if T::T(T&&) does + optional_base ( optional_base&& rhs ) + : + m_initialized(false) + { + if ( rhs.is_initialized() ) + construct( boost::move(rhs.get_impl()) ); + } +#endif + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + + template + explicit optional_base ( Expr&& expr, PtrExpr const* tag ) + : + m_initialized(false) + { + construct(boost::forward(expr),tag); + } +#else // This is used for both converting and in-place constructions. // Derived classes use the 'tag' to select the appropriate // implementation (the correct 'construct()' overload) @@ -262,6 +324,7 @@ class optional_base : public optional_tag construct(expr,tag); } +#endif // No-throw (assuming T::~T() doesn't) @@ -282,6 +345,24 @@ class optional_base : public optional_tag construct(rhs.get_impl()); } } + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Assigns from another optional (deep-moves the rhs value) + void assign ( optional_base&& rhs ) + { + if (is_initialized()) + { + if ( rhs.is_initialized() ) + assign_value(boost::move(rhs.get_impl()), is_reference_predicate() ); + else destroy(); + } + else + { + if ( rhs.is_initialized() ) + construct(boost::move(rhs.get_impl())); + } + } +#endif // Assigns from another _convertible_ optional (deep-copies the rhs value) template @@ -290,16 +371,45 @@ class optional_base : public optional_tag if (is_initialized()) { if ( rhs.is_initialized() ) - assign_value(static_cast(rhs.get()), is_reference_predicate() ); +#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES + assign_value(rhs.get(), is_reference_predicate() ); +#else + assign_value(static_cast(rhs.get()), is_reference_predicate() ); +#endif + else destroy(); } else { if ( rhs.is_initialized() ) +#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES + construct(rhs.get()); +#else construct(static_cast(rhs.get())); +#endif } } +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // move-assigns from another _convertible_ optional (deep-moves from the rhs value) + template + void assign ( optional&& rhs ) + { + typedef BOOST_DEDUCED_TYPENAME optional::rval_reference_type ref_type; + if (is_initialized()) + { + if ( rhs.is_initialized() ) + assign_value(static_cast(rhs.get()), is_reference_predicate() ); + else destroy(); + } + else + { + if ( rhs.is_initialized() ) + construct(static_cast(rhs.get())); + } + } +#endif + // Assigns from a T (deep-copies the rhs value) void assign ( argument_type val ) { @@ -307,28 +417,50 @@ class optional_base : public optional_tag assign_value(val, is_reference_predicate() ); else construct(val); } + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Assigns from a T (deep-moves the rhs value) + void assign ( rval_reference_type val ) + { + if (is_initialized()) + assign_value( boost::move(val), is_reference_predicate() ); + else construct( boost::move(val) ); + } +#endif // Assigns from "none", destroying the current value, if any, leaving this UNINITIALIZED // No-throw (assuming T::~T() doesn't) - void assign ( none_t ) { destroy(); } + void assign ( none_t ) BOOST_NOEXCEPT { destroy(); } #ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + template + void assign_expr ( Expr&& expr, ExprPtr const* tag ) + { + if (is_initialized()) + assign_expr_to_initialized(boost::forward(expr),tag); + else construct(boost::forward(expr),tag); + } +#else template void assign_expr ( Expr const& expr, Expr const* tag ) - { - if (is_initialized()) - assign_expr_to_initialized(expr,tag); - else construct(expr,tag); - } + { + if (is_initialized()) + assign_expr_to_initialized(expr,tag); + else construct(expr,tag); + } +#endif + #endif public : - // Destroys the current value, if any, leaving this UNINITIALIZED + // **DEPPRECATED** Destroys the current value, if any, leaving this UNINITIALIZED // No-throw (assuming T::~T() doesn't) - void reset() { destroy(); } + void reset() BOOST_NOEXCEPT { destroy(); } - // Replaces the current value -if any- with 'val' + // **DEPPRECATED** Replaces the current value -if any- with 'val' void reset ( argument_type val ) { assign(val); } // Returns a pointer to the value if this is initialized, otherwise, @@ -343,11 +475,92 @@ class optional_base : public optional_tag void construct ( argument_type val ) { - new (m_storage.address()) internal_type(val) ; + ::new (m_storage.address()) internal_type(val) ; + m_initialized = true ; + } + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + void construct ( rval_reference_type val ) + { + ::new (m_storage.address()) internal_type( types::move(val) ) ; m_initialized = true ; } +#endif + + +#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES) + // Constructs in-place + // upon exception *this is always uninitialized + template + void emplace_assign ( Args&&... args ) + { + destroy(); + ::new (m_storage.address()) internal_type( boost::forward(args)... ); + m_initialized = true ; + } +#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) + template + void emplace_assign ( Arg&& arg ) + { + destroy(); + ::new (m_storage.address()) internal_type( boost::forward(arg) ); + m_initialized = true ; + } +#else + template + void emplace_assign ( const Arg& arg ) + { + destroy(); + ::new (m_storage.address()) internal_type( arg ); + m_initialized = true ; + } + + template + void emplace_assign ( Arg& arg ) + { + destroy(); + ::new (m_storage.address()) internal_type( arg ); + m_initialized = true ; + } +#endif #ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Constructs in-place using the given factory + template + void construct ( Expr&& factory, in_place_factory_base const* ) + { + BOOST_STATIC_ASSERT ( ::boost::mpl::not_::value ) ; + boost_optional_detail::construct(factory, m_storage.address()); + m_initialized = true ; + } + + // Constructs in-place using the given typed factory + template + void construct ( Expr&& factory, typed_in_place_factory_base const* ) + { + BOOST_STATIC_ASSERT ( ::boost::mpl::not_::value ) ; + factory.apply(m_storage.address()) ; + m_initialized = true ; + } + + template + void assign_expr_to_initialized ( Expr&& factory, in_place_factory_base const* tag ) + { + destroy(); + construct(factory,tag); + } + + // Constructs in-place using the given typed factory + template + void assign_expr_to_initialized ( Expr&& factory, typed_in_place_factory_base const* tag ) + { + destroy(); + construct(factory,tag); + } + +#else // Constructs in-place using the given factory template void construct ( Expr const& factory, in_place_factory_base const* ) @@ -382,7 +595,31 @@ class optional_base : public optional_tag } #endif - // Constructs using any expression implicitely convertible to the single argument +#endif + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Constructs using any expression implicitly convertible to the single argument + // of a one-argument T constructor. + // Converting constructions of optional from optional uses this function with + // 'Expr' being of type 'U' and relying on a converting constructor of T from U. + template + void construct ( Expr&& expr, void const* ) + { + new (m_storage.address()) internal_type(boost::forward(expr)) ; + m_initialized = true ; + } + + // Assigns using a form any expression implicitly convertible to the single argument + // of a T's assignment operator. + // Converting assignments of optional from optional uses this function with + // 'Expr' being of type 'U' and relying on a converting assignment of T from U. + template + void assign_expr_to_initialized ( Expr&& expr, void const* ) + { + assign_value(boost::forward(expr), is_reference_predicate()); + } +#else + // Constructs using any expression implicitly convertible to the single argument // of a one-argument T constructor. // Converting constructions of optional from optional uses this function with // 'Expr' being of type 'U' and relying on a converting constructor of T from U. @@ -393,7 +630,7 @@ class optional_base : public optional_tag m_initialized = true ; } - // Assigns using a form any expression implicitely convertible to the single argument + // Assigns using a form any expression implicitly convertible to the single argument // of a T's assignment operator. // Converting assignments of optional from optional uses this function with // 'Expr' being of type 'U' and relying on a converting assignment of T from U. @@ -403,6 +640,8 @@ class optional_base : public optional_tag assign_value(expr, is_reference_predicate()); } +#endif + #ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION // BCB5.64 (and probably lower versions) workaround. // The in-place factories are supported by means of catch-all constructors @@ -416,6 +655,20 @@ class optional_base : public optional_tag // For VC<=70 compilers this workaround dosen't work becasue the comnpiler issues and error // instead of choosing the wrong overload // +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Notice that 'Expr' will be optional or optional (but not optional_base<..>) + template + void construct ( Expr&& expr, optional_tag const* ) + { + if ( expr.is_initialized() ) + { + // An exception can be thrown here. + // It it happens, THIS will be left uninitialized. + new (m_storage.address()) internal_type(types::move(expr.get())) ; + m_initialized = true ; + } + } +#else // Notice that 'Expr' will be optional or optional (but not optional_base<..>) template void construct ( Expr const& expr, optional_tag const* ) @@ -429,9 +682,14 @@ class optional_base : public optional_tag } } #endif +#endif // defined BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION void assign_value ( argument_type val, is_not_reference_tag ) { get_impl() = val; } void assign_value ( argument_type val, is_reference_tag ) { construct(val); } +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + void assign_value ( rval_reference_type val, is_not_reference_tag ) { get_impl() = static_cast(val); } + void assign_value ( rval_reference_type val, is_reference_tag ) { construct( static_cast(val) ); } +#endif void destroy() { @@ -439,8 +697,6 @@ class optional_base : public optional_tag destroy_impl(is_reference_predicate()) ; } - unspecified_bool_type safe_bool() const { return m_initialized ? &this_type::is_initialized : 0 ; } - reference_const_type get_impl() const { return dereference(get_object(), is_reference_predicate() ) ; } reference_type get_impl() { return dereference(get_object(), is_reference_predicate() ) ; } @@ -476,7 +732,7 @@ class optional_base : public optional_tag #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581)) void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->internal_type::~internal_type() ; m_initialized = false ; } #else - void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->T::~T() ; m_initialized = false ; } + void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->~T() ; m_initialized = false ; } #endif void destroy_impl ( is_reference_tag ) { m_initialized = false ; } @@ -500,8 +756,6 @@ class optional : public optional_detail::optional_base { typedef optional_detail::optional_base base ; - typedef BOOST_DEDUCED_TYPENAME base::unspecified_bool_type unspecified_bool_type ; - public : typedef optional this_type ; @@ -509,27 +763,37 @@ class optional : public optional_detail::optional_base typedef BOOST_DEDUCED_TYPENAME base::value_type value_type ; typedef BOOST_DEDUCED_TYPENAME base::reference_type reference_type ; typedef BOOST_DEDUCED_TYPENAME base::reference_const_type reference_const_type ; +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + typedef BOOST_DEDUCED_TYPENAME base::rval_reference_type rval_reference_type ; + typedef BOOST_DEDUCED_TYPENAME base::reference_type_of_temporary_wrapper reference_type_of_temporary_wrapper ; +#endif typedef BOOST_DEDUCED_TYPENAME base::pointer_type pointer_type ; typedef BOOST_DEDUCED_TYPENAME base::pointer_const_type pointer_const_type ; typedef BOOST_DEDUCED_TYPENAME base::argument_type argument_type ; // Creates an optional uninitialized. // No-throw - optional() : base() {} + optional() BOOST_NOEXCEPT : base() {} // Creates an optional uninitialized. // No-throw - optional( none_t none_ ) : base(none_) {} + optional( none_t none_ ) BOOST_NOEXCEPT : base(none_) {} // Creates an optional initialized with 'val'. // Can throw if T::T(T const&) does optional ( argument_type val ) : base(val) {} +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Creates an optional initialized with 'move(val)'. + // Can throw if T::T(T &&) does + optional ( rval_reference_type val ) : base( boost::forward(val) ) + {optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref();} +#endif + // Creates an optional initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional. // Can throw if T::T(T const&) does optional ( bool cond, argument_type val ) : base(cond,val) {} -#ifndef BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR // NOTE: MSVC needs templated versions first // Creates a deep copy of another convertible optional @@ -543,43 +807,94 @@ class optional : public optional_detail::optional_base if ( rhs.is_initialized() ) this->construct(rhs.get()); } + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Creates a deep move of another convertible optional + // Requires a valid conversion from U to T. + // Can throw if T::T(U&&) does + template + explicit optional ( optional && rhs ) + : + base() + { + if ( rhs.is_initialized() ) + this->construct( boost::move(rhs.get()) ); + } #endif #ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT // Creates an optional with an expression which can be either // (a) An instance of InPlaceFactory (i.e. in_place(a,b,...,n); // (b) An instance of TypedInPlaceFactory ( i.e. in_place(a,b,...,n); - // (c) Any expression implicitely convertible to the single type + // (c) Any expression implicitly convertible to the single type // of a one-argument T's constructor. // (d*) Weak compilers (BCB) might also resolved Expr as optional and optional // even though explicit overloads are present for these. // Depending on the above some T ctor is called. - // Can throw is the resolved T ctor throws. + // Can throw if the resolved T ctor throws. +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + + + template + explicit optional ( Expr&& expr, + BOOST_DEDUCED_TYPENAME boost::disable_if_c< + (boost::is_base_of::type>::value) || + boost::is_same::type, none_t>::value >::type* = 0 + ) + : base(boost::forward(expr),boost::addressof(expr)) + {optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref();} + +#else template explicit optional ( Expr const& expr ) : base(expr,boost::addressof(expr)) {} -#endif +#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES +#endif // !defined BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT // Creates a deep copy of another optional // Can throw if T::T(T const&) does optional ( optional const& rhs ) : base( static_cast(rhs) ) {} +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Creates a deep move of another optional + // Can throw if T::T(T&&) does + optional ( optional && rhs ) + BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible::value) + : base( boost::move(rhs) ) + {} + +#endif // No-throw (assuming T::~T() doesn't) ~optional() {} #if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION) // Assigns from an expression. See corresponding constructor. // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + + template + BOOST_DEDUCED_TYPENAME boost::disable_if_c< + boost::is_base_of::type>::value || + boost::is_same::type, none_t>::value, + optional& + >::type + operator= ( Expr&& expr ) + { + optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref(); + this->assign_expr(boost::forward(expr),boost::addressof(expr)); + return *this ; + } + +#else template optional& operator= ( Expr const& expr ) { this->assign_expr(expr,boost::addressof(expr)); return *this ; } -#endif +#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES +#endif // !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION) - -#ifndef BOOST_OPTIONAL_NO_CONVERTING_ASSIGNMENT - // Assigns from another convertible optional (converts && deep-copies the rhs value) + // Copy-assigns from another convertible optional (converts && deep-copies the rhs value) // Requires a valid conversion from U to T. // Basic Guarantee: If T::T( U const& ) throws, this is left UNINITIALIZED template @@ -588,6 +903,17 @@ class optional : public optional_detail::optional_base this->assign(rhs); return *this ; } + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Move-assigns from another convertible optional (converts && deep-moves the rhs value) + // Requires a valid conversion from U to T. + // Basic Guarantee: If T::T( U && ) throws, this is left UNINITIALIZED + template + optional& operator= ( optional && rhs ) + { + this->assign(boost::move(rhs)); + return *this ; + } #endif // Assigns from another optional (deep-copies the rhs value) @@ -599,6 +925,16 @@ class optional : public optional_detail::optional_base return *this ; } +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Assigns from another optional (deep-moves the rhs value) + optional& operator= ( optional && rhs ) + BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible::value && ::boost::is_nothrow_move_assignable::value) + { + this->assign( static_cast(rhs) ) ; + return *this ; + } +#endif + // Assigns from a T (deep-copies the rhs value) // Basic Guarantee: If T::( T const& ) throws, this is left UNINITIALIZED optional& operator= ( argument_type val ) @@ -607,20 +943,58 @@ class optional : public optional_detail::optional_base return *this ; } +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + // Assigns from a T (deep-moves the rhs value) + optional& operator= ( rval_reference_type val ) + { + optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref(); + this->assign( boost::move(val) ) ; + return *this ; + } +#endif + // Assigns from a "none" // Which destroys the current value, if any, leaving this UNINITIALIZED // No-throw (assuming T::~T() doesn't) - optional& operator= ( none_t none_ ) + optional& operator= ( none_t none_ ) BOOST_NOEXCEPT { this->assign( none_ ) ; return *this ; } + +#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES) + // Constructs in-place + // upon exception *this is always uninitialized + template + void emplace ( Args&&... args ) + { + this->emplace_assign( boost::forward(args)... ); + } +#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) + template + void emplace ( Arg&& arg ) + { + this->emplace_assign( boost::forward(arg) ); + } +#else + template + void emplace ( const Arg& arg ) + { + this->emplace_assign( arg ); + } + + template + void emplace ( Arg& arg ) + { + this->emplace_assign( arg ); + } +#endif void swap( optional & arg ) + BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible::value && ::boost::is_nothrow_move_assignable::value) { // allow for Koenig lookup - using boost::swap; - swap(*this, arg); + boost::swap(*this, arg); } @@ -643,17 +1017,148 @@ class optional : public optional_detail::optional_base // Returns a reference to the value if this is initialized, otherwise, // the behaviour is UNDEFINED // No-throw +#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) + reference_const_type operator *() const& { return this->get() ; } + reference_type operator *() & { return this->get() ; } + reference_type_of_temporary_wrapper operator *() && { return base::types::move(this->get()) ; } +#else reference_const_type operator *() const { return this->get() ; } reference_type operator *() { return this->get() ; } +#endif // !defined BOOST_NO_CXX11_REF_QUALIFIERS + +#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) + reference_const_type value() const& + { + if (this->is_initialized()) + return this->get() ; + else + throw_exception(bad_optional_access()); + } + + reference_type value() & + { + if (this->is_initialized()) + return this->get() ; + else + throw_exception(bad_optional_access()); + } + + reference_type_of_temporary_wrapper value() && + { + if (this->is_initialized()) + return base::types::move(this->get()) ; + else + throw_exception(bad_optional_access()); + } - // implicit conversion to "bool" - // No-throw - operator unspecified_bool_type() const { return this->safe_bool() ; } +#else + reference_const_type value() const + { + if (this->is_initialized()) + return this->get() ; + else + throw_exception(bad_optional_access()); + } + + reference_type value() + { + if (this->is_initialized()) + return this->get() ; + else + throw_exception(bad_optional_access()); + } +#endif - // This is provided for those compilers which don't like the conversion to bool - // on some contexts. - bool operator!() const { return !this->is_initialized() ; } + +#ifndef BOOST_NO_CXX11_REF_QUALIFIERS + template + value_type value_or ( U&& v ) const& + { + if (this->is_initialized()) + return get(); + else + return boost::forward(v); + } + + template + value_type value_or ( U&& v ) && + { + if (this->is_initialized()) + return base::types::move(get()); + else + return boost::forward(v); + } +#elif !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES + template + value_type value_or ( U&& v ) const + { + if (this->is_initialized()) + return get(); + else + return boost::forward(v); + } +#else + template + value_type value_or ( U const& v ) const + { + if (this->is_initialized()) + return get(); + else + return v; + } + + template + value_type value_or ( U& v ) const + { + if (this->is_initialized()) + return get(); + else + return v; + } +#endif + + +#ifndef BOOST_NO_CXX11_REF_QUALIFIERS + template + value_type value_or_eval ( F f ) const& + { + if (this->is_initialized()) + return get(); + else + return f(); + } + + template + value_type value_or_eval ( F f ) && + { + if (this->is_initialized()) + return base::types::move(get()); + else + return f(); + } +#else + template + value_type value_or_eval ( F f ) const + { + if (this->is_initialized()) + return get(); + else + return f(); + } +#endif + + bool operator!() const BOOST_NOEXCEPT { return !this->is_initialized() ; } + + BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT() +} ; + +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES +template +class optional +{ + BOOST_STATIC_ASSERT_MSG(sizeof(T) == 0, "Optional rvalue references are illegal."); } ; +#endif // Returns optional(v) template @@ -743,6 +1248,14 @@ get_pointer ( optional& opt ) return opt.get_ptr() ; } +// The following declaration prevents a bug where operator safe-bool is used upon streaming optional object if you forget the IO header. +template +std::basic_ostream& +operator<<(std::basic_ostream& out, optional_detail::optional_tag const& v) +{ + BOOST_STATIC_ASSERT_MSG(sizeof(CharType) == 0, "If you want to output boost::optional, include header "); +} + // optional's relational operators ( ==, !=, <, >, <=, >= ) have deep-semantics (compare values). // WARNING: This is UNLIKE pointers. Use equal_pointees()/less_pointess() in generic code instead. @@ -856,8 +1369,8 @@ bool operator >= ( T const& x, optional const& y ) template inline -bool operator == ( optional const& x, none_t ) -{ return equal_pointees(x, optional() ); } +bool operator == ( optional const& x, none_t ) BOOST_NOEXCEPT +{ return !x; } template inline @@ -866,8 +1379,8 @@ bool operator < ( optional const& x, none_t ) template inline -bool operator != ( optional const& x, none_t y ) -{ return !( x == y ) ; } +bool operator != ( optional const& x, none_t ) BOOST_NOEXCEPT +{ return bool(x); } template inline @@ -890,8 +1403,8 @@ bool operator >= ( optional const& x, none_t y ) template inline -bool operator == ( none_t , optional const& y ) -{ return equal_pointees(optional() ,y); } +bool operator == ( none_t , optional const& y ) BOOST_NOEXCEPT +{ return !y; } template inline @@ -900,8 +1413,8 @@ bool operator < ( none_t , optional const& y ) template inline -bool operator != ( none_t x, optional const& y ) -{ return !( x == y ) ; } +bool operator != ( none_t, optional const& y ) BOOST_NOEXCEPT +{ return bool(y); } template inline @@ -949,6 +1462,37 @@ struct swap_selector } }; +#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES +template<> +struct swap_selector +{ + template + static void optional_swap ( optional& x, optional& y ) + //BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible::value && BOOST_NOEXCEPT_EXPR(boost::swap(*x, *y))) + { + if(x) + { + if (y) + { + boost::swap(*x, *y); + } + else + { + y = boost::move(*x); + x = boost::none; + } + } + else + { + if (y) + { + x = boost::move(*y); + y = boost::none; + } + } + } +}; +#else template<> struct swap_selector { @@ -975,6 +1519,7 @@ struct swap_selector } } }; +#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES } // namespace optional_detail @@ -982,6 +1527,7 @@ template struct optional_swap_should_use_default_constructor : has_nothrow_default_constructor {} ; template inline void swap ( optional& x, optional& y ) + //BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible::value && BOOST_NOEXCEPT_EXPR(boost::swap(*x, *y))) { optional_detail::swap_selector::value>::optional_swap(x, y); } diff --git a/boost/boost/optional/optional_fwd.hpp b/boost/boost/optional/optional_fwd.hpp index 388cc1c632..fb59682df6 100644 --- a/boost/boost/optional/optional_fwd.hpp +++ b/boost/boost/optional/optional_fwd.hpp @@ -11,15 +11,16 @@ // // Revisions: // 10 May 2008 (added swap related forward declaration) Niels Dekker -// +// #ifndef BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP #define BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP + namespace boost { template class optional ; -template void swap ( optional& , optional& ) ; +template void swap ( optional& , optional& ); template struct optional_swap_should_use_default_constructor ; diff --git a/boost/boost/predef.h b/boost/boost/predef.h new file mode 100644 index 0000000000..753cd61e8b --- /dev/null +++ b/boost/boost/predef.h @@ -0,0 +1,19 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_H +#define BOOST_PREDEF_H + +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/boost/boost/predef/architecture.h b/boost/boost/predef/architecture.h index 9eda25e15e..b32701ecea 100644 --- a/boost/boost/predef/architecture.h +++ b/boost/boost/predef/architecture.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/architecture/alpha.h b/boost/boost/predef/architecture/alpha.h index 7ccc480ae8..6365ec45e4 100644 --- a/boost/boost/predef/architecture/alpha.h +++ b/boost/boost/predef/architecture/alpha.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/architecture/arm.h b/boost/boost/predef/architecture/arm.h index b221a510de..4974895b2c 100644 --- a/boost/boost/predef/architecture/arm.h +++ b/boost/boost/predef/architecture/arm.h @@ -1,5 +1,7 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 +Copyright Franz Detro 2014 +Copyright (c) Microsoft Corporation 2014 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) @@ -20,26 +22,37 @@ http://www.boost.org/LICENSE_1_0.txt) [[__predef_symbol__] [__predef_version__]] [[`__arm__`] [__predef_detection__]] + [[`__arm64`] [__predef_detection__]] [[`__thumb__`] [__predef_detection__]] [[`__TARGET_ARCH_ARM`] [__predef_detection__]] [[`__TARGET_ARCH_THUMB`] [__predef_detection__]] + [[`_M_ARM`] [__predef_detection__]] + [[`__arm64`] [8.0.0]] [[`__TARGET_ARCH_ARM`] [V.0.0]] [[`__TARGET_ARCH_THUMB`] [V.0.0]] + [[`_M_ARM`] [V.0.0]] ] */ #define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE -#if defined(__arm__) || defined(__thumb__) || \ - defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) +#if defined(__arm__) || defined(__arm64) || defined(__thumb__) || \ + defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || \ + defined(_M_ARM) # undef BOOST_ARCH_ARM +# if !defined(BOOST_ARCH_ARM) && defined(__arm64) +# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0) +# endif # if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_ARM) # define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_ARM,0,0) # endif # if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_THUMB) # define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_THUMB,0,0) # endif +# if !defined(BOOST_ARCH_ARM) && defined(_M_ARM) +# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(_M_ARM,0,0) +# endif # if !defined(BOOST_ARCH_ARM) # define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_AVAILABLE # endif diff --git a/boost/boost/predef/architecture/blackfin.h b/boost/boost/predef/architecture/blackfin.h index 7b4f275885..ae3407e935 100644 --- a/boost/boost/predef/architecture/blackfin.h +++ b/boost/boost/predef/architecture/blackfin.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software Inc 2013 +Copyright Rene Rivera 2013 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) diff --git a/boost/boost/predef/architecture/convex.h b/boost/boost/predef/architecture/convex.h index fbb8e9653d..3b425a04cf 100644 --- a/boost/boost/predef/architecture/convex.h +++ b/boost/boost/predef/architecture/convex.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software Inc 2011-2013 +Copyright Rene Rivera 2011-2013 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) diff --git a/boost/boost/predef/architecture/ia64.h b/boost/boost/predef/architecture/ia64.h index 918e27f001..4b5a10331f 100644 --- a/boost/boost/predef/architecture/ia64.h +++ b/boost/boost/predef/architecture/ia64.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/architecture/m68k.h b/boost/boost/predef/architecture/m68k.h index 2950c9a12a..09c3cd3a02 100644 --- a/boost/boost/predef/architecture/m68k.h +++ b/boost/boost/predef/architecture/m68k.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/architecture/mips.h b/boost/boost/predef/architecture/mips.h index b3d225cb7b..ae88428c28 100644 --- a/boost/boost/predef/architecture/mips.h +++ b/boost/boost/predef/architecture/mips.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/architecture/parisc.h b/boost/boost/predef/architecture/parisc.h index 73703832c1..e843dd2106 100644 --- a/boost/boost/predef/architecture/parisc.h +++ b/boost/boost/predef/architecture/parisc.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/architecture/ppc.h b/boost/boost/predef/architecture/ppc.h index 8339ed24a4..cc743e74f6 100644 --- a/boost/boost/predef/architecture/ppc.h +++ b/boost/boost/predef/architecture/ppc.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/architecture/pyramid.h b/boost/boost/predef/architecture/pyramid.h index 706e0cda7d..26d5293e68 100644 --- a/boost/boost/predef/architecture/pyramid.h +++ b/boost/boost/predef/architecture/pyramid.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software Inc 2011-2013 +Copyright Rene Rivera 2011-2013 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) diff --git a/boost/boost/predef/architecture/rs6k.h b/boost/boost/predef/architecture/rs6k.h index c05fefd11f..20dd64bac1 100644 --- a/boost/boost/predef/architecture/rs6k.h +++ b/boost/boost/predef/architecture/rs6k.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/architecture/sparc.h b/boost/boost/predef/architecture/sparc.h index 0faa9d4958..9c91cdacad 100644 --- a/boost/boost/predef/architecture/sparc.h +++ b/boost/boost/predef/architecture/sparc.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2014 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) @@ -34,7 +34,7 @@ http://www.boost.org/LICENSE_1_0.txt) # if !defined(BOOST_ARCH_SPARC) && defined(__sparcv9) # define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(9,0,0) # endif -# if !defined(BOOST_ARCH_SPARC) && defined(__sparcv8) +# if !defined(BOOST_ARCH_SPARC) && defined(__sparcv8) # define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(8,0,0) # endif # if !defined(BOOST_ARCH_SPARC) diff --git a/boost/boost/predef/architecture/superh.h b/boost/boost/predef/architecture/superh.h index f87f492732..ef88242d1a 100644 --- a/boost/boost/predef/architecture/superh.h +++ b/boost/boost/predef/architecture/superh.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/architecture/sys370.h b/boost/boost/predef/architecture/sys370.h index f2fba7802e..507ee8637e 100644 --- a/boost/boost/predef/architecture/sys370.h +++ b/boost/boost/predef/architecture/sys370.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/architecture/sys390.h b/boost/boost/predef/architecture/sys390.h index a9e03d9b1a..070117a70d 100644 --- a/boost/boost/predef/architecture/sys390.h +++ b/boost/boost/predef/architecture/sys390.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/architecture/x86.h b/boost/boost/predef/architecture/x86.h index 3a08e9c134..fa9a025c4c 100644 --- a/boost/boost/predef/architecture/x86.h +++ b/boost/boost/predef/architecture/x86.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/architecture/x86/32.h b/boost/boost/predef/architecture/x86/32.h index 131d94d346..b796f841c4 100644 --- a/boost/boost/predef/architecture/x86/32.h +++ b/boost/boost/predef/architecture/x86/32.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/architecture/x86/64.h b/boost/boost/predef/architecture/x86/64.h index 0bee9c9634..a035c88b15 100644 --- a/boost/boost/predef/architecture/x86/64.h +++ b/boost/boost/predef/architecture/x86/64.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/architecture/z.h b/boost/boost/predef/architecture/z.h index 622d6ab308..768f342772 100644 --- a/boost/boost/predef/architecture/z.h +++ b/boost/boost/predef/architecture/z.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/compiler.h b/boost/boost/predef/compiler.h new file mode 100644 index 0000000000..12c4dfcb88 --- /dev/null +++ b/boost/boost/predef/compiler.h @@ -0,0 +1,41 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_H +#define BOOST_PREDEF_COMPILER_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/boost/boost/predef/compiler/borland.h b/boost/boost/predef/compiler/borland.h new file mode 100644 index 0000000000..01b5de7c6e --- /dev/null +++ b/boost/boost/predef/compiler/borland.h @@ -0,0 +1,64 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_BORLAND_H +#define BOOST_PREDEF_COMPILER_BORLAND_H + +#include +#include + +/*` +[heading `BOOST_COMP_BORLAND`] + +[@http://en.wikipedia.org/wiki/C_plus_plus_builder Borland C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__BORLANDC__`] [__predef_detection__]] + [[`__CODEGEARC__`] [__predef_detection__]] + + [[`__BORLANDC__`] [V.R.P]] + [[`__CODEGEARC__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_BORLAND BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__BORLANDC__) || defined(__CODEGEARC__) +# if !defined(BOOST_COMP_BORLAND_DETECTION) && (defined(__CODEGEARC__)) +# define BOOST_COMP_BORLAND_DETECTION BOOST_PREDEF_MAKE_0X_VVRP(__CODEGEARC__) +# endif +# if !defined(BOOST_COMP_BORLAND_DETECTION) +# define BOOST_COMP_BORLAND_DETECTION BOOST_PREDEF_MAKE_0X_VVRP(__BORLANDC__) +# endif +#endif + +#ifdef BOOST_COMP_BORLAND_DETECTION +# define BOOST_COMP_BORLAND_AVAILABLE +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_BORLAND_EMULATED BOOST_COMP_BORLAND_DETECTION +# else +# undef BOOST_COMP_BORLAND +# define BOOST_COMP_BORLAND BOOST_COMP_BORLAND_DETECTION +# endif +# include +#endif + +#define BOOST_COMP_BORLAND_NAME "Borland C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_BORLAND,BOOST_COMP_BORLAND_NAME) + +#ifdef BOOST_COMP_BORLAND_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_BORLAND_EMULATED,BOOST_COMP_BORLAND_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/clang.h b/boost/boost/predef/compiler/clang.h new file mode 100644 index 0000000000..87dd033c57 --- /dev/null +++ b/boost/boost/predef/compiler/clang.h @@ -0,0 +1,57 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_CLANG_H +#define BOOST_PREDEF_COMPILER_CLANG_H + +#include +#include + +/*` +[heading `BOOST_COMP_CLANG`] + +[@http://en.wikipedia.org/wiki/Clang Clang] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__clang__`] [__predef_detection__]] + + [[`__clang_major__`, `__clang_minor__`, `__clang_patchlevel__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_CLANG BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__clang__) +# define BOOST_COMP_CLANG_DETECTION BOOST_VERSION_NUMBER(__clang_major__,__clang_minor__,__clang_patchlevel__) +#endif + +#ifdef BOOST_COMP_CLANG_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_CLANG_EMULATED BOOST_COMP_CLANG_DETECTION +# else +# undef BOOST_COMP_CLANG +# define BOOST_COMP_CLANG BOOST_COMP_CLANG_DETECTION +# endif +# define BOOST_COMP_CLANG_AVAILABLE +# include +#endif + +#define BOOST_COMP_CLANG_NAME "Clang" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_CLANG,BOOST_COMP_CLANG_NAME) + +#ifdef BOOST_COMP_CLANG_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_CLANG_EMULATED,BOOST_COMP_CLANG_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/comeau.h b/boost/boost/predef/compiler/comeau.h new file mode 100644 index 0000000000..386218404d --- /dev/null +++ b/boost/boost/predef/compiler/comeau.h @@ -0,0 +1,62 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_COMEAU_H +#define BOOST_PREDEF_COMPILER_COMEAU_H + +#include +#include + +#define BOOST_COMP_COMO BOOST_VERSION_NUMBER_NOT_AVAILABLE + +/*` +[heading `BOOST_COMP_COMO`] + +[@http://en.wikipedia.org/wiki/Comeau_C/C%2B%2B Comeau C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__COMO__`] [__predef_detection__]] + + [[`__COMO_VERSION__`] [V.R.P]] + ] + */ + +#if defined(__COMO__) +# if !defined(BOOST_COMP_COMO_DETECTION) && defined(__CONO_VERSION__) +# define BOOST_COMP_COMO_DETECTION BOOST_PREDEF_MAKE_0X_VRP(__COMO_VERSION__) +# endif +# if !defined(BOOST_COMP_COMO_DETECTION) +# define BOOST_COMP_COMO_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_COMO_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_COMO_EMULATED BOOST_COMP_COMO_DETECTION +# else +# undef BOOST_COMP_COMO +# define BOOST_COMP_COMO BOOST_COMP_COMO_DETECTION +# endif +# define BOOST_COMP_COMO_AVAILABLE +# include +#endif + +#define BOOST_COMP_COMO_NAME "Comeau C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_COMO,BOOST_COMP_COMO_NAME) + +#ifdef BOOST_COMP_COMO_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_COMO_EMULATED,BOOST_COMP_COMO_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/compaq.h b/boost/boost/predef/compiler/compaq.h new file mode 100644 index 0000000000..a922d170f8 --- /dev/null +++ b/boost/boost/predef/compiler/compaq.h @@ -0,0 +1,67 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_COMPAQ_H +#define BOOST_PREDEF_COMPILER_COMPAQ_H + +#include +#include + +/*` +[heading `BOOST_COMP_DEC`] + +[@http://www.openvms.compaq.com/openvms/brochures/deccplus/ Compaq C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__DECCXX`] [__predef_detection__]] + [[`__DECC`] [__predef_detection__]] + + [[`__DECCXX_VER`] [V.R.P]] + [[`__DECC_VER`] [V.R.P]] + ] + */ + +#define BOOST_COMP_DEC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__DECC) || defined(__DECCXX) +# if !defined(BOOST_COMP_DEC_DETECTION) && defined(__DECCXX_VER) +# define BOOST_COMP_DEC_DETECTION BOOST_PREDEF_MAKE_10_VVRR0PP00(__DECCXX_VER) +# endif +# if !defined(BOOST_COMP_DEC_DETECTION) && defined(__DECC_VER) +# define BOOST_COMP_DEC_DETECTION BOOST_PREDEF_MAKE_10_VVRR0PP00(__DECC_VER) +# endif +# if !defined(BOOST_COMP_DEC_DETECTION) +# define BOOST_COM_DEC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_DEC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_DEC_EMULATED BOOST_COMP_DEC_DETECTION +# else +# undef BOOST_COMP_DEC +# define BOOST_COMP_DEC BOOST_COMP_DEC_DETECTION +# endif +# define BOOST_COMP_DEC_AVAILABLE +# include +#endif + +#define BOOST_COMP_DEC_NAME "Compaq C/C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DEC,BOOST_COMP_DEC_NAME) + +#ifdef BOOST_COMP_DEC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DEC_EMULATED,BOOST_COMP_DEC_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/diab.h b/boost/boost/predef/compiler/diab.h new file mode 100644 index 0000000000..2cba03b972 --- /dev/null +++ b/boost/boost/predef/compiler/diab.h @@ -0,0 +1,57 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_DIAB_H +#define BOOST_PREDEF_COMPILER_DIAB_H + +#include +#include + +/*` +[heading `BOOST_COMP_DIAB`] + +[@http://www.windriver.com/products/development_suite/wind_river_compiler/ Diab C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__DCC__`] [__predef_detection__]] + + [[`__VERSION_NUMBER__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_DIAB BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__DCC__) +# define BOOST_COMP_DIAB_DETECTION BOOST_PREDEF_MAKE_10_VRPP(__VERSION_NUMBER__) +#endif + +#ifdef BOOST_COMP_DIAB_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_DIAB_EMULATED BOOST_COMP_DIAB_DETECTION +# else +# undef BOOST_COMP_DIAB +# define BOOST_COMP_DIAB BOOST_COMP_DIAB_DETECTION +# endif +# define BOOST_COMP_DIAB_AVAILABLE +# include +#endif + +#define BOOST_COMP_DIAB_NAME "Diab C/C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DIAB,BOOST_COMP_DIAB_NAME) + +#ifdef BOOST_COMP_DIAB_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DIAB_EMULATED,BOOST_COMP_DIAB_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/digitalmars.h b/boost/boost/predef/compiler/digitalmars.h new file mode 100644 index 0000000000..2306a7e3a7 --- /dev/null +++ b/boost/boost/predef/compiler/digitalmars.h @@ -0,0 +1,57 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_DIGITALMARS_H +#define BOOST_PREDEF_COMPILER_DIGITALMARS_H + +#include +#include + +/*` +[heading `BOOST_COMP_DMC`] + +[@http://en.wikipedia.org/wiki/Digital_Mars Digital Mars] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__DMC__`] [__predef_detection__]] + + [[`__DMC__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_DMC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__DMC__) +# define BOOST_COMP_DMC_DETECTION BOOST_PREDEF_MAKE_0X_VRP(__DMC__) +#endif + +#ifdef BOOST_COMP_DMC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_DMC_EMULATED BOOST_COMP_DMC_DETECTION +# else +# undef BOOST_COMP_DMC +# define BOOST_COMP_DMC BOOST_COMP_DMC_DETECTION +# endif +# define BOOST_COMP_DMC_AVAILABLE +# include +#endif + +#define BOOST_COMP_DMC_NAME "Digital Mars" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DMC,BOOST_COMP_DMC_NAME) + +#ifdef BOOST_COMP_DMC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DMC_EMULATED,BOOST_COMP_DMC_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/dignus.h b/boost/boost/predef/compiler/dignus.h new file mode 100644 index 0000000000..33c3560f97 --- /dev/null +++ b/boost/boost/predef/compiler/dignus.h @@ -0,0 +1,57 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_DIGNUS_H +#define BOOST_PREDEF_COMPILER_DIGNUS_H + +#include +#include + +/*` +[heading `BOOST_COMP_SYSC`] + +[@http://www.dignus.com/dcxx/ Dignus Systems/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__SYSC__`] [__predef_detection__]] + + [[`__SYSC_VER__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_SYSC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__SYSC__) +# define BOOST_COMP_SYSC_DETECTION BOOST_PREDEF_MAKE_10_VRRPP(__SYSC_VER__) +#endif + +#ifdef BOOST_COMP_SYSC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_SYSC_EMULATED BOOST_COMP_SYSC_DETECTION +# else +# undef BOOST_COMP_SYSC +# define BOOST_COMP_SYSC BOOST_COMP_SYSC_DETECTION +# endif +# define BOOST_COMP_SYSC_AVAILABLE +# include +#endif + +#define BOOST_COMP_SYSC_NAME "Dignus Systems/C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SYSC,BOOST_COMP_SYSC_NAME) + +#ifdef BOOST_COMP_SYSC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SYSC_EMULATED,BOOST_COMP_SYSC_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/edg.h b/boost/boost/predef/compiler/edg.h new file mode 100644 index 0000000000..d53a5ffba6 --- /dev/null +++ b/boost/boost/predef/compiler/edg.h @@ -0,0 +1,57 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_EDG_H +#define BOOST_PREDEF_COMPILER_EDG_H + +#include +#include + +/*` +[heading `BOOST_COMP_EDG`] + +[@http://en.wikipedia.org/wiki/Edison_Design_Group EDG C++ Frontend] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__EDG__`] [__predef_detection__]] + + [[`__EDG_VERSION__`] [V.R.0]] + ] + */ + +#define BOOST_COMP_EDG BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__EDG__) +# define BOOST_COMP_EDG_DETECTION BOOST_PREDEF_MAKE_10_VRR(__EDG_VERSION__) +#endif + +#ifdef BOOST_COMP_EDG_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_EDG_EMULATED BOOST_COMP_EDG_DETECTION +# else +# undef BOOST_COMP_EDG +# define BOOST_COMP_EDG BOOST_COMP_EDG_DETECTION +# endif +# define BOOST_COMP_EDG_AVAILABLE +# include +#endif + +#define BOOST_COMP_EDG_NAME "EDG C++ Frontend" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_EDG,BOOST_COMP_EDG_NAME) + +#ifdef BOOST_COMP_EDG_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_EDG_EMULATED,BOOST_COMP_EDG_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/ekopath.h b/boost/boost/predef/compiler/ekopath.h new file mode 100644 index 0000000000..4d7dabea7c --- /dev/null +++ b/boost/boost/predef/compiler/ekopath.h @@ -0,0 +1,58 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_EKOPATH_H +#define BOOST_PREDEF_COMPILER_EKOPATH_H + +#include +#include + +/*` +[heading `BOOST_COMP_PATH`] + +[@http://en.wikipedia.org/wiki/PathScale EKOpath] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__PATHCC__`] [__predef_detection__]] + + [[`__PATHCC__`, `__PATHCC_MINOR__`, `__PATHCC_PATCHLEVEL__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_PATH BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__PATHCC__) +# define BOOST_COMP_PATH_DETECTION \ + BOOST_VERSION_NUMBER(__PATHCC__,__PATHCC_MINOR__,__PATHCC_PATCHLEVEL__) +#endif + +#ifdef BOOST_COMP_PATH_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_PATH_EMULATED BOOST_COMP_PATH_DETECTION +# else +# undef BOOST_COMP_PATH +# define BOOST_COMP_PATH BOOST_COMP_PATH_DETECTION +# endif +# define BOOST_COMP_PATH_AVAILABLE +# include +#endif + +#define BOOST_COMP_PATH_NAME "EKOpath" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PATH,BOOST_COMP_PATH_NAME) + +#ifdef BOOST_COMP_PATH_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PATH_EMULATED,BOOST_COMP_PATH_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/gcc.h b/boost/boost/predef/compiler/gcc.h new file mode 100644 index 0000000000..5b226bdfab --- /dev/null +++ b/boost/boost/predef/compiler/gcc.h @@ -0,0 +1,69 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_GCC_H +#define BOOST_PREDEF_COMPILER_GCC_H + +/* Other compilers that emulate this one need to be detected first. */ + +#include + +#include +#include + +/*` +[heading `BOOST_COMP_GNUC`] + +[@http://en.wikipedia.org/wiki/GNU_Compiler_Collection Gnu GCC C/C++] compiler. +Version number available as major, minor, and patch (if available). + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__GNUC__`] [__predef_detection__]] + + [[`__GNUC__`, `__GNUC_MINOR__`, `__GNUC_PATCHLEVEL__`] [V.R.P]] + [[`__GNUC__`, `__GNUC_MINOR__`] [V.R.0]] + ] + */ + +#define BOOST_COMP_GNUC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__GNUC__) +# if !defined(BOOST_COMP_GNUC_DETECTION) && defined(__GNUC_PATCHLEVEL__) +# define BOOST_COMP_GNUC_DETECTION \ + BOOST_VERSION_NUMBER(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__) +# endif +# if !defined(BOOST_COMP_GNUC_DETECTION) +# define BOOST_COMP_GNUC_DETECTION \ + BOOST_VERSION_NUMBER(__GNUC__,__GNUC_MINOR__,0) +# endif +#endif + +#ifdef BOOST_COMP_GNUC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_GNUC_EMULATED BOOST_COMP_GNUC_DETECTION +# else +# undef BOOST_COMP_GNUC +# define BOOST_COMP_GNUC BOOST_COMP_GNUC_DETECTION +# endif +# define BOOST_COMP_GNUC_AVAILABLE +# include +#endif + +#define BOOST_COMP_GNUC_NAME "Gnu GCC C/C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GNUC,BOOST_COMP_GNUC_NAME) + +#ifdef BOOST_COMP_GNUC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GNUC_EMULATED,BOOST_COMP_GNUC_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/gcc_xml.h b/boost/boost/predef/compiler/gcc_xml.h new file mode 100644 index 0000000000..ef55f5d431 --- /dev/null +++ b/boost/boost/predef/compiler/gcc_xml.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_GCC_XML_H +#define BOOST_PREDEF_COMPILER_GCC_XML_H + +#include +#include + +/*` +[heading `BOOST_COMP_GCCXML`] + +[@http://www.gccxml.org/ GCC XML] compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__GCCXML__`] [__predef_detection__]] + ] + */ + +#define BOOST_COMP_GCCXML BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__GCCXML__) +# define BOOST_COMP_GCCXML_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#ifdef BOOST_COMP_GCCXML_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_GCCXML_EMULATED BOOST_COMP_GCCXML_DETECTION +# else +# undef BOOST_COMP_GCCXML +# define BOOST_COMP_GCCXML BOOST_COMP_GCCXML_DETECTION +# endif +# define BOOST_COMP_GCCXML_AVAILABLE +# include +#endif + +#define BOOST_COMP_GCCXML_NAME "GCC XML" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GCCXML,BOOST_COMP_GCCXML_NAME) + +#ifdef BOOST_COMP_GCCXML_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GCCXML_EMULATED,BOOST_COMP_GCCXML_NAME) +#endif + +#endif diff --git a/boost/boost/predef/compiler/greenhills.h b/boost/boost/predef/compiler/greenhills.h new file mode 100644 index 0000000000..462f57b611 --- /dev/null +++ b/boost/boost/predef/compiler/greenhills.h @@ -0,0 +1,67 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_GREENHILLS_H +#define BOOST_PREDEF_COMPILER_GREENHILLS_H + +#include +#include + +/*` +[heading `BOOST_COMP_GHS`] + +[@http://en.wikipedia.org/wiki/Green_Hills_Software Green Hills C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__ghs`] [__predef_detection__]] + [[`__ghs__`] [__predef_detection__]] + + [[`__GHS_VERSION_NUMBER__`] [V.R.P]] + [[`__ghs`] [V.R.P]] + ] + */ + +#define BOOST_COMP_GHS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__ghs) || defined(__ghs__) +# if !defined(BOOST_COMP_GHS_DETECTION) && defined(__GHS_VERSION_NUMBER__) +# define BOOST_COMP_GHS_DETECTION BOOST_PREDEF_MAKE_10_VRP(__GHS_VERSION_NUMBER__) +# endif +# if !defined(BOOST_COMP_GHS_DETECTION) && defined(__ghs) +# define BOOST_COMP_GHS_DETECTION BOOST_PREDEF_MAKE_10_VRP(__ghs) +# endif +# if !defined(BOOST_COMP_GHS_DETECTION) +# define BOOST_COMP_GHS_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_GHS_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_GHS_EMULATED BOOST_COMP_GHS_DETECTION +# else +# undef BOOST_COMP_GHS +# define BOOST_COMP_GHS BOOST_COMP_GHS_DETECTION +# endif +# define BOOST_COMP_GHS_AVAILABLE +# include +#endif + +#define BOOST_COMP_GHS_NAME "Green Hills C/C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GHS,BOOST_COMP_GHS_NAME) + +#ifdef BOOST_COMP_GHS_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GHS_EMULATED,BOOST_COMP_GHS_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/hp_acc.h b/boost/boost/predef/compiler/hp_acc.h new file mode 100644 index 0000000000..8cb7022d3b --- /dev/null +++ b/boost/boost/predef/compiler/hp_acc.h @@ -0,0 +1,62 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_HP_ACC_H +#define BOOST_PREDEF_COMPILER_HP_ACC_H + +#include +#include + +/*` +[heading `BOOST_COMP_HPACC`] + +HP aC++ compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__HP_aCC`] [__predef_detection__]] + + [[`__HP_aCC`] [V.R.P]] + ] + */ + +#define BOOST_COMP_HPACC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__HP_aCC) +# if !defined(BOOST_COMP_HPACC_DETECTION) && (__HP_aCC > 1) +# define BOOST_COMP_HPACC_DETECTION BOOST_PREDEF_MAKE_10_VVRRPP(__HP_aCC) +# endif +# if !defined(BOOST_COMP_HPACC_DETECTION) +# define BOOST_COMP_HPACC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_HPACC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_HPACC_EMULATED BOOST_COMP_HPACC_DETECTION +# else +# undef BOOST_COMP_HPACC +# define BOOST_COMP_HPACC BOOST_COMP_HPACC_DETECTION +# endif +# define BOOST_COMP_HPACC_AVAILABLE +# include +#endif + +#define BOOST_COMP_HPACC_NAME "HP aC++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_HPACC,BOOST_COMP_HPACC_NAME) + +#ifdef BOOST_COMP_HPACC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_HPACC_EMULATED,BOOST_COMP_HPACC_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/iar.h b/boost/boost/predef/compiler/iar.h new file mode 100644 index 0000000000..dd6bc0e095 --- /dev/null +++ b/boost/boost/predef/compiler/iar.h @@ -0,0 +1,57 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_IAR_H +#define BOOST_PREDEF_COMPILER_IAR_H + +#include +#include + +/*` +[heading `BOOST_COMP_IAR`] + +IAR C/C++ compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__IAR_SYSTEMS_ICC__`] [__predef_detection__]] + + [[`__VER__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_IAR BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__IAR_SYSTEMS_ICC__) +# define BOOST_COMP_IAR_DETECTION BOOST_PREDEF_MAKE_10_VVRR(__VER__) +#endif + +#ifdef BOOST_COMP_IAR_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_IAR_EMULATED BOOST_COMP_IAR_DETECTION +# else +# undef BOOST_COMP_IAR +# define BOOST_COMP_IAR BOOST_COMP_IAR_DETECTION +# endif +# define BOOST_COMP_IAR_AVAILABLE +# include +#endif + +#define BOOST_COMP_IAR_NAME "IAR C/C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IAR,BOOST_COMP_IAR_NAME) + +#ifdef BOOST_COMP_IAR_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IAR_EMULATED,BOOST_COMP_IAR_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/ibm.h b/boost/boost/predef/compiler/ibm.h new file mode 100644 index 0000000000..1edc93c364 --- /dev/null +++ b/boost/boost/predef/compiler/ibm.h @@ -0,0 +1,73 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_IBM_H +#define BOOST_PREDEF_COMPILER_IBM_H + +#include +#include + +/*` +[heading `BOOST_COMP_IBM`] + +[@http://en.wikipedia.org/wiki/VisualAge IBM XL C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__IBMCPP__`] [__predef_detection__]] + [[`__xlC__`] [__predef_detection__]] + [[`__xlc__`] [__predef_detection__]] + + [[`__COMPILER_VER__`] [V.R.P]] + [[`__xlC__`] [V.R.P]] + [[`__xlc__`] [V.R.P]] + [[`__IBMCPP__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_IBM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__IBMCPP__) || defined(__xlC__) || defined(__xlc__) +# if !defined(BOOST_COMP_IBM_DETECTION) && defined(__COMPILER_VER__) +# define BOOST_COMP_IBM_DETECTION BOOST_PREDEF_MAKE_0X_VRRPPPP(__COMPILER_VER__) +# endif +# if !defined(BOOST_COMP_IBM_DETECTION) && defined(__xlC__) +# define BOOST_COMP_IBM_DETECTION BOOST_PREDEF_MAKE_0X_VVRR(__xlC__) +# endif +# if !defined(BOOST_COMP_IBM_DETECTION) && defined(__xlc__) +# define BOOST_COMP_IBM_DETECTION BOOST_PREDEF_MAKE_0X_VVRR(__xlc__) +# endif +# if !defined(BOOST_COMP_IBM_DETECTION) +# define BOOST_COMP_IBM_DETECTION BOOST_PREDEF_MAKE_10_VRP(__IBMCPP__) +# endif +#endif + +#ifdef BOOST_COMP_IBM_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_IBM_EMULATED BOOST_COMP_IBM_DETECTION +# else +# undef BOOST_COMP_IBM +# define BOOST_COMP_IBM BOOST_COMP_IBM_DETECTION +# endif +# define BOOST_COMP_IBM_AVAILABLE +# include +#endif + +#define BOOST_COMP_IBM_NAME "IBM XL C/C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IBM,BOOST_COMP_IBM_NAME) + +#ifdef BOOST_COMP_IBM_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IBM_EMULATED,BOOST_COMP_IBM_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/intel.h b/boost/boost/predef/compiler/intel.h new file mode 100644 index 0000000000..60220c7bfe --- /dev/null +++ b/boost/boost/predef/compiler/intel.h @@ -0,0 +1,66 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_INTEL_H +#define BOOST_PREDEF_COMPILER_INTEL_H + +#include +#include + +/*` +[heading `BOOST_COMP_INTEL`] + +[@http://en.wikipedia.org/wiki/Intel_C%2B%2B Intel C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__INTEL_COMPILER`] [__predef_detection__]] + [[`__ICL`] [__predef_detection__]] + [[`__ICC`] [__predef_detection__]] + [[`__ECC`] [__predef_detection__]] + + [[`__INTEL_COMPILER`] [V.R.P]] + ] + */ + +#define BOOST_COMP_INTEL BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || \ + defined(__ECC) +# if !defined(BOOST_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) +# define BOOST_COMP_INTEL_DETECTION BOOST_PREDEF_MAKE_10_VRP(__INTEL_COMPILER) +# endif +# if !defined(BOOST_COMP_INTEL_DETECTION) +# define BOOST_COMP_INTEL_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_INTEL_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_INTEL_EMULATED BOOST_COMP_INTEL_DETECTION +# else +# undef BOOST_COMP_INTEL +# define BOOST_COMP_INTEL BOOST_COMP_INTEL_DETECTION +# endif +# define BOOST_COMP_INTEL_AVAILABLE +# include +#endif + +#define BOOST_COMP_INTEL_NAME "Intel C/C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_INTEL,BOOST_COMP_INTEL_NAME) + +#ifdef BOOST_COMP_INTEL_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_INTEL_EMULATED,BOOST_COMP_INTEL_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/kai.h b/boost/boost/predef/compiler/kai.h new file mode 100644 index 0000000000..4aadbe329d --- /dev/null +++ b/boost/boost/predef/compiler/kai.h @@ -0,0 +1,57 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_KAI_H +#define BOOST_PREDEF_COMPILER_KAI_H + +#include +#include + +/*` +[heading `BOOST_COMP_KCC`] + +Kai C++ compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__KCC`] [__predef_detection__]] + + [[`__KCC_VERSION`] [V.R.P]] + ] + */ + +#define BOOST_COMP_KCC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__KCC) +# define BOOST_COMP_KCC_DETECTION BOOST_PREDEF_MAKE_0X_VRPP(__KCC_VERSION) +#endif + +#ifdef BOOST_COMP_KCC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_KCC_EMULATED BOOST_COMP_KCC_DETECTION +# else +# undef BOOST_COMP_KCC +# define BOOST_COMP_KCC BOOST_COMP_KCC_DETECTION +# endif +# define BOOST_COMP_KCC_AVAILABLE +# include +#endif + +#define BOOST_COMP_KCC_NAME "Kai C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_KCC,BOOST_COMP_KCC_NAME) + +#ifdef BOOST_COMP_KCC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_KCC_EMULATED,BOOST_COMP_KCC_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/llvm.h b/boost/boost/predef/compiler/llvm.h new file mode 100644 index 0000000000..c7e634c312 --- /dev/null +++ b/boost/boost/predef/compiler/llvm.h @@ -0,0 +1,58 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_LLVM_H +#define BOOST_PREDEF_COMPILER_LLVM_H + +/* Other compilers that emulate this one need to be detected first. */ + +#include + +#include +#include + +/*` +[heading `BOOST_COMP_LLVM`] + +[@http://en.wikipedia.org/wiki/LLVM LLVM] compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__llvm__`] [__predef_detection__]] + ] + */ + +#define BOOST_COMP_LLVM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__llvm__) +# define BOOST_COMP_LLVM_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#ifdef BOOST_COMP_LLVM_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_LLVM_EMULATED BOOST_COMP_LLVM_DETECTION +# else +# undef BOOST_COMP_LLVM +# define BOOST_COMP_LLVM BOOST_COMP_LLVM_DETECTION +# endif +# define BOOST_COMP_LLVM_AVAILABLE +# include +#endif + +#define BOOST_COMP_LLVM_NAME "LLVM" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_LLVM,BOOST_COMP_LLVM_NAME) + +#ifdef BOOST_COMP_LLVM_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_LLVM_EMULATED,BOOST_COMP_LLVM_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/metaware.h b/boost/boost/predef/compiler/metaware.h new file mode 100644 index 0000000000..5e13de854a --- /dev/null +++ b/boost/boost/predef/compiler/metaware.h @@ -0,0 +1,54 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_METAWARE_H +#define BOOST_PREDEF_COMPILER_METAWARE_H + +#include +#include + +/*` +[heading `BOOST_COMP_HIGHC`] + +MetaWare High C/C++ compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__HIGHC__`] [__predef_detection__]] + ] + */ + +#define BOOST_COMP_HIGHC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__HIGHC__) +# define BOOST_COMP_HIGHC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#ifdef BOOST_COMP_HIGHC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_HIGHC_EMULATED BOOST_COMP_HIGHC_DETECTION +# else +# undef BOOST_COMP_HIGHC +# define BOOST_COMP_HIGHC BOOST_COMP_HIGHC_DETECTION +# endif +# define BOOST_COMP_HIGHC_AVAILABLE +# include +#endif + +#define BOOST_COMP_HIGHC_NAME "MetaWare High C/C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_HIGHC,BOOST_COMP_HIGHC_NAME) + +#ifdef BOOST_COMP_HIGHC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_HIGHC_EMULATED,BOOST_COMP_HIGHC_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/metrowerks.h b/boost/boost/predef/compiler/metrowerks.h new file mode 100644 index 0000000000..409282b339 --- /dev/null +++ b/boost/boost/predef/compiler/metrowerks.h @@ -0,0 +1,78 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_METROWERKS_H +#define BOOST_PREDEF_COMPILER_METROWERKS_H + +#include +#include + +/*` +[heading `BOOST_COMP_MWERKS`] + +[@http://en.wikipedia.org/wiki/CodeWarrior Metrowerks CodeWarrior] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__MWERKS__`] [__predef_detection__]] + [[`__CWCC__`] [__predef_detection__]] + + [[`__CWCC__`] [V.R.P]] + [[`__MWERKS__`] [V.R.P >= 4.2.0]] + [[`__MWERKS__`] [9.R.0]] + [[`__MWERKS__`] [8.R.0]] + ] + */ + +#define BOOST_COMP_MWERKS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__MWERKS__) || defined(__CWCC__) +# if !defined(BOOST_COMP_MWERKS_DETECTION) && defined(__CWCC__) +# define BOOST_COMP_MWERKS_DETECTION BOOST_PREDEF_MAKE_0X_VRPP(__CWCC__) +# endif +# if !defined(BOOST_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x4200) +# define BOOST_COMP_MWERKS_DETECTION BOOST_PREDEF_MAKE_0X_VRPP(__MWERKS__) +# endif +# if !defined(BOOST_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3204) // note the "skip": 04->9.3 +# define BOOST_COMP_MWERKS_DETECTION BOOST_VERSION_NUMBER(9,(__MWERKS__)%100-1,0) +# endif +# if !defined(BOOST_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3200) +# define BOOST_COMP_MWERKS_DETECTION BOOST_VERSION_NUMBER(9,(__MWERKS__)%100,0) +# endif +# if !defined(BOOST_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3000) +# define BOOST_COMP_MWERKS_DETECTION BOOST_VERSION_NUMBER(8,(__MWERKS__)%100,0) +# endif +# if !defined(BOOST_COMP_MWERKS_DETECTION) +# define BOOST_COMP_MWERKS_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_MWERKS_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_MWERKS_EMULATED BOOST_COMP_MWERKS_DETECTION +# else +# undef BOOST_COMP_MWERKS +# define BOOST_COMP_MWERKS BOOST_COMP_MWERKS_DETECTION +# endif +# define BOOST_COMP_MWERKS_AVAILABLE +# include +#endif + +#define BOOST_COMP_MWERKS_NAME "Metrowerks CodeWarrior" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MWERKS,BOOST_COMP_MWERKS_NAME) + +#ifdef BOOST_COMP_MWERKS_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MWERKS_EMULATED,BOOST_COMP_MWERKS_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/microtec.h b/boost/boost/predef/compiler/microtec.h new file mode 100644 index 0000000000..6bd627905b --- /dev/null +++ b/boost/boost/predef/compiler/microtec.h @@ -0,0 +1,54 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_MICROTEC_H +#define BOOST_PREDEF_COMPILER_MICROTEC_H + +#include +#include + +/*` +[heading `BOOST_COMP_MRI`] + +[@http://www.mentor.com/microtec/ Microtec C/C++] compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_MRI`] [__predef_detection__]] + ] + */ + +#define BOOST_COMP_MRI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(_MRI) +# define BOOST_COMP_MRI_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#ifdef BOOST_COMP_MRI_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_MRI_EMULATED BOOST_COMP_MRI_DETECTION +# else +# undef BOOST_COMP_MRI +# define BOOST_COMP_MRI BOOST_COMP_MRI_DETECTION +# endif +# define BOOST_COMP_MRI_AVAILABLE +# include +#endif + +#define BOOST_COMP_MRI_NAME "Microtec C/C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MRI,BOOST_COMP_MRI_NAME) + +#ifdef BOOST_COMP_MRI_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MRI_EMULATED,BOOST_COMP_MRI_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/mpw.h b/boost/boost/predef/compiler/mpw.h new file mode 100644 index 0000000000..3a48f6f74a --- /dev/null +++ b/boost/boost/predef/compiler/mpw.h @@ -0,0 +1,64 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_MPW_H +#define BOOST_PREDEF_COMPILER_MPW_H + +#include +#include + +/*` +[heading `BOOST_COMP_MPW`] + +[@http://en.wikipedia.org/wiki/Macintosh_Programmer%27s_Workshop MPW C++] compiler. +Version number available as major, and minor. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__MRC__`] [__predef_detection__]] + [[`MPW_C`] [__predef_detection__]] + [[`MPW_CPLUS`] [__predef_detection__]] + + [[`__MRC__`] [V.R.0]] + ] + */ + +#define BOOST_COMP_MPW BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__MRC__) || defined(MPW_C) || defined(MPW_CPLUS) +# if !defined(BOOST_COMP_MPW_DETECTION) && defined(__MRC__) +# define BOOST_COMP_MPW_DETECTION BOOST_PREDEF_MAKE_0X_VVRR(__MRC__) +# endif +# if !defined(BOOST_COMP_MPW_DETECTION) +# define BOOST_COMP_MPW_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_MPW_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_MPW_EMULATED BOOST_COMP_MPW_DETECTION +# else +# undef BOOST_COMP_MPW +# define BOOST_COMP_MPW BOOST_COMP_MPW_DETECTION +# endif +# define BOOST_COMP_MPW_AVAILABLE +# include +#endif + +#define BOOST_COMP_MPW_NAME "MPW C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MPW,BOOST_COMP_MPW_NAME) + +#ifdef BOOST_COMP_MPW_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MPW_EMULATED,BOOST_COMP_MPW_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/palm.h b/boost/boost/predef/compiler/palm.h new file mode 100644 index 0000000000..eb1da971cf --- /dev/null +++ b/boost/boost/predef/compiler/palm.h @@ -0,0 +1,57 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_PALM_H +#define BOOST_PREDEF_COMPILER_PALM_H + +#include +#include + +/*` +[heading `BOOST_COMP_PALM`] + +Palm C/C++ compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_PACC_VER`] [__predef_detection__]] + + [[`_PACC_VER`] [V.R.P]] + ] + */ + +#define BOOST_COMP_PALM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(_PACC_VER) +# define BOOST_COMP_PALM_DETECTION BOOST_PREDEF_MAKE_0X_VRRPP000(_PACC_VER) +#endif + +#ifdef BOOST_COMP_PALM_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_PALM_EMULATED BOOST_COMP_PALM_DETECTION +# else +# undef BOOST_COMP_PALM +# define BOOST_COMP_PALM BOOST_COMP_PALM_DETECTION +# endif +# define BOOST_COMP_PALM_AVAILABLE +# include +#endif + +#define BOOST_COMP_PALM_NAME "Palm C/C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PALM,BOOST_COMP_PALM_NAME) + +#ifdef BOOST_COMP_PALM_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PALM_EMULATED,BOOST_COMP_PALM_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/pgi.h b/boost/boost/predef/compiler/pgi.h new file mode 100644 index 0000000000..563335ff3c --- /dev/null +++ b/boost/boost/predef/compiler/pgi.h @@ -0,0 +1,61 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_PGI_H +#define BOOST_PREDEF_COMPILER_PGI_H + +#include +#include + +/*` +[heading `BOOST_COMP_PGI`] + +[@http://en.wikipedia.org/wiki/The_Portland_Group Portland Group C/C++] compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__PGI`] [__predef_detection__]] + + [[`__PGIC__`, `__PGIC_MINOR__`, `__PGIC_PATCHLEVEL__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_PGI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__PGI) +# if !defined(BOOST_COMP_PGI_DETECTION) && (defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__)) +# define BOOST_COMP_PGI_DETECTION BOOST_VERSION_NUMBER(__PGIC__,__PGIC_MINOR__,__PGIC_PATCHLEVEL__) +# endif +# if !defined(BOOST_COMP_PGI_DETECTION) +# define BOOST_COMP_PGI_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_PGI_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_PGI_EMULATED BOOST_COMP_PGI_DETECTION +# else +# undef BOOST_COMP_PGI +# define BOOST_COMP_PGI BOOST_COMP_PGI_DETECTION +# endif +# define BOOST_COMP_PGI_AVAILABLE +# include +#endif + +#define BOOST_COMP_PGI_NAME "Portland Group C/C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PGI,BOOST_COMP_PGI_NAME) + +#ifdef BOOST_COMP_PGI_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_PGI_EMULATED,BOOST_COMP_PGI_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/sgi_mipspro.h b/boost/boost/predef/compiler/sgi_mipspro.h new file mode 100644 index 0000000000..c212b19f4f --- /dev/null +++ b/boost/boost/predef/compiler/sgi_mipspro.h @@ -0,0 +1,67 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_SGI_MIPSPRO_H +#define BOOST_PREDEF_COMPILER_SGI_MIPSPRO_H + +#include +#include + +/*` +[heading `BOOST_COMP_SGI`] + +[@http://en.wikipedia.org/wiki/MIPSpro SGI MIPSpro] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__sgi`] [__predef_detection__]] + [[`sgi`] [__predef_detection__]] + + [[`_SGI_COMPILER_VERSION`] [V.R.P]] + [[`_COMPILER_VERSION`] [V.R.P]] + ] + */ + +#define BOOST_COMP_SGI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__sgi) || defined(sgi) +# if !defined(BOOST_COMP_SGI_DETECTION) && defined(_SGI_COMPILER_VERSION) +# define BOOST_COMP_SGI_DETECTION BOOST_PREDEF_MAKE_10_VRP(_SGI_COMPILER_VERSION) +# endif +# if !defined(BOOST_COMP_SGI_DETECTION) && defined(_COMPILER_VERSION) +# define BOOST_COMP_SGI_DETECTION BOOST_PREDEF_MAKE_10_VRP(_COMPILER_VERSION) +# endif +# if !defined(BOOST_COMP_SGI_DETECTION) +# define BOOST_COMP_SGI_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_SGI_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_SGI_EMULATED BOOST_COMP_SGI_DETECTION +# else +# undef BOOST_COMP_SGI +# define BOOST_COMP_SGI BOOST_COMP_SGI_DETECTION +# endif +# define BOOST_COMP_SGI_AVAILABLE +# include +#endif + +#define BOOST_COMP_SGI_NAME "SGI MIPSpro" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SGI,BOOST_COMP_SGI_NAME) + +#ifdef BOOST_COMP_SGI_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SGI_EMULATED,BOOST_COMP_SGI_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/sunpro.h b/boost/boost/predef/compiler/sunpro.h new file mode 100644 index 0000000000..bd3da279dd --- /dev/null +++ b/boost/boost/predef/compiler/sunpro.h @@ -0,0 +1,67 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_SUNPRO_H +#define BOOST_PREDEF_COMPILER_SUNPRO_H + +#include +#include + +/*` +[heading `BOOST_COMP_SUNPRO`] + +[@http://en.wikipedia.org/wiki/Sun_Studio_%28software%29 Sun Studio] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__SUNPRO_CC`] [__predef_detection__]] + [[`__SUNPRO_C`] [__predef_detection__]] + + [[`__SUNPRO_CC`] [V.R.P]] + [[`__SUNPRO_C`] [V.R.P]] + ] + */ + +#define BOOST_COMP_SUNPRO BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__SUNPRO_CC) || defined(__SUNPRO_C) +# if !defined(BOOST_COMP_SUNPRO_DETECTION) && defined(__SUNPRO_CC) +# define BOOST_COMP_SUNPRO_DETECTION BOOST_PREDEF_MAKE_0X_VRP(__SUNPRO_CC) +# endif +# if !defined(BOOST_COMP_SUNPRO_DETECTION) && defined(__SUNPRO_C) +# define BOOST_COMP_SUNPRO_DETECTION BOOST_PREDEF_MAKE_0X_VRP(__SUNPRO_C) +# endif +# if !defined(BOOST_COMP_SUNPRO_DETECTION) +# define BOOST_COMP_SUNPRO_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_COMP_SUNPRO_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_SUNPRO_EMULATED BOOST_COMP_SUNPRO_DETECTION +# else +# undef BOOST_COMP_SUNPRO +# define BOOST_COMP_SUNPRO BOOST_COMP_SUNPRO_DETECTION +# endif +# define BOOST_COMP_SUNPRO_AVAILABLE +# include +#endif + +#define BOOST_COMP_SUNPRO_NAME "Sun Studio" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SUNPRO,BOOST_COMP_SUNPRO_NAME) + +#ifdef BOOST_COMP_SUNPRO_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_SUNPRO_EMULATED,BOOST_COMP_SUNPRO_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/tendra.h b/boost/boost/predef/compiler/tendra.h new file mode 100644 index 0000000000..194f0af83a --- /dev/null +++ b/boost/boost/predef/compiler/tendra.h @@ -0,0 +1,54 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_TENDRA_H +#define BOOST_PREDEF_COMPILER_TENDRA_H + +#include +#include + +/*` +[heading `BOOST_COMP_TENDRA`] + +[@http://en.wikipedia.org/wiki/TenDRA_Compiler TenDRA C/C++] compiler. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__TenDRA__`] [__predef_detection__]] + ] + */ + +#define BOOST_COMP_TENDRA BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__TenDRA__) +# define BOOST_COMP_TENDRA_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#ifdef BOOST_COMP_TENDRA_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_TENDRA_EMULATED BOOST_COMP_TENDRA_DETECTION +# else +# undef BOOST_COMP_TENDRA +# define BOOST_COMP_TENDRA BOOST_COMP_TENDRA_DETECTION +# endif +# define BOOST_COMP_TENDRA_AVAILABLE +# include +#endif + +#define BOOST_COMP_TENDRA_NAME "TenDRA C/C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_TENDRA,BOOST_COMP_TENDRA_NAME) + +#ifdef BOOST_COMP_TENDRA_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_TENDRA_EMULATED,BOOST_COMP_TENDRA_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/visualc.h b/boost/boost/predef/compiler/visualc.h new file mode 100644 index 0000000000..959d38f267 --- /dev/null +++ b/boost/boost/predef/compiler/visualc.h @@ -0,0 +1,92 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_VISUALC_H +#define BOOST_PREDEF_COMPILER_VISUALC_H + +/* Other compilers that emulate this one need to be detected first. */ + +#include + +#include +#include + +/*` +[heading `BOOST_COMP_MSVC`] + +[@http://en.wikipedia.org/wiki/Visual_studio Microsoft Visual C/C++] compiler. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_MSC_VER`] [__predef_detection__]] + + [[`_MSC_FULL_VER`] [V.R.P]] + [[`_MSC_VER`] [V.R.0]] + ] + */ + +#define BOOST_COMP_MSVC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(_MSC_VER) +# if !defined (_MSC_FULL_VER) +# define BOOST_COMP_MSVC_BUILD 0 +# else + /* how many digits does the build number have? */ +# if _MSC_FULL_VER / 10000 == _MSC_VER + /* four digits */ +# define BOOST_COMP_MSVC_BUILD (_MSC_FULL_VER % 10000) +# elif _MSC_FULL_VER / 100000 == _MSC_VER + /* five digits */ +# define BOOST_COMP_MSVC_BUILD (_MSC_FULL_VER % 100000) +# else +# error "Cannot determine build number from _MSC_FULL_VER" +# endif +# endif + /* + VS2014 was skipped in the release sequence for MS. Which + means that the compiler and VS product versions are no longer + in sync. Hence we need to use different formulas for + mapping from MSC version to VS product version. + */ +# if (_MSC_VER >= 1900) +# define BOOST_COMP_MSVC_DETECTION BOOST_VERSION_NUMBER(\ + _MSC_VER/100-5,\ + _MSC_VER%100,\ + BOOST_COMP_MSVC_BUILD) +# else +# define BOOST_COMP_MSVC_DETECTION BOOST_VERSION_NUMBER(\ + _MSC_VER/100-6,\ + _MSC_VER%100,\ + BOOST_COMP_MSVC_BUILD) +# endif +#endif + +#ifdef BOOST_COMP_MSVC_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_MSVC_EMULATED BOOST_COMP_MSVC_DETECTION +# else +# undef BOOST_COMP_MSVC +# define BOOST_COMP_MSVC BOOST_COMP_MSVC_DETECTION +# endif +# define BOOST_COMP_MSVC_AVAILABLE +# include +#endif + +#define BOOST_COMP_MSVC_NAME "Microsoft Visual C/C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MSVC,BOOST_COMP_MSVC_NAME) + +#ifdef BOOST_COMP_MSVC_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MSVC_EMULATED,BOOST_COMP_MSVC_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/compiler/watcom.h b/boost/boost/predef/compiler/watcom.h new file mode 100644 index 0000000000..832d10c54a --- /dev/null +++ b/boost/boost/predef/compiler/watcom.h @@ -0,0 +1,57 @@ +/* +Copyright Rene Rivera 2008-2014 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_WATCOM_H +#define BOOST_PREDEF_COMPILER_WATCOM_H + +#include +#include + +/*` +[heading `BOOST_COMP_WATCOM`] + +[@http://en.wikipedia.org/wiki/Watcom Watcom C++] compiler. +Version number available as major, and minor. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__WATCOMC__`] [__predef_detection__]] + + [[`__WATCOMC__`] [V.R.P]] + ] + */ + +#define BOOST_COMP_WATCOM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__WATCOMC__) +# define BOOST_COMP_WATCOM_DETECTION BOOST_PREDEF_MAKE_10_VVRR(__WATCOMC__) +#endif + +#ifdef BOOST_COMP_WATCOM_DETECTION +# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) +# define BOOST_COMP_WATCOM_EMULATED BOOST_COMP_WATCOM_DETECTION +# else +# undef BOOST_COMP_WATCOM +# define BOOST_COMP_WATCOM BOOST_COMP_WATCOM_DETECTION +# endif +# define BOOST_COMP_WATCOM_AVAILABLE +# include +#endif + +#define BOOST_COMP_WATCOM_NAME "Watcom C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_WATCOM,BOOST_COMP_WATCOM_NAME) + +#ifdef BOOST_COMP_WATCOM_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_WATCOM_EMULATED,BOOST_COMP_WATCOM_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/detail/_cassert.h b/boost/boost/predef/detail/_cassert.h index ca594a840b..ccae4950d3 100644 --- a/boost/boost/predef/detail/_cassert.h +++ b/boost/boost/predef/detail/_cassert.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2011-2012 +Copyright Rene Rivera 2011-2012 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) diff --git a/boost/boost/predef/detail/_exception.h b/boost/boost/predef/detail/_exception.h new file mode 100644 index 0000000000..ca58c79d32 --- /dev/null +++ b/boost/boost/predef/detail/_exception.h @@ -0,0 +1,15 @@ +/* +Copyright Rene Rivera 2011-2012 +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) +*/ + +#ifndef BOOST_PREDEF_DETAIL__EXCEPTION_H +#define BOOST_PREDEF_DETAIL__EXCEPTION_H + +#if defined(__cpluplus) +#include +#endif + +#endif diff --git a/boost/boost/predef/detail/comp_detected.h b/boost/boost/predef/detail/comp_detected.h new file mode 100644 index 0000000000..fda1801b65 --- /dev/null +++ b/boost/boost/predef/detail/comp_detected.h @@ -0,0 +1,10 @@ +/* +Copyright Rene Rivera 2014 +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) +*/ + +#ifndef BOOST_PREDEF_DETAIL_COMP_DETECTED +#define BOOST_PREDEF_DETAIL_COMP_DETECTED 1 +#endif diff --git a/boost/boost/predef/detail/endian_compat.h b/boost/boost/predef/detail/endian_compat.h index b8736597e7..7725e6823c 100644 --- a/boost/boost/predef/detail/endian_compat.h +++ b/boost/boost/predef/detail/endian_compat.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2013 +Copyright Rene Rivera 2013 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) diff --git a/boost/boost/predef/detail/os_detected.h b/boost/boost/predef/detail/os_detected.h index 7d70c1ef73..08e10f993a 100644 --- a/boost/boost/predef/detail/os_detected.h +++ b/boost/boost/predef/detail/os_detected.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2013 +Copyright Rene Rivera 2013 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) diff --git a/boost/boost/predef/detail/platform_detected.h b/boost/boost/predef/detail/platform_detected.h new file mode 100644 index 0000000000..4faf6938d8 --- /dev/null +++ b/boost/boost/predef/detail/platform_detected.h @@ -0,0 +1,10 @@ +/* +Copyright Rene Rivera 2014 +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) +*/ + +#ifndef BOOST_PREDEF_DETAIL_PLAT_DETECTED +#define BOOST_PREDEF_DETAIL_PLAT_DETECTED 1 +#endif diff --git a/boost/boost/predef/detail/test.h b/boost/boost/predef/detail/test.h index c75eccc5b7..546a9e407d 100644 --- a/boost/boost/predef/detail/test.h +++ b/boost/boost/predef/detail/test.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software Inc. 2011-2012 +Copyright Rene Rivera 2011-2012 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) diff --git a/boost/boost/predef/language.h b/boost/boost/predef/language.h new file mode 100644 index 0000000000..c9251c52ae --- /dev/null +++ b/boost/boost/predef/language.h @@ -0,0 +1,15 @@ +/* +Copyright Rene Rivera 2011-2012 +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) +*/ + +#ifndef BOOST_PREDEF_LANGUAGE_H +#define BOOST_PREDEF_LANGUAGE_H + +#include +#include +#include + +#endif diff --git a/boost/boost/predef/language/objc.h b/boost/boost/predef/language/objc.h new file mode 100644 index 0000000000..27a32b6372 --- /dev/null +++ b/boost/boost/predef/language/objc.h @@ -0,0 +1,43 @@ +/* +Copyright Rene Rivera 2011-2013 +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) +*/ + +#ifndef BOOST_PREDEF_LANGUAGE_OBJC_H +#define BOOST_PREDEF_LANGUAGE_OBJC_H + +#include +#include + +/*` +[heading `BOOST_LANG_OBJC`] + +[@http://en.wikipedia.org/wiki/Objective-C Objective-C] language. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__OBJC__`] [__predef_detection__]] + ] + */ + +#define BOOST_LANG_OBJC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__OBJC__) +# undef BOOST_LANG_OBJC +# define BOOST_LANG_OBJC BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_LANG_OBJC +# define BOOST_LANG_OBJC_AVAILABLE +#endif + +#define BOOST_LANG_OBJC_NAME "Objective-C" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_OBJC,BOOST_LANG_OBJC_NAME) + + +#endif diff --git a/boost/boost/predef/language/stdc.h b/boost/boost/predef/language/stdc.h new file mode 100644 index 0000000000..59a4e0bb47 --- /dev/null +++ b/boost/boost/predef/language/stdc.h @@ -0,0 +1,54 @@ +/* +Copyright Rene Rivera 2011-2012 +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) +*/ + +#ifndef BOOST_PREDEF_LANGUAGE_STDC_H +#define BOOST_PREDEF_LANGUAGE_STDC_H + +#include +#include + +/*` +[heading `BOOST_LANG_STDC`] + +[@http://en.wikipedia.org/wiki/C_(programming_language) Standard C] language. +If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__STDC__`] [__predef_detection__]] + + [[`__STDC_VERSION__`] [V.R.P]] + ] + */ + +#define BOOST_LANG_STDC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__STDC__) +# undef BOOST_LANG_STDC +# if defined(__STDC_VERSION__) +# if (__STDC_VERSION__ > 100) +# define BOOST_LANG_STDC BOOST_PREDEF_MAKE_YYYYMM(__STDC_VERSION__) +# else +# define BOOST_LANG_STDC BOOST_VERSION_NUMBER_AVAILABLE +# endif +# else +# define BOOST_LANG_STDC BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LANG_STDC +# define BOOST_LANG_STDC_AVAILABLE +#endif + +#define BOOST_LANG_STDC_NAME "Standard C" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDC,BOOST_LANG_STDC_NAME) + + +#endif diff --git a/boost/boost/predef/language/stdcpp.h b/boost/boost/predef/language/stdcpp.h new file mode 100644 index 0000000000..693c67b02a --- /dev/null +++ b/boost/boost/predef/language/stdcpp.h @@ -0,0 +1,124 @@ +/* +Copyright Rene Rivera 2011-2013 +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) +*/ + +#ifndef BOOST_PREDEF_LANGUAGE_STDCPP_H +#define BOOST_PREDEF_LANGUAGE_STDCPP_H + +#include +#include + +/*` +[heading `BOOST_LANG_STDCPP`] + +[@http://en.wikipedia.org/wiki/C%2B%2B Standard C++] language. +If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date. +Because of the way the C++ standardization process works the +defined version year will not be the commonly known year of the standard. +Specifically the defined versions are: + +[table Detected Version Number vs. C++ Standard Year + [[Detected Version Number] [Standard Year] [C++ Standard]] + [[27.11.1] [1998] [ISO/IEC 14882:1998]] + [[41.12.1] [2011] [ISO/IEC 14882:2011]] +] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__cplusplus`] [__predef_detection__]] + + [[`__cplusplus`] [YYYY.MM.1]] + ] + */ + +#define BOOST_LANG_STDCPP BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__cplusplus) +# undef BOOST_LANG_STDCPP +# if (__cplusplus > 100) +# define BOOST_LANG_STDCPP BOOST_PREDEF_MAKE_YYYYMM(__cplusplus) +# else +# define BOOST_LANG_STDCPP BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LANG_STDCPP +# define BOOST_LANG_STDCPP_AVAILABLE +#endif + +#define BOOST_LANG_STDCPP_NAME "Standard C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDCPP,BOOST_LANG_STDCPP_NAME) + + +/*` +[heading `BOOST_LANG_STDCPPCLI`] + +[@http://en.wikipedia.org/wiki/C%2B%2B/CLI Standard C++/CLI] language. +If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__cplusplus_cli`] [__predef_detection__]] + + [[`__cplusplus_cli`] [YYYY.MM.1]] + ] + */ + +#define BOOST_LANG_STDCPPCLI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__cplusplus_cli) +# undef BOOST_LANG_STDCPPCLI +# if (__cplusplus_cli > 100) +# define BOOST_LANG_STDCPPCLI BOOST_PREDEF_MAKE_YYYYMM(__cplusplus_cli) +# else +# define BOOST_LANG_STDCPPCLI BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LANG_STDCPPCLI +# define BOOST_LANG_STDCPPCLI_AVAILABLE +#endif + +#define BOOST_LANG_STDCPPCLI_NAME "Standard C++/CLI" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDCPPCLI,BOOST_LANG_STDCPPCLI_NAME) + + +/*` +[heading `BOOST_LANG_STDECPP`] + +[@http://en.wikipedia.org/wiki/Embedded_C%2B%2B Standard Embedded C++] language. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__embedded_cplusplus`] [__predef_detection__]] + ] + */ + +#define BOOST_LANG_STDECPP BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__embedded_cplusplus) +# undef BOOST_LANG_STDECPP +# define BOOST_LANG_STDECPP BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_LANG_STDECPP +# define BOOST_LANG_STDECPP_AVAILABLE +#endif + +#define BOOST_LANG_STDECPP_NAME "Standard Embedded C++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDECPP,BOOST_LANG_STDECPP_NAME) + + +#endif diff --git a/boost/boost/predef/library.h b/boost/boost/predef/library.h new file mode 100644 index 0000000000..a474323f3e --- /dev/null +++ b/boost/boost/predef/library.h @@ -0,0 +1,14 @@ +/* +Copyright Rene Rivera 2008-2012 +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) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_H +#define BOOST_PREDEF_LIBRARY_H + +#include +#include + +#endif diff --git a/boost/boost/predef/library/c.h b/boost/boost/predef/library/c.h new file mode 100644 index 0000000000..733e6a7c87 --- /dev/null +++ b/boost/boost/predef/library/c.h @@ -0,0 +1,18 @@ +/* +Copyright Rene Rivera 2008-2012 +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) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_C_H +#define BOOST_PREDEF_LIBRARY_C_H + +#include + +#include +#include +#include +#include + +#endif diff --git a/boost/boost/predef/library/c/_prefix.h b/boost/boost/predef/library/c/_prefix.h index 754601f5a2..12bcb0fb3f 100644 --- a/boost/boost/predef/library/c/_prefix.h +++ b/boost/boost/predef/library/c/_prefix.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/library/c/gnu.h b/boost/boost/predef/library/c/gnu.h index a2bdfcefa0..8ed9f76a3d 100644 --- a/boost/boost/predef/library/c/gnu.h +++ b/boost/boost/predef/library/c/gnu.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/predef/library/c/uc.h b/boost/boost/predef/library/c/uc.h new file mode 100644 index 0000000000..8b47de15a8 --- /dev/null +++ b/boost/boost/predef/library/c/uc.h @@ -0,0 +1,48 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_C_UC_H +#define BOOST_PREDEF_LIBRARY_C_UC_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_C_UC`] + +[@http://en.wikipedia.org/wiki/Uclibc uClibc] Standard C library. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__UCLIBC__`] [__predef_detection__]] + + [[`__UCLIBC_MAJOR__`, `__UCLIBC_MINOR__`, `__UCLIBC_SUBLEVEL__`] [V.R.P]] + ] + */ + +#define BOOST_LIB_C_UC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__UCLIBC__) +# undef BOOST_LIB_C_UC +# define BOOST_LIB_C_UC BOOST_VERSION_NUMBER(\ + __UCLIBC_MAJOR__,__UCLIBC_MINOR__,__UCLIBC_SUBLEVEL__) +#endif + +#if BOOST_LIB_C_UC +# define BOOST_LIB_C_UC_AVAILABLE +#endif + +#define BOOST_LIB_C_UC_NAME "uClibc" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_C_UC,BOOST_LIB_C_UC_NAME) + + +#endif diff --git a/boost/boost/predef/library/c/vms.h b/boost/boost/predef/library/c/vms.h new file mode 100644 index 0000000000..0357d05e68 --- /dev/null +++ b/boost/boost/predef/library/c/vms.h @@ -0,0 +1,48 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_C_VMS_H +#define BOOST_PREDEF_LIBRARY_C_VMS_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_C_VMS`] + +VMS libc Standard C library. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__CRTL_VER`] [__predef_detection__]] + + [[`__CRTL_VER`] [V.R.P]] + ] + */ + +#define BOOST_LIB_C_VMS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__CRTL_VER) +# undef BOOST_LIB_C_VMS +# define BOOST_LIB_C_VMS BOOST_PREDEF_MAKE_10_VVRR0PP00(__CRTL_VER) +#endif + +#if BOOST_LIB_C_VMS +# define BOOST_LIB_C_VMS_AVAILABLE +#endif + +#define BOOST_LIB_C_VMS_NAME "VMS" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_C_VMS,BOOST_LIB_C_VMS_NAME) + + +#endif diff --git a/boost/boost/predef/library/c/zos.h b/boost/boost/predef/library/c/zos.h new file mode 100644 index 0000000000..4c6f0581d1 --- /dev/null +++ b/boost/boost/predef/library/c/zos.h @@ -0,0 +1,57 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_C_ZOS_H +#define BOOST_PREDEF_LIBRARY_C_ZOS_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_C_ZOS`] + +z/OS libc Standard C library. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__LIBREL__`] [__predef_detection__]] + + [[`__LIBREL__`] [V.R.P]] + [[`__TARGET_LIB__`] [V.R.P]] + ] + */ + +#define BOOST_LIB_C_ZOS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__LIBREL__) +# undef BOOST_LIB_C_ZOS +# if !defined(BOOST_LIB_C_ZOS) && defined(__LIBREL__) +# define BOOST_LIB_C_ZOS BOOST_PREDEF_MAKE_0X_VRRPPPP(__LIBREL__) +# endif +# if !defined(BOOST_LIB_C_ZOS) && defined(__TARGET_LIB__) +# define BOOST_LIB_C_ZOS BOOST_PREDEF_MAKE_0X_VRRPPPP(__TARGET_LIB__) +# endif +# if !defined(BOOST_LIB_C_ZOS) +# define BOOST_LIB_C_ZOS BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LIB_C_ZOS +# define BOOST_LIB_C_ZOS_AVAILABLE +#endif + +#define BOOST_LIB_C_ZOS_NAME "z/OS" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_C_ZOS,BOOST_LIB_C_ZOS_NAME) + + +#endif diff --git a/boost/boost/predef/library/std.h b/boost/boost/predef/library/std.h new file mode 100644 index 0000000000..9ab0a863c4 --- /dev/null +++ b/boost/boost/predef/library/std.h @@ -0,0 +1,23 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ +#ifndef BOOST_PREDEF_LIBRARY_STD_H +#define BOOST_PREDEF_LIBRARY_STD_H + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/boost/boost/predef/library/std/_prefix.h b/boost/boost/predef/library/std/_prefix.h new file mode 100644 index 0000000000..932b8557b1 --- /dev/null +++ b/boost/boost/predef/library/std/_prefix.h @@ -0,0 +1,23 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ +#ifndef BOOST_PREDEF_LIBRARY_STD__PREFIX_H +#define BOOST_PREDEF_LIBRARY_STD__PREFIX_H + +/* +We need to include an STD header to gives us the context +of which library we are using. The "smallest" code-wise header +seems to be . Boost uses but as far +as I can tell (RR) it's not a stand-alone header in most +implementations. Using also has the benefit of +being available in EC++, so we get a chance to make this work +for embedded users. And since it's not a header impacted by TR1 +there's no magic needed for inclusion in the face of the +Boost.TR1 library. +*/ +#include + +#endif diff --git a/boost/boost/predef/library/std/cxx.h b/boost/boost/predef/library/std/cxx.h new file mode 100644 index 0000000000..1d0cf5f2b9 --- /dev/null +++ b/boost/boost/predef/library/std/cxx.h @@ -0,0 +1,47 @@ +/* +Copyright Rene Rivera 2011-2013 +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) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_CXX_H +#define BOOST_PREDEF_LIBRARY_STD_CXX_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_CXX`] + +[@http://libcxx.llvm.org/ libc++] C++ Standard Library. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_LIBCPP_VERSION`] [__predef_detection__]] + + [[`_LIBCPP_VERSION`] [V.0.P]] + ] + */ + +#define BOOST_LIB_STD_CXX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(_LIBCPP_VERSION) +# undef BOOST_LIB_STD_CXX +# define BOOST_LIB_STD_CXX BOOST_PREDEF_MAKE_10_VPPP(_LIBCPP_VERSION) +#endif + +#if BOOST_LIB_STD_CXX +# define BOOST_LIB_STD_CXX_AVAILABLE +#endif + +#define BOOST_LIB_STD_CXX_NAME "libc++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_CXX,BOOST_LIB_STD_CXX_NAME) + + +#endif diff --git a/boost/boost/predef/library/std/dinkumware.h b/boost/boost/predef/library/std/dinkumware.h new file mode 100644 index 0000000000..394e866ea5 --- /dev/null +++ b/boost/boost/predef/library/std/dinkumware.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_DINKUMWARE_H +#define BOOST_PREDEF_LIBRARY_STD_DINKUMWARE_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_DINKUMWARE`] + +[@http://en.wikipedia.org/wiki/Dinkumware Dinkumware] Standard C++ Library. +If available version number as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_YVALS`, `__IBMCPP__`] [__predef_detection__]] + [[`_CPPLIB_VER`] [__predef_detection__]] + + [[`_CPPLIB_VER`] [V.R.0]] + ] + */ + +#define BOOST_LIB_STD_DINKUMWARE BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) +# undef BOOST_LIB_STD_DINKUMWARE +# if defined(_CPPLIB_VER) +# define BOOST_LIB_STD_DINKUMWARE BOOST_PREDEF_MAKE_10_VVRR(_CPPLIB_VER) +# else +# define BOOST_LIB_STD_DINKUMWARE BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LIB_STD_DINKUMWARE +# define BOOST_LIB_STD_DINKUMWARE_AVAILABLE +#endif + +#define BOOST_LIB_STD_DINKUMWARE_NAME "Dinkumware" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_DINKUMWARE,BOOST_LIB_STD_DINKUMWARE_NAME) + + +#endif diff --git a/boost/boost/predef/library/std/libcomo.h b/boost/boost/predef/library/std/libcomo.h new file mode 100644 index 0000000000..41bbe67781 --- /dev/null +++ b/boost/boost/predef/library/std/libcomo.h @@ -0,0 +1,48 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_LIBCOMO_H +#define BOOST_PREDEF_LIBRARY_STD_LIBCOMO_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_COMO`] + +[@http://www.comeaucomputing.com/libcomo/ Comeau Computing] Standard C++ Library. +Version number available as major. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__LIBCOMO__`] [__predef_detection__]] + + [[`__LIBCOMO_VERSION__`] [V.0.0]] + ] + */ + +#define BOOST_LIB_STD_COMO BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__LIBCOMO__) +# undef BOOST_LIB_STD_COMO +# define BOOST_LIB_STD_COMO BOOST_VERSION_NUMBER(__LIBCOMO_VERSION__,0,0) +#endif + +#if BOOST_LIB_STD_COMO +# define BOOST_LIB_STD_COMO_AVAILABLE +#endif + +#define BOOST_LIB_STD_COMO_NAME "Comeau Computing" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_COMO,BOOST_LIB_STD_COMO_NAME) + + +#endif diff --git a/boost/boost/predef/library/std/modena.h b/boost/boost/predef/library/std/modena.h new file mode 100644 index 0000000000..fa7c061cfe --- /dev/null +++ b/boost/boost/predef/library/std/modena.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_MODENA_H +#define BOOST_PREDEF_LIBRARY_STD_MODENA_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_MSIPL`] + +[@http://modena.us/ Modena Software Lib++] Standard C++ Library. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`MSIPL_COMPILE_H`] [__predef_detection__]] + [[`__MSIPL_COMPILE_H`] [__predef_detection__]] + ] + */ + +#define BOOST_LIB_STD_MSIPL BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(MSIPL_COMPILE_H) || defined(__MSIPL_COMPILE_H) +# undef BOOST_LIB_STD_MSIPL +# define BOOST_LIB_STD_MSIPL BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_LIB_STD_MSIPL +# define BOOST_LIB_STD_MSIPL_AVAILABLE +#endif + +#define BOOST_LIB_STD_MSIPL_NAME "Modena Software Lib++" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_MSIPL,BOOST_LIB_STD_MSIPL_NAME) + + +#endif diff --git a/boost/boost/predef/library/std/msl.h b/boost/boost/predef/library/std/msl.h new file mode 100644 index 0000000000..16ddec6905 --- /dev/null +++ b/boost/boost/predef/library/std/msl.h @@ -0,0 +1,54 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_MSL_H +#define BOOST_PREDEF_LIBRARY_STD_MSL_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_MSL`] + +[@http://www.freescale.com/ Metrowerks] Standard C++ Library. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__MSL_CPP__`] [__predef_detection__]] + [[`__MSL__`] [__predef_detection__]] + + [[`__MSL_CPP__`] [V.R.P]] + [[`__MSL__`] [V.R.P]] + ] + */ + +#define BOOST_LIB_STD_MSL BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__MSL_CPP__) || defined(__MSL__) +# undef BOOST_LIB_STD_MSL +# if defined(__MSL_CPP__) +# define BOOST_LIB_STD_MSL BOOST_PREDEF_MAKE_0X_VRPP(__MSL_CPP__) +# else +# define BOOST_LIB_STD_MSL BOOST_PREDEF_MAKE_0X_VRPP(__MSL__) +# endif +#endif + +#if BOOST_LIB_STD_MSL +# define BOOST_LIB_STD_MSL_AVAILABLE +#endif + +#define BOOST_LIB_STD_MSL_NAME "Metrowerks" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_MSL,BOOST_LIB_STD_MSL_NAME) + + +#endif diff --git a/boost/boost/predef/library/std/roguewave.h b/boost/boost/predef/library/std/roguewave.h new file mode 100644 index 0000000000..38471d09ab --- /dev/null +++ b/boost/boost/predef/library/std/roguewave.h @@ -0,0 +1,57 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_ROGUEWAVE_H +#define BOOST_PREDEF_LIBRARY_STD_ROGUEWAVE_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_RW`] + +[@http://stdcxx.apache.org/ Roguewave] Standard C++ library. +If available version number as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__STD_RWCOMPILER_H__`] [__predef_detection__]] + [[`_RWSTD_VER`] [__predef_detection__]] + + [[`_RWSTD_VER`] [V.R.P]] + ] + */ + +#define BOOST_LIB_STD_RW BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) +# undef BOOST_LIB_STD_RW +# if defined(_RWSTD_VER) +# if _RWSTD_VER < 0x010000 +# define BOOST_LIB_STD_RW BOOST_PREDEF_MAKE_0X_VVRRP(_RWSTD_VER) +# else +# define BOOST_LIB_STD_RW BOOST_PREDEF_MAKE_0X_VVRRPP(_RWSTD_VER) +# endif +# else +# define BOOST_LIB_STD_RW BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LIB_STD_RW +# define BOOST_LIB_STD_RW_AVAILABLE +#endif + +#define BOOST_LIB_STD_RW_NAME "Roguewave" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_RW,BOOST_LIB_STD_RW_NAME) + + +#endif diff --git a/boost/boost/predef/library/std/sgi.h b/boost/boost/predef/library/std/sgi.h new file mode 100644 index 0000000000..16f0db1076 --- /dev/null +++ b/boost/boost/predef/library/std/sgi.h @@ -0,0 +1,52 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_SGI_H +#define BOOST_PREDEF_LIBRARY_STD_SGI_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_SGI`] + +[@http://www.sgi.com/tech/stl/ SGI] Standard C++ library. +If available version number as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__STL_CONFIG_H`] [__predef_detection__]] + + [[`__SGI_STL`] [V.R.P]] + ] + */ + +#define BOOST_LIB_STD_SGI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__STL_CONFIG_H) +# undef BOOST_LIB_STD_SGI +# if defined(__SGI_STL) +# define BOOST_LIB_STD_SGI BOOST_PREDEF_MAKE_0X_VRP(__SGI_STL) +# else +# define BOOST_LIB_STD_SGI BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_LIB_STD_SGI +# define BOOST_LIB_STD_SGI_AVAILABLE +#endif + +#define BOOST_LIB_STD_SGI_NAME "SGI" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_SGI,BOOST_LIB_STD_SGI_NAME) + + +#endif diff --git a/boost/boost/predef/library/std/stdcpp3.h b/boost/boost/predef/library/std/stdcpp3.h new file mode 100644 index 0000000000..19ebc8683d --- /dev/null +++ b/boost/boost/predef/library/std/stdcpp3.h @@ -0,0 +1,54 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_STDCPP3_H +#define BOOST_PREDEF_LIBRARY_STD_STDCPP3_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_GNU`] + +[@http://gcc.gnu.org/libstdc++/ GNU libstdc++] Standard C++ library. +Version number available as year (from 1970), month, and day. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__GLIBCXX__`] [__predef_detection__]] + [[`__GLIBCPP__`] [__predef_detection__]] + + [[`__GLIBCXX__`] [V.R.P]] + [[`__GLIBCPP__`] [V.R.P]] + ] + */ + +#define BOOST_LIB_STD_GNU BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__GLIBCPP__) || defined(__GLIBCXX__) +# undef BOOST_LIB_STD_GNU +# if defined(__GLIBCXX__) +# define BOOST_LIB_STD_GNU BOOST_PREDEF_MAKE_YYYYMMDD(__GLIBCXX__) +# else +# define BOOST_LIB_STD_GNU BOOST_PREDEF_MAKE_YYYYMMDD(__GLIBCPP__) +# endif +#endif + +#if BOOST_LIB_STD_GNU +# define BOOST_LIB_STD_GNU_AVAILABLE +#endif + +#define BOOST_LIB_STD_GNU_NAME "GNU" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_GNU,BOOST_LIB_STD_GNU_NAME) + + +#endif diff --git a/boost/boost/predef/library/std/stlport.h b/boost/boost/predef/library/std/stlport.h new file mode 100644 index 0000000000..1b6cebb018 --- /dev/null +++ b/boost/boost/predef/library/std/stlport.h @@ -0,0 +1,60 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_STLPORT_H +#define BOOST_PREDEF_LIBRARY_STD_STLPORT_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_STLPORT`] + +[@http://sourceforge.net/projects/stlport/ STLport Standard C++] library. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__SGI_STL_PORT`] [__predef_detection__]] + [[`_STLPORT_VERSION`] [__predef_detection__]] + + [[`_STLPORT_MAJOR`, `_STLPORT_MINOR`, `_STLPORT_PATCHLEVEL`] [V.R.P]] + [[`_STLPORT_VERSION`] [V.R.P]] + [[`__SGI_STL_PORT`] [V.R.P]] + ] + */ + +#define BOOST_LIB_STD_STLPORT BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) +# undef BOOST_LIB_STD_STLPORT +# if !defined(BOOST_LIB_STD_STLPORT) && defined(_STLPORT_MAJOR) +# define BOOST_LIB_STD_STLPORT \ + BOOST_VERSION_NUMBER(_STLPORT_MAJOR,_STLPORT_MINOR,_STLPORT_PATCHLEVEL) +# endif +# if !defined(BOOST_LIB_STD_STLPORT) && defined(_STLPORT_VERSION) +# define BOOST_LIB_STD_STLPORT BOOST_PREDEF_MAKE_0X_VRP(_STLPORT_VERSION) +# endif +# if !defined(BOOST_LIB_STD_STLPORT) +# define BOOST_LIB_STD_STLPORT BOOST_PREDEF_MAKE_0X_VRP(__SGI_STL_PORT) +# endif +#endif + +#if BOOST_LIB_STD_STLPORT +# define BOOST_LIB_STD_STLPORT_AVAILABLE +#endif + +#define BOOST_LIB_STD_STLPORT_NAME "STLport" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_STLPORT,BOOST_LIB_STD_STLPORT_NAME) + + +#endif diff --git a/boost/boost/predef/library/std/vacpp.h b/boost/boost/predef/library/std/vacpp.h new file mode 100644 index 0000000000..1c259c558c --- /dev/null +++ b/boost/boost/predef/library/std/vacpp.h @@ -0,0 +1,45 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_LIBRARY_STD_VACPP_H +#define BOOST_PREDEF_LIBRARY_STD_VACPP_H + +#include + +#include +#include + +/*` +[heading `BOOST_LIB_STD_IBM`] + +[@http://www.ibm.com/software/awdtools/xlcpp/ IBM VACPP Standard C++] library. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__IBMCPP__`] [__predef_detection__]] + ] + */ + +#define BOOST_LIB_STD_IBM BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__IBMCPP__) +# undef BOOST_LIB_STD_IBM +# define BOOST_LIB_STD_IBM BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_LIB_STD_IBM +# define BOOST_LIB_STD_IBM_AVAILABLE +#endif + +#define BOOST_LIB_STD_IBM_NAME "IBM VACPP" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_IBM,BOOST_LIB_STD_IBM_NAME) + + +#endif diff --git a/boost/boost/predef/make.h b/boost/boost/predef/make.h index ccee24a1a0..f8c28d19d7 100644 --- a/boost/boost/predef/make.h +++ b/boost/boost/predef/make.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) @@ -42,6 +42,8 @@ Macros are: #define BOOST_PREDEF_MAKE_0X_VVRRP(V) BOOST_VERSION_NUMBER((V&0xFF000)>>12,(V&0xFF0)>>4,(V&0xF)) /*` `BOOST_PREDEF_MAKE_0X_VRRPP000(V)` */ #define BOOST_PREDEF_MAKE_0X_VRRPP000(V) BOOST_VERSION_NUMBER((V&0xF0000000)>>28,(V&0xFF00000)>>20,(V&0xFF000)>>12) +/*` `BOOST_PREDEF_MAKE_0X_VVRRPP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VVRRPP(V) BOOST_VERSION_NUMBER((V&0xFF0000)>>16,(V&0xFF00)>>8,(V&0xFF)) /*` `BOOST_PREDEF_MAKE_10_VPPP(V)` */ #define BOOST_PREDEF_MAKE_10_VPPP(V) BOOST_VERSION_NUMBER(((V)/1000)%10,0,(V)%1000) /*` `BOOST_PREDEF_MAKE_10_VRP(V)` */ diff --git a/boost/boost/predef/os.h b/boost/boost/predef/os.h new file mode 100644 index 0000000000..abd66661eb --- /dev/null +++ b/boost/boost/predef/os.h @@ -0,0 +1,31 @@ +/* +Copyright Rene Rivera 2008-2012 +Copyright Franz Detro 2014 +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) +*/ + +#ifndef BOOST_PREDEF_OS_H +#define BOOST_PREDEF_OS_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/boost/boost/predef/os/aix.h b/boost/boost/predef/os/aix.h new file mode 100644 index 0000000000..07523c8de4 --- /dev/null +++ b/boost/boost/predef/os/aix.h @@ -0,0 +1,67 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_OS_AIX_H +#define BOOST_PREDEF_OS_AIX_H + +#include +#include + +/*` +[heading `BOOST_OS_AIX`] + +[@http://en.wikipedia.org/wiki/AIX_operating_system IBM AIX] operating system. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_AIX`] [__predef_detection__]] + [[`__TOS_AIX__`] [__predef_detection__]] + + [[`_AIX43`] [4.3.0]] + [[`_AIX41`] [4.1.0]] + [[`_AIX32`] [3.2.0]] + [[`_AIX3`] [3.0.0]] + ] + */ + +#define BOOST_OS_AIX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(_AIX) || defined(__TOS_AIX__) \ + ) +# undef BOOST_OS_AIX +# if !defined(BOOST_OS_AIX) && defined(_AIX43) +# define BOOST_OS_AIX BOOST_VERSION_NUMBER(4,3,0) +# endif +# if !defined(BOOST_OS_AIX) && defined(_AIX41) +# define BOOST_OS_AIX BOOST_VERSION_NUMBER(4,1,0) +# endif +# if !defined(BOOST_OS_AIX) && defined(_AIX32) +# define BOOST_OS_AIX BOOST_VERSION_NUMBER(3,2,0) +# endif +# if !defined(BOOST_OS_AIX) && defined(_AIX3) +# define BOOST_OS_AIX BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_OS_AIX) +# define BOOST_OS_AIX BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_AIX +# define BOOST_OS_AIX_AVAILABLE +# include +#endif + +#define BOOST_OS_AIX_NAME "IBM AIX" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_AIX,BOOST_OS_AIX_NAME) + + +#endif diff --git a/boost/boost/predef/os/amigaos.h b/boost/boost/predef/os/amigaos.h new file mode 100644 index 0000000000..fae2408bd6 --- /dev/null +++ b/boost/boost/predef/os/amigaos.h @@ -0,0 +1,47 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_OS_AMIGAOS_H +#define BOOST_PREDEF_OS_AMIGAOS_H + +#include +#include + +/*` +[heading `BOOST_OS_AMIGAOS`] + +[@http://en.wikipedia.org/wiki/AmigaOS AmigaOS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`AMIGA`] [__predef_detection__]] + [[`__amigaos__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_AMIGAOS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(AMIGA) || defined(__amigaos__) \ + ) +# undef BOOST_OS_AMIGAOS +# define BOOST_OS_AMIGAOS BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_AMIGAOS +# define BOOST_OS_AMIGAOS_AVAILABLE +# include +#endif + +#define BOOST_OS_AMIGAOS_NAME "AmigaOS" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_AMIGAOS,BOOST_OS_AMIGAOS_NAME) + + +#endif diff --git a/boost/boost/predef/os/android.h b/boost/boost/predef/os/android.h new file mode 100644 index 0000000000..0de5870d49 --- /dev/null +++ b/boost/boost/predef/os/android.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2013 +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) +*/ + +#ifndef BOOST_PREDEF_OS_ADROID_H +#define BOOST_PREDEF_OS_ADROID_H + +#include +#include + +/*` +[heading `BOOST_OS_ANDROID`] + +[@http://en.wikipedia.org/wiki/Android_%28operating_system%29 Android] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__ANDROID__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_ANDROID BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__ANDROID__) \ + ) +# undef BOOST_OS_ANDROID +# define BOOST_OS_ANDROID BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_ANDROID +# define BOOST_OS_ANDROID_AVAILABLE +# include +#endif + +#define BOOST_OS_ANDROID_NAME "Android" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_ANDROID,BOOST_OS_ANDROID_NAME) + + +#endif diff --git a/boost/boost/predef/os/beos.h b/boost/boost/predef/os/beos.h new file mode 100644 index 0000000000..7a92b944ab --- /dev/null +++ b/boost/boost/predef/os/beos.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_OS_BEOS_H +#define BOOST_PREDEF_OS_BEOS_H + +#include +#include + +/*` +[heading `BOOST_OS_BEOS`] + +[@http://en.wikipedia.org/wiki/BeOS BeOS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__BEOS__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_BEOS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__BEOS__) \ + ) +# undef BOOST_OS_BEOS +# define BOOST_OS_BEOS BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_BEOS +# define BOOST_OS_BEOS_AVAILABLE +# include +#endif + +#define BOOST_OS_BEOS_NAME "BeOS" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BEOS,BOOST_OS_BEOS_NAME) + + +#endif diff --git a/boost/boost/predef/os/bsd.h b/boost/boost/predef/os/bsd.h index 0adc435d0b..f370f56bad 100644 --- a/boost/boost/predef/os/bsd.h +++ b/boost/boost/predef/os/bsd.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) @@ -59,7 +59,7 @@ of BSD. If the above variants is detected the corresponding macro is also set.] #define BOOST_OS_BSD BOOST_VERSION_NUMBER_NOT_AVAILABLE #endif -#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ defined(BSD) || \ defined(_SYSTYPE_BSD) \ ) diff --git a/boost/boost/predef/os/bsd/bsdi.h b/boost/boost/predef/os/bsd/bsdi.h index 71ea87a254..cb57e1bcd4 100644 --- a/boost/boost/predef/os/bsd/bsdi.h +++ b/boost/boost/predef/os/bsd/bsdi.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2012-2013 +Copyright Rene Rivera 2012-2013 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) @@ -24,7 +24,7 @@ http://www.boost.org/LICENSE_1_0.txt) #define BOOST_OS_BSD_BSDI BOOST_VERSION_NUMBER_NOT_AVAILABLE -#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ defined(__bsdi__) \ ) # ifndef BOOST_OS_BSD_AVAILABLE diff --git a/boost/boost/predef/os/bsd/dragonfly.h b/boost/boost/predef/os/bsd/dragonfly.h index 9d37439856..202f8a1de2 100644 --- a/boost/boost/predef/os/bsd/dragonfly.h +++ b/boost/boost/predef/os/bsd/dragonfly.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2012-2013 +Copyright Rene Rivera 2012-2013 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) @@ -24,7 +24,7 @@ http://www.boost.org/LICENSE_1_0.txt) #define BOOST_OS_BSD_DRAGONFLY BOOST_VERSION_NUMBER_NOT_AVAILABLE -#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ defined(__DragonFly__) \ ) # ifndef BOOST_OS_BSD_AVAILABLE diff --git a/boost/boost/predef/os/bsd/free.h b/boost/boost/predef/os/bsd/free.h index 321d3a3b17..404e8ed830 100644 --- a/boost/boost/predef/os/bsd/free.h +++ b/boost/boost/predef/os/bsd/free.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2012-2013 +Copyright Rene Rivera 2012-2013 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) @@ -26,7 +26,7 @@ http://www.boost.org/LICENSE_1_0.txt) #define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_NOT_AVAILABLE -#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ defined(__FreeBSD__) \ ) # ifndef BOOST_OS_BSD_AVAILABLE diff --git a/boost/boost/predef/os/bsd/net.h b/boost/boost/predef/os/bsd/net.h index 2a34538996..dcc4131b8f 100644 --- a/boost/boost/predef/os/bsd/net.h +++ b/boost/boost/predef/os/bsd/net.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2012-2013 +Copyright Rene Rivera 2012-2013 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) @@ -31,7 +31,7 @@ http://www.boost.org/LICENSE_1_0.txt) #define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_NOT_AVAILABLE -#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ defined(__NETBSD__) || defined(__NetBSD__) \ ) # ifndef BOOST_OS_BSD_AVAILABLE diff --git a/boost/boost/predef/os/bsd/open.h b/boost/boost/predef/os/bsd/open.h index 2f51644126..e81ebc6435 100644 --- a/boost/boost/predef/os/bsd/open.h +++ b/boost/boost/predef/os/bsd/open.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2012-2013 +Copyright Rene Rivera 2012-2013 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) @@ -55,7 +55,7 @@ http://www.boost.org/LICENSE_1_0.txt) #define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER_NOT_AVAILABLE -#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ defined(__OpenBSD__) \ ) # ifndef BOOST_OS_BSD_AVAILABLE diff --git a/boost/boost/predef/os/cygwin.h b/boost/boost/predef/os/cygwin.h new file mode 100644 index 0000000000..04ee3995e0 --- /dev/null +++ b/boost/boost/predef/os/cygwin.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_OS_CYGWIN_H +#define BOOST_PREDEF_OS_CYGWIN_H + +#include +#include + +/*` +[heading `BOOST_OS_CYGWIN`] + +[@http://en.wikipedia.org/wiki/Cygwin Cygwin] evironment. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__CYGWIN__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_CYGWIN BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__CYGWIN__) \ + ) +# undef BOOST_OS_CYGWIN +# define BOOST_OS_CGYWIN BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_CYGWIN +# define BOOST_OS_CYGWIN_AVAILABLE +# include +#endif + +#define BOOST_OS_CYGWIN_NAME "Cygwin" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_CYGWIN,BOOST_OS_CYGWIN_NAME) + + +#endif diff --git a/boost/boost/predef/os/haiku.h b/boost/boost/predef/os/haiku.h new file mode 100644 index 0000000000..4d741cf5ce --- /dev/null +++ b/boost/boost/predef/os/haiku.h @@ -0,0 +1,47 @@ +/* +Copyright Jessica Hamilton 2014 +Copyright Rene Rivera 2014 +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) +*/ + +#ifndef BOOST_PREDEF_OS_HAIKU_H +#define BOOST_PREDEF_OS_HAIKU_H + +#include +#include + +/*` +[heading `BOOST_OS_HAIKU`] + +[@http://en.wikipedia.org/wiki/Haiku_(operating_system) Haiku] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__HAIKU__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_HAIKU BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__HAIKU__) \ + ) +# undef BOOST_OS_HAIKU +# define BOOST_OS_HAIKU BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_HAIKU +# define BOOST_OS_HAIKU_AVAILABLE +# include +#endif + +#define BOOST_OS_HAIKU_NAME "Haiku" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_HAIKU,BOOST_OS_HAIKU_NAME) + + +#endif diff --git a/boost/boost/predef/os/hpux.h b/boost/boost/predef/os/hpux.h new file mode 100644 index 0000000000..946196f4a7 --- /dev/null +++ b/boost/boost/predef/os/hpux.h @@ -0,0 +1,48 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_OS_HPUX_H +#define BOOST_PREDEF_OS_HPUX_H + +#include +#include + +/*` +[heading `BOOST_OS_HPUX`] + +[@http://en.wikipedia.org/wiki/HP-UX HP-UX] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`hpux`] [__predef_detection__]] + [[`_hpux`] [__predef_detection__]] + [[`__hpux`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_HPUX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(hpux) || defined(_hpux) || defined(__hpux) \ + ) +# undef BOOST_OS_HPUX +# define BOOST_OS_HPUX BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_HPUX +# define BOOST_OS_HPUX_AVAILABLE +# include +#endif + +#define BOOST_OS_HPUX_NAME "HP-UX" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_HPUX,BOOST_OS_HPUX_NAME) + + +#endif diff --git a/boost/boost/predef/os/ios.h b/boost/boost/predef/os/ios.h new file mode 100644 index 0000000000..b83a9db537 --- /dev/null +++ b/boost/boost/predef/os/ios.h @@ -0,0 +1,51 @@ +/* +Copyright Franz Detro 2014 +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) +*/ + +#ifndef BOOST_PREDEF_OS_IOS_H +#define BOOST_PREDEF_OS_IOS_H + +#include +#include + +/*` +[heading `BOOST_OS_IOS`] + +[@http://en.wikipedia.org/wiki/iOS iOS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__APPLE__`] [__predef_detection__]] + [[`__MACH__`] [__predef_detection__]] + [[`__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__`] [__predef_detection__]] + + [[`__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__`] [__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__*1000]] + ] + */ + +#define BOOST_OS_IOS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__APPLE__) && defined(__MACH__) && \ + defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) \ + ) +# undef BOOST_OS_IOS +# define BOOST_OS_IOS (__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__*1000) +#endif + +#if BOOST_OS_IOS +# define BOOST_OS_IOS_AVAILABLE +# include +#endif + +#define BOOST_OS_IOS_NAME "iOS" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_IOS,BOOST_OS_IOS_NAME) + + +#endif diff --git a/boost/boost/predef/os/irix.h b/boost/boost/predef/os/irix.h new file mode 100644 index 0000000000..a9e63b855d --- /dev/null +++ b/boost/boost/predef/os/irix.h @@ -0,0 +1,47 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_OS_IRIX_H +#define BOOST_PREDEF_OS_IRIX_H + +#include +#include + +/*` +[heading `BOOST_OS_IRIX`] + +[@http://en.wikipedia.org/wiki/Irix IRIX] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`sgi`] [__predef_detection__]] + [[`__sgi`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_IRIX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(sgi) || defined(__sgi) \ + ) +# undef BOOST_OS_IRIX +# define BOOST_OS_IRIX BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_IRIX +# define BOOST_OS_IRIX_AVAILABLE +# include +#endif + +#define BOOST_OS_IRIX_NAME "IRIX" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_IRIX,BOOST_OS_IRIX_NAME) + + +#endif diff --git a/boost/boost/predef/os/linux.h b/boost/boost/predef/os/linux.h new file mode 100644 index 0000000000..b436e3fd4d --- /dev/null +++ b/boost/boost/predef/os/linux.h @@ -0,0 +1,47 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_OS_LINUX_H +#define BOOST_PREDEF_OS_LINUX_H + +#include +#include + +/*` +[heading `BOOST_OS_LINUX`] + +[@http://en.wikipedia.org/wiki/Linux Linux] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`linux`] [__predef_detection__]] + [[`__linux`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_LINUX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(linux) || defined(__linux) \ + ) +# undef BOOST_OS_LINUX +# define BOOST_OS_LINUX BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_LINUX +# define BOOST_OS_LINUX_AVAILABLE +# include +#endif + +#define BOOST_OS_LINUX_NAME "Linux" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_LINUX,BOOST_OS_LINUX_NAME) + + +#endif diff --git a/boost/boost/predef/os/macos.h b/boost/boost/predef/os/macos.h index e625a6c763..cdcf2cb2b2 100644 --- a/boost/boost/predef/os/macos.h +++ b/boost/boost/predef/os/macos.h @@ -1,5 +1,6 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 +Copyright Franz Detro 2014 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) @@ -8,6 +9,13 @@ http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PREDEF_OS_MACOS_H #define BOOST_PREDEF_OS_MACOS_H +/* Special case: iOS will define the same predefs as MacOS, and additionally + '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__'. We can guard against that, + but only if we detect iOS first. Hence we will force include iOS detection + * before doing any MacOS detection. + */ +#include + #include #include @@ -31,7 +39,7 @@ http://www.boost.org/LICENSE_1_0.txt) #define BOOST_OS_MACOS BOOST_VERSION_NUMBER_NOT_AVAILABLE -#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ defined(macintosh) || defined(Macintosh) || \ (defined(__APPLE__) && defined(__MACH__)) \ ) diff --git a/boost/boost/predef/os/os400.h b/boost/boost/predef/os/os400.h new file mode 100644 index 0000000000..f7aacf533b --- /dev/null +++ b/boost/boost/predef/os/os400.h @@ -0,0 +1,46 @@ +/* +Copyright Rene Rivera 2011-2013 +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) +*/ + +#ifndef BOOST_PREDEF_OS_OS400_H +#define BOOST_PREDEF_OS_OS400_H + +#include +#include + +/*` +[heading `BOOST_OS_OS400`] + +[@http://en.wikipedia.org/wiki/IBM_i IBM OS/400] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__OS400__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_OS400 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__OS400__) \ + ) +# undef BOOST_OS_OS400 +# define BOOST_OS_OS400 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_OS400 +# define BOOST_OS_OS400_AVAILABLE +# include +#endif + +#define BOOST_OS_OS400_NAME "IBM OS/400" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_OS400,BOOST_OS_OS400_NAME) + + +#endif diff --git a/boost/boost/predef/os/qnxnto.h b/boost/boost/predef/os/qnxnto.h new file mode 100644 index 0000000000..dff536f2d8 --- /dev/null +++ b/boost/boost/predef/os/qnxnto.h @@ -0,0 +1,60 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_OS_QNXNTO_H +#define BOOST_PREDEF_OS_QNXNTO_H + +#include +#include + +/*` +[heading `BOOST_OS_QNX`] + +[@http://en.wikipedia.org/wiki/QNX QNX] operating system. +Version number available as major, and minor if possible. And +version 4 is specifically detected. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__QNX__`] [__predef_detection__]] + [[`__QNXNTO__`] [__predef_detection__]] + + [[`_NTO_VERSION`] [V.R.0]] + [[`__QNX__`] [4.0.0]] + ] + */ + +#define BOOST_OS_QNX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__QNX__) || defined(__QNXNTO__) \ + ) +# undef BOOST_OS_QNX +# if !defined(BOOST_OS_QNX) && defined(_NTO_VERSION) +# define BOOST_OS_QNX BOOST_PREDEF_MAKE_10_VVRR(_NTO_VERSION) +# endif +# if !defined(BOOST_OS_QNX) && defined(__QNX__) +# define BOOST_OS_QNX BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_OS_QNX) +# define BOOST_OS_QNX BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_QNX +# define BOOST_OS_QNX_AVAILABLE +# include +#endif + +#define BOOST_OS_QNX_NAME "QNX" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_QNX,BOOST_OS_QNX_NAME) + + +#endif diff --git a/boost/boost/predef/os/solaris.h b/boost/boost/predef/os/solaris.h new file mode 100644 index 0000000000..4d47dfec1d --- /dev/null +++ b/boost/boost/predef/os/solaris.h @@ -0,0 +1,47 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_OS_SOLARIS_H +#define BOOST_PREDEF_OS_SOLARIS_H + +#include +#include + +/*` +[heading `BOOST_OS_SOLARIS`] + +[@http://en.wikipedia.org/wiki/Solaris_Operating_Environment Solaris] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`sun`] [__predef_detection__]] + [[`__sun`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_SOLARIS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(sun) || defined(__sun) \ + ) +# undef BOOST_OS_SOLARIS +# define BOOST_OS_SOLARIS BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_SOLARIS +# define BOOST_OS_SOLARIS_AVAILABLE +# include +#endif + +#define BOOST_OS_SOLARIS_NAME "Solaris" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_SOLARIS,BOOST_OS_SOLARIS_NAME) + + +#endif diff --git a/boost/boost/predef/os/unix.h b/boost/boost/predef/os/unix.h new file mode 100644 index 0000000000..3636dda512 --- /dev/null +++ b/boost/boost/predef/os/unix.h @@ -0,0 +1,76 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_OS_UNIX_H +#define BOOST_PREDEF_OS_UNIX_H + +#include +#include + +/*` +[heading `BOOST_OS_UNIX`] + +[@http://en.wikipedia.org/wiki/Unix Unix Environment] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`unix`] [__predef_detection__]] + [[`__unix`] [__predef_detection__]] + [[`_XOPEN_SOURCE`] [__predef_detection__]] + [[`_POSIX_SOURCE`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_UNIX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(unix) || defined(__unix) || \ + defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) +# undef BOOST_OS_UNIX +# define BOOST_OS_UNIX BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_UNIX +# define BOOST_OS_UNIX_AVAILABLE +#endif + +#define BOOST_OS_UNIX_NAME "Unix Environment" + +/*` +[heading `BOOST_OS_SVR4`] + +[@http://en.wikipedia.org/wiki/UNIX_System_V SVR4 Environment] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__sysv__`] [__predef_detection__]] + [[`__SVR4`] [__predef_detection__]] + [[`__svr4__`] [__predef_detection__]] + [[`_SYSTYPE_SVR4`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_SVR4 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__sysv__) || defined(__SVR4) || \ + defined(__svr4__) || defined(_SYSTYPE_SVR4) +# undef BOOST_OS_SVR4 +# define BOOST_OS_SVR4 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_SVR4 +# define BOOST_OS_SVR4_AVAILABLE +#endif + +#define BOOST_OS_SVR4_NAME "SVR4 Environment" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_UNIX,BOOST_OS_UNIX_NAME) +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_SVR4,BOOST_OS_SVR4_NAME) + +#endif diff --git a/boost/boost/predef/os/vms.h b/boost/boost/predef/os/vms.h new file mode 100644 index 0000000000..3d34f63dd9 --- /dev/null +++ b/boost/boost/predef/os/vms.h @@ -0,0 +1,53 @@ +/* +Copyright Rene Rivera 2011-2013 +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) +*/ + +#ifndef BOOST_PREDEF_OS_VMS_H +#define BOOST_PREDEF_OS_VMS_H + +#include +#include + +/*` +[heading `BOOST_OS_VMS`] + +[@http://en.wikipedia.org/wiki/Vms VMS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`VMS`] [__predef_detection__]] + [[`__VMS`] [__predef_detection__]] + + [[`__VMS_VER`] [V.R.P]] + ] + */ + +#define BOOST_OS_VMS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(VMS) || defined(__VMS) \ + ) +# undef BOOST_OS_VMS +# if defined(__VMS_VER) +# define BOOST_OS_VMS BOOST_PREDEF_MAKE_10_VVRR00PP00(__VMS_VER) +# else +# define BOOST_OS_VMS BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_VMS +# define BOOST_OS_VMS_AVAILABLE +# include +#endif + +#define BOOST_OS_VMS_NAME "VMS" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_VMS,BOOST_OS_VMS_NAME) + + +#endif diff --git a/boost/boost/predef/os/windows.h b/boost/boost/predef/os/windows.h index 1316963b04..9072539ae0 100644 --- a/boost/boost/predef/os/windows.h +++ b/boost/boost/predef/os/windows.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) @@ -29,7 +29,7 @@ http://www.boost.org/LICENSE_1_0.txt) #define BOOST_OS_WINDOWS BOOST_VERSION_NUMBER_NOT_AVAILABLE -#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ +#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \ defined(_WIN32) || defined(_WIN64) || \ defined(__WIN32__) || defined(__TOS_WIN__) || \ defined(__WINDOWS__) \ diff --git a/boost/boost/predef/other.h b/boost/boost/predef/other.h new file mode 100644 index 0000000000..04aad1680e --- /dev/null +++ b/boost/boost/predef/other.h @@ -0,0 +1,14 @@ +/* +Copyright Rene Rivera 2013 +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) +*/ + +#ifndef BOOST_PREDEF_OTHER_H +#define BOOST_PREDEF_OTHER_H + +#include +/*#include */ + +#endif diff --git a/boost/boost/predef/other/endian.h b/boost/boost/predef/other/endian.h index 9d2a8bcc20..85a028dff9 100644 --- a/boost/boost/predef/other/endian.h +++ b/boost/boost/predef/other/endian.h @@ -1,5 +1,5 @@ /* -Copyright Redshift Software, Inc. 2013 +Copyright Rene Rivera 2013-2014 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) @@ -13,6 +13,7 @@ http://www.boost.org/LICENSE_1_0.txt) #include #include #include +#include /*` [heading `BOOST_ENDIAN_*`] @@ -53,7 +54,7 @@ information and acquired knowledge: */ #if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD -# if BOOST_LIB_C_GNU +# if BOOST_LIB_C_GNU || BOOST_OS_ANDROID # include # else # if BOOST_OS_MACOS @@ -69,29 +70,29 @@ information and acquired knowledge: # endif # endif # if defined(__BYTE_ORDER) -# if (__BYTE_ORDER == __BIG_ENDIAN) +# if defined(__BIG_ENDIAN) && (__BYTE_ORDER == __BIG_ENDIAN) # undef BOOST_ENDIAN_BIG_BYTE # define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE # endif -# if (__BYTE_ORDER == __LITTLE_ENDIAN) +# if defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == __LITTLE_ENDIAN) # undef BOOST_ENDIAN_LITTLE_BYTE # define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE # endif -# if (__BYTE_ORDER == __PDP_ENDIAN) +# if defined(__PDP_ENDIAN) && (__BYTE_ORDER == __PDP_ENDIAN) # undef BOOST_ENDIAN_LITTLE_WORD # define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE # endif # endif # if !defined(__BYTE_ORDER) && defined(_BYTE_ORDER) -# if (_BYTE_ORDER == _BIG_ENDIAN) +# if defined(_BIG_ENDIAN) && (_BYTE_ORDER == _BIG_ENDIAN) # undef BOOST_ENDIAN_BIG_BYTE # define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE # endif -# if (_BYTE_ORDER == _LITTLE_ENDIAN) +# if defined(_LITTLE_ENDIAN) && (_BYTE_ORDER == _LITTLE_ENDIAN) # undef BOOST_ENDIAN_LITTLE_BYTE # define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE # endif -# if (_BYTE_ORDER == _PDP_ENDIAN) +# if defined(_PDP_ENDIAN) && (_BYTE_ORDER == _PDP_ENDIAN) # undef BOOST_ENDIAN_LITTLE_WORD # define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE # endif @@ -102,17 +103,16 @@ information and acquired knowledge: */ #if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD -# if !BOOST_ENDIAN_BIG_BYTE -# if (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)) || \ - defined(__ARMEB__) || \ - defined(__THUMBEB__) || \ - defined(__AARCH64EB__) || \ - defined(_MIPSEB) || \ - defined(__MIPSEB) || \ - defined(__MIPSEB__) -# undef BOOST_ENDIAN_BIG_BYTE -# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE -# endif +# if (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)) || \ + (defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)) || \ + defined(__ARMEB__) || \ + defined(__THUMBEB__) || \ + defined(__AARCH64EB__) || \ + defined(_MIPSEB) || \ + defined(__MIPSEB) || \ + defined(__MIPSEB__) +# undef BOOST_ENDIAN_BIG_BYTE +# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE # endif #endif @@ -120,17 +120,16 @@ information and acquired knowledge: */ #if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD -# if !BOOST_ENDIAN_LITTLE_BYTE -# if (defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \ - defined(__ARMEL__) || \ - defined(__THUMBEL__) || \ - defined(__AARCH64EL__) || \ - defined(_MIPSEL) || \ - defined(__MIPSEL) || \ - defined(__MIPSEL__) -# undef BOOST_ENDIAN_LITTLE_BYTE -# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE -# endif +# if (defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || \ + (defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)) || \ + defined(__ARMEL__) || \ + defined(__THUMBEL__) || \ + defined(__AARCH64EL__) || \ + defined(_MIPSEL) || \ + defined(__MIPSEL) || \ + defined(__MIPSEL__) +# undef BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE # endif #endif @@ -142,6 +141,7 @@ information and acquired knowledge: # include # if BOOST_ARCH_M68K || \ BOOST_ARCH_PARISK || \ + BOOST_ARCH_SPARC || \ BOOST_ARCH_SYS370 || \ BOOST_ARCH_SYS390 || \ BOOST_ARCH_Z diff --git a/boost/boost/predef/platform.h b/boost/boost/predef/platform.h new file mode 100644 index 0000000000..468a90d38b --- /dev/null +++ b/boost/boost/predef/platform.h @@ -0,0 +1,19 @@ +/* +Copyright Rene Rivera 2013 +Copyright (c) Microsoft Corporation 2014 +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) +*/ + +#ifndef BOOST_PREDEF_PLATFORM_H +#define BOOST_PREDEF_PLATFORM_H + +#include +#include +#include +#include +#include +/*#include */ + +#endif diff --git a/boost/boost/predef/platform/mingw.h b/boost/boost/predef/platform/mingw.h new file mode 100644 index 0000000000..6c8d873ca3 --- /dev/null +++ b/boost/boost/predef/platform/mingw.h @@ -0,0 +1,70 @@ +/* +Copyright Rene Rivera 2008-2013 +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) +*/ + +#ifndef BOOST_PREDEF_COMPILER_MINGW_H +#define BOOST_PREDEF_COMPILER_MINGW_H + +#include +#include + +/*` +[heading `BOOST_PLAT_MINGW`] + +[@http://en.wikipedia.org/wiki/MinGW MinGW] platform. +Version number available as major, minor, and patch. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__MINGW32__`] [__predef_detection__]] + [[`__MINGW64__`] [__predef_detection__]] + + [[`__MINGW64_VERSION_MAJOR`, `__MINGW64_VERSION_MINOR`] [V.R.0]] + [[`__MINGW32_VERSION_MAJOR`, `__MINGW32_VERSION_MINOR`] [V.R.0]] + ] + */ + +#define BOOST_PLAT_MINGW BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__MINGW32__) || defined(__MINGW64__) +# include <_mingw.h> +# if !defined(BOOST_PLAT_MINGW_DETECTION) && (defined(__MINGW64_VERSION_MAJOR) && defined(__MINGW64_VERSION_MINOR)) +# define BOOST_PLAT_MINGW_DETECTION \ + BOOST_VERSION_NUMBER(__MINGW64_VERSION_MAJOR,__MINGW64_VERSION_MINOR,0) +# endif +# if !defined(BOOST_PLAT_MINGW_DETECTION) && (defined(__MINGW32_VERSION_MAJOR) && defined(__MINGW32_VERSION_MINOR)) +# define BOOST_PLAT_MINGW_DETECTION \ + BOOST_VERSION_NUMBER(__MINGW32_MAJOR_VERSION,__MINGW32_MINOR_VERSION,0) +# endif +# if !defined(BOOST_PLAT_MINGW_DETECTION) +# define BOOST_PLAT_MINGW_DETECTION BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#ifdef BOOST_PLAT_MINGW_DETECTION +# define BOOST_PLAT_MINGW_AVAILABLE +# if defined(BOOST_PREDEF_DETAIL_PLAT_DETECTED) +# define BOOST_PLAT_MINGW_EMULATED BOOST_PLAT_MINGW_DETECTION +# else +# undef BOOST_PLAT_MINGW +# define BOOST_PLAT_MINGW BOOST_PLAT_MINGW_DETECTION +# endif +# include +#endif + +#define BOOST_PLAT_MINGW_NAME "MinGW" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_MINGW,BOOST_PLAT_MINGW_NAME) + +#ifdef BOOST_PLAT_MINGW_EMULATED +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_MINGW_EMULATED,BOOST_PLAT_MINGW_NAME) +#endif + + +#endif diff --git a/boost/boost/predef/platform/windows_desktop.h b/boost/boost/predef/platform/windows_desktop.h new file mode 100644 index 0000000000..286c27350f --- /dev/null +++ b/boost/boost/predef/platform/windows_desktop.h @@ -0,0 +1,44 @@ +/* +Copyright (c) Microsoft Corporation 2014 +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) +*/ + +#ifndef BOOST_PREDEF_PLAT_WINDOWS_DESKTOP_H +#define BOOST_PREDEF_PLAT_WINDOWS_DESKTOP_H + +#include +#include +#include + +/*` +[heading `BOOST_PLAT_WINDOWS_DESKTOP`] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`!WINAPI_FAMILY`] [__predef_detection__]] + [[`WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP`] [__predef_detection__]] + ] + */ + +#define BOOST_PLAT_WINDOWS_DESKTOP BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if BOOST_OS_WINDOWS && \ + ( !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) ) +# undef BOOST_PLAT_WINDOWS_DESKTOP +# define BOOST_PLAT_WINDOWS_DESKTOP BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_PLAT_WINDOWS_DESKTOP +# define BOOST_PLAT_WINDOWS_DESKTOP_AVALIABLE +# include +#endif + +#define BOOST_PLAT_WINDOWS_DESKTOP_NAME "Windows Desktop" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_DESKTOP,BOOST_PLAT_WINDOWS_DESKTOP_NAME) + +#endif diff --git a/boost/boost/predef/platform/windows_phone.h b/boost/boost/predef/platform/windows_phone.h new file mode 100644 index 0000000000..cdf79d1c47 --- /dev/null +++ b/boost/boost/predef/platform/windows_phone.h @@ -0,0 +1,42 @@ +/* +Copyright (c) Microsoft Corporation 2014 +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) +*/ + +#ifndef BOOST_PREDEF_PLAT_WINDOWS_PHONE_H +#define BOOST_PREDEF_PLAT_WINDOWS_PHONE_H + +#include +#include +#include + +/*` +[heading `BOOST_PLAT_WINDOWS_PHONE`] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP`] [__predef_detection__]] + ] + */ + +#define BOOST_PLAT_WINDOWS_PHONE BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if BOOST_OS_WINDOWS && defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP +# undef BOOST_PLAT_WINDOWS_PHONE +# define BOOST_PLAT_WINDOWS_PHONE BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_PLAT_WINDOWS_PHONE +# define BOOST_PLAT_WINDOWS_PHONE_AVALIABLE +# include +#endif + +#define BOOST_PLAT_WINDOWS_PHONE_NAME "Windows Phone" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_PHONE,BOOST_PLAT_WINDOWS_PHONE_NAME) + +#endif diff --git a/boost/boost/predef/platform/windows_runtime.h b/boost/boost/predef/platform/windows_runtime.h new file mode 100644 index 0000000000..14449383d8 --- /dev/null +++ b/boost/boost/predef/platform/windows_runtime.h @@ -0,0 +1,44 @@ +/* +Copyright (c) Microsoft Corporation 2014 +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) +*/ + +#ifndef BOOST_PREDEF_PLAT_WINDOWS_RUNTIME_H +#define BOOST_PREDEF_PLAT_WINDOWS_RUNTIME_H + +#include +#include +#include + +/*` +[heading `BOOST_PLAT_WINDOWS_RUNTIME`] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`WINAPI_FAMILY == WINAPI_FAMILY_APP`] [__predef_detection__]] + [[`WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP`] [__predef_detection__]] + ] + */ + +#define BOOST_PLAT_WINDOWS_RUNTIME BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if BOOST_OS_WINDOWS && defined(WINAPI_FAMILY) && \ + ( WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP ) +# undef BOOST_PLAT_WINDOWS_RUNTIME +# define BOOST_PLAT_WINDOWS_RUNTIME BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_PLAT_WINDOWS_RUNTIME +# define BOOST_PLAT_WINDOWS_RUNTIME_AVALIABLE +# include +#endif + +#define BOOST_PLAT_WINDOWS_RUNTIME_NAME "Windows Runtime" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_RUNTIME,BOOST_PLAT_WINDOWS_RUNTIME_NAME) + +#endif diff --git a/boost/boost/predef/platform/windows_store.h b/boost/boost/predef/platform/windows_store.h new file mode 100644 index 0000000000..0487c0fa2b --- /dev/null +++ b/boost/boost/predef/platform/windows_store.h @@ -0,0 +1,42 @@ +/* +Copyright (c) Microsoft Corporation 2014 +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) +*/ + +#ifndef BOOST_PREDEF_PLAT_WINDOWS_STORE_H +#define BOOST_PREDEF_PLAT_WINDOWS_STORE_H + +#include +#include +#include + +/*` +[heading `BOOST_PLAT_WINDOWS_STORE`] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`WINAPI_FAMILY == WINAPI_FAMILY_APP`] [__predef_detection__]] + ] + */ + +#define BOOST_PLAT_WINDOWS_STORE BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if BOOST_OS_WINDOWS && defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP +# undef BOOST_PLAT_WINDOWS_STORE +# define BOOST_PLAT_WINDOWS_STORE BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_PLAT_WINDOWS_STORE +# define BOOST_PLAT_WINDOWS_STORE_AVALIABLE +# include +#endif + +#define BOOST_PLAT_WINDOWS_STORE_NAME "Windows Store" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_STORE,BOOST_PLAT_WINDOWS_STORE_NAME) + +#endif diff --git a/boost/boost/predef/version_number.h b/boost/boost/predef/version_number.h index 2ecccd2ef0..b77391925c 100644 --- a/boost/boost/predef/version_number.h +++ b/boost/boost/predef/version_number.h @@ -1,6 +1,6 @@ /* Copyright Rene Rivera 2005 -Copyright Redshift Software, Inc. 2008-2013 +Copyright Rene Rivera 2008-2013 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) diff --git a/boost/boost/preprocessor/config/config.hpp b/boost/boost/preprocessor/config/config.hpp index d02eb58dc0..fa5ca5bc79 100644 --- a/boost/boost/preprocessor/config/config.hpp +++ b/boost/boost/preprocessor/config/config.hpp @@ -32,7 +32,7 @@ # elif defined(__MWERKS__) && __MWERKS__ >= 0x3200 # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) # elif defined(__EDG__) || defined(__EDG_VERSION__) -# if defined(_MSC_VER) && __EDG_VERSION__ >= 308 +# if defined(_MSC_VER) && (defined(__INTELLISENSE__) || __EDG_VERSION__ >= 308) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC()) # else # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_EDG() | BOOST_PP_CONFIG_STRICT()) @@ -45,7 +45,7 @@ # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) # elif defined(__BORLANDC__) || defined(__IBMC__) || defined(__IBMCPP__) || defined(__SUNPRO_CC) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_BCC()) -# elif defined(_MSC_VER) +# elif defined(_MSC_VER) && !defined(__clang__) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC()) # else # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) @@ -72,16 +72,12 @@ # # if !defined BOOST_PP_VARIADICS # /* variadic support explicitly disabled for all untested compilers */ -# if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI +# if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI # define BOOST_PP_VARIADICS 0 # /* VC++ (C/C++) */ -# elif defined _MSC_VER && _MSC_VER >= 1400 && !defined __EDG__ -# if _MSC_VER >= 1400 -# define BOOST_PP_VARIADICS 1 -# define BOOST_PP_VARIADICS_MSVC 1 -# else -# define BOOST_PP_VARIADICS 0 -# endif +# elif defined _MSC_VER && _MSC_VER >= 1400 && (!defined __EDG__ || defined(__INTELLISENSE__)) && !defined __clang__ +# define BOOST_PP_VARIADICS 1 +# define BOOST_PP_VARIADICS_MSVC 1 # /* Wave (C/C++), GCC (C++) */ # elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && __GXX_EXPERIMENTAL_CXX0X__ # define BOOST_PP_VARIADICS 1 @@ -94,7 +90,7 @@ # elif !BOOST_PP_VARIADICS + 1 < 2 # undef BOOST_PP_VARIADICS # define BOOST_PP_VARIADICS 1 -# if defined _MSC_VER && _MSC_VER >= 1400 && !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI) +# if defined _MSC_VER && _MSC_VER >= 1400 && (defined(__INTELLISENSE__) || !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)) # define BOOST_PP_VARIADICS_MSVC 1 # endif # else diff --git a/boost/boost/preprocessor/detail/split.hpp b/boost/boost/preprocessor/detail/split.hpp new file mode 100644 index 0000000000..f28a72375d --- /dev/null +++ b/boost/boost/preprocessor/detail/split.hpp @@ -0,0 +1,35 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * 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) +# * * +# ************************************************************************** */ +# +# ifndef BOOST_PREPROCESSOR_DETAIL_SPLIT_HPP +# define BOOST_PREPROCESSOR_DETAIL_SPLIT_HPP +# +# include +# +# /* BOOST_PP_SPLIT */ +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SPLIT(n, im) BOOST_PP_SPLIT_I((n, im)) +# define BOOST_PP_SPLIT_I(par) BOOST_PP_SPLIT_II ## par +# define BOOST_PP_SPLIT_II(n, a, b) BOOST_PP_SPLIT_ ## n(a, b) +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_SPLIT(n, im) BOOST_PP_SPLIT_I(n((im))) +# define BOOST_PP_SPLIT_I(n) BOOST_PP_SPLIT_ID(BOOST_PP_SPLIT_II_ ## n) +# define BOOST_PP_SPLIT_II_0(s) BOOST_PP_SPLIT_ID(BOOST_PP_SPLIT_0 s) +# define BOOST_PP_SPLIT_II_1(s) BOOST_PP_SPLIT_ID(BOOST_PP_SPLIT_1 s) +# define BOOST_PP_SPLIT_ID(id) id +# else +# define BOOST_PP_SPLIT(n, im) BOOST_PP_SPLIT_I(n)(im) +# define BOOST_PP_SPLIT_I(n) BOOST_PP_SPLIT_ ## n +# endif +# +# define BOOST_PP_SPLIT_0(a, b) a +# define BOOST_PP_SPLIT_1(a, b) b +# +# endif diff --git a/boost/boost/preprocessor/facilities/detail/is_empty.hpp b/boost/boost/preprocessor/facilities/detail/is_empty.hpp new file mode 100644 index 0000000000..e0449701e8 --- /dev/null +++ b/boost/boost/preprocessor/facilities/detail/is_empty.hpp @@ -0,0 +1,55 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2014. +# * 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 http://www.boost.org for most recent version. */ +# +#ifndef BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP +#define BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP + +#include + +#if BOOST_PP_VARIADICS_MSVC + +# pragma warning(once:4002) + +#define BOOST_PP_DETAIL_IS_EMPTY_IIF_0(t, b) b +#define BOOST_PP_DETAIL_IS_EMPTY_IIF_1(t, b) t + +#else + +#define BOOST_PP_DETAIL_IS_EMPTY_IIF_0(t, ...) __VA_ARGS__ +#define BOOST_PP_DETAIL_IS_EMPTY_IIF_1(t, ...) t + +#endif + +#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 + +#define BOOST_PP_DETAIL_IS_EMPTY_PROCESS(param) \ + BOOST_PP_IS_BEGIN_PARENS \ + ( \ + BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C param () \ + ) \ +/**/ + +#else + +#define BOOST_PP_DETAIL_IS_EMPTY_PROCESS(...) \ + BOOST_PP_IS_BEGIN_PARENS \ + ( \ + BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C __VA_ARGS__ () \ + ) \ +/**/ + +#endif + +#define BOOST_PP_DETAIL_IS_EMPTY_PRIMITIVE_CAT(a, b) a ## b +#define BOOST_PP_DETAIL_IS_EMPTY_IIF(bit) BOOST_PP_DETAIL_IS_EMPTY_PRIMITIVE_CAT(BOOST_PP_DETAIL_IS_EMPTY_IIF_,bit) +#define BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C(...) () + +#endif /* BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP */ diff --git a/boost/boost/preprocessor/facilities/empty.hpp b/boost/boost/preprocessor/facilities/empty.hpp index 46db19026a..6f215dc511 100644 --- a/boost/boost/preprocessor/facilities/empty.hpp +++ b/boost/boost/preprocessor/facilities/empty.hpp @@ -14,6 +14,8 @@ # ifndef BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP # define BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP # +# include +# # /* BOOST_PP_EMPTY */ # # define BOOST_PP_EMPTY() diff --git a/boost/boost/preprocessor/facilities/expand.hpp b/boost/boost/preprocessor/facilities/expand.hpp new file mode 100644 index 0000000000..c8661a1c22 --- /dev/null +++ b/boost/boost/preprocessor/facilities/expand.hpp @@ -0,0 +1,28 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * 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) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_EXPAND_HPP +# define BOOST_PREPROCESSOR_FACILITIES_EXPAND_HPP +# +# include +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# define BOOST_PP_EXPAND(x) BOOST_PP_EXPAND_I(x) +# else +# define BOOST_PP_EXPAND(x) BOOST_PP_EXPAND_OO((x)) +# define BOOST_PP_EXPAND_OO(par) BOOST_PP_EXPAND_I ## par +# endif +# +# define BOOST_PP_EXPAND_I(x) x +# +# endif diff --git a/boost/boost/preprocessor/facilities/is_1.hpp b/boost/boost/preprocessor/facilities/is_1.hpp new file mode 100644 index 0000000000..f286dcdd19 --- /dev/null +++ b/boost/boost/preprocessor/facilities/is_1.hpp @@ -0,0 +1,23 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2003. +# * 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 http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_IS_1_HPP +# define BOOST_PREPROCESSOR_FACILITIES_IS_1_HPP +# +# include +# include +# +# /* BOOST_PP_IS_1 */ +# +# define BOOST_PP_IS_1(x) BOOST_PP_IS_EMPTY(BOOST_PP_CAT(BOOST_PP_IS_1_HELPER_, x)) +# define BOOST_PP_IS_1_HELPER_1 +# +# endif diff --git a/boost/boost/preprocessor/facilities/is_empty.hpp b/boost/boost/preprocessor/facilities/is_empty.hpp new file mode 100644 index 0000000000..46aadd3529 --- /dev/null +++ b/boost/boost/preprocessor/facilities/is_empty.hpp @@ -0,0 +1,56 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2003. +# * (C) Copyright Edward Diener 2014. +# * 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 http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP +# define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP +# +# include +# +# if BOOST_PP_VARIADICS +# +# include +# +# else +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# include +# include +# else +# include +# include +# endif +# +# /* BOOST_PP_IS_EMPTY */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I(x BOOST_PP_IS_EMPTY_HELPER) +# define BOOST_PP_IS_EMPTY_I(contents) BOOST_PP_TUPLE_ELEM(2, 1, (BOOST_PP_IS_EMPTY_DEF_ ## contents())) +# define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 1, BOOST_PP_IDENTITY(1) +# define BOOST_PP_IS_EMPTY_HELPER() , 0 +# else +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I(BOOST_PP_IS_EMPTY_HELPER x ()) +# define BOOST_PP_IS_EMPTY_I(test) BOOST_PP_IS_EMPTY_II(BOOST_PP_SPLIT(0, BOOST_PP_CAT(BOOST_PP_IS_EMPTY_DEF_, test))) +# define BOOST_PP_IS_EMPTY_II(id) id +# else +# define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I((BOOST_PP_IS_EMPTY_HELPER x ())) +# define BOOST_PP_IS_EMPTY_I(par) BOOST_PP_IS_EMPTY_II ## par +# define BOOST_PP_IS_EMPTY_II(test) BOOST_PP_SPLIT(0, BOOST_PP_CAT(BOOST_PP_IS_EMPTY_DEF_, test)) +# endif +# define BOOST_PP_IS_EMPTY_HELPER() 1 +# define BOOST_PP_IS_EMPTY_DEF_1 1, BOOST_PP_NIL +# define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 0, BOOST_PP_NIL +# endif +# +# endif /* BOOST_PP_VARIADICS */ +# +# endif /* BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP */ diff --git a/boost/boost/preprocessor/facilities/is_empty_variadic.hpp b/boost/boost/preprocessor/facilities/is_empty_variadic.hpp new file mode 100644 index 0000000000..eee4062d79 --- /dev/null +++ b/boost/boost/preprocessor/facilities/is_empty_variadic.hpp @@ -0,0 +1,57 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2014. +# * 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 http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP +# define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP +# +# include +# +# if BOOST_PP_VARIADICS +# +# include +# include +# +#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 +# +#define BOOST_PP_IS_EMPTY(param) \ + BOOST_PP_DETAIL_IS_EMPTY_IIF \ + ( \ + BOOST_PP_IS_BEGIN_PARENS \ + ( \ + param \ + ) \ + ) \ + ( \ + BOOST_PP_IS_EMPTY_ZERO, \ + BOOST_PP_DETAIL_IS_EMPTY_PROCESS \ + ) \ + (param) \ +/**/ +#define BOOST_PP_IS_EMPTY_ZERO(param) 0 +# else +#define BOOST_PP_IS_EMPTY(...) \ + BOOST_PP_DETAIL_IS_EMPTY_IIF \ + ( \ + BOOST_PP_IS_BEGIN_PARENS \ + ( \ + __VA_ARGS__ \ + ) \ + ) \ + ( \ + BOOST_PP_IS_EMPTY_ZERO, \ + BOOST_PP_DETAIL_IS_EMPTY_PROCESS \ + ) \ + (__VA_ARGS__) \ +/**/ +#define BOOST_PP_IS_EMPTY_ZERO(...) 0 +# endif /* BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 */ +# endif /* BOOST_PP_VARIADICS */ +# endif /* BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP */ diff --git a/boost/boost/preprocessor/punctuation/detail/is_begin_parens.hpp b/boost/boost/preprocessor/punctuation/detail/is_begin_parens.hpp new file mode 100644 index 0000000000..c94ccf3c6f --- /dev/null +++ b/boost/boost/preprocessor/punctuation/detail/is_begin_parens.hpp @@ -0,0 +1,48 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2014. +# * 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 http://www.boost.org for most recent version. */ +# +#ifndef BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP +#define BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP + +#if BOOST_PP_VARIADICS_MSVC + +#include + +#define BOOST_PP_DETAIL_VD_IBP_CAT(a, b) BOOST_PP_DETAIL_VD_IBP_CAT_I(a, b) +#define BOOST_PP_DETAIL_VD_IBP_CAT_I(a, b) BOOST_PP_DETAIL_VD_IBP_CAT_II(a ## b) +#define BOOST_PP_DETAIL_VD_IBP_CAT_II(res) res + +#define BOOST_PP_DETAIL_IBP_SPLIT(i, ...) \ + BOOST_PP_DETAIL_VD_IBP_CAT(BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(BOOST_PP_DETAIL_IBP_SPLIT_,i)(__VA_ARGS__),BOOST_PP_EMPTY()) \ +/**/ + +#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_C(...) 1 1 + +#else + +#define BOOST_PP_DETAIL_IBP_SPLIT(i, ...) \ + BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(BOOST_PP_DETAIL_IBP_SPLIT_,i)(__VA_ARGS__) \ +/**/ + +#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_C(...) 1 + +#endif /* BOOST_PP_VARIADICS_MSVC */ + +#define BOOST_PP_DETAIL_IBP_SPLIT_0(a, ...) a +#define BOOST_PP_DETAIL_IBP_SPLIT_1(a, ...) __VA_ARGS__ + +#define BOOST_PP_DETAIL_IBP_CAT(a, ...) BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(a,__VA_ARGS__) +#define BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__ + +#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_1 1, +#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_BOOST_PP_DETAIL_IBP_IS_VARIADIC_C 0, + +#endif /* BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP */ diff --git a/boost/boost/preprocessor/punctuation/is_begin_parens.hpp b/boost/boost/preprocessor/punctuation/is_begin_parens.hpp new file mode 100644 index 0000000000..20b32bc2be --- /dev/null +++ b/boost/boost/preprocessor/punctuation/is_begin_parens.hpp @@ -0,0 +1,51 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2014. +# * 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 http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP +# define BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP + +# include + +#if BOOST_PP_VARIADICS + +#include + +#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 + +#define BOOST_PP_IS_BEGIN_PARENS(param) \ + BOOST_PP_DETAIL_IBP_SPLIT \ + ( \ + 0, \ + BOOST_PP_DETAIL_IBP_CAT \ + ( \ + BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_, \ + BOOST_PP_DETAIL_IBP_IS_VARIADIC_C param \ + ) \ + ) \ +/**/ + +#else + +#define BOOST_PP_IS_BEGIN_PARENS(...) \ + BOOST_PP_DETAIL_IBP_SPLIT \ + ( \ + 0, \ + BOOST_PP_DETAIL_IBP_CAT \ + ( \ + BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_, \ + BOOST_PP_DETAIL_IBP_IS_VARIADIC_C __VA_ARGS__ \ + ) \ + ) \ +/**/ + +#endif /* BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 */ +#endif /* BOOST_PP_VARIADICS */ +#endif /* BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP */ diff --git a/boost/boost/preprocessor/seq/rest_n.hpp b/boost/boost/preprocessor/seq/rest_n.hpp index 7e589cce5a..64233760de 100644 --- a/boost/boost/preprocessor/seq/rest_n.hpp +++ b/boost/boost/preprocessor/seq/rest_n.hpp @@ -14,17 +14,17 @@ # # include # include -# include +# include # include # include # # /* BOOST_PP_SEQ_REST_N */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), (nil) seq BOOST_PP_EMPTY))() +# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), BOOST_PP_IDENTITY( (nil) seq )))() # else # define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_I(n, seq) -# define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), (nil) seq BOOST_PP_EMPTY))() +# define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), BOOST_PP_IDENTITY( (nil) seq )))() # endif # # endif diff --git a/boost/boost/preprocessor/tuple/detail/is_single_return.hpp b/boost/boost/preprocessor/tuple/detail/is_single_return.hpp new file mode 100644 index 0000000000..02a4fb207c --- /dev/null +++ b/boost/boost/preprocessor/tuple/detail/is_single_return.hpp @@ -0,0 +1,28 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2014. * +# * 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 http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP +# define BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP +# +# include +# +# /* BOOST_PP_TUPLE_IS_SINGLE_RETURN */ +# +# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC +# include +# include +# include +# define BOOST_PP_TUPLE_IS_SINGLE_RETURN(sr,nsr,tuple) \ + BOOST_PP_IIF(BOOST_PP_IS_1(BOOST_PP_TUPLE_SIZE(tuple)),sr,nsr) \ + /**/ +# endif /* BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC */ +# +# endif /* BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP */ diff --git a/boost/boost/preprocessor/tuple/elem.hpp b/boost/boost/preprocessor/tuple/elem.hpp index 3eba1c5073..88044d3c7e 100644 --- a/boost/boost/preprocessor/tuple/elem.hpp +++ b/boost/boost/preprocessor/tuple/elem.hpp @@ -8,7 +8,7 @@ # */ # # /* Revised by Paul Mensonides (2002-2011) */ -# /* Revised by Edward Diener (2011) */ +# /* Revised by Edward Diener (2011,2014) */ # # /* See http://www.boost.org for most recent version. */ # @@ -17,19 +17,29 @@ # # include # include +# include # include # include # include +# include # # if BOOST_PP_VARIADICS # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__), (__VA_ARGS__)) # define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args) # define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,) +/* + Use BOOST_PP_REM_CAT if it is a single element tuple ( which might be empty ) + else use BOOST_PP_REM. This fixes a VC++ problem with an empty tuple and BOOST_PP_TUPLE_ELEM + functionality. See tuple_elem_bug_test.cxx. +*/ +# define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) \ + BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_EXPAND(BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple)) \ + /**/ # else # define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__)(__VA_ARGS__) +# define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_REM tuple) # endif -# define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_REM tuple) # define BOOST_PP_TUPLE_ELEM_O_3(size, n, tuple) BOOST_PP_TUPLE_ELEM_O_2(n, tuple) # else # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() diff --git a/boost/boost/preprocessor/tuple/rem.hpp b/boost/boost/preprocessor/tuple/rem.hpp index af668a02ea..c934447d5a 100644 --- a/boost/boost/preprocessor/tuple/rem.hpp +++ b/boost/boost/preprocessor/tuple/rem.hpp @@ -1,7 +1,7 @@ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002-2011. * -# * (C) Copyright Edward Diener 2011. * +# * (C) Copyright Edward Diener 2011,2013. * # * 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) * @@ -15,11 +15,17 @@ # # include # include +# include # include +# include # # /* BOOST_PP_REM */ # # if BOOST_PP_VARIADICS +# if BOOST_PP_VARIADICS_MSVC + /* To be used internally when __VA_ARGS__ could be empty ( or is a single element ) */ +# define BOOST_PP_REM_CAT(...) BOOST_PP_CAT(__VA_ARGS__,) +# endif # define BOOST_PP_REM(...) __VA_ARGS__ # else # define BOOST_PP_REM(x) x @@ -27,7 +33,14 @@ # # /* BOOST_PP_TUPLE_REM */ # -# if BOOST_PP_VARIADICS +/* + VC++8.0 cannot handle the variadic version of BOOST_PP_TUPLE_REM(size) +*/ +# if BOOST_PP_VARIADICS && !(BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400) +# if BOOST_PP_VARIADICS_MSVC + /* To be used internally when the size could be 0 ( or 1 ) */ +# define BOOST_PP_TUPLE_REM_CAT(size) BOOST_PP_REM_CAT +# endif # define BOOST_PP_TUPLE_REM(size) BOOST_PP_REM # else # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() @@ -111,10 +124,11 @@ # define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__), (__VA_ARGS__)) # define BOOST_PP_TUPLE_REM_CTOR_I(m, args) BOOST_PP_TUPLE_REM_CTOR_II(m, args) # define BOOST_PP_TUPLE_REM_CTOR_II(m, args) BOOST_PP_CAT(m ## args,) +# define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_EXPAND(BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple) # else # define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__)(__VA_ARGS__) +# define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_REM tuple # endif -# define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_REM tuple # define BOOST_PP_TUPLE_REM_CTOR_O_2(size, tuple) BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) # else # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() diff --git a/boost/boost/preprocessor/tuple/size.hpp b/boost/boost/preprocessor/tuple/size.hpp new file mode 100644 index 0000000000..675c065166 --- /dev/null +++ b/boost/boost/preprocessor/tuple/size.hpp @@ -0,0 +1,28 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Edward Diener 2011. * +# * (C) Copyright Paul Mensonides 2011. * +# * 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 http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_TUPLE_SIZE_HPP +# define BOOST_PREPROCESSOR_TUPLE_SIZE_HPP +# +# include +# include +# include +# +# if BOOST_PP_VARIADICS +# if BOOST_PP_VARIADICS_MSVC +# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE tuple,) +# else +# define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_VARIADIC_SIZE tuple +# endif +# endif +# +# endif diff --git a/boost/boost/preprocessor/tuple/to_list.hpp b/boost/boost/preprocessor/tuple/to_list.hpp index 2a9d6fe5ff..da7828f7d0 100644 --- a/boost/boost/preprocessor/tuple/to_list.hpp +++ b/boost/boost/preprocessor/tuple/to_list.hpp @@ -18,6 +18,7 @@ # include # include # include +# include # include # # /* BOOST_PP_TUPLE_TO_LIST */ @@ -27,10 +28,11 @@ # define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_TUPLE_TO_LIST_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__), (__VA_ARGS__)) # define BOOST_PP_TUPLE_TO_LIST_I(m, args) BOOST_PP_TUPLE_TO_LIST_II(m, args) # define BOOST_PP_TUPLE_TO_LIST_II(m, args) BOOST_PP_CAT(m ## args,) +# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_TUPLE_SIZE(tuple)) tuple # else # define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__)(__VA_ARGS__) +# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_VARIADIC_SIZE tuple) tuple # endif -# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_VARIADIC_SIZE tuple) tuple # define BOOST_PP_TUPLE_TO_LIST_O_2(size, tuple) BOOST_PP_TUPLE_TO_LIST_O_1(tuple) # else # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() diff --git a/boost/boost/range/algorithm/equal.hpp b/boost/boost/range/algorithm/equal.hpp index 4472bb19db..2b44f3bca3 100644 --- a/boost/boost/range/algorithm/equal.hpp +++ b/boost/boost/range/algorithm/equal.hpp @@ -31,7 +31,7 @@ namespace boost IteratorCategoryTag1, IteratorCategoryTag2 ) { - while (true) + for (;;) { // If we have reached the end of the left range then this is // the end of the loop. They are equal if and only if we have @@ -71,7 +71,7 @@ namespace boost IteratorCategoryTag1, IteratorCategoryTag2 ) { - while (true) + for (;;) { // If we have reached the end of the left range then this is // the end of the loop. They are equal if and only if we have @@ -120,7 +120,9 @@ namespace boost RandomAccessTraversalReadableIterator1 last1, RandomAccessTraversalReadableIterator2 first2, RandomAccessTraversalReadableIterator2 last2, - BinaryPredicate pred ) + BinaryPredicate pred, + std::random_access_iterator_tag, + std::random_access_iterator_tag ) { return ((last1 - first1) == (last2 - first2)) && std::equal(first1, last1, first2, pred); diff --git a/boost/boost/range/begin.hpp b/boost/boost/range/begin.hpp index c6684887f5..ba5a73b92d 100644 --- a/boost/boost/range/begin.hpp +++ b/boost/boost/range/begin.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_RANGE_BEGIN_HPP #define BOOST_RANGE_BEGIN_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif @@ -26,9 +26,7 @@ namespace boost { -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ - !BOOST_WORKAROUND(__GNUC__, < 3) \ - /**/ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) namespace range_detail { #endif @@ -85,9 +83,7 @@ namespace range_detail } -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ - !BOOST_WORKAROUND(__GNUC__, < 3) \ - /**/ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) } // namespace 'range_detail' #endif @@ -100,9 +96,7 @@ namespace range_adl_barrier template< class T > inline BOOST_DEDUCED_TYPENAME range_iterator::type begin( T& r ) { -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ - !BOOST_WORKAROUND(__GNUC__, < 3) \ - /**/ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) using namespace range_detail; #endif return range_begin( r ); @@ -111,9 +105,7 @@ inline BOOST_DEDUCED_TYPENAME range_iterator::type begin( T& r ) template< class T > inline BOOST_DEDUCED_TYPENAME range_iterator::type begin( const T& r ) { -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ - !BOOST_WORKAROUND(__GNUC__, < 3) \ - /**/ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) using namespace range_detail; #endif return range_begin( r ); diff --git a/boost/boost/range/concepts.hpp b/boost/boost/range/concepts.hpp index 5a02a21d8d..3e612a35f9 100644 --- a/boost/boost/range/concepts.hpp +++ b/boost/boost/range/concepts.hpp @@ -23,6 +23,7 @@ #include #include #include +#include /*! * \file @@ -63,6 +64,7 @@ namespace boost { #ifndef BOOST_RANGE_ENABLE_CONCEPT_ASSERT // List broken compiler versions here: +#ifndef __clang__ #ifdef __GNUC__ // GNUC 4.2 has strange issues correctly detecting compliance with the Concepts // hence the least disruptive approach is to turn-off the concept checking for @@ -72,6 +74,14 @@ namespace boost { #endif #endif + #ifdef __GCCXML__ + // GCC XML, unsurprisingly, has the same issues + #if __GCCXML_GNUC__ == 4 && __GCCXML_GNUC_MINOR__ == 2 + #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0 + #endif + #endif +#endif + #ifdef __BORLANDC__ #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0 #endif @@ -253,41 +263,51 @@ namespace boost { struct SinglePassRangeConcept { #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT - typedef BOOST_DEDUCED_TYPENAME range_iterator::type const_iterator; - typedef BOOST_DEDUCED_TYPENAME range_iterator::type iterator; + // A few compilers don't like the rvalue reference T types so just + // remove it. + typedef BOOST_DEDUCED_TYPENAME remove_reference::type Rng; - BOOST_RANGE_CONCEPT_ASSERT((range_detail::SinglePassIteratorConcept)); - BOOST_RANGE_CONCEPT_ASSERT((range_detail::SinglePassIteratorConcept)); + typedef BOOST_DEDUCED_TYPENAME range_iterator< + Rng const + >::type const_iterator; - BOOST_CONCEPT_USAGE(SinglePassRangeConcept) - { + typedef BOOST_DEDUCED_TYPENAME range_iterator::type iterator; + + BOOST_RANGE_CONCEPT_ASSERT(( + range_detail::SinglePassIteratorConcept)); + + BOOST_RANGE_CONCEPT_ASSERT(( + range_detail::SinglePassIteratorConcept)); + + BOOST_CONCEPT_USAGE(SinglePassRangeConcept) + { // This has been modified from assigning to this->i // (where i was a member variable) to improve // compatibility with Boost.Lambda iterator i1 = boost::begin(*m_range); iterator i2 = boost::end(*m_range); - ignore_unused_variable_warning(i1); - ignore_unused_variable_warning(i2); + boost::ignore_unused_variable_warning(i1); + boost::ignore_unused_variable_warning(i2); const_constraints(*m_range); } private: - void const_constraints(const T& const_range) + void const_constraints(const Rng& const_range) { const_iterator ci1 = boost::begin(const_range); const_iterator ci2 = boost::end(const_range); - ignore_unused_variable_warning(ci1); - ignore_unused_variable_warning(ci2); + boost::ignore_unused_variable_warning(ci1); + boost::ignore_unused_variable_warning(ci2); } // Rationale: // The type of m_range is T* rather than T because it allows // T to be an abstract class. The other obvious alternative of // T& produces a warning on some compilers. - T* m_range; + Rng* m_range; #endif }; @@ -301,11 +321,11 @@ namespace boost { #endif }; - template + template struct WriteableRangeConcept { #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT - typedef BOOST_DEDUCED_TYPENAME range_iterator::type iterator; + typedef BOOST_DEDUCED_TYPENAME range_iterator::type iterator; BOOST_CONCEPT_USAGE(WriteableRangeConcept) { @@ -313,7 +333,7 @@ namespace boost { } private: iterator i; - BOOST_DEDUCED_TYPENAME range_value::type v; + BOOST_DEDUCED_TYPENAME range_value::type v; #endif }; diff --git a/boost/boost/range/config.hpp b/boost/boost/range/config.hpp index 4e7fb24f89..7600a5ff82 100644 --- a/boost/boost/range/config.hpp +++ b/boost/boost/range/config.hpp @@ -13,7 +13,7 @@ #include -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif @@ -26,18 +26,14 @@ #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) # define BOOST_RANGE_DEDUCED_TYPENAME typename #else -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) && !defined(_MSC_EXTENSIONS) -# define BOOST_RANGE_DEDUCED_TYPENAME typename -# else -# define BOOST_RANGE_DEDUCED_TYPENAME BOOST_DEDUCED_TYPENAME -# endif +#define BOOST_RANGE_DEDUCED_TYPENAME BOOST_DEDUCED_TYPENAME #endif #ifdef BOOST_RANGE_NO_ARRAY_SUPPORT #error "macro already defined!" #endif -#if BOOST_WORKAROUND( BOOST_MSVC, < 1300 ) || BOOST_WORKAROUND( __MWERKS__, <= 0x3003 ) +#if BOOST_WORKAROUND( __MWERKS__, <= 0x3003 ) #define BOOST_RANGE_NO_ARRAY_SUPPORT 1 #endif @@ -48,6 +44,12 @@ #define BOOST_RANGE_ARRAY_REF() (&boost_range_array) #endif +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7))) +# define BOOST_RANGE_UNUSED __attribute__((unused)) +#else +# define BOOST_RANGE_UNUSED +#endif + #endif diff --git a/boost/boost/range/const_iterator.hpp b/boost/boost/range/const_iterator.hpp index 875320fb00..3413e59195 100644 --- a/boost/boost/range/const_iterator.hpp +++ b/boost/boost/range/const_iterator.hpp @@ -11,18 +11,16 @@ #ifndef BOOST_RANGE_CONST_ITERATOR_HPP #define BOOST_RANGE_CONST_ITERATOR_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif #include -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#include -#else - +#include #include #include +#include #include #include @@ -32,36 +30,47 @@ namespace boost // default ////////////////////////////////////////////////////////////////////////// - namespace range_detail { - BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( const_iterator ) - } + namespace range_detail + { - template< typename C > - struct range_const_iterator : range_detail::extract_const_iterator - {}; - - ////////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////////// +BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( const_iterator ) - template< typename Iterator > - struct range_const_iterator< std::pair > - { - typedef Iterator type; - }; - - ////////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////////// +template< typename C > +struct range_const_iterator + : extract_const_iterator +{}; - template< typename T, std::size_t sz > - struct range_const_iterator< T[sz] > - { - typedef const T* type; - }; +////////////////////////////////////////////////////////////////////////// +// pair +////////////////////////////////////////////////////////////////////////// + +template< typename Iterator > +struct range_const_iterator > +{ + typedef Iterator type; +}; + +////////////////////////////////////////////////////////////////////////// +// array +////////////////////////////////////////////////////////////////////////// + +template< typename T, std::size_t sz > +struct range_const_iterator< T[sz] > +{ + typedef const T* type; +}; + + } // namespace range_detail + +template +struct range_const_iterator + : range_detail::range_const_iterator< + BOOST_DEDUCED_TYPENAME remove_reference::type + > +{ +}; } // namespace boost -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif diff --git a/boost/boost/range/detail/begin.hpp b/boost/boost/range/detail/begin.hpp index f3da7323a4..1d9390ff85 100644 --- a/boost/boost/range/detail/begin.hpp +++ b/boost/boost/range/detail/begin.hpp @@ -15,9 +15,6 @@ #include #include #include -#if BOOST_WORKAROUND(BOOST_MSVC, < 1310) -# include -#endif namespace boost { @@ -62,19 +59,11 @@ namespace boost template<> struct range_begin { - #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) - template< typename T, std::size_t sz > - static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] ) - { - return boost_range_array; - } - #else template static BOOST_RANGE_DEDUCED_TYPENAME range_value::type* fun(T& t) { return t; } - #endif }; } // namespace 'range_detail' diff --git a/boost/boost/range/detail/common.hpp b/boost/boost/range/detail/common.hpp index f7539f5f68..b0ad535775 100644 --- a/boost/boost/range/detail/common.hpp +++ b/boost/boost/range/detail/common.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_RANGE_DETAIL_COMMON_HPP #define BOOST_RANGE_DETAIL_COMMON_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif diff --git a/boost/boost/range/detail/const_iterator.hpp b/boost/boost/range/detail/const_iterator.hpp deleted file mode 100644 index e5cb34a790..0000000000 --- a/boost/boost/range/detail/const_iterator.hpp +++ /dev/null @@ -1,71 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2004. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_DETAIL_CONST_ITERATOR_HPP -#define BOOST_RANGE_DETAIL_CONST_ITERATOR_HPP - -#include -#include - -////////////////////////////////////////////////////////////////////////////// -// missing partial specialization workaround. -////////////////////////////////////////////////////////////////////////////// - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_const_iterator_; - - template<> - struct range_const_iterator_ - { - template< typename C > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME C::const_iterator type; - }; - }; - - template<> - struct range_const_iterator_ - { - template< typename P > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME P::first_type type; - }; - }; - - - template<> - struct range_const_iterator_ - { - template< typename T > - struct pts - { - typedef const BOOST_RANGE_DEDUCED_TYPENAME - remove_extent::type* type; - }; - }; - } - - template< typename C > - class range_const_iterator - { - typedef BOOST_DEDUCED_TYPENAME range_detail::range::type c_type; - public: - typedef BOOST_DEDUCED_TYPENAME range_detail::range_const_iterator_::BOOST_NESTED_TEMPLATE pts::type type; - }; - -} - -#endif diff --git a/boost/boost/range/detail/end.hpp b/boost/boost/range/detail/end.hpp index 8b5f35d80b..f2f71780a7 100644 --- a/boost/boost/range/detail/end.hpp +++ b/boost/boost/range/detail/end.hpp @@ -14,15 +14,9 @@ #include // BOOST_MSVC #include -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -# include -#else -# include -# include -# include -# if BOOST_WORKAROUND(BOOST_MSVC, < 1310) -# include -# endif +#include +#include +#include namespace boost { @@ -68,19 +62,11 @@ namespace boost template<> struct range_end { - #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) - template< typename T, std::size_t sz > - static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] ) - { - return boost::range_detail::array_end( boost_range_array ); - } - #else template static BOOST_RANGE_DEDUCED_TYPENAME remove_extent::type* fun(T& t) { return t + remove_extent::size; } - #endif }; } // namespace 'range_detail' @@ -97,5 +83,4 @@ namespace boost } // namespace 'boost' -# endif // VC6 #endif diff --git a/boost/boost/range/detail/extract_optional_type.hpp b/boost/boost/range/detail/extract_optional_type.hpp index 4a7f71a21e..0381434a85 100644 --- a/boost/boost/range/detail/extract_optional_type.hpp +++ b/boost/boost/range/detail/extract_optional_type.hpp @@ -10,41 +10,37 @@ #ifndef BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED #define BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif #include +#include +#include -#ifdef BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS +#if !defined(BOOST_MPL_CFG_NO_HAS_XXX) -#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \ - template< typename C > \ - struct extract_ ## a_typedef \ - { \ - typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \ +// Defines extract_some_typedef which exposes T::some_typedef as +// extract_some_typedef::type if T::some_typedef exists. Otherwise +// extract_some_typedef is empty. +#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \ + BOOST_MPL_HAS_XXX_TRAIT_DEF(a_typedef) \ + template< typename C, bool B = BOOST_PP_CAT(has_, a_typedef)::value > \ + struct BOOST_PP_CAT(extract_, a_typedef) \ + {}; \ + template< typename C > \ + struct BOOST_PP_CAT(extract_, a_typedef)< C, true > \ + { \ + typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \ }; #else -namespace boost { - namespace range_detail { - template< typename T > struct exists { typedef void type; }; - } -} - -// Defines extract_some_typedef which exposes T::some_typedef as -// extract_some_typedef::type if T::some_typedef exists. Otherwise -// extract_some_typedef is empty. -#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \ - template< typename C, typename Enable=void > \ - struct extract_ ## a_typedef \ - {}; \ - template< typename C > \ - struct extract_ ## a_typedef< C \ - , BOOST_DEDUCED_TYPENAME boost::range_detail::exists< BOOST_DEDUCED_TYPENAME C::a_typedef >::type \ - > { \ - typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \ +#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \ + template< typename C > \ + struct BOOST_PP_CAT(extract_, a_typedef) \ + { \ + typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \ }; #endif diff --git a/boost/boost/range/detail/has_member_size.hpp b/boost/boost/range/detail/has_member_size.hpp new file mode 100644 index 0000000000..0c639aa891 --- /dev/null +++ b/boost/boost/range/detail/has_member_size.hpp @@ -0,0 +1,66 @@ +// Boost.Range library +// +// Copyright Neil Groves 2014. +// +// 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). +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_DETAIL_HAS_MEMBER_SIZE_HPP +#define BOOST_RANGE_DETAIL_HAS_MEMBER_SIZE_HPP + +#include +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + +template +class has_member_size_impl +{ +private: + template + class check + { + }; + + template + static boost::uint8_t f(check*); + + template + static boost::uint16_t f(...); + +public: + static const bool value = + (sizeof(f(0)) == sizeof(boost::uint8_t)); + + typedef typename mpl::if_c< + (sizeof(f(0)) == sizeof(boost::uint8_t)), + mpl::true_, + mpl::false_ + >::type type; +}; + +template +struct has_member_size +{ + typedef typename mpl::and_< + typename is_class::type, + typename has_member_size_impl::type + >::type type; + + static const bool value = + is_class::value && has_member_size_impl::value; +}; + + } // namespace range_detail +}// namespace boost + +#endif // include guard diff --git a/boost/boost/range/detail/implementation_help.hpp b/boost/boost/range/detail/implementation_help.hpp index 1f7d163edc..f35953f349 100644 --- a/boost/boost/range/detail/implementation_help.hpp +++ b/boost/boost/range/detail/implementation_help.hpp @@ -95,6 +95,17 @@ namespace boost return sz; } + inline bool is_same_address(const void* l, const void* r) + { + return l == r; + } + + template + inline bool is_same_object(const T1& l, const T2& r) + { + return range_detail::is_same_address(&l, &r); + } + } // namespace 'range_detail' } // namespace 'boost' diff --git a/boost/boost/range/detail/iterator.hpp b/boost/boost/range/detail/iterator.hpp deleted file mode 100644 index 58346d47d1..0000000000 --- a/boost/boost/range/detail/iterator.hpp +++ /dev/null @@ -1,78 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2004. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_DETAIL_ITERATOR_HPP -#define BOOST_RANGE_DETAIL_ITERATOR_HPP - -#include -#include - -#include - -////////////////////////////////////////////////////////////////////////////// -// missing partial specialization workaround. -////////////////////////////////////////////////////////////////////////////// - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_iterator_ { - template< typename C > - struct pts - { - typedef int type; - }; - }; - - template<> - struct range_iterator_ - { - template< typename C > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME C::iterator type; - }; - }; - - template<> - struct range_iterator_ - { - template< typename P > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME P::first_type type; - }; - }; - - template<> - struct range_iterator_ - { - template< typename T > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME - remove_extent::type* type; - }; - }; - - } - - template< typename C > - class range_mutable_iterator - { - typedef BOOST_RANGE_DEDUCED_TYPENAME range_detail::range::type c_type; - public: - typedef typename range_detail::range_iterator_::BOOST_NESTED_TEMPLATE pts::type type; - }; -} - -#endif diff --git a/boost/boost/range/detail/msvc_has_iterator_workaround.hpp b/boost/boost/range/detail/msvc_has_iterator_workaround.hpp new file mode 100644 index 0000000000..62b67fd529 --- /dev/null +++ b/boost/boost/range/detail/msvc_has_iterator_workaround.hpp @@ -0,0 +1,132 @@ +// Boost.Range library +// +// Copyright Eric Niebler 2014. 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) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_DETAIL_MSVC_HAS_ITERATOR_WORKAROUND_HPP +#define BOOST_RANGE_DETAIL_MSVC_HAS_ITERATOR_WORKAROUND_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#ifndef BOOST_RANGE_MUTABLE_ITERATOR_HPP +# error This file should only be included from +#endif + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600) +namespace boost +{ +namespace cb_details +{ + template + struct iterator; +} + +namespace python +{ + template + struct iterator; +} + +namespace type_erasure +{ + template< + class Traversal, + class T /*= _self*/, + class Reference /*= ::boost::use_default*/, + class DifferenceType /*= ::std::ptrdiff_t*/, + class ValueType /*= typename deduced >::type*/ + > + struct iterator; +} + +namespace unordered { namespace iterator_detail +{ + template + struct iterator; +}} + +namespace container { namespace container_detail +{ + template + class iterator; +}} + +namespace spirit { namespace lex { namespace lexertl +{ + template + class iterator; +}}} + +namespace range_detail +{ + template + struct has_iterator< ::boost::cb_details::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::cb_details::iterator const> + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::python::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::python::iterator const> + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::type_erasure::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::type_erasure::iterator const> + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::unordered::iterator_detail::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::unordered::iterator_detail::iterator const> + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::container::container_detail::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::container::container_detail::iterator const> + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::spirit::lex::lexertl::iterator > + : mpl::false_ + {}; + + template + struct has_iterator< ::boost::spirit::lex::lexertl::iterator const> + : mpl::false_ + {}; +} +} +#endif +#endif diff --git a/boost/boost/range/detail/remove_extent.hpp b/boost/boost/range/detail/remove_extent.hpp deleted file mode 100644 index 68e4597245..0000000000 --- a/boost/boost/range/detail/remove_extent.hpp +++ /dev/null @@ -1,157 +0,0 @@ -// Boost.Range library -// -// Copyright Jonathan Turkanis 2005. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - - -#ifndef BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP -#define BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP - -#include // MSVC, NO_INTRINSIC_WCHAR_T, put size_t in std. -#include -#include -#include -#include - -namespace boost -{ - namespace range_detail - { - - template< typename Case1 = mpl::true_, - typename Type1 = mpl::void_, - typename Case2 = mpl::true_, - typename Type2 = mpl::void_, - typename Case3 = mpl::true_, - typename Type3 = mpl::void_, - typename Case4 = mpl::true_, - typename Type4 = mpl::void_, - typename Case5 = mpl::true_, - typename Type5 = mpl::void_, - typename Case6 = mpl::true_, - typename Type6 = mpl::void_, - typename Case7 = mpl::true_, - typename Type7 = mpl::void_, - typename Case8 = mpl::true_, - typename Type8 = mpl::void_, - typename Case9 = mpl::true_, - typename Type9 = mpl::void_, - typename Case10 = mpl::true_, - typename Type10 = mpl::void_, - typename Case11 = mpl::true_, - typename Type11 = mpl::void_, - typename Case12 = mpl::true_, - typename Type12 = mpl::void_, - typename Case13 = mpl::true_, - typename Type13 = mpl::void_, - typename Case14 = mpl::true_, - typename Type14 = mpl::void_, - typename Case15 = mpl::true_, - typename Type15 = mpl::void_, - typename Case16 = mpl::true_, - typename Type16 = mpl::void_, - typename Case17 = mpl::true_, - typename Type17 = mpl::void_, - typename Case18 = mpl::true_, - typename Type18 = mpl::void_, - typename Case19 = mpl::true_, - typename Type19 = mpl::void_, - typename Case20 = mpl::true_, - typename Type20 = mpl::void_> - struct select { - typedef typename - mpl::eval_if< - Case1, mpl::identity, mpl::eval_if< - Case2, mpl::identity, mpl::eval_if< - Case3, mpl::identity, mpl::eval_if< - Case4, mpl::identity, mpl::eval_if< - Case5, mpl::identity, mpl::eval_if< - Case6, mpl::identity, mpl::eval_if< - Case7, mpl::identity, mpl::eval_if< - Case8, mpl::identity, mpl::eval_if< - Case9, mpl::identity, mpl::if_< - Case10, Type10, mpl::void_ > > > > > > > > > - >::type result1; - typedef typename - mpl::eval_if< - Case11, mpl::identity, mpl::eval_if< - Case12, mpl::identity, mpl::eval_if< - Case13, mpl::identity, mpl::eval_if< - Case14, mpl::identity, mpl::eval_if< - Case15, mpl::identity, mpl::eval_if< - Case16, mpl::identity, mpl::eval_if< - Case17, mpl::identity, mpl::eval_if< - Case18, mpl::identity, mpl::eval_if< - Case19, mpl::identity, mpl::if_< - Case20, Type20, mpl::void_ > > > > > > > > > - > result2; - typedef typename - mpl::eval_if< - is_same, - result2, - mpl::identity - >::type type; - }; - - template - struct remove_extent { - static T* ar; - BOOST_STATIC_CONSTANT(std::size_t, size = sizeof(*ar) / sizeof((*ar)[0])); - - typedef typename - select< - is_same, bool, - is_same, char, - is_same, signed char, - is_same, unsigned char, - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - is_same, wchar_t, - #endif - is_same, short, - is_same, unsigned short, - is_same, int, - is_same, unsigned int, - is_same, long, - is_same, unsigned long, - is_same, float, - is_same, double, - is_same, long double - >::type result1; - typedef typename - select< - is_same, const bool, - is_same, const char, - is_same, const signed char, - is_same, const unsigned char, - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - is_same, const wchar_t, - #endif - is_same, const short, - is_same, const unsigned short, - is_same, const int, - is_same, const unsigned int, - is_same, const long, - is_same, const unsigned long, - is_same, const float, - is_same, const double, - is_same, const long double - > result2; - typedef typename - mpl::eval_if< - is_same, - result2, - mpl::identity - >::type type; - }; - - } // namespace 'range_detail' - -} // namespace 'boost' - - -#endif diff --git a/boost/boost/range/detail/size_type.hpp b/boost/boost/range/detail/size_type.hpp deleted file mode 100644 index 78a60a48e9..0000000000 --- a/boost/boost/range/detail/size_type.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2004. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_DETAIL_SIZE_TYPE_HPP -#define BOOST_RANGE_DETAIL_SIZE_TYPE_HPP - -#include - -////////////////////////////////////////////////////////////////////////////// -// missing partial specialization workaround. -////////////////////////////////////////////////////////////////////////////// - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_size_type_ - { - template< typename C > - struct pts - { - typedef std::size_t type; - }; - }; - - template<> - struct range_size_type_ - { - template< typename C > - struct pts - { - typedef BOOST_RANGE_DEDUCED_TYPENAME C::size_type type; - }; - }; - } - - template< typename C > - class range_size - { - typedef typename range_detail::range::type c_type; - public: - typedef typename range_detail::range_size_type_::BOOST_NESTED_TEMPLATE pts::type type; - }; -} - -#endif - diff --git a/boost/boost/range/detail/vc6/end.hpp b/boost/boost/range/detail/vc6/end.hpp deleted file mode 100644 index 4f76af5d6b..0000000000 --- a/boost/boost/range/detail/vc6/end.hpp +++ /dev/null @@ -1,170 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2004. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_DETAIL_VC6_END_HPP -#define BOOST_RANGE_DETAIL_VC6_END_HPP - -#include -#include -#include -#include -#include - -namespace boost -{ - namespace range_detail - { - template< typename T > - struct range_end; - - ////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_end - { - template< typename C > - struct inner { - static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator::type - fun( C& c ) - { - return c.end(); - }; - }; - }; - - ////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_end - { - template< typename P > - struct inner { - static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator

::type - fun( const P& p ) - { - return p.second; - } - }; - }; - - ////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_end - { - template< typename T > - struct inner { - static BOOST_DEDUCED_TYPENAME remove_extent::type* - fun(T& t) - { - return t + remove_extent::size; - } - }; - }; - - - template<> - struct range_end - { - template< typename T > - struct inner { - static BOOST_DEDUCED_TYPENAME remove_extent::type* - fun(T& t) - { - return t + remove_extent::size; - } - }; - }; - - template<> - struct range_end - { - template< typename T > - struct inner { - static BOOST_DEDUCED_TYPENAME remove_extent::type* - fun(T& t) - { - return t + remove_extent::size; - } - }; - }; - - ////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////// - - template<> - struct range_end - { - template< typename T > - struct inner { - static char* fun( char* s ) - { - return boost::range_detail::str_end( s ); - } - }; - }; - - template<> - struct range_end - { - template< typename T > - struct inner { - static const char* fun( const char* s ) - { - return boost::range_detail::str_end( s ); - } - }; - }; - - template<> - struct range_end - { - template< typename T > - struct inner { - static wchar_t* fun( wchar_t* s ) - { - return boost::range_detail::str_end( s ); - } - }; - }; - - - template<> - struct range_end - { - template< typename T > - struct inner { - static const wchar_t* fun( const wchar_t* s ) - { - return boost::range_detail::str_end( s ); - } - }; - }; - - } // namespace 'range_detail' - - template< typename C > - inline BOOST_DEDUCED_TYPENAME range_result_iterator::type - end( C& c ) - { - return range_detail::range_end::type>::inner::fun( c ); - } - -} // namespace 'boost' - - -#endif diff --git a/boost/boost/range/difference_type.hpp b/boost/boost/range/difference_type.hpp index 164288fee4..afd8b07cc0 100644 --- a/boost/boost/range/difference_type.hpp +++ b/boost/boost/range/difference_type.hpp @@ -11,18 +11,24 @@ #ifndef BOOST_RANGE_DIFFERENCE_TYPE_HPP #define BOOST_RANGE_DIFFERENCE_TYPE_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif #include #include #include +#include namespace boost { template< class T > - struct range_difference : iterator_difference< typename range_iterator::type > + struct range_difference + : iterator_difference< + BOOST_DEDUCED_TYPENAME range_iterator< + BOOST_DEDUCED_TYPENAME remove_reference::type + >::type + > { }; } diff --git a/boost/boost/range/distance.hpp b/boost/boost/range/distance.hpp index 42a106de03..075f2d1fb9 100644 --- a/boost/boost/range/distance.hpp +++ b/boost/boost/range/distance.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_RANGE_DISTANCE_HPP #define BOOST_RANGE_DISTANCE_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif diff --git a/boost/boost/range/empty.hpp b/boost/boost/range/empty.hpp index 36e58d7ddf..d57a30ed01 100644 --- a/boost/boost/range/empty.hpp +++ b/boost/boost/range/empty.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_RANGE_EMPTY_HPP #define BOOST_RANGE_EMPTY_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif diff --git a/boost/boost/range/end.hpp b/boost/boost/range/end.hpp index d5e6526fde..f2a3337e34 100644 --- a/boost/boost/range/end.hpp +++ b/boost/boost/range/end.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_RANGE_END_HPP #define BOOST_RANGE_END_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif @@ -28,9 +28,7 @@ namespace boost { -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ - !BOOST_WORKAROUND(__GNUC__, < 3) \ - /**/ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) namespace range_detail { #endif @@ -82,9 +80,7 @@ namespace range_detail return range_detail::array_end( a ); } -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ - !BOOST_WORKAROUND(__GNUC__, < 3) \ - /**/ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) } // namespace 'range_detail' #endif @@ -94,9 +90,7 @@ namespace range_adl_barrier template< class T > inline BOOST_DEDUCED_TYPENAME range_iterator::type end( T& r ) { -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ - !BOOST_WORKAROUND(__GNUC__, < 3) \ - /**/ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) using namespace range_detail; #endif return range_end( r ); @@ -105,9 +99,7 @@ inline BOOST_DEDUCED_TYPENAME range_iterator::type end( T& r ) template< class T > inline BOOST_DEDUCED_TYPENAME range_iterator::type end( const T& r ) { -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ - !BOOST_WORKAROUND(__GNUC__, < 3) \ - /**/ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) using namespace range_detail; #endif return range_end( r ); diff --git a/boost/boost/range/functions.hpp b/boost/boost/range/functions.hpp index b8b8608b86..43c54b15b8 100644 --- a/boost/boost/range/functions.hpp +++ b/boost/boost/range/functions.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_RANGE_FUNCTIONS_HPP #define BOOST_RANGE_FUNCTIONS_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif diff --git a/boost/boost/range/has_range_iterator.hpp b/boost/boost/range/has_range_iterator.hpp new file mode 100644 index 0000000000..9eb58b35d2 --- /dev/null +++ b/boost/boost/range/has_range_iterator.hpp @@ -0,0 +1,83 @@ +// Boost.Range library +// +// Copyright Neil Groves 2010. 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) +// +// For more information, see http://www.boost.org/libs/range/ +// +// Acknowledgments: +// Ticket #8341: Arno Schoedl - improved handling of has_range_iterator upon +// use-cases where T was const. +#ifndef BOOST_RANGE_HAS_ITERATOR_HPP_INCLUDED +#define BOOST_RANGE_HAS_ITERATOR_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(type) + + template + struct has_range_iterator_impl + : boost::mpl::false_ + { + }; + + template + struct has_range_iterator_impl< + T, + BOOST_DEDUCED_TYPENAME ::boost::enable_if< + BOOST_DEDUCED_TYPENAME mpl::eval_if, + has_type::type> >, + has_type > + >::type + >::type + > + : boost::mpl::true_ + { + }; + + template + struct has_range_const_iterator_impl + : boost::mpl::false_ + { + }; + + template + struct has_range_const_iterator_impl< + T, + BOOST_DEDUCED_TYPENAME ::boost::enable_if< + has_type > + >::type + > + : boost::mpl::true_ + { + }; + + } // namespace range_detail + + template + struct has_range_iterator + : range_detail::has_range_iterator_impl< + BOOST_DEDUCED_TYPENAME remove_reference::type> + {}; + + template + struct has_range_const_iterator + : range_detail::has_range_const_iterator_impl< + BOOST_DEDUCED_TYPENAME remove_reference::type> + {}; +} // namespace boost + +#endif // include guard + diff --git a/boost/boost/range/iterator.hpp b/boost/boost/range/iterator.hpp index ec73ddc233..f15bf3b342 100644 --- a/boost/boost/range/iterator.hpp +++ b/boost/boost/range/iterator.hpp @@ -11,11 +11,12 @@ #ifndef BOOST_RANGE_ITERATOR_HPP #define BOOST_RANGE_ITERATOR_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif #include +#include #include #include #include @@ -25,48 +26,51 @@ namespace boost { -#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) - - namespace range_detail_vc7_1 - { - template< typename C, typename Sig = void(C) > - struct range_iterator - { - typedef BOOST_RANGE_DEDUCED_TYPENAME - mpl::eval_if_c< is_const::value, - range_const_iterator< typename remove_const::type >, - range_mutable_iterator >::type type; - }; - - template< typename C, typename T > - struct range_iterator< C, void(T[]) > - { - typedef T* type; - }; - } - -#endif - - template< typename C > +#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) + + namespace range_detail_vc7_1 + { + template< typename C, typename Sig = void(C) > + struct range_iterator + { + typedef BOOST_RANGE_DEDUCED_TYPENAME + mpl::eval_if_c< is_const::value, + range_const_iterator< typename remove_const::type >, + range_mutable_iterator >::type type; + }; + + template< typename C, typename T > + struct range_iterator< C, void(T[]) > + { + typedef T* type; + }; + } + +#endif + + template< typename C, typename Enabler=void > struct range_iterator { #if BOOST_WORKAROUND(BOOST_MSVC, == 1310) - - typedef BOOST_RANGE_DEDUCED_TYPENAME - range_detail_vc7_1::range_iterator::type type; - -#else - - typedef BOOST_RANGE_DEDUCED_TYPENAME - mpl::eval_if_c< is_const::value, - range_const_iterator< typename remove_const::type >, - range_mutable_iterator >::type type; - -#endif + + typedef BOOST_RANGE_DEDUCED_TYPENAME + range_detail_vc7_1::range_iterator::type type; + +#else + + private: + typedef typename remove_reference::type param_t; + + public: + typedef typename mpl::eval_if_c< + is_const::value, + range_const_iterator::type>, + range_mutable_iterator + >::type type; + +#endif }; - + } // namespace boost -//#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - #endif diff --git a/boost/boost/range/iterator_range_core.hpp b/boost/boost/range/iterator_range_core.hpp index 6e689923ec..2fbeb686e2 100644 --- a/boost/boost/range/iterator_range_core.hpp +++ b/boost/boost/range/iterator_range_core.hpp @@ -7,6 +7,10 @@ // // For more information, see http://www.boost.org/libs/range/ // +// Credits: +// 'michel' reported Trac 9072 which included a patch for allowing references +// to function types. +// #ifndef BOOST_RANGE_ITERATOR_RANGE_CORE_HPP_INCLUDED #define BOOST_RANGE_ITERATOR_RANGE_CORE_HPP_INCLUDED @@ -21,13 +25,20 @@ #include #include #include +#include +#include #include #include #include +#include +#include +#include #include +#include #include #include #include +#include #include #include #include @@ -77,7 +88,7 @@ namespace boost template< class Left, class Right > inline bool greater_than( const Left& l, const Right& r ) { - return less_than(r,l); + return iterator_range_detail::less_than(r,l); } template< class Left, class Right > @@ -100,8 +111,303 @@ namespace boost return boost::equal(l, r); } - struct range_tag { }; - struct const_range_tag { }; +struct range_tag +{ +}; + +struct const_range_tag +{ +}; + +struct iterator_range_tag +{ +}; + +typedef char (&incrementable_t)[1]; +typedef char (&bidirectional_t)[2]; +typedef char (&random_access_t)[3]; + +incrementable_t test_traversal_tag(boost::incrementable_traversal_tag); +bidirectional_t test_traversal_tag(boost::bidirectional_traversal_tag); +random_access_t test_traversal_tag(boost::random_access_traversal_tag); + +template +struct pure_iterator_traversal_impl +{ + typedef boost::incrementable_traversal_tag type; +}; + +template<> +struct pure_iterator_traversal_impl +{ + typedef boost::bidirectional_traversal_tag type; +}; + +template<> +struct pure_iterator_traversal_impl +{ + typedef boost::random_access_traversal_tag type; +}; + +template +struct pure_iterator_traversal +{ + typedef + BOOST_DEDUCED_TYPENAME iterator_traversal::type + traversal_t; + BOOST_STATIC_CONSTANT( + std::size_t, + traversal_i = sizeof(iterator_range_detail::test_traversal_tag((traversal_t()))) + ); + typedef + BOOST_DEDUCED_TYPENAME pure_iterator_traversal_impl::type + type; +}; + +template +class iterator_range_base + : public iterator_range_tag +{ + typedef range_detail::safe_bool< + IteratorT iterator_range_base::* + > safe_bool_t; + + typedef iterator_range_base type; + +protected: + typedef iterator_range_impl impl; + +public: + typedef BOOST_DEDUCED_TYPENAME + safe_bool_t::unspecified_bool_type unspecified_bool_type; + + typedef BOOST_DEDUCED_TYPENAME + iterator_value::type value_type; + + typedef BOOST_DEDUCED_TYPENAME + iterator_difference::type difference_type; + + typedef std::size_t size_type; // note: must be unsigned + + // Needed because value-type is the same for + // const and non-const iterators + typedef BOOST_DEDUCED_TYPENAME + iterator_reference::type reference; + + //! const_iterator type + /*! + There is no distinction between const_iterator and iterator. + These typedefs are provides to fulfill container interface + */ + typedef IteratorT const_iterator; + //! iterator type + typedef IteratorT iterator; + +protected: + iterator_range_base() + : m_Begin() + , m_End() + { + } + + template + iterator_range_base(Iterator Begin, Iterator End) + : m_Begin(Begin) + , m_End(End) + { + } + +public: + IteratorT begin() const + { + return m_Begin; + } + + IteratorT end() const + { + return m_End; + } + + bool empty() const + { + return m_Begin == m_End; + } + + operator unspecified_bool_type() const + { + return safe_bool_t::to_unspecified_bool( + m_Begin != m_End, &iterator_range_base::m_Begin); + } + + bool operator!() const + { + return empty(); + } + + bool equal(const iterator_range_base& r) const + { + return m_Begin == r.m_Begin && m_End == r.m_End; + } + + reference front() const + { + BOOST_ASSERT(!empty()); + return *m_Begin; + } + + void drop_front() + { + BOOST_ASSERT(!empty()); + ++m_Begin; + } + + void drop_front(difference_type n) + { + BOOST_ASSERT(n >= difference_type()); + std::advance(this->m_Begin, n); + } + + // Deprecated + void pop_front() { drop_front(); } + +protected: + template + void assign(Iterator first, Iterator last) + { + m_Begin = first; + m_End = last; + } + + template + void assign(const SinglePassRange& r) + { + m_Begin = impl::adl_begin(r); + m_End = impl::adl_end(r); + } + + template + void assign(SinglePassRange& r) + { + m_Begin = impl::adl_begin(r); + m_End = impl::adl_end(r); + } + + IteratorT m_Begin; + IteratorT m_End; +}; + +template +class iterator_range_base + : public iterator_range_base +{ + typedef iterator_range_base base_type; + +protected: + iterator_range_base() + { + } + + template + iterator_range_base(Iterator first, Iterator last) + : base_type(first, last) + { + } + +public: + typedef BOOST_DEDUCED_TYPENAME base_type::difference_type difference_type; + typedef BOOST_DEDUCED_TYPENAME base_type::reference reference; + + reference back() const + { + BOOST_ASSERT(!this->empty()); + return *boost::prior(this->m_End); + } + + void drop_back() + { + BOOST_ASSERT(!this->empty()); + --this->m_End; + } + + void drop_back(difference_type n) + { + BOOST_ASSERT(n >= difference_type()); + std::advance(this->m_End, -n); + } + + // Deprecated + void pop_back() { drop_back(); } +}; + +template +class iterator_range_base + : public iterator_range_base +{ + typedef iterator_range_base< + IteratorT, bidirectional_traversal_tag> base_type; + +public: + typedef BOOST_DEDUCED_TYPENAME + boost::mpl::if_< + boost::mpl::or_< + boost::is_abstract< + BOOST_DEDUCED_TYPENAME base_type::value_type + >, + boost::is_array< + BOOST_DEDUCED_TYPENAME base_type::value_type + >, + boost::is_function< + BOOST_DEDUCED_TYPENAME base_type::value_type + > + >, + BOOST_DEDUCED_TYPENAME base_type::reference, + BOOST_DEDUCED_TYPENAME base_type::value_type + >::type abstract_value_type; + + // Rationale: + // typedef these here to reduce verbiage in the implementation of this + // type. + typedef BOOST_DEDUCED_TYPENAME base_type::difference_type difference_type; + typedef BOOST_DEDUCED_TYPENAME base_type::size_type size_type; + typedef BOOST_DEDUCED_TYPENAME base_type::reference reference; + +protected: + iterator_range_base() + { + } + + template + iterator_range_base(Iterator first, Iterator last) + : base_type(first, last) + { + } + +public: + reference operator[](difference_type at) const + { + BOOST_ASSERT(at >= 0); + BOOST_ASSERT(static_cast(at) < size()); + return this->m_Begin[at]; + } + + // + // When storing transform iterators, operator[]() + // fails because it returns by reference. Therefore + // operator()() is provided for these cases. + // + abstract_value_type operator()(difference_type at) const + { + BOOST_ASSERT(at >= 0); + BOOST_ASSERT(static_cast(at) < size()); + return this->m_Begin[at]; + } + + BOOST_DEDUCED_TYPENAME base_type::size_type size() const + { + return this->m_End - this->m_Begin; + } +}; + } // iterator range template class -----------------------------------------// @@ -125,253 +431,137 @@ namespace boost */ template class iterator_range - { - typedef range_detail::safe_bool< IteratorT iterator_range::* > safe_bool_t; - protected: // Used by sub_range - //! implementation class - typedef iterator_range_detail::iterator_range_impl impl; - public: - //! this type - typedef iterator_range type; - typedef BOOST_DEDUCED_TYPENAME safe_bool_t::unspecified_bool_type unspecified_bool_type; - //BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type); - - //! Encapsulated value type - typedef BOOST_DEDUCED_TYPENAME - iterator_value::type value_type; - - //! Difference type - typedef BOOST_DEDUCED_TYPENAME - iterator_difference::type difference_type; - - //! Size type - typedef std::size_t size_type; // note: must be unsigned - - //! This type - typedef iterator_range this_type; - - //! Reference type - // - // Needed because value-type is the same for - // const and non-const iterators - // - typedef BOOST_DEDUCED_TYPENAME - iterator_reference::type reference; + : public iterator_range_detail::iterator_range_base< + IteratorT, + BOOST_DEDUCED_TYPENAME iterator_range_detail::pure_iterator_traversal::type + > + { + typedef iterator_range_detail::iterator_range_base< + IteratorT, + BOOST_DEDUCED_TYPENAME iterator_range_detail::pure_iterator_traversal::type + > base_type; + + template + struct is_compatible_range_ + : is_convertible< + BOOST_DEDUCED_TYPENAME mpl::eval_if< + has_range_iterator, + range_iterator, + mpl::identity + >::type, + BOOST_DEDUCED_TYPENAME base_type::iterator + > + { + }; + + template + struct is_compatible_range + : mpl::and_< + mpl::not_< + is_convertible< + Source, + BOOST_DEDUCED_TYPENAME base_type::iterator + > + >, + is_compatible_range_ + > + { + }; - //! const_iterator type - /*! - There is no distinction between const_iterator and iterator. - These typedefs are provides to fulfill container interface - */ - typedef IteratorT const_iterator; - //! iterator type - typedef IteratorT iterator; - - private: // for return value of operator()() - typedef BOOST_DEDUCED_TYPENAME - boost::mpl::if_< boost::mpl::or_< boost::is_abstract< value_type >, - boost::is_array< value_type > >, - reference, value_type >::type abstract_value_type; + protected: + typedef iterator_range_detail::iterator_range_impl impl; public: - iterator_range() : m_Begin( iterator() ), m_End( iterator() ) - { } - - //! Constructor from a pair of iterators - template< class Iterator > - iterator_range( Iterator Begin, Iterator End ) : - m_Begin(Begin), m_End(End) - {} - - //! Constructor from a Range - template< class Range > - iterator_range( const Range& r ) : - m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ) - {} - - //! Constructor from a Range - template< class Range > - iterator_range( Range& r ) : - m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ) - {} - - //! Constructor from a Range - template< class Range > - iterator_range( const Range& r, iterator_range_detail::const_range_tag ) : - m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ) - {} - - //! Constructor from a Range - template< class Range > - iterator_range( Range& r, iterator_range_detail::range_tag ) : - m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ) - {} - - #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - this_type& operator=( const this_type& r ) - { - m_Begin = r.begin(); - m_End = r.end(); - return *this; - } - #endif + typedef iterator_range type; - template< class Iterator > - iterator_range& operator=( const iterator_range& r ) + iterator_range() { - m_Begin = r.begin(); - m_End = r.end(); - return *this; } - template< class ForwardRange > - iterator_range& operator=( ForwardRange& r ) + template + iterator_range(Iterator first, Iterator last) + : base_type(first, last) { - m_Begin = impl::adl_begin( r ); - m_End = impl::adl_end( r ); - return *this; } - template< class ForwardRange > - iterator_range& operator=( const ForwardRange& r ) + template + iterator_range( + const SinglePassRange& r, + BOOST_DEDUCED_TYPENAME ::boost::enable_if< + is_compatible_range + >::type* = 0 + ) + : base_type(impl::adl_begin(r), impl::adl_end(r)) { - m_Begin = impl::adl_begin( r ); - m_End = impl::adl_end( r ); - return *this; } - IteratorT begin() const + template + iterator_range( + SinglePassRange& r, + BOOST_DEDUCED_TYPENAME ::boost::enable_if< + is_compatible_range + >::type* = 0 + ) + : base_type(impl::adl_begin(r), impl::adl_end(r)) { - return m_Begin; } - IteratorT end() const + template + iterator_range(const SinglePassRange& r, + iterator_range_detail::const_range_tag) + : base_type(impl::adl_begin(r), impl::adl_end(r)) { - return m_End; } - difference_type size() const + template + iterator_range(SinglePassRange& r, + iterator_range_detail::range_tag) + : base_type(impl::adl_begin(r), impl::adl_end(r)) { - return m_End - m_Begin; } - bool empty() const + template + iterator_range& operator=(const iterator_range& other) { - return m_Begin == m_End; + this->assign(other.begin(), other.end()); + return *this; } - operator unspecified_bool_type() const + template + iterator_range& operator=(iterator_range& other) { - return safe_bool_t::to_unspecified_bool(m_Begin != m_End, &iterator_range::m_Begin); + this->assign(other.begin(), other.end()); + return *this; } - bool operator!() const + template + iterator_range& operator=(SinglePassRange& r) { - return empty(); + this->assign(r); + return *this; } - bool equal( const iterator_range& r ) const + template + iterator_range& operator=(const SinglePassRange& r) { - return m_Begin == r.m_Begin && m_End == r.m_End; + this->assign(r); + return *this; } - -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - bool operator==( const iterator_range& r ) const + iterator_range& advance_begin( + BOOST_DEDUCED_TYPENAME base_type::difference_type n) { - return boost::equal( *this, r ); + std::advance(this->m_Begin, n); + return *this; } - bool operator!=( const iterator_range& r ) const + iterator_range& advance_end( + BOOST_DEDUCED_TYPENAME base_type::difference_type n) { - return !operator==(r); + std::advance(this->m_End, n); + return *this; } - bool operator<( const iterator_range& r ) const - { - return iterator_range_detail::less_than( *this, r ); - } - - bool operator>( const iterator_range& r ) const - { - return iterator_range_detail::greater_than( *this, r ); - } - - bool operator<=( const iterator_range& r ) const - { - return iterator_range_detail::less_or_equal_than( *this, r ); - } - - bool operator>=( const iterator_range& r ) const - { - return iterator_range_detail::greater_or_equal_than( *this, r ); - } - -#endif - - public: // convenience - reference front() const - { - BOOST_ASSERT( !empty() ); - return *m_Begin; - } - - reference back() const - { - BOOST_ASSERT( !empty() ); - IteratorT last( m_End ); - return *--last; - } - - // pop_front() - added to model the SinglePassRangePrimitiveConcept - void pop_front() - { - BOOST_ASSERT( !empty() ); - ++m_Begin; - } - - // pop_back() - added to model the BidirectionalRangePrimitiveConcept - void pop_back() - { - BOOST_ASSERT( !empty() ); - --m_End; - } - - reference operator[]( difference_type at ) const - { - BOOST_ASSERT( at >= 0 && at < size() ); - return m_Begin[at]; - } - - // - // When storing transform iterators, operator[]() - // fails because it returns by reference. Therefore - // operator()() is provided for these cases. - // - abstract_value_type operator()( difference_type at ) const - { - BOOST_ASSERT( at >= 0 && at < size() ); - return m_Begin[at]; - } - - iterator_range& advance_begin( difference_type n ) - { - std::advance( m_Begin, n ); - return *this; - } - - iterator_range& advance_end( difference_type n ) - { - std::advance( m_End, n ); - return *this; - } - - private: - // begin and end iterators - IteratorT m_Begin; - IteratorT m_End; - protected: // // Allow subclasses an easy way to access the @@ -387,43 +577,61 @@ namespace boost ///////////////////////////////////////////////////////////////////// template< class IteratorT, class ForwardRange > - inline bool operator==( const ForwardRange& l, - const iterator_range& r ) + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator==( const ForwardRange& l, const iterator_range& r ) { return boost::equal( l, r ); } template< class IteratorT, class ForwardRange > - inline bool operator!=( const ForwardRange& l, - const iterator_range& r ) + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator!=( const ForwardRange& l, const iterator_range& r ) { return !boost::equal( l, r ); } template< class IteratorT, class ForwardRange > - inline bool operator<( const ForwardRange& l, - const iterator_range& r ) + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator<( const ForwardRange& l, const iterator_range& r ) { return iterator_range_detail::less_than( l, r ); } template< class IteratorT, class ForwardRange > - inline bool operator<=( const ForwardRange& l, - const iterator_range& r ) + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator<=( const ForwardRange& l, const iterator_range& r ) { return iterator_range_detail::less_or_equal_than( l, r ); } template< class IteratorT, class ForwardRange > - inline bool operator>( const ForwardRange& l, - const iterator_range& r ) + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator>( const ForwardRange& l, const iterator_range& r ) { return iterator_range_detail::greater_than( l, r ); } template< class IteratorT, class ForwardRange > - inline bool operator>=( const ForwardRange& l, - const iterator_range& r ) + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator>=( const ForwardRange& l, const iterator_range& r ) { return iterator_range_detail::greater_or_equal_than( l, r ); } @@ -431,87 +639,105 @@ namespace boost #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING #else template< class Iterator1T, class Iterator2T > - inline bool operator==( const iterator_range& l, - const iterator_range& r ) + inline bool + operator==( const iterator_range& l, const iterator_range& r ) { return boost::equal( l, r ); } template< class IteratorT, class ForwardRange > - inline bool operator==( const iterator_range& l, - const ForwardRange& r ) + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator==( const iterator_range& l, const ForwardRange& r ) { return boost::equal( l, r ); } template< class Iterator1T, class Iterator2T > - inline bool operator!=( const iterator_range& l, - const iterator_range& r ) + inline bool + operator!=( const iterator_range& l, const iterator_range& r ) { return !boost::equal( l, r ); } template< class IteratorT, class ForwardRange > - inline bool operator!=( const iterator_range& l, - const ForwardRange& r ) + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator!=( const iterator_range& l, const ForwardRange& r ) { return !boost::equal( l, r ); } template< class Iterator1T, class Iterator2T > - inline bool operator<( const iterator_range& l, - const iterator_range& r ) + inline bool + operator<( const iterator_range& l, const iterator_range& r ) { return iterator_range_detail::less_than( l, r ); } template< class IteratorT, class ForwardRange > - inline bool operator<( const iterator_range& l, - const ForwardRange& r ) + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator<( const iterator_range& l, const ForwardRange& r ) { return iterator_range_detail::less_than( l, r ); } template< class Iterator1T, class Iterator2T > - inline bool operator<=( const iterator_range& l, - const iterator_range& r ) + inline bool + operator<=( const iterator_range& l, const iterator_range& r ) { return iterator_range_detail::less_or_equal_than( l, r ); } template< class IteratorT, class ForwardRange > - inline bool operator<=( const iterator_range& l, - const ForwardRange& r ) + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator<=( const iterator_range& l, const ForwardRange& r ) { return iterator_range_detail::less_or_equal_than( l, r ); } template< class Iterator1T, class Iterator2T > - inline bool operator>( const iterator_range& l, - const iterator_range& r ) + inline bool + operator>( const iterator_range& l, const iterator_range& r ) { return iterator_range_detail::greater_than( l, r ); } template< class IteratorT, class ForwardRange > - inline bool operator>( const iterator_range& l, - const ForwardRange& r ) + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator>( const iterator_range& l, const ForwardRange& r ) { return iterator_range_detail::greater_than( l, r ); } template< class Iterator1T, class Iterator2T > - inline bool operator>=( const iterator_range& l, - const iterator_range& r ) + inline bool + operator>=( const iterator_range& l, const iterator_range& r ) { return iterator_range_detail::greater_or_equal_than( l, r ); } template< class IteratorT, class ForwardRange > - inline bool operator>=( const iterator_range& l, - const ForwardRange& r ) + inline BOOST_DEDUCED_TYPENAME boost::enable_if< + mpl::not_ >, + bool + >::type + operator>=( const iterator_range& l, const ForwardRange& r ) { return iterator_range_detail::greater_or_equal_than( l, r ); } @@ -535,6 +761,13 @@ namespace boost return iterator_range( Begin, End ); } + template + inline iterator_range + make_iterator_range_n(IteratorT first, IntegerT n) + { + return iterator_range(first, boost::next(first, n)); + } + #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template< typename Range > @@ -601,7 +834,6 @@ namespace boost BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) { - //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" ); return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); } @@ -613,7 +845,6 @@ namespace boost BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) { - //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" ); return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); } @@ -623,7 +854,6 @@ namespace boost BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) { - //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" ); return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); } diff --git a/boost/boost/range/mutable_iterator.hpp b/boost/boost/range/mutable_iterator.hpp index 7beca66a29..b924666679 100644 --- a/boost/boost/range/mutable_iterator.hpp +++ b/boost/boost/range/mutable_iterator.hpp @@ -11,57 +11,69 @@ #ifndef BOOST_RANGE_MUTABLE_ITERATOR_HPP #define BOOST_RANGE_MUTABLE_ITERATOR_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif #include -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#include -#else - +#include #include +#include #include #include #include namespace boost { + ////////////////////////////////////////////////////////////////////////// // default ////////////////////////////////////////////////////////////////////////// - namespace range_detail { - BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( iterator ) - } + namespace range_detail + { - template< typename C > - struct range_mutable_iterator : range_detail::extract_iterator - {}; - - ////////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////////// +BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( iterator ) - template< typename Iterator > - struct range_mutable_iterator< std::pair > - { - typedef Iterator type; - }; +template< typename C > +struct range_mutable_iterator + : range_detail::extract_iterator< + BOOST_DEDUCED_TYPENAME remove_reference::type> +{}; - ////////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// +// pair +////////////////////////////////////////////////////////////////////////// - template< typename T, std::size_t sz > - struct range_mutable_iterator< T[sz] > - { - typedef T* type; - }; +template< typename Iterator > +struct range_mutable_iterator< std::pair > +{ + typedef Iterator type; +}; + +////////////////////////////////////////////////////////////////////////// +// array +////////////////////////////////////////////////////////////////////////// + +template< typename T, std::size_t sz > +struct range_mutable_iterator< T[sz] > +{ + typedef T* type; +}; + + } // namespace range_detail + +template +struct range_mutable_iterator + : range_detail::range_mutable_iterator< + BOOST_DEDUCED_TYPENAME remove_reference::type + > +{ +}; } // namespace boost -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#include #endif diff --git a/boost/boost/range/range_fwd.hpp b/boost/boost/range/range_fwd.hpp new file mode 100644 index 0000000000..0e6e00f553 --- /dev/null +++ b/boost/boost/range/range_fwd.hpp @@ -0,0 +1,63 @@ +// Boost.Range library +// +// Copyright Neil Groves 2003-2004. +// 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) +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_RANGE_FWD_HPP_INCLUDED +#define BOOST_RANGE_RANGE_FWD_HPP_INCLUDED + +namespace boost +{ + +// Extension points + template + struct range_iterator; + + template + struct range_mutable_iterator; + + template + struct range_const_iterator; + +// Core classes + template + class iterator_range; + + template + class sub_range; + +// Meta-functions + template + struct range_category; + + template + struct range_difference; + + template + struct range_pointer; + + template + struct range_reference; + + template + struct range_reverse_iterator; + + template + struct range_size; + + template + struct range_value; + + template + struct has_range_iterator; + + template + struct has_range_const_iterator; + +} // namespace boost + +#endif // include guard diff --git a/boost/boost/range/rbegin.hpp b/boost/boost/range/rbegin.hpp index 78e5f61ab7..6d66de94b9 100644 --- a/boost/boost/range/rbegin.hpp +++ b/boost/boost/range/rbegin.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_RANGE_RBEGIN_HPP #define BOOST_RANGE_RBEGIN_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif diff --git a/boost/boost/range/rend.hpp b/boost/boost/range/rend.hpp index fd79aa22c3..ef7040780c 100644 --- a/boost/boost/range/rend.hpp +++ b/boost/boost/range/rend.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_RANGE_REND_HPP #define BOOST_RANGE_REND_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif diff --git a/boost/boost/range/result_iterator.hpp b/boost/boost/range/result_iterator.hpp deleted file mode 100644 index ba09c5fed4..0000000000 --- a/boost/boost/range/result_iterator.hpp +++ /dev/null @@ -1,33 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2004. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_RESULT_ITERATOR_HPP -#define BOOST_RANGE_RESULT_ITERATOR_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -#include - -namespace boost -{ - // - // This interface is deprecated, use range_iterator - // - - template< typename C > - struct range_result_iterator : range_iterator - { }; - -} // namespace boost - - -#endif diff --git a/boost/boost/range/reverse_iterator.hpp b/boost/boost/range/reverse_iterator.hpp index f8e922175a..0aa0130af6 100644 --- a/boost/boost/range/reverse_iterator.hpp +++ b/boost/boost/range/reverse_iterator.hpp @@ -11,12 +11,13 @@ #ifndef BOOST_RANGE_REVERSE_ITERATOR_HPP #define BOOST_RANGE_REVERSE_ITERATOR_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif #include #include +#include #include @@ -26,11 +27,12 @@ namespace boost // default ////////////////////////////////////////////////////////////////////////// - template< typename C > + template< typename T > struct range_reverse_iterator { typedef reverse_iterator< - BOOST_DEDUCED_TYPENAME range_iterator::type > type; + BOOST_DEDUCED_TYPENAME range_iterator< + BOOST_DEDUCED_TYPENAME remove_reference::type>::type > type; }; diff --git a/boost/boost/range/size.hpp b/boost/boost/range/size.hpp index 6ae74d1176..d007bfca44 100644 --- a/boost/boost/range/size.hpp +++ b/boost/boost/range/size.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_RANGE_SIZE_HPP #define BOOST_RANGE_SIZE_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif @@ -19,24 +19,39 @@ #include #include #include +#include #include +#include +#include namespace boost { namespace range_detail { + + template + inline typename ::boost::enable_if< + has_member_size, + typename range_size::type + >::type + range_calculate_size(const SinglePassRange& rng) + { + return rng.size(); + } + template - inline BOOST_DEDUCED_TYPENAME range_size::type + inline typename disable_if< + has_member_size, + typename range_size::type + >::type range_calculate_size(const SinglePassRange& rng) { - BOOST_ASSERT( (boost::end(rng) - boost::begin(rng)) >= 0 && - "reachability invariant broken!" ); - return boost::end(rng) - boost::begin(rng); + return std::distance(boost::begin(rng), boost::end(rng)); } } template - inline BOOST_DEDUCED_TYPENAME range_size::type + inline typename range_size::type size(const SinglePassRange& rng) { #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ diff --git a/boost/boost/range/size_type.hpp b/boost/boost/range/size_type.hpp index c6fb54bb15..db5a59b5ee 100644 --- a/boost/boost/range/size_type.hpp +++ b/boost/boost/range/size_type.hpp @@ -11,15 +11,13 @@ #ifndef BOOST_RANGE_SIZE_TYPE_HPP #define BOOST_RANGE_SIZE_TYPE_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif #include #include -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#include -#else +#include #include #include @@ -45,8 +43,8 @@ namespace boost template static yes_type test(BOOST_DEDUCED_TYPENAME C::size_type x); - template - static no_type test(Arg x); + template + static no_type test(...); public: static const bool value = sizeof(test(0)) == sizeof(yes_type); @@ -63,7 +61,7 @@ namespace boost template struct range_size< C, - BOOST_DEDUCED_TYPENAME enable_if, void>::type + BOOST_DEDUCED_TYPENAME ::boost::enable_if, void>::type > { typedef BOOST_DEDUCED_TYPENAME C::size_type type; @@ -74,16 +72,27 @@ namespace boost template< class T > struct range_size : detail::range_size - { }; + { +// Very strange things happen on some compilers that have the range concept +// asserts disabled. This preprocessor condition is clearly redundant on a +// working compiler but is vital for at least some compilers such as clang 4.2 +// but only on the Mac! +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT == 1 + BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept)); +#endif + }; template< class T > struct range_size : detail::range_size - { }; + { +#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT == 1 + BOOST_RANGE_CONCEPT_ASSERT((boost::SinglePassRangeConcept)); +#endif + }; } // namespace boost -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif diff --git a/boost/boost/range/value_type.hpp b/boost/boost/range/value_type.hpp index 95c7580885..5a3187ec0e 100644 --- a/boost/boost/range/value_type.hpp +++ b/boost/boost/range/value_type.hpp @@ -11,17 +11,13 @@ #ifndef BOOST_RANGE_VALUE_TYPE_HPP #define BOOST_RANGE_VALUE_TYPE_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif #include #include -//#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -//#include -//#else - #include namespace boost diff --git a/boost/boost/ref.hpp b/boost/boost/ref.hpp index 6058d69831..17b56ec007 100644 --- a/boost/boost/ref.hpp +++ b/boost/boost/ref.hpp @@ -1,189 +1,17 @@ -#ifndef BOOST_REF_HPP_INCLUDED -#define BOOST_REF_HPP_INCLUDED +/* + * Copyright (c) 2014 Glen Fernandes + * + * 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) + */ -// MS compatible compilers support #pragma once +#ifndef BOOST_REF_HPP +#define BOOST_REF_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -#include -#include -#include -#include - -// -// ref.hpp - ref/cref, useful helper functions -// -// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) -// Copyright (C) 2001, 2002 Peter Dimov -// Copyright (C) 2002 David Abrahams -// -// 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 http://www.boost.org/libs/bind/ref.html for documentation. -// - -namespace boost -{ - -template class reference_wrapper -{ -public: - typedef T type; +// The header file at this path is deprecated; +// use boost/core/ref.hpp instead. -#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1300 ) - - explicit reference_wrapper(T& t): t_(&t) {} - -#else - - explicit reference_wrapper(T& t): t_(boost::addressof(t)) {} +#include #endif - - operator T& () const { return *t_; } - - T& get() const { return *t_; } - - T* get_pointer() const { return t_; } - -private: - - T* t_; -}; - -# if defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) -# define BOOST_REF_CONST -# else -# define BOOST_REF_CONST const -# endif - -template inline reference_wrapper BOOST_REF_CONST ref(T & t) -{ - return reference_wrapper(t); -} - -template inline reference_wrapper BOOST_REF_CONST cref(T const & t) -{ - return reference_wrapper(t); -} - -# undef BOOST_REF_CONST - -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -template -class is_reference_wrapper - : public mpl::false_ -{ -}; - -template -class unwrap_reference -{ - public: - typedef T type; -}; - -# define AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF(X) \ -template \ -class is_reference_wrapper< X > \ - : public mpl::true_ \ -{ \ -}; \ -\ -template \ -class unwrap_reference< X > \ -{ \ - public: \ - typedef T type; \ -}; \ -/**/ - -AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF(reference_wrapper) -#if !defined(BOOST_NO_CV_SPECIALIZATIONS) -AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF(reference_wrapper const) -AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF(reference_wrapper volatile) -AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF(reference_wrapper const volatile) -#endif - -# undef AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF - -# else // no partial specialization - -} // namespace boost - -#include - -namespace boost -{ - -namespace detail -{ - typedef char (&yes_reference_wrapper_t)[1]; - typedef char (&no_reference_wrapper_t)[2]; - - no_reference_wrapper_t is_reference_wrapper_test(...); - - template - yes_reference_wrapper_t is_reference_wrapper_test(type< reference_wrapper >); - - template - struct reference_unwrapper - { - template - struct apply - { - typedef T type; - }; - }; - - template<> - struct reference_unwrapper - { - template - struct apply - { - typedef typename T::type type; - }; - }; -} - -template -class is_reference_wrapper -{ - public: - BOOST_STATIC_CONSTANT( - bool, value = ( - sizeof(detail::is_reference_wrapper_test(type())) - == sizeof(detail::yes_reference_wrapper_t))); - - typedef ::boost::mpl::bool_ type; -}; - -template -class unwrap_reference - : public detail::reference_unwrapper< - is_reference_wrapper::value - >::template apply -{}; - -# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -template inline typename unwrap_reference::type& -unwrap_ref(T& t) -{ - return t; -} - -template inline T* get_pointer( reference_wrapper const & r ) -{ - return r.get_pointer(); -} - -} // namespace boost - -#endif // #ifndef BOOST_REF_HPP_INCLUDED diff --git a/boost/boost/regex/config.hpp b/boost/boost/regex/config.hpp index e8cec5b7fa..7e6cc51969 100644 --- a/boost/boost/regex/config.hpp +++ b/boost/boost/regex/config.hpp @@ -224,7 +224,7 @@ * ****************************************************************************/ -#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1200) && defined(_MSC_EXTENSIONS) +#if defined(BOOST_MSVC) && defined(_MSC_EXTENSIONS) #if defined(_DEBUG) || defined(__MSVC_RUNTIME_CHECKS) || defined(_MANAGED) || defined(BOOST_REGEX_NO_FASTCALL) # define BOOST_REGEX_CALL __cdecl #else diff --git a/boost/boost/regex/icu.hpp b/boost/boost/regex/icu.hpp index a8c52814de..572172e542 100644 --- a/boost/boost/regex/icu.hpp +++ b/boost/boost/regex/icu.hpp @@ -397,10 +397,10 @@ void copy_results(MR1& out, MR2 const& in) out.set_base(in.base().base()); for(int i = 0; i < (int)in.size(); ++i) { - if(in[i].matched) + if(in[i].matched || !i) { out.set_first(in[i].first.base(), i); - out.set_second(in[i].second.base(), i); + out.set_second(in[i].second.base(), i, in[i].matched); } } } @@ -887,9 +887,6 @@ inline OutputIterator u32regex_replace(OutputIterator out, match_flag_type flags = match_default) { return re_detail::extract_output_base -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - -#endif ( re_detail::do_regex_replace( re_detail::make_utf32_out(out, static_cast const*>(0)), @@ -909,9 +906,6 @@ inline OutputIterator u32regex_replace(OutputIterator out, match_flag_type flags = match_default) { return re_detail::extract_output_base -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - -#endif ( re_detail::do_regex_replace( re_detail::make_utf32_out(out, static_cast const*>(0)), @@ -931,9 +925,6 @@ inline OutputIterator u32regex_replace(OutputIterator out, match_flag_type flags = match_default) { return re_detail::extract_output_base -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - -#endif ( re_detail::do_regex_replace( re_detail::make_utf32_out(out, static_cast const*>(0)), diff --git a/boost/boost/regex/pending/static_mutex.hpp b/boost/boost/regex/pending/static_mutex.hpp index 5459ef8698..344926f6ab 100644 --- a/boost/boost/regex/pending/static_mutex.hpp +++ b/boost/boost/regex/pending/static_mutex.hpp @@ -125,12 +125,15 @@ private: // Since this preprocessor path is almost never taken, we hide these header // dependencies so that build tools don't find them. // -#define B1 -#define B2 -#include B1 -#include B2 -#undef B1 -#undef B2 +#define BOOST_REGEX_H1 +#define BOOST_REGEX_H2 +#define BOOST_REGEX_H3 +#include BOOST_REGEX_H1 +#include BOOST_REGEX_H2 +#include BOOST_REGEX_H3 +#undef BOOST_REGEX_H1 +#undef BOOST_REGEX_H2 +#undef BOOST_REGEX_H3 namespace boost{ @@ -158,7 +161,7 @@ public: void lock(); void unlock(); private: - boost::recursive_mutex::scoped_lock* m_plock; + boost::unique_lock* m_plock; bool m_have_lock; }; diff --git a/boost/boost/regex/pending/unicode_iterator.hpp b/boost/boost/regex/pending/unicode_iterator.hpp index 3a7b68fbe7..b84cfa0769 100644 --- a/boost/boost/regex/pending/unicode_iterator.hpp +++ b/boost/boost/regex/pending/unicode_iterator.hpp @@ -141,7 +141,7 @@ class u32_to_u16_iterator { typedef boost::iterator_facade, U16Type, std::bidirectional_iterator_tag, const U16Type> base_type; -#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef typename std::iterator_traits::value_type base_value_type; BOOST_STATIC_ASSERT(sizeof(base_value_type)*CHAR_BIT == 32); @@ -256,7 +256,7 @@ class u16_to_u32_iterator // special values for pending iterator reads: BOOST_STATIC_CONSTANT(U32Type, pending_read = 0xffffffffu); -#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef typename std::iterator_traits::value_type base_value_type; BOOST_STATIC_ASSERT(sizeof(base_value_type)*CHAR_BIT == 16); @@ -371,7 +371,7 @@ class u32_to_u8_iterator { typedef boost::iterator_facade, U8Type, std::bidirectional_iterator_tag, const U8Type> base_type; -#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef typename std::iterator_traits::value_type base_value_type; BOOST_STATIC_ASSERT(sizeof(base_value_type)*CHAR_BIT == 32); @@ -499,7 +499,7 @@ class u8_to_u32_iterator // special values for pending iterator reads: BOOST_STATIC_CONSTANT(U32Type, pending_read = 0xffffffffu); -#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef typename std::iterator_traits::value_type base_value_type; BOOST_STATIC_ASSERT(sizeof(base_value_type)*CHAR_BIT == 8); @@ -629,9 +629,15 @@ private: 0x1FFFFFu, }; m_value &= masks[extra]; - // check the result: + // check the result is in range: if(m_value > static_cast(0x10FFFFu)) invalid_sequence(); + // The result must not be a surrogate: + if((m_value >= static_cast(0xD800)) && (m_value <= static_cast(0xDFFF))) + invalid_sequence(); + // We should not have had an invalidly encoded UTF8 sequence: + if((extra > 0) && (m_value <= static_cast(masks[extra - 1]))) + invalid_sequence(); } BaseIterator m_position; mutable U32Type m_value; diff --git a/boost/boost/regex/v4/basic_regex.hpp b/boost/boost/regex/v4/basic_regex.hpp index 0b63e3aa37..ae86152286 100644 --- a/boost/boost/regex/v4/basic_regex.hpp +++ b/boost/boost/regex/v4/basic_regex.hpp @@ -236,9 +236,7 @@ public: } std::pair BOOST_REGEX_CALL subexpression(std::size_t n)const { - if(n == 0) - boost::throw_exception(std::out_of_range("0 is not a valid subexpression index.")); - const std::pair& pi = this->m_subs.at(n - 1); + const std::pair& pi = this->m_subs.at(n); std::pair p(expression() + pi.first, expression() + pi.second); return p; } @@ -266,7 +264,7 @@ public: } size_type BOOST_REGEX_CALL mark_count()const { - return this->m_mark_count; + return this->m_mark_count - 1; } const re_detail::re_syntax_base* get_first_state()const { diff --git a/boost/boost/regex/v4/basic_regex_creator.hpp b/boost/boost/regex/v4/basic_regex_creator.hpp index c99d320de4..821fb8298c 100644 --- a/boost/boost/regex/v4/basic_regex_creator.hpp +++ b/boost/boost/regex/v4/basic_regex_creator.hpp @@ -47,9 +47,7 @@ struct digraph : public std::pair digraph(charT c1) : std::pair(c1, 0){} digraph(charT c1, charT c2) : std::pair(c1, c2) {} -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) digraph(const digraph& d) : std::pair(d.first, d.second){} -#endif template digraph(const Seq& s) : std::pair() { @@ -346,7 +344,7 @@ re_literal* basic_regex_creator::append_literal(charT c) m_last_state = result = static_cast(getaddress(off)); charT* characters = static_cast(static_cast(result+1)); characters[result->length] = m_traits.translate(c, m_icase); - ++(result->length); + result->length += 1; } return result; } @@ -433,20 +431,10 @@ re_syntax_base* basic_regex_creator::append_set( if(flags() & regex_constants::collate) { // we need to transform our range into sort keys: -#if BOOST_WORKAROUND(__GNUC__, < 3) - string_type in(3, charT(0)); - in[0] = c1.first; - in[1] = c1.second; - s1 = this->m_traits.transform(in.c_str(), (in[1] ? in.c_str()+2 : in.c_str()+1)); - in[0] = c2.first; - in[1] = c2.second; - s2 = this->m_traits.transform(in.c_str(), (in[1] ? in.c_str()+2 : in.c_str()+1)); -#else charT a1[3] = { c1.first, c1.second, charT(0), }; charT a2[3] = { c2.first, c2.second, charT(0), }; s1 = this->m_traits.transform(a1, (a1[1] ? a1+2 : a1+1)); s2 = this->m_traits.transform(a2, (a2[1] ? a2+2 : a2+1)); -#endif if(s1.size() == 0) s1 = string_type(1, charT(0)); if(s2.size() == 0) @@ -491,15 +479,8 @@ re_syntax_base* basic_regex_creator::append_set( string_type s; if(first->second) { -#if BOOST_WORKAROUND(__GNUC__, < 3) - string_type in(3, charT(0)); - in[0] = first->first; - in[1] = first->second; - s = m_traits.transform_primary(in.c_str(), in.c_str()+2); -#else charT cs[3] = { first->first, first->second, charT(0), }; s = m_traits.transform_primary(cs, cs+2); -#endif } else s = m_traits.transform_primary(&first->first, &first->first+1); diff --git a/boost/boost/regex/v4/basic_regex_parser.hpp b/boost/boost/regex/v4/basic_regex_parser.hpp index 4b103f2257..3c331a57c4 100644 --- a/boost/boost/regex/v4/basic_regex_parser.hpp +++ b/boost/boost/regex/v4/basic_regex_parser.hpp @@ -346,8 +346,13 @@ bool basic_regex_parser::parse_extended() ++m_position; return parse_repeat_range(false); case regex_constants::syntax_close_brace: - fail(regex_constants::error_brace, this->m_position - this->m_base, "Found a closing repetition operator } with no corresponding {."); - return false; + if((this->flags() & regbase::no_perl_ex) == regbase::no_perl_ex) + { + fail(regex_constants::error_brace, this->m_position - this->m_base, "Found a closing repetition operator } with no corresponding {."); + return false; + } + result = parse_literal(); + break; case regex_constants::syntax_or: return parse_alt(); case regex_constants::syntax_open_set: @@ -971,7 +976,7 @@ bool basic_regex_parser::parse_repeat(std::size_t low, std::size_ // the last state was a literal with more than one character, split it in two: re_literal* lit = static_cast(this->m_last_state); charT c = (static_cast(static_cast(lit+1)))[lit->length - 1]; - --(lit->length); + lit->length -= 1; // now append new state: lit = static_cast(this->append_state(syntax_element_literal, sizeof(re_literal) + sizeof(charT))); lit->length = 1; @@ -1215,7 +1220,7 @@ bool basic_regex_parser::parse_alt() ) ) { - fail(regex_constants::error_empty, this->m_position - this->m_base, "A regular expression can start with the alternation operator |."); + fail(regex_constants::error_empty, this->m_position - this->m_base, "A regular expression cannot start with the alternation operator |."); return false; } // diff --git a/boost/boost/regex/v4/cpp_regex_traits.hpp b/boost/boost/regex/v4/cpp_regex_traits.hpp index d60942f09b..106ffcbfc2 100644 --- a/boost/boost/regex/v4/cpp_regex_traits.hpp +++ b/boost/boost/regex/v4/cpp_regex_traits.hpp @@ -21,6 +21,7 @@ #include #include +#include #ifndef BOOST_NO_STD_LOCALE @@ -507,8 +508,18 @@ typename cpp_regex_traits_implementation::string_type // we adhere to gcc's (buggy) preconditions... // BOOST_ASSERT(*p2 == 0); - string_type result; +#if defined(_CPPLIB_VER) + // + // A bug in VC11 and 12 causes the program to hang if we pass a null-string + // to std::collate::transform, but only for certain locales :-( + // Probably effects Intel and Clang or any compiler using the VC std library (Dinkumware). + // + if(*p1 == 0) + { + return string_type(1, charT(0)); + } +#endif // // swallowing all exceptions here is a bad idea // however at least one std lib will always throw @@ -582,7 +593,18 @@ typename cpp_regex_traits_implementation::string_type // however at least one std lib will always throw // std::bad_alloc for certain arguments... // - string_type result; + string_type result, result2; +#if defined(_CPPLIB_VER) + // + // A bug in VC11 and 12 causes the program to hang if we pass a null-string + // to std::collate::transform, but only for certain locales :-( + // Probably effects Intel and Clang or any compiler using the VC std library (Dinkumware). + // + if(*p1 == 0) + { + return result; + } +#endif #ifndef BOOST_NO_EXCEPTIONS try{ #endif @@ -601,14 +623,36 @@ typename cpp_regex_traits_implementation::string_type while(result.size() && (charT(0) == *result.rbegin())) result.erase(result.size() - 1); #endif - BOOST_ASSERT(std::find(result.begin(), result.end(), charT(0)) == result.end()); + // + // We may have NULL's used as separators between sections of the collate string, + // an example would be Boost.Locale. We have no way to detect this case via + // #defines since this can be used with any compiler/platform combination. + // Unfortunately our state machine (which was devised when all implementations + // used underlying C language API's) can't cope with that case. One workaround + // is to replace each character with 2, fortunately this code isn't used that + // much as this is now slower than before :-( + // + typedef typename make_unsigned::type uchar_type; + result2.reserve(result.size() * 2 + 2); + for(unsigned i = 0; i < result.size(); ++i) + { + if(static_cast(result[i]) == (std::numeric_limits::max)()) + { + result2.append(1, charT((std::numeric_limits::max)())).append(1, charT('b')); + } + else + { + result2.append(1, static_cast(1 + static_cast(result[i]))).append(1, charT('b') - 1); + } + } + BOOST_ASSERT(std::find(result2.begin(), result2.end(), charT(0)) == result2.end()); #ifndef BOOST_NO_EXCEPTIONS } catch(...) { } #endif - return result; + return result2; } @@ -624,7 +668,6 @@ typename cpp_regex_traits_implementation::string_type return pos->second; } #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ - && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551) std::string name(p1, p2); #else @@ -635,7 +678,6 @@ typename cpp_regex_traits_implementation::string_type #endif name = lookup_default_collate_name(name); #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ - && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551) if(name.size()) return string_type(name.begin(), name.end()); @@ -857,7 +899,7 @@ bool cpp_regex_traits_implementation::isctype(const charT c, char_class_t template -inline boost::shared_ptr > create_cpp_regex_traits(const std::locale& l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) +inline boost::shared_ptr > create_cpp_regex_traits(const std::locale& l) { cpp_regex_traits_base key(l); return ::boost::object_cache, cpp_regex_traits_implementation >::get(key, 5); diff --git a/boost/boost/regex/v4/instances.hpp b/boost/boost/regex/v4/instances.hpp index 6807b2f06c..6fa811d232 100644 --- a/boost/boost/regex/v4/instances.hpp +++ b/boost/boost/regex/v4/instances.hpp @@ -92,9 +92,7 @@ template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher; -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) template class BOOST_REGEX_TEMPLATE_DECL match_results< const BOOST_REGEX_CHAR_T* >; -#endif #ifndef BOOST_NO_STD_ALLOCATOR template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher::allocator_type BOOST_REGEX_TRAITS_T >; #endif @@ -102,9 +100,7 @@ template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher::const_iterator >; -#endif #ifndef BOOST_NO_STD_ALLOCATOR template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher< std::basic_string::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >; #endif diff --git a/boost/boost/regex/v4/iterator_traits.hpp b/boost/boost/regex/v4/iterator_traits.hpp index f7afacb17b..53e1376041 100644 --- a/boost/boost/regex/v4/iterator_traits.hpp +++ b/boost/boost/regex/v4/iterator_traits.hpp @@ -33,7 +33,7 @@ namespace boost{ namespace re_detail{ -#if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if defined(BOOST_NO_STD_ITERATOR_TRAITS) template struct regex_iterator_traits diff --git a/boost/boost/regex/v4/match_flags.hpp b/boost/boost/regex/v4/match_flags.hpp index 26bde9a51b..e21de6cf6a 100644 --- a/boost/boost/regex/v4/match_flags.hpp +++ b/boost/boost/regex/v4/match_flags.hpp @@ -71,7 +71,7 @@ typedef enum _match_flags } match_flags; -#if (defined(_MSC_VER) && (_MSC_VER < 1300)) || defined(__BORLANDC__) +#if defined(__BORLANDC__) typedef unsigned long match_flag_type; #else typedef match_flags match_flag_type; diff --git a/boost/boost/regex/v4/match_results.hpp b/boost/boost/regex/v4/match_results.hpp index 63e5117592..3e79b7a766 100644 --- a/boost/boost/regex/v4/match_results.hpp +++ b/boost/boost/regex/v4/match_results.hpp @@ -76,10 +76,15 @@ public: // construct/copy/destroy: explicit match_results(const Allocator& a = Allocator()) #ifndef BOOST_NO_STD_ALLOCATOR - : m_subs(a), m_base(), m_last_closed_paren(0), m_is_singular(true) {} + : m_subs(a), m_base(), m_null(), m_last_closed_paren(0), m_is_singular(true) {} #else - : m_subs(), m_base(), m_last_closed_paren(0), m_is_singular(true) { (void)a; } + : m_subs(), m_base(), m_null(), m_last_closed_paren(0), m_is_singular(true) { (void)a; } #endif + // + // IMPORTANT: in the code below, the crazy looking checks around m_is_singular are + // all required because it is illegal to copy a singular iterator. + // See https://svn.boost.org/trac/boost/ticket/3632. + // match_results(const match_results& m) : m_subs(m.m_subs), m_named_subs(m.m_named_subs), m_last_closed_paren(m.m_last_closed_paren), m_is_singular(m.m_is_singular) { diff --git a/boost/boost/regex/v4/perl_matcher.hpp b/boost/boost/regex/v4/perl_matcher.hpp index ddaafbd7e4..b7b3b58e62 100644 --- a/boost/boost/regex/v4/perl_matcher.hpp +++ b/boost/boost/regex/v4/perl_matcher.hpp @@ -86,7 +86,6 @@ inline bool can_start(unsigned int c, const unsigned char* map, unsigned char ma // which succeeds when it should not. // #ifndef _RWSTD_VER -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) template inline int string_compare(const std::basic_string& s, const C* p) { @@ -97,9 +96,7 @@ inline int string_compare(const std::basic_string& s, const C* p) } return s.compare(p); } -#endif #else -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) template inline int string_compare(const std::basic_string& s, const C* p) { @@ -110,7 +107,6 @@ inline int string_compare(const std::basic_string& s, const C* p) } return s.compare(p); } -#endif inline int string_compare(const std::string& s, const char* p) { return std::strcmp(s.c_str(), p); } # ifndef BOOST_NO_WREGEX @@ -258,13 +254,8 @@ class repeater_count std::size_t count; // the number of iterations so far BidiIterator start_pos; // where the last repeat started public: - repeater_count(repeater_count** s) - { - stack = s; - next = 0; - state_id = -1; - count = 0; - } + repeater_count(repeater_count** s) : stack(s), next(0), state_id(-1), count(0), start_pos() {} + repeater_count(int i, repeater_count** s, BidiIterator start) : start_pos(start) { diff --git a/boost/boost/regex/v4/perl_matcher_common.hpp b/boost/boost/regex/v4/perl_matcher_common.hpp index 9a80e5038b..480d8f145d 100644 --- a/boost/boost/regex/v4/perl_matcher_common.hpp +++ b/boost/boost/regex/v4/perl_matcher_common.hpp @@ -200,7 +200,7 @@ bool perl_matcher::match_imp() search_base = base; state_count = 0; m_match_flags |= regex_constants::match_all; - m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), search_base, last); + m_presult->set_size((m_match_flags & match_nosubs) ? 1 : 1 + re.mark_count(), search_base, last); m_presult->set_base(base); m_presult->set_named_subs(this->re.get_named_subs()); if(m_match_flags & match_posix) @@ -262,7 +262,7 @@ bool perl_matcher::find_imp() // reset our state machine: search_base = position = base; pstate = re.get_first_state(); - m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), base, last); + m_presult->set_size((m_match_flags & match_nosubs) ? 1 : 1 + re.mark_count(), base, last); m_presult->set_base(base); m_presult->set_named_subs(this->re.get_named_subs()); m_match_flags |= regex_constants::match_init; @@ -281,13 +281,13 @@ bool perl_matcher::find_imp() ++position; } // reset $` start: - m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), search_base, last); + m_presult->set_size((m_match_flags & match_nosubs) ? 1 : 1 + re.mark_count(), search_base, last); //if((base != search_base) && (base == backstop)) // m_match_flags |= match_prev_avail; } if(m_match_flags & match_posix) { - m_result.set_size(re.mark_count(), base, last); + m_result.set_size(1 + re.mark_count(), base, last); m_result.set_base(base); } @@ -458,11 +458,7 @@ bool perl_matcher::match_word_boundary() if(position != last) { // prev and this character must be opposites: - #if defined(BOOST_REGEX_USE_C_LOCALE) && defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ < 95) - b = traits::isctype(*position, m_word_mask); - #else b = traits_inst.isctype(*position, m_word_mask); - #endif } else { diff --git a/boost/boost/regex/v4/regex_format.hpp b/boost/boost/regex/v4/regex_format.hpp index 80c654e40e..a34c40ad24 100644 --- a/boost/boost/regex/v4/regex_format.hpp +++ b/boost/boost/regex/v4/regex_format.hpp @@ -96,7 +96,7 @@ class basic_regex_formatter public: typedef typename traits::char_type char_type; basic_regex_formatter(OutputIterator o, const Results& r, const traits& t) - : m_traits(t), m_results(r), m_out(o), m_state(output_copy), m_restore_state(output_copy), m_have_conditional(false) {} + : m_traits(t), m_results(r), m_out(o), m_position(), m_end(), m_flags(), m_state(output_copy), m_restore_state(output_copy), m_have_conditional(false) {} OutputIterator format(ForwardIter p1, ForwardIter p2, match_flag_type f); OutputIterator format(ForwardIter p1, match_flag_type f) { diff --git a/boost/boost/regex/v4/regex_raw_buffer.hpp b/boost/boost/regex/v4/regex_raw_buffer.hpp index 52d45a250b..c7792e3d2e 100644 --- a/boost/boost/regex/v4/regex_raw_buffer.hpp +++ b/boost/boost/regex/v4/regex_raw_buffer.hpp @@ -129,7 +129,7 @@ public: { if(size_type(last - end) < n) resize(n + (end - start)); - register pointer result = end; + pointer result = end; end += n; return result; } diff --git a/boost/boost/regex/v4/regex_split.hpp b/boost/boost/regex/v4/regex_split.hpp index 534fb58e9a..c12d7baa24 100644 --- a/boost/boost/regex/v4/regex_split.hpp +++ b/boost/boost/regex/v4/regex_split.hpp @@ -119,7 +119,7 @@ std::size_t regex_split(OutputIterator out, // if there is still input left, do a final push as long as max_split // is not exhausted, and we're not splitting sub-expressions rather // than whitespace: - if(max_split && (last != s.end()) && (e.mark_count() == 1)) + if(max_split && (last != s.end()) && (e.mark_count() == 0)) { *out = std::basic_string((ci_t)last, (ci_t)s.end()); ++out; diff --git a/boost/boost/regex/v4/regex_token_iterator.hpp b/boost/boost/regex/v4/regex_token_iterator.hpp index 4e8bc36fef..dbb0803742 100644 --- a/boost/boost/regex/v4/regex_token_iterator.hpp +++ b/boost/boost/regex/v4/regex_token_iterator.hpp @@ -22,7 +22,6 @@ #include #include #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ - || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) // // Borland C++ Builder 6, and Visual C++ 6, @@ -45,10 +44,8 @@ namespace boost{ #endif #ifdef BOOST_MSVC #pragma warning(pop) -#endif -#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) -# pragma warning(push) -# pragma warning(disable:4700) +#pragma warning(push) +#pragma warning(disable:4700) #endif template = 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ - || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \ || BOOST_WORKAROUND(__HP_aCC, < 60700) template @@ -209,7 +205,6 @@ public: } #if !BOOST_WORKAROUND(__HP_aCC, < 60700) #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ - || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \ || BOOST_WORKAROUND(__HP_aCC, < 60700) template @@ -296,7 +291,6 @@ inline regex_token_iterator::const_ite { return regex_token_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m); } -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) template inline regex_token_iterator make_regex_token_iterator(const charT* p, const basic_regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) { @@ -307,7 +301,6 @@ inline regex_token_iterator::const_ite { return regex_token_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m); } -#endif template inline regex_token_iterator make_regex_token_iterator(const charT* p, const basic_regex& e, const std::vector& submatch, regex_constants::match_flag_type m = regex_constants::match_default) { @@ -319,10 +312,8 @@ inline regex_token_iterator::const_ite return regex_token_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m); } -#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) -# pragma warning(pop) -#endif #ifdef BOOST_MSVC +#pragma warning(pop) #pragma warning(push) #pragma warning(disable: 4103) #endif diff --git a/boost/boost/regex/v4/regex_traits.hpp b/boost/boost/regex/v4/regex_traits.hpp index f5f0402cab..8b1cb6ffe1 100644 --- a/boost/boost/regex/v4/regex_traits.hpp +++ b/boost/boost/regex/v4/regex_traits.hpp @@ -83,7 +83,7 @@ struct regex_traits : public implementationT // required "standard" ones: // namespace re_detail{ -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__HP_aCC, < 60000) +#if !BOOST_WORKAROUND(__HP_aCC, < 60000) BOOST_MPL_HAS_XXX_TRAIT_DEF(boost_extensions_tag) #else template @@ -136,7 +136,7 @@ struct compute_wrapper_base { typedef BaseT type; }; -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__HP_aCC, < 60000) +#if !BOOST_WORKAROUND(__HP_aCC, < 60000) template struct compute_wrapper_base { diff --git a/boost/boost/regex/v4/regex_workaround.hpp b/boost/boost/regex/v4/regex_workaround.hpp index 46a8a8d3af..fc57472a38 100644 --- a/boost/boost/regex/v4/regex_workaround.hpp +++ b/boost/boost/regex/v4/regex_workaround.hpp @@ -71,7 +71,7 @@ using std::distance; /***************************************************************************** * - * Fix broken broken namespace support: + * Fix broken namespace support: * ****************************************************************************/ diff --git a/boost/boost/regex/v4/sub_match.hpp b/boost/boost/regex/v4/sub_match.hpp index 34a868404d..7ce8d5397e 100644 --- a/boost/boost/regex/v4/sub_match.hpp +++ b/boost/boost/regex/v4/sub_match.hpp @@ -36,7 +36,7 @@ template struct sub_match : public std::pair { typedef typename re_detail::regex_iterator_traits::value_type value_type; -#if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef std::ptrdiff_t difference_type; #else typedef typename re_detail::regex_iterator_traits::difference_type difference_type; @@ -50,7 +50,6 @@ struct sub_match : public std::pair sub_match() : std::pair(), matched(false) {} sub_match(BidiIterator i) : std::pair(i, i), matched(false) {} #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ - && !BOOST_WORKAROUND(BOOST_MSVC, < 1310)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)\ && !BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) template diff --git a/boost/boost/regex/v4/u32regex_token_iterator.hpp b/boost/boost/regex/v4/u32regex_token_iterator.hpp index de1677164b..e8649f323d 100644 --- a/boost/boost/regex/v4/u32regex_token_iterator.hpp +++ b/boost/boost/regex/v4/u32regex_token_iterator.hpp @@ -20,7 +20,6 @@ #define BOOST_REGEX_V4_U32REGEX_TOKEN_ITERATOR_HPP #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ - || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) // // Borland C++ Builder 6, and Visual C++ 6, @@ -37,7 +36,7 @@ namespace boost{ #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif -#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) +#ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable:4700) #endif @@ -62,10 +61,7 @@ public: : end(last), re(*p), flags(f){ subs.push_back(sub); } u32regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector& v, match_flag_type f) : end(last), re(*p), flags(f), subs(v){} -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - // can't reliably get this to work.... -#elif (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ - || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ +#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \ || BOOST_WORKAROUND(__HP_aCC, < 60700) template @@ -195,10 +191,7 @@ public: if(!pdata->init(a)) pdata.reset(); } -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - // can't reliably get this to work.... -#elif (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ - || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ +#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \ || BOOST_WORKAROUND(__HP_aCC, < 60700) template @@ -299,7 +292,6 @@ inline u32regex_token_iterator make_u32regex_token_iterator(const return u32regex_token_iterator(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m); } -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) // construction from a reference to an array: template inline u32regex_token_iterator make_u32regex_token_iterator(const char* p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) @@ -331,7 +323,6 @@ inline u32regex_token_iterator make_u32regex_token_iterator(const { return u32regex_token_iterator(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m); } -#endif // BOOST_MSVC < 1300 // construction from a vector of sub_match state_id's: inline u32regex_token_iterator make_u32regex_token_iterator(const char* p, const u32regex& e, const std::vector& submatch, regex_constants::match_flag_type m = regex_constants::match_default) @@ -361,7 +352,7 @@ inline u32regex_token_iterator make_u32regex_token_iterator(const return u32regex_token_iterator(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m); } -#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) +#ifdef BOOST_MSVC # pragma warning(pop) #endif #ifdef BOOST_HAS_ABI_HEADERS diff --git a/boost/boost/regex/v4/w32_regex_traits.hpp b/boost/boost/regex/v4/w32_regex_traits.hpp index d55620726d..ef934b75cc 100644 --- a/boost/boost/regex/v4/w32_regex_traits.hpp +++ b/boost/boost/regex/v4/w32_regex_traits.hpp @@ -399,7 +399,6 @@ typename w32_regex_traits_implementation::string_type return pos->second; } #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ - && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551) std::string name(p1, p2); #else @@ -410,7 +409,6 @@ typename w32_regex_traits_implementation::string_type #endif name = lookup_default_collate_name(name); #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ - && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551) if(name.size()) return string_type(name.begin(), name.end()); @@ -552,7 +550,7 @@ typename w32_regex_traits_implementation::char_class_type template -boost::shared_ptr > create_w32_regex_traits(::boost::re_detail::lcid_type l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) +boost::shared_ptr > create_w32_regex_traits(::boost::re_detail::lcid_type l) { // TODO: create a cache for previously constructed objects. return boost::object_cache< ::boost::re_detail::lcid_type, w32_regex_traits_implementation >::get(l, 5); diff --git a/boost/boost/signals/detail/named_slot_map.hpp b/boost/boost/signals/detail/named_slot_map.hpp index 88625faea2..5851543ecb 100644 --- a/boost/boost/signals/detail/named_slot_map.hpp +++ b/boost/boost/signals/detail/named_slot_map.hpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -60,7 +59,7 @@ public: typedef const stored_group& first_argument_type; typedef const stored_group& second_argument_type; - group_bridge_compare(const Compare& c) : comp(c) + group_bridge_compare(const Compare& c) : comp(c) { } bool operator()(const stored_group& k1, const stored_group& k2) const @@ -93,15 +92,15 @@ class BOOST_SIGNALS_DECL named_slot_map_iterator : connection_slot_pair, forward_traversal_tag> inherited; public: - named_slot_map_iterator() : slot_assigned(false) + named_slot_map_iterator() : slot_assigned(false) { } - named_slot_map_iterator(const named_slot_map_iterator& other) + named_slot_map_iterator(const named_slot_map_iterator& other) : group(other.group), last_group(other.last_group), slot_assigned(other.slot_assigned) { if (slot_assigned) slot_ = other.slot_; } - named_slot_map_iterator& operator=(const named_slot_map_iterator& other) + named_slot_map_iterator& operator=(const named_slot_map_iterator& other) { slot_assigned = other.slot_assigned; group = other.group; @@ -109,11 +108,11 @@ public: if (slot_assigned) slot_ = other.slot_; return *this; } - connection_slot_pair& dereference() const + connection_slot_pair& dereference() const { return *slot_; } - void increment() + void increment() { ++slot_; if (slot_ == group->second.end()) { @@ -127,7 +126,7 @@ public: || slot_ == other.slot_)); } -#if BOOST_WORKAROUND(_MSC_VER, <= 1700) +#if BOOST_WORKAROUND(_MSC_VER, <= 1900) void decrement(); void advance(difference_type); #endif diff --git a/boost/boost/signals/detail/signal_base.hpp b/boost/boost/signals/detail/signal_base.hpp index 0438cf7bae..991e9fcaa4 100644 --- a/boost/boost/signals/detail/signal_base.hpp +++ b/boost/boost/signals/detail/signal_base.hpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/boost/boost/signals/detail/signals_common.hpp b/boost/boost/signals/detail/signals_common.hpp index fe1a5a13ba..9cf078d70f 100644 --- a/boost/boost/signals/detail/signals_common.hpp +++ b/boost/boost/signals/detail/signals_common.hpp @@ -97,7 +97,6 @@ namespace boost { }; // Determine if the incoming argument is a reference_wrapper -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct is_ref { @@ -109,23 +108,6 @@ namespace boost { { BOOST_STATIC_CONSTANT(bool, value = true); }; -#else // no partial specialization - typedef char yes_type; - typedef double no_type; - - no_type is_ref_tester(...); - - template - yes_type is_ref_tester(reference_wrapper*); - - template - struct is_ref - { - static T* t; - BOOST_STATIC_CONSTANT(bool, - value = (sizeof(is_ref_tester(t)) == sizeof(yes_type))); - }; -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // A slot can be a signal, a reference to a function object, or a // function object. diff --git a/boost/boost/signals/signal_template.hpp b/boost/boost/signals/signal_template.hpp index 6b0b91a8e6..94e1d1aad3 100644 --- a/boost/boost/signals/signal_template.hpp +++ b/boost/boost/signals/signal_template.hpp @@ -16,7 +16,6 @@ #define BOOST_SIGNALS_SIGNAL_TEMPLATE_HEADER_INCLUDED # include # include -# include # include # include # include @@ -210,13 +209,6 @@ namespace boost { BOOST_SIGNALS_NAMESPACE::connect_position at = BOOST_SIGNALS_NAMESPACE::at_back); -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - // MSVC 6.0 and 7.0 don't handle the is_convertible test well - void disconnect(const group_type& group) - { - impl->disconnect(group); - } -#else template void disconnect(const T& t) { @@ -242,7 +234,6 @@ namespace boost { if (s == f) i->first.disconnect(); } } -#endif public: diff --git a/boost/boost/smart_ptr/allocate_shared_array.hpp b/boost/boost/smart_ptr/allocate_shared_array.hpp index 3ee16552e3..1ae5cc7832 100644 --- a/boost/boost/smart_ptr/allocate_shared_array.hpp +++ b/boost/boost/smart_ptr/allocate_shared_array.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Glen Joseph Fernandes + * Copyright (c) 2012-2014 Glen Joseph Fernandes * glenfe at live dot com * * Distributed under the Boost Software License, @@ -9,241 +9,172 @@ #ifndef BOOST_SMART_PTR_ALLOCATE_SHARED_ARRAY_HPP #define BOOST_SMART_PTR_ALLOCATE_SHARED_ARRAY_HPP -#include -#include -#include -#include +#include #include -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) -#include -#endif namespace boost { - template + template inline typename boost::detail::sp_if_array::type allocate_shared(const A& allocator, std::size_t size) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; - T1* p1 = 0; - T2* p2 = 0; + typedef boost::detail::ms_init_tag R1; + typedef boost::detail::as_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; std::size_t n1 = size * boost::detail::array_total::size; - boost::detail::allocate_array_helper a1(allocator, n1, &p2); - boost::detail::array_deleter d1(n1); - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; - p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->init(p2); - return boost::shared_ptr(s1, p1); - } -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - template - inline typename boost::detail::sp_if_array::type - allocate_shared(const A& allocator, std::size_t size, Args&&... args) { - typedef typename boost::detail::array_inner::type T1; - typedef typename boost::detail::array_base::type T2; T1* p1 = 0; T2* p2 = 0; - std::size_t n1 = size * boost::detail::array_total::size; - boost::detail::allocate_array_helper a1(allocator, n1, &p2); - boost::detail::array_deleter d1(n1); - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; + D1 d1; + A1 a1(allocator, size, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + boost::detail::as_init(allocator, p2, n1); +#else + boost::detail::ms_init(p2, n1); +#endif + a2->set(p2); p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->init(p2, boost::detail::sp_forward(args)...); - return boost::shared_ptr(s1, p1); + return shared_ptr(s1, p1); } - template + + template inline typename boost::detail::sp_if_size_array::type - allocate_shared(const A& allocator, Args&&... args) { + allocate_shared(const A& allocator) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; + typedef boost::detail::ms_init_tag R1; + typedef boost::detail::as_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; enum { N = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; - boost::detail::allocate_array_helper a1(allocator, &p2); - boost::detail::array_deleter d1; - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; - p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->init(p2, boost::detail::sp_forward(args)...); - return boost::shared_ptr(s1, p1); - } + D1 d1; + A1 a1(allocator, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + boost::detail::as_init(allocator, p2, N); +#else + boost::detail::ms_init(p2, N); #endif -#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) - template - inline typename boost::detail::sp_if_size_array::type - allocate_shared(const A& allocator, const T& list) { - typedef typename boost::detail::array_inner::type T1; - typedef typename boost::detail::array_base::type T2; - typedef const T2 T3; - enum { - N = boost::detail::array_total::size - }; - T1* p1 = 0; - T2* p2 = 0; - T3* p3 = 0; - boost::detail::allocate_array_helper a1(allocator, &p2); - boost::detail::array_deleter d1; - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; - p3 = reinterpret_cast(list); + a2->set(p2); p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->init_list(p2, p3); - return boost::shared_ptr(s1, p1); + return shared_ptr(s1, p1); } - template + + template inline typename boost::detail::sp_if_array::type allocate_shared(const A& allocator, std::size_t size, - const typename boost::detail::array_inner::type& list) { + const typename boost::detail::array_inner::type& value) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; typedef const T2 T3; + typedef boost::detail::ms_init_tag R1; + typedef boost::detail::as_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; enum { M = boost::detail::array_total::size }; - T1* p1 = 0; - T2* p2 = 0; - T3* p3 = 0; std::size_t n1 = M * size; - boost::detail::allocate_array_helper a1(allocator, n1, &p2); - boost::detail::array_deleter d1(n1); - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; - p3 = reinterpret_cast(list); - p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->template init_list(p2, p3); - return boost::shared_ptr(s1, p1); - } - template - inline typename boost::detail::sp_if_size_array::type - allocate_shared(const A& allocator, - const typename boost::detail::array_inner::type& list) { - typedef typename boost::detail::array_inner::type T1; - typedef typename boost::detail::array_base::type T2; - typedef const T2 T3; - enum { - M = boost::detail::array_total::size, - N = boost::detail::array_total::size - }; - T1* p1 = 0; - T2* p2 = 0; - T3* p3 = 0; - boost::detail::allocate_array_helper a1(allocator, &p2); - boost::detail::array_deleter d1; - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; - p3 = reinterpret_cast(list); - p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->template init_list(p2, p3); - return boost::shared_ptr(s1, p1); - } -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - template - inline typename boost::detail::sp_if_array::type - allocate_shared(const A& allocator, - std::initializer_list::type> list) { - typedef typename boost::detail::array_inner::type T1; - typedef typename boost::detail::array_base::type T2; - typedef const T2 T3; T1* p1 = 0; T2* p2 = 0; - T3* p3 = 0; - std::size_t n1 = list.size() * boost::detail::array_total::size; - boost::detail::allocate_array_helper a1(allocator, n1, &p2); - boost::detail::array_deleter d1(n1); - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; - p3 = reinterpret_cast(list.begin()); - p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->init_list(p2, p3); - return boost::shared_ptr(s1, p1); - } + T3* p3 = reinterpret_cast(&value); + D1 d1; + A1 a1(allocator, size, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + boost::detail::as_init(allocator, p2, n1, p3); +#else + boost::detail::ms_init(p2, n1, p3); #endif -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - template - inline typename boost::detail::sp_if_array::type - allocate_shared(const A& allocator, std::size_t size, - typename boost::detail::array_base::type&& value) { - typedef typename boost::detail::array_inner::type T1; - typedef typename boost::detail::array_base::type T2; - T1* p1 = 0; - T2* p2 = 0; - std::size_t n1 = size * boost::detail::array_total::size; - boost::detail::allocate_array_helper a1(allocator, n1, &p2); - boost::detail::array_deleter d1(n1); - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; + a2->set(p2); p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->init(p2, boost::detail::sp_forward(value)); - return boost::shared_ptr(s1, p1); + return shared_ptr(s1, p1); } - template + + template inline typename boost::detail::sp_if_size_array::type - allocate_shared(const A& allocator, - typename boost::detail::array_base::type&& value) { + allocate_shared(const A& allocator, + const typename boost::detail::array_inner::type& value) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; + typedef const T2 T3; + typedef boost::detail::ms_init_tag R1; + typedef boost::detail::as_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; enum { - N = boost::detail::array_total::size + N = boost::detail::array_total::size, + M = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; - boost::detail::allocate_array_helper a1(allocator, &p2); - boost::detail::array_deleter d1; - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; + T3* p3 = reinterpret_cast(&value); + D1 d1; + A1 a1(allocator, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + boost::detail::as_init(allocator, p2, N, p3); +#else + boost::detail::ms_init(p2, N, p3); +#endif + a2->set(p2); p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->init(p2, boost::detail::sp_forward(value)); - return boost::shared_ptr(s1, p1); + return shared_ptr(s1, p1); } -#endif -#endif - template + + template inline typename boost::detail::sp_if_array::type allocate_shared_noinit(const A& allocator, std::size_t size) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; + typedef boost::detail::ms_noinit_tag R1; + typedef boost::detail::as_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; + std::size_t n1 = size * boost::detail::array_total::size; T1* p1 = 0; T2* p2 = 0; - std::size_t n1 = size * boost::detail::array_total::size; - boost::detail::allocate_array_helper a1(allocator, n1, &p2); - boost::detail::array_deleter d1(n1); - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; + D1 d1; + A1 a1(allocator, size, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); + boost::detail::ms_noinit(p2, n1); + a2->set(p2); p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->noinit(p2); - return boost::shared_ptr(s1, p1); + return shared_ptr(s1, p1); } - template + + template inline typename boost::detail::sp_if_size_array::type allocate_shared_noinit(const A& allocator) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; + typedef boost::detail::ms_noinit_tag R1; + typedef boost::detail::as_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; enum { N = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; - boost::detail::allocate_array_helper a1(allocator, &p2); - boost::detail::array_deleter d1; - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; + D1 d1; + A1 a1(allocator, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); + boost::detail::ms_noinit(p2, N); + a2->set(p2); p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->noinit(p2); - return boost::shared_ptr(s1, p1); + return shared_ptr(s1, p1); } } diff --git a/boost/boost/smart_ptr/detail/allocate_array_helper.hpp b/boost/boost/smart_ptr/detail/allocate_array_helper.hpp deleted file mode 100644 index 2eeea2d3fa..0000000000 --- a/boost/boost/smart_ptr/detail/allocate_array_helper.hpp +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2012 Glen Joseph Fernandes - * glenfe at live dot com - * - * Distributed under the Boost Software License, - * Version 1.0. (See accompanying file LICENSE_1_0.txt - * or copy at http://boost.org/LICENSE_1_0.txt) - */ -#ifndef BOOST_SMART_PTR_DETAIL_ALLOCATE_ARRAY_HELPER_HPP -#define BOOST_SMART_PTR_DETAIL_ALLOCATE_ARRAY_HELPER_HPP - -#include - -namespace boost { - namespace detail { - template - class allocate_array_helper; - template - class allocate_array_helper { - template - friend class allocate_array_helper; - typedef typename A::template rebind ::other A2; - typedef typename A::template rebind::other A3; - public: - typedef typename A2::value_type value_type; - typedef typename A2::pointer pointer; - typedef typename A2::const_pointer const_pointer; - typedef typename A2::reference reference; - typedef typename A2::const_reference const_reference; - typedef typename A2::size_type size_type; - typedef typename A2::difference_type difference_type; - template - struct rebind { - typedef allocate_array_helper other; - }; - allocate_array_helper(const A& allocator_, std::size_t size_, T** data_) - : allocator(allocator_), - size(sizeof(T) * size_), - data(data_) { - } - template - allocate_array_helper(const allocate_array_helper& other) - : allocator(other.allocator), - size(other.size), - data(other.data) { - } - pointer address(reference value) const { - return allocator.address(value); - } - const_pointer address(const_reference value) const { - return allocator.address(value); - } - size_type max_size() const { - return allocator.max_size(); - } - pointer allocate(size_type count, const void* value = 0) { - std::size_t a1 = boost::alignment_of::value; - std::size_t n1 = count * sizeof(Y) + a1 - 1; - char* p1 = A3(allocator).allocate(n1 + size, value); - char* p2 = p1 + n1; - while (std::size_t(p2) % a1 != 0) { - p2--; - } - *data = reinterpret_cast(p2); - return reinterpret_cast(p1); - } - void deallocate(pointer memory, size_type count) { - std::size_t a1 = boost::alignment_of::value; - std::size_t n1 = count * sizeof(Y) + a1 - 1; - char* p1 = reinterpret_cast(memory); - A3(allocator).deallocate(p1, n1 + size); - } - void construct(pointer memory, const Y& value) { - allocator.construct(memory, value); - } - void destroy(pointer memory) { - allocator.destroy(memory); - } - template - bool operator==(const allocate_array_helper& other) const { - return allocator == other.allocator; - } - template - bool operator!=(const allocate_array_helper& other) const { - return !(*this == other); - } - private: - A2 allocator; - std::size_t size; - T** data; - }; - template - class allocate_array_helper { - template - friend class allocate_array_helper; - typedef typename A::template rebind ::other A2; - typedef typename A::template rebind::other A3; - public: - typedef typename A2::value_type value_type; - typedef typename A2::pointer pointer; - typedef typename A2::const_pointer const_pointer; - typedef typename A2::reference reference; - typedef typename A2::const_reference const_reference; - typedef typename A2::size_type size_type; - typedef typename A2::difference_type difference_type; - template - struct rebind { - typedef allocate_array_helper other; - }; - allocate_array_helper(const A& allocator_, T** data_) - : allocator(allocator_), - data(data_) { - } - template - allocate_array_helper(const allocate_array_helper& other) - : allocator(other.allocator), - data(other.data) { - } - pointer address(reference value) const { - return allocator.address(value); - } - const_pointer address(const_reference value) const { - return allocator.address(value); - } - size_type max_size() const { - return allocator.max_size(); - } - pointer allocate(size_type count, const void* value = 0) { - std::size_t a1 = boost::alignment_of::value; - std::size_t n1 = count * sizeof(Y) + a1 - 1; - char* p1 = A3(allocator).allocate(n1 + N1, value); - char* p2 = p1 + n1; - while (std::size_t(p2) % a1 != 0) { - p2--; - } - *data = reinterpret_cast(p2); - return reinterpret_cast(p1); - } - void deallocate(pointer memory, size_type count) { - std::size_t a1 = boost::alignment_of::value; - std::size_t n1 = count * sizeof(Y) + a1 - 1; - char* p1 = reinterpret_cast(memory); - A3(allocator).deallocate(p1, n1 + N1); - } - void construct(pointer memory, const Y& value) { - allocator.construct(memory, value); - } - void destroy(pointer memory) { - allocator.destroy(memory); - } - template - bool operator==(const allocate_array_helper& other) const { - return allocator == other.allocator; - } - template - bool operator!=(const allocate_array_helper& other) const { - return !(*this == other); - } - private: - enum { - N1 = N * sizeof(T) - }; - A2 allocator; - T** data; - }; - } -} - -#endif diff --git a/boost/boost/smart_ptr/detail/array_allocator.hpp b/boost/boost/smart_ptr/detail/array_allocator.hpp new file mode 100644 index 0000000000..71479967bc --- /dev/null +++ b/boost/boost/smart_ptr/detail/array_allocator.hpp @@ -0,0 +1,318 @@ +/* + * Copyright (c) 2012-2014 Glen Joseph Fernandes + * glenfe at live dot com + * + * Distributed under the Boost Software License, + * Version 1.0. (See accompanying file LICENSE_1_0.txt + * or copy at http://boost.org/LICENSE_1_0.txt) + */ +#ifndef BOOST_SMART_PTR_DETAIL_ARRAY_ALLOCATOR_HPP +#define BOOST_SMART_PTR_DETAIL_ARRAY_ALLOCATOR_HPP + +#include +#include +#include +#include + +namespace boost { + namespace detail { + struct ms_init_tag { }; + struct ms_noinit_tag { }; + + template + struct ms_allocator_state; + + template + struct ms_allocator_state { + typedef typename array_base::type type; + + ms_allocator_state(std::size_t size_, + type** result_) + : size(size_ * array_total::size), + result(result_) { + } + + std::size_t size; + + union { + type** result; + type* object; + }; + }; + + template + struct ms_allocator_state { + typedef typename array_base::type type; + + ms_allocator_state(type** result_) + : result(result_) { + } + + enum { + size = array_total::size + }; + + union { + type** result; + type* object; + }; + }; + + template + class as_allocator + : public A { + template + friend class as_allocator; + +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + typedef std::allocator_traits AT; + typedef typename AT::template rebind_alloc CA; + typedef typename AT::template rebind_traits CT; +#else + typedef typename A::template rebind::other CA; +#endif + + public: + typedef A allocator_type; + +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + typedef typename AT::value_type value_type; + typedef typename AT::pointer pointer; + typedef typename AT::const_pointer const_pointer; + typedef typename AT::void_pointer void_pointer; + typedef typename AT::const_void_pointer const_void_pointer; + typedef typename AT::size_type size_type; + typedef typename AT::difference_type difference_type; +#else + typedef typename A::value_type value_type; + typedef typename A::pointer pointer; + typedef typename A::const_pointer const_pointer; + typedef typename A::size_type size_type; + typedef typename A::difference_type difference_type; + typedef typename A::reference reference; + typedef typename A::const_reference const_reference; + typedef void* void_pointer; + typedef const void* const_void_pointer; +#endif + + template + struct rebind { +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + typedef as_allocator, T, R> other; +#else + typedef as_allocator::other, T, R> other; +#endif + }; + + typedef typename array_base::type type; + + as_allocator(const A& allocator_, type** result) + : A(allocator_), + data(result) { + } + + as_allocator(const A& allocator_, std::size_t size, + type** result) + : A(allocator_), + data(size, result) { + } + + template + as_allocator(const as_allocator& other) + : A(other.allocator()), + data(other.data) { + } + + pointer allocate(size_type count, const_void_pointer = 0) { + enum { + M = boost::alignment_of::value + }; + std::size_t n1 = count * sizeof(value_type); + std::size_t n2 = data.size * sizeof(type); + std::size_t n3 = n2 + M; + CA ca(allocator()); + void* p1 = ca.allocate(n1 + n3); + void* p2 = static_cast(p1) + n1; + (void)boost::alignment::align(M, n2, p2, n3); + *data.result = static_cast(p2); + return static_cast(p1); + } + + void deallocate(pointer memory, size_type count) { + enum { + M = boost::alignment_of::value + }; + std::size_t n1 = count * sizeof(value_type); + std::size_t n2 = data.size * sizeof(type) + M; + char* p1 = reinterpret_cast(memory); + CA ca(allocator()); + ca.deallocate(p1, n1 + n2); + } + + const A& allocator() const { + return static_cast(*this); + } + + A& allocator() { + return static_cast(*this); + } + + void set(type* memory) { + data.object = memory; + } + + void operator()() { + if (data.object) { + R tag; + release(tag); + } + } + + private: + void release(ms_init_tag) { +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + as_destroy(allocator(), data.object, data.size); +#else + ms_destroy(data.object, data.size); +#endif + } + + void release(ms_noinit_tag) { + ms_destroy(data.object, data.size); + } + + ms_allocator_state data; + }; + + template + bool operator==(const as_allocator& a1, + const as_allocator& a2) { + return a1.allocator() == a2.allocator(); + } + + template + bool operator!=(const as_allocator& a1, + const as_allocator& a2) { + return a1.allocator() != a2.allocator(); + } + + template + class ms_allocator; + + template + class ms_allocator { + template + friend class ms_allocator; + + public: + typedef typename array_base::type type; + + typedef Y value_type; + typedef Y* pointer; + typedef const Y* const_pointer; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef Y& reference; + typedef const Y& const_reference; + + template + struct rebind { + typedef ms_allocator other; + }; + + ms_allocator(type** result) + : data(result) { + } + + ms_allocator(std::size_t size, type** result) + : data(size, result) { + } + + template + ms_allocator(const ms_allocator& other) + : data(other.data) { + } + + pointer allocate(size_type count, const void* = 0) { + enum { + M = boost::alignment_of::value + }; + std::size_t n1 = count * sizeof(Y); + std::size_t n2 = data.size * sizeof(type); + std::size_t n3 = n2 + M; + void* p1 = ::operator new(n1 + n3); + void* p2 = static_cast(p1) + n1; + (void)boost::alignment::align(M, n2, p2, n3); + *data.result = static_cast(p2); + return static_cast(p1); + } + + void deallocate(pointer memory, size_type) { + void* p1 = memory; + ::operator delete(p1); + } + +#if defined(BOOST_NO_CXX11_ALLOCATOR) + pointer address(reference value) const { + return &value; + } + + const_pointer address(const_reference value) const { + return &value; + } + + size_type max_size() const { + enum { + N = static_cast(-1) / sizeof(Y) + }; + return N; + } + + void construct(pointer memory, const_reference value) { + void* p1 = memory; + ::new(p1) Y(value); + } + + void destroy(pointer memory) { + (void)memory; + memory->~Y(); + } +#endif + + void set(type* memory) { + data.object = memory; + } + + void operator()() { + if (data.object) { + ms_destroy(data.object, data.size); + } + } + + private: + ms_allocator_state data; + }; + + template + bool operator==(const ms_allocator&, + const ms_allocator&) { + return true; + } + + template + bool operator!=(const ms_allocator&, + const ms_allocator&) { + return false; + } + + class ms_in_allocator_tag { + public: + void operator()(const void*) { + } + }; + } +} + +#endif diff --git a/boost/boost/smart_ptr/detail/array_count_impl.hpp b/boost/boost/smart_ptr/detail/array_count_impl.hpp new file mode 100644 index 0000000000..b7c9617f0b --- /dev/null +++ b/boost/boost/smart_ptr/detail/array_count_impl.hpp @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2014 Glen Joseph Fernandes + * glenfe at live dot com + * + * Distributed under the Boost Software License, + * Version 1.0. (See accompanying file LICENSE_1_0.txt + * or copy at http://boost.org/LICENSE_1_0.txt) + */ +#ifndef BOOST_SMART_PTR_DETAIL_ARRAY_COUNT_IMPL_HPP +#define BOOST_SMART_PTR_DETAIL_ARRAY_COUNT_IMPL_HPP + +#include +#include + +namespace boost { + namespace detail { + template + class sp_counted_impl_pda + : public sp_counted_base { + typedef ms_in_allocator_tag D; + typedef sp_counted_impl_pda Y; + public: + sp_counted_impl_pda(P, D, const A& allocator_) + : allocator(allocator_) { + } + + virtual void dispose() { + allocator(); + } + + virtual void destroy() { +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + typedef typename std::allocator_traits:: + template rebind_alloc YA; + typedef typename std::allocator_traits:: + template rebind_traits YT; +#else + typedef typename A::template rebind::other YA; +#endif + YA a1(allocator); +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + YT::destroy(a1, this); + YT::deallocate(a1, this, 1); +#else + this->~Y(); + a1.deallocate(this, 1); +#endif + } + + virtual void* get_deleter(const sp_typeinfo&) { + return &reinterpret_cast(allocator); + } + + virtual void* get_untyped_deleter() { + return &reinterpret_cast(allocator); + } + + private: + sp_counted_impl_pda(const sp_counted_impl_pda&); + sp_counted_impl_pda& operator=(const sp_counted_impl_pda&); + + A allocator; + }; + } +} + +#endif diff --git a/boost/boost/smart_ptr/detail/array_deleter.hpp b/boost/boost/smart_ptr/detail/array_deleter.hpp deleted file mode 100644 index 20f84d1e7b..0000000000 --- a/boost/boost/smart_ptr/detail/array_deleter.hpp +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2012 Glen Joseph Fernandes - * glenfe at live dot com - * - * Distributed under the Boost Software License, - * Version 1.0. (See accompanying file LICENSE_1_0.txt - * or copy at http://boost.org/LICENSE_1_0.txt) - */ -#ifndef BOOST_SMART_PTR_DETAIL_ARRAY_DELETER_HPP -#define BOOST_SMART_PTR_DETAIL_ARRAY_DELETER_HPP - -#include -#include - -namespace boost { - namespace detail { - template - class array_deleter; - template - class array_deleter { - public: - array_deleter(std::size_t size_) - : size(size_), - object(0) { - } - ~array_deleter() { - if (object) { - array_destroy(object, size); - } - } - void init(T* memory) { - array_init(memory, size); - object = memory; - } -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - void init(T* memory, T&& value) { - array_init_value(memory, size, sp_forward(value)); - object = memory; - } -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - template - void init(T* memory, Args&&... args) { - array_init_args(memory, size, sp_forward(args)...); - object = memory; - } -#endif -#endif - void init_list(T* memory, const T* list) { - array_init_list(memory, size, list); - object = memory; - } - template - void init_list(T* memory, const T* list) { - array_init_list(memory, size, list); - object = memory; - } - void noinit(T* memory) { - array_noinit(memory, size); - object = memory; - } - void operator()(const void*) { - if (object) { - array_destroy(object, size); - object = 0; - } - } - private: - std::size_t size; - T* object; - }; - template - class array_deleter { - public: - array_deleter() - : object(0) { - } - ~array_deleter() { - if (object) { - array_destroy(object, N); - } - } - void init(T* memory) { - array_init(memory, N); - object = memory; - } -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - void init(T* memory, T&& value) { - array_init_value(memory, N, sp_forward(value)); - object = memory; - } -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - template - void init(T* memory, Args&&... args) { - array_init_args(memory, N, sp_forward(args)...); - object = memory; - } -#endif -#endif - void init_list(T* memory, const T* list) { - array_init_list(memory, N, list); - object = memory; - } - template - void init_list(T* memory, const T* list) { - array_init_list(memory, N, list); - object = memory; - } - void noinit(T* memory) { - array_noinit(memory, N); - object = memory; - } - void operator()(const void*) { - if (object) { - array_destroy(object, N); - object = 0; - } - } - private: - T* object; - }; - } -} - -#endif diff --git a/boost/boost/smart_ptr/detail/array_traits.hpp b/boost/boost/smart_ptr/detail/array_traits.hpp index 8ef7874791..819c5ba619 100644 --- a/boost/boost/smart_ptr/detail/array_traits.hpp +++ b/boost/boost/smart_ptr/detail/array_traits.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Glen Joseph Fernandes + * Copyright (c) 2012-2014 Glen Joseph Fernandes * glenfe at live dot com * * Distributed under the Boost Software License, @@ -13,37 +13,44 @@ namespace boost { namespace detail { - template + template struct array_base { typedef typename boost::remove_cv::type type; }; - template + + template struct array_base { typedef typename array_base::type type; }; - template + + template struct array_base { typedef typename array_base::type type; }; - template + + template struct array_total { enum { size = 1 }; }; - template + + template struct array_total { enum { size = N * array_total::size }; }; - template + + template struct array_inner; - template + + template struct array_inner { typedef T type; }; - template + + template struct array_inner { typedef T type; }; diff --git a/boost/boost/smart_ptr/detail/array_utility.hpp b/boost/boost/smart_ptr/detail/array_utility.hpp index 3cf36d7445..84029a1d77 100644 --- a/boost/boost/smart_ptr/detail/array_utility.hpp +++ b/boost/boost/smart_ptr/detail/array_utility.hpp @@ -1,9 +1,9 @@ /* - * Copyright (c) 2012 Glen Joseph Fernandes + * Copyright (c) 2012-2014 Glen Joseph Fernandes * glenfe at live dot com * - * Distributed under the Boost Software License, - * Version 1.0. (See accompanying file LICENSE_1_0.txt + * Distributed under the Boost Software License, + * Version 1.0. (See accompanying file LICENSE_1_0.txt * or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_SMART_PTR_DETAIL_ARRAY_UTILITY_HPP @@ -12,31 +12,42 @@ #include #include #include +#if !defined(BOOST_NO_CXX11_ALLOCATOR) +#include +#endif namespace boost { namespace detail { - template - inline void array_destroy(T*, std::size_t, boost::true_type) { + typedef boost::true_type ms_is_trivial; + typedef boost::false_type ms_no_trivial; + + template + inline void ms_destroy(T*, std::size_t, ms_is_trivial) { } - template - inline void array_destroy(T* memory, std::size_t size, boost::false_type) { - for (std::size_t i = size; i > 0; ) { + + template + inline void ms_destroy(T* memory, std::size_t size, ms_no_trivial) { + for (std::size_t i = size; i > 0;) { memory[--i].~T(); } } - template - inline void array_destroy(T* memory, std::size_t size) { - boost::has_trivial_destructor type; - array_destroy(memory, size, type); + + template + inline void ms_destroy(T* memory, std::size_t size) { + boost::has_trivial_destructor trivial; + ms_destroy(memory, size, trivial); } - template - inline void array_init(T* memory, std::size_t size, boost::true_type) { + + template + inline void ms_init(T* memory, std::size_t size, ms_is_trivial) { for (std::size_t i = 0; i < size; i++) { - memory[i] = T(); + void* p1 = memory + i; + ::new(p1) T(); } } - template - inline void array_init(T* memory, std::size_t size, boost::false_type) { + + template + inline void ms_init(T* memory, std::size_t size, ms_no_trivial) { #if !defined(BOOST_NO_EXCEPTIONS) std::size_t i = 0; try { @@ -45,7 +56,7 @@ namespace boost { ::new(p1) T(); } } catch (...) { - array_destroy(memory, i); + ms_destroy(memory, i); throw; } #else @@ -55,100 +66,124 @@ namespace boost { } #endif } - template - inline void array_init(T* memory, std::size_t size) { - boost::has_trivial_default_constructor type; - array_init(memory, size, type); + + template + inline void ms_init(T* memory, std::size_t size) { + boost::has_trivial_default_constructor trivial; + ms_init(memory, size, trivial); } -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - template - inline void array_init_value(T* memory, std::size_t size, T&& value) { + + template + inline void ms_init(T* memory, std::size_t size, const T* list) { #if !defined(BOOST_NO_EXCEPTIONS) std::size_t i = 0; try { for (; i < size; i++) { void* p1 = memory + i; - ::new(p1) T(value); + ::new(p1) T(list[i % N]); } } catch (...) { - array_destroy(memory, i); + ms_destroy(memory, i); throw; } #else for (std::size_t i = 0; i < size; i++) { void* p1 = memory + i; - ::new(p1) T(value); + ::new(p1) T(list[i % N]); } #endif } -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - template - inline void array_init_args(T* memory, std::size_t size, Args&&... args) { -#if !defined(BOOST_NO_EXCEPTIONS) - std::size_t i = 0; - try { - for (; i < size; i++) { - void* p1 = memory + i; - ::new(p1) T(args...); - } - } catch (...) { - array_destroy(memory, i); - throw; + +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + template + inline void as_destroy(const A& allocator, T* memory, + std::size_t size) { + typedef typename std::allocator_traits:: + template rebind_alloc TA; + typedef typename std::allocator_traits:: + template rebind_traits TT; + TA a2(allocator); + for (std::size_t i = size; i > 0;) { + TT::destroy(a2, &memory[--i]); } -#else + } + + template + inline void as_init(const A& allocator, T* memory, std::size_t size, + ms_is_trivial) { + typedef typename std::allocator_traits:: + template rebind_alloc TA; + typedef typename std::allocator_traits:: + template rebind_traits TT; + TA a2(allocator); for (std::size_t i = 0; i < size; i++) { - void* p1 = memory + i; - ::new(p1) T(args...); + TT::construct(a2, memory + i); } -#endif } -#endif -#endif - template - inline void array_init_list(T* memory, std::size_t size, const T* list) { + + template + inline void as_init(const A& allocator, T* memory, std::size_t size, + ms_no_trivial) { + typedef typename std::allocator_traits:: + template rebind_alloc TA; + typedef typename std::allocator_traits:: + template rebind_traits TT; + TA a2(allocator); #if !defined(BOOST_NO_EXCEPTIONS) std::size_t i = 0; try { for (; i < size; i++) { - void* p1 = memory + i; - ::new(p1) T(list[i]); + TT::construct(a2, memory + i); } } catch (...) { - array_destroy(memory, i); + as_destroy(a2, memory, i); throw; } #else for (std::size_t i = 0; i < size; i++) { - void* p1 = memory + i; - ::new(p1) T(list[i]); + TT::construct(a2, memory + i); } #endif } - template - inline void array_init_list(T* memory, std::size_t size, const T* list) { + + template + inline void as_init(const A& allocator, T* memory, std::size_t size) { + boost::has_trivial_default_constructor trivial; + as_init(allocator, memory, size, trivial); + } + + template + inline void as_init(const A& allocator, T* memory, std::size_t size, + const T* list) { + typedef typename std::allocator_traits:: + template rebind_alloc TA; + typedef typename std::allocator_traits:: + template rebind_traits TT; + TA a2(allocator); #if !defined(BOOST_NO_EXCEPTIONS) std::size_t i = 0; try { for (; i < size; i++) { - void* p1 = memory + i; - ::new(p1) T(list[i % N]); + TT::construct(a2, memory + i, list[i % N]); } } catch (...) { - array_destroy(memory, i); + as_destroy(a2, memory, i); throw; } #else for (std::size_t i = 0; i < size; i++) { - void* p1 = memory + i; - ::new(p1) T(list[i % N]); + TT::construct(a2, memory + i, list[i % N]); } #endif } - template - inline void array_noinit(T*, std::size_t, boost::true_type) { +#endif + + template + inline void ms_noinit(T*, std::size_t, ms_is_trivial) { } - template - inline void array_noinit(T* memory, std::size_t size, boost::false_type) { + + template + inline void ms_noinit(T* memory, std::size_t size, ms_no_trivial) { #if !defined(BOOST_NO_EXCEPTIONS) std::size_t i = 0; try { @@ -157,7 +192,7 @@ namespace boost { ::new(p1) T; } } catch (...) { - array_destroy(memory, i); + ms_destroy(memory, i); throw; } #else @@ -167,10 +202,11 @@ namespace boost { } #endif } - template - inline void array_noinit(T* memory, std::size_t size) { - boost::has_trivial_default_constructor type; - array_noinit(memory, size, type); + + template + inline void ms_noinit(T* memory, std::size_t size) { + boost::has_trivial_default_constructor trivial; + ms_noinit(memory, size, trivial); } } } diff --git a/boost/boost/smart_ptr/detail/atomic_count.hpp b/boost/boost/smart_ptr/detail/atomic_count.hpp deleted file mode 100644 index cc44ac2f96..0000000000 --- a/boost/boost/smart_ptr/detail/atomic_count.hpp +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_HPP_INCLUDED -#define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// boost/detail/atomic_count.hpp - thread/SMP safe reference counter -// -// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. -// -// 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) -// -// typedef boost::detail::atomic_count; -// -// atomic_count a(n); -// -// (n is convertible to long) -// -// Effects: Constructs an atomic_count with an initial value of n -// -// a; -// -// Returns: (long) the current value of a -// -// ++a; -// -// Effects: Atomically increments the value of a -// Returns: (long) the new value of a -// -// --a; -// -// Effects: Atomically decrements the value of a -// Returns: (long) the new value of a -// -// Important note: when --a returns zero, it must act as a -// read memory barrier (RMB); i.e. the calling thread must -// have a synchronized view of the memory -// -// On Intel IA-32 (x86) memory is always synchronized, so this -// is not a problem. -// -// On many architectures the atomic instructions already act as -// a memory barrier. -// -// This property is necessary for proper reference counting, since -// a thread can update the contents of a shared object, then -// release its reference, and another thread may immediately -// release the last reference causing object destruction. -// -// The destructor needs to have a synchronized view of the -// object to perform proper cleanup. -// -// Original example by Alexander Terekhov: -// -// Given: -// -// - a mutable shared object OBJ; -// - two threads THREAD1 and THREAD2 each holding -// a private smart_ptr object pointing to that OBJ. -// -// t1: THREAD1 updates OBJ (thread-safe via some synchronization) -// and a few cycles later (after "unlock") destroys smart_ptr; -// -// t2: THREAD2 destroys smart_ptr WITHOUT doing any synchronization -// with respect to shared mutable object OBJ; OBJ destructors -// are called driven by smart_ptr interface... -// - -#include -#include - -#ifndef BOOST_HAS_THREADS - -namespace boost -{ - -namespace detail -{ - -typedef long atomic_count; - -} - -} - -#elif defined(BOOST_AC_USE_PTHREADS) -# include - -#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) -# include - -#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# include - -#elif defined( BOOST_SP_HAS_SYNC ) -# include - -#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) -# include - -#elif defined(BOOST_HAS_PTHREADS) - -# define BOOST_AC_USE_PTHREADS -# include - -#else - -// Use #define BOOST_DISABLE_THREADS to avoid the error -#error Unrecognized threading platform - -#endif - -#endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_HPP_INCLUDED diff --git a/boost/boost/smart_ptr/detail/atomic_count_gcc.hpp b/boost/boost/smart_ptr/detail/atomic_count_gcc.hpp deleted file mode 100644 index 54807e944e..0000000000 --- a/boost/boost/smart_ptr/detail/atomic_count_gcc.hpp +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED -#define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED - -// -// boost/detail/atomic_count_gcc.hpp -// -// atomic_count for GNU libstdc++ v3 -// -// http://gcc.gnu.org/onlinedocs/porting/Thread-safety.html -// -// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. -// Copyright (c) 2002 Lars Gullik Bjønnes -// Copyright 2003-2005 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) -// - -#if __GNUC__ * 100 + __GNUC_MINOR__ >= 402 -# include -#else -# include -#endif - -namespace boost -{ - -namespace detail -{ - -#if defined(__GLIBCXX__) // g++ 3.4+ - -using __gnu_cxx::__atomic_add; -using __gnu_cxx::__exchange_and_add; - -#endif - -class atomic_count -{ -public: - - explicit atomic_count( long v ) : value_( v ) {} - - long operator++() - { - return __exchange_and_add( &value_, +1 ) + 1; - } - - long operator--() - { - return __exchange_and_add( &value_, -1 ) - 1; - } - - operator long() const - { - return __exchange_and_add( &value_, 0 ); - } - -private: - - atomic_count(atomic_count const &); - atomic_count & operator=(atomic_count const &); - - mutable _Atomic_word value_; -}; - -} // namespace detail - -} // namespace boost - -#endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED diff --git a/boost/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp b/boost/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp deleted file mode 100644 index 5c44d7c1ef..0000000000 --- a/boost/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_X86_HPP_INCLUDED -#define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_X86_HPP_INCLUDED - -// -// boost/detail/atomic_count_gcc_x86.hpp -// -// atomic_count for g++ on 486+/AMD64 -// -// Copyright 2007 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) -// - -namespace boost -{ - -namespace detail -{ - -class atomic_count -{ -public: - - explicit atomic_count( long v ) : value_( static_cast< int >( v ) ) {} - - long operator++() - { - return atomic_exchange_and_add( &value_, +1 ) + 1; - } - - long operator--() - { - return atomic_exchange_and_add( &value_, -1 ) - 1; - } - - operator long() const - { - return atomic_exchange_and_add( &value_, 0 ); - } - -private: - - atomic_count(atomic_count const &); - atomic_count & operator=(atomic_count const &); - - mutable int value_; - -private: - - static int atomic_exchange_and_add( int * pw, int dv ) - { - // int r = *pw; - // *pw += dv; - // return r; - - int r; - - __asm__ __volatile__ - ( - "lock\n\t" - "xadd %1, %0": - "+m"( *pw ), "=r"( r ): // outputs (%0, %1) - "1"( dv ): // inputs (%2 == %1) - "memory", "cc" // clobbers - ); - - return r; - } -}; - -} // namespace detail - -} // namespace boost - -#endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_X86_HPP_INCLUDED diff --git a/boost/boost/smart_ptr/detail/atomic_count_pthreads.hpp b/boost/boost/smart_ptr/detail/atomic_count_pthreads.hpp deleted file mode 100644 index 05f78673c6..0000000000 --- a/boost/boost/smart_ptr/detail/atomic_count_pthreads.hpp +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_PTHREADS_HPP_INCLUDED -#define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_PTHREADS_HPP_INCLUDED - -// -// boost/detail/atomic_count_pthreads.hpp -// -// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. -// -// 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 - -// -// The generic pthread_mutex-based implementation sometimes leads to -// inefficiencies. Example: a class with two atomic_count members -// can get away with a single mutex. -// -// Users can detect this situation by checking BOOST_AC_USE_PTHREADS. -// - -namespace boost -{ - -namespace detail -{ - -class atomic_count -{ -private: - - class scoped_lock - { - public: - - scoped_lock(pthread_mutex_t & m): m_(m) - { - pthread_mutex_lock(&m_); - } - - ~scoped_lock() - { - pthread_mutex_unlock(&m_); - } - - private: - - pthread_mutex_t & m_; - }; - -public: - - explicit atomic_count(long v): value_(v) - { - pthread_mutex_init(&mutex_, 0); - } - - ~atomic_count() - { - pthread_mutex_destroy(&mutex_); - } - - long operator++() - { - scoped_lock lock(mutex_); - return ++value_; - } - - long operator--() - { - scoped_lock lock(mutex_); - return --value_; - } - - operator long() const - { - scoped_lock lock(mutex_); - return value_; - } - -private: - - atomic_count(atomic_count const &); - atomic_count & operator=(atomic_count const &); - - mutable pthread_mutex_t mutex_; - long value_; -}; - -} // namespace detail - -} // namespace boost - -#endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_PTHREADS_HPP_INCLUDED diff --git a/boost/boost/smart_ptr/detail/atomic_count_sync.hpp b/boost/boost/smart_ptr/detail/atomic_count_sync.hpp deleted file mode 100644 index b6359b5bcf..0000000000 --- a/boost/boost/smart_ptr/detail/atomic_count_sync.hpp +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_SYNC_HPP_INCLUDED -#define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_SYNC_HPP_INCLUDED - -// -// boost/detail/atomic_count_sync.hpp -// -// atomic_count for g++ 4.1+ -// -// http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html -// -// Copyright 2007 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) -// - -#if defined( __ia64__ ) && defined( __INTEL_COMPILER ) -# include -#endif - -namespace boost -{ - -namespace detail -{ - -class atomic_count -{ -public: - - explicit atomic_count( long v ) : value_( v ) {} - - long operator++() - { - return __sync_add_and_fetch( &value_, 1 ); - } - - long operator--() - { - return __sync_add_and_fetch( &value_, -1 ); - } - - operator long() const - { - return __sync_fetch_and_add( &value_, 0 ); - } - -private: - - atomic_count(atomic_count const &); - atomic_count & operator=(atomic_count const &); - - mutable long value_; -}; - -} // namespace detail - -} // namespace boost - -#endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_SYNC_HPP_INCLUDED diff --git a/boost/boost/smart_ptr/detail/atomic_count_win32.hpp b/boost/boost/smart_ptr/detail/atomic_count_win32.hpp deleted file mode 100644 index 60a056943b..0000000000 --- a/boost/boost/smart_ptr/detail/atomic_count_win32.hpp +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED -#define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// boost/detail/atomic_count_win32.hpp -// -// Copyright (c) 2001-2005 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 - -namespace boost -{ - -namespace detail -{ - -class atomic_count -{ -public: - - explicit atomic_count( long v ): value_( v ) - { - } - - long operator++() - { - return BOOST_INTERLOCKED_INCREMENT( &value_ ); - } - - long operator--() - { - return BOOST_INTERLOCKED_DECREMENT( &value_ ); - } - - operator long() const - { - return static_cast( value_ ); - } - -private: - - atomic_count( atomic_count const & ); - atomic_count & operator=( atomic_count const & ); - - long value_; -}; - -} // namespace detail - -} // namespace boost - -#endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED diff --git a/boost/boost/smart_ptr/detail/lwm_win32_cs.hpp b/boost/boost/smart_ptr/detail/lwm_win32_cs.hpp index 00477e49f8..a93cf09208 100644 --- a/boost/boost/smart_ptr/detail/lwm_win32_cs.hpp +++ b/boost/boost/smart_ptr/detail/lwm_win32_cs.hpp @@ -11,12 +11,15 @@ // boost/detail/lwm_win32_cs.hpp // // Copyright (c) 2002, 2003 Peter Dimov +// Copyright (c) Microsoft Corporation 2014 // // 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 + #ifdef BOOST_USE_WINDOWS_H # include #endif @@ -43,7 +46,11 @@ struct critical_section #endif }; +#if BOOST_PLAT_WINDOWS_RUNTIME +extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSectionEx(critical_section *, unsigned long, unsigned long); +#else extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(critical_section *); +#endif extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(critical_section *); extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(critical_section *); extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(critical_section *); @@ -67,7 +74,11 @@ public: lightweight_mutex() { +#if BOOST_PLAT_WINDOWS_RUNTIME + InitializeCriticalSectionEx(&cs_, 4000, 0); +#else InitializeCriticalSection(&cs_); +#endif } ~lightweight_mutex() diff --git a/boost/boost/smart_ptr/detail/make_array_helper.hpp b/boost/boost/smart_ptr/detail/make_array_helper.hpp deleted file mode 100644 index 6cf048316d..0000000000 --- a/boost/boost/smart_ptr/detail/make_array_helper.hpp +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2012 Glen Joseph Fernandes - * glenfe at live dot com - * - * Distributed under the Boost Software License, - * Version 1.0. (See accompanying file LICENSE_1_0.txt - * or copy at http://boost.org/LICENSE_1_0.txt) - */ -#ifndef BOOST_SMART_PTR_DETAIL_MAKE_ARRAY_HELPER_HPP -#define BOOST_SMART_PTR_DETAIL_MAKE_ARRAY_HELPER_HPP - -#include - -namespace boost { - namespace detail { - template - class make_array_helper; - template - class make_array_helper { - template - friend class make_array_helper; - public: - typedef Y value_type; - typedef Y* pointer; - typedef const Y* const_pointer; - typedef Y& reference; - typedef const Y& const_reference; - typedef std::size_t size_type; - typedef ptrdiff_t difference_type; - template - struct rebind { - typedef make_array_helper other; - }; - make_array_helper(std::size_t size_, T** data_) - : size(sizeof(T) * size_), - data(data_) { - } - template - make_array_helper(const make_array_helper& other) - : size(other.size), - data(other.data) { - } - pointer address(reference value) const { - return &value; - } - const_pointer address(const_reference value) const { - return &value; - } - size_type max_size() const { - return static_cast(-1) / sizeof(Y); - } - pointer allocate(size_type count, const void* = 0) { - std::size_t a1 = boost::alignment_of::value; - std::size_t n1 = count * sizeof(Y) + a1 - 1; - void* p1 = ::operator new(n1 + size); - char* p2 = static_cast(p1) + n1; - while (std::size_t(p2) % a1 != 0) { - p2--; - } - *data = reinterpret_cast(p2); - return reinterpret_cast(p1); - } - void deallocate(pointer memory, size_type) { - void* p1 = memory; - ::operator delete(p1); - } - void construct(pointer memory, const Y& value) { - void* p1 = memory; - ::new(p1) Y(value); - } - void destroy(pointer memory) { - memory->~Y(); - } - template - bool operator==(const make_array_helper&) const { - return true; - } - template - bool operator!=(const make_array_helper& other) const { - return !(*this == other); - } - private: - std::size_t size; - T** data; - }; - template - class make_array_helper { - template - friend class make_array_helper; - public: - typedef Y value_type; - typedef Y* pointer; - typedef const Y* const_pointer; - typedef Y& reference; - typedef const Y& const_reference; - typedef std::size_t size_type; - typedef ptrdiff_t difference_type; - template - struct rebind { - typedef make_array_helper other; - }; - make_array_helper(T** data_) - : data(data_) { - } - template - make_array_helper(const make_array_helper& other) - : data(other.data) { - } - pointer address(reference value) const { - return &value; - } - const_pointer address(const_reference value) const { - return &value; - } - size_type max_size() const { - return static_cast(-1) / sizeof(Y); - } - pointer allocate(size_type count, const void* = 0) { - std::size_t a1 = boost::alignment_of::value; - std::size_t n1 = count * sizeof(Y) + a1 - 1; - void* p1 = ::operator new(n1 + N1); - char* p2 = static_cast(p1) + n1; - while (std::size_t(p2) % a1 != 0) { - p2--; - } - *data = reinterpret_cast(p2); - return reinterpret_cast(p1); - } - void deallocate(pointer memory, size_type) { - void* p1 = memory; - ::operator delete(p1); - } - void construct(pointer memory, const Y& value) { - void* p1 = memory; - ::new(p1) Y(value); - } - void destroy(pointer memory) { - memory->~Y(); - } - template - bool operator==(const make_array_helper&) const { - return true; - } - template - bool operator!=(const make_array_helper& other) const { - return !(*this == other); - } - private: - enum { - N1 = N * sizeof(T) - }; - T** data; - }; - } -} - -#endif diff --git a/boost/boost/smart_ptr/detail/shared_array_nmt.hpp b/boost/boost/smart_ptr/detail/shared_array_nmt.hpp deleted file mode 100644 index 450c9bcf59..0000000000 --- a/boost/boost/smart_ptr/detail/shared_array_nmt.hpp +++ /dev/null @@ -1,151 +0,0 @@ -#ifndef BOOST_SMART_PTR_DETAIL_SHARED_ARRAY_NMT_HPP_INCLUDED -#define BOOST_SMART_PTR_DETAIL_SHARED_ARRAY_NMT_HPP_INCLUDED - -// -// detail/shared_array_nmt.hpp - shared_array.hpp without member templates -// -// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. -// Copyright (c) 2001, 2002 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) -// -// See http://www.boost.org/libs/smart_ptr/shared_array.htm for documentation. -// - -#include -#include -#include -#include - -#include // for std::ptrdiff_t -#include // for std::swap -#include // for std::less -#include // for std::bad_alloc - -namespace boost -{ - -template class shared_array -{ -private: - - typedef detail::atomic_count count_type; - -public: - - typedef T element_type; - - explicit shared_array(T * p = 0): px(p) - { -#ifndef BOOST_NO_EXCEPTIONS - - try // prevent leak if new throws - { - pn = new count_type(1); - } - catch(...) - { - boost::checked_array_delete(p); - throw; - } - -#else - - pn = new count_type(1); - - if(pn == 0) - { - boost::checked_array_delete(p); - boost::throw_exception(std::bad_alloc()); - } - -#endif - } - - ~shared_array() - { - if(--*pn == 0) - { - boost::checked_array_delete(px); - delete pn; - } - } - - shared_array(shared_array const & r) : px(r.px) // never throws - { - pn = r.pn; - ++*pn; - } - - shared_array & operator=(shared_array const & r) - { - shared_array(r).swap(*this); - return *this; - } - - void reset(T * p = 0) - { - BOOST_ASSERT(p == 0 || p != px); - shared_array(p).swap(*this); - } - - T * get() const // never throws - { - return px; - } - - T & operator[](std::ptrdiff_t i) const // never throws - { - BOOST_ASSERT(px != 0); - BOOST_ASSERT(i >= 0); - return px[i]; - } - - long use_count() const // never throws - { - return *pn; - } - - bool unique() const // never throws - { - return *pn == 1; - } - - void swap(shared_array & other) // never throws - { - std::swap(px, other.px); - std::swap(pn, other.pn); - } - -private: - - T * px; // contained pointer - count_type * pn; // ptr to reference counter - -}; // shared_array - -template inline bool operator==(shared_array const & a, shared_array const & b) -{ - return a.get() == b.get(); -} - -template inline bool operator!=(shared_array const & a, shared_array const & b) -{ - return a.get() != b.get(); -} - -template inline bool operator<(shared_array const & a, shared_array const & b) -{ - return std::less()(a.get(), b.get()); -} - -template void swap(shared_array & a, shared_array & b) -{ - a.swap(b); -} - -} // namespace boost - -#endif // #ifndef BOOST_SMART_PTR_DETAIL_SHARED_ARRAY_NMT_HPP_INCLUDED diff --git a/boost/boost/smart_ptr/detail/shared_count.hpp b/boost/boost/smart_ptr/detail/shared_count.hpp index 8e1dd4810a..1e7d688c1a 100644 --- a/boost/boost/smart_ptr/detail/shared_count.hpp +++ b/boost/boost/smart_ptr/detail/shared_count.hpp @@ -225,16 +225,35 @@ public: #endif { typedef sp_counted_impl_pda impl_type; + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + typedef typename std::allocator_traits::template rebind_alloc< impl_type > A2; + +#else + typedef typename A::template rebind< impl_type >::other A2; +#endif + A2 a2( a ); #ifndef BOOST_NO_EXCEPTIONS try { +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + impl_type * pi = std::allocator_traits::allocate( a2, 1 ); + pi_ = pi; + std::allocator_traits::construct( a2, pi, p, d, a ); + +#else + pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); - new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); + ::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); + +#endif } catch(...) { @@ -248,13 +267,30 @@ public: throw; } +#else + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + impl_type * pi = std::allocator_traits::allocate( a2, 1 ); + pi_ = pi; + #else pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); +#endif + if( pi_ != 0 ) { - new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + std::allocator_traits::construct( a2, pi, p, d, a ); + +#else + + ::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); + +#endif } else { @@ -273,16 +309,35 @@ public: #endif { typedef sp_counted_impl_pda< P, D, A > impl_type; + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + typedef typename std::allocator_traits::template rebind_alloc< impl_type > A2; + +#else + typedef typename A::template rebind< impl_type >::other A2; +#endif + A2 a2( a ); #ifndef BOOST_NO_EXCEPTIONS try { +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + impl_type * pi = std::allocator_traits::allocate( a2, 1 ); + pi_ = pi; + std::allocator_traits::construct( a2, pi, p, a ); + +#else + pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); - new( static_cast< void* >( pi_ ) ) impl_type( p, a ); + ::new( static_cast< void* >( pi_ ) ) impl_type( p, a ); + +#endif } catch(...) { @@ -296,13 +351,30 @@ public: throw; } +#else + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + impl_type * pi = std::allocator_traits::allocate( a2, 1 ); + pi_ = pi; + #else pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); +#endif + if( pi_ != 0 ) { - new( static_cast< void* >( pi_ ) ) impl_type( p, a ); +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + std::allocator_traits::construct( a2, pi, p, a ); + +#else + + ::new( static_cast< void* >( pi_ ) ) impl_type( p, a ); + +#endif } else { diff --git a/boost/boost/smart_ptr/detail/shared_ptr_nmt.hpp b/boost/boost/smart_ptr/detail/shared_ptr_nmt.hpp deleted file mode 100644 index afc1ec03f1..0000000000 --- a/boost/boost/smart_ptr/detail/shared_ptr_nmt.hpp +++ /dev/null @@ -1,182 +0,0 @@ -#ifndef BOOST_SMART_PTR_DETAIL_SHARED_PTR_NMT_HPP_INCLUDED -#define BOOST_SMART_PTR_DETAIL_SHARED_PTR_NMT_HPP_INCLUDED - -// -// detail/shared_ptr_nmt.hpp - shared_ptr.hpp without member templates -// -// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. -// Copyright (c) 2001, 2002 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) -// -// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. -// - -#include -#include -#include -#include - -#ifndef BOOST_NO_AUTO_PTR -# include // for std::auto_ptr -#endif - -#include // for std::swap -#include // for std::less -#include // for std::bad_alloc - -namespace boost -{ - -template class shared_ptr -{ -private: - - typedef detail::atomic_count count_type; - -public: - - typedef T element_type; - typedef T value_type; - - explicit shared_ptr(T * p = 0): px(p) - { -#ifndef BOOST_NO_EXCEPTIONS - - try // prevent leak if new throws - { - pn = new count_type(1); - } - catch(...) - { - boost::checked_delete(p); - throw; - } - -#else - - pn = new count_type(1); - - if(pn == 0) - { - boost::checked_delete(p); - boost::throw_exception(std::bad_alloc()); - } - -#endif - } - - ~shared_ptr() - { - if(--*pn == 0) - { - boost::checked_delete(px); - delete pn; - } - } - - shared_ptr(shared_ptr const & r): px(r.px) // never throws - { - pn = r.pn; - ++*pn; - } - - shared_ptr & operator=(shared_ptr const & r) - { - shared_ptr(r).swap(*this); - return *this; - } - -#ifndef BOOST_NO_AUTO_PTR - - explicit shared_ptr(std::auto_ptr & r) - { - pn = new count_type(1); // may throw - px = r.release(); // fix: moved here to stop leak if new throws - } - - shared_ptr & operator=(std::auto_ptr & r) - { - shared_ptr(r).swap(*this); - return *this; - } - -#endif - - void reset(T * p = 0) - { - BOOST_ASSERT(p == 0 || p != px); - shared_ptr(p).swap(*this); - } - - T & operator*() const // never throws - { - BOOST_ASSERT(px != 0); - return *px; - } - - T * operator->() const // never throws - { - BOOST_ASSERT(px != 0); - return px; - } - - T * get() const // never throws - { - return px; - } - - long use_count() const // never throws - { - return *pn; - } - - bool unique() const // never throws - { - return *pn == 1; - } - - void swap(shared_ptr & other) // never throws - { - std::swap(px, other.px); - std::swap(pn, other.pn); - } - -private: - - T * px; // contained pointer - count_type * pn; // ptr to reference counter -}; - -template inline bool operator==(shared_ptr const & a, shared_ptr const & b) -{ - return a.get() == b.get(); -} - -template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) -{ - return a.get() != b.get(); -} - -template inline bool operator<(shared_ptr const & a, shared_ptr const & b) -{ - return std::less()(a.get(), b.get()); -} - -template void swap(shared_ptr & a, shared_ptr & b) -{ - a.swap(b); -} - -// get_pointer() enables boost::mem_fn to recognize shared_ptr - -template inline T * get_pointer(shared_ptr const & p) -{ - return p.get(); -} - -} // namespace boost - -#endif // #ifndef BOOST_SMART_PTR_DETAIL_SHARED_PTR_NMT_HPP_INCLUDED diff --git a/boost/boost/smart_ptr/detail/sp_convertible.hpp b/boost/boost/smart_ptr/detail/sp_convertible.hpp index 31b2627825..4bba9ed444 100644 --- a/boost/boost/smart_ptr/detail/sp_convertible.hpp +++ b/boost/boost/smart_ptr/detail/sp_convertible.hpp @@ -16,6 +16,7 @@ // http://www.boost.org/LICENSE_1_0.txt #include +#include #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( BOOST_NO_SFINAE ) # define BOOST_SP_NO_SP_CONVERTIBLE diff --git a/boost/boost/smart_ptr/detail/sp_counted_base.hpp b/boost/boost/smart_ptr/detail/sp_counted_base.hpp index 9ced2b95ea..0addf077d1 100644 --- a/boost/boost/smart_ptr/detail/sp_counted_base.hpp +++ b/boost/boost/smart_ptr/detail/sp_counted_base.hpp @@ -10,7 +10,7 @@ // // detail/sp_counted_base.hpp // -// Copyright 2005, 2006 Peter Dimov +// Copyright 2005-2013 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at @@ -20,9 +20,18 @@ #include #include +#if defined( __clang__ ) && defined( __has_extension ) +# if __has_extension( __c_atomic__ ) +# define BOOST_SP_HAS_CLANG_C11_ATOMICS +# endif +#endif + #if defined( BOOST_SP_DISABLE_THREADS ) # include +#elif defined( BOOST_SP_USE_STD_ATOMIC ) +# include + #elif defined( BOOST_SP_USE_SPINLOCK ) # include @@ -32,6 +41,9 @@ #elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 ) # include +#elif defined( BOOST_SP_HAS_CLANG_C11_ATOMICS ) +# include + #elif defined( __SNC__ ) # include @@ -76,4 +88,6 @@ #endif +#undef BOOST_SP_HAS_CLANG_C11_ATOMICS + #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED diff --git a/boost/boost/smart_ptr/detail/sp_counted_base_clang.hpp b/boost/boost/smart_ptr/detail/sp_counted_base_clang.hpp new file mode 100644 index 0000000000..c66b985465 --- /dev/null +++ b/boost/boost/smart_ptr/detail/sp_counted_base_clang.hpp @@ -0,0 +1,140 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_counted_base_clang.hpp - __c11 clang intrinsics +// +// Copyright (c) 2007, 2013, 2015 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 + +namespace boost +{ + +namespace detail +{ + +typedef _Atomic( boost::int_least32_t ) atomic_int_least32_t; + +inline void atomic_increment( atomic_int_least32_t * pw ) +{ + __c11_atomic_fetch_add( pw, 1, __ATOMIC_RELAXED ); +} + +inline boost::int_least32_t atomic_decrement( atomic_int_least32_t * pw ) +{ + return __c11_atomic_fetch_sub( pw, 1, __ATOMIC_ACQ_REL ); +} + +inline boost::int_least32_t atomic_conditional_increment( atomic_int_least32_t * pw ) +{ + // long r = *pw; + // if( r != 0 ) ++*pw; + // return r; + + boost::int_least32_t r = __c11_atomic_load( pw, __ATOMIC_RELAXED ); + + for( ;; ) + { + if( r == 0 ) + { + return r; + } + + if( __c11_atomic_compare_exchange_weak( pw, &r, r + 1, __ATOMIC_RELAXED, __ATOMIC_RELAXED ) ) + { + return r; + } + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + atomic_int_least32_t use_count_; // #shared + atomic_int_least32_t weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base() + { + __c11_atomic_init( &use_count_, 1 ); + __c11_atomic_init( &weak_count_, 1 ); + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 1 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return __c11_atomic_load( const_cast< atomic_int_least32_t* >( &use_count_ ), __ATOMIC_ACQUIRE ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED diff --git a/boost/boost/smart_ptr/detail/sp_counted_base_pt.hpp b/boost/boost/smart_ptr/detail/sp_counted_base_pt.hpp index a742c3df58..a16d2d8652 100644 --- a/boost/boost/smart_ptr/detail/sp_counted_base_pt.hpp +++ b/boost/boost/smart_ptr/detail/sp_counted_base_pt.hpp @@ -19,6 +19,7 @@ // #include +#include #include namespace boost @@ -46,15 +47,15 @@ public: // HPUX 10.20 / DCE has a nonstandard pthread_mutex_init #if defined(__hpux) && defined(_DECTHREADS_) - pthread_mutex_init( &m_, pthread_mutexattr_default ); + BOOST_VERIFY( pthread_mutex_init( &m_, pthread_mutexattr_default ) == 0 ); #else - pthread_mutex_init( &m_, 0 ); + BOOST_VERIFY( pthread_mutex_init( &m_, 0 ) == 0 ); #endif } virtual ~sp_counted_base() // nothrow { - pthread_mutex_destroy( &m_ ); + BOOST_VERIFY( pthread_mutex_destroy( &m_ ) == 0 ); } // dispose() is called when use_count_ drops to zero, to release @@ -74,24 +75,24 @@ public: void add_ref_copy() { - pthread_mutex_lock( &m_ ); + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); ++use_count_; - pthread_mutex_unlock( &m_ ); + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); } bool add_ref_lock() // true on success { - pthread_mutex_lock( &m_ ); + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); bool r = use_count_ == 0? false: ( ++use_count_, true ); - pthread_mutex_unlock( &m_ ); + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); return r; } void release() // nothrow { - pthread_mutex_lock( &m_ ); + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); long new_use_count = --use_count_; - pthread_mutex_unlock( &m_ ); + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); if( new_use_count == 0 ) { @@ -102,16 +103,16 @@ public: void weak_add_ref() // nothrow { - pthread_mutex_lock( &m_ ); + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); ++weak_count_; - pthread_mutex_unlock( &m_ ); + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); } void weak_release() // nothrow { - pthread_mutex_lock( &m_ ); + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); long new_weak_count = --weak_count_; - pthread_mutex_unlock( &m_ ); + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); if( new_weak_count == 0 ) { @@ -121,9 +122,9 @@ public: long use_count() const // nothrow { - pthread_mutex_lock( &m_ ); + BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 ); long r = use_count_; - pthread_mutex_unlock( &m_ ); + BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 ); return r; } diff --git a/boost/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp b/boost/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp new file mode 100644 index 0000000000..cab8453591 --- /dev/null +++ b/boost/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp @@ -0,0 +1,137 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_counted_base_std_atomic.hpp - C++11 std::atomic +// +// Copyright (c) 2007, 2013 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 + +namespace boost +{ + +namespace detail +{ + +inline void atomic_increment( std::atomic_int_least32_t * pw ) +{ + pw->fetch_add( 1, std::memory_order_relaxed ); +} + +inline std::int_least32_t atomic_decrement( std::atomic_int_least32_t * pw ) +{ + return pw->fetch_sub( 1, std::memory_order_acq_rel ); +} + +inline std::int_least32_t atomic_conditional_increment( std::atomic_int_least32_t * pw ) +{ + // long r = *pw; + // if( r != 0 ) ++*pw; + // return r; + + std::int_least32_t r = pw->load( std::memory_order_relaxed ); + + for( ;; ) + { + if( r == 0 ) + { + return r; + } + + if( pw->compare_exchange_weak( r, r + 1, std::memory_order_relaxed, std::memory_order_relaxed ) ) + { + return r; + } + } +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + std::atomic_int_least32_t use_count_; // #shared + std::atomic_int_least32_t weak_count_; // #weak + (#shared != 0) + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() // nothrow + { + } + + // dispose() is called when use_count_ drops to zero, to release + // the resources managed by *this. + + virtual void dispose() = 0; // nothrow + + // destroy() is called when weak_count_ drops to zero. + + virtual void destroy() // nothrow + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + virtual void * get_untyped_deleter() = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() // true on success + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() // nothrow + { + if( atomic_decrement( &use_count_ ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() // nothrow + { + atomic_increment( &weak_count_ ); + } + + void weak_release() // nothrow + { + if( atomic_decrement( &weak_count_ ) == 1 ) + { + destroy(); + } + } + + long use_count() const // nothrow + { + return use_count_.load( std::memory_order_acquire ); + } +}; + +} // namespace detail + +} // namespace boost + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED diff --git a/boost/boost/smart_ptr/detail/sp_counted_base_w32.hpp b/boost/boost/smart_ptr/detail/sp_counted_base_w32.hpp index ff394dc6bc..4ba509c6cd 100644 --- a/boost/boost/smart_ptr/detail/sp_counted_base_w32.hpp +++ b/boost/boost/smart_ptr/detail/sp_counted_base_w32.hpp @@ -24,7 +24,7 @@ // formulation // -#include +#include #include #include @@ -71,7 +71,7 @@ public: void add_ref_copy() { - BOOST_INTERLOCKED_INCREMENT( &use_count_ ); + BOOST_SP_INTERLOCKED_INCREMENT( &use_count_ ); } bool add_ref_lock() // true on success @@ -86,11 +86,11 @@ public: // work around a code generation bug long tmp2 = tmp + 1; - if( BOOST_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp2, tmp ) == tmp2 - 1 ) return true; + if( BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp2, tmp ) == tmp2 - 1 ) return true; #else - if( BOOST_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp + 1, tmp ) == tmp ) return true; + if( BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp + 1, tmp ) == tmp ) return true; #endif } @@ -98,7 +98,7 @@ public: void release() // nothrow { - if( BOOST_INTERLOCKED_DECREMENT( &use_count_ ) == 0 ) + if( BOOST_SP_INTERLOCKED_DECREMENT( &use_count_ ) == 0 ) { dispose(); weak_release(); @@ -107,12 +107,12 @@ public: void weak_add_ref() // nothrow { - BOOST_INTERLOCKED_INCREMENT( &weak_count_ ); + BOOST_SP_INTERLOCKED_INCREMENT( &weak_count_ ); } void weak_release() // nothrow { - if( BOOST_INTERLOCKED_DECREMENT( &weak_count_ ) == 0 ) + if( BOOST_SP_INTERLOCKED_DECREMENT( &weak_count_ ) == 0 ) { destroy(); } diff --git a/boost/boost/smart_ptr/detail/sp_counted_impl.hpp b/boost/boost/smart_ptr/detail/sp_counted_impl.hpp index d15cd3cf1c..1222f3c9f4 100644 --- a/boost/boost/smart_ptr/detail/sp_counted_impl.hpp +++ b/boost/boost/smart_ptr/detail/sp_counted_impl.hpp @@ -78,7 +78,7 @@ public: boost::checked_delete( px_ ); } - virtual void * get_deleter( detail::sp_typeinfo const & ) + virtual void * get_deleter( sp_typeinfo const & ) { return 0; } @@ -153,7 +153,7 @@ public: del( ptr ); } - virtual void * get_deleter( detail::sp_typeinfo const & ti ) + virtual void * get_deleter( sp_typeinfo const & ti ) { return ti == BOOST_SP_TYPEID(D)? &reinterpret_cast( del ): 0; } @@ -213,7 +213,7 @@ public: { } - sp_counted_impl_pda( P p, A a ): p_( p ), d_(), a_( a ) + sp_counted_impl_pda( P p, A a ): p_( p ), d_( a ), a_( a ) { } @@ -224,15 +224,32 @@ public: virtual void destroy() // nothrow { +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + typedef typename std::allocator_traits::template rebind_alloc< this_type > A2; + +#else + typedef typename A::template rebind< this_type >::other A2; +#endif + A2 a2( a_ ); +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + std::allocator_traits::destroy( a2, this ); + +#else + this->~this_type(); + +#endif + a2.deallocate( this, 1 ); } - virtual void * get_deleter( detail::sp_typeinfo const & ti ) + virtual void * get_deleter( sp_typeinfo const & ti ) { return ti == BOOST_SP_TYPEID( D )? &reinterpret_cast( d_ ): 0; } diff --git a/boost/boost/smart_ptr/detail/sp_forward.hpp b/boost/boost/smart_ptr/detail/sp_forward.hpp index 5f1d190cef..8fdec65b7f 100644 --- a/boost/boost/smart_ptr/detail/sp_forward.hpp +++ b/boost/boost/smart_ptr/detail/sp_forward.hpp @@ -25,6 +25,17 @@ namespace detail #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) +#if defined( BOOST_GCC ) && __GNUC__ * 100 + __GNUC_MINOR__ <= 404 + +// GCC 4.4 supports an outdated version of rvalue references and creates a copy of the forwarded object. +// This results in warnings 'returning reference to temporary'. Therefore we use a special version similar to std::forward. +template< class T > T&& sp_forward( T && t ) BOOST_NOEXCEPT +{ + return t; +} + +#else + template< class T > T&& sp_forward( T & t ) BOOST_NOEXCEPT { return static_cast< T&& >( t ); @@ -32,6 +43,8 @@ template< class T > T&& sp_forward( T & t ) BOOST_NOEXCEPT #endif +#endif + } // namespace detail } // namespace boost diff --git a/boost/boost/smart_ptr/detail/sp_if_array.hpp b/boost/boost/smart_ptr/detail/sp_if_array.hpp index 661e1785ec..9a2c1e0baa 100644 --- a/boost/boost/smart_ptr/detail/sp_if_array.hpp +++ b/boost/boost/smart_ptr/detail/sp_if_array.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Glen Joseph Fernandes + * Copyright (c) 2012-2014 Glen Joseph Fernandes * glenfe at live dot com * * Distributed under the Boost Software License, @@ -13,15 +13,18 @@ namespace boost { namespace detail { - template + template struct sp_if_array; - template + + template struct sp_if_array { typedef boost::shared_ptr type; }; - template + + template struct sp_if_size_array; - template + + template struct sp_if_size_array { typedef boost::shared_ptr type; }; diff --git a/boost/boost/smart_ptr/detail/sp_interlocked.hpp b/boost/boost/smart_ptr/detail/sp_interlocked.hpp new file mode 100644 index 0000000000..814b0c2e93 --- /dev/null +++ b/boost/boost/smart_ptr/detail/sp_interlocked.hpp @@ -0,0 +1,152 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/sp_interlocked.hpp +// +// Copyright 2005, 2014 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 + +// BOOST_SP_HAS_INTRIN_H + +// VC9 has intrin.h, but it collides with +#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600 + +# define BOOST_SP_HAS_INTRIN_H + +// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets. +#elif defined( __MINGW64_VERSION_MAJOR ) + +// MinGW-w64 provides intrin.h for both 32 and 64-bit targets. +# define BOOST_SP_HAS_INTRIN_H + +// Intel C++ on Windows on VC10+ stdlib +#elif defined( BOOST_INTEL_WIN ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520 + +# define BOOST_SP_HAS_INTRIN_H + +#endif + +#if defined( BOOST_USE_WINDOWS_H ) + +# include + +# define BOOST_SP_INTERLOCKED_INCREMENT InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd + +#elif defined( BOOST_USE_INTRIN_H ) || defined( BOOST_SP_HAS_INTRIN_H ) + +#include + +# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd + +#elif defined( _WIN32_WCE ) + +#if _WIN32_WCE >= 0x600 + +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 ); + +# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd + +#else + +// 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_SP_INTERLOCKED_INCREMENT InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd + +#endif + +#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 ); + +#endif + +# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd + +#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ ) + +namespace boost +{ + +namespace detail +{ + +extern "C" __declspec(dllimport) long __stdcall InterlockedIncrement( long volatile * ); +extern "C" __declspec(dllimport) long __stdcall InterlockedDecrement( long volatile * ); +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 + +# define BOOST_SP_INTERLOCKED_INCREMENT ::boost::detail::InterlockedIncrement +# define BOOST_SP_INTERLOCKED_DECREMENT ::boost::detail::InterlockedDecrement +# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE ::boost::detail::InterlockedCompareExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange +# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd + +#else + +# error "Interlocked intrinsics not available" + +#endif + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED diff --git a/boost/boost/smart_ptr/detail/sp_nullptr_t.hpp b/boost/boost/smart_ptr/detail/sp_nullptr_t.hpp index ccbb1238fe..219ae8070a 100644 --- a/boost/boost/smart_ptr/detail/sp_nullptr_t.hpp +++ b/boost/boost/smart_ptr/detail/sp_nullptr_t.hpp @@ -26,7 +26,7 @@ namespace boost namespace detail { -#if defined( __clang__ ) && !defined( _LIBCPP_VERSION ) && !defined( BOOST_NO_CXX11_DECLTYPE ) +#if !defined( BOOST_NO_CXX11_DECLTYPE ) && ( ( defined( __clang__ ) && !defined( _LIBCPP_VERSION ) ) || defined( __INTEL_COMPILER ) ) typedef decltype(nullptr) sp_nullptr_t; diff --git a/boost/boost/smart_ptr/detail/spinlock.hpp b/boost/boost/smart_ptr/detail/spinlock.hpp index 88d7ad62c7..19f93d7c6b 100644 --- a/boost/boost/smart_ptr/detail/spinlock.hpp +++ b/boost/boost/smart_ptr/detail/spinlock.hpp @@ -31,7 +31,16 @@ #include #include -#if defined( BOOST_SP_USE_PTHREADS ) +#if defined( BOOST_SP_USE_STD_ATOMIC ) +# if !defined( __clang__ ) +# include +# else +// Clang (at least up to 3.4) can't compile spinlock_pool when +// using std::atomic, so substitute the __sync implementation instead. +# include +# endif + +#elif defined( BOOST_SP_USE_PTHREADS ) # include #elif defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ ) diff --git a/boost/boost/smart_ptr/detail/spinlock_pool.hpp b/boost/boost/smart_ptr/detail/spinlock_pool.hpp index f09d5c6401..39cf180b24 100644 --- a/boost/boost/smart_ptr/detail/spinlock_pool.hpp +++ b/boost/boost/smart_ptr/detail/spinlock_pool.hpp @@ -31,7 +31,7 @@ namespace boost namespace detail { -template< int I > class spinlock_pool +template< int M > class spinlock_pool { private: @@ -72,7 +72,7 @@ public: }; }; -template< int I > spinlock spinlock_pool< I >::pool_[ 41 ] = +template< int M > spinlock spinlock_pool< M >::pool_[ 41 ] = { BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, diff --git a/boost/boost/smart_ptr/detail/spinlock_std_atomic.hpp b/boost/boost/smart_ptr/detail/spinlock_std_atomic.hpp new file mode 100644 index 0000000000..a61c1cd96d --- /dev/null +++ b/boost/boost/smart_ptr/detail/spinlock_std_atomic.hpp @@ -0,0 +1,83 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_STD_ATOMIC_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SPINLOCK_STD_ATOMIC_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// Copyright (c) 2014 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 + +namespace boost +{ + +namespace detail +{ + +class spinlock +{ +public: + + std::atomic_flag v_; + +public: + + bool try_lock() + { + return !v_.test_and_set( std::memory_order_acquire ); + } + + void lock() + { + for( unsigned k = 0; !try_lock(); ++k ) + { + boost::detail::yield( k ); + } + } + + void unlock() + { + v_ .clear( std::memory_order_release ); + } + +public: + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( spinlock & sp ): sp_( sp ) + { + sp.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +} // namespace detail +} // namespace boost + +#define BOOST_DETAIL_SPINLOCK_INIT { ATOMIC_FLAG_INIT } + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_STD_ATOMIC_HPP_INCLUDED diff --git a/boost/boost/smart_ptr/detail/spinlock_w32.hpp b/boost/boost/smart_ptr/detail/spinlock_w32.hpp index fb97629c7c..d34e4fc2b5 100644 --- a/boost/boost/smart_ptr/detail/spinlock_w32.hpp +++ b/boost/boost/smart_ptr/detail/spinlock_w32.hpp @@ -15,7 +15,7 @@ // http://www.boost.org/LICENSE_1_0.txt) // -#include +#include #include // BOOST_COMPILER_FENCE @@ -59,7 +59,7 @@ public: bool try_lock() { - long r = BOOST_INTERLOCKED_EXCHANGE( &v_, 1 ); + long r = BOOST_SP_INTERLOCKED_EXCHANGE( &v_, 1 ); BOOST_COMPILER_FENCE diff --git a/boost/boost/smart_ptr/detail/yield_k.hpp b/boost/boost/smart_ptr/detail/yield_k.hpp index 14af524944..2dabc9f443 100644 --- a/boost/boost/smart_ptr/detail/yield_k.hpp +++ b/boost/boost/smart_ptr/detail/yield_k.hpp @@ -11,6 +11,7 @@ // yield_k.hpp // // Copyright (c) 2008 Peter Dimov +// Copyright (c) Microsoft Corporation 2014 // // void yield( unsigned k ); // @@ -24,6 +25,11 @@ // #include +#include + +#if BOOST_PLAT_WINDOWS_RUNTIME +#include +#endif // BOOST_SMT_PAUSE @@ -53,7 +59,7 @@ namespace boost namespace detail { -#if !defined( BOOST_USE_WINDOWS_H ) +#if !defined( BOOST_USE_WINDOWS_H ) && !BOOST_PLAT_WINDOWS_RUNTIME extern "C" void __stdcall Sleep( unsigned long ms ); #endif @@ -68,6 +74,7 @@ inline void yield( unsigned k ) BOOST_SMT_PAUSE } #endif +#if !BOOST_PLAT_WINDOWS_RUNTIME else if( k < 32 ) { Sleep( 0 ); @@ -76,6 +83,13 @@ inline void yield( unsigned k ) { Sleep( 1 ); } +#else + else + { + // Sleep isn't supported on the Windows Runtime. + std::this_thread::yield(); + } +#endif } } // namespace detail @@ -84,7 +98,13 @@ inline void yield( unsigned k ) #elif defined( BOOST_HAS_PTHREADS ) +#ifndef _AIX #include +#else + // AIX's sched.h defines ::var which sometimes conflicts with Lambda's var + extern "C" int sched_yield(void); +#endif + #include namespace boost diff --git a/boost/boost/smart_ptr/enable_shared_from_this.hpp b/boost/boost/smart_ptr/enable_shared_from_this.hpp index 3230f02579..4e3f243d28 100644 --- a/boost/boost/smart_ptr/enable_shared_from_this.hpp +++ b/boost/boost/smart_ptr/enable_shared_from_this.hpp @@ -58,6 +58,16 @@ public: return p; } + weak_ptr weak_from_this() BOOST_NOEXCEPT + { + return weak_this_; + } + + weak_ptr weak_from_this() const BOOST_NOEXCEPT + { + return weak_this_; + } + public: // actually private, but avoids compiler template friendship issues // Note: invoked automatically by shared_ptr; do not call diff --git a/boost/boost/smart_ptr/intrusive_ptr.hpp b/boost/boost/smart_ptr/intrusive_ptr.hpp index b6f5bcd53a..e5db609976 100644 --- a/boost/boost/smart_ptr/intrusive_ptr.hpp +++ b/boost/boost/smart_ptr/intrusive_ptr.hpp @@ -146,11 +146,23 @@ public: this_type( rhs ).swap( *this ); } + void reset( T * rhs, bool add_ref ) + { + this_type( rhs, add_ref ).swap( *this ); + } + T * get() const BOOST_NOEXCEPT { return px; } + T * detach() BOOST_NOEXCEPT + { + T * ret = px; + px = 0; + return ret; + } + T & operator*() const { BOOST_ASSERT( px != 0 ); diff --git a/boost/boost/smart_ptr/make_shared_array.hpp b/boost/boost/smart_ptr/make_shared_array.hpp index eb0578d9ff..c48f5070b6 100644 --- a/boost/boost/smart_ptr/make_shared_array.hpp +++ b/boost/boost/smart_ptr/make_shared_array.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Glen Joseph Fernandes + * Copyright (c) 2012-2014 Glen Joseph Fernandes * glenfe at live dot com * * Distributed under the Boost Software License, @@ -9,238 +9,149 @@ #ifndef BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP #define BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP -#include -#include -#include -#include +#include #include -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) -#include -#endif namespace boost { - template + template inline typename boost::detail::sp_if_array::type make_shared(std::size_t size) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; - T1* p1 = 0; - T2* p2 = 0; + typedef boost::detail::ms_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; std::size_t n1 = size * boost::detail::array_total::size; - boost::detail::make_array_helper a1(n1, &p2); - boost::detail::array_deleter d1(n1); - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; - p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->init(p2); - return boost::shared_ptr(s1, p1); - } -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - template - inline typename boost::detail::sp_if_array::type - make_shared(std::size_t size, Args&&... args) { - typedef typename boost::detail::array_inner::type T1; - typedef typename boost::detail::array_base::type T2; - T1* p1 = 0; - T2* p2 = 0; - std::size_t n1 = size * boost::detail::array_total::size; - boost::detail::make_array_helper a1(n1, &p2); - boost::detail::array_deleter d1(n1); - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; - p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->init(p2, boost::detail::sp_forward(args)...); - return boost::shared_ptr(s1, p1); - } - template - inline typename boost::detail::sp_if_size_array::type - make_shared(Args&&... args) { - typedef typename boost::detail::array_inner::type T1; - typedef typename boost::detail::array_base::type T2; - enum { - N = boost::detail::array_total::size - }; T1* p1 = 0; T2* p2 = 0; - boost::detail::make_array_helper a1(&p2); - boost::detail::array_deleter d1; - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; + D1 d1; + A1 a1(size, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); + boost::detail::ms_init(p2, n1); + a2->set(p2); p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->init(p2, boost::detail::sp_forward(args)...); - return boost::shared_ptr(s1, p1); + return shared_ptr(s1, p1); } -#endif -#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) - template + + template inline typename boost::detail::sp_if_size_array::type - make_shared(const T& list) { + make_shared() { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; - typedef const T2 T3; + typedef boost::detail::ms_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; enum { N = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; - T3* p3 = 0; - boost::detail::make_array_helper a1(&p2); - boost::detail::array_deleter d1; - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; - p3 = reinterpret_cast(list); + D1 d1; + A1 a1(&p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); + boost::detail::ms_init(p2, N); + a2->set(p2); p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->init_list(p2, p3); - return boost::shared_ptr(s1, p1); + return shared_ptr(s1, p1); } - template + + template inline typename boost::detail::sp_if_array::type make_shared(std::size_t size, - const typename boost::detail::array_inner::type& list) { + const typename boost::detail::array_inner::type& value) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; typedef const T2 T3; + typedef boost::detail::ms_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; enum { M = boost::detail::array_total::size }; + std::size_t n1 = M * size; T1* p1 = 0; T2* p2 = 0; - T3* p3 = 0; - std::size_t n1 = M * size; - boost::detail::make_array_helper a1(n1, &p2); - boost::detail::array_deleter d1(n1); - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; - p3 = reinterpret_cast(list); + T3* p3 = reinterpret_cast(&value); + D1 d1; + A1 a1(size, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); + boost::detail::ms_init(p2, n1, p3); + a2->set(p2); p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->template init_list(p2, p3); - return boost::shared_ptr(s1, p1); + return shared_ptr(s1, p1); } - template + + template inline typename boost::detail::sp_if_size_array::type - make_shared(const typename boost::detail::array_inner::type& list) { + make_shared(const typename boost::detail::array_inner::type& value) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; typedef const T2 T3; + typedef boost::detail::ms_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; enum { M = boost::detail::array_total::size, N = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; - T3* p3 = 0; - boost::detail::make_array_helper a1(&p2); - boost::detail::array_deleter d1; - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; - p3 = reinterpret_cast(list); - p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->template init_list(p2, p3); - return boost::shared_ptr(s1, p1); - } -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - template - inline typename boost::detail::sp_if_array::type - make_shared(std::initializer_list::type> list) { - typedef typename boost::detail::array_inner::type T1; - typedef typename boost::detail::array_base::type T2; - typedef const T2 T3; - T1* p1 = 0; - T2* p2 = 0; - T3* p3 = 0; - std::size_t n1 = list.size() * boost::detail::array_total::size; - boost::detail::make_array_helper a1(n1, &p2); - boost::detail::array_deleter d1(n1); - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; - p3 = reinterpret_cast(list.begin()); - p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->init_list(p2, p3); - return boost::shared_ptr(s1, p1); - } -#endif -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - template - inline typename boost::detail::sp_if_array::type - make_shared(std::size_t size, - typename boost::detail::array_base::type&& value) { - typedef typename boost::detail::array_inner::type T1; - typedef typename boost::detail::array_base::type T2; - T1* p1 = 0; - T2* p2 = 0; - std::size_t n1 = size * boost::detail::array_total::size; - boost::detail::make_array_helper a1(n1, &p2); - boost::detail::array_deleter d1(n1); - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; - p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->init(p2, boost::detail::sp_forward(value)); - return boost::shared_ptr(s1, p1); - } - template - inline typename boost::detail::sp_if_size_array::type - make_shared(typename boost::detail::array_base::type&& value) { - typedef typename boost::detail::array_inner::type T1; - typedef typename boost::detail::array_base::type T2; - enum { - N = boost::detail::array_total::size - }; - T1* p1 = 0; - T2* p2 = 0; - boost::detail::make_array_helper a1(&p2); - boost::detail::array_deleter d1; - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; + T3* p3 = reinterpret_cast(&value); + D1 d1; + A1 a1(&p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); + boost::detail::ms_init(p2, N, p3); + a2->set(p2); p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->init(p2, boost::detail::sp_forward(value)); - return boost::shared_ptr(s1, p1); + return shared_ptr(s1, p1); } -#endif -#endif - template + + template inline typename boost::detail::sp_if_array::type make_shared_noinit(std::size_t size) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; + typedef boost::detail::ms_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; + std::size_t n1 = size * boost::detail::array_total::size; T1* p1 = 0; T2* p2 = 0; - std::size_t n1 = size * boost::detail::array_total::size; - boost::detail::make_array_helper a1(n1, &p2); - boost::detail::array_deleter d1(n1); - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; + D1 d1; + A1 a1(size, &p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); + boost::detail::ms_noinit(p2, n1); + a2->set(p2); p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->noinit(p2); - return boost::shared_ptr(s1, p1); + return shared_ptr(s1, p1); } - template + + template inline typename boost::detail::sp_if_size_array::type make_shared_noinit() { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; + typedef boost::detail::ms_allocator A1; + typedef boost::detail::ms_in_allocator_tag D1; enum { N = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; - boost::detail::make_array_helper a1(&p2); - boost::detail::array_deleter d1; - boost::shared_ptr s1(p1, d1, a1); - typedef boost::detail::array_deleter* D2; + D1 d1; + A1 a1(&p2); + shared_ptr s1(p1, d1, a1); + A1* a2 = static_cast(s1._internal_get_untyped_deleter()); + a2->set(0); + boost::detail::ms_noinit(p2, N); + a2->set(p2); p1 = reinterpret_cast(p2); - D2 d2 = static_cast(s1._internal_get_untyped_deleter()); - d2->noinit(p2); - return boost::shared_ptr(s1, p1); + return shared_ptr(s1, p1); } } diff --git a/boost/boost/smart_ptr/make_shared_object.hpp b/boost/boost/smart_ptr/make_shared_object.hpp index 52a00cecd9..62372fa7ef 100644 --- a/boost/boost/smart_ptr/make_shared_object.hpp +++ b/boost/boost/smart_ptr/make_shared_object.hpp @@ -72,6 +72,10 @@ public: { } + template explicit sp_ms_deleter( A const & ) BOOST_NOEXCEPT : initialized_( false ) + { + } + // optimization: do not copy storage_ sp_ms_deleter( sp_ms_deleter const & ) BOOST_NOEXCEPT : initialized_( false ) { @@ -102,6 +106,74 @@ public: } }; +template< class T, class A > class sp_as_deleter +{ +private: + + typedef typename sp_aligned_storage< sizeof( T ), ::boost::alignment_of< T >::value >::type storage_type; + + storage_type storage_; + A a_; + bool initialized_; + +private: + + void destroy() + { + if( initialized_ ) + { + T * p = reinterpret_cast< T* >( storage_.data_ ); + +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + std::allocator_traits::destroy( a_, p ); + +#else + + p->~T(); + +#endif + + initialized_ = false; + } + } + +public: + + sp_as_deleter( A const & a ) BOOST_NOEXCEPT : a_( a ), initialized_( false ) + { + } + + // optimization: do not copy storage_ + sp_as_deleter( sp_as_deleter const & r ) BOOST_NOEXCEPT : a_( r.a_), initialized_( false ) + { + } + + ~sp_as_deleter() + { + destroy(); + } + + void operator()( T * ) + { + destroy(); + } + + static void operator_fn( T* ) // operator() can't be static + { + } + + void * address() BOOST_NOEXCEPT + { + return storage_.data_; + } + + void set_initialized() BOOST_NOEXCEPT + { + initialized_ = true; + } +}; + template< class T > struct sp_if_not_array { typedef boost::shared_ptr< T > type; @@ -131,11 +203,9 @@ template< class T, std::size_t N > struct sp_if_not_array< T[N] > # define BOOST_SP_MSD( T ) boost::detail::sp_ms_deleter< T >() #endif -// Zero-argument versions -// -// Used even when variadic templates are available because of the new T() vs new T issue +// _noinit versions -template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared() +template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared_noinit() { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); @@ -143,7 +213,7 @@ template< class T > typename boost::detail::sp_if_not_array< T >::type make_shar void * pv = pd->address(); - ::new( pv ) T(); + ::new( pv ) T; pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); @@ -152,9 +222,9 @@ template< class T > typename boost::detail::sp_if_not_array< T >::type make_shar return boost::shared_ptr< T >( pt, pt2 ); } -template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared_noinit() +template< class T, class A > typename boost::detail::sp_if_not_array< T >::type allocate_shared_noinit( A const & a ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); @@ -169,15 +239,19 @@ template< class T > typename boost::detail::sp_if_not_array< T >::type make_shar return boost::shared_ptr< T >( pt, pt2 ); } -template< class T, class A > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a ) +#if !defined( BOOST_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + +// Variadic templates, rvalue reference + +template< class T, class... Args > typename boost::detail::sp_if_not_array< T >::type make_shared( Args && ... args ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T(); + ::new( pv ) T( boost::detail::sp_forward( args )... ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); @@ -186,15 +260,38 @@ template< class T, class A > typename boost::detail::sp_if_not_array< T >::type return boost::shared_ptr< T >( pt, pt2 ); } -template< class T, class A > typename boost::detail::sp_if_not_array< T >::type allocate_shared_noinit( A const & a ) +template< class T, class A, class... Args > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, Args && ... args ) { - boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) - boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); + typedef typename std::allocator_traits::template rebind_alloc A2; + A2 a2( a ); + + typedef boost::detail::sp_as_deleter< T, A2 > D; + + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_inplace_tag(), a2 ); + +#else + + typedef boost::detail::sp_ms_deleter< T > D; + boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_inplace_tag(), a ); + +#endif + + D * pd = static_cast< D* >( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); - ::new( pv ) T; +#if !defined( BOOST_NO_CXX11_ALLOCATOR ) + + std::allocator_traits::construct( a2, static_cast< T* >( pv ), boost::detail::sp_forward( args )... ); + +#else + + ::new( pv ) T( boost::detail::sp_forward( args )... ); + +#endif + pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); @@ -203,11 +300,11 @@ template< class T, class A > typename boost::detail::sp_if_not_array< T >::type return boost::shared_ptr< T >( pt, pt2 ); } -#if !defined( BOOST_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) +#else // !defined( BOOST_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) -// Variadic templates, rvalue reference +// Common zero-argument versions -template< class T, class Arg1, class... Args > typename boost::detail::sp_if_not_array< T >::type make_shared( Arg1 && arg1, Args && ... args ) +template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared() { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); @@ -215,7 +312,7 @@ template< class T, class Arg1, class... Args > typename boost::detail::sp_if_not void * pv = pd->address(); - ::new( pv ) T( boost::detail::sp_forward( arg1 ), boost::detail::sp_forward( args )... ); + ::new( pv ) T(); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); @@ -224,7 +321,7 @@ template< class T, class Arg1, class... Args > typename boost::detail::sp_if_not return boost::shared_ptr< T >( pt, pt2 ); } -template< class T, class A, class Arg1, class... Args > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, Arg1 && arg1, Args && ... args ) +template< class T, class A > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); @@ -232,7 +329,7 @@ template< class T, class A, class Arg1, class... Args > typename boost::detail:: void * pv = pd->address(); - ::new( pv ) T( boost::detail::sp_forward( arg1 ), boost::detail::sp_forward( args )... ); + ::new( pv ) T(); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); @@ -241,7 +338,7 @@ template< class T, class A, class Arg1, class... Args > typename boost::detail:: return boost::shared_ptr< T >( pt, pt2 ); } -#elif !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) +#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) // For example MSVC 10.0 @@ -695,7 +792,7 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, return boost::shared_ptr< T >( pt, pt2 ); } -#else +#else // !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) // C++03 version @@ -1023,7 +1120,9 @@ typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, return boost::shared_ptr< T >( pt, pt2 ); } -#endif +#endif // !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) + +#endif // !defined( BOOST_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) #undef BOOST_SP_MSD diff --git a/boost/boost/smart_ptr/shared_array.hpp b/boost/boost/smart_ptr/shared_array.hpp index 73a07ae1b2..fd58071be0 100644 --- a/boost/boost/smart_ptr/shared_array.hpp +++ b/boost/boost/smart_ptr/shared_array.hpp @@ -16,10 +16,6 @@ #include // for broken compiler workarounds -#if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) -#include -#else - #include // TR1 cyclic inclusion fix #include @@ -61,6 +57,14 @@ public: { } +#if !defined( BOOST_NO_CXX11_NULLPTR ) + + shared_array( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT : px( 0 ), pn() + { + } + +#endif + template explicit shared_array( Y * p ): px( p ), pn( p, checked_array_deleter() ) { @@ -285,6 +289,4 @@ template< class D, class T > D * get_deleter( shared_array const & p ) } // namespace boost -#endif // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) - #endif // #ifndef BOOST_SMART_PTR_SHARED_ARRAY_HPP_INCLUDED diff --git a/boost/boost/smart_ptr/shared_ptr.hpp b/boost/boost/smart_ptr/shared_ptr.hpp index 9259ca0f06..8be92abb5d 100644 --- a/boost/boost/smart_ptr/shared_ptr.hpp +++ b/boost/boost/smart_ptr/shared_ptr.hpp @@ -16,10 +16,6 @@ #include // for broken compiler workarounds -#if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) -#include -#else - // In order to avoid circular dependencies with Boost.TR1 // we make sure that our include of doesn't try to // pull in the TR1 headers: that's why we use this header @@ -36,7 +32,6 @@ #if !defined(BOOST_SP_NO_ATOMIC_ACCESS) #include -#include #endif #include // for std::swap @@ -660,7 +655,7 @@ public: BOOST_ASSERT( px != 0 ); BOOST_ASSERT( i >= 0 && ( i < boost::detail::sp_extent< T >::value || boost::detail::sp_extent< T >::value == 0 ) ); - return px[ i ]; + return static_cast< typename boost::detail::sp_array_access< T >::type >( px[ i ] ); } element_type * get() const BOOST_NOEXCEPT @@ -898,7 +893,7 @@ class esft2_deleter_wrapper { private: - shared_ptr deleter_; + shared_ptr deleter_; public: @@ -955,7 +950,7 @@ template shared_ptr atomic_load( shared_ptr const * p ) return *p; } -template inline shared_ptr atomic_load_explicit( shared_ptr const * p, memory_order /*mo*/ ) +template inline shared_ptr atomic_load_explicit( shared_ptr const * p, /*memory_order mo*/ int ) { return atomic_load( p ); } @@ -966,7 +961,7 @@ template void atomic_store( shared_ptr * p, shared_ptr r ) p->swap( r ); } -template inline void atomic_store_explicit( shared_ptr * p, shared_ptr r, memory_order /*mo*/ ) +template inline void atomic_store_explicit( shared_ptr * p, shared_ptr r, /*memory_order mo*/ int ) { atomic_store( p, r ); // std::move( r ) } @@ -982,7 +977,7 @@ template shared_ptr atomic_exchange( shared_ptr * p, shared_ptr shared_ptr atomic_exchange_explicit( shared_ptr * p, shared_ptr r, memory_order /*mo*/ ) +template shared_ptr atomic_exchange_explicit( shared_ptr * p, shared_ptr r, /*memory_order mo*/ int ) { return atomic_exchange( p, r ); // std::move( r ) } @@ -1012,7 +1007,7 @@ template bool atomic_compare_exchange( shared_ptr * p, shared_ptr } } -template inline bool atomic_compare_exchange_explicit( shared_ptr * p, shared_ptr * v, shared_ptr w, memory_order /*success*/, memory_order /*failure*/ ) +template inline bool atomic_compare_exchange_explicit( shared_ptr * p, shared_ptr * v, shared_ptr w, /*memory_order success*/ int, /*memory_order failure*/ int ) { return atomic_compare_exchange( p, v, w ); // std::move( w ) } @@ -1030,6 +1025,4 @@ template< class T > std::size_t hash_value( boost::shared_ptr const & p ) BOO } // namespace boost -#endif // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) - #endif // #ifndef BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED diff --git a/boost/boost/swap.hpp b/boost/boost/swap.hpp index dfc11f059d..55cafa4fdd 100644 --- a/boost/boost/swap.hpp +++ b/boost/boost/swap.hpp @@ -1,12 +1,17 @@ -// Copyright (C) 2007 Joseph Gauterin -// -// 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) +/* + * Copyright (c) 2014 Glen Fernandes + * + * 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) + */ #ifndef BOOST_SWAP_HPP #define BOOST_SWAP_HPP -#include "boost/utility/swap.hpp" +// The header file at this path is deprecated; +// use boost/core/swap.hpp instead. + +#include #endif diff --git a/boost/boost/throw_exception.hpp b/boost/boost/throw_exception.hpp index 200683ec25..aa977dfc79 100644 --- a/boost/boost/throw_exception.hpp +++ b/boost/boost/throw_exception.hpp @@ -26,7 +26,6 @@ // http://www.boost.org/libs/utility/throw_exception.html // -#include #include #include #include @@ -60,7 +59,7 @@ void throw_exception( std::exception const & e ); // user defined inline void throw_exception_assert_compatibility( std::exception const & ) { } -template BOOST_ATTRIBUTE_NORETURN inline void throw_exception( E const & e ) +template BOOST_NORETURN inline void throw_exception( E const & e ) { //All boost exceptions are required to derive from std::exception, //to ensure compatibility with BOOST_NO_EXCEPTIONS. @@ -80,7 +79,7 @@ template BOOST_ATTRIBUTE_NORETURN inline void throw_exception( E const exception_detail { template - BOOST_ATTRIBUTE_NORETURN + BOOST_NORETURN void throw_exception_( E const & x, char const * current_function, char const * file, int line ) { diff --git a/boost/boost/token_functions.hpp b/boost/boost/token_functions.hpp index 98ea80b009..be245a047f 100644 --- a/boost/boost/token_functions.hpp +++ b/boost/boost/token_functions.hpp @@ -40,6 +40,7 @@ #include #include #include +#include #if !defined(BOOST_NO_CWCTYPE) #include #endif @@ -125,7 +126,7 @@ namespace boost{ template void do_escape(iterator& next,iterator end,Token& tok) { if (++next == end) - throw escaped_list_error(std::string("cannot end with escape")); + BOOST_THROW_EXCEPTION(escaped_list_error(std::string("cannot end with escape"))); if (Traits::eq(*next,'n')) { tok+='\n'; return; @@ -143,7 +144,7 @@ namespace boost{ return; } else - throw escaped_list_error(std::string("unknown escape sequence")); + BOOST_THROW_EXCEPTION(escaped_list_error(std::string("unknown escape sequence"))); } public: @@ -278,22 +279,7 @@ namespace boost{ struct assign_or_plus_equal { template static void assign(Iterator b, Iterator e, Token &t) { - -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) &&\ - BOOST_WORKAROUND(__SGI_STL_PORT, < 0x500) &&\ - defined(_STLP_DEBUG) &&\ - (defined(_STLP_USE_DYNAMIC_LIB) || defined(_DLL)) - // Problem with string::assign for msvc-stlport in debug mode: the - // linker tries to import the templatized version of this memfun, - // which is obviously not exported. - // See http://www.stlport.com/dcforum/DCForumID6/1763.html for details. - - t = Token(); - while(b != e) t += *b++; -#else t.assign(b, e); -#endif - } template diff --git a/boost/boost/token_iterator.hpp b/boost/boost/token_iterator.hpp index 19b1db26c8..584fac28f4 100644 --- a/boost/boost/token_iterator.hpp +++ b/boost/boost/token_iterator.hpp @@ -18,11 +18,11 @@ #ifndef BOOST_TOKENIZER_POLICY_JRB070303_HPP_ #define BOOST_TOKENIZER_POLICY_JRB070303_HPP_ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace boost { @@ -31,10 +31,10 @@ namespace boost : public iterator_facade< token_iterator , Type - , typename detail::minimum_category< + , typename iterators::minimum_category< forward_traversal_tag , typename iterator_traversal::type - >::type + >::type , const Type& > { @@ -88,7 +88,7 @@ namespace boost Iterator base()const{return begin_;} - Iterator end()const{return end_;}; + Iterator end()const{return end_;} TokenizerFunc tokenizer_function()const{return f_;} @@ -101,24 +101,24 @@ namespace boost }; template < - class TokenizerFunc = char_delimiters_separator, + class TokenizerFunc = char_delimiters_separator, class Iterator = std::string::const_iterator, class Type = std::string > class token_iterator_generator { - private: + private: public: typedef token_iterator type; }; - - + + // Type has to be first because it needs to be explicitly specified // because there is no way the function can deduce it. template - typename token_iterator_generator::type + typename token_iterator_generator::type make_token_iterator(Iterator begin, Iterator end,const TokenizerFunc& fun){ - typedef typename + typedef typename token_iterator_generator::type ret_type; return ret_type(fun,begin,end); } diff --git a/boost/boost/tuple/detail/tuple_basic.hpp b/boost/boost/tuple/detail/tuple_basic.hpp index 88f0d9023f..5f26c7fdcb 100644 --- a/boost/boost/tuple/detail/tuple_basic.hpp +++ b/boost/boost/tuple/detail/tuple_basic.hpp @@ -41,6 +41,11 @@ #include "boost/detail/workaround.hpp" // needed for BOOST_WORKAROUND +#if BOOST_GCC >= 40700 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-local-typedefs" +#endif + namespace boost { namespace tuples { @@ -208,7 +213,7 @@ template inline typename access_traits< typename element >::type >::non_const_type -get(cons& c BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) { +get(cons& c) { typedef BOOST_DEDUCED_TYPENAME detail::drop_front::BOOST_NESTED_TEMPLATE apply > impl; typedef BOOST_DEDUCED_TYPENAME impl::type cons_element; @@ -222,10 +227,9 @@ template inline typename access_traits< typename element >::type >::const_type -get(const cons& c BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) { +get(const cons& c) { typedef BOOST_DEDUCED_TYPENAME detail::drop_front::BOOST_NESTED_TEMPLATE apply > impl; - typedef BOOST_DEDUCED_TYPENAME impl::type cons_element; return impl::call(c).head; } @@ -399,7 +403,7 @@ struct cons { typename access_traits< typename element::type >::non_const_type - get(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) { + get() { return boost::tuples::get(*this); } @@ -407,7 +411,7 @@ struct cons { typename access_traits< typename element::type >::const_type - get(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) const { + get() const { return boost::tuples::get(*this); } @@ -975,6 +979,11 @@ inline void swap(tuple& lhs, } // end of namespace boost +#if BOOST_GCC >= 40700 +#pragma GCC diagnostic pop +#endif + + #endif // BOOST_TUPLE_BASIC_HPP diff --git a/boost/boost/tuple/detail/tuple_basic_no_partial_spec.hpp b/boost/boost/tuple/detail/tuple_basic_no_partial_spec.hpp deleted file mode 100644 index 7379bf8182..0000000000 --- a/boost/boost/tuple/detail/tuple_basic_no_partial_spec.hpp +++ /dev/null @@ -1,865 +0,0 @@ -// - tuple_basic_no_partial_spec.hpp ----------------------------------------- - -// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) -// Copyright (C) 2001 Douglas Gregor (gregod@rpi.edu) -// Copyright (C) 2001 Gary Powell (gary.powell@sierra.com) -// -// 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) - -// For more information, see http://www.boost.org or http://lambda.cs.utu.fi - -// Revision History -// 14 02 01 Remove extra ';'. Also, fixed 10-parameter to make_tuple. (DG) -// 10 02 01 Fixed "null_type" constructors. -// Implemented comparison operators globally. -// Hide element_type_ref and element_type_const_ref. -// (DG). -// 09 02 01 Extended to tuples of length 10. Changed comparison for -// operator<() -// to the same used by std::pair<>, added cnull_type() (GP) -// 03 02 01 Initial Version from original tuple.hpp code by JJ. (DG) - -// ----------------------------------------------------------------- - -#ifndef BOOST_TUPLE_BASIC_NO_PARTIAL_SPEC_HPP -#define BOOST_TUPLE_BASIC_NO_PARTIAL_SPEC_HPP - -#include "boost/type_traits.hpp" -#include "boost/utility/swap.hpp" -#include - -#if defined BOOST_MSVC -#pragma warning(disable:4518) // storage-class or type specifier(s) unexpected here; ignored -#pragma warning(disable:4181) // qualifier applied to reference type ignored -#pragma warning(disable:4227) // qualifier applied to reference type ignored -#endif - -namespace boost { -namespace tuples { - - // null_type denotes the end of a list built with "cons" - struct null_type - { - null_type() {} - null_type(const null_type&, const null_type&) {} - }; - - // a helper function to provide a const null_type type temporary - inline const null_type cnull_type() { return null_type(); } - -// forward declaration of tuple - template< - typename T1 = null_type, - typename T2 = null_type, - typename T3 = null_type, - typename T4 = null_type, - typename T5 = null_type, - typename T6 = null_type, - typename T7 = null_type, - typename T8 = null_type, - typename T9 = null_type, - typename T10 = null_type - > - class tuple; - -// forward declaration of cons - template - struct cons; - - namespace detail { - - // Takes a pointer and routes all assignments to whatever it points to - template - struct assign_to_pointee - { - public: - explicit assign_to_pointee(T* p) : ptr(p) {} - - template - assign_to_pointee& operator=(const Other& other) - { - *ptr = other; - return *this; - } - - private: - T* ptr; - }; - - // Swallows any assignment - struct swallow_assign - { - template - swallow_assign const& operator=(const T&) const - { - return *this; - } - }; - - template struct add_const_reference : add_reference::type> {}; - - template - struct init_tail - { - // Each of vc6 and vc7 seem to require a different formulation - // of this return type - template -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - static typename add_reference::type>::type -#else - static typename add_const_reference::type -#endif - execute( cons const& u, long ) - { - return u.get_tail(); - } - }; - - template <> - struct init_tail - { - template - static null_type execute( cons const& u, long ) - { - return null_type(); - } - - template - static null_type execute(U const&, ...) - { - return null_type(); - } - private: - template - void execute( cons const&, int); - }; - - template - Other const& - init_head( Other const& u, ... ) - { - return u; - } - - template - typename add_reference::type>::type - init_head( cons const& u, int ) - { - return u.get_head(); - } - - inline char**** init_head(null_type const&, int); - - } // end of namespace detail - - // cons builds a heterogenous list of types - template - struct cons - { - typedef cons self_type; - typedef Head head_type; - typedef Tail tail_type; - - private: - typedef typename boost::add_reference::type head_ref; - typedef typename boost::add_reference::type tail_ref; - typedef typename detail::add_const_reference::type head_cref; - typedef typename detail::add_const_reference::type tail_cref; - public: - head_type head; - tail_type tail; - - head_ref get_head() { return head; } - tail_ref get_tail() { return tail; } - - head_cref get_head() const { return head; } - tail_cref get_tail() const { return tail; } - - cons() : head(), tail() {} - -#if defined BOOST_MSVC - template - cons(head_cref h /* = head_type() */, // causes MSVC 6.5 to barf. - const Tail& t) : head(h), tail(t.head, t.tail) - { - } - - cons(head_cref h /* = head_type() */, // causes MSVC 6.5 to barf. - const null_type& t) : head(h), tail(t) - { - } - -#else - template - explicit cons(head_cref h, const T& t) : - head(h), tail(t.head, t.tail) - { - } - - explicit cons(head_cref h = head_type(), - tail_cref t = tail_type()) : - head(h), tail(t) - { - } -#endif - - template - cons( const U& u ) - : head(detail::init_head(u, 0)) - , tail(detail::init_tail::execute(u, 0L)) - { - } - - template - cons& operator=(const Other& other) - { - head = other.head; - tail = other.tail; - return *this; - } - }; - - namespace detail { - - // Determines if the parameter is null_type - template struct is_null_type { enum { RET = 0 }; }; - template<> struct is_null_type { enum { RET = 1 }; }; - - /* Build a cons structure from the given Head and Tail. If both are null_type, - return null_type. */ - template - struct build_cons - { - private: - enum { tail_is_null_type = is_null_type::RET }; - public: - typedef cons RET; - }; - - template<> - struct build_cons - { - typedef null_type RET; - }; - - // Map the N elements of a tuple into a cons list - template< - typename T1, - typename T2 = null_type, - typename T3 = null_type, - typename T4 = null_type, - typename T5 = null_type, - typename T6 = null_type, - typename T7 = null_type, - typename T8 = null_type, - typename T9 = null_type, - typename T10 = null_type - > - struct map_tuple_to_cons - { - typedef typename detail::build_cons::RET cons10; - typedef typename detail::build_cons::RET cons9; - typedef typename detail::build_cons::RET cons8; - typedef typename detail::build_cons::RET cons7; - typedef typename detail::build_cons::RET cons6; - typedef typename detail::build_cons::RET cons5; - typedef typename detail::build_cons::RET cons4; - typedef typename detail::build_cons::RET cons3; - typedef typename detail::build_cons::RET cons2; - typedef typename detail::build_cons::RET cons1; - }; - - // Workaround the lack of partial specialization in some compilers - template - struct _element_type - { - template - struct inner - { - private: - typedef typename Tuple::tail_type tail_type; - typedef _element_type next_elt_type; - - public: - typedef typename _element_type::template inner::RET RET; - }; - }; - - template<> - struct _element_type<0> - { - template - struct inner - { - typedef typename Tuple::head_type RET; - }; - }; - - } // namespace detail - - - // Return the Nth type of the given Tuple - template - struct element - { - private: - typedef detail::_element_type nth_type; - - public: - typedef typename nth_type::template inner::RET RET; - typedef RET type; - }; - - namespace detail { - -#if defined(BOOST_MSVC) && (BOOST_MSVC == 1300) - // special workaround for vc7: - - template - struct reference_adder - { - template - struct rebind - { - typedef T& type; - }; - }; - - template <> - struct reference_adder - { - template - struct rebind - { - typedef T type; - }; - }; - - - // Return a reference to the Nth type of the given Tuple - template - struct element_ref - { - private: - typedef typename element::RET elt_type; - enum { is_ref = is_reference::value }; - - public: - typedef reference_adder::rebind::type RET; - typedef RET type; - }; - - // Return a const reference to the Nth type of the given Tuple - template - struct element_const_ref - { - private: - typedef typename element::RET elt_type; - enum { is_ref = is_reference::value }; - - public: - typedef reference_adder::rebind::type RET; - typedef RET type; - }; - -#else // vc7 - - // Return a reference to the Nth type of the given Tuple - template - struct element_ref - { - private: - typedef typename element::RET elt_type; - - public: - typedef typename add_reference::type RET; - typedef RET type; - }; - - // Return a const reference to the Nth type of the given Tuple - template - struct element_const_ref - { - private: - typedef typename element::RET elt_type; - - public: - typedef typename add_reference::type RET; - typedef RET type; - }; -#endif // vc7 - - } // namespace detail - - // Get length of this tuple - template - struct length - { - BOOST_STATIC_CONSTANT(int, value = 1 + length::value); - }; - - template<> struct length > { - BOOST_STATIC_CONSTANT(int, value = 0); - }; - - template<> - struct length - { - BOOST_STATIC_CONSTANT(int, value = 0); - }; - - namespace detail { - - // Reference the Nth element in a tuple and retrieve it with "get" - template - struct get_class - { - template - static inline - typename detail::element_ref >::RET - get(cons& t) - { - return get_class::get(t.tail); - } - - template - static inline - typename detail::element_const_ref >::RET - get(const cons& t) - { - return get_class::get(t.tail); - } - }; - - template<> - struct get_class<0> - { - template - static inline - typename add_reference::type - get(cons& t) - { - return t.head; - } - - template - static inline - typename add_reference::type - get(const cons& t) - { - return t.head; - } - }; - - } // namespace detail - - // tuple class - template< - typename T1, - typename T2, - typename T3, - typename T4, - typename T5, - typename T6, - typename T7, - typename T8, - typename T9, - typename T10 - > - class tuple : - public detail::map_tuple_to_cons::cons1 - { - private: - typedef detail::map_tuple_to_cons mapped_tuple; - typedef typename mapped_tuple::cons10 cons10; - typedef typename mapped_tuple::cons9 cons9; - typedef typename mapped_tuple::cons8 cons8; - typedef typename mapped_tuple::cons7 cons7; - typedef typename mapped_tuple::cons6 cons6; - typedef typename mapped_tuple::cons5 cons5; - typedef typename mapped_tuple::cons4 cons4; - typedef typename mapped_tuple::cons3 cons3; - typedef typename mapped_tuple::cons2 cons2; - typedef typename mapped_tuple::cons1 cons1; - - typedef typename detail::add_const_reference::type t1_cref; - typedef typename detail::add_const_reference::type t2_cref; - typedef typename detail::add_const_reference::type t3_cref; - typedef typename detail::add_const_reference::type t4_cref; - typedef typename detail::add_const_reference::type t5_cref; - typedef typename detail::add_const_reference::type t6_cref; - typedef typename detail::add_const_reference::type t7_cref; - typedef typename detail::add_const_reference::type t8_cref; - typedef typename detail::add_const_reference::type t9_cref; - typedef typename detail::add_const_reference::type t10_cref; - public: - typedef cons1 inherited; - typedef tuple self_type; - - tuple() : cons1(T1(), cons2(T2(), cons3(T3(), cons4(T4(), cons5(T5(), cons6(T6(),cons7(T7(),cons8(T8(),cons9(T9(),cons10(T10())))))))))) - {} - - tuple( - t1_cref t1, - t2_cref t2, - t3_cref t3 = T3(), - t4_cref t4 = T4(), - t5_cref t5 = T5(), - t6_cref t6 = T6(), - t7_cref t7 = T7(), - t8_cref t8 = T8(), - t9_cref t9 = T9(), - t10_cref t10 = T10() - ) : - cons1(t1, cons2(t2, cons3(t3, cons4(t4, cons5(t5, cons6(t6,cons7(t7,cons8(t8,cons9(t9,cons10(t10)))))))))) - { - } - - explicit tuple(t1_cref t1) - : cons1(t1, cons2(T2(), cons3(T3(), cons4(T4(), cons5(T5(), cons6(T6(),cons7(T7(),cons8(T8(),cons9(T9(),cons10(T10())))))))))) - {} - - template - tuple(const cons& other) : - cons1(other.head, other.tail) - { - } - - template - self_type& operator=(const std::pair& other) - { - this->head = other.first; - this->tail.head = other.second; - return *this; - } - - template - self_type& operator=(const cons& other) - { - this->head = other.head; - this->tail = other.tail; - - return *this; - } - }; - - namespace detail { - - template struct workaround_holder {}; - - } // namespace detail - - template - typename detail::element_ref >::RET - get(cons& t, detail::workaround_holder* = 0) - { - return detail::get_class::get(t); - } - - template - typename detail::element_const_ref >::RET - get(const cons& t, detail::workaround_holder* = 0) - { - return detail::get_class::get(t); - } - - // Make a tuple - template - inline - tuple - make_tuple(const T1& t1) - { - return tuple(t1); - } - - // Make a tuple - template - inline - tuple - make_tuple(const T1& t1, const T2& t2) - { - return tuple(t1, t2); - } - - // Make a tuple - template - inline - tuple - make_tuple(const T1& t1, const T2& t2, const T3& t3) - { - return tuple(t1, t2, t3); - } - - // Make a tuple - template - inline - tuple - make_tuple(const T1& t1, const T2& t2, const T3& t3, const T4& t4) - { - return tuple(t1, t2, t3, t4); - } - - // Make a tuple - template - inline - tuple - make_tuple(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5) - { - return tuple(t1, t2, t3, t4, t5); - } - - // Make a tuple - template - inline - tuple - make_tuple(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6) - { - return tuple(t1, t2, t3, t4, t5, t6); - } - - // Make a tuple - template - inline - tuple - make_tuple(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7) - { - return tuple(t1, t2, t3, t4, t5, t6, t7); - } - - // Make a tuple - template - inline - tuple - make_tuple(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8) - { - return tuple(t1, t2, t3, t4, t5, t6, t7, t8); - } - - // Make a tuple - template - inline - tuple - make_tuple(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9) - { - return tuple(t1, t2, t3, t4, t5, t6, t7, t8, t9); - } - - // Make a tuple - template - inline - tuple - make_tuple(const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9, const T10& t10) - { - return tuple(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); - } - - // Tie variables into a tuple - template - inline - tuple > - tie(T1& t1) - { - return make_tuple(detail::assign_to_pointee(&t1)); - } - - // Tie variables into a tuple - template - inline - tuple, - detail::assign_to_pointee > - tie(T1& t1, T2& t2) - { - return make_tuple(detail::assign_to_pointee(&t1), - detail::assign_to_pointee(&t2)); - } - - // Tie variables into a tuple - template - inline - tuple, - detail::assign_to_pointee, - detail::assign_to_pointee > - tie(T1& t1, T2& t2, T3& t3) - { - return make_tuple(detail::assign_to_pointee(&t1), - detail::assign_to_pointee(&t2), - detail::assign_to_pointee(&t3)); - } - - // Tie variables into a tuple - template - inline - tuple, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee > - tie(T1& t1, T2& t2, T3& t3, T4& t4) - { - return make_tuple(detail::assign_to_pointee(&t1), - detail::assign_to_pointee(&t2), - detail::assign_to_pointee(&t3), - detail::assign_to_pointee(&t4)); - } - - // Tie variables into a tuple - template - inline - tuple, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee > - tie(T1& t1, T2& t2, T3& t3, T4& t4, T5 &t5) - { - return make_tuple(detail::assign_to_pointee(&t1), - detail::assign_to_pointee(&t2), - detail::assign_to_pointee(&t3), - detail::assign_to_pointee(&t4), - detail::assign_to_pointee(&t5)); - } - - // Tie variables into a tuple - template - inline - tuple, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee > - tie(T1& t1, T2& t2, T3& t3, T4& t4, T5 &t5, T6 &t6) - { - return make_tuple(detail::assign_to_pointee(&t1), - detail::assign_to_pointee(&t2), - detail::assign_to_pointee(&t3), - detail::assign_to_pointee(&t4), - detail::assign_to_pointee(&t5), - detail::assign_to_pointee(&t6)); - } - - // Tie variables into a tuple - template - inline - tuple, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee > - tie(T1& t1, T2& t2, T3& t3, T4& t4, T5 &t5, T6 &t6, T7 &t7) - { - return make_tuple(detail::assign_to_pointee(&t1), - detail::assign_to_pointee(&t2), - detail::assign_to_pointee(&t3), - detail::assign_to_pointee(&t4), - detail::assign_to_pointee(&t5), - detail::assign_to_pointee(&t6), - detail::assign_to_pointee(&t7)); - } - - // Tie variables into a tuple - template - inline - tuple, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee > - tie(T1& t1, T2& t2, T3& t3, T4& t4, T5 &t5, T6 &t6, T7 &t7, T8 &t8) - { - return make_tuple(detail::assign_to_pointee(&t1), - detail::assign_to_pointee(&t2), - detail::assign_to_pointee(&t3), - detail::assign_to_pointee(&t4), - detail::assign_to_pointee(&t5), - detail::assign_to_pointee(&t6), - detail::assign_to_pointee(&t7), - detail::assign_to_pointee(&t8)); - } - - // Tie variables into a tuple - template - inline - tuple, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee > - tie(T1& t1, T2& t2, T3& t3, T4& t4, T5 &t5, T6 &t6, T7 &t7, T8 &t8, T9 &t9) - { - return make_tuple(detail::assign_to_pointee(&t1), - detail::assign_to_pointee(&t2), - detail::assign_to_pointee(&t3), - detail::assign_to_pointee(&t4), - detail::assign_to_pointee(&t5), - detail::assign_to_pointee(&t6), - detail::assign_to_pointee(&t7), - detail::assign_to_pointee(&t8), - detail::assign_to_pointee(&t9)); - } - // Tie variables into a tuple - template - inline - tuple, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee, - detail::assign_to_pointee > - tie(T1& t1, T2& t2, T3& t3, T4& t4, T5 &t5, T6 &t6, T7 &t7, T8 &t8, T9 &t9, T10 &t10) - { - return make_tuple(detail::assign_to_pointee(&t1), - detail::assign_to_pointee(&t2), - detail::assign_to_pointee(&t3), - detail::assign_to_pointee(&t4), - detail::assign_to_pointee(&t5), - detail::assign_to_pointee(&t6), - detail::assign_to_pointee(&t7), - detail::assign_to_pointee(&t8), - detail::assign_to_pointee(&t9), - detail::assign_to_pointee(&t10)); - } - // "ignore" allows tuple positions to be ignored when using "tie". - -detail::swallow_assign const ignore = detail::swallow_assign(); - -template -void swap(tuple& lhs, - tuple& rhs); -inline void swap(null_type&, null_type&) {} -template -inline void swap(cons& lhs, cons& rhs) { - ::boost::swap(lhs.head, rhs.head); -} -template -inline void swap(cons& lhs, cons& rhs) { - ::boost::swap(lhs.head, rhs.head); - ::boost::tuples::swap(lhs.tail, rhs.tail); -} -template -inline void swap(tuple& lhs, - tuple& rhs) { - typedef tuple tuple_type; - typedef typename tuple_type::inherited base; - ::boost::tuples::swap(static_cast(lhs), static_cast(rhs)); -} - -} // namespace tuples -} // namespace boost -#endif // BOOST_TUPLE_BASIC_NO_PARTIAL_SPEC_HPP diff --git a/boost/boost/tuple/tuple.hpp b/boost/boost/tuple/tuple.hpp index 7703597e10..433d4b3165 100644 --- a/boost/boost/tuple/tuple.hpp +++ b/boost/boost/tuple/tuple.hpp @@ -23,16 +23,10 @@ namespace boost { namespace python { class tuple; }} #include "boost/config.hpp" #include "boost/static_assert.hpp" -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -// The MSVC version -#include "boost/tuple/detail/tuple_basic_no_partial_spec.hpp" - -#else // other compilers #include "boost/ref.hpp" #include "boost/tuple/detail/tuple_basic.hpp" -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace boost { @@ -41,7 +35,7 @@ using tuples::make_tuple; using tuples::tie; #if !defined(BOOST_NO_USING_TEMPLATE) using tuples::get; -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#else // // The "using tuples::get" statement causes the // Borland compiler to ICE, use forwarding @@ -64,24 +58,7 @@ inline typename tuples::access_traits< get(const tuples::cons& c) { return tuples::get(c); } -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -// -// MSVC, using declarations don't mix with templates well, -// so use forwarding functions instead: -// -template -typename tuples::detail::element_ref >::RET -get(tuples::cons& t, tuples::detail::workaround_holder* = 0) -{ - return tuples::detail::get_class::get(t); -} -template -typename tuples::detail::element_const_ref >::RET -get(const tuples::cons& t, tuples::detail::workaround_holder* = 0) -{ - return tuples::detail::get_class::get(t); -} #endif // BOOST_NO_USING_TEMPLATE } // end namespace boost diff --git a/boost/boost/type_index.hpp b/boost/boost/type_index.hpp new file mode 100644 index 0000000000..dce89d81d6 --- /dev/null +++ b/boost/boost/type_index.hpp @@ -0,0 +1,265 @@ +// +// Copyright (c) Antony Polukhin, 2012-2014. +// +// 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) +// + +#ifndef BOOST_TYPE_INDEX_HPP +#define BOOST_TYPE_INDEX_HPP + +/// \file boost/type_index.hpp +/// \brief Includes minimal set of headers required to use the Boost.TypeIndex library. +/// +/// By inclusion of this file most optimal type index classes will be included and used +/// as a boost::typeindex::type_index and boost::typeindex::type_info. + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +#if defined(BOOST_TYPE_INDEX_USER_TYPEINDEX) +# include BOOST_TYPE_INDEX_USER_TYPEINDEX +# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH +# pragma detect_mismatch( "boost__type_index__abi", "user defined type_index class is used: " BOOST_STRINGIZE(BOOST_TYPE_INDEX_USER_TYPEINDEX)) +# endif +#elif (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC) +# include +# if defined(BOOST_NO_RTTI) || defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY) +# include +# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH +# pragma detect_mismatch( "boost__type_index__abi", "RTTI is off - typeid() is used only for templates") +# endif +# else +# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH +# pragma detect_mismatch( "boost__type_index__abi", "RTTI is used") +# endif +# endif +#else +# include +# include +# ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH +# pragma detect_mismatch( "boost__type_index__abi", "RTTI is off - using CTTI") +# endif +#endif + +#ifndef BOOST_TYPE_INDEX_REGISTER_CLASS +#define BOOST_TYPE_INDEX_REGISTER_CLASS +#endif + +namespace boost { namespace typeindex { + +#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED) + +/// \def BOOST_TYPE_INDEX_FUNCTION_SIGNATURE +/// BOOST_TYPE_INDEX_FUNCTION_SIGNATURE is used by boost::typeindex::ctti_type_index class to +/// deduce the name of a type. If your compiler is not recognized +/// by the TypeIndex library and you wish to work with boost::typeindex::ctti_type_index, you may +/// define this macro by yourself. +/// +/// BOOST_TYPE_INDEX_FUNCTION_SIGNATURE must be defined to a compiler specific macro +/// that outputs the \b whole function signature \b including \b template \b parameters. +/// +/// If your compiler is not recognised and BOOST_TYPE_INDEX_FUNCTION_SIGNATURE is not defined, +/// then a compile-time error will arise at any attempt to use boost::typeindex::ctti_type_index classes. +/// +/// See BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS and BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING +/// for an information of how to tune the implementation to make a nice pretty_name() output. +#define BOOST_TYPE_INDEX_FUNCTION_SIGNATURE BOOST_CURRENT_FUNCTION + +/// \def BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING +/// This is a helper macro for making correct pretty_names() with RTTI off. +/// +/// BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING macro may be defined to +/// '(begin_skip, end_skip, runtime_skip, runtime_skip_until)' with parameters for adding a +/// support for compilers, that by default are not recognized by TypeIndex library. +/// +/// \b Example: +/// +/// Imagine the situation when +/// \code boost::typeindex::ctti_type_index::type_id().pretty_name() \endcode +/// returns the following string: +/// \code "static const char *boost::detail::ctti::n() [T = int]" \endcode +/// and \code boost::typeindex::ctti_type_index::type_id().pretty_name() \endcode returns the following: +/// \code "static const char *boost::detail::ctti::n() [T = short]" \endcode +/// +/// As we may see first 39 characters are "static const char *boost::detail::ctti<" and they do not depend on +/// the type T. After first 39 characters we have a human readable type name which is duplicated at the end +/// of a string. String always ends on ']', which consumes 1 character. +/// +/// Now if we define `BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING` to +/// `(39, 1, false, "")` we'll be getting \code "int>::n() [T = int" \endcode +/// for `boost::typeindex::ctti_type_index::type_id().pretty_name()` and \code "short>::n() [T = short" \endcode +/// for `boost::typeindex::ctti_type_index::type_id().pretty_name()`. +/// +/// Now we need to take additional care of the characters that go before the last mention of our type. We'll +/// do that by telling the macro that we need to cut off everything that goes before the "T = " including the "T = " +/// itself: +/// +/// \code (39, 1, true, "T = ") \endcode +/// +/// In case of GCC or Clang command line we need to add the following line while compiling all the sources: +/// +/// \code +/// -DBOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING='(39, 1, true, "T = ")' +/// \endcode +/// \param begin_skip How many characters must be skipped at the beginning of the type holding string. +/// Must be a compile time constant. +/// \param end_skip How many characters must be skipped at the end of the type holding string. +/// Must be a compile time constant. +/// \param runtime_skip Do we need additional checks at runtime to cut off the more characters. +/// Must be `true` or `false`. +/// \param runtime_skip_until Skip all the characters before the following string (including the string itself). +/// Must be a compile time array of characters. +/// +/// See [RTTI emulation limitations](boost_typeindex/rtti_emulation_limitations.html) for more info. +#define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING (0, 0, false, "") + + + /// Depending on a compiler flags, optimal implementation of type_index will be used + /// as a default boost::typeindex::type_index. + /// + /// Could be a boost::typeindex::stl_type_index, boost::typeindex::ctti_type_index or + /// user defined type_index class. + /// + /// \b See boost::typeindex::type_index_facade for a full description of type_index functions. + typedef platform_specific type_index; +#elif defined(BOOST_TYPE_INDEX_USER_TYPEINDEX) + // Nothing to do +#elif (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC) + typedef boost::typeindex::stl_type_index type_index; +#else + typedef boost::typeindex::ctti_type_index type_index; +#endif + +/// Depending on a compiler flags, optimal implementation of type_info will be used +/// as a default boost::typeindex::type_info. +/// +/// Could be a std::type_info, boost::typeindex::detail::ctti_data or +/// some user defined class. +/// +/// type_info \b is \b not copyable or default constructible. It is \b not assignable too! +typedef type_index::type_info_t type_info; + +#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED) + +/// \def BOOST_TYPE_INDEX_USER_TYPEINDEX +/// BOOST_TYPE_INDEX_USER_TYPEINDEX can be defined to the path to header file +/// with user provided implementation of type_index. +/// +/// See [Making a custom type_index](boost_typeindex/making_a_custom_type_index.html) section +/// of documentation for usage example. +#define BOOST_TYPE_INDEX_USER_TYPEINDEX + + +/// \def BOOST_TYPE_INDEX_REGISTER_CLASS +/// BOOST_TYPE_INDEX_REGISTER_CLASS is used to help to emulate RTTI. +/// Put this macro into the public section of polymorphic class to allow runtime type detection. +/// +/// Depending on the typeid() availability this macro will expand to nothing or to virtual helper function +/// `virtual const type_info& boost_type_info_type_id_runtime_() const noexcept`. +/// +/// \b Example: +/// \code +/// class A { +/// public: +/// BOOST_TYPE_INDEX_REGISTER_CLASS +/// virtual ~A(){} +/// }; +/// +/// struct B: public A { +/// BOOST_TYPE_INDEX_REGISTER_CLASS +/// }; +/// +/// struct C: public B { +/// BOOST_TYPE_INDEX_REGISTER_CLASS +/// }; +/// +/// ... +/// +/// C c1; +/// A* pc1 = &c1; +/// assert(boost::typeindex::type_id() == boost::typeindex::type_id_runtime(*pc1)); +/// \endcode +#define BOOST_TYPE_INDEX_REGISTER_CLASS nothing-or-some-virtual-functions + +/// \def BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY +/// BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY is a helper macro that must be defined if mixing +/// RTTI on/off modules. See +/// [Mixing sources with RTTI on and RTTI off](boost_typeindex/mixing_sources_with_rtti_on_and_.html) +/// section of documentation for more info. +#define BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY + +#endif // defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED) + + +/// Function to get boost::typeindex::type_index for a type T. +/// Removes const, volatile && and & modifiers from T. +/// +/// \b Example: +/// \code +/// type_index ti = type_id(); +/// std::cout << ti.pretty_name(); // Outputs 'int' +/// \endcode +/// +/// \tparam T Type for which type_index must be created. +/// \throw Nothing. +/// \return boost::typeindex::type_index with information about the specified type T. +template +inline type_index type_id() BOOST_NOEXCEPT { + return type_index::type_id(); +} + +/// Function for constructing boost::typeindex::type_index instance for type T. +/// Does not remove const, volatile, & and && modifiers from T. +/// +/// If T has no const, volatile, & and && modifiers, then returns exactly +/// the same result as in case of calling `type_id()`. +/// +/// \b Example: +/// \code +/// type_index ti = type_id_with_cvr(); +/// std::cout << ti.pretty_name(); // Outputs 'int&' +/// \endcode +/// +/// \tparam T Type for which type_index must be created. +/// \throw Nothing. +/// \return boost::typeindex::type_index with information about the specified type T. +template +inline type_index type_id_with_cvr() BOOST_NOEXCEPT { + return type_index::type_id_with_cvr(); +} + +/// Function that works exactly like C++ typeid(rtti_val) call, but returns boost::type_index. +/// +/// Retunrs runtime information about specified type. +/// +/// \b Requirements: RTTI available or Base and Derived classes must be marked with BOOST_TYPE_INDEX_REGISTER_CLASS. +/// +/// \b Example: +/// \code +/// struct Base { virtual ~Base(){} }; +/// struct Derived: public Base {}; +/// ... +/// Derived d; +/// Base& b = d; +/// type_index ti = type_id_runtime(b); +/// std::cout << ti.pretty_name(); // Outputs 'Derived' +/// \endcode +/// +/// \param runtime_val Varaible which runtime type must be returned. +/// \throw Nothing. +/// \return boost::typeindex::type_index with information about the specified variable. +template +inline type_index type_id_runtime(const T& runtime_val) BOOST_NOEXCEPT { + return type_index::type_id_runtime(runtime_val); +} + +}} // namespace boost::typeindex + + + +#endif // BOOST_TYPE_INDEX_HPP + diff --git a/boost/boost/type_index/ctti_type_index.hpp b/boost/boost/type_index/ctti_type_index.hpp new file mode 100644 index 0000000000..ac1e5d290d --- /dev/null +++ b/boost/boost/type_index/ctti_type_index.hpp @@ -0,0 +1,179 @@ +// +// Copyright (c) Antony Polukhin, 2013-2014. +// +// +// 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) +// + +#ifndef BOOST_TYPE_INDEX_CTTI_TYPE_INDEX_HPP +#define BOOST_TYPE_INDEX_CTTI_TYPE_INDEX_HPP + +/// \file ctti_type_index.hpp +/// \brief Contains boost::typeindex::ctti_type_index class. +/// +/// boost::typeindex::ctti_type_index class can be used as a drop-in replacement +/// for std::type_index. +/// +/// It is used in situations when typeid() method is not available or +/// BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro is defined. + +#include +#include + +#include +#include +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace typeindex { + +namespace detail { + +// That's the most trickiest part of the TypeIndex library: +// 1) we do not want to give user ability to manually construct and compare `struct-that-represents-type` +// 2) we need to distinguish between `struct-that-represents-type` and `const char*` +// 3) we need a thread-safe way to have references to instances `struct-that-represents-type` +// 4) we need a compile-time control to make sure that user does not copy or +// default construct `struct-that-represents-type` +// +// Solution would be the following: + +/// \class ctti_data +/// Standard-layout class with private constructors and assignment operators. +/// +/// You can not work with this class directly. The purpose of this class is to hold type info +/// \b when \b RTTI \b is \b off and allow ctti_type_index construction from itself. +/// +/// \b Example: +/// \code +/// const detail::ctti_data& foo(); +/// ... +/// type_index ti = type_index(foo()); +/// std::cout << ti.pretty_name(); +/// \endcode +class ctti_data { +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +public: + ctti_data() = delete; + ctti_data(const ctti_data&) = delete; + ctti_data& operator=(const ctti_data&) = delete; +#else +private: + ctti_data(); + ctti_data(const ctti_data&); + ctti_data& operator=(const ctti_data&); +#endif +}; + +} // namespace detail + +/// Helper method for getting detail::ctti_data of a template parameter T. +template +inline const detail::ctti_data& ctti_construct() BOOST_NOEXCEPT { + // Standard C++11, 5.2.10 Reinterpret cast: + // An object pointer can be explicitly converted to an object pointer of a different type. When a prvalue + // v of type "pointer to T1" is converted to the type "pointer to cv T2", the result is static_cast(static_cast(v)) if both T1 and T2 are standard-layout types (3.9) and the alignment + // requirements of T2 are no stricter than those of T1, or if either type is void. Converting a prvalue of type + // "pointer to T1" to the type "pointer to T2" (where T1 and T2 are object types and where the alignment + // requirements of T2 are no stricter than those of T1) and back to its original type yields the original pointer + // value. + // + // Alignments are checked in `type_index_test_ctti_alignment.cpp` test. + return *reinterpret_cast(boost::detail::ctti::n()); +} + +/// \class ctti_type_index +/// This class is a wrapper that pretends to work exactly like stl_type_index, but does +/// not require RTTI support. \b For \b description \b of \b functions \b see type_index_facade. +/// +/// This class produces slightly longer type names, so consider using stl_type_index +/// in situations when typeid() is working. +class ctti_type_index: public type_index_facade { + const detail::ctti_data* data_; + + inline std::size_t get_raw_name_length() const BOOST_NOEXCEPT; + +public: + typedef detail::ctti_data type_info_t; + + inline ctti_type_index() BOOST_NOEXCEPT + : data_(&ctti_construct()) + {} + + inline ctti_type_index(const type_info_t& data) BOOST_NOEXCEPT + : data_(&data) + {} + + inline const type_info_t& type_info() const BOOST_NOEXCEPT; + inline const char* raw_name() const BOOST_NOEXCEPT; + inline std::string pretty_name() const; + inline std::size_t hash_code() const BOOST_NOEXCEPT; + + template + inline static ctti_type_index type_id() BOOST_NOEXCEPT; + + template + inline static ctti_type_index type_id_with_cvr() BOOST_NOEXCEPT; + + template + inline static ctti_type_index type_id_runtime(const T& variable) BOOST_NOEXCEPT; +}; + + +inline const ctti_type_index::type_info_t& ctti_type_index::type_info() const BOOST_NOEXCEPT { + return *data_; +} + + +template +inline ctti_type_index ctti_type_index::type_id() BOOST_NOEXCEPT { + typedef BOOST_DEDUCED_TYPENAME boost::remove_reference::type no_ref_t; + typedef BOOST_DEDUCED_TYPENAME boost::remove_cv::type no_cvr_t; + return ctti_construct(); +} + + + +template +inline ctti_type_index ctti_type_index::type_id_with_cvr() BOOST_NOEXCEPT { + return ctti_construct(); +} + + +template +inline ctti_type_index ctti_type_index::type_id_runtime(const T& variable) BOOST_NOEXCEPT { + return variable.boost_type_index_type_id_runtime_(); +} + + +inline const char* ctti_type_index::raw_name() const BOOST_NOEXCEPT { + return reinterpret_cast(data_); +} + +inline std::size_t ctti_type_index::get_raw_name_length() const BOOST_NOEXCEPT { + return std::strlen(raw_name() + detail::ctti_skip_size_at_end); +} + + +inline std::string ctti_type_index::pretty_name() const { + std::size_t len = get_raw_name_length(); + while (raw_name()[len - 1] == ' ') --len; // MSVC sometimes adds whitespaces + return std::string(raw_name(), len); +} + + +inline std::size_t ctti_type_index::hash_code() const BOOST_NOEXCEPT { + return boost::hash_range(raw_name(), raw_name() + get_raw_name_length()); +} + + +}} // namespace boost::typeindex + +#endif // BOOST_TYPE_INDEX_CTTI_TYPE_INDEX_HPP + diff --git a/boost/boost/type_index/detail/compile_time_type_info.hpp b/boost/boost/type_index/detail/compile_time_type_info.hpp new file mode 100644 index 0000000000..c68f385d19 --- /dev/null +++ b/boost/boost/type_index/detail/compile_time_type_info.hpp @@ -0,0 +1,144 @@ +// +// Copyright (c) Antony Polukhin, 2012-2014. +// +// +// 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) +// + +#ifndef BOOST_TYPE_INDEX_DETAIL_COMPILE_TIME_TYPE_INFO_HPP +#define BOOST_TYPE_INDEX_DETAIL_COMPILE_TIME_TYPE_INFO_HPP + +/// \file compile_time_type_info.hpp +/// \brief Contains helper macros and implementation details of boost::typeindex::ctti_type_index. +/// Not intended for inclusion from user's code. + +#include +#include +#include +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +/// @cond +#define BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(begin_skip, end_skip, runtime_skip, runtime_skip_until) \ + namespace boost { namespace typeindex { namespace detail { \ + BOOST_STATIC_CONSTEXPR std::size_t ctti_skip_size_at_begin = begin_skip; \ + BOOST_STATIC_CONSTEXPR std::size_t ctti_skip_size_at_end = end_skip; \ + BOOST_STATIC_CONSTEXPR bool ctti_skip_more_at_runtime = runtime_skip; \ + BOOST_STATIC_CONSTEXPR char ctti_skip_until_runtime[] = runtime_skip_until; \ + }}} /* namespace boost::typeindex::detail */ \ + /**/ +/// @endcond + +#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED) + /* Nothing to document. All the macro docs are moved to */ +#elif defined(BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING) + +# include + BOOST_PP_EXPAND( BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING ) + +#elif defined(_MSC_VER) + // sizeof("const char *__cdecl boost::detail::ctti<") - 1, sizeof(">::n(void)") - 1 + BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(40, 10, false, ""); +#elif defined(__clang__) && defined(__APPLE__) + // Someone made __clang_major__ equal to LLVM version rather than compiler version + // on APPLE platform. + // + // Using less efficient solution because there is no good way to detect real version of Clang. + // sizeof("static const char *boost::detail::ctti<") - 1, sizeof("]") - 1, true, "???????????>::n() [T = int" + BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 1, true, "T = "); +#elif defined(__clang__) && (__clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ == 0)) + // sizeof("static const char *boost::detail::ctti<") - 1, sizeof(">::n()") - 1 + // note: checked on 3.0 + BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 6, false, ""); +#elif defined(__clang__) && __clang_major__ == 3 && __clang_minor__ > 0 + // sizeof("static const char *boost::detail::ctti<") - 1, sizeof("]") - 1, true, "int>::n() [T = int" + // note: checked on 3.1, 3.4 + BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 1, true, "T = "); +#elif defined(__GNUC__) + // sizeof("static const char* boost::detail::ctti::n() [with T = ") - 1, sizeof("]") - 1 + BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(57, 1, false, ""); +#else + // Deafult code for other platforms... Just skip nothing! + BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(0, 0, false, ""); +#endif + +#undef BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS + +namespace boost { namespace typeindex { namespace detail { + template + inline void assert_compile_time_legths() BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG( + Condition, + "TypeIndex library is misconfigured for your compiler. " + "Please define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING to correct values. See section " + "'RTTI emulation limitations' of the documentation for more information." + ); + } + + template + inline const char* skip_begining_runtime(const char* begin, boost::mpl::false_) BOOST_NOEXCEPT { + return begin; + } + + template + inline const char* skip_begining_runtime(const char* begin, boost::mpl::true_) BOOST_NOEXCEPT { + const char* const it = std::search( + begin, begin + ArrayLength, + ctti_skip_until_runtime, ctti_skip_until_runtime + sizeof(ctti_skip_until_runtime) - 1 + ); + return (it == begin + ArrayLength ? begin : it + sizeof(ctti_skip_until_runtime) - 1); + } + + template + inline const char* skip_begining(const char* begin) BOOST_NOEXCEPT { + assert_compile_time_legths<(ArrayLength > ctti_skip_size_at_begin + ctti_skip_size_at_end)>(); + return skip_begining_runtime( + begin + ctti_skip_size_at_begin, + boost::mpl::bool_() + ); + } +}}} // namespace boost::typeindex::detail + +namespace boost { namespace detail { + +/// Noncopyable type_info that does not require RTTI. +/// CTTI == Compile Time Type Info. +/// This name must be as short as possible, to avoid code bloat +template +struct ctti { + + /// Returns raw name. Must be as short, as possible, to avoid code bloat + static const char* n() BOOST_NOEXCEPT { + #if defined(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE) + return boost::typeindex::detail::skip_begining< sizeof(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE >(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE); + #elif defined(__FUNCSIG__) + return boost::typeindex::detail::skip_begining< sizeof(__FUNCSIG__) >(__FUNCSIG__); + #elif defined(__PRETTY_FUNCTION__) \ + || defined(__GNUC__) \ + || (defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)) \ + || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) \ + || (defined(__ICC) && (__ICC >= 600)) \ + || defined(__ghs__) \ + || defined(__DMC__) + + return boost::typeindex::detail::skip_begining< sizeof(__PRETTY_FUNCTION__) >(__PRETTY_FUNCTION__); + #else + BOOST_STATIC_ASSERT_MSG( + sizeof(T) && false, + "TypeIndex library could not detect your compiler. " + "Please make the BOOST_TYPE_INDEX_FUNCTION_SIGNATURE macro use " + "correct compiler macro for getting the whole function name. " + "Define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING to correct value after that." + ); + #endif + } +}; + +}} // namespace boost::detail + +#endif // BOOST_TYPE_INDEX_DETAIL_COMPILE_TIME_TYPE_INFO_HPP + diff --git a/boost/boost/type_index/detail/ctti_register_class.hpp b/boost/boost/type_index/detail/ctti_register_class.hpp new file mode 100644 index 0000000000..a8cef2c497 --- /dev/null +++ b/boost/boost/type_index/detail/ctti_register_class.hpp @@ -0,0 +1,40 @@ +// +// Copyright (c) Antony Polukhin, 2013-2014. +// +// +// 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) +// + +#ifndef BOOST_TYPE_INDEX_CTTI_REGISTER_CLASS_HPP +#define BOOST_TYPE_INDEX_CTTI_REGISTER_CLASS_HPP + +/// \file ctti_register_class.hpp +/// \brief Contains BOOST_TYPE_INDEX_REGISTER_CLASS macro implementation that uses boost::typeindex::ctti_type_index. +/// Not intended for inclusion from user's code. + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace typeindex { namespace detail { + +template +inline const ctti_data& ctti_construct_typeid_ref(const T*) BOOST_NOEXCEPT { + return ctti_construct(); +} + +}}} // namespace boost::typeindex::detail + +/// @cond +#define BOOST_TYPE_INDEX_REGISTER_CLASS \ + virtual const boost::typeindex::detail::ctti_data& boost_type_index_type_id_runtime_() const BOOST_NOEXCEPT { \ + return boost::typeindex::detail::ctti_construct_typeid_ref(this); \ + } \ +/**/ +/// @endcond + +#endif // BOOST_TYPE_INDEX_CTTI_REGISTER_CLASS_HPP + diff --git a/boost/boost/type_index/detail/stl_register_class.hpp b/boost/boost/type_index/detail/stl_register_class.hpp new file mode 100644 index 0000000000..95a26f7b0e --- /dev/null +++ b/boost/boost/type_index/detail/stl_register_class.hpp @@ -0,0 +1,40 @@ +// +// Copyright (c) Antony Polukhin, 2013-2014. +// +// +// 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) +// + +#ifndef BOOST_TYPE_INDEX_STL_REGISTER_CLASS_HPP +#define BOOST_TYPE_INDEX_STL_REGISTER_CLASS_HPP + +/// \file stl_register_class.hpp +/// \brief Contains BOOST_TYPE_INDEX_REGISTER_CLASS macro implementation that uses boost::typeindex::stl_type_index. +/// Not intended for inclusion from user's code. + +#include + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace typeindex { namespace detail { + +template +inline const stl_type_index::type_info_t& stl_construct_typeid_ref(const T*) BOOST_NOEXCEPT { + return typeid(T); +} + +}}} // namespace boost::typeindex::detail + +/// @cond +#define BOOST_TYPE_INDEX_REGISTER_CLASS \ + virtual const boost::typeindex::stl_type_index::type_info_t& boost_type_index_type_id_runtime_() const BOOST_NOEXCEPT { \ + return boost::typeindex::detail::stl_construct_typeid_ref(this); \ + } \ +/**/ +/// @endcond + +#endif // BOOST_TYPE_INDEX_STL_REGISTER_CLASS_HPP + diff --git a/boost/boost/type_index/stl_type_index.hpp b/boost/boost/type_index/stl_type_index.hpp new file mode 100644 index 0000000000..1b3b0c4c80 --- /dev/null +++ b/boost/boost/type_index/stl_type_index.hpp @@ -0,0 +1,273 @@ +// +// Copyright (c) Antony Polukhin, 2013-2014. +// +// +// 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) +// + +#ifndef BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP +#define BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP + +/// \file stl_type_index.hpp +/// \brief Contains boost::typeindex::stl_type_index class. +/// +/// boost::typeindex::stl_type_index class can be used as a drop-in replacement +/// for std::type_index. +/// +/// It is used in situations when RTTI is enabled or typeid() method is available. +/// When typeid() is disabled or BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro +/// is defined boost::typeindex::ctti is usually used instead of boost::typeindex::stl_type_index. + +#include + +// MSVC is capable of calling typeid(T) even when RTTI is off +#if defined(BOOST_NO_RTTI) && !defined(BOOST_MSVC) +#error "File boost/type_index/stl_type_index.ipp is not usable when typeid() is not available." +#endif + +#include +#include // std::strcmp, std::strlen, std::strstr +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if (defined(__EDG_VERSION__) && __EDG_VERSION__ < 245) \ + || (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744) +# include +# include +# include +#endif + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace typeindex { + +/// \class stl_type_index +/// This class is a wrapper around std::type_info, that workarounds issues and provides +/// much more rich interface. \b For \b description \b of \b functions \b see type_index_facade. +/// +/// This class requires typeid() to work. For cases when RTTI is disabled see ctti_type_index. +class stl_type_index + : public type_index_facade< + stl_type_index, + #ifdef BOOST_NO_STD_TYPEINFO + type_info + #else + std::type_info + #endif + > +{ +public: +#ifdef BOOST_NO_STD_TYPEINFO + typedef type_info type_info_t; +#else + typedef std::type_info type_info_t; +#endif + +private: + const type_info_t* data_; + +public: + inline stl_type_index() BOOST_NOEXCEPT + : data_(&typeid(void)) + {} + + inline stl_type_index(const type_info_t& data) BOOST_NOEXCEPT + : data_(&data) + {} + + inline const type_info_t& type_info() const BOOST_NOEXCEPT; + + inline const char* raw_name() const BOOST_NOEXCEPT; + inline const char* name() const BOOST_NOEXCEPT; + inline std::string pretty_name() const; + + inline std::size_t hash_code() const BOOST_NOEXCEPT; + inline bool equal(const stl_type_index& rhs) const BOOST_NOEXCEPT; + inline bool before(const stl_type_index& rhs) const BOOST_NOEXCEPT; + + template + inline static stl_type_index type_id() BOOST_NOEXCEPT; + + template + inline static stl_type_index type_id_with_cvr() BOOST_NOEXCEPT; + + template + inline static stl_type_index type_id_runtime(const T& value) BOOST_NOEXCEPT; +}; + +inline const stl_type_index::type_info_t& stl_type_index::type_info() const BOOST_NOEXCEPT { + return *data_; +} + + +inline const char* stl_type_index::raw_name() const BOOST_NOEXCEPT { +#ifdef _MSC_VER + return data_->raw_name(); +#else + return data_->name(); +#endif +} + +inline const char* stl_type_index::name() const BOOST_NOEXCEPT { + return data_->name(); +} + +inline std::string stl_type_index::pretty_name() const { + static const char cvr_saver_name[] = "boost::typeindex::detail::cvr_saver<"; + static BOOST_CONSTEXPR_OR_CONST std::string::size_type cvr_saver_name_len = sizeof(cvr_saver_name) - 1; + + // In case of MSVC demangle() is a no-op, and name() already returns demangled name. + // In case of GCC and Clang (on non-Windows systems) name() returns mangled name and demangle() undecorates it. + const boost::core::scoped_demangled_name demangled_name(data_->name()); + + const char* begin = demangled_name.get(); + if (!begin) { + boost::throw_exception(std::runtime_error("Type name demangling failed")); + } + + const std::string::size_type len = std::strlen(begin); + const char* end = begin + len; + + if (len > cvr_saver_name_len) { + const char* b = std::strstr(begin, cvr_saver_name); + if (b) { + b += cvr_saver_name_len; + + // Trim leading spaces + while (*b == ' ') { // the string is zero terminated, we won't exceed the buffer size + ++ b; + } + + // Skip the closing angle bracket + const char* e = end - 1; + while (e > b && *e != '>') { + -- e; + } + + // Trim trailing spaces + while (e > b && *(e - 1) == ' ') { + -- e; + } + + if (b < e) { + // Parsing seems to have succeeded, the type name is not empty + begin = b; + end = e; + } + } + } + + return std::string(begin, end); +} + + +inline std::size_t stl_type_index::hash_code() const BOOST_NOEXCEPT { +#if _MSC_VER > 1600 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5 && defined(__GXX_EXPERIMENTAL_CXX0X__)) + return data_->hash_code(); +#else + return boost::hash_range(raw_name(), raw_name() + std::strlen(raw_name())); +#endif +} + + +/// @cond + +// for this compiler at least, cross-shared-library type_info +// comparisons don't work, so we are using typeid(x).name() instead. +# if (defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5))) \ + || defined(_AIX) \ + || (defined(__sgi) && defined(__host_mips)) \ + || (defined(__hpux) && defined(__HP_aCC)) \ + || (defined(linux) && defined(__INTEL_COMPILER) && defined(__ICC)) +# define BOOST_CLASSINFO_COMPARE_BY_NAMES +# endif + +/// @endcond + +inline bool stl_type_index::equal(const stl_type_index& rhs) const BOOST_NOEXCEPT { +#ifdef BOOST_CLASSINFO_COMPARE_BY_NAMES + return raw_name() == rhs.raw_name() || !std::strcmp(raw_name(), rhs.raw_name()); +#else + return *data_ == *rhs.data_; +#endif +} + +inline bool stl_type_index::before(const stl_type_index& rhs) const BOOST_NOEXCEPT { +#ifdef BOOST_CLASSINFO_COMPARE_BY_NAMES + return raw_name() != rhs.raw_name() && std::strcmp(raw_name(), rhs.raw_name()) < 0; +#else + return !!data_->before(*rhs.data_); +#endif +} + +#ifdef BOOST_CLASSINFO_COMPARE_BY_NAMES +#undef BOOST_CLASSINFO_COMPARE_BY_NAMES +#endif + + + +template +inline stl_type_index stl_type_index::type_id() BOOST_NOEXCEPT { + typedef BOOST_DEDUCED_TYPENAME boost::remove_reference::type no_ref_t; + typedef BOOST_DEDUCED_TYPENAME boost::remove_cv::type no_cvr_prefinal_t; + + # if (defined(__EDG_VERSION__) && __EDG_VERSION__ < 245) \ + || (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744) + + // Old EDG-based compilers seem to mistakenly distinguish 'integral' from 'signed integral' + // in typeid() expressions. Full template specialization for 'integral' fixes that issue: + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< + boost::is_signed, + boost::make_signed, + boost::mpl::identity + >::type no_cvr_prefinal_lazy_t; + + typedef BOOST_DEDUCED_TYPENAME no_cvr_prefinal_t::type no_cvr_t; + #else + typedef no_cvr_prefinal_t no_cvr_t; + #endif + + return typeid(no_cvr_t); +} + +namespace detail { + template class cvr_saver{}; +} + +template +inline stl_type_index stl_type_index::type_id_with_cvr() BOOST_NOEXCEPT { + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< + boost::mpl::or_, boost::is_const, boost::is_volatile >, + detail::cvr_saver, + T + >::type type; + + return typeid(type); +} + + +template +inline stl_type_index stl_type_index::type_id_runtime(const T& value) BOOST_NOEXCEPT { +#ifdef BOOST_NO_RTTI + return value.boost_type_index_type_id_runtime_(); +#else + return typeid(value); +#endif +} + +}} // namespace boost::typeindex + +#endif // BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP diff --git a/boost/boost/type_index/type_index_facade.hpp b/boost/boost/type_index/type_index_facade.hpp new file mode 100644 index 0000000000..c18ea4bada --- /dev/null +++ b/boost/boost/type_index/type_index_facade.hpp @@ -0,0 +1,296 @@ +// +// Copyright (c) Antony Polukhin, 2013-2014. +// +// +// 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) +// + +#ifndef BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP +#define BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP + +#include +#include +#include +#include + +#if !defined(BOOST_NO_IOSTREAM) +#if !defined(BOOST_NO_IOSFWD) +#include // for std::basic_ostream +#else +#include +#endif +#endif + +#ifdef BOOST_HAS_PRAGMA_ONCE +# pragma once +#endif + +namespace boost { namespace typeindex { + +/// \class type_index_facade +/// +/// This class takes care about the comparison operators, hash functions and +/// ostream operators. Use this class as a public base class for defining new +/// type_info-conforming classes. +/// +/// \b Example: +/// \code +/// class stl_type_index: public type_index_facade +/// { +/// public: +/// typedef std::type_info type_info_t; +/// private: +/// const type_info_t* data_; +/// +/// public: +/// stl_type_index(const type_info_t& data) noexcept +/// : data_(&data) +/// {} +/// // ... +/// }; +/// \endcode +/// +/// \tparam Derived Class derived from type_index_facade. +/// \tparam TypeInfo Class that will be used as a base type_info class. +/// \note Take a look at the protected methods. They are \b not \b defined in type_index_facade. +/// Protected member functions raw_name() \b must be defined in Derived class. All the other +/// methods are mandatory. +/// \see 'Making a custom type_index' section for more information about +/// creating your own type_index using type_index_facade. +template +class type_index_facade { +private: + /// @cond + const Derived & derived() const BOOST_NOEXCEPT { + return *static_cast(this); + } + /// @endcond +public: + typedef TypeInfo type_info_t; + + /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw. + /// \return Name of a type. By default returns Derived::raw_name(). + inline const char* name() const BOOST_NOEXCEPT { + return derived().raw_name(); + } + + /// \b Override: This function \b may be redefined in Derived class. Overrides may throw. + /// \return Human readable type name. By default returns Derived::name(). + inline std::string pretty_name() const { + return derived().name(); + } + + /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw. + /// \return True if two types are equal. By default compares types by raw_name(). + inline bool equal(const Derived& rhs) const BOOST_NOEXCEPT { + const char* const left = derived().raw_name(); + const char* const right = rhs.raw_name(); + return left == right || !std::strcmp(left, right); + } + + /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw. + /// \return True if rhs is greater than this. By default compares types by raw_name(). + inline bool before(const Derived& rhs) const BOOST_NOEXCEPT { + const char* const left = derived().raw_name(); + const char* const right = rhs.raw_name(); + return left != right && std::strcmp(left, right) < 0; + } + + /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw. + /// \return Hash code of a type. By default hashes types by raw_name(). + /// \note has to be included if this function is used. + inline std::size_t hash_code() const BOOST_NOEXCEPT { + const char* const name = derived().raw_name(); + return boost::hash_range(name, name + std::strlen(name)); + } + +#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED) +protected: + /// \b Override: This function \b must be redefined in Derived class. Overrides \b must not throw. + /// \return Pointer to unredable/raw type name. + inline const char* raw_name() const BOOST_NOEXCEPT; + + /// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw. + /// \return Const reference to underlying low level type_info_t. + inline const type_info_t& type_info() const BOOST_NOEXCEPT; + + /// This is a factory method that is used to create instances of Derived classes. + /// boost::typeindex::type_id() will call this method, if Derived has same type as boost::typeindex::type_index. + /// + /// \b Override: This function \b may be redefined and made public in Derived class. Overrides \b must not throw. + /// Overrides \b must remove const, volatile && and & modifiers from T. + /// \tparam T Type for which type_index must be created. + /// \return type_index for type T. + template + static Derived type_id() BOOST_NOEXCEPT; + + /// This is a factory method that is used to create instances of Derived classes. + /// boost::typeindex::type_id_with_cvr() will call this method, if Derived has same type as boost::typeindex::type_index. + /// + /// \b Override: This function \b may be redefined and made public in Derived class. Overrides \b must not throw. + /// Overrides \b must \b not remove const, volatile && and & modifiers from T. + /// \tparam T Type for which type_index must be created. + /// \return type_index for type T. + template + static Derived type_id_with_cvr() BOOST_NOEXCEPT; + + /// This is a factory method that is used to create instances of Derived classes. + /// boost::typeindex::type_id_runtime(const T&) will call this method, if Derived has same type as boost::typeindex::type_index. + /// + /// \b Override: This function \b may be redefined and made public in Derived class. + /// \param variable Variable which runtime type will be stored in type_index. + /// \return type_index with runtime type of variable. + template + static Derived type_id_runtime(const T& variable) BOOST_NOEXCEPT; + +#endif + +}; + +/// @cond +template +inline bool operator == (const type_index_facade& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return static_cast(lhs).equal(static_cast(rhs)); +} + +template +inline bool operator < (const type_index_facade& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return static_cast(lhs).before(static_cast(rhs));; +} + + + +template +inline bool operator > (const type_index_facade& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return rhs < lhs; +} + +template +inline bool operator <= (const type_index_facade& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return !(lhs > rhs); +} + +template +inline bool operator >= (const type_index_facade& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return !(lhs < rhs); +} + +template +inline bool operator != (const type_index_facade& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return !(lhs == rhs); +} + +// ######################### COMPARISONS with Derived ############################ // +template +inline bool operator == (const TypeInfo& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return Derived(lhs) == rhs; +} + +template +inline bool operator < (const TypeInfo& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return Derived(lhs) < rhs; +} + +template +inline bool operator > (const TypeInfo& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return rhs < Derived(lhs); +} + +template +inline bool operator <= (const TypeInfo& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return !(Derived(lhs) > rhs); +} + +template +inline bool operator >= (const TypeInfo& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return !(Derived(lhs) < rhs); +} + +template +inline bool operator != (const TypeInfo& lhs, const type_index_facade& rhs) BOOST_NOEXCEPT { + return !(Derived(lhs) == rhs); +} + + +template +inline bool operator == (const type_index_facade& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT { + return lhs == Derived(rhs); +} + +template +inline bool operator < (const type_index_facade& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT { + return lhs < Derived(rhs); +} + +template +inline bool operator > (const type_index_facade& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT { + return Derived(rhs) < lhs; +} + +template +inline bool operator <= (const type_index_facade& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT { + return !(lhs > Derived(rhs)); +} + +template +inline bool operator >= (const type_index_facade& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT { + return !(lhs < Derived(rhs)); +} + +template +inline bool operator != (const type_index_facade& lhs, const TypeInfo& rhs) BOOST_NOEXCEPT { + return !(lhs == Derived(rhs)); +} + +// ######################### COMPARISONS with Derived END ############################ // + +/// @endcond + +#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED) + +/// noexcept comparison operators for type_index_facade classes. +bool operator ==, !=, <, ... (const type_index_facade& lhs, const type_index_facade& rhs) noexcept; + +/// noexcept comparison operators for type_index_facade and it's TypeInfo classes. +bool operator ==, !=, <, ... (const type_index_facade& lhs, const TypeInfo& rhs) noexcept; + +/// noexcept comparison operators for type_index_facade's TypeInfo and type_index_facade classes. +bool operator ==, !=, <, ... (const TypeInfo& lhs, const type_index_facade& rhs) noexcept; + +#endif + +#ifndef BOOST_NO_IOSTREAM +#ifdef BOOST_NO_TEMPLATED_IOSTREAMS +/// @cond +/// Ostream operator that will output demangled name +template +inline std::ostream& operator<<(std::ostream& ostr, const type_index_facade& ind) { + ostr << static_cast(ind).pretty_name(); + return ostr; +} +/// @endcond +#else +/// Ostream operator that will output demangled name. +template +inline std::basic_ostream& operator<<( + std::basic_ostream& ostr, + const type_index_facade& ind) +{ + ostr << static_cast(ind).pretty_name(); + return ostr; +} +#endif // BOOST_NO_TEMPLATED_IOSTREAMS +#endif // BOOST_NO_IOSTREAM + +/// This free function is used by Boost's unordered containers. +/// \note has to be included if this function is used. +template +inline std::size_t hash_value(const type_index_facade& lhs) BOOST_NOEXCEPT { + return static_cast(lhs).hash_code(); +} + +}} // namespace boost::typeindex + +#endif // BOOST_TYPE_INDEX_TYPE_INDEX_FACADE_HPP + diff --git a/boost/boost/type_traits.hpp b/boost/boost/type_traits.hpp index 9267a7170b..398c6875f2 100644 --- a/boost/boost/type_traits.hpp +++ b/boost/boost/type_traits.hpp @@ -51,6 +51,7 @@ #include "boost/type_traits/is_const.hpp" #include "boost/type_traits/is_convertible.hpp" #include "boost/type_traits/is_copy_constructible.hpp" +#include "boost/type_traits/is_copy_assignable.hpp" #include "boost/type_traits/is_empty.hpp" #include "boost/type_traits/is_enum.hpp" #include "boost/type_traits/is_float.hpp" diff --git a/boost/boost/type_traits/add_const.hpp b/boost/boost/type_traits/add_const.hpp index 29f0bd95bc..0a27f8a971 100644 --- a/boost/boost/type_traits/add_const.hpp +++ b/boost/boost/type_traits/add_const.hpp @@ -36,9 +36,7 @@ BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_const,T,T const) # pragma warning(pop) #endif -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_const,T&,T&) -#endif } // namespace boost diff --git a/boost/boost/type_traits/add_cv.hpp b/boost/boost/type_traits/add_cv.hpp index bfde76a623..66625c66c2 100644 --- a/boost/boost/type_traits/add_cv.hpp +++ b/boost/boost/type_traits/add_cv.hpp @@ -37,9 +37,7 @@ BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_cv,T,T const volatile) # pragma warning(pop) #endif -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_cv,T&,T&) -#endif } // namespace boost diff --git a/boost/boost/type_traits/add_reference.hpp b/boost/boost/type_traits/add_reference.hpp index f926a53b70..5e3efca692 100644 --- a/boost/boost/type_traits/add_reference.hpp +++ b/boost/boost/type_traits/add_reference.hpp @@ -20,37 +20,6 @@ namespace boost { namespace detail { -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && defined(BOOST_MSVC6_MEMBER_TEMPLATES) - -template -struct reference_adder -{ - template struct result_ - { - typedef T& type; - }; -}; - -template <> -struct reference_adder -{ - template struct result_ - { - typedef T type; - }; -}; - -template -struct add_reference_impl -{ - typedef typename reference_adder< - ::boost::is_reference::value - >::template result_ result; - - typedef typename result::type type; -}; - -#else // // We can't filter out rvalue_references at the same level as // references or we get ambiguities from msvc: @@ -76,11 +45,7 @@ struct add_reference_impl typedef typename add_reference_rvalue_layer::type type; }; -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(typename T,add_reference,T&,T&) -#endif - -#endif // these full specialisations are always required: BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void,void) diff --git a/boost/boost/type_traits/add_rvalue_reference.hpp b/boost/boost/type_traits/add_rvalue_reference.hpp index 92c2c3817a..242716f09c 100644 --- a/boost/boost/type_traits/add_rvalue_reference.hpp +++ b/boost/boost/type_traits/add_rvalue_reference.hpp @@ -39,7 +39,7 @@ namespace type_traits_detail { struct add_rvalue_reference_helper { typedef T type; }; -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template struct add_rvalue_reference_helper { diff --git a/boost/boost/type_traits/add_volatile.hpp b/boost/boost/type_traits/add_volatile.hpp index 491f1c2dd3..86b529798e 100644 --- a/boost/boost/type_traits/add_volatile.hpp +++ b/boost/boost/type_traits/add_volatile.hpp @@ -36,9 +36,7 @@ BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_volatile,T,T volatile) # pragma warning(pop) #endif -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_volatile,T&,T&) -#endif } // namespace boost diff --git a/boost/boost/type_traits/alignment_of.hpp b/boost/boost/type_traits/alignment_of.hpp index e1735dcc68..31a5f3839f 100644 --- a/boost/boost/type_traits/alignment_of.hpp +++ b/boost/boost/type_traits/alignment_of.hpp @@ -90,13 +90,11 @@ BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(alignment_of,T,::boost::detail::alignment_of_impl // references have to be treated specially, assume // that a reference is just a special pointer: -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct alignment_of : public alignment_of { }; -#endif #ifdef __BORLANDC__ // long double gives an incorrect value of 10 (!) // unless we do this... diff --git a/boost/boost/type_traits/arithmetic_traits.hpp b/boost/boost/type_traits/arithmetic_traits.hpp deleted file mode 100644 index e4670e6b38..0000000000 --- a/boost/boost/type_traits/arithmetic_traits.hpp +++ /dev/null @@ -1,20 +0,0 @@ -// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. -// 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. -// -// defines traits classes for arithmetic types: -// is_void, is_integral, is_float, is_arithmetic, is_fundamental. - -#ifndef BOOST_TT_ARITHMETIC_TRAITS_HPP_INCLUDED -#define BOOST_TT_ARITHMETIC_TRAITS_HPP_INCLUDED - -#include -#include -#include -#include -#include - -#endif // BOOST_TT_ARITHMETIC_TRAITS_HPP_INCLUDED diff --git a/boost/boost/type_traits/broken_compiler_spec.hpp b/boost/boost/type_traits/broken_compiler_spec.hpp deleted file mode 100644 index fb51769d9d..0000000000 --- a/boost/boost/type_traits/broken_compiler_spec.hpp +++ /dev/null @@ -1,117 +0,0 @@ - -// Copyright 2001-2003 Aleksey Gurtovoy. -// 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_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED -#define BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED - -#include -#include - -// these are needed regardless of BOOST_TT_NO_BROKEN_COMPILER_SPEC -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -namespace boost { namespace detail { -template< typename T > struct remove_const_impl { typedef T type; }; -template< typename T > struct remove_volatile_impl { typedef T type; }; -template< typename T > struct remove_pointer_impl { typedef T type; }; -template< typename T > struct remove_reference_impl { typedef T type; }; -typedef int invoke_BOOST_TT_BROKEN_COMPILER_SPEC_outside_all_namespaces; -}} -#endif - -// agurt, 27/jun/03: disable the workaround if user defined -// BOOST_TT_NO_BROKEN_COMPILER_SPEC -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - || defined(BOOST_TT_NO_BROKEN_COMPILER_SPEC) - -# define BOOST_TT_BROKEN_COMPILER_SPEC(T) /**/ - -#else - -// same as BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1 macro, except that it -// never gets #undef-ined -# define BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(trait,spec,result) \ -template<> struct trait##_impl \ -{ \ - typedef result type; \ -}; \ -/**/ - -# define BOOST_TT_AUX_REMOVE_CONST_VOLATILE_RANK1_SPEC(T) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_const,T const,T) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_const,T const volatile,T volatile) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_volatile,T volatile,T) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_volatile,T const volatile,T const) \ - /**/ - -# define BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_pointer,T*,T) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_pointer,T*const,T) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_pointer,T*volatile,T) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_pointer,T*const volatile,T) \ - BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_reference,T&,T) \ - /**/ - -# define BOOST_TT_AUX_REMOVE_PTR_REF_RANK_2_SPEC(T) \ - BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T) \ - BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T const) \ - BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T volatile) \ - BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T const volatile) \ - /**/ - -# define BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T) \ - BOOST_TT_AUX_REMOVE_PTR_REF_RANK_2_SPEC(T) \ - BOOST_TT_AUX_REMOVE_CONST_VOLATILE_RANK1_SPEC(T) \ - /**/ - -# define BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T*) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T const*) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T volatile*) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T const volatile*) \ - /**/ - -# define BOOST_TT_BROKEN_COMPILER_SPEC(T) \ - namespace boost { namespace detail { \ - typedef invoke_BOOST_TT_BROKEN_COMPILER_SPEC_outside_all_namespaces \ - please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_outside_all_namespaces; \ - BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T*) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T const*) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T volatile*) \ - BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T const volatile*) \ - }} \ - /**/ - -# include - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -BOOST_TT_BROKEN_COMPILER_SPEC(bool) -BOOST_TT_BROKEN_COMPILER_SPEC(char) -#ifndef BOOST_NO_INTRINSIC_WCHAR_T -BOOST_TT_BROKEN_COMPILER_SPEC(wchar_t) -#endif -BOOST_TT_BROKEN_COMPILER_SPEC(signed char) -BOOST_TT_BROKEN_COMPILER_SPEC(unsigned char) -BOOST_TT_BROKEN_COMPILER_SPEC(signed short) -BOOST_TT_BROKEN_COMPILER_SPEC(unsigned short) -BOOST_TT_BROKEN_COMPILER_SPEC(signed int) -BOOST_TT_BROKEN_COMPILER_SPEC(unsigned int) -BOOST_TT_BROKEN_COMPILER_SPEC(signed long) -BOOST_TT_BROKEN_COMPILER_SPEC(unsigned long) -BOOST_TT_BROKEN_COMPILER_SPEC(float) -BOOST_TT_BROKEN_COMPILER_SPEC(double) -//BOOST_TT_BROKEN_COMPILER_SPEC(long double) - -// for backward compatibility -#define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(T) \ - BOOST_TT_BROKEN_COMPILER_SPEC(T) \ -/**/ - -#endif // BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED diff --git a/boost/boost/type_traits/common_type.hpp b/boost/boost/type_traits/common_type.hpp index f057770568..b52ff167eb 100644 --- a/boost/boost/type_traits/common_type.hpp +++ b/boost/boost/type_traits/common_type.hpp @@ -120,7 +120,7 @@ namespace type_traits_detail { typedef BOOST_TYPEOF_TPL(declval_b() ? declval_T() : declval_U()) type; #endif -#if defined(__GNUC__) && __GNUC__ == 3 && (__GNUC_MINOR__ == 2 || __GNUC_MINOR__ == 3) +#if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ == 3 public: void public_dummy_function_just_to_silence_warning(); #endif diff --git a/boost/boost/type_traits/config.hpp b/boost/boost/type_traits/config.hpp index 7934454299..2e25ad01ff 100644 --- a/boost/boost/type_traits/config.hpp +++ b/boost/boost/type_traits/config.hpp @@ -27,8 +27,6 @@ #endif # if (BOOST_WORKAROUND(__MWERKS__, < 0x3000) \ - || BOOST_WORKAROUND(BOOST_MSVC, <= 1301) \ - || !defined(__EDG_VERSION__) && BOOST_WORKAROUND(__GNUC__, < 3) \ || BOOST_WORKAROUND(__IBMCPP__, < 600 ) \ || BOOST_WORKAROUND(__BORLANDC__, < 0x5A0) \ || defined(__ghs) \ @@ -45,14 +43,6 @@ # define BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION 1 #endif -// -// Define BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING -// when we can't test for function types with elipsis: -// -#if BOOST_WORKAROUND(__GNUC__, < 3) -# define BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING -#endif - // // define BOOST_TT_TEST_MS_FUNC_SIGS // when we want to test __stdcall etc function types with is_function etc @@ -71,6 +61,12 @@ # define BOOST_TT_NO_CV_FUNC_TEST #endif +// +// Macros that have been deprecated, defined here for backwards compatibility: +// +#define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(x) +#define BOOST_TT_BROKEN_COMPILER_SPEC(x) + #endif // BOOST_TT_CONFIG_HPP_INCLUDED diff --git a/boost/boost/type_traits/detail/bool_trait_def.hpp b/boost/boost/type_traits/detail/bool_trait_def.hpp index e3c7774e39..69e4f1ca62 100644 --- a/boost/boost/type_traits/detail/bool_trait_def.hpp +++ b/boost/boost/type_traits/detail/bool_trait_def.hpp @@ -8,8 +8,8 @@ // http://www.boost.org/LICENSE_1_0.txt) // $Source$ -// $Date: 2011-10-09 15:28:33 -0700 (Sun, 09 Oct 2011) $ -// $Revision: 74865 $ +// $Date$ +// $Revision$ #include #include @@ -45,14 +45,6 @@ enum { value = type::value }; \ /**/ # define BOOST_TT_AUX_BOOL_C_BASE(C) - -#elif defined(BOOST_MSVC) && BOOST_MSVC < 1300 - -# define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ - typedef ::boost::integral_constant base_; \ - using base_::value; \ - /**/ - #endif #ifndef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL diff --git a/boost/boost/type_traits/detail/bool_trait_undef.hpp b/boost/boost/type_traits/detail/bool_trait_undef.hpp index 008febe790..4ac61ef2e7 100644 --- a/boost/boost/type_traits/detail/bool_trait_undef.hpp +++ b/boost/boost/type_traits/detail/bool_trait_undef.hpp @@ -8,8 +8,8 @@ // http://www.boost.org/LICENSE_1_0.txt) // $Source$ -// $Date: 2011-10-09 15:28:33 -0700 (Sun, 09 Oct 2011) $ -// $Revision: 74865 $ +// $Date$ +// $Revision$ #undef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL #undef BOOST_TT_AUX_BOOL_C_BASE diff --git a/boost/boost/type_traits/detail/cv_traits_impl.hpp b/boost/boost/type_traits/detail/cv_traits_impl.hpp index ed20c9d41a..8e995bb064 100644 --- a/boost/boost/type_traits/detail/cv_traits_impl.hpp +++ b/boost/boost/type_traits/detail/cv_traits_impl.hpp @@ -11,24 +11,93 @@ #ifndef BOOST_TT_DETAIL_CV_TRAITS_IMPL_HPP_INCLUDED #define BOOST_TT_DETAIL_CV_TRAITS_IMPL_HPP_INCLUDED +#include #include #include -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // implementation helper: -#if !(BOOST_WORKAROUND(__GNUC__,== 3) && BOOST_WORKAROUND(__GNUC_MINOR__, <= 2)) namespace boost { namespace detail { -#else -#include -namespace boost { -namespace type_traits { -namespace gcc8503 { -#endif +#if BOOST_WORKAROUND(BOOST_MSVC, == 1700) +#define BOOST_TT_AUX_CV_TRAITS_IMPL_PARAM(X) X + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = false); + BOOST_STATIC_CONSTANT(bool, is_volatile = false); + typedef T unqualified_type; + }; + + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = false); + BOOST_STATIC_CONSTANT(bool, is_volatile = false); + typedef T unqualified_type[]; + }; + + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = true); + BOOST_STATIC_CONSTANT(bool, is_volatile = false); + typedef T unqualified_type[]; + }; + + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = false); + BOOST_STATIC_CONSTANT(bool, is_volatile = true); + typedef T unqualified_type[]; + }; + + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = true); + BOOST_STATIC_CONSTANT(bool, is_volatile = true); + typedef T unqualified_type[]; + }; + + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = false); + BOOST_STATIC_CONSTANT(bool, is_volatile = false); + typedef T unqualified_type[N]; + }; + + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = true); + BOOST_STATIC_CONSTANT(bool, is_volatile = false); + typedef T unqualified_type[N]; + }; + + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = false); + BOOST_STATIC_CONSTANT(bool, is_volatile = true); + typedef T unqualified_type[N]; + }; + + template + struct cv_traits_imp + { + BOOST_STATIC_CONSTANT(bool, is_const = true); + BOOST_STATIC_CONSTANT(bool, is_volatile = true); + typedef T unqualified_type[N]; + }; + +#else +#define BOOST_TT_AUX_CV_TRAITS_IMPL_PARAM(X) X * template struct cv_traits_imp {}; template @@ -38,9 +107,10 @@ struct cv_traits_imp BOOST_STATIC_CONSTANT(bool, is_volatile = false); typedef T unqualified_type; }; +#endif template -struct cv_traits_imp +struct cv_traits_imp { BOOST_STATIC_CONSTANT(bool, is_const = true); BOOST_STATIC_CONSTANT(bool, is_volatile = false); @@ -48,7 +118,7 @@ struct cv_traits_imp }; template -struct cv_traits_imp +struct cv_traits_imp { BOOST_STATIC_CONSTANT(bool, is_const = false); BOOST_STATIC_CONSTANT(bool, is_volatile = true); @@ -56,42 +126,15 @@ struct cv_traits_imp }; template -struct cv_traits_imp +struct cv_traits_imp { BOOST_STATIC_CONSTANT(bool, is_const = true); BOOST_STATIC_CONSTANT(bool, is_volatile = true); typedef T unqualified_type; }; -#if BOOST_WORKAROUND(__GNUC__,== 3) && BOOST_WORKAROUND(__GNUC_MINOR__, <= 2) -// We have to exclude function pointers -// (see http://gcc.gnu.org/bugzilla/show_bug.cgi?8503) -yes_type mini_funcptr_tester(...); -no_type mini_funcptr_tester(const volatile void*); - -} // namespace gcc8503 -} // namespace type_traits - -namespace detail { - -// Use the implementation above for non function pointers -template -struct cv_traits_imp : public ::boost::type_traits::gcc8503::cv_traits_imp { }; - -// Functions are never cv-qualified -template struct cv_traits_imp -{ - BOOST_STATIC_CONSTANT(bool, is_const = false); - BOOST_STATIC_CONSTANT(bool, is_volatile = false); - typedef T unqualified_type; -}; - -#endif - } // namespace detail } // namespace boost -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif // BOOST_TT_DETAIL_CV_TRAITS_IMPL_HPP_INCLUDED diff --git a/boost/boost/type_traits/detail/has_binary_operator.hpp b/boost/boost/type_traits/detail/has_binary_operator.hpp index 1fd26efb7d..d82a5cefdb 100644 --- a/boost/boost/type_traits/detail/has_binary_operator.hpp +++ b/boost/boost/type_traits/detail/has_binary_operator.hpp @@ -36,7 +36,7 @@ // warning C4804: '<' : unsafe use of type 'bool' in operation // warning C4805: '==' : unsafe mix of type 'bool' and type 'char' in operation // cannot find another implementation -> declared as system header to suppress these warnings. -#if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3)) +#if defined(__GNUC__) # pragma GCC system_header #elif defined(BOOST_MSVC) # pragma warning ( push ) @@ -152,10 +152,10 @@ no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { - static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists - static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise + static ::boost::type_traits::yes_type s_check(has_operator); // this version is preferred when operator exists + static ::boost::type_traits::no_type s_check(no_operator); // this version is used otherwise - BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make() BOOST_TT_TRAIT_OP make()),make())))==sizeof(::boost::type_traits::yes_type))); + BOOST_STATIC_CONSTANT(bool, value = (sizeof(s_check(((make() BOOST_TT_TRAIT_OP make()),make())))==sizeof(::boost::type_traits::yes_type))); }; diff --git a/boost/boost/type_traits/detail/has_postfix_operator.hpp b/boost/boost/type_traits/detail/has_postfix_operator.hpp index 5c52b07d29..e9048e1214 100644 --- a/boost/boost/type_traits/detail/has_postfix_operator.hpp +++ b/boost/boost/type_traits/detail/has_postfix_operator.hpp @@ -22,7 +22,7 @@ #include // avoid warnings -#if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3)) +#if defined(__GNUC__) # pragma GCC system_header #elif defined(BOOST_MSVC) # pragma warning ( push ) @@ -138,10 +138,10 @@ no_operator operator,(no_operator, has_operator); template < typename Lhs > struct operator_exists { - static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists - static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise + static ::boost::type_traits::yes_type s_check(has_operator); // this version is preferred when operator exists + static ::boost::type_traits::no_type s_check(no_operator); // this version is used otherwise - BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make() BOOST_TT_TRAIT_OP),make())))==sizeof(::boost::type_traits::yes_type))); + BOOST_STATIC_CONSTANT(bool, value = (sizeof(s_check(((make() BOOST_TT_TRAIT_OP),make())))==sizeof(::boost::type_traits::yes_type))); }; diff --git a/boost/boost/type_traits/detail/has_prefix_operator.hpp b/boost/boost/type_traits/detail/has_prefix_operator.hpp index ac30e4dfad..e1cf8d054f 100644 --- a/boost/boost/type_traits/detail/has_prefix_operator.hpp +++ b/boost/boost/type_traits/detail/has_prefix_operator.hpp @@ -30,7 +30,7 @@ // warning C4146: unary minus operator applied to unsigned type, result still unsigned // warning C4804: '-' : unsafe use of type 'bool' in operation // cannot find another implementation -> declared as system header to suppress these warnings. -#if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3)) +#if defined(__GNUC__) # pragma GCC system_header #elif defined(BOOST_MSVC) # pragma warning ( push ) @@ -146,10 +146,10 @@ no_operator operator,(no_operator, has_operator); template < typename Rhs > struct operator_exists { - static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists - static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise + static ::boost::type_traits::yes_type s_check(has_operator); // this version is preferred when operator exists + static ::boost::type_traits::no_type s_check(no_operator); // this version is used otherwise - BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((BOOST_TT_TRAIT_OP make()),make())))==sizeof(::boost::type_traits::yes_type))); + BOOST_STATIC_CONSTANT(bool, value = (sizeof(s_check(((BOOST_TT_TRAIT_OP make()),make())))==sizeof(::boost::type_traits::yes_type))); }; diff --git a/boost/boost/type_traits/detail/is_function_ptr_helper.hpp b/boost/boost/type_traits/detail/is_function_ptr_helper.hpp index 605d0bc2ef..1c3b17f6d2 100644 --- a/boost/boost/type_traits/detail/is_function_ptr_helper.hpp +++ b/boost/boost/type_traits/detail/is_function_ptr_helper.hpp @@ -37,160 +37,108 @@ struct is_function_ptr_helper template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #else #undef BOOST_STATIC_CONSTANT diff --git a/boost/boost/type_traits/detail/is_function_ptr_tester.hpp b/boost/boost/type_traits/detail/is_function_ptr_tester.hpp index 2ab49a39af..2eb8a6f47f 100644 --- a/boost/boost/type_traits/detail/is_function_ptr_tester.hpp +++ b/boost/boost/type_traits/detail/is_function_ptr_tester.hpp @@ -36,575 +36,367 @@ no_type BOOST_TT_DECL is_function_ptr_tester(...); template yes_type is_function_ptr_tester(R (*)()); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)()); -template -yes_type is_function_ptr_tester(R (__stdcall*)( ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)()); -template -yes_type is_function_ptr_tester(R (__fastcall*)( ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)()); -template -yes_type is_function_ptr_tester(R (__cdecl*)( ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); -template -yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); -template -yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); -template -yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); #endif #else @@ -636,18 +428,12 @@ yes_type is_function_ptr_tester(R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) . @#ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); -template -yes_type is_function_ptr_tester(R (__stdcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); @#ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); -template -yes_type is_function_ptr_tester(R (__fastcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); @#endif template yes_type is_function_ptr_tester(R (__cdecl*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); -template -yes_type is_function_ptr_tester(R (__cdecl*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); @#endif #undef BOOST_PP_COUNTER diff --git a/boost/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp b/boost/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp index 4f75f14d0a..bd5c591b20 100644 --- a/boost/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp +++ b/boost/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp @@ -37,10 +37,8 @@ struct is_mem_fun_pointer_impl template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -52,7 +50,6 @@ struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(boo template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -62,13 +59,10 @@ struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -80,7 +74,6 @@ struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT( template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -90,13 +83,10 @@ struct is_mem_fun_pointer_impl { BOOST_STATIC_CONST template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -108,7 +98,6 @@ struct is_mem_fun_pointer_impl { BOOST_STATIC_CONS template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -118,13 +107,10 @@ struct is_mem_fun_pointer_impl { BOOST_STATIC_ template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -136,7 +122,6 @@ struct is_mem_fun_pointer_impl { BOOST_STATIC template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -146,13 +131,10 @@ struct is_mem_fun_pointer_impl { BOOST_ST template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -164,7 +146,6 @@ struct is_mem_fun_pointer_impl { BOOST_S template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -174,13 +155,10 @@ struct is_mem_fun_pointer_impl { BOO template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -192,7 +170,6 @@ struct is_mem_fun_pointer_impl { BO template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -202,13 +179,10 @@ struct is_mem_fun_pointer_impl template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -220,7 +194,6 @@ struct is_mem_fun_pointer_impl template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -230,13 +203,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -248,7 +218,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -258,13 +227,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -276,7 +242,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -286,13 +251,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -304,7 +266,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -314,13 +275,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -332,7 +290,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -342,13 +299,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -360,7 +314,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -370,13 +323,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -388,7 +338,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -398,13 +347,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -416,7 +362,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -426,13 +371,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -444,7 +386,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -454,13 +395,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -472,7 +410,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -482,13 +419,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -500,7 +434,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -510,13 +443,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -528,7 +458,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -538,13 +467,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -556,7 +482,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -566,13 +491,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -584,7 +506,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -594,13 +515,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -612,7 +530,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -622,13 +539,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -640,7 +554,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -650,13 +563,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -668,7 +578,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -678,13 +587,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -696,7 +602,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -706,13 +611,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -724,7 +626,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -734,13 +635,10 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template @@ -752,7 +650,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @@ -762,7 +659,6 @@ struct is_mem_fun_pointer_impl struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif -#endif #else diff --git a/boost/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp b/boost/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp index e6532d39db..334a843450 100644 --- a/boost/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp +++ b/boost/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp @@ -44,7 +44,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...)); @@ -56,7 +55,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)()); @@ -70,18 +68,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() volatile) template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)()); @@ -95,17 +81,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() volatile template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( ...) const volatile); #endif template @@ -120,17 +95,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0)); @@ -144,7 +108,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...)); @@ -156,7 +119,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0)); @@ -170,18 +132,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) volati template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0)); @@ -195,17 +145,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) volat template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 ...) const volatile); #endif template @@ -220,17 +159,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) volatile template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1)); @@ -244,7 +172,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...)); @@ -256,7 +183,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) volatil template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1)); @@ -270,18 +196,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) v template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1)); @@ -295,17 +209,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 ...) const volatile); #endif template @@ -320,17 +223,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) vol template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2)); @@ -344,7 +236,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) volati template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...)); @@ -356,7 +247,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) vo template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2)); @@ -370,18 +260,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2)); @@ -395,17 +273,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 ...) const volatile); #endif template @@ -420,17 +287,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3)); @@ -444,7 +300,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) v template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...)); @@ -456,7 +311,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 .. template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3)); @@ -470,18 +324,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3)); @@ -495,17 +337,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 ...) const volatile); #endif template @@ -520,17 +351,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); @@ -544,7 +364,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...)); @@ -556,7 +375,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); @@ -570,18 +388,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); @@ -595,17 +401,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const volatile); #endif template @@ -620,17 +415,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); @@ -644,7 +428,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); @@ -656,7 +439,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); @@ -670,18 +452,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); @@ -695,17 +465,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const volatile); #endif template @@ -720,17 +479,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); @@ -744,7 +492,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); @@ -756,7 +503,7 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile); -#endif + #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); @@ -770,18 +517,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); @@ -795,17 +530,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile); #endif template @@ -820,17 +544,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); @@ -844,7 +557,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); @@ -856,7 +568,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); @@ -870,18 +581,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); @@ -895,17 +594,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile); #endif template @@ -920,17 +608,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); @@ -944,7 +621,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); @@ -956,7 +632,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); @@ -970,18 +645,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); @@ -995,17 +658,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile); #endif template @@ -1020,17 +672,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); @@ -1044,7 +685,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); @@ -1056,7 +696,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); @@ -1070,18 +709,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); @@ -1095,17 +722,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile); #endif template @@ -1120,17 +736,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); @@ -1144,7 +749,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); @@ -1156,7 +760,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); @@ -1170,18 +773,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); @@ -1195,17 +786,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile); #endif template @@ -1220,17 +800,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); @@ -1244,7 +813,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); @@ -1256,7 +824,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); @@ -1270,18 +837,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); @@ -1295,17 +850,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile); #endif template @@ -1320,17 +864,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); @@ -1344,7 +877,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); @@ -1356,7 +888,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); @@ -1370,18 +901,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); @@ -1395,17 +914,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile); #endif template @@ -1420,17 +928,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); @@ -1444,7 +941,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); @@ -1456,7 +952,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); @@ -1470,18 +965,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); @@ -1495,17 +978,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile); #endif template @@ -1520,17 +992,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); @@ -1544,7 +1005,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); @@ -1556,7 +1016,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); @@ -1570,18 +1029,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); @@ -1595,42 +1042,20 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const); +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) volatile); +yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); @@ -1644,7 +1069,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); @@ -1656,7 +1080,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); @@ -1670,18 +1093,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); @@ -1695,17 +1106,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile); #endif template @@ -1720,17 +1120,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); @@ -1744,7 +1133,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); @@ -1756,7 +1144,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); @@ -1770,18 +1157,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); @@ -1795,17 +1170,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile); #endif template @@ -1820,17 +1184,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); @@ -1844,7 +1197,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); @@ -1856,7 +1208,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); @@ -1870,18 +1221,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); @@ -1895,17 +1234,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile); #endif template @@ -1920,17 +1248,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); @@ -1944,7 +1261,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); @@ -1956,7 +1272,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); @@ -1970,18 +1285,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); @@ -1995,17 +1298,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile); #endif template @@ -2020,17 +1312,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); @@ -2044,7 +1325,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); @@ -2056,7 +1336,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); @@ -2070,18 +1349,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); @@ -2095,17 +1362,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile); #endif template @@ -2120,17 +1376,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); @@ -2144,7 +1389,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); @@ -2156,7 +1400,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); @@ -2170,18 +1413,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); @@ -2195,17 +1426,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const volatile); #endif template @@ -2220,17 +1440,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); @@ -2244,7 +1453,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); @@ -2256,7 +1464,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); @@ -2270,18 +1477,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); @@ -2295,17 +1490,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const volatile); #endif template @@ -2320,17 +1504,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); @@ -2344,7 +1517,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); @@ -2356,7 +1528,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); @@ -2370,18 +1541,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); @@ -2395,17 +1554,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const volatile); #endif template @@ -2420,17 +1568,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); @@ -2444,7 +1581,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); @@ -2456,7 +1592,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); @@ -2470,18 +1605,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); @@ -2495,17 +1618,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const volatile); #endif template @@ -2520,17 +1632,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); @@ -2544,7 +1645,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); -#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); @@ -2556,7 +1656,6 @@ yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const volatile); -#endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); @@ -2570,18 +1669,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const volatile); - #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); @@ -2595,17 +1682,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const volatile); #endif template @@ -2620,17 +1696,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const volatile); #endif #else @@ -2692,18 +1757,6 @@ yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_EN template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const volatile); - @#ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); @@ -2717,17 +1770,6 @@ yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_E template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const volatile); @#endif template @@ -2742,17 +1784,6 @@ yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) volatile); - -template -yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const volatile); @#endif #undef BOOST_PP_COUNTER diff --git a/boost/boost/type_traits/detail/size_t_trait_def.hpp b/boost/boost/type_traits/detail/size_t_trait_def.hpp index 3be4f70af4..8cea9b4522 100644 --- a/boost/boost/type_traits/detail/size_t_trait_def.hpp +++ b/boost/boost/type_traits/detail/size_t_trait_def.hpp @@ -8,8 +8,8 @@ // http://www.boost.org/LICENSE_1_0.txt) // $Source$ -// $Date: 2011-04-25 05:26:48 -0700 (Mon, 25 Apr 2011) $ -// $Revision: 71481 $ +// $Date$ +// $Revision$ #include #include @@ -18,24 +18,16 @@ #include -#if !defined(BOOST_MSVC) || BOOST_MSVC >= 1300 -# define BOOST_TT_AUX_SIZE_T_BASE(C) public ::boost::integral_constant -# define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) /**/ -#else -# define BOOST_TT_AUX_SIZE_T_BASE(C) public ::boost::mpl::size_t -# define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ - typedef ::boost::mpl::size_t base_; \ - using base_::value; \ - /**/ -#endif +// Obsolete. Remove. +#define BOOST_TT_AUX_SIZE_T_BASE(C) public ::boost::integral_constant +#define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) /**/ #define BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(trait,T,C) \ template< typename T > struct trait \ - : BOOST_TT_AUX_SIZE_T_BASE(C) \ + : public ::boost::integral_constant \ { \ public:\ - BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ }; \ \ @@ -44,17 +36,16 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ #define BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(trait,spec,C) \ template<> struct trait \ - : BOOST_TT_AUX_SIZE_T_BASE(C) \ + : public ::boost::integral_constant \ { \ public:\ - BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \ }; \ /**/ #define BOOST_TT_AUX_SIZE_T_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,C) \ template< param > struct trait \ - : BOOST_TT_AUX_SIZE_T_BASE(C) \ + : public ::boost::integral_constant \ { \ }; \ /**/ diff --git a/boost/boost/type_traits/detail/size_t_trait_undef.hpp b/boost/boost/type_traits/detail/size_t_trait_undef.hpp index 967fd91631..1694fac772 100644 --- a/boost/boost/type_traits/detail/size_t_trait_undef.hpp +++ b/boost/boost/type_traits/detail/size_t_trait_undef.hpp @@ -8,8 +8,8 @@ // http://www.boost.org/LICENSE_1_0.txt) // $Source$ -// $Date: 2004-09-02 08:41:37 -0700 (Thu, 02 Sep 2004) $ -// $Revision: 24874 $ +// $Date$ +// $Revision$ #undef BOOST_TT_AUX_SIZE_T_TRAIT_DEF1 #undef BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1 diff --git a/boost/boost/type_traits/detail/type_trait_def.hpp b/boost/boost/type_traits/detail/type_trait_def.hpp index 224f84887d..bc54696b55 100644 --- a/boost/boost/type_traits/detail/type_trait_def.hpp +++ b/boost/boost/type_traits/detail/type_trait_def.hpp @@ -8,8 +8,8 @@ // http://www.boost.org/LICENSE_1_0.txt) // $Source$ -// $Date: 2011-04-25 05:26:48 -0700 (Mon, 25 Apr 2011) $ -// $Revision: 71481 $ +// $Date$ +// $Revision$ #include #include diff --git a/boost/boost/type_traits/detail/type_trait_undef.hpp b/boost/boost/type_traits/detail/type_trait_undef.hpp index c4f14ff8d1..d8edf66275 100644 --- a/boost/boost/type_traits/detail/type_trait_undef.hpp +++ b/boost/boost/type_traits/detail/type_trait_undef.hpp @@ -8,8 +8,8 @@ // http://www.boost.org/LICENSE_1_0.txt) // $Source$ -// $Date: 2004-09-02 08:41:37 -0700 (Thu, 02 Sep 2004) $ -// $Revision: 24874 $ +// $Date$ +// $Revision$ #undef BOOST_TT_AUX_TYPE_TRAIT_DEF1 #undef BOOST_TT_AUX_TYPE_TRAIT_SPEC1 diff --git a/boost/boost/type_traits/detail/wrap.hpp b/boost/boost/type_traits/detail/wrap.hpp deleted file mode 100644 index d0a75d06cb..0000000000 --- a/boost/boost/type_traits/detail/wrap.hpp +++ /dev/null @@ -1,18 +0,0 @@ -// (C) Copyright David Abrahams 2002. -// 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_TT_DETAIL_WRAP_HPP_INCLUDED -#define BOOST_TT_DETAIL_WRAP_HPP_INCLUDED - -namespace boost { -namespace type_traits { - -template struct wrap {}; - -}} // namespace boost::type_traits - -#endif // BOOST_TT_DETAIL_WRAP_HPP_INCLUDED diff --git a/boost/boost/type_traits/extent.hpp b/boost/boost/type_traits/extent.hpp index 27e8a670fc..c41f7f2ffe 100644 --- a/boost/boost/type_traits/extent.hpp +++ b/boost/boost/type_traits/extent.hpp @@ -31,7 +31,7 @@ struct extent_imp { BOOST_STATIC_CONSTANT(std::size_t, value = 0); }; -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) template struct extent_imp { @@ -131,10 +131,6 @@ template struct extent : public ::boost::integral_constant::value> { -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - typedef ::boost::integral_constant::value> base_; - using base_::value; -#endif BOOST_MPL_AUX_LAMBDA_SUPPORT(1,extent,(T)) }; diff --git a/boost/boost/type_traits/function_traits.hpp b/boost/boost/type_traits/function_traits.hpp index d71534572c..26d7e05c5f 100644 --- a/boost/boost/type_traits/function_traits.hpp +++ b/boost/boost/type_traits/function_traits.hpp @@ -15,7 +15,6 @@ namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace detail { template struct function_traits_helper; @@ -170,67 +169,6 @@ struct function_traits : { }; -#else - -namespace detail { - -template -struct type_of_size -{ - char elements[N]; -}; - -template -type_of_size<1> function_arity_helper(R (*f)()); - -template -type_of_size<2> function_arity_helper(R (*f)(T1)); - -template -type_of_size<3> function_arity_helper(R (*f)(T1, T2)); - -template -type_of_size<4> function_arity_helper(R (*f)(T1, T2, T3)); - -template -type_of_size<5> function_arity_helper(R (*f)(T1, T2, T3, T4)); - -template -type_of_size<6> function_arity_helper(R (*f)(T1, T2, T3, T4, T5)); - -template -type_of_size<7> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6)); - -template -type_of_size<8> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6, T7)); - -template -type_of_size<9> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6, T7, T8)); - -template -type_of_size<10> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6, T7, T8, - T9)); - -template -type_of_size<11> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6, T7, T8, - T9, T10)); -} // end namespace detail - -// Won't work with references -template -struct function_traits -{ - BOOST_STATIC_CONSTANT(unsigned, arity = (sizeof(boost::detail::function_arity_helper((Function*)0))-1)); -}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } #endif // BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED diff --git a/boost/boost/type_traits/has_logical_not.hpp b/boost/boost/type_traits/has_logical_not.hpp index fd99d3cbbe..d36858e1ec 100644 --- a/boost/boost/type_traits/has_logical_not.hpp +++ b/boost/boost/type_traits/has_logical_not.hpp @@ -9,6 +9,11 @@ #ifndef BOOST_TT_HAS_LOGICAL_NOT_HPP_INCLUDED #define BOOST_TT_HAS_LOGICAL_NOT_HPP_INCLUDED +#if defined(__GNUC__) && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ > 40800) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-value" +#endif + #define BOOST_TT_TRAIT_NAME has_logical_not #define BOOST_TT_TRAIT_OP ! #define BOOST_TT_FORBIDDEN_IF\ @@ -20,4 +25,8 @@ #undef BOOST_TT_TRAIT_OP #undef BOOST_TT_FORBIDDEN_IF +#if defined(__GNUC__) && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ > 40800) +#pragma GCC diagnostic pop +#endif + #endif diff --git a/boost/boost/type_traits/has_new_operator.hpp b/boost/boost/type_traits/has_new_operator.hpp index 2c2c32228f..c615127da3 100644 --- a/boost/boost/type_traits/has_new_operator.hpp +++ b/boost/boost/type_traits/has_new_operator.hpp @@ -18,6 +18,16 @@ // should be the last #include #include +#if defined(new) +# if BOOST_WORKAROUND(BOOST_MSVC, >= 1310) +# define BOOST_TT_AUX_MACRO_NEW_DEFINED +# pragma push_macro("new") +# undef new +# else +# error "Sorry but you can't include this header if 'new' is defined as a macro." +# endif +#endif + namespace boost { namespace detail { template @@ -135,6 +145,10 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_new_operator,T,::boost::detail::has_new_operato } // namespace boost +#if defined(BOOST_TT_AUX_MACRO_NEW_DEFINED) +# pragma pop_macro("new") +#endif + #include #endif // BOOST_TT_HAS_NEW_OPERATOR_HPP_INCLUDED diff --git a/boost/boost/type_traits/has_post_decrement.hpp b/boost/boost/type_traits/has_post_decrement.hpp index e277eaf98a..024acb06e2 100644 --- a/boost/boost/type_traits/has_post_decrement.hpp +++ b/boost/boost/type_traits/has_post_decrement.hpp @@ -9,6 +9,8 @@ #ifndef BOOST_TT_HAS_POST_DECREMENT_HPP_INCLUDED #define BOOST_TT_HAS_POST_DECREMENT_HPP_INCLUDED +#include + #define BOOST_TT_TRAIT_NAME has_post_decrement #define BOOST_TT_TRAIT_OP -- #define BOOST_TT_FORBIDDEN_IF\ @@ -27,7 +29,9 @@ ::boost::is_pointer< Lhs_noref >::value\ >::value,\ ::boost::is_const< Lhs_noref >::value\ - >::value\ + >::value,\ + /* Arrays */ \ + ::boost::is_array::value\ >::value diff --git a/boost/boost/type_traits/has_post_increment.hpp b/boost/boost/type_traits/has_post_increment.hpp index 085b2d5933..b055607d52 100644 --- a/boost/boost/type_traits/has_post_increment.hpp +++ b/boost/boost/type_traits/has_post_increment.hpp @@ -9,6 +9,8 @@ #ifndef BOOST_TT_HAS_POST_INCREMENT_HPP_INCLUDED #define BOOST_TT_HAS_POST_INCREMENT_HPP_INCLUDED +#include + #define BOOST_TT_TRAIT_NAME has_post_increment #define BOOST_TT_TRAIT_OP ++ #define BOOST_TT_FORBIDDEN_IF\ @@ -27,7 +29,9 @@ ::boost::is_pointer< Lhs_noref >::value\ >::value,\ ::boost::is_const< Lhs_noref >::value\ - >::value\ + >::value,\ + /* Arrays */ \ + ::boost::is_array::value\ >::value diff --git a/boost/boost/type_traits/has_pre_decrement.hpp b/boost/boost/type_traits/has_pre_decrement.hpp index 8f08291b0b..feb3d9d2e6 100644 --- a/boost/boost/type_traits/has_pre_decrement.hpp +++ b/boost/boost/type_traits/has_pre_decrement.hpp @@ -9,6 +9,8 @@ #ifndef BOOST_TT_HAS_PRE_DECREMENT_HPP_INCLUDED #define BOOST_TT_HAS_PRE_DECREMENT_HPP_INCLUDED +#include + #define BOOST_TT_TRAIT_NAME has_pre_decrement #define BOOST_TT_TRAIT_OP -- #define BOOST_TT_FORBIDDEN_IF\ @@ -27,7 +29,9 @@ ::boost::is_pointer< Rhs_noref >::value\ >::value,\ ::boost::is_const< Rhs_noref >::value\ - >::value\ + >::value,\ + /* Arrays */ \ + ::boost::is_array::value\ >::value diff --git a/boost/boost/type_traits/has_pre_increment.hpp b/boost/boost/type_traits/has_pre_increment.hpp index fcb946d573..6a2411de69 100644 --- a/boost/boost/type_traits/has_pre_increment.hpp +++ b/boost/boost/type_traits/has_pre_increment.hpp @@ -9,6 +9,8 @@ #ifndef BOOST_TT_HAS_PRE_INCREMENT_HPP_INCLUDED #define BOOST_TT_HAS_PRE_INCREMENT_HPP_INCLUDED +#include + #define BOOST_TT_TRAIT_NAME has_pre_increment #define BOOST_TT_TRAIT_OP ++ #define BOOST_TT_FORBIDDEN_IF\ @@ -27,7 +29,9 @@ ::boost::is_pointer< Rhs_noref >::value\ >::value,\ ::boost::is_const< Rhs_noref >::value\ - >::value\ + >::value,\ + /* Arrays */ \ + ::boost::is_array::value\ >::value diff --git a/boost/boost/type_traits/has_trivial_copy.hpp b/boost/boost/type_traits/has_trivial_copy.hpp index ba4d8847e8..1c567cf042 100644 --- a/boost/boost/type_traits/has_trivial_copy.hpp +++ b/boost/boost/type_traits/has_trivial_copy.hpp @@ -17,6 +17,10 @@ #include #include +#ifdef __clang__ +#include +#endif + // should be the last #include #include @@ -28,7 +32,11 @@ template struct has_trivial_copy_impl { #ifdef BOOST_HAS_TRIVIAL_COPY +# ifdef __clang__ + BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_COPY(T) && boost::is_copy_constructible::value); +# else BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_COPY(T)); +# endif #else BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< @@ -38,6 +46,16 @@ struct has_trivial_copy_impl #endif }; +#ifdef __clang__ + +template +struct has_trivial_copy_impl +{ + static const bool value = has_trivial_copy_impl::value; +}; + +#endif + } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_copy,T,::boost::detail::has_trivial_copy_impl::value) diff --git a/boost/boost/type_traits/integral_constant.hpp b/boost/boost/type_traits/integral_constant.hpp index 4ed1bb058f..c6847715e0 100644 --- a/boost/boost/type_traits/integral_constant.hpp +++ b/boost/boost/type_traits/integral_constant.hpp @@ -24,24 +24,10 @@ struct integral_constant : public mpl::integral_c template<> struct integral_constant : public mpl::true_ { -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -# pragma warning(push) -# pragma warning(disable:4097) - typedef mpl::true_ base_; - using base_::value; -# pragma warning(pop) -#endif typedef integral_constant type; }; template<> struct integral_constant : public mpl::false_ { -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -# pragma warning(push) -# pragma warning(disable:4097) - typedef mpl::false_ base_; - using base_::value; -# pragma warning(pop) -#endif typedef integral_constant type; }; diff --git a/boost/boost/type_traits/integral_promotion.hpp b/boost/boost/type_traits/integral_promotion.hpp index 2109b9c60d..9c5514b115 100644 --- a/boost/boost/type_traits/integral_promotion.hpp +++ b/boost/boost/type_traits/integral_promotion.hpp @@ -43,8 +43,7 @@ template<> struct need_promotion : public true_type {}; // Same set of integral types as in boost/type_traits/is_integral.hpp. // Please, keep in sync. -#if (defined(BOOST_MSVC) && (BOOST_MSVC < 1300)) \ - || (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ +#if (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER < 1300)) // TODO: common macro for this #if. Or better yet, PP SEQ of non-standard types. BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int8 ) diff --git a/boost/boost/type_traits/intrinsics.hpp b/boost/boost/type_traits/intrinsics.hpp index 799f9b63f5..e8a87b04e4 100644 --- a/boost/boost/type_traits/intrinsics.hpp +++ b/boost/boost/type_traits/intrinsics.hpp @@ -32,6 +32,8 @@ // BOOST_HAS_NOTHROW_COPY(T) should evaluate to true if T(t) can not throw // BOOST_HAS_NOTHROW_ASSIGN(T) should evaluate to true if t = u can not throw // BOOST_HAS_VIRTUAL_DESTRUCTOR(T) should evaluate to true T has a virtual destructor +// BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T) should evaluate to true if T has a non-throwing move constructor. +// BOOST_IS_NOTHROW_MOVE_ASSIGN(T) should evaluate to true if T has a non-throwing move assignment operator. // // The following can also be defined: when detected our implementation is greatly simplified. // @@ -109,10 +111,13 @@ // # define BOOST_ALIGNMENT_OF(T) __alignof(T) # if defined(_MSC_VER) && (_MSC_VER >= 1700) -# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) ((__has_trivial_move_constructor(T) || ::boost::is_pod::value) && !::boost::is_volatile::value) -# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__has_trivial_move_assign(T) || ::boost::is_pod::value) && ! ::boost::is_const::value && !::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) ((__has_trivial_move_constructor(T) || __is_pod(T)) && !::boost::is_volatile::value && !::boost::is_reference::value) +# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__has_trivial_move_assign(T) || __is_pod(T)) && ! ::boost::is_const::value && !::boost::is_volatile::value && !::boost::is_reference::value) # endif - +#if _MSC_FULL_VER >= 180020827 +# define BOOST_IS_NOTHROW_MOVE_ASSIGN(T) (__is_nothrow_assignable(T&, T&&)) +# define BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T) (__is_nothrow_constructible(T, T&&)) +#endif # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif @@ -132,7 +137,13 @@ # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif -#if defined(BOOST_CLANG) && defined(__has_feature) +#if defined(BOOST_CLANG) && defined(__has_feature) && !defined(__CUDACC__) +// +// Note that these intrinsics are disabled for the CUDA meta-compiler as it appears +// to not support them, even though the underlying clang compiler does so. +// This is a rubbish fix as it basically stops type traits from working correctly, +// but maybe the best we can do for now. See https://svn.boost.org/trac/boost/ticket/10694 +// # include # include # include @@ -181,8 +192,7 @@ # define BOOST_IS_CLASS(T) __is_class(T) # endif # if __has_feature(is_convertible_to) -# include -# define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible_to(T,U) && !::boost::is_abstract::value) +# define BOOST_IS_CONVERTIBLE(T,U) __is_convertible_to(T,U) # endif # if __has_feature(is_enum) # define BOOST_IS_ENUM(T) __is_enum(T) @@ -197,6 +207,9 @@ # define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) __has_trivial_move_assign(T) # endif # define BOOST_ALIGNMENT_OF(T) __alignof(T) +# if __has_feature(is_final) +# define BOOST_IS_FINAL(T) __is_final(T) +# endif # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif @@ -235,6 +248,37 @@ // old implementation instead in that case: # define BOOST_ALIGNMENT_OF(T) __alignof__(T) # endif +# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) +# define BOOST_IS_FINAL(T) __is_final(T) +# endif + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + +#if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130) +# include +# include +# include + +# define BOOST_IS_UNION(T) __oracle_is_union(T) +# define BOOST_IS_POD(T) __oracle_is_pod(T) +# define BOOST_IS_EMPTY(T) __oracle_is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__oracle_has_trivial_constructor(T) && ! ::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_COPY(T) (__oracle_has_trivial_copy(T) && !is_reference::value && ! ::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__oracle_has_trivial_assign(T) || __oracle_is_trivial(T)) && ! ::boost::is_volatile::value && ! ::boost::is_const::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __oracle_has_trivial_destructor(T) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__oracle_has_nothrow_constructor(T) || __oracle_has_trivial_constructor(T) || __oracle_is_trivial(T)) +# define BOOST_HAS_NOTHROW_COPY(T) ((__oracle_has_nothrow_copy(T) || __oracle_has_trivial_copy(T) || __oracle_is_trivial(T)) && !is_volatile::value && !is_reference::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) ((__oracle_has_nothrow_assign(T) || __oracle_has_trivial_assign(T) || __oracle_is_trivial(T)) && !is_volatile::value && !is_const::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __oracle_has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __oracle_is_abstract(T) +//# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# define BOOST_IS_CLASS(T) __oracle_is_class(T) +# define BOOST_IS_ENUM(T) __oracle_is_enum(T) +# define BOOST_IS_POLYMORPHIC(T) __oracle_is_polymorphic(T) +# define BOOST_ALIGNMENT_OF(T) __alignof__(T) +# define BOOST_IS_FINAL(T) __oracle_is_final(T) # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif @@ -262,7 +306,6 @@ # define BOOST_IS_ENUM(T) __is_enum(T) # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) # define BOOST_ALIGNMENT_OF(T) __alignof__(T) - # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif diff --git a/boost/boost/type_traits/is_abstract.hpp b/boost/boost/type_traits/is_abstract.hpp index d88c143995..f1cd92c67c 100644 --- a/boost/boost/type_traits/is_abstract.hpp +++ b/boost/boost/type_traits/is_abstract.hpp @@ -1,7 +1,7 @@ #ifndef BOOST_TT_IS_ABSTRACT_CLASS_HPP #define BOOST_TT_IS_ABSTRACT_CLASS_HPP -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -19,7 +19,7 @@ // Compile type discovery whether given type is abstract class or not. // // Requires DR 337 to be supported by compiler -// (http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_active.html#337). +// (http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#337). // // // Believed (Jan 2004) to work on: diff --git a/boost/boost/type_traits/is_array.hpp b/boost/boost/type_traits/is_array.hpp index 91c0f156db..c381ca4e70 100644 --- a/boost/boost/type_traits/is_array.hpp +++ b/boost/boost/type_traits/is_array.hpp @@ -16,10 +16,6 @@ #include -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# include -# include -#endif #include @@ -30,7 +26,7 @@ namespace boost { #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,__is_array(T)) -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,false) #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T[N],true) @@ -45,45 +41,8 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_array,T const volatile[],t #endif #endif -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -namespace detail { - -using ::boost::type_traits::yes_type; -using ::boost::type_traits::no_type; -using ::boost::type_traits::wrap; - -template< typename T > T(* is_array_tester1(wrap) )(wrap); -char BOOST_TT_DECL is_array_tester1(...); - -template< typename T> no_type is_array_tester2(T(*)(wrap)); -yes_type BOOST_TT_DECL is_array_tester2(...); - -template< typename T > -struct is_array_impl -{ - BOOST_STATIC_CONSTANT(bool, value = - sizeof(::boost::detail::is_array_tester2( - ::boost::detail::is_array_tester1( - ::boost::type_traits::wrap() - ) - )) == 1 - ); -}; - -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void const,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void volatile,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void const volatile,false) #endif -} // namespace detail - -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,::boost::detail::is_array_impl::value) - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - } // namespace boost #include diff --git a/boost/boost/type_traits/is_base_and_derived.hpp b/boost/boost/type_traits/is_base_and_derived.hpp index d6a9991182..632b699445 100644 --- a/boost/boost/type_traits/is_base_and_derived.hpp +++ b/boost/boost/type_traits/is_base_and_derived.hpp @@ -237,11 +237,9 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF2( , (::boost::detail::is_base_and_derived_impl::value) ) -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base&,Derived,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base,Derived&,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base&,Derived&,false) -#endif #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610)) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename Base,is_base_and_derived,Base,Base,false) diff --git a/boost/boost/type_traits/is_base_of.hpp b/boost/boost/type_traits/is_base_of.hpp index 0cc7a32fc9..3655b0bd23 100644 --- a/boost/boost/type_traits/is_base_of.hpp +++ b/boost/boost/type_traits/is_base_of.hpp @@ -38,11 +38,9 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF2( , Derived , (::boost::detail::is_base_of_imp::value)) -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base&,Derived,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base,Derived&,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base&,Derived&,false) -#endif } // namespace boost diff --git a/boost/boost/type_traits/is_class.hpp b/boost/boost/type_traits/is_class.hpp index 1a2cd20157..0675b57822 100644 --- a/boost/boost/type_traits/is_class.hpp +++ b/boost/boost/type_traits/is_class.hpp @@ -93,7 +93,6 @@ struct is_class_impl template struct is_class_impl { -# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_union::value >::value, @@ -103,16 +102,6 @@ struct is_class_impl ::boost::type_traits::ice_not< ::boost::is_void::value >::value, ::boost::type_traits::ice_not< ::boost::is_function::value >::value >::value)); -# else - BOOST_STATIC_CONSTANT(bool, value = - (::boost::type_traits::ice_and< - ::boost::type_traits::ice_not< ::boost::is_union::value >::value, - ::boost::type_traits::ice_not< ::boost::is_scalar::value >::value, - ::boost::type_traits::ice_not< ::boost::is_array::value >::value, - ::boost::type_traits::ice_not< ::boost::is_reference::value>::value, - ::boost::type_traits::ice_not< ::boost::is_void::value >::value - >::value)); -# endif }; # endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION diff --git a/boost/boost/type_traits/is_const.hpp b/boost/boost/type_traits/is_const.hpp index 0c7da4a2f5..e3e62b697c 100644 --- a/boost/boost/type_traits/is_const.hpp +++ b/boost/boost/type_traits/is_const.hpp @@ -24,7 +24,6 @@ #include #include -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # include # ifdef __GNUC__ # include @@ -32,12 +31,6 @@ # if BOOST_WORKAROUND(BOOST_MSVC, < 1400) # include # endif -#else -# include -# include -# include -# include -#endif // should be the last #include #include @@ -48,7 +41,7 @@ namespace boost { BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,__is_const(T)) -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#else namespace detail{ // @@ -61,7 +54,7 @@ struct is_const_rvalue_filter #if BOOST_WORKAROUND(BOOST_MSVC, < 1400) BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::type*>::is_const); #else - BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_const); + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_const); #endif }; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES @@ -87,76 +80,8 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& volatile,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& const volatile,false) #endif -#if defined(__GNUC__) && (__GNUC__ < 3) -// special case for gcc where illegally cv-qualified reference types can be -// generated in some corner cases: -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T const,!(::boost::is_reference::value)) -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T volatile const,!(::boost::is_reference::value)) -#endif - -#else - -namespace detail { - -using ::boost::type_traits::yes_type; -using ::boost::type_traits::no_type; - -yes_type is_const_tester(const volatile void*); -no_type is_const_tester(volatile void *); - -template -struct is_const_helper - : public ::boost::type_traits::false_result -{ -}; - -template <> -struct is_const_helper -{ - template struct result_ - { - static T* t; - BOOST_STATIC_CONSTANT(bool, value = ( - sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_const_tester(t)) - )); - }; -}; - -template <> -struct is_const_helper -{ - template struct result_ - { - static T t; - BOOST_STATIC_CONSTANT(bool, value = ( - sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_const_tester(&t)) - )); - }; -}; - -template -struct is_const_impl - : public is_const_helper< - is_reference::value - , is_array::value - >::template result_ -{ -}; - -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void,false) -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void const,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void volatile,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void const volatile,true) #endif -} // namespace detail - -//* is a type T declared const - is_const -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::is_const_impl::value) - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - } // namespace boost #include diff --git a/boost/boost/type_traits/is_convertible.hpp b/boost/boost/type_traits/is_convertible.hpp index 3eccadc588..a844cecb36 100644 --- a/boost/boost/type_traits/is_convertible.hpp +++ b/boost/boost/type_traits/is_convertible.hpp @@ -30,7 +30,9 @@ #if defined(__MWERKS__) #include #endif - +#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) +# include +#endif #endif // BOOST_IS_CONVERTIBLE // should be always the last #include directive @@ -52,42 +54,43 @@ namespace boost { namespace detail { -// MS specific version: +#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) -#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) + // This is a C++11 conforming version, place this first and use it wherever possible: -// This workaround is necessary to handle when From is void -// which is normally taken care of by the partial specialization -// of the is_convertible typename. -using ::boost::type_traits::yes_type; -using ::boost::type_traits::no_type; +# define BOOST_TT_CXX11_IS_CONVERTIBLE -template< typename From > -struct does_conversion_exist -{ - template< typename To > struct result_ - { - static no_type BOOST_TT_DECL _m_check(...); - static yes_type BOOST_TT_DECL _m_check(To); - static typename add_lvalue_reference::type _m_from; - enum { value = sizeof( _m_check(_m_from) ) == sizeof(yes_type) }; - }; -}; + template + struct or_helper + { + static const bool value = (A::value || B::value || C::value); + }; -template<> -struct does_conversion_exist -{ - template< typename To > struct result_ - { - enum { value = ::boost::is_void::value }; - }; -}; + template, boost::is_function, boost::is_array >::value> + struct is_convertible_basic_impl + { + // Nothing converts to function or array, but void converts to void: + static const bool value = is_void::value; + }; -template -struct is_convertible_basic_impl - : public does_conversion_exist::template result_ -{ -}; + template + class is_convertible_basic_impl + { + typedef char one; + typedef int two; + + template + static void test_aux(To1); + + template + static decltype(test_aux(boost::declval()), one()) test(int); + + template + static two test(...); + + public: + static const bool value = sizeof(test(0)) == 1; + }; #elif defined(__BORLANDC__) && (__BORLANDC__ < 0x560) // @@ -415,7 +418,8 @@ struct is_convertible_impl_dispatch_base typedef is_convertible_impl_select< ::boost::is_arithmetic::value, ::boost::is_arithmetic::value, -#ifndef BOOST_NO_IS_ABSTRACT +#if !defined(BOOST_NO_IS_ABSTRACT) && !defined(BOOST_TT_CXX11_IS_CONVERTIBLE) + // We need to filter out abstract types, only if we don't have a strictly conforming C++11 version: ::boost::is_abstract::value #else false @@ -462,7 +466,6 @@ struct is_convertible_impl_dispatch BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(is_convertible,void,void,true) #endif // BOOST_NO_CV_VOID_SPECIALIZATIONS -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void,To,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS @@ -473,7 +476,6 @@ BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,v BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void volatile,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const volatile,false) #endif -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace detail diff --git a/boost/boost/type_traits/is_copy_assignable.hpp b/boost/boost/type_traits/is_copy_assignable.hpp new file mode 100644 index 0000000000..48af818849 --- /dev/null +++ b/boost/boost/type_traits/is_copy_assignable.hpp @@ -0,0 +1,147 @@ +// (C) Copyright Ion Gaztanaga 2014. +// +// 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_TT_IS_COPY_ASSIGNABLE_HPP_INCLUDED +#define BOOST_TT_IS_COPY_ASSIGNABLE_HPP_INCLUDED + +#include +#include +#include +#include + +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_CXX11_DECLTYPE) \ + && !defined(BOOST_INTEL_CXX_VERSION) && \ + !(defined(BOOST_MSVC) && _MSC_VER == 1800) +#define BOOST_TT_CXX11_IS_COPY_ASSIGNABLE +#include +#else + //For compilers without decltype + #include + #include + #include + #include +#endif + + +// should be the last #include +#include + +namespace boost { + +namespace detail{ + +template +struct is_copy_assignable_impl2 { + +// Intel compiler has problems with SFINAE for copy constructors and deleted functions: +// +// error: function *function_name* cannot be referenced -- it is a deleted function +// static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval()))* = 0); +// ^ +// +// MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See: +// https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken +#if defined(BOOST_TT_CXX11_IS_COPY_ASSIGNABLE) + typedef boost::type_traits::yes_type yes_type; + typedef boost::type_traits::no_type no_type; + + template + static decltype(::boost::declval() = ::boost::declval(), yes_type() ) test(int); + + template + static no_type test(...); + + static const bool value = sizeof(test(0)) == sizeof(yes_type); + +#else + static BOOST_DEDUCED_TYPENAME boost::add_reference::type produce(); + + template + static boost::type_traits::no_type test(T1&, typename T1::boost_move_no_copy_constructor_or_assign* = 0); + + static boost::type_traits::yes_type test(...); + // If you see errors like this: + // + // `'T::operator=(const T&)' is private` + // `boost/type_traits/is_copy_assignable.hpp:NN:M: error: within this context` + // + // then you are trying to call that macro for a structure defined like that: + // + // struct T { + // ... + // private: + // T & operator=(const T &); + // ... + // }; + // + // To fix that you must modify your structure: + // + // // C++03 and C++11 version + // struct T: private boost::noncopyable { + // ... + // private: + // T & operator=(const T &); + // ... + // }; + // + // // C++11 version + // struct T { + // ... + // private: + // T& operator=(const T &) = delete; + // ... + // }; + BOOST_STATIC_CONSTANT(bool, value = ( + sizeof(test(produce())) == sizeof(boost::type_traits::yes_type) + )); + #endif +}; + +template +struct is_copy_assignable_impl2 { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct is_copy_assignable_impl { + +#if !defined(BOOST_TT_CXX11_IS_COPY_ASSIGNABLE) + //For compilers without decltype, at least return false on const types, arrays + //types derived from boost::noncopyable and types defined as BOOST_MOVEABLE_BUT_NOT_COPYABLE + typedef BOOST_DEDUCED_TYPENAME boost::remove_reference::type unreferenced_t; + BOOST_STATIC_CONSTANT(bool, value = ( + boost::detail::is_copy_assignable_impl2< + boost::is_base_and_derived::value + || boost::is_const::value || boost::is_array::value + ,T + >::value + )); + #else + BOOST_STATIC_CONSTANT(bool, value = ( + boost::detail::is_copy_assignable_impl2< + boost::is_base_and_derived::value,T + >::value + )); + #endif +}; + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_copy_assignable,T,::boost::detail::is_copy_assignable_impl::value) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_copy_assignable,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_copy_assignable,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_copy_assignable,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_copy_assignable,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_COPY_ASSIGNABLE_HPP_INCLUDED diff --git a/boost/boost/type_traits/is_copy_constructible.hpp b/boost/boost/type_traits/is_copy_constructible.hpp index e90ecb76d9..24f5eebc27 100644 --- a/boost/boost/type_traits/is_copy_constructible.hpp +++ b/boost/boost/type_traits/is_copy_constructible.hpp @@ -32,7 +32,10 @@ struct is_copy_constructible_impl2 { // error: function *function_name* cannot be referenced -- it is a deleted function // static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval()))* = 0); // ^ -#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_INTEL_CXX_VERSION) +// +// MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See: +// https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_INTEL_CXX_VERSION) && !(defined(BOOST_MSVC) && _MSC_VER == 1800) #ifdef BOOST_NO_CXX11_DECLTYPE template diff --git a/boost/boost/type_traits/is_empty.hpp b/boost/boost/type_traits/is_empty.hpp index 8a2c5b8bc6..adb239ee24 100644 --- a/boost/boost/type_traits/is_empty.hpp +++ b/boost/boost/type_traits/is_empty.hpp @@ -14,19 +14,9 @@ #include #include -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # include # include # include -#else -# include -# include -# include -# include -# include -# include -# include -#endif // should be always the last #include directive #include @@ -41,7 +31,6 @@ namespace boost { namespace detail { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #ifdef BOOST_MSVC #pragma warning(push) @@ -130,82 +119,6 @@ struct is_empty_impl #endif // __BORLANDC__ -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#ifdef BOOST_MSVC6_MEMBER_TEMPLATES - -template -struct empty_helper_t1 : public T -{ - empty_helper_t1(); - int i[256]; -}; - -struct empty_helper_t2 { int i[256]; }; - -template -struct empty_helper_base -{ - enum { value = (sizeof(empty_helper_t1) == sizeof(empty_helper_t2)) }; -}; - -template -struct empty_helper_nonbase -{ - enum { value = false }; -}; - -template -struct empty_helper_chooser -{ - template struct result_ - { - typedef empty_helper_nonbase type; - }; -}; - -template <> -struct empty_helper_chooser -{ - template struct result_ - { - typedef empty_helper_base type; - }; -}; - -template -struct is_empty_impl -{ - typedef ::boost::detail::empty_helper_chooser< - ::boost::type_traits::ice_and< - ::boost::type_traits::ice_not< ::boost::is_reference::value >::value, - ::boost::type_traits::ice_not< ::boost::is_convertible::value >::value, - ::boost::type_traits::ice_not< ::boost::is_pointer::value >::value, - ::boost::type_traits::ice_not< ::boost::is_member_pointer::value >::value, - ::boost::type_traits::ice_not< ::boost::is_array::value >::value, - ::boost::type_traits::ice_not< ::boost::is_void::value >::value, - ::boost::type_traits::ice_not< - ::boost::is_convertible::value - >::value - >::value > chooser; - - typedef typename chooser::template result_ result; - typedef typename result::type eh_type; - - BOOST_STATIC_CONSTANT(bool, value = - (::boost::type_traits::ice_or::value)); -}; - -#else - -template struct is_empty_impl -{ - BOOST_STATIC_CONSTANT(bool, value = BOOST_INTERNAL_IS_EMPTY(T)); -}; - -#endif // BOOST_MSVC6_MEMBER_TEMPLATES - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // these help when the compiler has no partial specialization support: BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void,false) diff --git a/boost/boost/type_traits/is_enum.hpp b/boost/boost/type_traits/is_enum.hpp index e35548c545..7929c962a5 100644 --- a/boost/boost/type_traits/is_enum.hpp +++ b/boost/boost/type_traits/is_enum.hpp @@ -55,13 +55,12 @@ struct is_class_or_union template struct is_class_or_union { -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))// we simply can't detect it this way. +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))// we simply can't detect it this way. BOOST_STATIC_CONSTANT(bool, value = false); # else template static ::boost::type_traits::yes_type is_class_or_union_tester(void(U::*)(void)); -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) \ - || BOOST_WORKAROUND(__MWERKS__, <= 0x3000) // no SFINAE +# if BOOST_WORKAROUND(__MWERKS__, <= 0x3000) // no SFINAE static ::boost::type_traits::no_type is_class_or_union_tester(...); BOOST_STATIC_CONSTANT( bool, value = sizeof(is_class_or_union_tester(0)) == sizeof(::boost::type_traits::yes_type)); diff --git a/boost/boost/type_traits/is_function.hpp b/boost/boost/type_traits/is_function.hpp index cd80e740f1..eeb4382010 100644 --- a/boost/boost/type_traits/is_function.hpp +++ b/boost/boost/type_traits/is_function.hpp @@ -15,7 +15,7 @@ #include #include -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) +#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS) # include #else # include @@ -37,7 +37,7 @@ namespace boost { namespace detail { -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) +#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS) template struct is_function_chooser : public ::boost::type_traits::false_result @@ -79,7 +79,6 @@ struct is_function_impl #endif }; -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct is_function_impl : public false_type {}; @@ -88,7 +87,6 @@ template struct is_function_impl : public false_type {}; #endif -#endif #endif diff --git a/boost/boost/type_traits/is_integral.hpp b/boost/boost/type_traits/is_integral.hpp index 1ab27fd39c..6bfad49d39 100644 --- a/boost/boost/type_traits/is_integral.hpp +++ b/boost/boost/type_traits/is_integral.hpp @@ -46,8 +46,7 @@ BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,wchar_t,true) // Same set of integral types as in boost/type_traits/integral_promotion.hpp. // Please, keep in sync. -- Alexander Nasonov -#if (defined(BOOST_MSVC) && (BOOST_MSVC < 1300)) \ - || (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ +#if (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER < 1300)) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int8,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int8,true) diff --git a/boost/boost/type_traits/is_lvalue_reference.hpp b/boost/boost/type_traits/is_lvalue_reference.hpp index a6af859ab4..0b0130ab2d 100644 --- a/boost/boost/type_traits/is_lvalue_reference.hpp +++ b/boost/boost/type_traits/is_lvalue_reference.hpp @@ -23,10 +23,6 @@ #include -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# include -# include -#endif // should be the last #include #include @@ -35,7 +31,7 @@ namespace boost { #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,__is_reference(T)) -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T&,true) @@ -50,66 +46,8 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& volati BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& const volatile,true) #endif -#if defined(__GNUC__) && (__GNUC__ < 3) -// these allow us to work around illegally cv-qualified reference -// types. -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T const ,::boost::is_lvalue_reference::value) -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T volatile ,::boost::is_lvalue_reference::value) -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T const volatile ,::boost::is_lvalue_reference::value) -// However, the above specializations confuse gcc 2.96 unless we also -// supply these specializations for array types -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,T[N],false) -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,const T[N],false) -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,volatile T[N],false) -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,const volatile T[N],false) #endif -#else - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable: 4181 4097) -#endif - -namespace detail { - -using ::boost::type_traits::yes_type; -using ::boost::type_traits::no_type; -using ::boost::type_traits::wrap; - -template T&(* is_lvalue_reference_helper1(wrap) )(wrap); -char is_lvalue_reference_helper1(...); - -template no_type is_lvalue_reference_helper2(T&(*)(wrap)); -yes_type is_lvalue_reference_helper2(...); - -template -struct is_lvalue_reference_impl -{ - BOOST_STATIC_CONSTANT( - bool, value = sizeof( - ::boost::detail::is_lvalue_reference_helper2( - ::boost::detail::is_lvalue_reference_helper1(::boost::type_traits::wrap()))) == 1 - ); -}; - -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void,false) -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void const,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void volatile,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void const volatile,false) -#endif - -} // namespace detail - -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,::boost::detail::is_lvalue_reference_impl::value) - -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - } // namespace boost #include diff --git a/boost/boost/type_traits/is_member_function_pointer.hpp b/boost/boost/type_traits/is_member_function_pointer.hpp index 38babf43a4..d1c3690ba7 100644 --- a/boost/boost/type_traits/is_member_function_pointer.hpp +++ b/boost/boost/type_traits/is_member_function_pointer.hpp @@ -14,8 +14,7 @@ #include #include -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) +#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) // // Note: we use the "workaround" version for MSVC because it works for // __stdcall etc function types, where as the partial specialisation @@ -39,7 +38,7 @@ namespace boost { #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_function_pointer,T,__is_member_function_pointer( T )) -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) +#elif !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) BOOST_TT_AUX_BOOL_TRAIT_DEF1( is_member_function_pointer @@ -92,10 +91,8 @@ struct is_member_function_pointer_impl { }; -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct is_member_function_pointer_impl : public false_type{}; -#endif #else // Borland C++ @@ -127,7 +124,7 @@ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void const volatil BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_function_pointer,T,::boost::detail::is_member_function_pointer_impl::value) -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#endif } // namespace boost diff --git a/boost/boost/type_traits/is_member_pointer.hpp b/boost/boost/type_traits/is_member_pointer.hpp index a4a6d25a7e..cba31af0c2 100644 --- a/boost/boost/type_traits/is_member_pointer.hpp +++ b/boost/boost/type_traits/is_member_pointer.hpp @@ -24,7 +24,7 @@ #include #include -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__BORLANDC__, < 0x600) +#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) # include #else # include @@ -46,7 +46,7 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,__is_member_pointer(T)) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true) -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,::boost::is_member_function_pointer::value) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true) @@ -56,59 +56,8 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer, BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*const volatile,true) #endif -#else // no partial template specialization - -namespace detail { - -template -::boost::type_traits::yes_type BOOST_TT_DECL is_member_pointer_tester(R T::*const volatile*); -::boost::type_traits::no_type BOOST_TT_DECL is_member_pointer_tester(...); - -template -struct is_member_pointer_select - : public ::boost::type_traits::false_result -{ -}; - -template <> -struct is_member_pointer_select -{ - template struct result_ - { - static T* make_t(); - BOOST_STATIC_CONSTANT( - bool, value = - (::boost::type_traits::ice_or< - (1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(make_t()))), - (1 == sizeof(is_member_pointer_tester(make_t()))) - >::value) ); - }; -}; - -template -struct is_member_pointer_impl - : public is_member_pointer_select< - ::boost::type_traits::ice_or< - ::boost::is_reference::value - , ::boost::is_array::value - >::value - >::template result_ -{ -}; - -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void,false) -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void const,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void volatile,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void const volatile,false) #endif -} // namespace detail - -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,::boost::detail::is_member_pointer_impl::value) - -#endif // __BORLANDC__ - } // namespace boost #include diff --git a/boost/boost/type_traits/is_nothrow_move_assignable.hpp b/boost/boost/type_traits/is_nothrow_move_assignable.hpp index 5a3427f909..3268307cdf 100644 --- a/boost/boost/type_traits/is_nothrow_move_assignable.hpp +++ b/boost/boost/type_traits/is_nothrow_move_assignable.hpp @@ -29,7 +29,23 @@ namespace boost { namespace detail{ -#ifndef BOOST_NO_CXX11_NOEXCEPT +#ifdef BOOST_IS_NOTHROW_MOVE_ASSIGN + +template +struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_NOTHROW_MOVE_ASSIGN(T)); }; +template +struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = false); }; +template +struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = false); }; +template +struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = false); }; +template +struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = false); }; +template +struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = false); }; + + +#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) template struct false_or_cpp11_noexcept_move_assignable: public ::boost::false_type {}; @@ -43,14 +59,22 @@ struct false_or_cpp11_noexcept_move_assignable < template struct is_nothrow_move_assignable_imp{ - BOOST_STATIC_CONSTANT(bool, value = ( - ::boost::type_traits::ice_and< - ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value, - ::boost::type_traits::ice_not< ::boost::is_reference::value >::value, - ::boost::detail::false_or_cpp11_noexcept_move_assignable::value - >::value)); + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::false_or_cpp11_noexcept_move_assignable::value); }; +template +struct is_nothrow_move_assignable_imp : public ::boost::false_type {}; +template +struct is_nothrow_move_assignable_imp : public ::boost::false_type{}; +template +struct is_nothrow_move_assignable_imp : public ::boost::false_type{}; +template +struct is_nothrow_move_assignable_imp : public ::boost::false_type{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct is_nothrow_move_assignable_imp : public ::boost::false_type{}; +#endif + #else template diff --git a/boost/boost/type_traits/is_nothrow_move_constructible.hpp b/boost/boost/type_traits/is_nothrow_move_constructible.hpp index bc7fb888cd..c09d5d1f94 100644 --- a/boost/boost/type_traits/is_nothrow_move_constructible.hpp +++ b/boost/boost/type_traits/is_nothrow_move_constructible.hpp @@ -12,6 +12,7 @@ #define BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED #include +#include #include #include #include @@ -28,7 +29,25 @@ namespace boost { namespace detail{ -#ifndef BOOST_NO_CXX11_NOEXCEPT +#ifdef BOOST_IS_NOTHROW_MOVE_CONSTRUCT + +template +struct is_nothrow_move_constructible_imp{ + BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T)); +}; + +template +struct is_nothrow_move_constructible_imp : public ::boost::false_type {}; +template +struct is_nothrow_move_constructible_imp : public ::boost::false_type{}; +template +struct is_nothrow_move_constructible_imp : public ::boost::false_type{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct is_nothrow_move_constructible_imp : public ::boost::false_type{}; +#endif + +#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) template struct false_or_cpp11_noexcept_move_constructible: public ::boost::false_type {}; @@ -42,14 +61,20 @@ struct false_or_cpp11_noexcept_move_constructible < template struct is_nothrow_move_constructible_imp{ - BOOST_STATIC_CONSTANT(bool, value = - (::boost::type_traits::ice_and< - ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value, - ::boost::type_traits::ice_not< ::boost::is_reference::value >::value, - ::boost::detail::false_or_cpp11_noexcept_move_constructible::value - >::value)); + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::false_or_cpp11_noexcept_move_constructible::value); }; +template +struct is_nothrow_move_constructible_imp : public ::boost::false_type {}; +template +struct is_nothrow_move_constructible_imp : public ::boost::false_type{}; +template +struct is_nothrow_move_constructible_imp : public ::boost::false_type{}; +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES +template +struct is_nothrow_move_constructible_imp : public ::boost::false_type{}; +#endif + #else template diff --git a/boost/boost/type_traits/is_object.hpp b/boost/boost/type_traits/is_object.hpp index 3decbf8d19..1d1ae4f02e 100644 --- a/boost/boost/type_traits/is_object.hpp +++ b/boost/boost/type_traits/is_object.hpp @@ -26,20 +26,12 @@ namespace detail { template struct is_object_impl { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_reference::value>::value, ::boost::type_traits::ice_not< ::boost::is_void::value>::value, ::boost::type_traits::ice_not< ::boost::is_function::value>::value >::value)); -#else - BOOST_STATIC_CONSTANT(bool, value = - (::boost::type_traits::ice_and< - ::boost::type_traits::ice_not< ::boost::is_reference::value>::value, - ::boost::type_traits::ice_not< ::boost::is_void::value>::value - >::value)); -#endif }; } // namespace detail diff --git a/boost/boost/type_traits/is_pod.hpp b/boost/boost/type_traits/is_pod.hpp index b4e1733987..820a3ceeb9 100644 --- a/boost/boost/type_traits/is_pod.hpp +++ b/boost/boost/type_traits/is_pod.hpp @@ -33,7 +33,6 @@ template< typename T > struct is_POD; namespace detail { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct is_pod_impl { @@ -54,71 +53,6 @@ struct is_pod_impl }; #endif -#else - -template -struct is_pod_helper -{ - template struct result_ - { - BOOST_STATIC_CONSTANT( - bool, value = - (::boost::type_traits::ice_or< - ::boost::is_scalar::value, - ::boost::is_void::value, - BOOST_INTERNAL_IS_POD(T) - >::value)); - }; -}; - -template -struct bool_to_yes_no_type -{ - typedef ::boost::type_traits::no_type type; -}; - -template <> -struct bool_to_yes_no_type -{ - typedef ::boost::type_traits::yes_type type; -}; - -template -struct is_pod_array_helper -{ - enum { is_pod = ::boost::is_POD::value }; // MSVC workaround - typedef typename bool_to_yes_no_type::type type; - type instance() const; -}; - -template -is_pod_array_helper is_POD_array(T*); - -template <> -struct is_pod_helper -{ - template struct result_ - { - static T& help(); - BOOST_STATIC_CONSTANT(bool, value = - sizeof(is_POD_array(help()).instance()) == sizeof(::boost::type_traits::yes_type) - ); - }; -}; - - -template struct is_pod_impl -{ - BOOST_STATIC_CONSTANT( - bool, value = ( - ::boost::detail::is_pod_helper< - ::boost::is_array::value - >::template result_::value - ) - ); -}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // the following help compilers without partial specialization support: BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void,true) diff --git a/boost/boost/type_traits/is_pointer.hpp b/boost/boost/type_traits/is_pointer.hpp index 4e29bb39dd..aad30f2541 100644 --- a/boost/boost/type_traits/is_pointer.hpp +++ b/boost/boost/type_traits/is_pointer.hpp @@ -25,17 +25,8 @@ #include #include #include -#if !BOOST_WORKAROUND(BOOST_MSVC,<=1300) #include -#endif -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# include -# include -# include -# include -# include -#endif // should be the last #include #include @@ -44,7 +35,7 @@ namespace boost { #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,__is_pointer(T)) -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#else namespace detail { @@ -67,16 +58,6 @@ TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(is_pointer_helper,T*,true) template< typename T > struct is_pointer_impl { -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) - BOOST_STATIC_CONSTANT(bool, value = - (::boost::type_traits::ice_and< - ::boost::detail::is_pointer_helper::value - , ::boost::type_traits::ice_not< - ::boost::is_member_pointer::value - >::value - >::value) - ); -#else BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper::type>::value @@ -85,7 +66,6 @@ struct is_pointer_impl >::value >::value) ); -#endif }; } // namespace detail @@ -99,62 +79,8 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T& volatile,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T& const volatile,false) #endif -#else // no partial template specialization - -namespace detail { - -struct pointer_helper -{ - pointer_helper(const volatile void*); -}; - -yes_type BOOST_TT_DECL is_pointer_tester(pointer_helper); -no_type BOOST_TT_DECL is_pointer_tester(...); - -template -struct is_pointer_select - : public ::boost::type_traits::false_result -{ -}; - -template <> -struct is_pointer_select -{ - template struct result_ - { - static T& make_t(); - BOOST_STATIC_CONSTANT(bool, value = - (::boost::type_traits::ice_or< - (1 == sizeof(is_pointer_tester(make_t()))), - (1 == sizeof(type_traits::is_function_ptr_tester(make_t()))) - >::value)); - }; -}; - -template -struct is_pointer_impl - : public is_pointer_select< - ::boost::type_traits::ice_or< - ::boost::is_reference::value - , ::boost::is_array::value - >::value - >::template result_ -{ -}; - -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void,false) -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void const,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void volatile,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void const volatile,false) #endif -} // namespace detail - -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,::boost::detail::is_pointer_impl::value) - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - } // namespace boost #include diff --git a/boost/boost/type_traits/is_polymorphic.hpp b/boost/boost/type_traits/is_polymorphic.hpp index 8fcc69eb27..aac985105d 100644 --- a/boost/boost/type_traits/is_polymorphic.hpp +++ b/boost/boost/type_traits/is_polymorphic.hpp @@ -17,6 +17,11 @@ #include #include +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1700) +#pragma warning(push) +#pragma warning(disable:4250) +#endif + namespace boost{ #ifndef BOOST_IS_POLYMORPHIC @@ -111,4 +116,8 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_polymorphic,T,BOOST_IS_POLYMORPHIC(T)) #include +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1700) +#pragma warning(pop) +#endif + #endif diff --git a/boost/boost/type_traits/is_same.hpp b/boost/boost/type_traits/is_same.hpp index c6afbd7f05..c8987b07a8 100644 --- a/boost/boost/type_traits/is_same.hpp +++ b/boost/boost/type_traits/is_same.hpp @@ -22,17 +22,11 @@ #define BOOST_TT_IS_SAME_HPP_INCLUDED #include -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#include -#include -#include -#endif // should be the last #include #include namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_same,T,U,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename T,is_same,T,T,true) @@ -42,58 +36,6 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename T,is_same,T,T,true) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename T,is_same,T&,T&,true) #endif -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -namespace detail { - -#ifdef BOOST_MSVC -// the following VC6 specific implementation is *NOT* legal -// C++, but has the advantage that it works for incomplete -// types. - -template< typename T1 > -struct is_same_part_1 -{ - template struct part_2 { enum { value = false }; }; - template<> struct part_2 { enum { value = true }; }; -}; - -template< typename T1, typename T2 > -struct is_same_impl -{ - enum { value = boost::detail::is_same_part_1::template part_2::value }; -}; - -#else // generic "no-partial-specialization" version - -template -::boost::type_traits::yes_type -BOOST_TT_DECL is_same_tester(T*, T*); - -::boost::type_traits::no_type -BOOST_TT_DECL is_same_tester(...); - -template -struct is_same_impl -{ - static T t; - static U u; - - BOOST_STATIC_CONSTANT(bool, value = - (::boost::type_traits::ice_and< - (sizeof(type_traits::yes_type) == sizeof(boost::detail::is_same_tester(&t,&u))), - (::boost::is_reference::value == ::boost::is_reference::value), - (sizeof(T) == sizeof(U)) - >::value)); -}; - -#endif // BOOST_MSVC - -} // namespace detail - -BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_same,T,U,(::boost::detail::is_same_impl::value)) - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace boost diff --git a/boost/boost/type_traits/is_signed.hpp b/boost/boost/type_traits/is_signed.hpp index ba7d6e97cd..5673284944 100644 --- a/boost/boost/type_traits/is_signed.hpp +++ b/boost/boost/type_traits/is_signed.hpp @@ -76,11 +76,7 @@ struct is_signed_imp > selector; typedef typename selector::template rebind binder; typedef typename binder::type type; -#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) - BOOST_STATIC_CONSTANT(bool, value = is_signed_imp::type::value); -#else BOOST_STATIC_CONSTANT(bool, value = type::value); -#endif }; #else diff --git a/boost/boost/type_traits/is_virtual_base_of.hpp b/boost/boost/type_traits/is_virtual_base_of.hpp index f57cb61876..33db914d34 100644 --- a/boost/boost/type_traits/is_virtual_base_of.hpp +++ b/boost/boost/type_traits/is_virtual_base_of.hpp @@ -91,11 +91,9 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF2( , (::boost::detail::is_virtual_base_of_impl2::value) ) -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_virtual_base_of,Base&,Derived,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_virtual_base_of,Base,Derived&,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_virtual_base_of,Base&,Derived&,false) -#endif } // namespace boost diff --git a/boost/boost/type_traits/is_volatile.hpp b/boost/boost/type_traits/is_volatile.hpp index c921c9ef3e..d9839dad3b 100644 --- a/boost/boost/type_traits/is_volatile.hpp +++ b/boost/boost/type_traits/is_volatile.hpp @@ -24,17 +24,10 @@ #include #include -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # include # if BOOST_WORKAROUND(BOOST_MSVC, < 1400) # include # endif -#else -# include -# include -# include -# include -#endif // should be the last #include #include @@ -48,7 +41,7 @@ struct is_volatile_rval_filter #if BOOST_WORKAROUND(BOOST_MSVC, < 1400) BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::type*>::is_volatile); #else - BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_volatile); + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_volatile); #endif }; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES @@ -66,7 +59,7 @@ struct is_volatile_rval_filter #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,__is_volatile(T)) -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#else //* is a type T declared volatile - is_volatile BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::is_volatile_rval_filter::value) @@ -82,69 +75,8 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T& volatile,false BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T& const volatile,false) #endif -#else - -namespace detail { - -using ::boost::type_traits::yes_type; -using ::boost::type_traits::no_type; - -yes_type is_volatile_tester(void const volatile*); -no_type is_volatile_tester(void const*); - -template -struct is_volatile_helper - : public ::boost::type_traits::false_result -{ -}; - -template <> -struct is_volatile_helper -{ - template struct result_ - { - static T* t; - BOOST_STATIC_CONSTANT(bool, value = ( - sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_volatile_tester(t)) - )); - }; -}; - -template <> -struct is_volatile_helper -{ - template struct result_ - { - static T t; - BOOST_STATIC_CONSTANT(bool, value = ( - sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_volatile_tester(&t)) - )); - }; -}; - -template -struct is_volatile_impl - : public is_volatile_helper< - is_reference::value - , is_array::value - >::template result_ -{ -}; - -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void,false) -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void const,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void volatile,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void const volatile,true) #endif -} // namespace detail - -//* is a type T declared volatile - is_volatile -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::is_volatile_impl::value) - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - } // namespace boost #include diff --git a/boost/boost/type_traits/make_signed.hpp b/boost/boost/type_traits/make_signed.hpp index 7deb855572..51cdbb0dc8 100644 --- a/boost/boost/type_traits/make_signed.hpp +++ b/boost/boost/type_traits/make_signed.hpp @@ -37,11 +37,9 @@ struct make_signed_imp { BOOST_STATIC_ASSERT( (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value)); -#if !BOOST_WORKAROUND(BOOST_MSVC, <=1300) BOOST_STATIC_ASSERT( (::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv::type, bool>::value>::value)); -#endif typedef typename remove_cv::type t_no_cv; typedef typename mpl::if_c< diff --git a/boost/boost/type_traits/make_unsigned.hpp b/boost/boost/type_traits/make_unsigned.hpp index 7e2fcdc453..239153a863 100644 --- a/boost/boost/type_traits/make_unsigned.hpp +++ b/boost/boost/type_traits/make_unsigned.hpp @@ -37,11 +37,9 @@ struct make_unsigned_imp { BOOST_STATIC_ASSERT( (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value)); -#if !BOOST_WORKAROUND(BOOST_MSVC, <=1300) BOOST_STATIC_ASSERT( (::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv::type, bool>::value>::value)); -#endif typedef typename remove_cv::type t_no_cv; typedef typename mpl::if_c< diff --git a/boost/boost/type_traits/msvc/remove_all_extents.hpp b/boost/boost/type_traits/msvc/remove_all_extents.hpp deleted file mode 100644 index 25c0edfaaa..0000000000 --- a/boost/boost/type_traits/msvc/remove_all_extents.hpp +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_ALL_EXTENT_HOLT_2004_0827 -#define BOOST_TYPE_TRAITS_MSVC_REMOVE_ALL_EXTENT_HOLT_2004_0827 - -#include -#include - -namespace boost { - template - struct remove_all_extents; - - namespace detail { - template - struct remove_all_extents_impl_typeof { - template - struct inner { - typedef T type; - }; - }; - template<> - struct remove_all_extents_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U[]); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( *((T*)NULL) ) )); - typedef typename msvc_extract_type::id2type::type reduced_type; - typedef typename remove_all_extents::type type; - }; - }; - } //namespace detail - - template - struct remove_all_extents { - typedef typename boost::detail::remove_all_extents_impl_typeof< - boost::is_array::value - >::template inner >::type type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_all_extents,T) - }; -} //namespace boost - -#endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 - diff --git a/boost/boost/type_traits/msvc/remove_bounds.hpp b/boost/boost/type_traits/msvc/remove_bounds.hpp deleted file mode 100644 index 4b23b35276..0000000000 --- a/boost/boost/type_traits/msvc/remove_bounds.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 -#define BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 - -#include -#include - -namespace boost { - namespace detail { - template - struct remove_bounds_impl_typeof { - template - struct inner { - typedef T type; - }; - }; - template<> - struct remove_bounds_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U[]); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( *((T*)NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - }; - } //namespace detail - - template - struct remove_bounds { - typedef typename boost::detail::remove_bounds_impl_typeof< - boost::is_array::value - >::template inner >::type type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_bounds,T) - }; -} //namespace boost - -#endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 - diff --git a/boost/boost/type_traits/msvc/remove_const.hpp b/boost/boost/type_traits/msvc/remove_const.hpp deleted file mode 100644 index d370754ade..0000000000 --- a/boost/boost/type_traits/msvc/remove_const.hpp +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_CONST_HOLT_2004_0828 -#define BOOST_TYPE_TRAITS_MSVC_REMOVE_CONST_HOLT_2004_0828 - -#include -#include -#include -#include -#include - -namespace boost { - namespace detail { - template - struct remove_const_impl_typeof { - template - struct inner { - typedef T type; - }; - template - struct transform_type { - typedef T type; - }; - }; - template<> //Const - struct remove_const_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U const&(*)()); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T& type; - }; - }; - template<> //CV - struct remove_const_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U const volatile&(*)()); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T& type; - }; - }; - template<> //Const Pointer - struct remove_const_impl_typeof { - template - struct inner { - template - static msvc_register_type test(void(*)(U const[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type[]; - }; - }; - template<> //CV Pointer - struct remove_const_impl_typeof { - template - struct inner { - template - static msvc_register_type test(void(*)(U const volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type[]; - }; - }; - template<> //Const Array - struct remove_const_impl_typeof { - template - struct inner { - BOOST_STATIC_CONSTANT(unsigned,value=(sizeof(T)/sizeof((*((T*)NULL))[0]))); - - template - static msvc_register_type test(void(*)(U const[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type; - }; - }; - - template<> //CV Array - struct remove_const_impl_typeof { - template - struct inner { - BOOST_STATIC_CONSTANT(unsigned,value=(sizeof(T)/sizeof((*((T*)NULL))[0]))); - - template - static msvc_register_type test(void(*)(U const volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type; - }; - }; - - } //namespace detail - - template - struct remove_const { - typedef boost::detail::remove_const_impl_typeof< - boost::is_pointer::value, - boost::is_array::value, - boost::is_const::value, - boost::is_volatile::value - > remove_const_type; - typedef typename - remove_const_type::template inner< - typename remove_const_type::template transform_type::type, - remove_const - >::type - type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_const,T) - }; -}//namespace boost - -#endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_CONST_HOLT_2004_0828 diff --git a/boost/boost/type_traits/msvc/remove_cv.hpp b/boost/boost/type_traits/msvc/remove_cv.hpp deleted file mode 100644 index 9fbf8b845d..0000000000 --- a/boost/boost/type_traits/msvc/remove_cv.hpp +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_CV_HOLT_2004_0901 -#define BOOST_TYPE_TRAITS_MSVC_REMOVE_CV_HOLT_2004_0901 - -#include -#include -#include -#include -#include - -namespace boost { - namespace detail { - template - struct remove_cv_impl_typeof { - template - struct inner { - typedef T type; - }; - template - struct transform_type { - typedef T type; - }; - }; - template<> //Volatile - struct remove_cv_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U volatile&(*)()); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T& type; - }; - }; - template<> //Const - struct remove_cv_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U const&(*)()); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T& type; - }; - }; - template<> //CV - struct remove_cv_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U const volatile&(*)()); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T& type; - }; - }; - template<> //Volatile Pointer - struct remove_cv_impl_typeof { - template - struct inner { - template - static msvc_register_type test(void(*)(U volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type[]; - }; - }; - template<> //Const Pointer - struct remove_cv_impl_typeof { - template - struct inner { - template - static msvc_register_type test(void(*)(U const[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type[]; - }; - }; - template<> //CV Pointer - struct remove_cv_impl_typeof { - template - struct inner { - template - static msvc_register_type test(void(*)(U const volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type[]; - }; - }; - template<> //Volatile Array - struct remove_cv_impl_typeof { - template - struct inner { - BOOST_STATIC_CONSTANT(unsigned,value=(sizeof(T)/sizeof((*((T*)NULL))[0]))); - - template - static msvc_register_type test(void(*)(U volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type; - }; - }; - template<> //Const Array - struct remove_cv_impl_typeof { - template - struct inner { - BOOST_STATIC_CONSTANT(unsigned,value=(sizeof(T)/sizeof((*((T*)NULL))[0]))); - - template - static msvc_register_type test(void(*)(U const[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type; - }; - }; - - template<> //CV Array - struct remove_cv_impl_typeof { - template - struct inner { - BOOST_STATIC_CONSTANT(unsigned,value=(sizeof(T)/sizeof((*((T*)NULL))[0]))); - - template - static msvc_register_type test(void(*)(U const volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type; - }; - }; - - } //namespace detail - - template - struct remove_cv { - typedef boost::detail::remove_cv_impl_typeof< - boost::is_pointer::value, - boost::is_array::value, - boost::is_const::value, - boost::is_volatile::value - > remove_cv_type; - typedef typename - remove_cv_type::template inner< - typename remove_cv_type::template transform_type::type, - remove_cv - >::type - type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_cv,T) - }; -}//namespace boost - -#endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_CV_HOLT_2004_0901 diff --git a/boost/boost/type_traits/msvc/remove_extent.hpp b/boost/boost/type_traits/msvc/remove_extent.hpp deleted file mode 100644 index c5a59ef6f4..0000000000 --- a/boost/boost/type_traits/msvc/remove_extent.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_EXTENT_HOLT_2004_0827 -#define BOOST_TYPE_TRAITS_MSVC_REMOVE_EXTENT_HOLT_2004_0827 - -#include -#include - -namespace boost { - namespace detail { - template - struct remove_extent_impl_typeof { - template - struct inner { - typedef T type; - }; - }; - template<> - struct remove_extent_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U[]); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( *((T*)NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - }; - } //namespace detail - - template - struct remove_extent { - typedef typename boost::detail::remove_extent_impl_typeof< - boost::is_array::value - >::template inner >::type type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_extent,T) - }; -} //namespace boost - -#endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 - diff --git a/boost/boost/type_traits/msvc/remove_pointer.hpp b/boost/boost/type_traits/msvc/remove_pointer.hpp deleted file mode 100644 index ec847f9d8e..0000000000 --- a/boost/boost/type_traits/msvc/remove_pointer.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_POINTER_HOLT_2004_0827 -#define BOOST_TYPE_TRAITS_MSVC_REMOVE_POINTER_HOLT_2004_0827 - -#include -#include - -namespace boost { - namespace detail { - template - struct remove_pointer_impl_typeof { - template - struct inner { - typedef T type; - }; - }; - template<> - struct remove_pointer_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U*); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( *((T*)NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - }; - } //namespace detail - - template - struct remove_pointer { - typedef typename boost::detail::remove_pointer_impl_typeof< - boost::is_pointer::value - >::template inner >::type type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_pointer,T) - }; -} //namespace boost - -#endif //BOOST_TYPE_TRAITS_REMOVE_POINTER_HOLT_2004_0827 diff --git a/boost/boost/type_traits/msvc/remove_reference.hpp b/boost/boost/type_traits/msvc/remove_reference.hpp deleted file mode 100644 index f8a77d4c51..0000000000 --- a/boost/boost/type_traits/msvc/remove_reference.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_REFERENCE_HOLT_2004_0827 -#define BOOST_TYPE_TRAITS_MSVC_REMOVE_REFERENCE_HOLT_2004_0827 - -#include -#include - -namespace boost { - namespace detail { - template - struct remove_reference_impl_typeof { - template - struct inner { - typedef T type; - }; - }; - template<> - struct remove_reference_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U&(*)()); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - }; - } //namespace detail - - template - struct remove_reference { - typedef typename boost::detail::remove_reference_impl_typeof< - boost::is_reference::value - >::template inner >::type type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_reference,T) - }; -} //namespace boost - -#endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_REFERENCE_HOLT_2004_0827 diff --git a/boost/boost/type_traits/msvc/remove_volatile.hpp b/boost/boost/type_traits/msvc/remove_volatile.hpp deleted file mode 100644 index 6f9259c5b1..0000000000 --- a/boost/boost/type_traits/msvc/remove_volatile.hpp +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_VOLATILE_HOLT_2004_0828 -#define BOOST_TYPE_TRAITS_MSVC_REMOVE_VOLATILE_HOLT_2004_0828 - -#include -#include -#include -#include -#include - -namespace boost { - namespace detail { - template - struct remove_volatile_impl_typeof { - template - struct inner { - typedef T type; - }; - template - struct transform_type { - typedef T type; - }; - }; - template<> //Volatile - struct remove_volatile_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U volatile&(*)()); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T& type; - }; - }; - template<> //CV - struct remove_volatile_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U const volatile&(*)()); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T& type; - }; - }; - template<> //Volatile Pointer - struct remove_volatile_impl_typeof { - template - struct inner { - template - static msvc_register_type test(void(*)(U volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type[]; - }; - }; - template<> //CV Pointer - struct remove_volatile_impl_typeof { - template - struct inner { - template - static msvc_register_type test(void(*)(U const volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type[]; - }; - }; - template<> //Volatile Array - struct remove_volatile_impl_typeof { - template - struct inner { - BOOST_STATIC_CONSTANT(unsigned,value=(sizeof(T)/sizeof((*((T*)NULL))[0]))); - - template - static msvc_register_type test(void(*)(U volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type; - }; - }; - - template<> //CV Array - struct remove_volatile_impl_typeof { - template - struct inner { - BOOST_STATIC_CONSTANT(unsigned,value=(sizeof(T)/sizeof((*((T*)NULL))[0]))); - - template - static msvc_register_type test(void(*)(U const volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type; - }; - }; - - } //namespace detail - - template - struct remove_volatile { - typedef boost::detail::remove_volatile_impl_typeof< - boost::is_pointer::value, - boost::is_array::value, - boost::is_const::value, - boost::is_volatile::value - > remove_volatile_type; - typedef typename - remove_volatile_type::template inner< - typename remove_volatile_type::template transform_type::type, - remove_volatile - >::type - type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_volatile,T) - }; -}//namespace boost - -#endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_VOLATILE_HOLT_2004_0828 diff --git a/boost/boost/type_traits/msvc/typeof.hpp b/boost/boost/type_traits/msvc/typeof.hpp deleted file mode 100644 index b95785d521..0000000000 --- a/boost/boost/type_traits/msvc/typeof.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPETRAITS_MSVC_TYPEOF_HPP -#define BOOST_TYPETRAITS_MSVC_TYPEOF_HPP - -#include -#include - -namespace boost { namespace detail { -# if BOOST_WORKAROUND(BOOST_MSVC,==1300) - template - struct msvc_extract_type - { - template - struct id2type_impl; - - typedef id2type_impl id2type; - }; - - template - struct msvc_register_type : public msvc_extract_type - { - template<> - struct id2type_impl //VC7.0 specific bugfeature - { - typedef T type; - }; - }; -# else - template - struct msvc_extract_type - { - struct id2type; - }; - - template - struct msvc_register_type : public msvc_extract_type - { - typedef msvc_extract_type base_type; - struct base_type::id2type // This uses nice VC6.5 and VC7.1 bugfeature - { - typedef T type; - }; - }; -# endif -}} - -#endif //BOOST_TYPETRAITS_MSVC_TYPEOF_IMPL_HPP diff --git a/boost/boost/type_traits/rank.hpp b/boost/boost/type_traits/rank.hpp index 77df41e84c..33f46c8eb8 100644 --- a/boost/boost/type_traits/rank.hpp +++ b/boost/boost/type_traits/rank.hpp @@ -24,7 +24,7 @@ struct rank_imp { BOOST_STATIC_CONSTANT(std::size_t, value = N); }; -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) template struct rank_imp { diff --git a/boost/boost/type_traits/remove_all_extents.hpp b/boost/boost/type_traits/remove_all_extents.hpp index 64876e19a1..1409da12cb 100644 --- a/boost/boost/type_traits/remove_all_extents.hpp +++ b/boost/boost/type_traits/remove_all_extents.hpp @@ -13,20 +13,14 @@ #include #include -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) -#include -#endif - // should be the last #include #include -#if !BOOST_WORKAROUND(BOOST_MSVC,<=1300) - namespace boost { BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_all_extents,T,T) -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_all_extents,T[N],typename boost::remove_all_extents::type type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_all_extents,T const[N],typename boost::remove_all_extents::type type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_all_extents,T volatile[N],typename boost::remove_all_extents::type type) @@ -41,8 +35,6 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_all_extents,T const vo } // namespace boost -#endif - #include #endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED diff --git a/boost/boost/type_traits/remove_bounds.hpp b/boost/boost/type_traits/remove_bounds.hpp index ce12978733..2d26348c69 100644 --- a/boost/boost/type_traits/remove_bounds.hpp +++ b/boost/boost/type_traits/remove_bounds.hpp @@ -13,20 +13,14 @@ #include #include -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) -#include -#endif - // should be the last #include #include -#if !BOOST_WORKAROUND(BOOST_MSVC,<=1300) - namespace boost { BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_bounds,T,T) -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T[N],T type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T const[N],T const type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T volatile[N],T volatile type) @@ -41,8 +35,6 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T const volatil } // namespace boost -#endif - #include #endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED diff --git a/boost/boost/type_traits/remove_const.hpp b/boost/boost/type_traits/remove_const.hpp index 5f957e9787..1020781383 100644 --- a/boost/boost/type_traits/remove_const.hpp +++ b/boost/boost/type_traits/remove_const.hpp @@ -12,23 +12,17 @@ #define BOOST_TT_REMOVE_CONST_HPP_INCLUDED #include -#include #include #include #include #include -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) -#include -#endif - // should be the last #include #include namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace detail { @@ -49,7 +43,7 @@ template struct remove_const_impl { typedef typename remove_const_helper< - typename cv_traits_imp::unqualified_type + typename cv_traits_imp::unqualified_type , ::boost::is_volatile::value >::type type; }; @@ -77,11 +71,6 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_const,T BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_const,T const volatile[N],T volatile type[N]) #endif -#elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300) - -BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_const,T,typename boost::detail::remove_const_impl::type) - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace boost diff --git a/boost/boost/type_traits/remove_cv.hpp b/boost/boost/type_traits/remove_cv.hpp index 7478c207eb..9ba34a1eff 100644 --- a/boost/boost/type_traits/remove_cv.hpp +++ b/boost/boost/type_traits/remove_cv.hpp @@ -11,30 +11,24 @@ #ifndef BOOST_TT_REMOVE_CV_HPP_INCLUDED #define BOOST_TT_REMOVE_CV_HPP_INCLUDED -#include #include #include #include #include -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) -#include -#endif - // should be the last #include #include namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace detail{ template struct rvalue_ref_filter_rem_cv { - typedef typename boost::detail::cv_traits_imp::unqualified_type type; + typedef typename boost::detail::cv_traits_imp::unqualified_type type; }; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES @@ -61,21 +55,6 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T vol BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const volatile[N],T type[N]) #endif -#elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300) - -namespace detail { -template -struct remove_cv_impl -{ - typedef typename remove_volatile_impl< - typename remove_const_impl::type - >::type type; -}; -} - -BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename boost::detail::remove_cv_impl::type) - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace boost diff --git a/boost/boost/type_traits/remove_extent.hpp b/boost/boost/type_traits/remove_extent.hpp index b4c7d41368..9c4cdff70b 100644 --- a/boost/boost/type_traits/remove_extent.hpp +++ b/boost/boost/type_traits/remove_extent.hpp @@ -13,20 +13,14 @@ #include #include -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) -#include -#endif - // should be the last #include #include -#if !BOOST_WORKAROUND(BOOST_MSVC,<=1300) - namespace boost { BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_extent,T,T) -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_extent,T[N],T type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_extent,T const[N],T const type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_extent,T volatile[N],T volatile type) @@ -41,8 +35,6 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_extent,T const volatil } // namespace boost -#endif - #include #endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED diff --git a/boost/boost/type_traits/remove_pointer.hpp b/boost/boost/type_traits/remove_pointer.hpp index 01253db8f2..fef706860c 100644 --- a/boost/boost/type_traits/remove_pointer.hpp +++ b/boost/boost/type_traits/remove_pointer.hpp @@ -11,13 +11,8 @@ #include #include -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#include -#endif -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) -#include -#elif defined(BOOST_MSVC) +#if defined(BOOST_MSVC) #include #include #endif @@ -71,7 +66,7 @@ namespace detail{ BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_imp2::type) -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#else BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T*,T) @@ -79,10 +74,6 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const,T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* volatile,T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const volatile,T) -#elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300) - -BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_impl::type) - #endif } // namespace boost diff --git a/boost/boost/type_traits/remove_reference.hpp b/boost/boost/type_traits/remove_reference.hpp index 19a55b738f..c59e7e35f4 100644 --- a/boost/boost/type_traits/remove_reference.hpp +++ b/boost/boost/type_traits/remove_reference.hpp @@ -9,20 +9,14 @@ #ifndef BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED #define BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED -#include #include #include -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) -#include -#endif - // should be the last #include #include namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace detail{ // @@ -57,11 +51,6 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& volatile, BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& const volatile,T) #endif -#elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300) - -BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,typename boost::detail::remove_reference_impl::type) - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace boost diff --git a/boost/boost/type_traits/remove_volatile.hpp b/boost/boost/type_traits/remove_volatile.hpp index 98da5cfc1f..c20277696d 100644 --- a/boost/boost/type_traits/remove_volatile.hpp +++ b/boost/boost/type_traits/remove_volatile.hpp @@ -12,23 +12,17 @@ #define BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED #include -#include #include #include #include #include -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) -#include -#endif - // should be the last #include #include namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace detail { @@ -48,7 +42,7 @@ template struct remove_volatile_impl { typedef typename remove_volatile_helper< - typename cv_traits_imp::unqualified_type + typename cv_traits_imp::unqualified_type , ::boost::is_const::value >::type type; }; @@ -75,11 +69,6 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile,T const volatile[N],T const type[N]) #endif -#elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300) - -BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,typename boost::detail::remove_volatile_impl::type) - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace boost diff --git a/boost/boost/type_traits/type_with_alignment.hpp b/boost/boost/type_traits/type_with_alignment.hpp index a86137f53a..7eb66a702f 100644 --- a/boost/boost/type_traits/type_with_alignment.hpp +++ b/boost/boost/type_traits/type_with_alignment.hpp @@ -69,35 +69,6 @@ typedef int (alignment_dummy::*member_function_ptr)(); // This template gets instantiated a lot, so use partial // specialization when available to reduce the compiler burden. // -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -template -struct lower_alignment_helper_impl -{ - template - struct apply - { - typedef char type; - enum { value = true }; - }; -}; - -template <> -struct lower_alignment_helper_impl -{ - template - struct apply - : public mpl::if_c<(alignment_of::value == target), TestType, char> - { - enum { value = (alignment_of::value == target) }; - }; -}; - -template -struct lower_alignment_helper - : public lower_alignment_helper_impl::template apply -{ -}; -#else template struct lower_alignment_helper { @@ -111,7 +82,6 @@ struct lower_alignment_helper enum { value = (alignment_of::value == target) }; typedef typename mpl::if_c::type type; }; -#endif #define BOOST_TT_CHOOSE_MIN_ALIGNMENT(R,P,I,T) \ typename lower_alignment_helper< \ @@ -166,26 +136,14 @@ struct is_aligned ); }; -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::max_align,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<1> ,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<2> ,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<4> ,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<8> ,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<10> ,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<16> ,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<32> ,true) -#endif } // namespace detail -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct is_pod< ::boost::detail::lower_alignment > { BOOST_STATIC_CONSTANT(std::size_t, value = true); }; -#endif // This alignment method originally due to Brian Parker, implemented by David // Abrahams, and then ported here by Doug Gregor. @@ -218,8 +176,8 @@ class type_with_alignment { }; -#if defined(__GNUC__) -namespace align { +#if defined(__GNUC__) || (defined (__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)) +namespace tt_align_ns { struct __attribute__((__aligned__(2))) a2 {}; struct __attribute__((__aligned__(4))) a4 {}; struct __attribute__((__aligned__(8))) a8 {}; @@ -230,25 +188,25 @@ struct __attribute__((__aligned__(128))) a128 {}; } template<> class type_with_alignment<1> { public: typedef char type; }; -template<> class type_with_alignment<2> { public: typedef align::a2 type; }; -template<> class type_with_alignment<4> { public: typedef align::a4 type; }; -template<> class type_with_alignment<8> { public: typedef align::a8 type; }; -template<> class type_with_alignment<16> { public: typedef align::a16 type; }; -template<> class type_with_alignment<32> { public: typedef align::a32 type; }; -template<> class type_with_alignment<64> { public: typedef align::a64 type; }; -template<> class type_with_alignment<128> { public: typedef align::a128 type; }; +template<> class type_with_alignment<2> { public: typedef tt_align_ns::a2 type; }; +template<> class type_with_alignment<4> { public: typedef tt_align_ns::a4 type; }; +template<> class type_with_alignment<8> { public: typedef tt_align_ns::a8 type; }; +template<> class type_with_alignment<16> { public: typedef tt_align_ns::a16 type; }; +template<> class type_with_alignment<32> { public: typedef tt_align_ns::a32 type; }; +template<> class type_with_alignment<64> { public: typedef tt_align_ns::a64 type; }; +template<> class type_with_alignment<128> { public: typedef tt_align_ns::a128 type; }; namespace detail { -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a2,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a4,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a8,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a16,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a32,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a64,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a128,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a2,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a4,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a8,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a16,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a32,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a64,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a128,true) } #endif -#if (defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && _MSC_VER >= 1300 +#if defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER)) // // MSVC supports types which have alignments greater than the normal // maximum: these are used for example in the types __m64 and __m128 @@ -265,7 +223,7 @@ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a128,true) // Boost.Optional). However, this only happens when we have no choice // in the matter because no other "ordinary" type is available. // -namespace align { +namespace tt_align_ns { struct __declspec(align(8)) a8 { char m[8]; typedef a8 type; @@ -293,7 +251,7 @@ template<> class type_with_alignment<8> { typedef mpl::if_c< ::boost::alignment_of::value < 8, - align::a8, + tt_align_ns::a8, boost::detail::type_with_alignment_imp<8> >::type t1; public: typedef t1::type type; @@ -302,7 +260,7 @@ template<> class type_with_alignment<16> { typedef mpl::if_c< ::boost::alignment_of::value < 16, - align::a16, + tt_align_ns::a16, boost::detail::type_with_alignment_imp<16> >::type t1; public: typedef t1::type type; @@ -311,7 +269,7 @@ template<> class type_with_alignment<32> { typedef mpl::if_c< ::boost::alignment_of::value < 32, - align::a32, + tt_align_ns::a32, boost::detail::type_with_alignment_imp<32> >::type t1; public: typedef t1::type type; @@ -319,7 +277,7 @@ public: template<> class type_with_alignment<64> { typedef mpl::if_c< ::boost::alignment_of::value < 64, - align::a64, + tt_align_ns::a64, boost::detail::type_with_alignment_imp<64> >::type t1; public: typedef t1::type type; @@ -327,18 +285,18 @@ public: template<> class type_with_alignment<128> { typedef mpl::if_c< ::boost::alignment_of::value < 128, - align::a128, + tt_align_ns::a128, boost::detail::type_with_alignment_imp<128> >::type t1; public: typedef t1::type type; }; namespace detail { -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a8,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a16,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a32,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a64,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a128,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a8,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a16,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a32,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a64,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a128,true) } #endif @@ -350,7 +308,7 @@ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a128,true) // 2) Because of Borlands #pragma option we can create types with alignments that are // greater that the largest aligned builtin type. -namespace align{ +namespace tt_align_ns{ #pragma option push -a16 struct a2{ short s; }; struct a4{ int s; }; @@ -361,13 +319,13 @@ struct a16{ long double s; }; namespace detail { -typedef ::boost::align::a16 max_align; +typedef ::boost::tt_align_ns::a16 max_align; //#if ! BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610)) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a2,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a4,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a8,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a16,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a2,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a4,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a8,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::tt_align_ns::a16,true) //#endif } @@ -376,13 +334,13 @@ template struct type_with_alignment // We should never get to here, but if we do use the maximally // aligned type: // BOOST_STATIC_ASSERT(0); - typedef align::a16 type; + typedef tt_align_ns::a16 type; }; template <> struct type_with_alignment<1>{ typedef char type; }; -template <> struct type_with_alignment<2>{ typedef align::a2 type; }; -template <> struct type_with_alignment<4>{ typedef align::a4 type; }; -template <> struct type_with_alignment<8>{ typedef align::a8 type; }; -template <> struct type_with_alignment<16>{ typedef align::a16 type; }; +template <> struct type_with_alignment<2>{ typedef tt_align_ns::a2 type; }; +template <> struct type_with_alignment<4>{ typedef tt_align_ns::a4 type; }; +template <> struct type_with_alignment<8>{ typedef tt_align_ns::a8 type; }; +template <> struct type_with_alignment<16>{ typedef tt_align_ns::a16 type; }; #endif diff --git a/boost/boost/utility/addressof.hpp b/boost/boost/utility/addressof.hpp index ecb77764e6..db4da80421 100644 --- a/boost/boost/utility/addressof.hpp +++ b/boost/boost/utility/addressof.hpp @@ -1,102 +1,17 @@ -// Copyright (C) 2002 Brad King (brad.king@kitware.com) -// Douglas Gregor (gregod@cs.rpi.edu) -// -// Copyright (C) 2002, 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) - -// For more information, see http://www.boost.org +/* + * Copyright (c) 2014 Glen Fernandes + * + * 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) + */ #ifndef BOOST_UTILITY_ADDRESSOF_HPP -# define BOOST_UTILITY_ADDRESSOF_HPP - -# include -# include - -namespace boost -{ - -namespace detail -{ - -template struct addr_impl_ref -{ - T & v_; - - inline addr_impl_ref( T & v ): v_( v ) {} - inline operator T& () const { return v_; } - -private: - addr_impl_ref & operator=(const addr_impl_ref &); -}; - -template struct addressof_impl -{ - static inline T * f( T & v, long ) - { - return reinterpret_cast( - &const_cast(reinterpret_cast(v))); - } - - static inline T * f( T * v, int ) - { - return v; - } -}; - -} // namespace detail - -template T * addressof( T & v ) -{ -#if (defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) ) || defined( __SUNPRO_CC ) - - return boost::detail::addressof_impl::f( v, 0 ); +#define BOOST_UTILITY_ADDRESSOF_HPP -#else +// The header file at this path is deprecated; +// use boost/core/addressof.hpp instead. - return boost::detail::addressof_impl::f( boost::detail::addr_impl_ref( v ), 0 ); +#include #endif -} - -#if defined( __SUNPRO_CC ) && BOOST_WORKAROUND( __SUNPRO_CC, BOOST_TESTED_AT( 0x590 ) ) - -namespace detail -{ - -template struct addressof_addp -{ - typedef T * type; -}; - -} // namespace detail - -template< class T, std::size_t N > -typename detail::addressof_addp< T[N] >::type addressof( T (&t)[N] ) -{ - return &t; -} - -#endif - -// Borland doesn't like casting an array reference to a char reference -// but these overloads work around the problem. -#if defined( __BORLANDC__ ) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -template -T (*addressof(T (&t)[N]))[N] -{ - return reinterpret_cast(&t); -} - -template -const T (*addressof(const T (&t)[N]))[N] -{ - return reinterpret_cast(&t); -} -#endif - -} // namespace boost - -#endif // BOOST_UTILITY_ADDRESSOF_HPP diff --git a/boost/boost/utility/base_from_member.hpp b/boost/boost/utility/base_from_member.hpp index e32ecb8d9c..fc0e13c0d7 100644 --- a/boost/boost/utility/base_from_member.hpp +++ b/boost/boost/utility/base_from_member.hpp @@ -148,6 +148,19 @@ protected: }; // boost::base_from_member +template < typename MemberType, int UniqueID > +class base_from_member +{ +protected: + MemberType& member; + + explicit BOOST_CONSTEXPR base_from_member( MemberType& x ) + BOOST_NOEXCEPT + : member( x ) + {} + +}; // boost::base_from_member + } // namespace boost diff --git a/boost/boost/utility/enable_if.hpp b/boost/boost/utility/enable_if.hpp index d292c6a7b0..803bfca5e2 100644 --- a/boost/boost/utility/enable_if.hpp +++ b/boost/boost/utility/enable_if.hpp @@ -1,119 +1,17 @@ -// Boost enable_if library - -// Copyright 2003 (c) The Trustees of Indiana University. - -// 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) - -// Authors: Jaakko Jarvi (jajarvi at osl.iu.edu) -// Jeremiah Willcock (jewillco at osl.iu.edu) -// Andrew Lumsdaine (lums at osl.iu.edu) - +/* + * Copyright (c) 2014 Glen Fernandes + * + * 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) + */ #ifndef BOOST_UTILITY_ENABLE_IF_HPP #define BOOST_UTILITY_ENABLE_IF_HPP -#include "boost/config.hpp" - -// Even the definition of enable_if causes problems on some compilers, -// so it's macroed out for all compilers that do not support SFINAE - -#ifndef BOOST_NO_SFINAE - -namespace boost -{ - - template - struct enable_if_c { - typedef T type; - }; - - template - struct enable_if_c {}; - - template - struct enable_if : public enable_if_c {}; - - template - struct lazy_enable_if_c { - typedef typename T::type type; - }; - - template - struct lazy_enable_if_c {}; - - template - struct lazy_enable_if : public lazy_enable_if_c {}; - - - template - struct disable_if_c { - typedef T type; - }; - - template - struct disable_if_c {}; - - template - struct disable_if : public disable_if_c {}; - - template - struct lazy_disable_if_c { - typedef typename T::type type; - }; - - template - struct lazy_disable_if_c {}; - - template - struct lazy_disable_if : public lazy_disable_if_c {}; - -} // namespace boost - -#else - -namespace boost { - - namespace detail { typedef void enable_if_default_T; } - - template - struct enable_if_does_not_work_on_this_compiler; - - template - struct enable_if_c : enable_if_does_not_work_on_this_compiler - { }; - - template - struct disable_if_c : enable_if_does_not_work_on_this_compiler - { }; - - template - struct lazy_enable_if_c : enable_if_does_not_work_on_this_compiler - { }; - - template - struct lazy_disable_if_c : enable_if_does_not_work_on_this_compiler - { }; - - template - struct enable_if : enable_if_does_not_work_on_this_compiler - { }; - - template - struct disable_if : enable_if_does_not_work_on_this_compiler - { }; - - template - struct lazy_enable_if : enable_if_does_not_work_on_this_compiler - { }; - - template - struct lazy_disable_if : enable_if_does_not_work_on_this_compiler - { }; - -} // namespace boost +// The header file at this path is deprecated; +// use boost/core/enable_if.hpp instead. -#endif // BOOST_NO_SFINAE +#include #endif diff --git a/boost/boost/utility/in_place_factory.hpp b/boost/boost/utility/in_place_factory.hpp index f84b003c70..1a62ace10a 100644 --- a/boost/boost/utility/in_place_factory.hpp +++ b/boost/boost/utility/in_place_factory.hpp @@ -48,15 +48,13 @@ public: {} template - void* apply(void* address - BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) const + void* apply(void* address) const { return new(address) T( BOOST_PP_ENUM_PARAMS(N, m_a) ); } template - void* apply(void* address, std::size_t n - BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) const + void* apply(void* address, std::size_t n) const { for(char* next = address = this->BOOST_NESTED_TEMPLATE apply(address); !! --n;) diff --git a/boost/boost/utility/swap.hpp b/boost/boost/utility/swap.hpp index 6845e7965b..dd9ecd9070 100644 --- a/boost/boost/utility/swap.hpp +++ b/boost/boost/utility/swap.hpp @@ -1,55 +1,17 @@ -// Copyright (C) 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker -// -// 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) -// For more information, see http://www.boost.org - +/* + * Copyright (c) 2014 Glen Fernandes + * + * 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) + */ #ifndef BOOST_UTILITY_SWAP_HPP #define BOOST_UTILITY_SWAP_HPP -// Note: the implementation of this utility contains various workarounds: -// - swap_impl is put outside the boost namespace, to avoid infinite -// recursion (causing stack overflow) when swapping objects of a primitive -// type. -// - swap_impl has a using-directive, rather than a using-declaration, -// because some compilers (including MSVC 7.1, Borland 5.9.3, and -// Intel 8.1) don't do argument-dependent lookup when it has a -// using-declaration instead. -// - boost::swap has two template arguments, instead of one, to -// avoid ambiguity when swapping objects of a Boost type that does -// not have its own boost::swap overload. - -#include //for std::swap -#include //for std::size_t - -namespace boost_swap_impl -{ - template - void swap_impl(T& left, T& right) - { - using namespace std;//use std::swap if argument dependent lookup fails - swap(left,right); - } - - template - void swap_impl(T (& left)[N], T (& right)[N]) - { - for (std::size_t i = 0; i < N; ++i) - { - ::boost_swap_impl::swap_impl(left[i], right[i]); - } - } -} +// The header file at this path is deprecated; +// use boost/core/swap.hpp instead. -namespace boost -{ - template - void swap(T1& left, T2& right) - { - ::boost_swap_impl::swap_impl(left, right); - } -} +#include #endif diff --git a/boost/boost/version.hpp b/boost/boost/version.hpp index 0df7b2767b..ece5fe6e51 100644 --- a/boost/boost/version.hpp +++ b/boost/boost/version.hpp @@ -10,16 +10,16 @@ #define BOOST_VERSION_HPP // -// Caution, this is the only boost header that is guarenteed -// to change with every boost release, including this header -// will cause a recompile every time a new boost version is -// released. +// Caution: this is the only Boost header that is guaranteed +// to change with every Boost release. Including this header +// will cause a recompile every time a new Boost version is +// used. // // BOOST_VERSION % 100 is the patch level // BOOST_VERSION / 100 % 1000 is the minor version // BOOST_VERSION / 100000 is the major version -#define BOOST_VERSION 105500 +#define BOOST_VERSION 105800 // // BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION @@ -27,6 +27,6 @@ // number, y is the minor version number, and z is the patch level if not 0. // This is used by to select which library version to link to. -#define BOOST_LIB_VERSION "1_55" +#define BOOST_LIB_VERSION "1_58" #endif diff --git a/boost/boost/visit_each.hpp b/boost/boost/visit_each.hpp index 1fc8a50088..6463ca9c2f 100644 --- a/boost/boost/visit_each.hpp +++ b/boost/boost/visit_each.hpp @@ -10,8 +10,6 @@ #ifndef BOOST_VISIT_EACH_HPP #define BOOST_VISIT_EACH_HPP -#include - namespace boost { template inline void visit_each(Visitor& visitor, const T& t, long) diff --git a/boost/libs/regex/src/c_regex_traits.cpp b/boost/libs/regex/src/c_regex_traits.cpp index 6701020105..23ec32474a 100644 --- a/boost/libs/regex/src/c_regex_traits.cpp +++ b/boost/libs/regex/src/c_regex_traits.cpp @@ -54,6 +54,19 @@ c_regex_traits::string_type BOOST_REGEX_CALL c_regex_traits::transfo std::string src(p1, p2); while(s < (r = std::strxfrm(&*result.begin(), src.c_str(), s))) { +#if defined(_CPPLIB_VER) + // + // A bug in VC11 and 12 causes the program to hang if we pass a null-string + // to std::strxfrm, but only for certain locales :-( + // Probably effects Intel and Clang or any compiler using the VC std library (Dinkumware). + // + if(r == INT_MAX) + { + result.erase(); + result.insert(result.begin(), static_cast(0)); + return result; + } +#endif result.append(r - s + 3, ' '); s = result.size(); } diff --git a/boost/libs/regex/src/fileiter.cpp b/boost/libs/regex/src/fileiter.cpp index 780a12f164..5f65127ff1 100644 --- a/boost/libs/regex/src/fileiter.cpp +++ b/boost/libs/regex/src/fileiter.cpp @@ -267,14 +267,15 @@ void mapfile::lock(pointer* node)const read_size = std::fread(*node + sizeof(int), _size % buf_size, 1, hfile); else read_size = std::fread(*node + sizeof(int), buf_size, 1, hfile); -#ifndef BOOST_NO_EXCEPTIONS if((read_size == 0) || (std::ferror(hfile))) { +#ifndef BOOST_NO_EXCEPTIONS + unlock(node); throw std::runtime_error("Unable to read file."); - } #else - BOOST_REGEX_NOEH_ASSERT((0 == std::ferror(hfile)) && (read_size != 0)); + BOOST_REGEX_NOEH_ASSERT((0 == std::ferror(hfile)) && (read_size != 0)); #endif + } } else { diff --git a/boost/libs/regex/src/posix_api.cpp b/boost/libs/regex/src/posix_api.cpp index e59c19ea6e..8a803b3c0f 100644 --- a/boost/libs/regex/src/posix_api.cpp +++ b/boost/libs/regex/src/posix_api.cpp @@ -125,7 +125,7 @@ BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA* expression, const char #endif expression->re_magic = magic_value; static_cast(expression->guts)->set_expression(ptr, p2, flags); - expression->re_nsub = static_cast(expression->guts)->mark_count() - 1; + expression->re_nsub = static_cast(expression->guts)->mark_count(); result = static_cast(expression->guts)->error_code(); #ifndef BOOST_NO_EXCEPTIONS } diff --git a/boost/libs/regex/src/static_mutex.cpp b/boost/libs/regex/src/static_mutex.cpp index d14feb1e9b..d02b01fc6c 100644 --- a/boost/libs/regex/src/static_mutex.cpp +++ b/boost/libs/regex/src/static_mutex.cpp @@ -18,6 +18,7 @@ #define BOOST_REGEX_SOURCE #include +#include #ifdef BOOST_HAS_THREADS @@ -54,8 +55,8 @@ void scoped_static_mutex_lock::lock() { if(0 == m_have_lock) { - pthread_mutex_lock(&(m_mutex.m_mutex)); - m_have_lock = true; + // Client code will throw if this fails: + m_have_lock = (pthread_mutex_lock(&(m_mutex.m_mutex)) == 0); } } @@ -63,7 +64,10 @@ void scoped_static_mutex_lock::unlock() { if(m_have_lock) { - pthread_mutex_unlock(&(m_mutex.m_mutex)); + // If this fails there's nothing we can do except assert, + // exceptions are out of the question as this code is called + // from the lock's destructor: + BOOST_VERIFY(pthread_mutex_unlock(&(m_mutex.m_mutex)) == 0); m_have_lock = false; } } @@ -157,7 +161,7 @@ void scoped_static_mutex_lock::lock() { boost::call_once(static_mutex::m_once,&static_mutex::init); if(0 == m_plock) - m_plock = new boost::recursive_mutex::scoped_lock(*static_mutex::m_pmutex, boost::defer_lock); + m_plock = new boost::unique_lock(*static_mutex::m_pmutex, boost::defer_lock); m_plock->lock(); m_have_lock = true; } diff --git a/boost/libs/regex/src/wc_regex_traits.cpp b/boost/libs/regex/src/wc_regex_traits.cpp index b3d2c5a2c7..7815a09b3a 100644 --- a/boost/libs/regex/src/wc_regex_traits.cpp +++ b/boost/libs/regex/src/wc_regex_traits.cpp @@ -94,6 +94,19 @@ c_regex_traits::string_type BOOST_REGEX_CALL c_regex_traits::t std::wstring result(s, L' '); while(s < (r = std::wcsxfrm(&*result.begin(), src.c_str(), s))) { +#if defined(_CPPLIB_VER) + // + // A bug in VC11 and 12 causes the program to hang if we pass a null-string + // to std::strxfrm, but only for certain locales :-( + // Probably effects Intel and Clang or any compiler using the VC std library (Dinkumware). + // + if(r == INT_MAX) + { + result.erase(); + result.insert(result.begin(), static_cast(0)); + return result; + } +#endif result.append(r - s + 3, L' '); s = result.size(); } diff --git a/boost/libs/regex/src/wide_posix_api.cpp b/boost/libs/regex/src/wide_posix_api.cpp index ff5c90d89a..41704cd0a7 100644 --- a/boost/libs/regex/src/wide_posix_api.cpp +++ b/boost/libs/regex/src/wide_posix_api.cpp @@ -135,7 +135,7 @@ BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW* expression, const wcha #endif expression->re_magic = wmagic_value; static_cast(expression->guts)->set_expression(ptr, p2, flags); - expression->re_nsub = static_cast(expression->guts)->mark_count() - 1; + expression->re_nsub = static_cast(expression->guts)->mark_count(); result = static_cast(expression->guts)->error_code(); #ifndef BOOST_NO_EXCEPTIONS } diff --git a/boost/libs/signals/src/named_slot_map.cpp b/boost/libs/signals/src/named_slot_map.cpp index ac9a292fae..2fe27905a8 100644 --- a/boost/libs/signals/src/named_slot_map.cpp +++ b/boost/libs/signals/src/named_slot_map.cpp @@ -24,7 +24,7 @@ typedef slot_container_type::iterator group_iterator; typedef slot_container_type::const_iterator const_group_iterator; -#if BOOST_WORKAROUND(_MSC_VER, <= 1700) +#if BOOST_WORKAROUND(_MSC_VER, <= 1900) void named_slot_map_iterator::decrement() { assert(false); } void named_slot_map_iterator::advance(difference_type) { assert(false); } #endif