From d14aa5f22e1ed48f542efdcf142bb5f3ccc6f0a9 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Tue, 29 Apr 2014 16:12:31 +0200 Subject: [PATCH] boost: Update to 1.55.0 --- boost/boost/any.hpp | 146 +++++- boost/boost/assert.hpp | 24 +- boost/boost/config.hpp | 17 +- boost/boost/config/auto_link.hpp | 8 +- boost/boost/config/compiler/borland.hpp | 12 +- boost/boost/config/compiler/clang.hpp | 42 +- boost/boost/config/compiler/codegear.hpp | 12 +- boost/boost/config/compiler/common_edg.hpp | 27 +- boost/boost/config/compiler/cray.hpp | 6 +- boost/boost/config/compiler/digitalmars.hpp | 26 +- boost/boost/config/compiler/gcc.hpp | 133 +++--- boost/boost/config/compiler/gcc_xml.hpp | 16 +- boost/boost/config/compiler/hp_acc.hpp | 22 +- boost/boost/config/compiler/intel.hpp | 83 +++- boost/boost/config/compiler/metrowerks.hpp | 24 +- boost/boost/config/compiler/mpw.hpp | 12 +- boost/boost/config/compiler/nvcc.hpp | 12 - boost/boost/config/compiler/pathscale.hpp | 9 +- boost/boost/config/compiler/pgi.hpp | 7 + boost/boost/config/compiler/sunpro_cc.hpp | 24 +- boost/boost/config/compiler/vacpp.hpp | 33 +- boost/boost/config/compiler/visualc.hpp | 154 +++--- boost/boost/config/platform/vxworks.hpp | 372 ++++++++++++++- boost/boost/config/platform/win32.hpp | 4 +- boost/boost/config/select_compiler_config.hpp | 18 +- boost/boost/config/stdlib/dinkumware.hpp | 10 +- boost/boost/config/stdlib/libstdcpp3.hpp | 3 +- boost/boost/config/suffix.hpp | 165 ++++--- boost/boost/container/container_fwd.hpp | 19 +- boost/boost/cstdint.hpp | 217 +++++---- boost/boost/detail/endian.hpp | 73 +-- boost/boost/detail/interlocked.hpp | 72 ++- boost/boost/detail/is_function_ref_tester.hpp | 3 +- boost/boost/detail/limits.hpp | 449 ------------------ boost/boost/exception/exception.hpp | 2 +- .../functional/hash/detail/hash_float.hpp | 42 +- boost/boost/functional/hash/hash.hpp | 11 + boost/boost/integer_traits.hpp | 2 +- boost/boost/lexical_cast.hpp | 316 +++++++++--- boost/boost/limits.hpp | 2 +- boost/boost/math/policies/policy.hpp | 10 + .../special_functions/detail/round_fwd.hpp | 21 +- .../math/special_functions/fpclassify.hpp | 98 ++-- .../boost/math/special_functions/math_fwd.hpp | 278 +++++++---- boost/boost/math/special_functions/sign.hpp | 21 +- boost/boost/math/tools/config.hpp | 47 +- boost/boost/math/tools/promotion.hpp | 27 +- boost/boost/mpl/assert.hpp | 76 ++- boost/boost/noncopyable.hpp | 18 +- boost/boost/predef/architecture.h | 30 ++ boost/boost/predef/architecture/alpha.h | 60 +++ boost/boost/predef/architecture/arm.h | 58 +++ boost/boost/predef/architecture/blackfin.h | 47 ++ boost/boost/predef/architecture/convex.h | 67 +++ boost/boost/predef/architecture/ia64.h | 49 ++ boost/boost/predef/architecture/m68k.h | 83 ++++ boost/boost/predef/architecture/mips.h | 74 +++ boost/boost/predef/architecture/parisc.h | 65 +++ boost/boost/predef/architecture/ppc.h | 73 +++ boost/boost/predef/architecture/pyramid.h | 43 ++ boost/boost/predef/architecture/rs6k.h | 56 +++ boost/boost/predef/architecture/sparc.h | 55 +++ boost/boost/predef/architecture/superh.h | 68 +++ boost/boost/predef/architecture/sys370.h | 44 ++ boost/boost/predef/architecture/sys390.h | 44 ++ boost/boost/predef/architecture/x86.h | 38 ++ boost/boost/predef/architecture/x86/32.h | 87 ++++ boost/boost/predef/architecture/x86/64.h | 50 ++ boost/boost/predef/architecture/z.h | 43 ++ boost/boost/predef/detail/_cassert.h | 17 + boost/boost/predef/detail/endian_compat.h | 26 + boost/boost/predef/detail/os_detected.h | 10 + boost/boost/predef/detail/test.h | 17 + boost/boost/predef/library/c/_prefix.h | 13 + boost/boost/predef/library/c/gnu.h | 62 +++ boost/boost/predef/make.h | 87 ++++ boost/boost/predef/os/bsd.h | 95 ++++ boost/boost/predef/os/bsd/bsdi.h | 48 ++ boost/boost/predef/os/bsd/dragonfly.h | 50 ++ boost/boost/predef/os/bsd/free.h | 60 +++ boost/boost/predef/os/bsd/net.h | 84 ++++ boost/boost/predef/os/bsd/open.h | 171 +++++++ boost/boost/predef/os/macos.h | 58 +++ boost/boost/predef/os/windows.h | 51 ++ boost/boost/predef/other/endian.h | 205 ++++++++ boost/boost/predef/version_number.h | 54 +++ boost/boost/preprocessor/tuple/rem.hpp | 1 + boost/boost/range/concepts.hpp | 8 +- .../range/detail/extract_optional_type.hpp | 2 +- boost/boost/range/iterator_range_core.hpp | 5 +- boost/boost/regex/icu.hpp | 8 +- boost/boost/regex/pending/static_mutex.hpp | 15 +- boost/boost/regex/v4/basic_regex_creator.hpp | 19 +- boost/boost/regex/v4/basic_regex_parser.hpp | 84 +++- boost/boost/regex/v4/perl_matcher_common.hpp | 6 + .../regex/v4/perl_matcher_non_recursive.hpp | 24 +- .../boost/regex/v4/perl_matcher_recursive.hpp | 16 +- boost/boost/regex/v4/regex_format.hpp | 9 +- boost/boost/regex/v4/regex_split.hpp | 2 +- .../boost/regex/v4/regex_traits_defaults.hpp | 34 +- boost/boost/signal.hpp | 8 + .../detail/allocate_array_helper.hpp | 14 +- .../boost/smart_ptr/detail/array_deleter.hpp | 4 +- .../smart_ptr/detail/make_array_helper.hpp | 14 +- boost/boost/smart_ptr/detail/shared_count.hpp | 8 +- boost/boost/smart_ptr/detail/yield_k.hpp | 1 - boost/boost/smart_ptr/make_shared_object.hpp | 4 + boost/boost/smart_ptr/shared_ptr.hpp | 4 +- boost/boost/static_assert.hpp | 85 +++- boost/boost/throw_exception.hpp | 7 +- boost/boost/token_functions.hpp | 32 +- boost/boost/type_traits.hpp | 5 + boost/boost/type_traits/common_type.hpp | 3 +- .../detail/has_binary_operator.hpp | 2 +- .../type_traits/has_trivial_move_assign.hpp | 57 +++ .../has_trivial_move_constructor.hpp | 57 +++ boost/boost/type_traits/intrinsics.hpp | 13 + .../type_traits/is_copy_constructible.hpp | 122 +++++ boost/boost/type_traits/is_integral.hpp | 6 + .../is_nothrow_move_assignable.hpp | 84 ++++ .../is_nothrow_move_constructible.hpp | 84 ++++ boost/boost/type_traits/is_pod.hpp | 4 +- boost/boost/utility/addressof.hpp | 4 +- boost/boost/utility/base_from_member.hpp | 73 ++- boost/boost/utility/declval.hpp | 41 +- boost/boost/version.hpp | 4 +- boost/libs/regex/src/w32_regex_traits.cpp | 12 +- 127 files changed, 4956 insertions(+), 1496 deletions(-) delete mode 100644 boost/boost/detail/limits.hpp create mode 100644 boost/boost/predef/architecture.h create mode 100644 boost/boost/predef/architecture/alpha.h create mode 100644 boost/boost/predef/architecture/arm.h create mode 100644 boost/boost/predef/architecture/blackfin.h create mode 100644 boost/boost/predef/architecture/convex.h create mode 100644 boost/boost/predef/architecture/ia64.h create mode 100644 boost/boost/predef/architecture/m68k.h create mode 100644 boost/boost/predef/architecture/mips.h create mode 100644 boost/boost/predef/architecture/parisc.h create mode 100644 boost/boost/predef/architecture/ppc.h create mode 100644 boost/boost/predef/architecture/pyramid.h create mode 100644 boost/boost/predef/architecture/rs6k.h create mode 100644 boost/boost/predef/architecture/sparc.h create mode 100644 boost/boost/predef/architecture/superh.h create mode 100644 boost/boost/predef/architecture/sys370.h create mode 100644 boost/boost/predef/architecture/sys390.h create mode 100644 boost/boost/predef/architecture/x86.h create mode 100644 boost/boost/predef/architecture/x86/32.h create mode 100644 boost/boost/predef/architecture/x86/64.h create mode 100644 boost/boost/predef/architecture/z.h create mode 100644 boost/boost/predef/detail/_cassert.h create mode 100644 boost/boost/predef/detail/endian_compat.h create mode 100644 boost/boost/predef/detail/os_detected.h create mode 100644 boost/boost/predef/detail/test.h create mode 100644 boost/boost/predef/library/c/_prefix.h create mode 100644 boost/boost/predef/library/c/gnu.h create mode 100644 boost/boost/predef/make.h create mode 100644 boost/boost/predef/os/bsd.h create mode 100644 boost/boost/predef/os/bsd/bsdi.h create mode 100644 boost/boost/predef/os/bsd/dragonfly.h create mode 100644 boost/boost/predef/os/bsd/free.h create mode 100644 boost/boost/predef/os/bsd/net.h create mode 100644 boost/boost/predef/os/bsd/open.h create mode 100644 boost/boost/predef/os/macos.h create mode 100644 boost/boost/predef/os/windows.h create mode 100644 boost/boost/predef/other/endian.h create mode 100644 boost/boost/predef/version_number.h create mode 100644 boost/boost/type_traits/has_trivial_move_assign.hpp create mode 100644 boost/boost/type_traits/has_trivial_move_constructor.hpp create mode 100644 boost/boost/type_traits/is_copy_constructible.hpp create mode 100644 boost/boost/type_traits/is_nothrow_move_assignable.hpp create mode 100644 boost/boost/type_traits/is_nothrow_move_constructible.hpp diff --git a/boost/boost/any.hpp b/boost/boost/any.hpp index a8c654c373..771393530d 100644 --- a/boost/boost/any.hpp +++ b/boost/boost/any.hpp @@ -3,21 +3,31 @@ #ifndef BOOST_ANY_INCLUDED #define BOOST_ANY_INCLUDED +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + // what: variant type boost::any // who: contributed by Kevlin Henney, // with features contributed and bugs found by -// Ed Brey, Mark Rodgers, Peter Dimov, and James Curran -// when: July 2001 -// where: tested with BCC 5.5, MSVC 6.0, and g++ 2.95 +// Antony Polukhin, Ed Brey, Mark Rodgers, +// Peter Dimov, and James Curran +// when: July 2001, April 2013 - May 2013 #include #include #include "boost/config.hpp" #include +#include +#include #include +#include #include #include +#include +#include +#include // See boost/python/type_id.hpp // TODO: add BOOST_TYPEID_COMPARE_BY_NAME to config.hpp @@ -30,20 +40,25 @@ #include # endif +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable: 4172) // Mistakenly warns: returning address of local variable or temporary +#endif + namespace boost { class any { public: // structors - any() + any() BOOST_NOEXCEPT : content(0) { } template any(const ValueType & value) - : content(new holder(value)) + : content(new holder::type>(value)) { } @@ -52,19 +67,39 @@ namespace boost { } - ~any() +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + // Move constructor + any(any&& other) BOOST_NOEXCEPT + : content(other.content) + { + other.content = 0; + } + + // Perfect forwarding of ValueType + template + any(ValueType&& value + , typename boost::disable_if >::type* = 0 // disable if value has type `any&` + , typename boost::disable_if >::type* = 0) // disable if value has type `const ValueType&&` + : content(new holder< typename decay::type >(static_cast(value))) + { + } +#endif + + ~any() BOOST_NOEXCEPT { delete content; } public: // modifiers - any & swap(any & rhs) + any & swap(any & rhs) BOOST_NOEXCEPT { std::swap(content, rhs.content); return *this; } + +#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES template any & operator=(const ValueType & rhs) { @@ -74,18 +109,47 @@ namespace boost any & operator=(any rhs) { - rhs.swap(*this); + any(rhs).swap(*this); return *this; } +#else + any & operator=(const any& rhs) + { + any(rhs).swap(*this); + return *this; + } + + // move assignement + any & operator=(any&& rhs) BOOST_NOEXCEPT + { + rhs.swap(*this); + any().swap(rhs); + return *this; + } + + // Perfect forwarding of ValueType + template + any & operator=(ValueType&& rhs) + { + any(static_cast(rhs)).swap(*this); + return *this; + } +#endif + public: // queries - bool empty() const + bool empty() const BOOST_NOEXCEPT { return !content; } - const std::type_info & type() const + void clear() BOOST_NOEXCEPT + { + any().swap(*this); + } + + const std::type_info & type() const BOOST_NOEXCEPT { return content ? content->type() : typeid(void); } @@ -106,7 +170,7 @@ namespace boost public: // queries - virtual const std::type_info & type() const = 0; + virtual const std::type_info & type() const BOOST_NOEXCEPT = 0; virtual placeholder * clone() const = 0; @@ -122,9 +186,15 @@ namespace boost { } +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + holder(ValueType&& value) + : held(static_cast< ValueType&& >(value)) + { + } +#endif public: // queries - virtual const std::type_info & type() const + virtual const std::type_info & type() const BOOST_NOEXCEPT { return typeid(ValueType); } @@ -147,10 +217,10 @@ namespace boost private: // representation template - friend ValueType * any_cast(any *); + friend ValueType * any_cast(any *) BOOST_NOEXCEPT; template - friend ValueType * unsafe_any_cast(any *); + friend ValueType * unsafe_any_cast(any *) BOOST_NOEXCEPT; #else @@ -161,11 +231,16 @@ namespace boost placeholder * content; }; + + inline void swap(any & lhs, any & rhs) BOOST_NOEXCEPT + { + lhs.swap(rhs); + } - class bad_any_cast : public std::bad_cast + class BOOST_SYMBOL_VISIBLE bad_any_cast : public std::bad_cast { public: - virtual const char * what() const throw() + virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW { return "boost::bad_any_cast: " "failed conversion using boost::any_cast"; @@ -173,7 +248,7 @@ namespace boost }; template - ValueType * any_cast(any * operand) + ValueType * any_cast(any * operand) BOOST_NOEXCEPT { return operand && #ifdef BOOST_AUX_ANY_TYPE_ID_NAME @@ -186,7 +261,7 @@ namespace boost } template - inline const ValueType * any_cast(const any * operand) + inline const ValueType * any_cast(const any * operand) BOOST_NOEXCEPT { return any_cast(const_cast(operand)); } @@ -209,7 +284,18 @@ namespace boost nonref * result = any_cast(&operand); if(!result) boost::throw_exception(bad_any_cast()); - return *result; + + // Attempt to avoid construction of a temporary object in cases when + // `ValueType` is not a reference. Example: + // `static_cast(*result);` + // which is equal to `std::string(*result);` + typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< + boost::is_reference, + ValueType, + BOOST_DEDUCED_TYPENAME boost::add_reference::type + >::type ref_type; + + return static_cast(*result); } template @@ -226,19 +312,33 @@ namespace boost return any_cast(const_cast(operand)); } +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template + inline ValueType&& any_cast(any&& operand) + { + BOOST_STATIC_ASSERT_MSG( + boost::is_rvalue_reference::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); + } +#endif + + // Note: The "unsafe" versions of any_cast are not part of the // public interface and may be removed at any time. They are // required where we know what type is stored in the any and can't // use typeid() comparison, e.g., when our types may travel across // different shared libraries. template - inline ValueType * unsafe_any_cast(any * operand) + inline ValueType * unsafe_any_cast(any * operand) BOOST_NOEXCEPT { return &static_cast *>(operand->content)->held; } template - inline const ValueType * unsafe_any_cast(const any * operand) + inline const ValueType * unsafe_any_cast(const any * operand) BOOST_NOEXCEPT { return unsafe_any_cast(const_cast(operand)); } @@ -250,4 +350,8 @@ 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 174f0846fd..ccc776a438 100644 --- a/boost/boost/assert.hpp +++ b/boost/boost/assert.hpp @@ -34,6 +34,7 @@ #elif defined(BOOST_ENABLE_ASSERT_HANDLER) +#include #include namespace boost @@ -42,7 +43,7 @@ namespace boost char const * function, char const * file, long line); // user defined } // namespace boost -#define BOOST_ASSERT(expr) ((expr) \ +#define BOOST_ASSERT(expr) (BOOST_LIKELY(!!(expr)) \ ? ((void)0) \ : ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) @@ -63,6 +64,7 @@ namespace boost #elif defined(BOOST_ENABLE_ASSERT_HANDLER) + #include #include namespace boost @@ -71,7 +73,7 @@ namespace boost char const * function, char const * file, long line); // user defined } // namespace boost - #define BOOST_ASSERT_MSG(expr, msg) ((expr) \ + #define BOOST_ASSERT_MSG(expr, msg) (BOOST_LIKELY(!!(expr)) \ ? ((void)0) \ : ::boost::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) @@ -80,6 +82,7 @@ namespace boost #define BOOST_ASSERT_HPP #include #include + #include #include // IDE's like Visual Studio perform better if output goes to std::cout or @@ -89,26 +92,33 @@ namespace boost #endif namespace boost - { - namespace assertion - { + { + namespace assertion + { namespace detail { - inline void assertion_failed_msg(char const * expr, char const * msg, char const * function, + // 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) ((expr) \ + #define BOOST_ASSERT_MSG(expr, msg) (BOOST_LIKELY(!!(expr)) \ ? ((void)0) \ : ::boost::assertion::detail::assertion_failed_msg(#expr, msg, \ BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) diff --git a/boost/boost/config.hpp b/boost/boost/config.hpp index f37585ebb9..6ec3645c24 100644 --- a/boost/boost/config.hpp +++ b/boost/boost/config.hpp @@ -1,6 +1,6 @@ // Boost config.hpp configuration header file ------------------------------// -// (C) Copyright John Maddock 2002. +// (C) Copyright John Maddock 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) @@ -56,15 +56,8 @@ // get config suffix code: #include +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + #endif // BOOST_CONFIG_HPP - - - - - - - - - - - diff --git a/boost/boost/config/auto_link.hpp b/boost/boost/config/auto_link.hpp index e36d06a05a..13cbad4360 100644 --- a/boost/boost/config/auto_link.hpp +++ b/boost/boost/config/auto_link.hpp @@ -151,11 +151,16 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. // vc10: # define BOOST_LIB_TOOLSET "vc100" -# elif defined(BOOST_MSVC) +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1800) // vc11: # define BOOST_LIB_TOOLSET "vc110" +# elif defined(BOOST_MSVC) + + // vc12: +# define BOOST_LIB_TOOLSET "vc120" + # elif defined(__BORLANDC__) // CBuilder 6: @@ -421,3 +426,4 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. # undef BOOST_DYN_LINK #endif + diff --git a/boost/boost/config/compiler/borland.hpp b/boost/boost/config/compiler/borland.hpp index cffa8ea0ea..a8f5baaeb7 100644 --- a/boost/boost/config/compiler/borland.hpp +++ b/boost/boost/config/compiler/borland.hpp @@ -155,7 +155,7 @@ # define BOOST_NO_CXX11_DECLTYPE # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_EXTERN_TEMPLATE -# define BOOST_NO_CXX11_RVALUE_REFERENCES +# define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_SCOPED_ENUMS # define BOOST_NO_CXX11_STATIC_ASSERT #else @@ -190,6 +190,10 @@ #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_NOEXCEPT #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 #if __BORLANDC__ >= 0x590 # define BOOST_HAS_TR1_HASH @@ -242,7 +246,7 @@ // all versions support __declspec: // #if defined(__STRICT_ANSI__) -// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined +// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined # define BOOST_SYMBOL_EXPORT #endif // @@ -281,7 +285,3 @@ #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION #define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__) - - - - diff --git a/boost/boost/config/compiler/clang.hpp b/boost/boost/config/compiler/clang.hpp index 18d6e5462a..b57e26c5ac 100644 --- a/boost/boost/config/compiler/clang.hpp +++ b/boost/boost/config/compiler/clang.hpp @@ -1,13 +1,15 @@ // (C) Copyright Douglas Gregor 2010 // -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// 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. // Clang compiler setup. +#define BOOST_HAS_PRAGMA_ONCE + #if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif @@ -20,12 +22,20 @@ # define BOOST_NO_TYPEID #endif -#if defined(__int64) +#if defined(__int64) && !defined(__GNUC__) # define BOOST_HAS_MS_INT64 #endif #define BOOST_HAS_NRVO +// Branch prediction hints +#if defined(__has_builtin) +#if __has_builtin(__builtin_expect) +#define BOOST_LIKELY(x) __builtin_expect(x, 1) +#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) +#endif +#endif + // Clang supports "long long" in all compilation modes. #define BOOST_HAS_LONG_LONG @@ -38,6 +48,16 @@ # define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) #endif +// +// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through +// between switch labels. +// +#if __cplusplus >= 201103L && defined(__has_warning) +# if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") +# define BOOST_FALLTHROUGH [[clang::fallthrough]] +# endif +#endif + #if !__has_feature(cxx_auto_type) # define BOOST_NO_CXX11_AUTO_DECLARATIONS # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS @@ -132,6 +152,22 @@ # define BOOST_NO_CXX11_VARIADIC_TEMPLATES #endif +#if !__has_feature(cxx_user_literals) +# define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#endif + +#if !(__has_feature(cxx_alignas) || __has_extension(cxx_alignas)) +# define BOOST_NO_CXX11_ALIGNAS +#endif + +#if !__has_feature(cxx_trailing_return) +# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#endif + +#if !__has_feature(cxx_inline_namespaces) +# define BOOST_NO_CXX11_INLINE_NAMESPACES +#endif + // Clang always supports variadic macros // Clang always supports extern templates diff --git a/boost/boost/config/compiler/codegear.hpp b/boost/boost/config/compiler/codegear.hpp index 1a6df33520..00e0bb949c 100644 --- a/boost/boost/config/compiler/codegear.hpp +++ b/boost/boost/config/compiler/codegear.hpp @@ -72,6 +72,12 @@ # endif #endif + +// Reportedly, #pragma once is supported since C++ Builder 2010 +#if (__CODEGEARC__ >= 0x620) +# define BOOST_HAS_PRAGMA_ONCE +#endif + // // C++0x macros: // @@ -110,6 +116,10 @@ #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #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 // // TR1 macros: @@ -150,7 +160,7 @@ // all versions support __declspec: // #if defined(__STRICT_ANSI__) -// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined +// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined # define BOOST_SYMBOL_EXPORT #endif // diff --git a/boost/boost/config/compiler/common_edg.hpp b/boost/boost/config/compiler/common_edg.hpp index 441a055fa2..70e7efa2e8 100644 --- a/boost/boost/config/compiler/common_edg.hpp +++ b/boost/boost/config/compiler/common_edg.hpp @@ -1,10 +1,10 @@ -// (C) Copyright John Maddock 2001 - 2002. -// (C) Copyright Jens Maurer 2001. -// (C) Copyright David Abrahams 2002. -// (C) Copyright Aleksey Gurtovoy 2002. +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Jens Maurer 2001. +// (C) Copyright David Abrahams 2002. +// (C) Copyright Aleksey Gurtovoy 2002. // (C) Copyright Markus Schoepflin 2005. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// 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. @@ -33,15 +33,15 @@ #if (__EDG_VERSION__ <= 244) && !defined(BOOST_NO_TEMPLATE_TEMPLATES) # define BOOST_NO_TEMPLATE_TEMPLATES -#endif +#endif #if (__EDG_VERSION__ < 300) && !defined(BOOST_NO_IS_ABSTRACT) # define BOOST_NO_IS_ABSTRACT -#endif +#endif #if (__EDG_VERSION__ <= 303) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -#endif +#endif // See also kai.hpp which checks a Kai-specific symbol for EH # if !defined(__KCC) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) @@ -54,6 +54,11 @@ # define BOOST_NO_LONG_LONG # endif +// Not sure what version was the first to support #pragma once, but +// different EDG-based compilers (e.g. Intel) supported it for ages. +// Add a proper version check if it causes problems. +#define BOOST_HAS_PRAGMA_ONCE + // // C++0x features // @@ -95,6 +100,10 @@ #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #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 #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 5463ea08c7..3ce29f0114 100644 --- a/boost/boost/config/compiler/cray.hpp +++ b/boost/boost/config/compiler/cray.hpp @@ -51,13 +51,15 @@ #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS #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_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 diff --git a/boost/boost/config/compiler/digitalmars.hpp b/boost/boost/config/compiler/digitalmars.hpp index 15cc209d00..7de6adb100 100644 --- a/boost/boost/config/compiler/digitalmars.hpp +++ b/boost/boost/config/compiler/digitalmars.hpp @@ -1,8 +1,8 @@ // Copyright (C) Christof Meerwald 2003 // Copyright (C) Dan Watkins 2003 // -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// 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) // Digital Mars C++ compiler setup: @@ -11,15 +11,7 @@ #define BOOST_HAS_LONG_LONG #define BOOST_HAS_PRAGMA_ONCE -#if (__DMC__ <= 0x833) -#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -#define BOOST_NO_TEMPLATE_TEMPLATES -#define BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING -#define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS -#define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS -#endif -#if (__DMC__ <= 0x840) || !defined(BOOST_STRICT_CONFIG) -#define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS +#if !defined(BOOST_STRICT_CONFIG) #define BOOST_NO_MEMBER_TEMPLATE_FRIENDS #define BOOST_NO_OPERATORS_IN_NAMESPACE #define BOOST_NO_UNREACHABLE_RETURN_DETECTION @@ -30,11 +22,9 @@ // // has macros: -#if (__DMC__ >= 0x840) #define BOOST_HAS_DIRENT_H #define BOOST_HAS_STDINT_H #define BOOST_HAS_WINTHREADS -#endif #if (__DMC__ >= 0x847) #define BOOST_HAS_EXPM1 @@ -86,12 +76,12 @@ #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #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 -#if (__DMC__ < 0x812) -#define BOOST_NO_CXX11_VARIADIC_MACROS -#endif - -#if __DMC__ < 0x800 +#if (__DMC__ <= 0x840) #error "Compiler not supported or configured - please reconfigure" #endif // diff --git a/boost/boost/config/compiler/gcc.hpp b/boost/boost/config/compiler/gcc.hpp index c0ac30af27..aa628e5a76 100644 --- a/boost/boost/config/compiler/gcc.hpp +++ b/boost/boost/config/compiler/gcc.hpp @@ -1,63 +1,31 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Darin Adler 2001 - 2002. -// (C) Copyright Jens Maurer 2001 - 2002. -// (C) Copyright Beman Dawes 2001 - 2003. -// (C) Copyright Douglas Gregor 2002. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Synge Todo 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001 - 2002. +// (C) Copyright Jens Maurer 2001 - 2002. +// (C) Copyright Beman Dawes 2001 - 2003. +// (C) Copyright Douglas Gregor 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Synge Todo 2003. +// 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. -// GNU C++ compiler setup: +// GNU C++ compiler setup. -#if __GNUC__ < 3 -# if __GNUC_MINOR__ == 91 - // egcs 1.1 won't parse shared_ptr.hpp without this: -# define BOOST_NO_AUTO_PTR -# endif -# if __GNUC_MINOR__ < 95 - // - // Prior to gcc 2.95 member templates only partly - // work - define BOOST_MSVC6_MEMBER_TEMPLATES - // instead since inline member templates mostly work. - // -# define BOOST_NO_MEMBER_TEMPLATES -# if __GNUC_MINOR__ >= 9 -# define BOOST_MSVC6_MEMBER_TEMPLATES -# endif -# endif +// +// Define BOOST_GCC so we know this is "real" GCC and not some pretender: +// +#if !defined(__CUDACC__) +#define BOOST_GCC (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#endif -# if __GNUC_MINOR__ < 96 -# define BOOST_NO_SFINAE -# endif - -# if __GNUC_MINOR__ <= 97 -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -# define BOOST_NO_OPERATORS_IN_NAMESPACE -# endif - -# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE -# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -# define BOOST_NO_IS_ABSTRACT -# define BOOST_NO_CXX11_EXTERN_TEMPLATE -// Variadic macros do not exist for gcc versions before 3.0 -# define BOOST_NO_CXX11_VARIADIC_MACROS -#elif __GNUC__ == 3 +#if __GNUC__ == 3 # if defined (__PATHSCALE__) # define BOOST_NO_TWO_PHASE_NAME_LOOKUP # define BOOST_NO_IS_ABSTRACT # endif - // - // gcc-3.x problems: - // - // Bug specific to gcc 3.1 and 3.2: - // -# if ((__GNUC_MINOR__ == 1) || (__GNUC_MINOR__ == 2)) -# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS -# endif + # if __GNUC_MINOR__ < 4 # define BOOST_NO_IS_ABSTRACT # endif @@ -73,6 +41,11 @@ # endif #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) +#define BOOST_HAS_PRAGMA_ONCE +#endif + #if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 ) // Previous versions of GCC did not completely implement value-initialization: // GCC Bug 30111, "Value-initialization of POD base class doesn't initialize @@ -97,7 +70,7 @@ // #if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__) # define BOOST_HAS_THREADS -#endif +#endif // // gcc has "long long" @@ -107,28 +80,30 @@ // // gcc implements the named return value optimization since version 3.1 // -#if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 ) #define BOOST_HAS_NRVO -#endif + +// Branch prediction hints +#define BOOST_LIKELY(x) __builtin_expect(x, 1) +#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) // // Dynamic shared object (DSO) and dynamic-link library (DLL) support // #if __GNUC__ >= 4 # if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__) - // All Win32 development environments, including 64-bit Windows and MinGW, define + // All Win32 development environments, including 64-bit Windows and MinGW, define // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment, // so does not define _WIN32 or its variants. # define BOOST_HAS_DECLSPEC -# define BOOST_SYMBOL_EXPORT __attribute__((dllexport)) -# define BOOST_SYMBOL_IMPORT __attribute__((dllimport)) +# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__)) +# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__)) # else -# define BOOST_SYMBOL_EXPORT __attribute__((visibility("default"))) +# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) # define BOOST_SYMBOL_IMPORT # endif -# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) +# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) #else -// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined +// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined # define BOOST_SYMBOL_EXPORT #endif @@ -147,9 +122,16 @@ #endif // -// Recent GCC versions have __int128 when in 64-bit mode: +// Recent GCC versions have __int128 when in 64-bit mode. // -#if defined(__SIZEOF_INT128__) +// 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/8048 +// 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 @@ -169,7 +151,7 @@ # define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_STATIC_ASSERT -// Variadic templates compiler: +// 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 @@ -188,12 +170,19 @@ # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS # define BOOST_NO_CXX11_DELETED_FUNCTIONS +# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +# define BOOST_NO_CXX11_INLINE_NAMESPACES #endif #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) # 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) +# 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__) @@ -222,12 +211,24 @@ #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #endif +// C++0x features in 4.7.n and later +// #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_NO_CXX11_TEMPLATE_ALIASES +# define BOOST_NO_CXX11_USER_DEFINED_LITERALS #endif -// C++0x features not supported at all yet + +// C++0x features in 4.8.n and later // -#define BOOST_NO_CXX11_DECLTYPE_N3276 +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +# 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__) +# define BOOST_NO_CXX11_DECLTYPE_N3276 +#endif #ifndef BOOST_COMPILER # define BOOST_COMPILER "GNU C++ version " __VERSION__ @@ -241,8 +242,8 @@ #endif // versions check: -// we don't know gcc prior to version 2.90: -#if (__GNUC__ == 2) && (__GNUC_MINOR__ < 90) +// we don't know gcc prior to version 3.30: +#if (__GNUC__ < 3) || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3)) # error "Compiler not configured - please reconfigure" #endif // diff --git a/boost/boost/config/compiler/gcc_xml.hpp b/boost/boost/config/compiler/gcc_xml.hpp index eaed4b5af4..d2e0c74f89 100644 --- a/boost/boost/config/compiler/gcc_xml.hpp +++ b/boost/boost/config/compiler/gcc_xml.hpp @@ -1,6 +1,6 @@ -// (C) Copyright John Maddock 2006. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2006. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. @@ -18,7 +18,7 @@ // #if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(linux) && !defined(__linux) && !defined(__linux__) # define BOOST_HAS_THREADS -#endif +#endif // // gcc has "long long" @@ -44,7 +44,7 @@ # define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS # define BOOST_NO_CXX11_DELETED_FUNCTIONS # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_SCOPED_ENUMS +# define BOOST_NO_CXX11_SCOPED_ENUMS # define BOOST_NO_SFINAE_EXPR # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_LAMBDAS @@ -53,7 +53,11 @@ # define BOOST_NO_CXX11_RAW_LITERALS # define BOOST_NO_CXX11_UNICODE_LITERALS # define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +# 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_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 4f5f81b3c3..f08dca44ac 100644 --- a/boost/boost/config/compiler/hp_acc.hpp +++ b/boost/boost/config/compiler/hp_acc.hpp @@ -1,11 +1,11 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2001 - 2003. -// (C) Copyright Aleksey Gurtovoy 2002. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Toon Knapen 2003. +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Toon Knapen 2003. // (C) Copyright Boris Gubenko 2006 - 2007. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// 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. @@ -43,7 +43,7 @@ # define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS # define BOOST_NO_IS_ABSTRACT # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -#endif +#endif // optional features rather than defects: #if (__HP_aCC >= 33900) @@ -118,8 +118,12 @@ #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#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 -/* +/* See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443436 */ diff --git a/boost/boost/config/compiler/intel.hpp b/boost/boost/config/compiler/intel.hpp index 8c746c1870..3f0eaa18db 100644 --- a/boost/boost/config/compiler/intel.hpp +++ b/boost/boost/config/compiler/intel.hpp @@ -27,7 +27,7 @@ #endif // Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x' -#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) +#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_INTEL_STDCXX0X #endif #if defined(_MSC_VER) && (_MSC_VER >= 1600) @@ -47,11 +47,6 @@ # define BOOST_INTEL_LINUX BOOST_INTEL #endif -#if (BOOST_INTEL_CXX_VERSION <= 500) && defined(_MSC_VER) -# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS -# define BOOST_NO_TEMPLATE_TEMPLATES -#endif - #if (BOOST_INTEL_CXX_VERSION <= 600) # if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov) @@ -111,7 +106,7 @@ # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL # endif #endif -#if (defined(__GNUC__) && (__GNUC__ < 4)) || defined(_WIN32) || (BOOST_INTEL_CXX_VERSION <= 1200) +#if (defined(__GNUC__) && (__GNUC__ < 4)) || (defined(_WIN32) && (BOOST_INTEL_CXX_VERSION <= 1200)) || (BOOST_INTEL_CXX_VERSION <= 1200) // GCC or VC emulation: #define BOOST_NO_TWO_PHASE_NAME_LOOKUP #endif @@ -154,10 +149,18 @@ template<> struct assert_intrinsic_wchar_t {}; # define BOOST_HAS_NRVO #endif +// Branch prediction hints +// I'm not sure 8.0 was the first version to support these builtins, +// update the condition if the version is not accurate. (Andrey Semashev) +#if defined(__GNUC__) && BOOST_INTEL_CXX_VERSION >= 800 +#define BOOST_LIKELY(x) __builtin_expect(x, 1) +#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) +#endif + // // versions check: -// we don't support Intel prior to version 5.0: -#if BOOST_INTEL_CXX_VERSION < 500 +// we don't support Intel prior to version 6.0: +#if BOOST_INTEL_CXX_VERSION < 600 # error "Compiler not supported or configured - please reconfigure" #endif @@ -173,15 +176,15 @@ template<> struct assert_intrinsic_wchar_t {}; // // An attempt to value-initialize a pointer-to-member may trigger an -// internal error on Intel <= 11.1 (last checked version), as was +// internal error on Intel <= 11.1 (last checked version), as was // reported by John Maddock, Intel support issue 589832, May 2010. // Moreover, according to test results from Huang-Vista-x86_32_intel, -// intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some +// intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some // cases when it should be value-initialized. // (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) +# if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999) || (defined(_WIN32) && (__INTEL_COMPILER < 1500)) # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION # endif #endif @@ -221,10 +224,11 @@ template<> struct assert_intrinsic_wchar_t {}; # 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. +// 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 @@ -234,8 +238,44 @@ template<> struct assert_intrinsic_wchar_t {}; # 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 +// 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 +# 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 +# undef BOOST_NO_CXX11_SCOPED_ENUMS +# 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 +#endif + +#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION <= 1310) +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#endif + +#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION == 1400) +// A regression in Intel's compiler means that seems to be broken in this release as well as : +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_TUPLE #endif #if defined(_MSC_VER) && (_MSC_VER <= 1700) @@ -247,6 +287,9 @@ template<> struct assert_intrinsic_wchar_t {}; # 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) @@ -256,9 +299,17 @@ template<> struct assert_intrinsic_wchar_t {}; # define BOOST_NO_FENV_H #endif +#if defined(_MSC_VER) && (_MSC_VER >= 1600) +# define BOOST_HAS_STDINT_H +#endif + +#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310) +# define BOOST_HAS_INT128 +#endif + // // last known and checked version: -#if (BOOST_INTEL_CXX_VERSION > 1200) +#if (BOOST_INTEL_CXX_VERSION > 1310) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # elif defined(_MSC_VER) diff --git a/boost/boost/config/compiler/metrowerks.hpp b/boost/boost/config/compiler/metrowerks.hpp index 184cb71c1f..e17278607c 100644 --- a/boost/boost/config/compiler/metrowerks.hpp +++ b/boost/boost/config/compiler/metrowerks.hpp @@ -1,11 +1,11 @@ -// (C) Copyright John Maddock 2001. -// (C) Copyright Darin Adler 2001. -// (C) Copyright Peter Dimov 2001. -// (C) Copyright David Abrahams 2001 - 2002. -// (C) Copyright Beman Dawes 2001 - 2003. -// (C) Copyright Stefan Slapeta 2004. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001. +// (C) Copyright Darin Adler 2001. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright David Abrahams 2001 - 2002. +// (C) Copyright Beman Dawes 2001 - 2003. +// (C) Copyright Stefan Slapeta 2004. +// 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. @@ -15,7 +15,7 @@ // locale support is disabled when linking with the dynamic runtime # ifdef _MSL_NO_LOCALE # define BOOST_NO_STD_LOCALE -# endif +# endif # if __MWERKS__ <= 0x2301 // 5.3 # define BOOST_NO_FUNCTION_TEMPLATE_ORDERING @@ -90,7 +90,7 @@ #if __MWERKS__ > 0x3206 && __option(rvalue_refs) # define BOOST_HAS_RVALUE_REFS #else -# define BOOST_NO_CXX11_RVALUE_REFERENCES +# define BOOST_NO_CXX11_RVALUE_REFERENCES #endif #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS @@ -119,6 +119,10 @@ #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_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 14adee0cc6..69104674d4 100644 --- a/boost/boost/config/compiler/mpw.hpp +++ b/boost/boost/config/compiler/mpw.hpp @@ -1,7 +1,7 @@ -// (C) Copyright John Maddock 2001 - 2002. -// (C) Copyright Aleksey Gurtovoy 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Aleksey Gurtovoy 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 for most recent version. @@ -68,6 +68,10 @@ #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 // // versions check: diff --git a/boost/boost/config/compiler/nvcc.hpp b/boost/boost/config/compiler/nvcc.hpp index 03203fb55b..bbe81f6ee5 100644 --- a/boost/boost/config/compiler/nvcc.hpp +++ b/boost/boost/config/compiler/nvcc.hpp @@ -14,15 +14,3 @@ // NVIDIA Specific support // BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device #define BOOST_GPU_ENABLED __host__ __device__ - -// Boost support macro for NVCC -// NVCC Basically behaves like some flavor of MSVC6 + some specific quirks -#ifdef __GNUC__ - -#include - -#elif defined(_MSC_VER) - -#include - -#endif diff --git a/boost/boost/config/compiler/pathscale.hpp b/boost/boost/config/compiler/pathscale.hpp index 3041126353..567d83cc19 100644 --- a/boost/boost/config/compiler/pathscale.hpp +++ b/boost/boost/config/compiler/pathscale.hpp @@ -1,7 +1,7 @@ // (C) Copyright Bryce Lelbach 2011 -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// 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. @@ -76,5 +76,8 @@ # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CHRONO +# 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 #endif - diff --git a/boost/boost/config/compiler/pgi.hpp b/boost/boost/config/compiler/pgi.hpp index fa32fefb48..d50cbef82d 100644 --- a/boost/boost/config/compiler/pgi.hpp +++ b/boost/boost/config/compiler/pgi.hpp @@ -41,6 +41,9 @@ #define BOOST_HAS_THREADS #define BOOST_HAS_NRVO #define BOOST_HAS_LONG_LONG +#if defined(linux) || defined(__linux) || defined(__linux__) +# define BOOST_HAS_STDINT_H +#endif // options --enable-test wants undefined #undef BOOST_NO_STDC_NAMESPACE @@ -111,6 +114,10 @@ #define BOOST_NO_CXX11_HDR_CODECVT #define BOOST_NO_CXX11_HDR_CHRONO #define BOOST_NO_CXX11_HDR_ARRAY +#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 // // version check: diff --git a/boost/boost/config/compiler/sunpro_cc.hpp b/boost/boost/config/compiler/sunpro_cc.hpp index 65beb50198..486d5c432b 100644 --- a/boost/boost/config/compiler/sunpro_cc.hpp +++ b/boost/boost/config/compiler/sunpro_cc.hpp @@ -1,10 +1,10 @@ -// (C) Copyright John Maddock 2001. -// (C) Copyright Jens Maurer 2001 - 2003. -// (C) Copyright Peter Dimov 2002. -// (C) Copyright Aleksey Gurtovoy 2002 - 2003. -// (C) Copyright David Abrahams 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001. +// (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright Peter Dimov 2002. +// (C) Copyright Aleksey Gurtovoy 2002 - 2003. +// (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 for most recent version. @@ -34,7 +34,7 @@ # define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # endif -# if (__SUNPRO_CC <= 0x530) +# if (__SUNPRO_CC <= 0x530) // Requesting debug info (-g) with Boost.Python results // in an internal compiler error for "static const" // initialized in-class. @@ -57,7 +57,7 @@ # define BOOST_NO_INTEGRAL_INT64_T # endif -# if (__SUNPRO_CC < 0x570) +# if (__SUNPRO_CC < 0x570) # define BOOST_NO_TEMPLATE_TEMPLATES // see http://lists.boost.org/MailArchives/boost/msg47184.php // and http://lists.boost.org/MailArchives/boost/msg47220.php @@ -65,7 +65,7 @@ # define BOOST_NO_SFINAE # define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS # endif -# if (__SUNPRO_CC <= 0x580) +# if (__SUNPRO_CC <= 0x580) # define BOOST_NO_IS_ABSTRACT # endif @@ -127,6 +127,10 @@ #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 // // Version diff --git a/boost/boost/config/compiler/vacpp.hpp b/boost/boost/config/compiler/vacpp.hpp index 2410d5a3ab..17c02f9106 100644 --- a/boost/boost/config/compiler/vacpp.hpp +++ b/boost/boost/config/compiler/vacpp.hpp @@ -1,10 +1,10 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Toon Knapen 2001 - 2003. -// (C) Copyright Lie-Quan Lee 2001. -// (C) Copyright Markus Schoepflin 2002 - 2003. -// (C) Copyright Beman Dawes 2002 - 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Toon Knapen 2001 - 2003. +// (C) Copyright Lie-Quan Lee 2001. +// (C) Copyright Markus Schoepflin 2002 - 2003. +// (C) Copyright Beman Dawes 2002 - 2003. +// 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. @@ -16,7 +16,7 @@ # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS #endif -#if (__IBMCPP__ <= 502) +#if (__IBMCPP__ <= 502) // Actually the compiler supports inclass member initialization but it // requires a definition for the class member and it doesn't recognize // it as an integral constant expression when used as a template argument. @@ -30,9 +30,9 @@ #endif #if (__IBMCPP__ <= 1110) -// XL C++ V11.1 and earlier versions may not always value-initialize -// a temporary object T(), when T is a non-POD aggregate class type. -// Michael Wong (IBM Canada Ltd) has confirmed this issue and gave it +// XL C++ V11.1 and earlier versions may not always value-initialize +// a temporary object T(), when T is a non-POD aggregate class type. +// Michael Wong (IBM Canada Ltd) has confirmed this issue and gave it // high priority. -- Niels Dekker (LKEB), May 2010. # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION #endif @@ -53,8 +53,8 @@ #error "Compiler not supported or configured - please reconfigure" #endif // -// last known and checked version is 1110: -#if (__IBMCPP__ > 1110) +// last known and checked version is 1210: +#if (__IBMCPP__ > 1210) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif @@ -106,6 +106,7 @@ #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS #if ! __IBMCPP_RVALUE_REFERENCES # define BOOST_NO_CXX11_RVALUE_REFERENCES #endif @@ -125,6 +126,6 @@ #if ! __C99_MACRO_WITH_VA_ARGS # define BOOST_NO_CXX11_VARIADIC_MACROS #endif - - - +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#define BOOST_NO_CXX11_INLINE_NAMESPACES diff --git a/boost/boost/config/compiler/visualc.hpp b/boost/boost/config/compiler/visualc.hpp index aa4584df8b..695fa94306 100644 --- a/boost/boost/config/compiler/visualc.hpp +++ b/boost/boost/config/compiler/visualc.hpp @@ -1,11 +1,11 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Darin Adler 2001 - 2002. -// (C) Copyright Peter Dimov 2001. -// (C) Copyright Aleksey Gurtovoy 2002. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Beman Dawes 2002 - 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright Darin Adler 2001 - 2002. +// (C) Copyright Peter Dimov 2001. +// (C) Copyright Aleksey Gurtovoy 2002. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Beman Dawes 2002 - 2003. +// 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. @@ -34,67 +34,20 @@ // Attempt to suppress VC6 warnings about the length of decorated names (obsolete): #pragma warning( disable : 4503 ) // warning: decorated name length exceeded +#define BOOST_HAS_PRAGMA_ONCE + // // versions check: -// we don't support Visual C++ prior to version 6: -#if _MSC_VER < 1200 +// we don't support Visual C++ prior to version 7.1: +#if _MSC_VER < 1310 # error "Compiler not supported or configured - please reconfigure" #endif -#if _MSC_VER < 1300 // 1200 == VC++ 6.0, 1200-1202 == eVC++4 -# pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info -# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS -# define BOOST_NO_VOID_RETURNS -# define BOOST_NO_EXCEPTION_STD_NAMESPACE - -# if _MSC_VER == 1202 -# define BOOST_NO_STD_TYPEINFO -# endif - +#if _MSC_FULL_VER < 180020827 +# define BOOST_NO_FENV_H #endif -/// Visual Studio has no fenv.h -#define BOOST_NO_FENV_H - -#if (_MSC_VER < 1310) // 130X == VC++ 7.0 - -# if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za -# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS -# endif - -# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS -# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION -# define BOOST_NO_PRIVATE_IN_AGGREGATE -# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP -# define BOOST_NO_INTEGRAL_INT64_T -# define BOOST_NO_DEDUCED_TYPENAME -# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE - -// VC++ 6/7 has member templates but they have numerous problems including -// cases of silent failure, so for safety we define: -# define BOOST_NO_MEMBER_TEMPLATES -// For VC++ experts wishing to attempt workarounds, we define: -# define BOOST_MSVC6_MEMBER_TEMPLATES - -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# define BOOST_NO_CV_VOID_SPECIALIZATIONS -# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING -# define BOOST_NO_USING_TEMPLATE -# define BOOST_NO_SWPRINTF -# define BOOST_NO_TEMPLATE_TEMPLATES -# define BOOST_NO_SFINAE -# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS -# define BOOST_NO_IS_ABSTRACT -# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS -// TODO: what version is meant here? Have there really been any fixes in cl 12.01 (as e.g. shipped with eVC4)? -# if (_MSC_VER >= 1300) -# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS -# endif - -#endif - -#if _MSC_VER < 1400 +#if _MSC_VER < 1400 // although a conforming signature for swprint exists in VC7.1 // it appears not to actually work: # define BOOST_NO_SWPRINTF @@ -119,9 +72,9 @@ #endif -// MSVC (including the latest checked version) has not yet completely +// MSVC (including the latest checked version) has not yet completely // implemented value-initialization, as is reported: -// "VC++ does not value-initialize members of derived classes without +// "VC++ does not value-initialize members of derived classes without // user-declared constructor", reported in 2009 by Sylvester Hesp: // https://connect.microsoft.com/VisualStudio/feedback/details/484295 // "Presence of copy constructor breaks member class initialization", @@ -134,10 +87,6 @@ // (Niels Dekker, LKEB, May 2010) # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -#if _MSC_VER < 1600 || !defined(BOOST_STRICT_CONFIG) // 150X == VC++ 9.0 -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#endif - #ifndef _NATIVE_WCHAR_T_DEFINED # define BOOST_NO_INTRINSIC_WCHAR_T #endif @@ -152,19 +101,17 @@ # define BOOST_HAS_GETSYSTEMTIMEASFILETIME #endif -// -// check for exception handling support: +// +// check for exception handling support: #if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif +# define BOOST_NO_EXCEPTIONS +#endif // // __int64 support: // -#if (_MSC_VER >= 1200) -# define BOOST_HAS_MS_INT64 -#endif -#if (_MSC_VER >= 1310) && (defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400)) +#define BOOST_HAS_MS_INT64 +#if defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400) # define BOOST_HAS_LONG_LONG #else # define BOOST_NO_LONG_LONG @@ -214,31 +161,40 @@ # define BOOST_HAS_STDINT_H #endif -// C++ features supported by VC++ 11 (aka 2012) +// C++11 features supported by VC++ 11 (aka 2012) // #if _MSC_VER < 1700 # define BOOST_NO_CXX11_RANGE_BASED_FOR # define BOOST_NO_CXX11_SCOPED_ENUMS #endif // _MSC_VER < 1700 -// C++0x features not supported by any versions +// C++11 features supported by VC++ 12 (aka 2013). +// +#if _MSC_FULL_VER < 180020827 +# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +# define BOOST_NO_CXX11_DELETED_FUNCTIONS +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +# define BOOST_NO_CXX11_RAW_LITERALS +# define BOOST_NO_CXX11_TEMPLATE_ALIASES +# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#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_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX11_INLINE_NAMESPACES + // // prefix and suffix headers: // @@ -251,17 +207,13 @@ #ifndef BOOST_COMPILER // TODO: -// these things are mostly bogus. 1200 means version 12.0 of the compiler. The +// these things are mostly bogus. 1200 means version 12.0 of the compiler. The // artificial versions assigned to them only refer to the versions of some IDE // these compilers have been shipped with, and even that is not all of it. Some // were shipped with freely downloadable SDKs, others as crosscompilers in eVC. // IOW, you can't use these 'versions' in any sensible way. Sorry. # if defined(UNDER_CE) -# if _MSC_VER < 1200 - // Note: these are so far off, they are not really supported -# elif _MSC_VER < 1300 // eVC++ 4 comes with 1200-1202 -# define BOOST_COMPILER_VERSION evc4.0 -# elif _MSC_VER < 1400 +# if _MSC_VER < 1400 // Note: I'm not aware of any CE compiler with version 13xx # if defined(BOOST_ASSERT_CONFIG) # error "Unknown EVC++ compiler version - please run the configure tests and report the results" @@ -276,6 +228,8 @@ # define BOOST_COMPILER_VERSION evc10 # elif _MSC_VER < 1800 # define BOOST_COMPILER_VERSION evc11 +# elif _MSC_VER < 1900 +# define BOOST_COMPILER_VERSION evc12 # else # if defined(BOOST_ASSERT_CONFIG) # error "Unknown EVC++ compiler version - please run the configure tests and report the results" @@ -284,11 +238,11 @@ # endif # endif # else -# if _MSC_VER < 1200 - // Note: these are so far off, they are not really supported +# if _MSC_VER < 1310 + // Note: Versions up to 7.0 aren't supported. # define BOOST_COMPILER_VERSION 5.0 # elif _MSC_VER < 1300 -# define BOOST_COMPILER_VERSION 6.0 +# define BOOST_COMPILER_VERSION 6.0 # elif _MSC_VER < 1310 # define BOOST_COMPILER_VERSION 7.0 # elif _MSC_VER < 1400 @@ -300,7 +254,9 @@ # elif _MSC_VER < 1700 # define BOOST_COMPILER_VERSION 10.0 # elif _MSC_VER < 1800 -# define BOOST_COMPILER_VERSION 11.0 +# define BOOST_COMPILER_VERSION 11.0 +# elif _MSC_VER < 1900 +# define BOOST_COMPILER_VERSION 12.0 # else # define BOOST_COMPILER_VERSION _MSC_VER # endif @@ -310,8 +266,8 @@ #endif // -// last known and checked version is 1700 (VC11, aka 2011): -#if (_MSC_VER > 1700) +// last known and checked version is 18.00.20827.3 (VC12 RC, aka 2013 RC): +#if (_MSC_VER > 1800 && _MSC_FULL_VER > 180020827) # 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/vxworks.hpp b/boost/boost/config/platform/vxworks.hpp index 6ec5171e39..cdda0158ad 100644 --- a/boost/boost/config/platform/vxworks.hpp +++ b/boost/boost/config/platform/vxworks.hpp @@ -1,31 +1,369 @@ -// (C) Copyright Dustin Spicuzza 2009. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file +// (C) Copyright Dustin Spicuzza 2009. +// Adapted to vxWorks 6.9 by Peter Brockamp 2012. +// 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. -// vxWorks specific config options: +// Since WRS does not yet properly support boost under vxWorks +// and this file was badly outdated, but I was keen on using it, +// I patched boost myself to make things work. This has been tested +// and adapted by me for vxWorks 6.9 *only*, as I'm lacking access +// to earlier 6.X versions! The only thing I know for sure is that +// very old versions of vxWorks (namely everything below 6.x) are +// absolutely unable to use boost. This is mainly due to the completely +// outdated libraries and ancient compiler (GCC 2.96 or worse). Do +// not even think of getting this to work, a miserable failure will +// be guaranteed! +// Equally, this file has been tested for RTPs (Real Time Processes) +// only, not for DKMs (Downloadable Kernel Modules). These two types +// of executables differ largely in the available functionality of +// the C-library, STL, and so on. A DKM uses a library similar to those +// of vxWorks 5.X - with all its limitations and incompatibilities +// with respect to ANSI C++ and STL. So probably there might be problems +// with the usage of boost from DKMs. WRS or any voluteers are free to +// prove the opposite! -#define BOOST_PLATFORM "vxWorks" +// ==================================================================== +// +// Some important information regarding the usage of POSIX semaphores: +// ------------------------------------------------------------------- +// +// VxWorks as a real time operating system handles threads somewhat +// different from what "normal" OSes do, regarding their scheduling! +// This could lead to a scenario called "priority inversion" when using +// semaphores, see http://en.wikipedia.org/wiki/Priority_inversion. +// +// Now, VxWorks POSIX-semaphores for DKM's default to the usage of +// priority inverting semaphores, which is fine. On the other hand, +// for RTP's it defaults to using non priority inverting semaphores, +// which could easily pose a serious problem for a real time process, +// i.e. deadlocks! To overcome this two possibilities do exist: +// +// a) Patch every piece of boost that uses semaphores to instanciate +// the proper type of semaphores. This is non-intrusive with respect +// to the OS and could relatively easy been done by giving all +// semaphores attributes deviating from the default (for in-depth +// information see the POSIX functions pthread_mutexattr_init() +// and pthread_mutexattr_setprotocol()). However this breaks all +// too easily, as with every new version some boost library could +// all in a sudden start using semaphores, resurrecting the very +// same, hard to locate problem over and over again! +// +// b) We could change the default properties for POSIX-semaphores +// that VxWorks uses for RTP's and this is being suggested here, +// as it will more or less seamlessly integrate with boost. I got +// the following information from WRS how to do this, compare +// Wind River TSR# 1209768: +// +// Instructions for changing the default properties of POSIX- +// semaphores for RTP's in VxWorks 6.9: +// - Edit the file /vxworks-6.9/target/usr/src/posix/pthreadLib.c +// in the root of your Workbench-installation. +// - Around line 917 there should be the definition of the default +// mutex attributes: +// +// LOCAL pthread_mutexattr_t defaultMutexAttr = +// { +// PTHREAD_INITIALIZED_OBJ, PTHREAD_PRIO_NONE, 0, +// PTHREAD_MUTEX_DEFAULT +// }; +// +// Here, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT. +// - Around line 1236 there should be a definition for the function +// pthread_mutexattr_init(). A couple of lines below you should +// find a block of code like this: +// +// pAttr->mutexAttrStatus = PTHREAD_INITIALIZED_OBJ; +// pAttr->mutexAttrProtocol = PTHREAD_PRIO_NONE; +// pAttr->mutexAttrPrioceiling = 0; +// pAttr->mutexAttrType = PTHREAD_MUTEX_DEFAULT; +// +// Here again, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT. +// - Finally, rebuild your VSB. This will create a new VxWorks kernel +// with the changed properties. That's it! Now, using boost should +// no longer cause any problems with task deadlocks! +// +// And here's another useful piece of information concerning VxWorks' +// POSIX-functionality in general: +// VxWorks is not a genuine POSIX-OS in itself, rather it is using a +// kind of compatibility layer (sort of a wrapper) to emulate the +// POSIX-functionality by using its own resources and functions. +// At the time a task (thread) calls it's first POSIX-function during +// runtime it is being transformed by the OS into a POSIX-thread. +// This transformation does include a call to malloc() to allocate the +// memory required for the housekeeping of POSIX-threads. In a high +// priority RTP this malloc() call may be highly undesirable, as its +// timing is more or less unpredictable (depending on what your actual +// heap looks like). You can circumvent this problem by calling the +// function thread_self() at a well defined point in the code of the +// task, e.g. shortly after the task spawns up. Thereby you are able +// to define the time when the task-transformation will take place and +// you could shift it to an uncritical point where a malloc() call is +// tolerable. So, if this could pose a problem for your code, remember +// to call thread_self() from the affected task at an early stage. +// +// ==================================================================== -#define BOOST_NO_CWCHAR -#define BOOST_NO_INTRINSIC_WCHAR_T - -#if defined(__GNUC__) && defined(__STRICT_ANSI__) -#define BOOST_NO_INT64_T +// Block out all versions before vxWorks 6.x, as these don't work: +// Include header with the vxWorks version information and query them +#include +#if !defined(_WRS_VXWORKS_MAJOR) || (_WRS_VXWORKS_MAJOR < 6) +# error "The vxWorks version you're using is so badly outdated,\ + it doesn't work at all with boost, sorry, no chance!" #endif +// Handle versions above 5.X but below 6.9 +#if (_WRS_VXWORKS_MAJOR == 6) && (_WRS_VXWORKS_MINOR < 9) +// TODO: Starting from what version does vxWorks work with boost? +// We can't reasonably insert a #warning "" as a user hint here, +// as this will show up with every file including some boost header, +// badly bugging the user... So for the time being we just leave it. +#endif + +// vxWorks specific config options: +// -------------------------------- +#define BOOST_PLATFORM "vxWorks" + +// Special behaviour for DKMs: +#ifdef _WRS_KERNEL + // DKMs do not have the -header, + // but apparently they do have an intrinsic wchar_t meanwhile! +# define BOOST_NO_CWCHAR + + // Lots of wide-functions and -headers are unavailable for DKMs as well: +# define BOOST_NO_CWCTYPE +# define BOOST_NO_SWPRINTF +# define BOOST_NO_STD_WSTRING +# define BOOST_NO_STD_WSTREAMBUF +#endif + +// Generally available headers: #define BOOST_HAS_UNISTD_H +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_SLIST -// these allow posix_features to work, since vxWorks doesn't -// define them itself -#define _POSIX_TIMERS 1 -#define _POSIX_THREADS 1 +// vxWorks does not have installed an iconv-library by default, +// so unfortunately no Unicode support from scratch is available! +// Thus, instead it is suggested to switch to ICU, as this seems +// to be the most complete and portable option... +#define BOOST_LOCALE_WITH_ICU -// vxworks doesn't work with asio serial ports +// Generally available functionality: +#define BOOST_HAS_THREADS +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_CLOCK_GETTIME +#define BOOST_HAS_MACRO_USE_FACET + +// Generally unavailable functionality, delivered by boost's test function: +//#define BOOST_NO_DEDUCED_TYPENAME // Commented this out, boost's test gives an errorneous result! +#define BOOST_NO_CXX11_EXTERN_TEMPLATE +#define BOOST_NO_CXX11_VARIADIC_MACROS + +// Generally available threading API's: +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_SCHED_YIELD +#define BOOST_HAS_SIGACTION + +// Functionality available for RTPs only: +#ifdef __RTP__ +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_LOG1P +# define BOOST_HAS_EXPM1 +#endif + +// Functionality available for DKMs only: +#ifdef _WRS_KERNEL + // Luckily, at the moment there seems to be none! +#endif + +// These #defines allow posix_features to work, since vxWorks doesn't +// #define them itself for DKMs (for RTPs on the contrary it does): +#ifdef _WRS_KERNEL +# ifndef _POSIX_TIMERS +# define _POSIX_TIMERS 1 +# endif +# ifndef _POSIX_THREADS +# define _POSIX_THREADS 1 +# endif +#endif + +// vxWorks doesn't work with asio serial ports: #define BOOST_ASIO_DISABLE_SERIAL_PORT +// TODO: The problem here seems to bee that vxWorks uses its own, very specific +// ways to handle serial ports, incompatible with POSIX or anything... +// Maybe a specific implementation would be possible, but until the +// straight need arises... This implementation would presumably consist +// of some vxWorks specific ioctl-calls, etc. Any voluteers? -// boilerplate code: +// vxWorks-around: #defines CLOCKS_PER_SEC as sysClkRateGet() but +// miserably fails to #include the required to make +// sysClkRateGet() available! So we manually include it here. +#ifdef __RTP__ +# include +# include +#endif + +// vxWorks-around: In the macros INT32_C(), UINT32_C(), INT64_C() and +// UINT64_C() are defined errorneously, yielding not a signed/ +// unsigned long/long long type, but a signed/unsigned int/long +// type. Eventually this leads to compile errors in ratio_fwd.hpp, +// when trying to define several constants which do not fit into a +// long type! We correct them here by redefining. +#include + +// Some macro-magic to do the job +#define VX_JOIN(X, Y) VX_DO_JOIN(X, Y) +#define VX_DO_JOIN(X, Y) VX_DO_JOIN2(X, Y) +#define VX_DO_JOIN2(X, Y) X##Y + +// Correctly setup the macros +#undef INT32_C +#undef UINT32_C +#undef INT64_C +#undef UINT64_C +#define INT32_C(x) VX_JOIN(x, L) +#define UINT32_C(x) VX_JOIN(x, UL) +#define INT64_C(x) VX_JOIN(x, LL) +#define UINT64_C(x) VX_JOIN(x, ULL) + +// #include Libraries required for the following function adaption +#include +#include +#include + +// Use C-linkage for the following helper functions +extern "C" { + +// vxWorks-around: The required functions getrlimit() and getrlimit() are missing. +// But we have the similar functions getprlimit() and setprlimit(), +// which may serve the purpose. +// Problem: The vxWorks-documentation regarding these functions +// doesn't deserve its name! It isn't documented what the first two +// parameters idtype and id mean, so we must fall back to an educated +// guess - null, argh... :-/ + +// TODO: getprlimit() and setprlimit() do exist for RTPs only, for whatever reason. +// Thus for DKMs there would have to be another implementation. +#ifdef __RTP__ + inline int getrlimit(int resource, struct rlimit *rlp){ + return getprlimit(0, 0, resource, rlp); + } + + inline int setrlimit(int resource, const struct rlimit *rlp){ + return setprlimit(0, 0, resource, const_cast(rlp)); + } +#endif + +// vxWorks has ftruncate() only, so we do simulate truncate(): +inline int truncate(const char *p, off_t l){ + int fd = open(p, O_WRONLY); + if (fd == -1){ + errno = EACCES; + return -1; + } + if (ftruncate(fd, l) == -1){ + close(fd); + errno = EACCES; + return -1; + } + return close(fd); +} + +// Fake symlink handling by dummy functions: +inline int symlink(const char*, const char*){ + // vxWorks has no symlinks -> always return an error! + errno = EACCES; + return -1; +} + +inline ssize_t readlink(const char*, char*, size_t){ + // vxWorks has no symlinks -> always return an error! + errno = EACCES; + return -1; +} + +// vxWorks claims to implement gettimeofday in sys/time.h +// but nevertheless does not provide it! See +// https://support.windriver.com/olsPortal/faces/maintenance/techtipDetail_noHeader.jspx?docId=16442&contentId=WR_TECHTIP_006256 +// We implement a surrogate version here via clock_gettime: +inline int gettimeofday(struct timeval *tv, void * /*tzv*/) { + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); + tv->tv_sec = ts.tv_sec; + tv->tv_usec = ts.tv_nsec / 1000; + return 0; +} + +// vxWorks does provide neither struct tms nor function times()! +// We implement an empty dummy-function, simply setting the user +// and system time to the half of thew actual system ticks-value +// and the child user and system time to 0. +// Rather ugly but at least it suppresses compiler errors... +// Unfortunately, this of course *does* have an severe impact on +// dependant libraries, actually this is chrono only! Here it will +// not be possible to correctly use user and system times! But +// as vxWorks is lacking the ability to calculate user and system +// process times there seems to be no other possible solution. +struct tms{ + clock_t tms_utime; // User CPU time + clock_t tms_stime; // System CPU time + clock_t tms_cutime; // User CPU time of terminated child processes + clock_t tms_cstime; // System CPU time of terminated child processes +}; + +inline clock_t times(struct tms *t){ + struct timespec ts; + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts); + clock_t ticks(static_cast(static_cast(ts.tv_sec) * CLOCKS_PER_SEC + + static_cast(ts.tv_nsec) * CLOCKS_PER_SEC / 1000000.0)); + t->tms_utime = ticks/2U; + t->tms_stime = ticks/2U; + t->tms_cutime = 0; // vxWorks is lacking the concept of a child process! + t->tms_cstime = 0; // -> Set the wait times for childs to 0 + return ticks; +} + +} // extern "C" + +// Put the selfmade functions into the std-namespace, just in case +namespace std { +# ifdef __RTP__ + using ::getrlimit; + using ::setrlimit; +# endif + using ::truncate; + using ::symlink; + using ::readlink; + using ::times; + using ::gettimeofday; +} + +// Some more macro-magic: +// vxWorks-around: Some functions are not present or broken in vxWorks +// but may be patched to life via helper macros... + +// Include signal.h which might contain a typo to be corrected here +#include + +#define getpagesize() sysconf(_SC_PAGESIZE) // getpagesize is deprecated anyway! +#ifndef S_ISSOCK +# define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket? +#endif +#define lstat(p, b) stat(p, b) // lstat() == stat(), as vxWorks has no symlinks! +#ifndef FPE_FLTINV +# define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy +#endif +#if !defined(BUS_ADRALN) && defined(BUS_ADRALNR) +# define BUS_ADRALN BUS_ADRALNR // Correct a supposed typo in vxWorks' +#endif +//typedef int locale_t; // locale_t is a POSIX-extension, currently unpresent in vxWorks! + +// #include boilerplate code: #include - + +// vxWorks lies about XSI conformance, there is no nl_types.h: +#undef BOOST_HAS_NL_TYPES_H diff --git a/boost/boost/config/platform/win32.hpp b/boost/boost/config/platform/win32.hpp index 39220127b2..6ab59f4e91 100644 --- a/boost/boost/config/platform/win32.hpp +++ b/boost/boost/config/platform/win32.hpp @@ -33,7 +33,9 @@ #if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0))) # define BOOST_HAS_STDINT_H -# define __STDC_LIMIT_MACROS +# ifndef __STDC_LIMIT_MACROS +# define __STDC_LIMIT_MACROS +# endif # define BOOST_HAS_DIRENT_H # define BOOST_HAS_UNISTD_H #endif diff --git a/boost/boost/config/select_compiler_config.hpp b/boost/boost/config/select_compiler_config.hpp index 0d47b25424..0eeb7ad3ee 100644 --- a/boost/boost/config/select_compiler_config.hpp +++ b/boost/boost/config/select_compiler_config.hpp @@ -13,6 +13,12 @@ // locate which compiler we are using and define // BOOST_COMPILER_CONFIG as needed: +#if defined __CUDACC__ +// NVIDIA CUDA C++ compiler for GPU +# include "boost/config/compiler/nvcc.hpp" + +#endif + #if defined(__GCCXML__) // GCC-XML emulates other compilers, it has to appear first here! # define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp" @@ -21,10 +27,6 @@ // EDG based Cray compiler: # define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp" -#elif defined __CUDACC__ -// NVIDIA CUDA C++ compiler for GPU -# define BOOST_COMPILER_CONFIG "boost/config/compiler/nvcc.hpp" - #elif defined __COMO__ // Comeau C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp" @@ -33,6 +35,10 @@ // PathScale EKOPath compiler (has to come before clang and gcc) # define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp" +#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) +// Intel +# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" + #elif defined __clang__ // Clang C++ emulates GCC, so it has to appear early. # define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp" @@ -41,10 +47,6 @@ // Digital Mars C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp" -#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) -// Intel -# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" - # elif defined __GNUC__ // GNU C++: # define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp" diff --git a/boost/boost/config/stdlib/dinkumware.hpp b/boost/boost/config/stdlib/dinkumware.hpp index 3058851772..a8b68be7e8 100644 --- a/boost/boost/config/stdlib/dinkumware.hpp +++ b/boost/boost/config/stdlib/dinkumware.hpp @@ -87,7 +87,7 @@ #endif #include -#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) +#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) # define BOOST_NO_STD_TYPEINFO #endif @@ -110,7 +110,8 @@ # define BOOST_NO_CXX11_SMART_PTR #endif -#if (!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(BOOST_NO_CXX11_HDR_TUPLE) +#if ((!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(BOOST_NO_CXX11_HDR_TUPLE)) \ + && (!defined(_CPPLIB_VER) || _CPPLIB_VER < 610) # define BOOST_NO_CXX11_HDR_TUPLE #endif @@ -128,10 +129,11 @@ # define BOOST_NO_CXX11_ATOMIC_SMART_PTR #endif +// C++0x headers implemented in 610 (as shipped by Microsoft) // -// C++0x headers not yet (fully) implemented: -// +#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 610 # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#endif #ifdef _CPPLIB_VER # define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER diff --git a/boost/boost/config/stdlib/libstdcpp3.hpp b/boost/boost/config/stdlib/libstdcpp3.hpp index c56dff225c..976ab76bae 100644 --- a/boost/boost/config/stdlib/libstdcpp3.hpp +++ b/boost/boost/config/stdlib/libstdcpp3.hpp @@ -35,7 +35,8 @@ # if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \ || defined(_GLIBCXX__PTHREADS) \ || defined(_GLIBCXX_HAS_GTHREADS) \ - || defined(_WIN32) + || defined(_WIN32) \ + || defined(_AIX) // // 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 diff --git a/boost/boost/config/suffix.hpp b/boost/boost/config/suffix.hpp index 8ee88d90f1..c55579ea62 100644 --- a/boost/boost/config/suffix.hpp +++ b/boost/boost/config/suffix.hpp @@ -4,7 +4,7 @@ // Copyright (c) 2001-2003 John Maddock // Copyright (c) 2001 Darin Adler // Copyright (c) 2001 Peter Dimov -// Copyright (c) 2002 Bill Kempf +// Copyright (c) 2002 Bill Kempf // Copyright (c) 2002 Jens Maurer // Copyright (c) 2002-2003 David Abrahams // Copyright (c) 2003 Gennaro Prota @@ -146,7 +146,7 @@ # endif // -// Without partial specialization, partial +// Without partial specialization, partial // specialization with default args won't work either: // # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ @@ -503,69 +503,8 @@ namespace boost{ #endif // BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------// -// -// Some compilers have problems with function templates whose template -// parameters don't appear in the function parameter list (basically -// they just link one instantiation of the template in the final -// executable). These macros provide a uniform way to cope with the -// problem with no effects on the calling syntax. -// Example: -// -// #include -// #include -// #include -// -// template -// void f() { std::cout << n << ' '; } -// -// template -// void g() { std::cout << typeid(T).name() << ' '; } -// -// int main() { -// f<1>(); -// f<2>(); -// -// g(); -// g(); -// } -// -// With VC++ 6.0 the output is: -// -// 2 2 double double -// -// To fix it, write -// -// template -// void f(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, n)) { ... } -// -// template -// void g(BOOST_EXPLICIT_TEMPLATE_TYPE(T)) { ... } -// - - -#if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) && defined(__cplusplus) - -# include "boost/type.hpp" -# include "boost/non_type.hpp" - -# define BOOST_EXPLICIT_TEMPLATE_TYPE(t) boost::type* = 0 -# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type* -# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type* = 0 -# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type* - -# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \ - , BOOST_EXPLICIT_TEMPLATE_TYPE(t) -# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \ - , BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) -# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \ - , BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) -# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \ - , BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) - -#else - -// no workaround needed: expand to nothing +// These macros are obsolete. Port away and remove. # define BOOST_EXPLICIT_TEMPLATE_TYPE(t) # define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) @@ -577,9 +516,6 @@ namespace boost{ # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) - -#endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS - // When BOOST_NO_STD_TYPEINFO is defined, we can just import // the global definition into std namespace: #if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus) @@ -632,7 +568,7 @@ namespace std{ using ::type_info; } // Set some default values GPU support // # ifndef BOOST_GPU_ENABLED -# define BOOST_GPU_ENABLED +# define BOOST_GPU_ENABLED # endif // BOOST_FORCEINLINE ---------------------------------------------// @@ -641,12 +577,85 @@ namespace std{ using ::type_info; } # if defined(_MSC_VER) # define BOOST_FORCEINLINE __forceinline # elif defined(__GNUC__) && __GNUC__ > 3 -# define BOOST_FORCEINLINE inline __attribute__ ((always_inline)) + // Clang also defines __GNUC__ (as 4) +# define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__)) # else # define BOOST_FORCEINLINE inline # endif #endif +// BOOST_NOINLINE ---------------------------------------------// +// Macro to use in place of 'inline' to prevent a function to be inlined +#if !defined(BOOST_NOINLINE) +# if defined(_MSC_VER) +# define BOOST_NOINLINE __declspec(noinline) +# elif defined(__GNUC__) && __GNUC__ > 3 + // Clang also defines __GNUC__ (as 4) +# define BOOST_NOINLINE __attribute__ ((__noinline__)) +# else +# define BOOST_NOINLINE +# endif +#endif + +// Branch prediction hints +// These macros are intended to wrap conditional expressions that yield true or false +// +// if (BOOST_LIKELY(var == 10)) +// { +// // the most probable code here +// } +// +#if !defined(BOOST_LIKELY) +# define BOOST_LIKELY(x) x +#endif +#if !defined(BOOST_UNLIKELY) +# define BOOST_UNLIKELY(x) x +#endif + +// Type and data alignment specification +// +#if !defined(BOOST_NO_CXX11_ALIGNAS) +# define BOOST_ALIGNMENT(x) alignas(x) +#elif defined(_MSC_VER) +# define BOOST_ALIGNMENT(x) __declspec(align(x)) +#elif defined(__GNUC__) +# define BOOST_ALIGNMENT(x) __attribute__ ((__aligned__(x))) +#else +# define BOOST_NO_ALIGNMENT +# define BOOST_ALIGNMENT(x) +#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 +// body, which will be used if the compiler doesn't support defaulted functions. +// BOOST_DELETED_FUNCTION only accepts the function declaration. It +// will expand to a private function declaration, if the compiler doesn't support +// deleted functions. Because of this it is recommended to use BOOST_DELETED_FUNCTION +// in the end of the class definition. +// +// class my_class +// { +// public: +// // Default-constructible +// BOOST_DEFAULTED_FUNCTION(my_class(), {}) +// // Copying prohibited +// BOOST_DELETED_FUNCTION(my_class(my_class const&)) +// BOOST_DELETED_FUNCTION(my_class& operator= (my_class const&)) +// }; +// +#if !(defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)) +# define BOOST_DEFAULTED_FUNCTION(fun, body) fun = default; +#else +# define BOOST_DEFAULTED_FUNCTION(fun, body) fun body +#endif + +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) +# define BOOST_DELETED_FUNCTION(fun) fun = delete; +#else +# define BOOST_DELETED_FUNCTION(fun) private: fun; +#endif + // // Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined // @@ -671,7 +680,7 @@ namespace std{ using ::type_info; } #endif // Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY -#if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_BOOST_NO_0X_HDR_ARRAY) +#if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_0X_HDR_ARRAY) # define BOOST_NO_0X_HDR_ARRAY #endif // Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO @@ -695,7 +704,7 @@ namespace std{ using ::type_info; } # define BOOST_NO_0X_HDR_FUTURE #endif -// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST +// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST // instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS #ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST # ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST @@ -874,17 +883,29 @@ namespace std{ using ::type_info; } // #ifdef BOOST_NO_CXX11_NOEXCEPT # define BOOST_NOEXCEPT +# define BOOST_NOEXCEPT_OR_NOTHROW throw() # define BOOST_NOEXCEPT_IF(Predicate) # define BOOST_NOEXCEPT_EXPR(Expression) false #else # define BOOST_NOEXCEPT noexcept +# define BOOST_NOEXCEPT_OR_NOTHROW noexcept # define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate)) # define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression)) #endif +// +// Helper macro BOOST_FALLTHROUGH +// Fallback definition of BOOST_FALLTHROUGH macro used to mark intended +// fall-through between case labels in a switch statement. We use a definition +// that requires a semicolon after it to avoid at least one type of misuse even +// on unsupported compilers. +// +#ifndef BOOST_FALLTHROUGH +# define BOOST_FALLTHROUGH ((void)0) +#endif // // constexpr workarounds -// +// #if defined(BOOST_NO_CXX11_CONSTEXPR) #define BOOST_CONSTEXPR #define BOOST_CONSTEXPR_OR_CONST const diff --git a/boost/boost/container/container_fwd.hpp b/boost/boost/container/container_fwd.hpp index bdefd81e00..271cc8b191 100644 --- a/boost/boost/container/container_fwd.hpp +++ b/boost/boost/container/container_fwd.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP #define BOOST_CONTAINER_CONTAINER_FWD_HPP -#if (defined _MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif @@ -135,20 +135,28 @@ class basic_string; struct ordered_range_t {}; +//! Value used to tag that the input range is +//! guaranteed to be ordered +static const ordered_range_t ordered_range = ordered_range_t(); + //! Type used to tag that the input range is //! guaranteed to be ordered and unique struct ordered_unique_range_t : public ordered_range_t {}; -//! Value used to tag that the input range is -//! guaranteed to be ordered -static const ordered_range_t ordered_range = ordered_range_t(); - //! Value used to tag that the input range is //! 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 +struct default_init_t +{}; + +//! Value used to tag that the input range is +//! guaranteed to be ordered and unique +static const default_init_t default_init = default_init_t(); /// @cond namespace detail_really_deep_namespace { @@ -161,6 +169,7 @@ struct dummy { (void)ordered_range; (void)ordered_unique_range; + (void)default_init; } }; diff --git a/boost/boost/cstdint.hpp b/boost/boost/cstdint.hpp index ea84b65062..98faeae019 100644 --- a/boost/boost/cstdint.hpp +++ b/boost/boost/cstdint.hpp @@ -1,8 +1,8 @@ // boost cstdint.hpp header file ------------------------------------------// -// (C) Copyright Beman Dawes 1999. -// (C) Copyright Jens Mauer 2001 -// (C) Copyright John Maddock 2001 +// (C) Copyright Beman Dawes 1999. +// (C) Copyright Jens Mauer 2001 +// (C) Copyright John Maddock 2001 // 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,9 +24,9 @@ #define BOOST_CSTDINT_HPP // -// Since we always define the INT#_C macros as per C++0x, +// Since we always define the INT#_C macros as per C++0x, // define __STDC_CONSTANT_MACROS so that does the right -// thing if possible, and so that the user knows that the macros +// thing if possible, and so that the user knows that the macros // are actually defined as per C99. // #ifndef __STDC_CONSTANT_MACROS @@ -41,7 +41,10 @@ // so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG. // See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990 // -#if defined(BOOST_HAS_STDINT_H) && (!defined(__GLIBC__) || defined(__GLIBC_HAVE_LONG_LONG)) +#if defined(BOOST_HAS_STDINT_H) \ + && (!defined(__GLIBC__) \ + || defined(__GLIBC_HAVE_LONG_LONG) \ + || (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17))))) // The following #include is an implementation artifact; not part of interface. # ifdef __hpux @@ -50,7 +53,7 @@ # ifdef __STDC_32_MODE__ // this is triggered with GCC, because it defines __cplusplus < 199707L # define BOOST_NO_INT64_T -# endif +# endif # elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX) # include # else @@ -100,40 +103,40 @@ typedef ::uintfast64_t uint_fast64_t; namespace boost { - using ::int8_t; - using ::int_least8_t; - using ::int_fast8_t; - using ::uint8_t; - using ::uint_least8_t; - using ::uint_fast8_t; - - using ::int16_t; - using ::int_least16_t; - using ::int_fast16_t; - using ::uint16_t; - using ::uint_least16_t; - using ::uint_fast16_t; - - using ::int32_t; - using ::int_least32_t; - using ::int_fast32_t; - using ::uint32_t; - using ::uint_least32_t; - using ::uint_fast32_t; - + using ::int8_t; + using ::int_least8_t; + using ::int_fast8_t; + using ::uint8_t; + using ::uint_least8_t; + using ::uint_fast8_t; + + using ::int16_t; + using ::int_least16_t; + using ::int_fast16_t; + using ::uint16_t; + using ::uint_least16_t; + using ::uint_fast16_t; + + using ::int32_t; + using ::int_least32_t; + using ::int_fast32_t; + using ::uint32_t; + using ::uint_least32_t; + using ::uint_fast32_t; + # ifndef BOOST_NO_INT64_T - using ::int64_t; - using ::int_least64_t; - using ::int_fast64_t; - using ::uint64_t; - using ::uint_least64_t; - using ::uint_fast64_t; - + using ::int64_t; + using ::int_least64_t; + using ::int_fast64_t; + using ::uint64_t; + using ::uint_least64_t; + using ::uint_fast64_t; + # endif - using ::intmax_t; - using ::uintmax_t; + using ::intmax_t; + using ::uintmax_t; } // namespace boost @@ -143,35 +146,35 @@ namespace boost namespace boost { - using ::int8_t; - typedef int8_t int_least8_t; - typedef int8_t int_fast8_t; - using ::uint8_t; - typedef uint8_t uint_least8_t; - typedef uint8_t uint_fast8_t; - - using ::int16_t; - typedef int16_t int_least16_t; - typedef int16_t int_fast16_t; - using ::uint16_t; - typedef uint16_t uint_least16_t; - typedef uint16_t uint_fast16_t; - - using ::int32_t; - typedef int32_t int_least32_t; - typedef int32_t int_fast32_t; - using ::uint32_t; - typedef uint32_t uint_least32_t; - typedef uint32_t uint_fast32_t; - -# ifndef BOOST_NO_INT64_T + using ::int8_t; + typedef int8_t int_least8_t; + typedef int8_t int_fast8_t; + using ::uint8_t; + typedef uint8_t uint_least8_t; + typedef uint8_t uint_fast8_t; - using ::int64_t; - typedef int64_t int_least64_t; - typedef int64_t int_fast64_t; - using ::uint64_t; - typedef uint64_t uint_least64_t; - typedef uint64_t uint_fast64_t; + using ::int16_t; + typedef int16_t int_least16_t; + typedef int16_t int_fast16_t; + using ::uint16_t; + typedef uint16_t uint_least16_t; + typedef uint16_t uint_fast16_t; + + using ::int32_t; + typedef int32_t int_least32_t; + typedef int32_t int_fast32_t; + using ::uint32_t; + typedef uint32_t uint_least32_t; + typedef uint32_t uint_fast32_t; + +# ifndef BOOST_NO_INT64_T + + using ::int64_t; + typedef int64_t int_least64_t; + typedef int64_t int_fast64_t; + using ::uint64_t; + typedef uint64_t uint_least64_t; + typedef uint64_t uint_fast64_t; typedef int64_t intmax_t; typedef uint64_t uintmax_t; @@ -235,15 +238,15 @@ namespace boost typedef unsigned short uint_least16_t; typedef unsigned short uint_fast16_t; # endif -# elif (USHRT_MAX == 0xffffffff) && defined(__MTA__) - // On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified - // MTA / XMT does support the following non-standard integer types - typedef __short16 int16_t; - typedef __short16 int_least16_t; - typedef __short16 int_fast16_t; - typedef unsigned __short16 uint16_t; - typedef unsigned __short16 uint_least16_t; - typedef unsigned __short16 uint_fast16_t; +# elif (USHRT_MAX == 0xffffffff) && defined(__MTA__) + // On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified + // MTA / XMT does support the following non-standard integer types + typedef __short16 int16_t; + typedef __short16 int_least16_t; + typedef __short16 int_fast16_t; + typedef unsigned __short16 uint16_t; + typedef unsigned __short16 uint_least16_t; + typedef unsigned __short16 uint_fast16_t; # elif (USHRT_MAX == 0xffffffff) && defined(CRAY) // no 16-bit types on Cray: typedef short int_least16_t; @@ -277,14 +280,14 @@ namespace boost typedef unsigned long uint32_t; typedef unsigned long uint_least32_t; typedef unsigned long uint_fast32_t; -# elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__) - // Integers are 64 bits on the MTA / XMT - typedef __int32 int32_t; - typedef __int32 int_least32_t; - typedef __int32 int_fast32_t; - typedef unsigned __int32 uint32_t; - typedef unsigned __int32 uint_least32_t; - typedef unsigned __int32 uint_fast32_t; +# elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__) + // Integers are 64 bits on the MTA / XMT + typedef __int32 int32_t; + typedef __int32 int_least32_t; + typedef __int32 int_fast32_t; + typedef unsigned __int32 uint32_t; + typedef unsigned __int32 uint_least32_t; + typedef unsigned __int32 uint_fast32_t; # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif @@ -358,6 +361,40 @@ namespace boost #endif // BOOST_HAS_STDINT_H +// intptr_t/uintptr_t are defined separately because they are optional and not universally available +#if defined(BOOST_WINDOWS) && !defined(_WIN32_WCE) && !defined(BOOST_HAS_STDINT_H) +// Older MSVC don't have stdint.h and have intptr_t/uintptr_t defined in stddef.h +#include +#endif + +// PGI seems to not support intptr_t/uintptr_t properly. BOOST_HAS_STDINT_H is not defined for this compiler by Boost.Config. +#if !defined(__PGIC__) + +#if (defined(BOOST_WINDOWS) && !defined(_WIN32_WCE)) \ + || (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__) + +namespace boost { + using ::intptr_t; + using ::uintptr_t; +} +#define BOOST_HAS_INTPTR_T + +// Clang pretends to be GCC, so it'll match this condition +#elif defined(__GNUC__) && defined(__INTPTR_TYPE__) && defined(__UINTPTR_TYPE__) + +namespace boost { + typedef __INTPTR_TYPE__ intptr_t; + typedef __UINTPTR_TYPE__ uintptr_t; +} +#define BOOST_HAS_INTPTR_T + +#endif + +#endif // !defined(__PGIC__) + #endif // BOOST_CSTDINT_HPP @@ -376,15 +413,15 @@ INT#_C macros if they're not already defined (John Maddock). #if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \ (!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C)) // -// For the following code we get several warnings along the lines of: -// -// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant -// -// So we declare this a system header to suppress these warnings. +// For the following code we get several warnings along the lines of: // -#if defined(__GNUC__) && (__GNUC__ >= 4) -#pragma GCC system_header -#endif +// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant +// +// So we declare this a system header to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif #include # define BOOST__STDC_CONSTANT_MACROS_DEFINED diff --git a/boost/boost/detail/endian.hpp b/boost/boost/detail/endian.hpp index 98c870ca2f..3e37db93de 100644 --- a/boost/boost/detail/endian.hpp +++ b/boost/boost/detail/endian.hpp @@ -1,78 +1,11 @@ -// Copyright 2005 Caleb Epstein -// Copyright 2006 John Maddock -// Copyright 2010 Rene Rivera +// Copyright 2013 Redshift Software Inc // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -/* - * Copyright (c) 1997 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - */ - -/* - * Copyright notice reproduced from , from - * which this code was originally taken. - * - * Modified by Caleb Epstein to use with GNU libc and to - * defined the BOOST_ENDIAN macro. - */ - #ifndef BOOST_DETAIL_ENDIAN_HPP #define BOOST_DETAIL_ENDIAN_HPP -// GNU libc offers the helpful header which defines -// __BYTE_ORDER - -#if defined (__GLIBC__) -# include -# if (__BYTE_ORDER == __LITTLE_ENDIAN) -# define BOOST_LITTLE_ENDIAN -# elif (__BYTE_ORDER == __BIG_ENDIAN) -# define BOOST_BIG_ENDIAN -# elif (__BYTE_ORDER == __PDP_ENDIAN) -# define BOOST_PDP_ENDIAN -# else -# error Unknown machine endianness detected. -# endif -# define BOOST_BYTE_ORDER __BYTE_ORDER -#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || \ - defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) || \ - defined(_STLP_BIG_ENDIAN) && !defined(_STLP_LITTLE_ENDIAN) -# define BOOST_BIG_ENDIAN -# define BOOST_BYTE_ORDER 4321 -#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) || \ - defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) || \ - defined(_STLP_LITTLE_ENDIAN) && !defined(_STLP_BIG_ENDIAN) -# define BOOST_LITTLE_ENDIAN -# define BOOST_BYTE_ORDER 1234 -#elif defined(__sparc) || defined(__sparc__) \ - || defined(_POWER) || defined(__powerpc__) \ - || defined(__ppc__) || defined(__hpux) || defined(__hppa) \ - || defined(_MIPSEB) || defined(_POWER) \ - || defined(__s390__) -# define BOOST_BIG_ENDIAN -# define BOOST_BYTE_ORDER 4321 -#elif defined(__i386__) || defined(__alpha__) \ - || defined(__ia64) || defined(__ia64__) \ - || defined(_M_IX86) || defined(_M_IA64) \ - || defined(_M_ALPHA) || defined(__amd64) \ - || defined(__amd64__) || defined(_M_AMD64) \ - || defined(__x86_64) || defined(__x86_64__) \ - || defined(_M_X64) || defined(__bfin__) - -# define BOOST_LITTLE_ENDIAN -# define BOOST_BYTE_ORDER 1234 -#else -# error The file boost/detail/endian.hpp needs to be set up for your CPU type. -#endif - +// Use the Predef library for the detection of endianess. +#include #endif diff --git a/boost/boost/detail/interlocked.hpp b/boost/boost/detail/interlocked.hpp index 75e5a3061a..1152f710b1 100644 --- a/boost/boost/detail/interlocked.hpp +++ b/boost/boost/detail/interlocked.hpp @@ -1,12 +1,6 @@ #ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED #define BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - // // boost/detail/interlocked.hpp // @@ -19,6 +13,11 @@ #include +// MS compatible compilers support #pragma once +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + #if defined( BOOST_USE_WINDOWS_H ) # include @@ -31,6 +30,30 @@ # 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 @@ -71,7 +94,7 @@ extern "C" long __cdecl InterlockedExchangeAdd( long*, long ); #elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN ) -#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600 +#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1500 #include @@ -93,20 +116,11 @@ extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long ); #endif -# pragma intrinsic( _InterlockedIncrement ) -# pragma intrinsic( _InterlockedDecrement ) -# pragma intrinsic( _InterlockedCompareExchange ) -# pragma intrinsic( _InterlockedExchange ) -# pragma intrinsic( _InterlockedExchangeAdd ) - # if defined(_M_IA64) || defined(_M_AMD64) extern "C" void* __cdecl _InterlockedCompareExchangePointer( void* volatile *, void*, void* ); extern "C" void* __cdecl _InterlockedExchangePointer( void* volatile *, void* ); -# pragma intrinsic( _InterlockedCompareExchangePointer ) -# pragma intrinsic( _InterlockedExchangePointer ) - # define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer # define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer @@ -125,14 +139,30 @@ extern "C" void* __cdecl _InterlockedExchangePointer( void* volatile *, void* ); # 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__ ) -#if defined(__MINGW64__) -#define BOOST_INTERLOCKED_IMPORT -#else #define BOOST_INTERLOCKED_IMPORT __declspec(dllimport) -#endif - namespace boost { diff --git a/boost/boost/detail/is_function_ref_tester.hpp b/boost/boost/detail/is_function_ref_tester.hpp index 5f367ea818..8e7d1d77f4 100644 --- a/boost/boost/detail/is_function_ref_tester.hpp +++ b/boost/boost/detail/is_function_ref_tester.hpp @@ -112,7 +112,7 @@ boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T #else #define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, 25, "boost/type_traits/detail/is_function_ref_tester.hpp")) + (3, (0, 25, "boost/detail/is_function_ref_tester.hpp")) #include BOOST_PP_ITERATE() #endif // BOOST_TT_PREPROCESSING_MODE @@ -133,3 +133,4 @@ boost::type_traits::yes_type is_function_ref_tester(R (&)(BOOST_PP_ENUM_PARAMS(i #undef i #endif // BOOST_PP_IS_ITERATING + diff --git a/boost/boost/detail/limits.hpp b/boost/boost/detail/limits.hpp deleted file mode 100644 index 6f018dfaca..0000000000 --- a/boost/boost/detail/limits.hpp +++ /dev/null @@ -1,449 +0,0 @@ -// Copyright 2001 John Maddock -// Distributed under the Boost Software License, Version 1.0. (See accompany- -// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -/* - * Copyright (c) 1997 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - */ - -/* NOTE: This is not portable code. Parts of numeric_limits<> are - * inherently machine-dependent, and this file is written for the MIPS - * architecture and the SGI MIPSpro C++ compiler. Parts of it (in - * particular, some of the characteristics of floating-point types) - * are almost certainly incorrect for any other platform. - */ - -/* The above comment is almost certainly out of date. This file works - * on systems other than SGI MIPSpro C++ now. - */ - -/* - * Revision history: - * 21 Sep 2001: - * Only include if BOOST_NO_CWCHAR is defined. (Darin Adler) - * 10 Aug 2001: - * Added MIPS (big endian) to the big endian family. (Jens Maurer) - * 13 Apr 2001: - * Added powerpc to the big endian family. (Jeremy Siek) - * 5 Apr 2001: - * Added sparc (big endian) processor support (John Maddock). - * Initial sub: - * Modified by Jens Maurer for gcc 2.95 on x86. - */ - -#ifndef BOOST_SGI_CPP_LIMITS -#define BOOST_SGI_CPP_LIMITS - -#include -#include -#include -#include - -#ifndef BOOST_NO_CWCHAR -#include // for WCHAR_MIN and WCHAR_MAX -#endif - -namespace std { - -enum float_round_style { - round_indeterminate = -1, - round_toward_zero = 0, - round_to_nearest = 1, - round_toward_infinity = 2, - round_toward_neg_infinity = 3 -}; - -enum float_denorm_style { - denorm_indeterminate = -1, - denorm_absent = 0, - denorm_present = 1 -}; - -// The C++ standard (section 18.2.1) requires that some of the members of -// numeric_limits be static const data members that are given constant- -// initializers within the class declaration. On compilers where the -// BOOST_NO_INCLASS_MEMBER_INITIALIZATION macro is defined, it is impossible to write -// a standard-conforming numeric_limits class. -// -// There are two possible workarounds: either initialize the data -// members outside the class, or change them from data members to -// enums. Neither workaround is satisfactory: the former makes it -// impossible to use the data members in constant-expressions, and the -// latter means they have the wrong type and that it is impossible to -// take their addresses. We choose the former workaround. - -#ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION -# define BOOST_STL_DECLARE_LIMITS_MEMBER(__mem_type, __mem_name, __mem_value) \ - enum { __mem_name = __mem_value } -#else /* BOOST_NO_INCLASS_MEMBER_INITIALIZATION */ -# define BOOST_STL_DECLARE_LIMITS_MEMBER(__mem_type, __mem_name, __mem_value) \ - static const __mem_type __mem_name = __mem_value -#endif /* BOOST_NO_INCLASS_MEMBER_INITIALIZATION */ - -// Base class for all specializations of numeric_limits. -template -class _Numeric_limits_base { -public: - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_specialized, false); - - static __number min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return __number(); } - static __number max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return __number(); } - - BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits, 0); - BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits10, 0); - - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_signed, false); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_integer, false); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_exact, false); - - BOOST_STL_DECLARE_LIMITS_MEMBER(int, radix, 0); - - static __number epsilon() throw() { return __number(); } - static __number round_error() throw() { return __number(); } - - BOOST_STL_DECLARE_LIMITS_MEMBER(int, min_exponent, 0); - BOOST_STL_DECLARE_LIMITS_MEMBER(int, min_exponent10, 0); - BOOST_STL_DECLARE_LIMITS_MEMBER(int, max_exponent, 0); - BOOST_STL_DECLARE_LIMITS_MEMBER(int, max_exponent10, 0); - - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_infinity, false); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_quiet_NaN, false); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_signaling_NaN, false); - BOOST_STL_DECLARE_LIMITS_MEMBER(float_denorm_style, - has_denorm, - denorm_absent); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_denorm_loss, false); - - static __number infinity() throw() { return __number(); } - static __number quiet_NaN() throw() { return __number(); } - static __number signaling_NaN() throw() { return __number(); } - static __number denorm_min() throw() { return __number(); } - - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_iec559, false); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_bounded, false); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_modulo, false); - - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, traps, false); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, tinyness_before, false); - BOOST_STL_DECLARE_LIMITS_MEMBER(float_round_style, - round_style, - round_toward_zero); -}; - -// Base class for integers. - -template -class _Integer_limits : public _Numeric_limits_base<_Int> -{ -public: - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_specialized, true); - - static _Int min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return __imin; } - static _Int max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return __imax; } - - BOOST_STL_DECLARE_LIMITS_MEMBER(int, - digits, - (__idigits < 0) ? (int)(sizeof(_Int) * CHAR_BIT) - - (__imin == 0 ? 0 : 1) - : __idigits); - BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits10, (digits * 301) / 1000); - // log 2 = 0.301029995664... - - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_signed, __imin != 0); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_integer, true); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_exact, true); - BOOST_STL_DECLARE_LIMITS_MEMBER(int, radix, 2); - - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_bounded, true); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_modulo, true); -}; - -#if defined(BOOST_BIG_ENDIAN) - - template - struct float_helper{ - static Number get_word() throw() { - // sizeof(long double) == 16 - const unsigned int _S_word[4] = { Word, 0, 0, 0 }; - return *reinterpret_cast(&_S_word); - } -}; - -#else - - template - struct float_helper{ - static Number get_word() throw() { - // sizeof(long double) == 12, but only 10 bytes significant - const unsigned int _S_word[4] = { 0, 0, 0, Word }; - return *reinterpret_cast( - reinterpret_cast(&_S_word)+16- - (sizeof(Number) == 12 ? 10 : sizeof(Number))); - } -}; - -#endif - -// Base class for floating-point numbers. -template -class _Floating_limits : public _Numeric_limits_base<__number> -{ -public: - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_specialized, true); - - BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits, __Digits); - BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits10, __Digits10); - - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_signed, true); - - BOOST_STL_DECLARE_LIMITS_MEMBER(int, radix, 2); - - BOOST_STL_DECLARE_LIMITS_MEMBER(int, min_exponent, __MinExp); - BOOST_STL_DECLARE_LIMITS_MEMBER(int, max_exponent, __MaxExp); - BOOST_STL_DECLARE_LIMITS_MEMBER(int, min_exponent10, __MinExp10); - BOOST_STL_DECLARE_LIMITS_MEMBER(int, max_exponent10, __MaxExp10); - - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_infinity, true); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_quiet_NaN, true); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_signaling_NaN, true); - BOOST_STL_DECLARE_LIMITS_MEMBER(float_denorm_style, - has_denorm, - denorm_indeterminate); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_denorm_loss, false); - - - static __number infinity() throw() { - return float_helper<__number, __InfinityWord>::get_word(); - } - static __number quiet_NaN() throw() { - return float_helper<__number,__QNaNWord>::get_word(); - } - static __number signaling_NaN() throw() { - return float_helper<__number,__SNaNWord>::get_word(); - } - - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_iec559, __IsIEC559); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_bounded, true); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, traps, false /* was: true */ ); - BOOST_STL_DECLARE_LIMITS_MEMBER(bool, tinyness_before, false); - - BOOST_STL_DECLARE_LIMITS_MEMBER(float_round_style, round_style, __RoundStyle); -}; - -// Class numeric_limits - -// The unspecialized class. - -template -class numeric_limits : public _Numeric_limits_base {}; - -// Specializations for all built-in integral types. - -template<> -class numeric_limits - : public _Integer_limits -{}; - -template<> -class numeric_limits - : public _Integer_limits -{}; - -template<> -class numeric_limits - : public _Integer_limits -{}; - -template<> -class numeric_limits - : public _Integer_limits -{}; - -#ifndef BOOST_NO_INTRINSIC_WCHAR_T -template<> -class numeric_limits -#if !defined(WCHAR_MAX) || !defined(WCHAR_MIN) -#if defined(_WIN32) || defined(__CYGWIN__) - : public _Integer_limits -#elif defined(__hppa) -// wchar_t has "unsigned int" as the underlying type - : public _Integer_limits -#else -// assume that wchar_t has "int" as the underlying type - : public _Integer_limits -#endif -#else -// we have WCHAR_MIN and WCHAR_MAX defined, so use it - : public _Integer_limits -#endif -{}; -#endif - -template<> -class numeric_limits - : public _Integer_limits -{}; - -template<> -class numeric_limits - : public _Integer_limits -{}; - -template<> -class numeric_limits - : public _Integer_limits -{}; - -template<> -class numeric_limits - : public _Integer_limits -{}; - -template<> -class numeric_limits - : public _Integer_limits -{}; - -template<> -class numeric_limits - : public _Integer_limits -{}; - -#ifdef __GNUC__ - -// Some compilers have long long, but don't define the -// LONGLONG_MIN and LONGLONG_MAX macros in limits.h. This -// assumes that long long is 64 bits. -#if !defined(LONGLONG_MAX) && !defined(ULONGLONG_MAX) - -# define ULONGLONG_MAX 0xffffffffffffffffLLU -# define LONGLONG_MAX 0x7fffffffffffffffLL - -#endif - -#if !defined(LONGLONG_MIN) -# define LONGLONG_MIN (-LONGLONG_MAX - 1) -#endif - - -#if !defined(ULONGLONG_MIN) -# define ULONGLONG_MIN 0 -#endif - -#endif /* __GNUC__ */ - -// Specializations for all built-in floating-point type. - -template<> class numeric_limits - : public _Floating_limits -{ -public: - static float min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return FLT_MIN; } - static float denorm_min() throw() { return FLT_MIN; } - static float max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return FLT_MAX; } - static float epsilon() throw() { return FLT_EPSILON; } - static float round_error() throw() { return 0.5f; } // Units: ulps. -}; - -template<> class numeric_limits - : public _Floating_limits -{ -public: - static double min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return DBL_MIN; } - static double denorm_min() throw() { return DBL_MIN; } - static double max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return DBL_MAX; } - static double epsilon() throw() { return DBL_EPSILON; } - static double round_error() throw() { return 0.5; } // Units: ulps. -}; - -template<> class numeric_limits - : public _Floating_limits -{ -public: - static long double min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return LDBL_MIN; } - static long double denorm_min() throw() { return LDBL_MIN; } - static long double max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return LDBL_MAX; } - static long double epsilon() throw() { return LDBL_EPSILON; } - static long double round_error() throw() { return 4; } // Units: ulps. -}; - -} // namespace std - -#endif /* BOOST_SGI_CPP_LIMITS */ - -// Local Variables: -// mode:C++ -// End: - - - diff --git a/boost/boost/exception/exception.hpp b/boost/boost/exception/exception.hpp index 42d2787128..31d43178df 100644 --- a/boost/boost/exception/exception.hpp +++ b/boost/boost/exception/exception.hpp @@ -5,7 +5,7 @@ #ifndef UUID_274DA366004E11DCB1DDFE2E56D89593 #define UUID_274DA366004E11DCB1DDFE2E56D89593 -#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) diff --git a/boost/boost/functional/hash/detail/hash_float.hpp b/boost/boost/functional/hash/detail/hash_float.hpp index a98cd700f8..7c3de31ae3 100644 --- a/boost/boost/functional/hash/detail/hash_float.hpp +++ b/boost/boost/functional/hash/detail/hash_float.hpp @@ -90,15 +90,21 @@ namespace boost return seed; } + template + struct enable_binary_hash + { + BOOST_STATIC_CONSTANT(bool, value = + std::numeric_limits::is_iec559 && + std::numeric_limits::digits == digits && + std::numeric_limits::radix == 2 && + std::numeric_limits::max_exponent == max_exponent); + }; + template inline std::size_t float_hash_impl(Float v, BOOST_DEDUCED_TYPENAME boost::enable_if_c< - std::numeric_limits::is_iec559 && - std::numeric_limits::digits == 24 && - std::numeric_limits::radix == 2 && - std::numeric_limits::max_exponent == 128, - int>::type - ) + enable_binary_hash::value, + std::size_t>::type) { return hash_binary((char*) &v, 4); } @@ -107,12 +113,8 @@ namespace boost template inline std::size_t float_hash_impl(Float v, BOOST_DEDUCED_TYPENAME boost::enable_if_c< - std::numeric_limits::is_iec559 && - std::numeric_limits::digits == 53 && - std::numeric_limits::radix == 2 && - std::numeric_limits::max_exponent == 1024, - int>::type - ) + enable_binary_hash::value, + std::size_t>::type) { return hash_binary((char*) &v, 8); } @@ -120,12 +122,8 @@ namespace boost template inline std::size_t float_hash_impl(Float v, BOOST_DEDUCED_TYPENAME boost::enable_if_c< - std::numeric_limits::is_iec559 && - std::numeric_limits::digits == 64 && - std::numeric_limits::radix == 2 && - std::numeric_limits::max_exponent == 16384, - int>::type - ) + enable_binary_hash::value, + std::size_t>::type) { return hash_binary((char*) &v, 10); } @@ -133,12 +131,8 @@ namespace boost template inline std::size_t float_hash_impl(Float v, BOOST_DEDUCED_TYPENAME boost::enable_if_c< - std::numeric_limits::is_iec559 && - std::numeric_limits::digits == 113 && - std::numeric_limits::radix == 2 && - std::numeric_limits::max_exponent == 16384, - int>::type - ) + enable_binary_hash::value, + std::size_t>::type) { return hash_binary((char*) &v, 16); } diff --git a/boost/boost/functional/hash/hash.hpp b/boost/boost/functional/hash/hash.hpp index aa4e49f8ae..0adf9c9017 100644 --- a/boost/boost/functional/hash/hash.hpp +++ b/boost/boost/functional/hash/hash.hpp @@ -27,6 +27,13 @@ #include #endif +#if defined(BOOST_MSVC) +#pragma warning(push) +#pragma warning(disable:6295) // Ill-defined for-loop : 'unsigned int' values + // are always of range '0' to '4294967295'. + // Loop executes infinitely. +#endif + #if BOOST_WORKAROUND(__GNUC__, < 3) \ && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) #define BOOST_HASH_CHAR_TRAITS string_char_traits @@ -518,6 +525,10 @@ namespace boost #undef BOOST_HASH_CHAR_TRAITS +#if defined(BOOST_MSVC) +#pragma warning(pop) +#endif + #endif // BOOST_FUNCTIONAL_HASH_HASH_HPP // Include this outside of the include guards in case the file is included diff --git a/boost/boost/integer_traits.hpp b/boost/boost/integer_traits.hpp index ddd5609522..d896e46e5d 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 81851 2012-12-11 14:42:26Z marshall $ + * $Id: integer_traits.hpp 85813 2013-09-21 20:17:00Z jewillco $ * * Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers */ diff --git a/boost/boost/lexical_cast.hpp b/boost/boost/lexical_cast.hpp index 94dbaf970f..ed2291d85b 100644 --- a/boost/boost/lexical_cast.hpp +++ b/boost/boost/lexical_cast.hpp @@ -19,7 +19,7 @@ // 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 - 2012 +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2013 #include #if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING) @@ -168,6 +168,7 @@ namespace boost #include #include #include +#include #ifndef BOOST_NO_CWCHAR # include #endif @@ -310,6 +311,11 @@ namespace boost { > {}; #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 > @@ -602,6 +608,10 @@ namespace boost { 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 @@ -824,7 +834,7 @@ namespace boost { if(group < grouping_size) { char const grp_size = grouping[group]; - last_grp_size = grp_size <= 0 ? CHAR_MAX : grp_size; + last_grp_size = grp_size <= 0 ? static_cast(CHAR_MAX) : grp_size; } left = last_grp_size; @@ -864,15 +874,23 @@ namespace boost { { #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 - typedef typename Traits::int_type int_type; CharT const czero = lcast_char_constants::zero; --end; value = 0; if (begin > end || *end < czero || *end >= czero + 10) return false; - value = *end - czero; + value = static_cast(*end - czero); --end; T multiplier = 1; bool multiplier_overflowed = false; @@ -892,17 +910,17 @@ namespace boost { { unsigned char current_grouping = 0; CharT const thousands_sep = np.thousands_sep(); - char remained = grouping[current_grouping] - 1; + char remained = static_cast(grouping[current_grouping] - 1); bool shall_we_return = true; for(;end>=begin; --end) { if (remained) { - T const multiplier_10 = multiplier * 10; + T const multiplier_10 = static_cast(multiplier * 10); if (multiplier_10 / 10 != multiplier) multiplier_overflowed = true; - T const dig_value = *end - czero; - T const new_sub_value = multiplier_10 * dig_value; + 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 */ @@ -912,8 +930,8 @@ namespace boost { ) return false; - value += new_sub_value; - multiplier *= 10; + value = static_cast(value + new_sub_value); + multiplier = static_cast(multiplier * 10); --remained; } else { if ( !Traits::eq(*end, thousands_sep) ) //|| begin == end ) return false; @@ -946,11 +964,11 @@ namespace boost { { while ( begin <= end ) { - T const multiplier_10 = multiplier * 10; + T const multiplier_10 = static_cast(multiplier * 10); if (multiplier_10 / 10 != multiplier) multiplier_overflowed = true; - T const dig_value = *end - czero; - T const new_sub_value = multiplier_10 * dig_value; + 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 */ @@ -960,8 +978,8 @@ namespace boost { ) return false; - value += new_sub_value; - multiplier *= 10; + value = static_cast(value + new_sub_value); + multiplier = static_cast(multiplier * 10); --end; } } @@ -1142,6 +1160,12 @@ namespace boost { 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 { @@ -1152,15 +1176,19 @@ namespace boost { 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 }; @@ -1178,7 +1206,7 @@ namespace boost { : np.grouping() ); std::string::size_type const grouping_size = grouping.size(); - CharT const thousands_sep = grouping_size ? np.thousands_sep() : 0; + 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; @@ -1198,6 +1226,7 @@ namespace boost { 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; @@ -1376,32 +1405,110 @@ namespace boost { /* We need a more accurate algorithm... We can not use current algorithm * with long doubles (and with doubles if sizeof(double)==sizeof(long double)). */ - long double result = std::pow(10.0L, pow_of_10) * mantissa; + 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 // stl_buf_unlocker + namespace detail // parser_buf { - template< class BufferType, class CharT > - class stl_buf_unlocker: public BufferType{ + // + // 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: - typedef BufferType base_class; + parser_buf() : base_type() { setbuf(0, 0); } + const charT* getnext() { return this->gptr(); } #ifndef BOOST_NO_USING_TEMPLATE - using base_class::pptr; - using base_class::pbase; - using base_class::setg; - using base_class::setp; + using base_type::pptr; + using base_type::pbase; #else - CharT* pptr() const { return base_class::pptr(); } - CharT* pbase() const { return base_class::pbase(); } - void setg(CharT* gbeg, CharT* gnext, CharT* gend){ return base_class::setg(gbeg, gnext, gend); } - void setp(CharT* pbeg, CharT* pend) { return setp(pbeg, pend); } + 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&); }; } @@ -1422,13 +1529,12 @@ namespace boost { #if defined(BOOST_NO_STRINGSTREAM) typedef std::ostrstream out_stream_t; - typedef stl_buf_unlocker unlocked_but_t; #elif defined(BOOST_NO_STD_LOCALE) typedef std::ostringstream out_stream_t; - typedef stl_buf_unlocker unlocked_but_t; + typedef parser_buf buffer_t; #else - typedef std::basic_ostringstream out_stream_t; - typedef stl_buf_unlocker, CharT> unlocked_but_t; + typedef std::basic_ostringstream out_stream_t; + typedef parser_buf, CharT> buffer_t; #endif typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< RequiresStringbuffer, @@ -1442,7 +1548,7 @@ namespace boost { deduced_out_stream_t out_stream; public: - lexical_stream_limited_src(CharT* sta, CharT* fin) + lexical_stream_limited_src(CharT* sta, CharT* fin) BOOST_NOEXCEPT : start(sta) , finish(fin) {} @@ -1510,12 +1616,23 @@ namespace boost { // 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 unlocked_but_t* const p - = static_cast(out_stream.rdbuf()) ; + 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 @@ -1723,6 +1840,12 @@ namespace boost { 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) { @@ -1858,35 +1981,38 @@ namespace boost { template bool shr_using_base_class(InputStreamable& output) { -#if (defined _MSC_VER) -# pragma warning( push ) - // conditional expression is constant -# pragma warning( disable : 4127 ) -#endif - if(is_pointer::value) - return false; + 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) - // If you have compilation error at this point, than your STL library - // unsupports such conversions. Try updating it. - BOOST_STATIC_ASSERT((boost::is_same::value)); + 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); -#elif defined(BOOST_NO_STD_LOCALE) - std::istringstream stream; #else - std::basic_istringstream stream; -#endif - static_cast(stream.rdbuf()) - ->setg(start, start, finish); + 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)); -#if (defined _MSC_VER) -# pragma warning( pop ) -#endif + return stream >> output && stream.get() == #if defined(__GNUC__) && (__GNUC__<3) && defined(BOOST_NO_STD_WSTRING) @@ -1898,6 +2024,12 @@ namespace boost { #else Traits::eof(); #endif + +#ifndef BOOST_NO_EXCEPTIONS + } catch (const ::std::ios_base::failure& /*f*/) { + return false; + } +#endif } template @@ -1916,7 +2048,7 @@ namespace boost { } /************************************ OPERATORS >> ( ... ) ********************************/ - public: + 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); } @@ -1930,6 +2062,12 @@ namespace boost { 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); } @@ -2085,10 +2223,10 @@ namespace boost { * double, because it will give a big precision loss. * */ boost::mpl::if_c< -#if defined(BOOST_HAS_LONG_LONG) || defined(BOOST_HAS_MS_INT64) +#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 - 0 + 1, #endif int, char @@ -2324,7 +2462,7 @@ namespace boost { > converter_t; return ( - arg < 0 ? 0u - converter_t::convert(0u - arg) : converter_t::convert(arg) + arg < 0 ? static_cast(0u - converter_t::convert(0u - arg)) : converter_t::convert(arg) ); } }; @@ -2405,17 +2543,59 @@ namespace boost { return caster_type::lexical_cast_impl(arg); } - template - inline Target lexical_cast(const CharType* chars, std::size_t count) - { - BOOST_STATIC_ASSERT_MSG(boost::detail::is_char_or_wchar::value, - "CharType must be a character or wide character type"); - - return boost::lexical_cast( - boost::iterator_range(chars, chars + count) + 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( + ::boost::iterator_range(chars, chars + count) + ); + } + + template + inline Target lexical_cast(const signed char* chars, std::size_t count) + { + return ::boost::lexical_cast( + ::boost::iterator_range(chars, chars + count) + ); + } + +#ifndef BOOST_LCAST_NO_WCHAR_T + template + inline Target lexical_cast(const wchar_t* chars, std::size_t count) + { + return ::boost::lexical_cast( + ::boost::iterator_range(chars, chars + count) + ); + } +#endif +#ifndef BOOST_NO_CXX11_CHAR16_T + template + inline Target lexical_cast(const char16_t* chars, std::size_t count) + { + return ::boost::lexical_cast( + ::boost::iterator_range(chars, chars + count) + ); + } +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T + template + inline Target lexical_cast(const char32_t* chars, std::size_t count) + { + return ::boost::lexical_cast( + ::boost::iterator_range(chars, chars + count) + ); + } +#endif + } // namespace boost #else // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION @@ -2555,7 +2735,7 @@ namespace boost { // Copyright Kevlin Henney, 2000-2005. // Copyright Alexander Nasonov, 2006-2010. -// Copyright Antony Polukhin, 2011-2012. +// Copyright Antony Polukhin, 2011-2013. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at diff --git a/boost/boost/limits.hpp b/boost/boost/limits.hpp index d3747a1ad1..47d8155611 100644 --- a/boost/boost/limits.hpp +++ b/boost/boost/limits.hpp @@ -14,7 +14,7 @@ #include #ifdef BOOST_NO_LIMITS -# include +# error "There is no std::numeric_limits suppport available." #else # include #endif diff --git a/boost/boost/math/policies/policy.hpp b/boost/boost/math/policies/policy.hpp index 01fe3d0ae0..24334c7d04 100644 --- a/boost/boost/math/policies/policy.hpp +++ b/boost/boost/math/policies/policy.hpp @@ -813,6 +813,16 @@ struct precision #endif +#ifdef BOOST_MATH_USE_FLOAT128 + +template +struct precision<__float128, Policy> +{ + typedef mpl::int_<113> type; +}; + +#endif + namespace detail{ template diff --git a/boost/boost/math/special_functions/detail/round_fwd.hpp b/boost/boost/math/special_functions/detail/round_fwd.hpp index 952259ae93..8c45a7d75a 100644 --- a/boost/boost/math/special_functions/detail/round_fwd.hpp +++ b/boost/boost/math/special_functions/detail/round_fwd.hpp @@ -9,6 +9,7 @@ #define BOOST_MATH_SPECIAL_ROUND_FWD_HPP #include +#include #ifdef _MSC_VER #pragma once @@ -20,9 +21,9 @@ namespace boost { template - T trunc(const T& v, const Policy& pol); + typename tools::promote_args::type trunc(const T& v, const Policy& pol); template - T trunc(const T& v); + typename tools::promote_args::type trunc(const T& v); template int itrunc(const T& v, const Policy& pol); template @@ -38,9 +39,9 @@ namespace boost boost::long_long_type lltrunc(const T& v); #endif template - T round(const T& v, const Policy& pol); + typename tools::promote_args::type round(const T& v, const Policy& pol); template - T round(const T& v); + typename tools::promote_args::type round(const T& v); template int iround(const T& v, const Policy& pol); template @@ -76,5 +77,17 @@ namespace boost } } + +#undef BOOST_MATH_STD_USING +#define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE\ + using boost::math::round;\ + using boost::math::iround;\ + using boost::math::lround;\ + using boost::math::trunc;\ + using boost::math::itrunc;\ + using boost::math::ltrunc;\ + using boost::math::modf; + + #endif // BOOST_MATH_SPECIAL_ROUND_FWD_HPP diff --git a/boost/boost/math/special_functions/fpclassify.hpp b/boost/boost/math/special_functions/fpclassify.hpp index a71ae36c8c..75f57b03b8 100644 --- a/boost/boost/math/special_functions/fpclassify.hpp +++ b/boost/boost/math/special_functions/fpclassify.hpp @@ -37,13 +37,13 @@ the template is never instantiated. a floating point type (float, double or long double) can be determined at compile time, then the following algorithm is used: - If all exponent bits, the flag bit (if there is one), + If all exponent bits, the flag bit (if there is one), and all significand bits are 0, then the number is zero. - If all exponent bits and the flag bit (if there is one) are 0, + If all exponent bits and the flag bit (if there is one) are 0, and at least one significand bit is 1, then the number is subnormal. - If all exponent bits are 1 and all significand bits are 0, + If all exponent bits are 1 and all significand bits are 0, then the number is infinity. If all exponent bits are 1 and at least one significand bit is 1, @@ -56,7 +56,7 @@ at compile time, then the following algorithm is used: Most formats have the structure sign bit + exponent bits + significand bits. - + A few have the structure sign bit + exponent bits + flag bit + significand bits. The flag bit is 0 for zero and subnormal numbers, @@ -85,7 +85,7 @@ is used. namespace std{ using ::abs; using ::fabs; } #endif -namespace boost{ +namespace boost{ // // This must not be located in any namespace under boost::math @@ -94,18 +94,28 @@ namespace boost{ // namespace math_detail{ +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4800) +#endif + template inline bool is_nan_helper(T t, const boost::true_type&) { #ifdef isnan return isnan(t); #elif defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY) || !defined(BOOST_HAS_FPCLASSIFY) + (void)t; return false; #else // BOOST_HAS_FPCLASSIFY return (BOOST_FPCLASSIFY_PREFIX fpclassify(t) == (int)FP_NAN); #endif } +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + template inline bool is_nan_helper(T, const boost::false_type&) { @@ -169,7 +179,7 @@ inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag&) if(std::numeric_limits::is_specialized) return fpclassify_imp(t, generic_tag()); #endif - // + // // An unknown type with no numeric_limits support, // so what are we supposed to do we do here? // @@ -178,7 +188,7 @@ inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag&) return t == 0 ? FP_ZERO : FP_NORMAL; } -template +template int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_all_bits_tag) { typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; @@ -207,7 +217,7 @@ int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_all_bits_tag) return FP_NAN; } -template +template int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag) { typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; @@ -215,7 +225,7 @@ int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag) BOOST_MATH_INSTRUMENT_VARIABLE(x); BOOST_DEDUCED_TYPENAME traits::bits a; - traits::get_bits(x,a); + traits::get_bits(x,a); a &= traits::exponent | traits::flag | traits::significand; if(a <= traits::significand) { @@ -248,7 +258,7 @@ inline int fpclassify BOOST_NO_MACRO_EXPAND(T t) { typedef typename detail::fp_traits::type traits; typedef typename traits::method method; - typedef typename tools::promote_args::type value_type; + typedef typename tools::promote_args_permissive::type value_type; #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS if(std::numeric_limits::is_specialized && detail::is_generic_tag_false(static_cast(0))) return detail::fpclassify_imp(static_cast(t), detail::generic_tag()); @@ -278,21 +288,21 @@ inline int fpclassify BOOST_NO_MACRO_EXPAND(long double t) namespace detail { #ifdef BOOST_MATH_USE_STD_FPCLASSIFY - template + template inline bool isfinite_impl(T x, native_tag const&) { return (std::isfinite)(x); } #endif - template + template inline bool isfinite_impl(T x, generic_tag const&) { return x >= -(std::numeric_limits::max)() && x <= (std::numeric_limits::max)(); } - template + template inline bool isfinite_impl(T x, generic_tag const&) { #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS @@ -303,7 +313,7 @@ namespace detail { return true; } - template + template inline bool isfinite_impl(T x, ieee_tag const&) { typedef BOOST_DEDUCED_TYPENAME detail::fp_traits::type traits; @@ -322,18 +332,18 @@ inline bool isfinite_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag& } -template +template inline bool (isfinite)(T x) { //!< \brief return true if floating-point type t is finite. typedef typename detail::fp_traits::type traits; typedef typename traits::method method; - typedef typename boost::is_floating_point::type fp_tag; - typedef typename tools::promote_args::type value_type; + // typedef typename boost::is_floating_point::type fp_tag; + typedef typename tools::promote_args_permissive::type value_type; return detail::isfinite_impl(static_cast(x), method()); } #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -template<> +template<> inline bool (isfinite)(long double x) { //!< \brief return true if floating-point type t is finite. typedef detail::fp_traits::type traits; @@ -349,14 +359,14 @@ inline bool (isfinite)(long double x) namespace detail { #ifdef BOOST_MATH_USE_STD_FPCLASSIFY - template + template inline bool isnormal_impl(T x, native_tag const&) { return (std::isnormal)(x); } #endif - template + template inline bool isnormal_impl(T x, generic_tag const&) { if(x < 0) x = -x; @@ -364,7 +374,7 @@ namespace detail { && x <= (std::numeric_limits::max)(); } - template + template inline bool isnormal_impl(T x, generic_tag const&) { #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS @@ -374,7 +384,7 @@ namespace detail { return !(x == 0); } - template + template inline bool isnormal_impl(T x, ieee_tag const&) { typedef BOOST_DEDUCED_TYPENAME detail::fp_traits::type traits; @@ -393,18 +403,18 @@ inline bool isnormal_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag& } -template +template inline bool (isnormal)(T x) { typedef typename detail::fp_traits::type traits; typedef typename traits::method method; - typedef typename boost::is_floating_point::type fp_tag; - typedef typename tools::promote_args::type value_type; + //typedef typename boost::is_floating_point::type fp_tag; + typedef typename tools::promote_args_permissive::type value_type; return detail::isnormal_impl(static_cast(x), method()); } #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -template<> +template<> inline bool (isnormal)(long double x) { typedef detail::fp_traits::type traits; @@ -420,23 +430,23 @@ inline bool (isnormal)(long double x) namespace detail { #ifdef BOOST_MATH_USE_STD_FPCLASSIFY - template + template inline bool isinf_impl(T x, native_tag const&) { return (std::isinf)(x); } #endif - template + template inline bool isinf_impl(T x, generic_tag const&) { (void)x; // in case the compiler thinks that x is unused because std::numeric_limits::has_infinity is false - return std::numeric_limits::has_infinity + return std::numeric_limits::has_infinity && ( x == std::numeric_limits::infinity() || x == -std::numeric_limits::infinity()); } - template + template inline bool isinf_impl(T x, generic_tag const&) { #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS @@ -447,7 +457,7 @@ namespace detail { return false; } - template + template inline bool isinf_impl(T x, ieee_copy_all_bits_tag const&) { typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; @@ -458,7 +468,7 @@ namespace detail { return a == traits::exponent; } - template + template inline bool isinf_impl(T x, ieee_copy_leading_bits_tag const&) { typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; @@ -482,18 +492,18 @@ inline bool isinf_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) } // namespace detail -template +template inline bool (isinf)(T x) { typedef typename detail::fp_traits::type traits; typedef typename traits::method method; - typedef typename boost::is_floating_point::type fp_tag; - typedef typename tools::promote_args::type value_type; + // typedef typename boost::is_floating_point::type fp_tag; + typedef typename tools::promote_args_permissive::type value_type; return detail::isinf_impl(static_cast(x), method()); } #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS -template<> +template<> inline bool (isinf)(long double x) { typedef detail::fp_traits::type traits; @@ -509,14 +519,14 @@ inline bool (isinf)(long double x) namespace detail { #ifdef BOOST_MATH_USE_STD_FPCLASSIFY - template + template inline bool isnan_impl(T x, native_tag const&) { return (std::isnan)(x); } #endif - template + template inline bool isnan_impl(T x, generic_tag const&) { return std::numeric_limits::has_infinity @@ -524,7 +534,7 @@ namespace detail { : x != x; } - template + template inline bool isnan_impl(T x, generic_tag const&) { #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS @@ -535,7 +545,7 @@ namespace detail { return false; } - template + template inline bool isnan_impl(T x, ieee_copy_all_bits_tag const&) { typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; @@ -546,7 +556,7 @@ namespace detail { return a > traits::exponent; } - template + template inline bool isnan_impl(T x, ieee_copy_leading_bits_tag const&) { typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; @@ -565,12 +575,12 @@ namespace detail { } // namespace detail -template +template inline bool (isnan)(T x) { //!< \brief return true if floating-point type t is NaN (Not A Number). typedef typename detail::fp_traits::type traits; typedef typename traits::method method; - typedef typename boost::is_floating_point::type fp_tag; + // typedef typename boost::is_floating_point::type fp_tag; return detail::isnan_impl(x, method()); } @@ -579,7 +589,7 @@ template <> inline bool isnan BOOST_NO_MACRO_EXPAND(float t){ return ::bo template <> inline bool isnan BOOST_NO_MACRO_EXPAND(double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); } template <> inline bool isnan BOOST_NO_MACRO_EXPAND(long double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); } #elif defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) -template<> +template<> 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; diff --git a/boost/boost/math/special_functions/math_fwd.hpp b/boost/boost/math/special_functions/math_fwd.hpp index 6669e3fe39..9de38ec086 100644 --- a/boost/boost/math/special_functions/math_fwd.hpp +++ b/boost/boost/math/special_functions/math_fwd.hpp @@ -14,7 +14,7 @@ // IT = Integer type. // RT = Real type (built-in floating-point types, float, double, long double) & User Defined Types -// AT = Integer or Real type +// AT = Integer or Real type #ifndef BOOST_MATH_SPECIAL_MATH_FWD_HPP #define BOOST_MATH_SPECIAL_MATH_FWD_HPP @@ -38,111 +38,111 @@ namespace boost // Beta functions. template - typename tools::promote_args::type + typename tools::promote_args::type beta(RT1 a, RT2 b); // Beta function (2 arguments). template - typename tools::promote_args::type + typename tools::promote_args::type beta(RT1 a, RT2 b, A x); // Beta function (3 arguments). template - typename tools::promote_args::type + typename tools::promote_args::type beta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Beta function (3 arguments). template - typename tools::promote_args::type + typename tools::promote_args::type betac(RT1 a, RT2 b, RT3 x); template - typename tools::promote_args::type + typename tools::promote_args::type betac(RT1 a, RT2 b, RT3 x, const Policy& pol); template - typename tools::promote_args::type + typename tools::promote_args::type ibeta(RT1 a, RT2 b, RT3 x); // Incomplete beta function. template - typename tools::promote_args::type + typename tools::promote_args::type ibeta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta function. template - typename tools::promote_args::type + typename tools::promote_args::type ibetac(RT1 a, RT2 b, RT3 x); // Incomplete beta complement function. template - typename tools::promote_args::type + typename tools::promote_args::type ibetac(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta complement function. template - typename tools::promote_args::type + typename tools::promote_args::type ibeta_inv(T1 a, T2 b, T3 p, T4* py); template - typename tools::promote_args::type + typename tools::promote_args::type ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol); template - typename tools::promote_args::type + typename tools::promote_args::type ibeta_inv(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function. template - typename tools::promote_args::type + typename tools::promote_args::type ibeta_inv(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function. template - typename tools::promote_args::type + typename tools::promote_args::type ibeta_inva(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function. template - typename tools::promote_args::type + typename tools::promote_args::type ibeta_inva(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function. template - typename tools::promote_args::type + typename tools::promote_args::type ibeta_invb(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function. template - typename tools::promote_args::type + typename tools::promote_args::type ibeta_invb(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function. template - typename tools::promote_args::type + typename tools::promote_args::type ibetac_inv(T1 a, T2 b, T3 q, T4* py); template - typename tools::promote_args::type + typename tools::promote_args::type ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol); template - typename tools::promote_args::type + typename tools::promote_args::type ibetac_inv(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function. template - typename tools::promote_args::type + typename tools::promote_args::type ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function. template - typename tools::promote_args::type + typename tools::promote_args::type ibetac_inva(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function. template - typename tools::promote_args::type + typename tools::promote_args::type ibetac_inva(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function. template - typename tools::promote_args::type + typename tools::promote_args::type ibetac_invb(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function. template - typename tools::promote_args::type + typename tools::promote_args::type ibetac_invb(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function. template - typename tools::promote_args::type + typename tools::promote_args::type ibeta_derivative(RT1 a, RT2 b, RT3 x); // derivative of incomplete beta template - typename tools::promote_args::type + typename tools::promote_args::type ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol); // derivative of incomplete beta // erf & erfc error functions. @@ -168,51 +168,51 @@ namespace boost // Polynomials: template - typename tools::promote_args::type + typename tools::promote_args::type legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1); template - typename tools::promote_args::type + typename tools::promote_args::type legendre_p(int l, T x); template - typename tools::promote_args::type + typename tools::promote_args::type legendre_p(int l, T x, const Policy& pol); template - typename tools::promote_args::type + typename tools::promote_args::type legendre_q(unsigned l, T x); template - typename tools::promote_args::type + typename tools::promote_args::type legendre_q(unsigned l, T x, const Policy& pol); template - typename tools::promote_args::type + typename tools::promote_args::type legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1); template - typename tools::promote_args::type + typename tools::promote_args::type legendre_p(int l, int m, T x); template - typename tools::promote_args::type + typename tools::promote_args::type legendre_p(int l, int m, T x, const Policy& pol); template - typename tools::promote_args::type + typename tools::promote_args::type laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1); template - typename tools::promote_args::type + typename tools::promote_args::type laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1); template - typename tools::promote_args::type + typename tools::promote_args::type laguerre(unsigned n, T x); template - typename tools::promote_args::type + typename tools::promote_args::type laguerre(unsigned n, unsigned m, T x, const Policy& pol); template @@ -226,76 +226,76 @@ namespace boost }; template - typename laguerre_result::type + typename laguerre_result::type laguerre(unsigned n, T1 m, T2 x); template - typename tools::promote_args::type + typename tools::promote_args::type hermite(unsigned n, T x); template - typename tools::promote_args::type + typename tools::promote_args::type hermite(unsigned n, T x, const Policy& pol); template - typename tools::promote_args::type + typename tools::promote_args::type hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1); template - std::complex::type> + std::complex::type> spherical_harmonic(unsigned n, int m, T1 theta, T2 phi); template - std::complex::type> + std::complex::type> spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); template - typename tools::promote_args::type + typename tools::promote_args::type spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi); template - typename tools::promote_args::type + typename tools::promote_args::type spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); template - typename tools::promote_args::type + typename tools::promote_args::type spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi); template - typename tools::promote_args::type + typename tools::promote_args::type spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); // Elliptic integrals: template - typename tools::promote_args::type + typename tools::promote_args::type ellint_rf(T1 x, T2 y, T3 z); template - typename tools::promote_args::type + typename tools::promote_args::type ellint_rf(T1 x, T2 y, T3 z, const Policy& pol); template - typename tools::promote_args::type + typename tools::promote_args::type ellint_rd(T1 x, T2 y, T3 z); template - typename tools::promote_args::type + typename tools::promote_args::type ellint_rd(T1 x, T2 y, T3 z, const Policy& pol); template - typename tools::promote_args::type + typename tools::promote_args::type ellint_rc(T1 x, T2 y); template - typename tools::promote_args::type + typename tools::promote_args::type ellint_rc(T1 x, T2 y, const Policy& pol); template - typename tools::promote_args::type + typename tools::promote_args::type ellint_rj(T1 x, T2 y, T3 z, T4 p); template - typename tools::promote_args::type + typename tools::promote_args::type ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol); template @@ -349,7 +349,7 @@ namespace boost template RT factorial(unsigned int, const Policy& pol); template - RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT)); + RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT)); template RT double_factorial(unsigned i); template @@ -465,11 +465,11 @@ namespace boost // Hypotenuse function sqrt(x ^ 2 + y ^ 2). template - typename tools::promote_args::type + typename tools::promote_args::type hypot(T1 x, T2 y); template - typename tools::promote_args::type + typename tools::promote_args::type hypot(T1 x, T2 y, const Policy&); // cbrt - cube root. @@ -502,11 +502,11 @@ namespace boost // Power - 1 template - typename tools::promote_args::type + typename tools::promote_args::type powm1(const T1 a, const T2 z); template - typename tools::promote_args::type + typename tools::promote_args::type powm1(const T1 a, const T2 z, const Policy&); // sqrt(1+x) - 1 @@ -614,12 +614,50 @@ namespace boost template typename detail::bessel_traits >::result_type sph_neumann(unsigned v, T x); - template - std::complex::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol); + template + typename detail::bessel_traits::result_type cyl_bessel_j_zero(T v, int m, const Policy& pol); + + template + typename detail::bessel_traits >::result_type cyl_bessel_j_zero(T v, int m); + + template + OutputIterator cyl_bessel_j_zero(T v, + int start_index, + unsigned number_of_zeros, + OutputIterator out_it); + + template + OutputIterator cyl_bessel_j_zero(T v, + int start_index, + unsigned number_of_zeros, + OutputIterator out_it, + const Policy&); + + template + typename detail::bessel_traits::result_type cyl_neumann_zero(T v, int m, const Policy& pol); + + template + typename detail::bessel_traits >::result_type cyl_neumann_zero(T v, int m); + + template + OutputIterator cyl_neumann_zero(T v, + int start_index, + unsigned number_of_zeros, + OutputIterator out_it); + + template + OutputIterator cyl_neumann_zero(T v, + int start_index, + unsigned number_of_zeros, + OutputIterator out_it, + const Policy&); template std::complex >::result_type> cyl_hankel_1(T1 v, T2 x); + template + std::complex::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol); + template std::complex::result_type> cyl_hankel_2(T1 v, T2 x, const Policy& pol); @@ -662,6 +700,40 @@ namespace boost template typename tools::promote_args::type airy_bi_prime(T x); + template + T airy_ai_zero(unsigned m); + template + T airy_ai_zero(unsigned m, const Policy&); + + template + OutputIterator airy_ai_zero( + unsigned start_index, + unsigned number_of_zeros, + OutputIterator out_it); + template + OutputIterator airy_ai_zero( + unsigned start_index, + unsigned number_of_zeros, + OutputIterator out_it, + const Policy&); + + template + T airy_bi_zero(unsigned m); + template + T airy_bi_zero(unsigned m, const Policy&); + + template + OutputIterator airy_bi_zero( + unsigned start_index, + unsigned number_of_zeros, + OutputIterator out_it); + template + OutputIterator airy_bi_zero( + unsigned start_index, + unsigned number_of_zeros, + OutputIterator out_it, + const Policy&); + template typename tools::promote_args::type sin_pi(T x, const Policy&); @@ -689,17 +761,17 @@ namespace boost template bool isnormal BOOST_NO_MACRO_EXPAND(T t); - template + template int signbit BOOST_NO_MACRO_EXPAND(T x); template int sign BOOST_NO_MACRO_EXPAND(const T& z); - template - T copysign BOOST_NO_MACRO_EXPAND(const T& x, const T& y); + template + typename tools::promote_args_permissive::type copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y); template - T changesign BOOST_NO_MACRO_EXPAND(const T& z); + typename tools::promote_args_permissive::type changesign BOOST_NO_MACRO_EXPAND(const T& z); // Exponential integrals: namespace detail{ @@ -737,11 +809,11 @@ namespace boost typename tools::promote_args::type owens_t(T1 h, T2 a); // Jacobi Functions: - template - typename tools::promote_args::type jacobi_elliptic(T k, T theta, T* pcn, T* pdn, const Policy&); + template + typename tools::promote_args::type jacobi_elliptic(T k, U theta, V* pcn, V* pdn, const Policy&); - template - typename tools::promote_args::type jacobi_elliptic(T k, T theta, T* pcn = 0, T* pdn = 0); + template + typename tools::promote_args::type jacobi_elliptic(T k, U theta, V* pcn = 0, V* pdn = 0); template typename tools::promote_args::type jacobi_sn(U k, T theta, const Policy& pol); @@ -827,22 +899,26 @@ namespace boost typename tools::promote_args::type pow(T base); // next: + template + typename tools::promote_args::type nextafter(const T&, const U&, const Policy&); + template + typename tools::promote_args::type nextafter(const T&, const U&); template - T nextafter(const T&, const T&, const Policy&); + typename tools::promote_args::type float_next(const T&, const Policy&); template - T nextafter(const T&, const T&); + typename tools::promote_args::type float_next(const T&); template - T float_next(const T&, const Policy&); + typename tools::promote_args::type float_prior(const T&, const Policy&); template - T float_next(const T&); + typename tools::promote_args::type float_prior(const T&); + template + typename tools::promote_args::type float_distance(const T&, const U&, const Policy&); + template + typename tools::promote_args::type float_distance(const T&, const U&); template - T float_prior(const T&, const Policy&); + typename tools::promote_args::type float_advance(T val, int distance, const Policy& pol); template - T float_prior(const T&); - template - T float_distance(const T&, const T&, const Policy&); - template - T float_distance(const T&, const T&); + typename tools::promote_args::type float_advance(const T& val, int distance); } // namespace math } // namespace boost @@ -1137,6 +1213,28 @@ namespace boost 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 cyl_bessel_j_zero(T v, int m)\ + { return boost::math::cyl_bessel_j_zero(v, m, Policy()); }\ +\ +template \ + inline void cyl_bessel_j_zero(T v,\ + int start_index,\ + unsigned number_of_zeros,\ + OutputIterator out_it)\ + { boost::math::cyl_bessel_j_zero(v, start_index, number_of_zeros, out_it, Policy()); }\ +\ + template \ + inline typename boost::math::detail::bessel_traits::result_type cyl_neumann_zero(T v, int m)\ + { return boost::math::cyl_neumann_zero(v, m, Policy()); }\ +\ +template \ + inline void cyl_neumann_zero(T v,\ + int start_index,\ + unsigned number_of_zeros,\ + OutputIterator out_it)\ + { boost::math::cyl_neumann_zero(v, start_index, number_of_zeros, out_it, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type sin_pi(T x){ return boost::math::sin_pi(x); }\ @@ -1286,6 +1384,20 @@ namespace boost inline typename boost::math::tools::promote_args::type airy_bi_prime(T x)\ { return boost::math::airy_bi_prime(x, Policy()); }\ \ + template \ + inline T airy_ai_zero(int m)\ + { return boost::math::airy_ai_zero(m, Policy()); }\ + template \ + OutputIterator airy_ai_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\ + { return boost::math::airy_ai_zero(start_index, number_of_zeros, out_it, Policy()); }\ + \ + template \ + inline T airy_bi_zero(int m)\ + { return boost::math::airy_bi_zero(m, Policy()); }\ + 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()); }\ + \ diff --git a/boost/boost/math/special_functions/sign.hpp b/boost/boost/math/special_functions/sign.hpp index 6de88b29a2..75fb01292a 100644 --- a/boost/boost/math/special_functions/sign.hpp +++ b/boost/boost/math/special_functions/sign.hpp @@ -110,8 +110,9 @@ template int (signbit)(T x) { typedef typename detail::fp_traits::type traits; typedef typename traits::method method; - typedef typename boost::is_floating_point::type fp_tag; - return detail::signbit_impl(x, method()); + // typedef typename boost::is_floating_point::type fp_tag; + typedef typename tools::promote_args_permissive::type result_type; + return detail::signbit_impl(static_cast(x), method()); } template @@ -120,20 +121,24 @@ inline int sign BOOST_NO_MACRO_EXPAND(const T& z) return (z == 0) ? 0 : (boost::math::signbit)(z) ? -1 : 1; } -template T (changesign)(const T& x) +template typename tools::promote_args_permissive::type (changesign)(const T& x) { //!< \brief return unchanged binary pattern of x, except for change of sign bit. typedef typename detail::fp_traits::sign_change_type traits; typedef typename traits::method method; - typedef typename boost::is_floating_point::type fp_tag; + // typedef typename boost::is_floating_point::type fp_tag; + typedef typename tools::promote_args_permissive::type result_type; - return detail::changesign_impl(x, method()); + return detail::changesign_impl(static_cast(x), method()); } -template -inline T copysign BOOST_NO_MACRO_EXPAND(const T& x, const T& y) +template +inline typename tools::promote_args_permissive::type + copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y) { BOOST_MATH_STD_USING - return (boost::math::signbit)(x) != (boost::math::signbit)(y) ? (boost::math::changesign)(x) : x; + typedef typename tools::promote_args_permissive::type result_type; + return (boost::math::signbit)(static_cast(x)) != (boost::math::signbit)(static_cast(y)) + ? (boost::math::changesign)(static_cast(x)) : static_cast(x); } } // namespace math diff --git a/boost/boost/math/tools/config.hpp b/boost/boost/math/tools/config.hpp index 70213b290d..6dfb629b58 100644 --- a/boost/boost/math/tools/config.hpp +++ b/boost/boost/math/tools/config.hpp @@ -22,7 +22,6 @@ #endif #include -#include #if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \ || (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \ @@ -208,6 +207,22 @@ #ifndef BOOST_MATH_INT_VALUE_SUFFIX # define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF #endif +// +// Test whether to support __float128: +// +#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__) +// +// Only enable this when the compiler really is GCC as clang and probably +// intel too don't support __float128 yet :-( +// +# define BOOST_MATH_USE_FLOAT128 +#endif +// +// Check for WinCE with no iostream support: +// +#if defined(_WIN32_WCE) && !defined(__SGI_STL_PORT) +# define BOOST_MATH_NO_LEXICAL_CAST +#endif // // Helper macro for controlling the FP behaviour: @@ -218,7 +233,7 @@ // // Helper macro for using statements: // -#define BOOST_MATH_STD_USING \ +#define BOOST_MATH_STD_USING_CORE \ using std::abs;\ using std::acos;\ using std::cos;\ @@ -241,15 +256,9 @@ using std::ceil;\ using std::floor;\ using std::log10;\ - using std::sqrt;\ - using boost::math::round;\ - using boost::math::iround;\ - using boost::math::lround;\ - using boost::math::trunc;\ - using boost::math::itrunc;\ - using boost::math::ltrunc;\ - using boost::math::modf; + using std::sqrt; +#define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE namespace boost{ namespace math{ namespace tools @@ -319,12 +328,20 @@ namespace boost{ namespace math{ #endif #ifdef BOOST_MATH_INSTRUMENT -#define BOOST_MATH_INSTRUMENT_CODE(x) \ - std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl; -#define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name) + +# include +# include +# include + +# define BOOST_MATH_INSTRUMENT_CODE(x) \ + std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl; +# define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name) + #else -#define BOOST_MATH_INSTRUMENT_CODE(x) -#define BOOST_MATH_INSTRUMENT_VARIABLE(name) + +# define BOOST_MATH_INSTRUMENT_CODE(x) +# define BOOST_MATH_INSTRUMENT_VARIABLE(name) + #endif #endif // BOOST_MATH_TOOLS_CONFIG_HPP diff --git a/boost/boost/math/tools/promotion.hpp b/boost/boost/math/tools/promotion.hpp index 728aaf1209..b3ad204077 100644 --- a/boost/boost/math/tools/promotion.hpp +++ b/boost/boost/math/tools/promotion.hpp @@ -138,10 +138,35 @@ namespace boost // // Guard against use of long double if it's not supported: // - BOOST_STATIC_ASSERT((0 == ::boost::is_same::value)); + BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented."); #endif }; + // + // This struct is the same as above, but has no static assert on long double usage, + // it should be used only on functions that can be implemented for long double + // even when std lib support is missing or broken for that type. + // + template + struct promote_args_permissive + { + typedef typename promote_args_2< + typename remove_cv::type, + typename promote_args_2< + typename remove_cv::type, + typename promote_args_2< + typename remove_cv::type, + typename promote_args_2< + typename remove_cv::type, + typename promote_args_2< + typename remove_cv::type, typename remove_cv::type + >::type + >::type + >::type + >::type + >::type type; + }; + } // namespace tools } // namespace math } // namespace boost diff --git a/boost/boost/mpl/assert.hpp b/boost/boost/mpl/assert.hpp index acc3954f0f..7a5818e9e4 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 49267 2008-10-11 06:19:02Z agurtovoy $ -// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ -// $Revision: 49267 $ +// $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 $ #include #include @@ -34,6 +34,9 @@ #include // make sure 'size_t' is placed into 'std' #include +#if BOOST_WORKAROUND(BOOST_MSVC, == 1700) +#include +#endif #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || (BOOST_MPL_CFG_GCC != 0) \ @@ -131,8 +134,38 @@ template< assert_::relations r, long x, long y > struct assert_relation {}; #endif +#if BOOST_WORKAROUND(BOOST_MSVC, == 1700) -#if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) +template +struct extract_assert_pred; + +template +struct extract_assert_pred { typedef Pred type; }; + +template +struct eval_assert { + typedef typename extract_assert_pred::type P; + typedef typename P::type p_type; + typedef typename ::boost::mpl::if_c), + failed ************ P::************ + >::type type; +}; + +template +struct eval_assert_not { + typedef typename extract_assert_pred::type P; + typedef typename P::type p_type; + typedef typename ::boost::mpl::if_c), + failed ************ ::boost::mpl::not_

::************ + >::type type; +}; + +template< typename T > +T make_assert_arg(); + +#elif !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) template< bool > struct assert_arg_pred_impl { typedef int type; }; template<> struct assert_arg_pred_impl { typedef void* type; }; @@ -211,6 +244,39 @@ assert_rel_arg( assert_relation ); BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE +#if BOOST_WORKAROUND(BOOST_MSVC, == 1700) + +// BOOST_MPL_ASSERT((pred)) + +#define BOOST_MPL_ASSERT(pred) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ + boost::mpl::assertion_failed( \ + boost::mpl::make_assert_arg< \ + typename boost::mpl::eval_assert::type \ + >() \ + ) \ + ) \ + ) \ +/**/ + +// BOOST_MPL_ASSERT_NOT((pred)) + +#define BOOST_MPL_ASSERT_NOT(pred) \ +BOOST_MPL_AUX_ASSERT_CONSTANT( \ + std::size_t \ + , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ + boost::mpl::assertion_failed( \ + boost::mpl::make_assert_arg< \ + typename boost::mpl::eval_assert_not::type \ + >() \ + ) \ + ) \ + ) \ +/**/ + +#else // BOOST_MPL_ASSERT((pred)) @@ -250,6 +316,8 @@ BOOST_MPL_AUX_ASSERT_CONSTANT( \ /**/ #endif +#endif + // BOOST_MPL_ASSERT_RELATION(x, ==|!=|<=|<|>=|>, y) #if defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) diff --git a/boost/boost/noncopyable.hpp b/boost/boost/noncopyable.hpp index 7770bdbd37..eb8e2e70da 100644 --- a/boost/boost/noncopyable.hpp +++ b/boost/boost/noncopyable.hpp @@ -9,6 +9,8 @@ #ifndef BOOST_NONCOPYABLE_HPP_INCLUDED #define BOOST_NONCOPYABLE_HPP_INCLUDED +#include + namespace boost { // Private copy constructor and copy assignment ensure classes derived from @@ -21,11 +23,21 @@ namespace noncopyable_ // protection from unintended ADL class noncopyable { protected: - noncopyable() {} +#ifndef BOOST_NO_DEFAULTED_FUNCTIONS + BOOST_CONSTEXPR noncopyable() = default; + ~noncopyable() = default; +#else + noncopyable() {} ~noncopyable() {} - private: // emphasize the following members are private +#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& ); - const noncopyable& operator=( const noncopyable& ); + noncopyable& operator=( const noncopyable& ); +#endif }; } diff --git a/boost/boost/predef/architecture.h b/boost/boost/predef/architecture.h new file mode 100644 index 0000000000..9eda25e15e --- /dev/null +++ b/boost/boost/predef/architecture.h @@ -0,0 +1,30 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_H +#define BOOST_PREDEF_ARCHITECTURE_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/architecture/alpha.h b/boost/boost/predef/architecture/alpha.h new file mode 100644 index 0000000000..7ccc480ae8 --- /dev/null +++ b/boost/boost/predef/architecture/alpha.h @@ -0,0 +1,60 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_ALPHA_H +#define BOOST_PREDEF_ARCHITECTURE_ALPHA_H + +#include +#include + +/*` +[heading `BOOST_ARCH_ALPHA`] + +[@http://en.wikipedia.org/wiki/DEC_Alpha DEC Alpha] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + [[`__alpha__`] [__predef_detection__]] + [[`__alpha`] [__predef_detection__]] + [[`_M_ALPHA`] [__predef_detection__]] + + [[`__alpha_ev4__`] [4.0.0]] + [[`__alpha_ev5__`] [5.0.0]] + [[`__alpha_ev6__`] [6.0.0]] + ] + */ + +#define BOOST_ARCH_ALPHA BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__alpha__) || defined(__alpha) || \ + defined(_M_ALPHA) +# undef BOOST_ARCH_ALPHA +# if !defined(BOOST_ARCH_ALPHA) && defined(__alpha_ev4__) +# define BOOST_ARCH_ALPHA BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_ALPHA) && defined(__alpha_ev5__) +# define BOOST_ARCH_ALPHA BOOST_VERSION_NUMBER(5,0,0) +# endif +# if !defined(BOOST_ARCH_ALPHA) && defined(__alpha_ev6__) +# define BOOST_ARCH_ALPHA BOOST_VERSION_NUMBER(6,0,0) +# endif +# if !defined(BOOST_ARCH_ALPHA) +# define BOOST_ARCH_ALPHA BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_ALPHA +# define BOOST_ARCH_ALPHA_AVAILABLE +#endif + +#define BOOST_ARCH_ALPHA_NAME "DEC Alpha" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_ALPHA,BOOST_ARCH_ALPHA_NAME) + + +#endif diff --git a/boost/boost/predef/architecture/arm.h b/boost/boost/predef/architecture/arm.h new file mode 100644 index 0000000000..b221a510de --- /dev/null +++ b/boost/boost/predef/architecture/arm.h @@ -0,0 +1,58 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_ARM_H +#define BOOST_PREDEF_ARCHITECTURE_ARM_H + +#include +#include + +/*` +[heading `BOOST_ARCH_ARM`] + +[@http://en.wikipedia.org/wiki/ARM_architecture ARM] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__arm__`] [__predef_detection__]] + [[`__thumb__`] [__predef_detection__]] + [[`__TARGET_ARCH_ARM`] [__predef_detection__]] + [[`__TARGET_ARCH_THUMB`] [__predef_detection__]] + + [[`__TARGET_ARCH_ARM`] [V.0.0]] + [[`__TARGET_ARCH_THUMB`] [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) +# undef BOOST_ARCH_ARM +# 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) +# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_ARM +# define BOOST_ARCH_ARM_AVAILABLE +#endif + +#define BOOST_ARCH_ARM_NAME "ARM" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_ARM,BOOST_ARCH_ARM_NAME) + + +#endif diff --git a/boost/boost/predef/architecture/blackfin.h b/boost/boost/predef/architecture/blackfin.h new file mode 100644 index 0000000000..7b4f275885 --- /dev/null +++ b/boost/boost/predef/architecture/blackfin.h @@ -0,0 +1,47 @@ +/* +Copyright Redshift Software Inc 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_ARCHITECTURE_BLACKFIN_H +#define BOOST_PREDEF_ARCHITECTURE_BLACKFIN_H + +#include +#include + +/*` +[heading `BOOST_ARCH_BLACKFIN`] + +Blackfin Processors from Analog Devices. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__bfin__`] [__predef_detection__]] + [[`__BFIN__`] [__predef_detection__]] + [[`bfin`] [__predef_detection__]] + [[`BFIN`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_BLACKFIN BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__bfin__) || defined(__BFIN__) || \ + defined(bfin) || defined(BFIN) +# undef BOOST_ARCH_BLACKFIN +# define BOOST_ARCH_BLACKFIN BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_BLACKFIN +# define BOOST_ARCH_BLACKFIN_AVAILABLE +#endif + +#define BOOST_ARCH_BLACKFIN_NAME "Blackfin" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_BLACKFIN,BOOST_ARCH_BLACKFIN_NAME) + + +#endif diff --git a/boost/boost/predef/architecture/convex.h b/boost/boost/predef/architecture/convex.h new file mode 100644 index 0000000000..fbb8e9653d --- /dev/null +++ b/boost/boost/predef/architecture/convex.h @@ -0,0 +1,67 @@ +/* +Copyright Redshift Software Inc 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_ARCHITECTURE_CONVEX_H +#define BOOST_PREDEF_ARCHITECTURE_CONVEX_H + +#include +#include + +/*` +[heading `BOOST_ARCH_CONVEX`] + +[@http://en.wikipedia.org/wiki/Convex_Computer Convex Computer] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__convex__`] [__predef_detection__]] + + [[`__convex_c1__`] [1.0.0]] + [[`__convex_c2__`] [2.0.0]] + [[`__convex_c32__`] [3.2.0]] + [[`__convex_c34__`] [3.4.0]] + [[`__convex_c38__`] [3.8.0]] + ] + */ + +#define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__convex__) +# undef BOOST_ARCH_CONVEX +# if !defined(BOOST_ARCH_CONVEX) && defined(__convex_c1__) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_ARCH_CONVEX) && defined(__convex_c2__) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_ARCH_CONVEX) && defined(__convex_c32__) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER(3,2,0) +# endif +# if !defined(BOOST_ARCH_CONVEX) && defined(__convex_c34__) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER(3,4,0) +# endif +# if !defined(BOOST_ARCH_CONVEX) && defined(__convex_c38__) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER(3,8,0) +# endif +# if !defined(BOOST_ARCH_CONVEX) +# define BOOST_ARCH_CONVEX BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_CONVEX +# define BOOST_ARCH_CONVEX_AVAILABLE +#endif + +#define BOOST_ARCH_CONVEX_NAME "Convex Computer" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_CONVEX,BOOST_ARCH_CONVEX_NAME) + + + +#endif diff --git a/boost/boost/predef/architecture/ia64.h b/boost/boost/predef/architecture/ia64.h new file mode 100644 index 0000000000..918e27f001 --- /dev/null +++ b/boost/boost/predef/architecture/ia64.h @@ -0,0 +1,49 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_IA64_H +#define BOOST_PREDEF_ARCHITECTURE_IA64_H + +#include +#include + +/*` +[heading `BOOST_ARCH_IA64`] + +[@http://en.wikipedia.org/wiki/Ia64 Intel Itanium 64] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__ia64__`] [__predef_detection__]] + [[`_IA64`] [__predef_detection__]] + [[`__IA64__`] [__predef_detection__]] + [[`__ia64`] [__predef_detection__]] + [[`_M_IA64`] [__predef_detection__]] + [[`__itanium__`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_IA64 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__ia64__) || defined(_IA64) || \ + defined(__IA64__) || defined(__ia64) || \ + defined(_M_IA64) || defined(__itanium__) +# undef BOOST_ARCH_IA64 +# define BOOST_ARCH_IA64 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_IA64 +# define BOOST_ARCH_IA64_AVAILABLE +#endif + +#define BOOST_ARCH_IA64_NAME "Intel Itanium 64" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_IA64,BOOST_ARCH_IA64_NAME) + +#endif diff --git a/boost/boost/predef/architecture/m68k.h b/boost/boost/predef/architecture/m68k.h new file mode 100644 index 0000000000..2950c9a12a --- /dev/null +++ b/boost/boost/predef/architecture/m68k.h @@ -0,0 +1,83 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_M68K_H +#define BOOST_PREDEF_ARCHITECTURE_M68K_H + +#include +#include + +/*` +[heading `BOOST_ARCH_M68K`] + +[@http://en.wikipedia.org/wiki/M68k Motorola 68k] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__m68k__`] [__predef_detection__]] + [[`M68000`] [__predef_detection__]] + + [[`__mc68060__`] [6.0.0]] + [[`mc68060`] [6.0.0]] + [[`__mc68060`] [6.0.0]] + [[`__mc68040__`] [4.0.0]] + [[`mc68040`] [4.0.0]] + [[`__mc68040`] [4.0.0]] + [[`__mc68030__`] [3.0.0]] + [[`mc68030`] [3.0.0]] + [[`__mc68030`] [3.0.0]] + [[`__mc68020__`] [2.0.0]] + [[`mc68020`] [2.0.0]] + [[`__mc68020`] [2.0.0]] + [[`__mc68010__`] [1.0.0]] + [[`mc68010`] [1.0.0]] + [[`__mc68010`] [1.0.0]] + [[`__mc68000__`] [0.0.1]] + [[`mc68000`] [0.0.1]] + [[`__mc68000`] [0.0.1]] + ] + */ + +#define BOOST_ARCH_M68K BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__m68k__) || defined(M68000) +# undef BOOST_ARCH_M68K +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68060__) || defined(mc68060) || defined(__mc68060)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(6,0,0) +# endif +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68040__) || defined(mc68040) || defined(__mc68040)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68030__) || defined(mc68030) || defined(__mc68030)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68020__) || defined(mc68020) || defined(__mc68020)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68010__) || defined(mc68010) || defined(__mc68010)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_ARCH_M68K) && (defined(__mc68000__) || defined(mc68000) || defined(__mc68000)) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if !defined(BOOST_ARCH_M68K) +# define BOOST_ARCH_M68K BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_M68K +# define BOOST_ARCH_M68K_AVAILABLE +#endif + +#define BOOST_ARCH_M68K_NAME "Motorola 68k" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_M68K,BOOST_ARCH_M68K_NAME) + + +#endif diff --git a/boost/boost/predef/architecture/mips.h b/boost/boost/predef/architecture/mips.h new file mode 100644 index 0000000000..b3d225cb7b --- /dev/null +++ b/boost/boost/predef/architecture/mips.h @@ -0,0 +1,74 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_MIPS_H +#define BOOST_PREDEF_ARCHITECTURE_MIPS_H + +#include +#include + +/*` +[heading `BOOST_ARCH_MIPS`] + +[@http://en.wikipedia.org/wiki/MIPS_architecture MIPS] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__mips__`] [__predef_detection__]] + [[`__mips`] [__predef_detection__]] + [[`__MIPS__`] [__predef_detection__]] + + [[`__mips`] [V.0.0]] + [[`_MIPS_ISA_MIPS1`] [1.0.0]] + [[`_R3000`] [1.0.0]] + [[`_MIPS_ISA_MIPS2`] [2.0.0]] + [[`__MIPS_ISA2__`] [2.0.0]] + [[`_R4000`] [2.0.0]] + [[`_MIPS_ISA_MIPS3`] [3.0.0]] + [[`__MIPS_ISA3__`] [3.0.0]] + [[`_MIPS_ISA_MIPS4`] [4.0.0]] + [[`__MIPS_ISA4__`] [4.0.0]] + ] + */ + +#define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__mips__) || defined(__mips) || \ + defined(__MIPS__) +# undef BOOST_ARCH_MIPS +# if !defined(BOOST_ARCH_MIPS) && (defined(__mips)) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(__mips,0,0) +# endif +# if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS1) || defined(_R3000)) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS2) || defined(__MIPS_ISA2__) || defined(_R4000)) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS3) || defined(__MIPS_ISA3__)) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS4) || defined(__MIPS_ISA4__)) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_MIPS) +# define BOOST_ARCH_MIPS BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_MIPS +# define BOOST_ARCH_MIPS_AVAILABLE +#endif + +#define BOOST_ARCH_MIPS_NAME "MIPS" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_MIPS,BOOST_ARCH_MIPS_NAME) + + +#endif diff --git a/boost/boost/predef/architecture/parisc.h b/boost/boost/predef/architecture/parisc.h new file mode 100644 index 0000000000..73703832c1 --- /dev/null +++ b/boost/boost/predef/architecture/parisc.h @@ -0,0 +1,65 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_PARISC_H +#define BOOST_PREDEF_ARCHITECTURE_PARISC_H + +#include +#include + +/*` +[heading `BOOST_ARCH_PARISK`] + +[@http://en.wikipedia.org/wiki/PA-RISC_family HP/PA RISC] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__hppa__`] [__predef_detection__]] + [[`__hppa`] [__predef_detection__]] + [[`__HPPA__`] [__predef_detection__]] + + [[`_PA_RISC1_0`] [1.0.0]] + [[`_PA_RISC1_1`] [1.1.0]] + [[`__HPPA11__`] [1.1.0]] + [[`__PA7100__`] [1.1.0]] + [[`_PA_RISC2_0`] [2.0.0]] + [[`__RISC2_0__`] [2.0.0]] + [[`__HPPA20__`] [2.0.0]] + [[`__PA8000__`] [2.0.0]] + ] + */ + +#define BOOST_ARCH_PARISC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__hppa__) || defined(__hppa) || defined(__HPPA__) +# undef BOOST_ARCH_PARISC +# if !defined(BOOST_ARCH_PARISC) && (defined(_PA_RISC1_0)) +# define BOOST_ARCH_PARISC BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_ARCH_PARISC) && (defined(_PA_RISC1_1) || defined(__HPPA11__) || defined(__PA7100__)) +# define BOOST_ARCH_PARISC BOOST_VERSION_NUMBER(1,1,0) +# endif +# if !defined(BOOST_ARCH_PARISC) && (defined(_PA_RISC2_0) || defined(__RISC2_0__) || defined(__HPPA20__) || defined(__PA8000__)) +# define BOOST_ARCH_PARISC BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_ARCH_PARISC) +# define BOOST_ARCH_PARISC BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_PARISC +# define BOOST_ARCH_PARISC_AVAILABLE +#endif + +#define BOOST_ARCH_PARISC_NAME "HP/PA RISC" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PARISC,BOOST_ARCH_PARISC_NAME) + + +#endif diff --git a/boost/boost/predef/architecture/ppc.h b/boost/boost/predef/architecture/ppc.h new file mode 100644 index 0000000000..8339ed24a4 --- /dev/null +++ b/boost/boost/predef/architecture/ppc.h @@ -0,0 +1,73 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_PPC_H +#define BOOST_PREDEF_ARCHITECTURE_PPC_H + +#include +#include + +/*` +[heading `BOOST_ARCH_PPC`] + +[@http://en.wikipedia.org/wiki/PowerPC PowerPC] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__powerpc`] [__predef_detection__]] + [[`__powerpc__`] [__predef_detection__]] + [[`__POWERPC__`] [__predef_detection__]] + [[`__ppc__`] [__predef_detection__]] + [[`_M_PPC`] [__predef_detection__]] + [[`_ARCH_PPC`] [__predef_detection__]] + [[`__PPCGECKO__`] [__predef_detection__]] + [[`__PPCBROADWAY__`] [__predef_detection__]] + [[`_XENON`] [__predef_detection__]] + + [[`__ppc601__`] [6.1.0]] + [[`_ARCH_601`] [6.1.0]] + [[`__ppc603__`] [6.3.0]] + [[`_ARCH_603`] [6.3.0]] + [[`__ppc604__`] [6.4.0]] + [[`__ppc604__`] [6.4.0]] + ] + */ + +#define BOOST_ARCH_PPC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__powerpc) || defined(__powerpc__) || \ + defined(__POWERPC__) || defined(__ppc__) || \ + defined(_M_PPC) || defined(_ARCH_PPC) || \ + defined(__PPCGECKO__) || defined(__PPCBROADWAY__) || \ + defined(_XENON) +# undef BOOST_ARCH_PPC +# if !defined (BOOST_ARCH_PPC) && (defined(__ppc601__) || defined(_ARCH_601)) +# define BOOST_ARCH_PPC BOOST_VERSION_NUMBER(6,1,0) +# endif +# if !defined (BOOST_ARCH_PPC) && (defined(__ppc603__) || defined(_ARCH_603)) +# define BOOST_ARCH_PPC BOOST_VERSION_NUMBER(6,3,0) +# endif +# if !defined (BOOST_ARCH_PPC) && (defined(__ppc604__) || defined(__ppc604__)) +# define BOOST_ARCH_PPC BOOST_VERSION_NUMBER(6,4,0) +# endif +# if !defined (BOOST_ARCH_PPC) +# define BOOST_ARCH_PPC BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_PPC +# define BOOST_ARCH_PPC_AVAILABLE +#endif + +#define BOOST_ARCH_PPC_NAME "PowerPC" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PPC,BOOST_ARCH_PPC_NAME) + + +#endif diff --git a/boost/boost/predef/architecture/pyramid.h b/boost/boost/predef/architecture/pyramid.h new file mode 100644 index 0000000000..706e0cda7d --- /dev/null +++ b/boost/boost/predef/architecture/pyramid.h @@ -0,0 +1,43 @@ +/* +Copyright Redshift Software Inc 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_ARCHITECTURE_PYRAMID_H +#define BOOST_PREDEF_ARCHITECTURE_PYRAMID_H + +#include +#include + +/*` +[heading `BOOST_ARCH_PYRAMID`] + +Pyramid 9810 architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`pyr`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_PYRAMID BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(pyr) +# undef BOOST_ARCH_PYRAMID +# define BOOST_ARCH_PYRAMID BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_PYRAMID +# define BOOST_ARCH_PYRAMID_AVAILABLE +#endif + +#define BOOST_ARCH_PYRAMID_NAME "Pyramid 9810" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PYRAMID,BOOST_ARCH_PYRAMID_NAME) + + +#endif diff --git a/boost/boost/predef/architecture/rs6k.h b/boost/boost/predef/architecture/rs6k.h new file mode 100644 index 0000000000..c05fefd11f --- /dev/null +++ b/boost/boost/predef/architecture/rs6k.h @@ -0,0 +1,56 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_RS6K_H +#define BOOST_PREDEF_ARCHITECTURE_RS6K_H + +#include +#include + +/*` +[heading `BOOST_ARCH_RS6000`] + +[@http://en.wikipedia.org/wiki/RS/6000 RS/6000] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__THW_RS6000`] [__predef_detection__]] + [[`_IBMR2`] [__predef_detection__]] + [[`_POWER`] [__predef_detection__]] + [[`_ARCH_PWR`] [__predef_detection__]] + [[`_ARCH_PWR2`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_RS6000 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__THW_RS6000) || defined(_IBMR2) || \ + defined(_POWER) || defined(_ARCH_PWR) || \ + defined(_ARCH_PWR2) +# undef BOOST_ARCH_RS6000 +# define BOOST_ARCH_RS6000 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_RS6000 +# define BOOST_ARCH_RS6000_AVAILABLE +#endif + +#define BOOST_ARCH_RS6000_NAME "RS/6000" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_RS6000,BOOST_ARCH_RS6000_NAME) + +#define BOOST_ARCH_PWR BOOST_ARCH_RS6000 + +#if BOOST_ARCH_PWR +# define BOOST_ARCH_PWR_AVAILABLE +#endif + +#define BOOST_ARCH_PWR_NAME BOOST_ARCH_RS6000_NAME + +#endif diff --git a/boost/boost/predef/architecture/sparc.h b/boost/boost/predef/architecture/sparc.h new file mode 100644 index 0000000000..30207a052b --- /dev/null +++ b/boost/boost/predef/architecture/sparc.h @@ -0,0 +1,55 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_SPARC_H +#define BOOST_PREDEF_ARCHITECTURE_SPARC_H + +#include +#include + +/*` +[heading `BOOST_ARCH_SPARC`] + +[@http://en.wikipedia.org/wiki/SPARC SPARC] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__sparc__`] [__predef_detection__]] + [[`__sparc`] [__predef_detection__]] + + [[`__sparcv9`] [9.0.0]] + [[`__sparcv8`] [8.0.0]] + ] + */ + +#define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__sparc__) || defined(__sparc) +# undef BOOST_ARCH_SPARC +# 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) +# define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(8,0,0) +# endif +# if !defined(BOOST_ARCH_SPARC) && +# define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_SPARC +# define BOOST_ARCH_SPARC_AVAILABLE +#endif + +#define BOOST_ARCH_SPARC_NAME "SPARC" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SPARC,BOOST_ARCH_SPARC_NAME) + + +#endif diff --git a/boost/boost/predef/architecture/superh.h b/boost/boost/predef/architecture/superh.h new file mode 100644 index 0000000000..f87f492732 --- /dev/null +++ b/boost/boost/predef/architecture/superh.h @@ -0,0 +1,68 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_SUPERH_H +#define BOOST_PREDEF_ARCHITECTURE_SUPERH_H + +#include +#include + +/*` +[heading `BOOST_ARCH_SH`] + +[@http://en.wikipedia.org/wiki/SuperH SuperH] architecture: +If available versions \[1-5\] are specifically detected. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__sh__`] [__predef_detection__]] + + [[`__SH5__`] [5.0.0]] + [[`__SH4__`] [4.0.0]] + [[`__sh3__`] [3.0.0]] + [[`__SH3__`] [3.0.0]] + [[`__sh2__`] [2.0.0]] + [[`__sh1__`] [1.0.0]] + ] + */ + +#define BOOST_ARCH_SH BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__sh__) +# undef BOOST_ARCH_SH +# if !defined(BOOST_ARCH_SH) && (defined(__SH5__)) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER(5,0,0) +# endif +# if !defined(BOOST_ARCH_SH) && (defined(__SH4__)) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_SH) && (defined(__sh3__) || defined(__SH3__)) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_ARCH_SH) && (defined(__sh2__)) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_ARCH_SH) && (defined(__sh1__)) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_ARCH_SH) +# define BOOST_ARCH_SH BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_SH +# define BOOST_ARCH_SH_AVAILABLE +#endif + +#define BOOST_ARCH_SH_NAME "SuperH" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SH,BOOST_ARCH_SH_NAME) + + +#endif diff --git a/boost/boost/predef/architecture/sys370.h b/boost/boost/predef/architecture/sys370.h new file mode 100644 index 0000000000..f2fba7802e --- /dev/null +++ b/boost/boost/predef/architecture/sys370.h @@ -0,0 +1,44 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_SYS370_H +#define BOOST_PREDEF_ARCHITECTURE_SYS370_H + +#include +#include + +/*` +[heading `BOOST_ARCH_SYS370`] + +[@http://en.wikipedia.org/wiki/System/370 System/370] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__370__`] [__predef_detection__]] + [[`__THW_370__`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_SYS370 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__370__) || defined(__THW_370__) +# undef BOOST_ARCH_SYS370 +# define BOOST_ARCH_SYS370 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_SYS370 +# define BOOST_ARCH_SYS370_AVAILABLE +#endif + +#define BOOST_ARCH_SYS370_NAME "System/370" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SYS370,BOOST_ARCH_SYS370_NAME) + + +#endif diff --git a/boost/boost/predef/architecture/sys390.h b/boost/boost/predef/architecture/sys390.h new file mode 100644 index 0000000000..a9e03d9b1a --- /dev/null +++ b/boost/boost/predef/architecture/sys390.h @@ -0,0 +1,44 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_SYS390_H +#define BOOST_PREDEF_ARCHITECTURE_SYS390_H + +#include +#include + +/*` +[heading `BOOST_ARCH_SYS390`] + +[@http://en.wikipedia.org/wiki/System/390 System/390] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__s390__`] [__predef_detection__]] + [[`__s390x__`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_SYS390 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__s390__) || defined(__s390x__) +# undef BOOST_ARCH_SYS390 +# define BOOST_ARCH_SYS390 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_SYS390 +# define BOOST_ARCH_SYS390_AVAILABLE +#endif + +#define BOOST_ARCH_SYS390_NAME "System/390" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SYS390,BOOST_ARCH_SYS390_NAME) + + +#endif diff --git a/boost/boost/predef/architecture/x86.h b/boost/boost/predef/architecture/x86.h new file mode 100644 index 0000000000..3a08e9c134 --- /dev/null +++ b/boost/boost/predef/architecture/x86.h @@ -0,0 +1,38 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_X86_H +#define BOOST_PREDEF_ARCHITECTURE_X86_H + +#include +#include + +/*` +[heading `BOOST_ARCH_X86`] + +[@http://en.wikipedia.org/wiki/X86 Intel x86] architecture. This is +a category to indicate that either `BOOST_ARCH_X86_32` or +`BOOST_ARCH_X86_64` is detected. + */ + +#define BOOST_ARCH_X86 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if BOOST_ARCH_X86_32 || BOOST_ARCH_X86_64 +# undef BOOST_ARCH_X86 +# define BOOST_ARCH_X86 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_X86 +# define BOOST_ARCH_X86_AVAILABLE +#endif + +#define BOOST_ARCH_X86_NAME "Intel x86" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86,BOOST_ARCH_X86_NAME) + +#endif diff --git a/boost/boost/predef/architecture/x86/32.h b/boost/boost/predef/architecture/x86/32.h new file mode 100644 index 0000000000..131d94d346 --- /dev/null +++ b/boost/boost/predef/architecture/x86/32.h @@ -0,0 +1,87 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_X86_32_H +#define BOOST_PREDEF_ARCHITECTURE_X86_32_H + +#include +#include + +/*` +[heading `BOOST_ARCH_X86_32`] + +[@http://en.wikipedia.org/wiki/X86 Intel x86] architecture: +If available versions \[3-6\] are specifically detected. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`i386`] [__predef_detection__]] + [[`__i386__`] [__predef_detection__]] + [[`__i486__`] [__predef_detection__]] + [[`__i586__`] [__predef_detection__]] + [[`__i686__`] [__predef_detection__]] + [[`__i386`] [__predef_detection__]] + [[`_M_IX86`] [__predef_detection__]] + [[`_X86_`] [__predef_detection__]] + [[`__THW_INTEL__`] [__predef_detection__]] + [[`__I86__`] [__predef_detection__]] + [[`__INTEL__`] [__predef_detection__]] + + [[`__I86__`] [V.0.0]] + [[`_M_IX86`] [V.0.0]] + [[`__i686__`] [6.0.0]] + [[`__i586__`] [5.0.0]] + [[`__i486__`] [4.0.0]] + [[`__i386__`] [3.0.0]] + ] + */ + +#define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(i386) || defined(__i386__) || \ + defined(__i486__) || defined(__i586__) || \ + defined(__i686__) || defined(__i386) || \ + defined(_M_IX86) || defined(_X86_) || \ + defined(__THW_INTEL__) || defined(__I86__) || \ + defined(__INTEL__) +# undef BOOST_ARCH_X86_32 +# if !defined(BOOST_ARCH_X86_32) && defined(__I86__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(__I86__,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(_M_IX86) +# define BOOST_ARCH_X86_32 BOOST_PREDEF_MAKE_10_VV00(_M_IX86) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i686__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(6,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i586__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(5,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i486__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i386__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_X86_32 +# define BOOST_ARCH_X86_32_AVAILABLE +#endif + +#define BOOST_ARCH_X86_32_NAME "Intel x86-32" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86_32,BOOST_ARCH_X86_32_NAME) + +#include + +#endif diff --git a/boost/boost/predef/architecture/x86/64.h b/boost/boost/predef/architecture/x86/64.h new file mode 100644 index 0000000000..0bee9c9634 --- /dev/null +++ b/boost/boost/predef/architecture/x86/64.h @@ -0,0 +1,50 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_X86_64_H +#define BOOST_PREDEF_ARCHITECTURE_X86_64_H + +#include +#include + +/*` +[heading `BOOST_ARCH_X86_64`] + +[@http://en.wikipedia.org/wiki/Ia64 Intel IA-64] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__x86_64`] [__predef_detection__]] + [[`__x86_64__`] [__predef_detection__]] + [[`__amd64__`] [__predef_detection__]] + [[`__amd64`] [__predef_detection__]] + [[`_M_X64`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_X86_64 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__x86_64) || defined(__x86_64__) || \ + defined(__amd64__) || defined(__amd64) || \ + defined(_M_X64) +# undef BOOST_ARCH_X86_64 +# define BOOST_ARCH_X86_64 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_X86_64 +# define BOOST_ARCH_X86_64_AVAILABLE +#endif + +#define BOOST_ARCH_X86_64_NAME "Intel x86-64" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86_64,BOOST_ARCH_X86_64_NAME) + +#include + +#endif diff --git a/boost/boost/predef/architecture/z.h b/boost/boost/predef/architecture/z.h new file mode 100644 index 0000000000..622d6ab308 --- /dev/null +++ b/boost/boost/predef/architecture/z.h @@ -0,0 +1,43 @@ +/* +Copyright Redshift Software, Inc. 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_ARCHITECTURE_Z_H +#define BOOST_PREDEF_ARCHITECTURE_Z_H + +#include +#include + +/*` +[heading `BOOST_ARCH_Z`] + +[@http://en.wikipedia.org/wiki/Z/Architecture z/Architecture] architecture. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__SYSC_ZARCH__`] [__predef_detection__]] + ] + */ + +#define BOOST_ARCH_Z BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__SYSC_ZARCH__) +# undef BOOST_ARCH_Z +# define BOOST_ARCH_Z BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_Z +# define BOOST_ARCH_Z_AVAILABLE +#endif + +#define BOOST_ARCH_Z_NAME "z/Architecture" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_Z,BOOST_ARCH_Z_NAME) + + +#endif diff --git a/boost/boost/predef/detail/_cassert.h b/boost/boost/predef/detail/_cassert.h new file mode 100644 index 0000000000..ca594a840b --- /dev/null +++ b/boost/boost/predef/detail/_cassert.h @@ -0,0 +1,17 @@ +/* +Copyright Redshift Software, Inc. 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__CASSERT_H +#define BOOST_PREDEF_DETAIL__CASSERT_H + +#if defined(__cpluplus) +#include +#else +#include +#endif + +#endif diff --git a/boost/boost/predef/detail/endian_compat.h b/boost/boost/predef/detail/endian_compat.h new file mode 100644 index 0000000000..b8736597e7 --- /dev/null +++ b/boost/boost/predef/detail/endian_compat.h @@ -0,0 +1,26 @@ +/* +Copyright Redshift Software, Inc. 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_DETAIL_ENDIAN_COMPAT_H +#define BOOST_PREDEF_DETAIL_ENDIAN_COMPAT_H + +#include + +#if BOOST_ENDIAN_BIG_BYTE +# define BOOST_BIG_ENDIAN +# define BOOST_BYTE_ORDER 4321 +#endif +#if BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_LITTLE_ENDIAN +# define BOOST_BYTE_ORDER 1234 +#endif +#if BOOST_ENDIAN_LITTLE_WORD +# define BOOST_PDP_ENDIAN +# define BOOST_BYTE_ORDER 2134 +#endif + +#endif diff --git a/boost/boost/predef/detail/os_detected.h b/boost/boost/predef/detail/os_detected.h new file mode 100644 index 0000000000..7d70c1ef73 --- /dev/null +++ b/boost/boost/predef/detail/os_detected.h @@ -0,0 +1,10 @@ +/* +Copyright Redshift Software, Inc. 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_DETAIL_OS_DETECTED +#define BOOST_PREDEF_DETAIL_OS_DETECTED 1 +#endif diff --git a/boost/boost/predef/detail/test.h b/boost/boost/predef/detail/test.h new file mode 100644 index 0000000000..c75eccc5b7 --- /dev/null +++ b/boost/boost/predef/detail/test.h @@ -0,0 +1,17 @@ +/* +Copyright Redshift Software Inc. 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_TEST_H +#define BOOST_PREDEF_DETAIL_TEST_H + +#if !defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS) + +#define BOOST_PREDEF_DECLARE_TEST(x,s) + +#endif + +#endif diff --git a/boost/boost/predef/library/c/_prefix.h b/boost/boost/predef/library/c/_prefix.h new file mode 100644 index 0000000000..754601f5a2 --- /dev/null +++ b/boost/boost/predef/library/c/_prefix.h @@ -0,0 +1,13 @@ +/* +Copyright Redshift Software, Inc. 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__PREFIX_H +#define BOOST_PREDEF_LIBRARY_C__PREFIX_H + +#include + +#endif diff --git a/boost/boost/predef/library/c/gnu.h b/boost/boost/predef/library/c/gnu.h new file mode 100644 index 0000000000..a2bdfcefa0 --- /dev/null +++ b/boost/boost/predef/library/c/gnu.h @@ -0,0 +1,62 @@ +/* +Copyright Redshift Software, Inc. 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_GNU_H +#define BOOST_PREDEF_LIBRARY_C_GNU_H + +#include +#include + +#include + +#if defined(__STDC__) +#include +#elif defined(__cplusplus) +#include +#endif + +/*` +[heading `BOOST_LIB_C_GNU`] + +[@http://en.wikipedia.org/wiki/Glibc GNU glibc] Standard C library. +Version number available as major, and minor. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__GLIBC__`] [__predef_detection__]] + [[`__GNU_LIBRARY__`] [__predef_detection__]] + + [[`__GLIBC__`, `__GLIBC_MINOR__`] [V.R.0]] + [[`__GNU_LIBRARY__`, `__GNU_LIBRARY_MINOR__`] [V.R.0]] + ] + */ + +#define BOOST_LIB_C_GNU BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__GLIBC__) || defined(__GNU_LIBRARY__) +# undef BOOST_LIB_C_GNU +# if defined(__GLIBC__) +# define BOOST_LIB_C_GNU \ + BOOST_VERSION_NUMBER(__GLIBC__,__GLIBC_MINOR__,0) +# else +# define BOOST_LIB_C_GNU \ + BOOST_VERSION_NUMBER(__GNU_LIBRARY__,__GNU_LIBRARY_MINOR__,0) +# endif +#endif + +#if BOOST_LIB_C_GNU +# define BOOST_LIB_C_GNU_AVAILABLE +#endif + +#define BOOST_LIB_C_GNU_NAME "GNU" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_C_GNU,BOOST_LIB_C_GNU_NAME) + + +#endif diff --git a/boost/boost/predef/make.h b/boost/boost/predef/make.h new file mode 100644 index 0000000000..ccee24a1a0 --- /dev/null +++ b/boost/boost/predef/make.h @@ -0,0 +1,87 @@ +/* +Copyright Redshift Software, Inc. 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) +*/ +#include + +#ifndef BOOST_PREDEF_MAKE_H +#define BOOST_PREDEF_MAKE_H + +/* +Shorthands for the common version number formats used by vendors... +*/ + +/*` +[heading `BOOST_PREDEF_MAKE_..` macros] + +These set of macros decompose common vendor version number +macros which are composed version, revision, and patch digits. +The naming convention indicates: + +* The base of the specified version number. "`BOOST_PREDEF_MAKE_0X`" for + hexadecimal digits, and "`BOOST_PREDEF_MAKE_10`" for decimal digits. +* The format of the vendor version number. Where "`V`" indicates the version digits, + "`R`" indicates the revision digits, "`P`" indicates the patch digits, and "`0`" + indicates an ignored digit. + +Macros are: +*/ +/*` `BOOST_PREDEF_MAKE_0X_VRP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VRP(V) BOOST_VERSION_NUMBER((V&0xF00)>>8,(V&0xF0)>>4,(V&0xF)) +/*` `BOOST_PREDEF_MAKE_0X_VVRP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VVRP(V) BOOST_VERSION_NUMBER((V&0xFF00)>>8,(V&0xF0)>>4,(V&0xF)) +/*` `BOOST_PREDEF_MAKE_0X_VRPP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VRPP(V) BOOST_VERSION_NUMBER((V&0xF000)>>12,(V&0xF00)>>8,(V&0xFF)) +/*` `BOOST_PREDEF_MAKE_0X_VVRR(V)` */ +#define BOOST_PREDEF_MAKE_0X_VVRR(V) BOOST_VERSION_NUMBER((V&0xFF00)>>8,(V&0xFF),0) +/*` `BOOST_PREDEF_MAKE_0X_VRRPPPP(V)` */ +#define BOOST_PREDEF_MAKE_0X_VRRPPPP(V) BOOST_VERSION_NUMBER((V&0xF000000)>>24,(V&0xFF0000)>>16,(V&0xFFFF)) +/*` `BOOST_PREDEF_MAKE_0X_VVRRP(V)` */ +#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_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)` */ +#define BOOST_PREDEF_MAKE_10_VRP(V) BOOST_VERSION_NUMBER(((V)/100)%10,((V)/10)%10,(V)%10) +/*` `BOOST_PREDEF_MAKE_10_VRP000(V)` */ +#define BOOST_PREDEF_MAKE_10_VRP000(V) BOOST_VERSION_NUMBER(((V)/100000)%10,((V)/10000)%10,((V)/1000)%10) +/*` `BOOST_PREDEF_MAKE_10_VRPP(V)` */ +#define BOOST_PREDEF_MAKE_10_VRPP(V) BOOST_VERSION_NUMBER(((V)/1000)%10,((V)/100)%10,(V)%100) +/*` `BOOST_PREDEF_MAKE_10_VRR(V)` */ +#define BOOST_PREDEF_MAKE_10_VRR(V) BOOST_VERSION_NUMBER(((V)/100)%10,(V)%100,0) +/*` `BOOST_PREDEF_MAKE_10_VRRPP(V)` */ +#define BOOST_PREDEF_MAKE_10_VRRPP(V) BOOST_VERSION_NUMBER(((V)/10000)%10,((V)/100)%100,(V)%100) +/*` `BOOST_PREDEF_MAKE_10_VRR000(V)` */ +#define BOOST_PREDEF_MAKE_10_VRR000(V) BOOST_VERSION_NUMBER(((V)/100000)%10,((V)/1000)%100,0) +/*` `BOOST_PREDEF_MAKE_10_VV00(V)` */ +#define BOOST_PREDEF_MAKE_10_VV00(V) BOOST_VERSION_NUMBER(((V)/100)%100,0,0) +/*` `BOOST_PREDEF_MAKE_10_VVRR(V)` */ +#define BOOST_PREDEF_MAKE_10_VVRR(V) BOOST_VERSION_NUMBER(((V)/100)%100,(V)%100,0) +/*` `BOOST_PREDEF_MAKE_10_VVRRPP(V)` */ +#define BOOST_PREDEF_MAKE_10_VVRRPP(V) BOOST_VERSION_NUMBER(((V)/10000)%100,((V)/100)%100,(V)%100) +/*` `BOOST_PREDEF_MAKE_10_VVRR0PP00(V)` */ +#define BOOST_PREDEF_MAKE_10_VVRR0PP00(V) BOOST_VERSION_NUMBER(((V)/10000000)%100,((V)/100000)%100,((V)/100)%100) +/*` `BOOST_PREDEF_MAKE_10_VVRR0PPPP(V)` */ +#define BOOST_PREDEF_MAKE_10_VVRR0PPPP(V) BOOST_VERSION_NUMBER(((V)/10000000)%100,((V)/100000)%100,(V)%10000) +/*` `BOOST_PREDEF_MAKE_10_VVRR00PP00(V)` */ +#define BOOST_PREDEF_MAKE_10_VVRR00PP00(V) BOOST_VERSION_NUMBER(((V)/100000000)%100,((V)/1000000)%100,((V)/100)%100) +/*` +[heading `BOOST_PREDEF_MAKE_*..` date macros] + +Date decomposition macros return a date in the relative to the 1970 +Epoch date. If the month is not available, January 1st is used as the month and day. +If the day is not available, but the month is, the 1st of the month is used as the day. +*/ +/*` `BOOST_PREDEF_MAKE_DATE(Y,M,D)` */ +#define BOOST_PREDEF_MAKE_DATE(Y,M,D) BOOST_VERSION_NUMBER((Y)%10000-1970,(M)%100,(D)%100) +/*` `BOOST_PREDEF_MAKE_YYYYMMDD(V)` */ +#define BOOST_PREDEF_MAKE_YYYYMMDD(V) BOOST_PREDEF_MAKE_DATE(((V)/10000)%10000,((V)/100)%100,(V)%100) +/*` `BOOST_PREDEF_MAKE_YYYY(V)` */ +#define BOOST_PREDEF_MAKE_YYYY(V) BOOST_PREDEF_MAKE_DATE(V,1,1) +/*` `BOOST_PREDEF_MAKE_YYYYMM(V)` */ +#define BOOST_PREDEF_MAKE_YYYYMM(V) BOOST_PREDEF_MAKE_DATE((V)/100,(V),1) + +#endif diff --git a/boost/boost/predef/os/bsd.h b/boost/boost/predef/os/bsd.h new file mode 100644 index 0000000000..0adc435d0b --- /dev/null +++ b/boost/boost/predef/os/bsd.h @@ -0,0 +1,95 @@ +/* +Copyright Redshift Software, Inc. 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_BSD_H +#define BOOST_PREDEF_OS_BSD_H + +/* Special case: OSX will define BSD predefs if the sys/param.h + * header is included. We can guard against that, but only if we + * detect OSX first. Hence we will force include OSX detection + * before doing any BSD detection. + */ +#include + +#include +#include + +/*` +[heading `BOOST_OS_BSD`] + +[@http://en.wikipedia.org/wiki/Berkeley_Software_Distribution BSD] operating system. + +BSD has various branch operating systems possible and each detected +individually. This detects the following variations and sets a specific +version number macro to match: + +* `BOOST_OS_BSD_DRAGONFLY` [@http://en.wikipedia.org/wiki/DragonFly_BSD DragonFly BSD] +* `BOOST_OS_BSD_FREE` [@http://en.wikipedia.org/wiki/Freebsd FreeBSD] +* `BOOST_OS_BSD_BSDI` [@http://en.wikipedia.org/wiki/BSD/OS BSDi BSD/OS] +* `BOOST_OS_BSD_NET` [@http://en.wikipedia.org/wiki/Netbsd NetBSD] +* `BOOST_OS_BSD_OPEN` [@http://en.wikipedia.org/wiki/Openbsd OpenBSD] + +[note The general `BOOST_OS_BSD` is set in all cases to indicate some form +of BSD. If the above variants is detected the corresponding macro is also set.] + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`BSD`] [__predef_detection__]] + [[`_SYSTYPE_BSD`] [__predef_detection__]] + + [[`BSD4_2`] [4.2.0]] + [[`BSD4_3`] [4.3.0]] + [[`BSD4_4`] [4.4.0]] + [[`BSD`] [V.R.0]] + ] + */ + +#include +#include +#include +#include +#include + +#ifndef BOOST_OS_BSD +#define BOOST_OS_BSD BOOST_VERSION_NUMBER_NOT_AVAILABLE +#endif + +#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ + defined(BSD) || \ + defined(_SYSTYPE_BSD) \ + ) +# undef BOOST_OS_BSD +# include +# if !defined(BOOST_OS_BSD) && defined(BSD4_4) +# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,4,0) +# endif +# if !defined(BOOST_OS_BSD) && defined(BSD4_3) +# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,3,0) +# endif +# if !defined(BOOST_OS_BSD) && defined(BSD4_2) +# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,2,0) +# endif +# if !defined(BOOST_OS_BSD) && defined(BSD) +# define BOOST_OS_BSD BOOST_PREDEF_MAKE_10_VVRR(BSD) +# endif +# if !defined(BOOST_OS_BSD) +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_BSD +# define BOOST_OS_BSD_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_NAME "BSD" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD,BOOST_OS_BSD_NAME) + +#endif diff --git a/boost/boost/predef/os/bsd/bsdi.h b/boost/boost/predef/os/bsd/bsdi.h new file mode 100644 index 0000000000..71ea87a254 --- /dev/null +++ b/boost/boost/predef/os/bsd/bsdi.h @@ -0,0 +1,48 @@ +/* +Copyright Redshift Software, Inc. 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) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_BSDI_H +#define BOOST_PREDEF_OS_BSD_BSDI_H + +#include + +/*` +[heading `BOOST_OS_BSD_BSDI`] + +[@http://en.wikipedia.org/wiki/BSD/OS BSDi BSD/OS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__bsdi__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_BSD_BSDI BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ + defined(__bsdi__) \ + ) +# ifndef BOOST_OS_BSD_AVAILABLE +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# define BOOST_OS_BSD_AVAILABLE +# endif +# undef BOOST_OS_BSD_BSDI +# define BOOST_OS_BSD_BSDI BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_BSD_BSDI +# define BOOST_OS_BSD_BSDI_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_BSDI_NAME "BSDi BSD/OS" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_BSDI,BOOST_OS_BSD_BSDI_NAME) + +#endif diff --git a/boost/boost/predef/os/bsd/dragonfly.h b/boost/boost/predef/os/bsd/dragonfly.h new file mode 100644 index 0000000000..9d37439856 --- /dev/null +++ b/boost/boost/predef/os/bsd/dragonfly.h @@ -0,0 +1,50 @@ +/* +Copyright Redshift Software, Inc. 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) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_DRAGONFLY_H +#define BOOST_PREDEF_OS_BSD_DRAGONFLY_H + +#include + +/*` +[heading `BOOST_OS_BSD_DRAGONFLY`] + +[@http://en.wikipedia.org/wiki/DragonFly_BSD DragonFly BSD] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__DragonFly__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_BSD_DRAGONFLY BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ + defined(__DragonFly__) \ + ) +# ifndef BOOST_OS_BSD_AVAILABLE +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# define BOOST_OS_BSD_AVAILABLE +# endif +# undef BOOST_OS_BSD_DRAGONFLY +# if defined(__DragonFly__) +# define BOOST_OS_DRAGONFLY_BSD BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_BSD_DRAGONFLY +# define BOOST_OS_BSD_DRAGONFLY_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_DRAGONFLY_NAME "DragonFly BSD" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_DRAGONFLY,BOOST_OS_BSD_DRAGONFLY_NAME) + +#endif diff --git a/boost/boost/predef/os/bsd/free.h b/boost/boost/predef/os/bsd/free.h new file mode 100644 index 0000000000..321d3a3b17 --- /dev/null +++ b/boost/boost/predef/os/bsd/free.h @@ -0,0 +1,60 @@ +/* +Copyright Redshift Software, Inc. 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) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_FREE_H +#define BOOST_PREDEF_OS_BSD_FREE_H + +#include + +/*` +[heading `BOOST_OS_BSD_FREE`] + +[@http://en.wikipedia.org/wiki/Freebsd FreeBSD] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__FreeBSD__`] [__predef_detection__]] + + [[`__FreeBSD_version`] [V.R.P]] + ] + */ + +#define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ + defined(__FreeBSD__) \ + ) +# ifndef BOOST_OS_BSD_AVAILABLE +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# define BOOST_OS_BSD_AVAILABLE +# endif +# undef BOOST_OS_BSD_FREE +# if defined(__FreeBSD_version) +# if __FreeBSD_version < 500000 +# define BOOST_OS_BSD_FREE \ + BOOST_PREDEF_MAKE_10_VRP000(__FreeBSD_version) +# else +# define BOOST_OS_BSD_FREE \ + BOOST_PREDEF_MAKE_10_VRR000(__FreeBSD_version) +# endif +# else +# define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_BSD_FREE +# define BOOST_OS_BSD_FREE_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_FREE_NAME "Free BSD" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_FREE,BOOST_OS_BSD_FREE_NAME) + +#endif diff --git a/boost/boost/predef/os/bsd/net.h b/boost/boost/predef/os/bsd/net.h new file mode 100644 index 0000000000..2a34538996 --- /dev/null +++ b/boost/boost/predef/os/bsd/net.h @@ -0,0 +1,84 @@ +/* +Copyright Redshift Software, Inc. 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) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_NET_H +#define BOOST_PREDEF_OS_BSD_NET_H + +#include + +/*` +[heading `BOOST_OS_BSD_NET`] + +[@http://en.wikipedia.org/wiki/Netbsd NetBSD] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__NETBSD__`] [__predef_detection__]] + [[`__NetBSD__`] [__predef_detection__]] + + [[`__NETBSD_version`] [V.R.P]] + [[`NetBSD0_8`] [0.8.0]] + [[`NetBSD0_9`] [0.9.0]] + [[`NetBSD1_0`] [1.0.0]] + [[`__NetBSD_Version`] [V.R.P]] + ] + */ + +#define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ + defined(__NETBSD__) || defined(__NetBSD__) \ + ) +# ifndef BOOST_OS_BSD_AVAILABLE +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# define BOOST_OS_BSD_AVAILABLE +# endif +# undef BOOST_OS_BSD_NET +# if defined(__NETBSD__) +# if defined(__NETBSD_version) +# if __NETBSD_version < 500000 +# define BOOST_OS_BSD_NET \ + BOOST_PREDEF_MAKE_10_VRP000(__NETBSD_version) +# else +# define BOOST_OS_BSD_NET \ + BOOST_PREDEF_MAKE_10_VRR000(__NETBSD_version) +# endif +# else +# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_AVAILABLE +# endif +# elif defined(__NetBSD__) +# if !defined(BOOST_OS_BSD_NET) && defined(NetBSD0_8) +# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(0,8,0) +# endif +# if !defined(BOOST_OS_BSD_NET) && defined(NetBSD0_9) +# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(0,9,0) +# endif +# if !defined(BOOST_OS_BSD_NET) && defined(NetBSD1_0) +# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(1,0,0) +# endif +# if !defined(BOOST_OS_BSD_NET) && defined(__NetBSD_Version) +# define BOOST_OS_BSD_NET \ + BOOST_PREDEF_MAKE_10_VVRR00PP00(__NetBSD_Version) +# endif +# if !defined(BOOST_OS_BSD_NET) +# define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_AVAILABLE +# endif +# endif +#endif + +#if BOOST_OS_BSD_NET +# define BOOST_OS_BSD_NET_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_NET_NAME "DragonFly BSD" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_NET,BOOST_OS_BSD_NET_NAME) + +#endif diff --git a/boost/boost/predef/os/bsd/open.h b/boost/boost/predef/os/bsd/open.h new file mode 100644 index 0000000000..2f51644126 --- /dev/null +++ b/boost/boost/predef/os/bsd/open.h @@ -0,0 +1,171 @@ +/* +Copyright Redshift Software, Inc. 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) +*/ + +#ifndef BOOST_PREDEF_OS_BSD_OPEN_H +#define BOOST_PREDEF_OS_BSD_OPEN_H + +#include + +/*` +[heading `BOOST_OS_BSD_OPEN`] + +[@http://en.wikipedia.org/wiki/Openbsd OpenBSD] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`__OpenBSD__`] [__predef_detection__]] + + [[`OpenBSD2_0`] [2.0.0]] + [[`OpenBSD2_1`] [2.1.0]] + [[`OpenBSD2_2`] [2.2.0]] + [[`OpenBSD2_3`] [2.3.0]] + [[`OpenBSD2_4`] [2.4.0]] + [[`OpenBSD2_5`] [2.5.0]] + [[`OpenBSD2_6`] [2.6.0]] + [[`OpenBSD2_7`] [2.7.0]] + [[`OpenBSD2_8`] [2.8.0]] + [[`OpenBSD2_9`] [2.9.0]] + [[`OpenBSD3_0`] [3.0.0]] + [[`OpenBSD3_1`] [3.1.0]] + [[`OpenBSD3_2`] [3.2.0]] + [[`OpenBSD3_3`] [3.3.0]] + [[`OpenBSD3_4`] [3.4.0]] + [[`OpenBSD3_5`] [3.5.0]] + [[`OpenBSD3_6`] [3.6.0]] + [[`OpenBSD3_7`] [3.7.0]] + [[`OpenBSD3_8`] [3.8.0]] + [[`OpenBSD3_9`] [3.9.0]] + [[`OpenBSD4_0`] [4.0.0]] + [[`OpenBSD4_1`] [4.1.0]] + [[`OpenBSD4_2`] [4.2.0]] + [[`OpenBSD4_3`] [4.3.0]] + [[`OpenBSD4_4`] [4.4.0]] + [[`OpenBSD4_5`] [4.5.0]] + [[`OpenBSD4_6`] [4.6.0]] + [[`OpenBSD4_7`] [4.7.0]] + [[`OpenBSD4_8`] [4.8.0]] + [[`OpenBSD4_9`] [4.9.0]] + ] + */ + +#define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ + defined(__OpenBSD__) \ + ) +# ifndef BOOST_OS_BSD_AVAILABLE +# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE +# define BOOST_OS_BSD_AVAILABLE +# endif +# undef BOOST_OS_BSD_OPEN +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_0) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,0,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_1) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,1,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_2) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,2,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_3) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,3,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_4) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,4,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_5) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,5,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_6) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,6,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_7) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,7,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_8) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,8,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD2_9) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(2,9,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_0) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_1) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,1,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_2) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,2,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_3) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,3,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_4) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,4,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_5) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,5,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_6) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,6,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_7) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,7,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_8) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,8,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD3_9) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(3,9,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_0) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_1) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,1,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_2) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,2,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_3) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,3,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_4) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,4,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_5) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,5,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_6) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,6,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_7) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,7,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_8) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,8,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) && defined(OpenBSD4_9) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER(4,9,0) +# endif +# if !defined(BOOST_OS_BSD_OPEN) +# define BOOST_OS_BSD_OPEN BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_OS_BSD_OPEN +# define BOOST_OS_BSD_OPEN_AVAILABLE +# include +#endif + +#define BOOST_OS_BSD_OPEN_NAME "OpenBSD" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_OPEN,BOOST_OS_BSD_OPEN_NAME) + +#endif diff --git a/boost/boost/predef/os/macos.h b/boost/boost/predef/os/macos.h new file mode 100644 index 0000000000..e625a6c763 --- /dev/null +++ b/boost/boost/predef/os/macos.h @@ -0,0 +1,58 @@ +/* +Copyright Redshift Software, Inc. 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_MACOS_H +#define BOOST_PREDEF_OS_MACOS_H + +#include +#include + +/*` +[heading `BOOST_OS_MACOS`] + +[@http://en.wikipedia.org/wiki/Mac_OS Mac OS] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`macintosh`] [__predef_detection__]] + [[`Macintosh`] [__predef_detection__]] + [[`__APPLE__`] [__predef_detection__]] + [[`__MACH__`] [__predef_detection__]] + + [[`__APPLE__`, `__MACH__`] [10.0.0]] + [[ /otherwise/ ] [9.0.0]] + ] + */ + +#define BOOST_OS_MACOS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ + defined(macintosh) || defined(Macintosh) || \ + (defined(__APPLE__) && defined(__MACH__)) \ + ) +# undef BOOST_OS_MACOS +# if !defined(BOOST_OS_MACOS) && defined(__APPLE__) && defined(__MACH__) +# define BOOST_OS_MACOS BOOST_VERSION_NUMBER(10,0,0) +# endif +# if !defined(BOOST_OS_MACOS) +# define BOOST_OS_MACOS BOOST_VERSION_NUMBER(9,0,0) +# endif +#endif + +#if BOOST_OS_MACOS +# define BOOST_OS_MACOS_AVAILABLE +# include +#endif + +#define BOOST_OS_MACOS_NAME "Mac OS" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_MACOS,BOOST_OS_MACOS_NAME) + + +#endif diff --git a/boost/boost/predef/os/windows.h b/boost/boost/predef/os/windows.h new file mode 100644 index 0000000000..1316963b04 --- /dev/null +++ b/boost/boost/predef/os/windows.h @@ -0,0 +1,51 @@ +/* +Copyright Redshift Software, Inc. 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_WINDOWS_H +#define BOOST_PREDEF_OS_WINDOWS_H + +#include +#include + +/*` +[heading `BOOST_OS_WINDOWS`] + +[@http://en.wikipedia.org/wiki/Category:Microsoft_Windows Microsoft Windows] operating system. + +[table + [[__predef_symbol__] [__predef_version__]] + + [[`_WIN32`] [__predef_detection__]] + [[`_WIN64`] [__predef_detection__]] + [[`__WIN32__`] [__predef_detection__]] + [[`__TOS_WIN__`] [__predef_detection__]] + [[`__WINDOWS__`] [__predef_detection__]] + ] + */ + +#define BOOST_OS_WINDOWS BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if !BOOST_PREDEF_DETAIL_OS_DETECTED && ( \ + defined(_WIN32) || defined(_WIN64) || \ + defined(__WIN32__) || defined(__TOS_WIN__) || \ + defined(__WINDOWS__) \ + ) +# undef BOOST_OS_WINDOWS +# define BOOST_OS_WINDOWS BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_OS_WINDOWS +# define BOOST_OS_WINDOWS_AVAILABLE +# include +#endif + +#define BOOST_OS_WINDOWS_NAME "Microsoft Windows" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_OS_WINDOWS,BOOST_OS_WINDOWS_NAME) + +#endif diff --git a/boost/boost/predef/other/endian.h b/boost/boost/predef/other/endian.h new file mode 100644 index 0000000000..9d2a8bcc20 --- /dev/null +++ b/boost/boost/predef/other/endian.h @@ -0,0 +1,205 @@ +/* +Copyright Redshift Software, Inc. 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_ENDIAN_H +#define BOOST_PREDEF_ENDIAN_H + +#include +#include +#include +#include +#include + +/*` +[heading `BOOST_ENDIAN_*`] + +Detection of endian memory ordering. There are four defined macros +in this header that define the various generally possible endian +memory orderings: + +* `BOOST_ENDIAN_BIG_BYTE`, byte-swapped big-endian. +* `BOOST_ENDIAN_BIG_WORD`, word-swapped big-endian. +* `BOOST_ENDIAN_LITTLE_BYTE`, byte-swapped little-endian. +* `BOOST_ENDIAN_LITTLE_WORD`, word-swapped little-endian. + +The detection is conservative in that it only identifies endianness +that it knows for certain. In particular bi-endianness is not +indicated as is it not practically possible to determine the +endianness from anything but an operating system provided +header. And the currently known headers do not define that +programatic bi-endianness is available. + +This implementation is a compilation of various publicly available +information and acquired knowledge: + +# The indispensable documentation of "Pre-defined Compiler Macros" + [@http://sourceforge.net/p/predef/wiki/Endianness Endianness]. +# The various endian specifications available in the + [@http://wikipedia.org/ Wikipedia] computer architecture pages. +# Generally available searches for headers that define endianness. + */ + +#define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_NOT_AVAILABLE +#define BOOST_ENDIAN_BIG_WORD BOOST_VERSION_NUMBER_NOT_AVAILABLE +#define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_NOT_AVAILABLE +#define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_NOT_AVAILABLE + +/* GNU libc provides a header defining __BYTE_ORDER, or _BYTE_ORDER. + * And some OSs provide some for of endian header also. + */ +#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ + !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD +# if BOOST_LIB_C_GNU +# include +# else +# if BOOST_OS_MACOS +# include +# else +# if BOOST_OS_BSD +# if BOOST_OS_BSD_OPEN +# include +# else +# include +# endif +# endif +# endif +# endif +# if defined(__BYTE_ORDER) +# if (__BYTE_ORDER == __BIG_ENDIAN) +# undef BOOST_ENDIAN_BIG_BYTE +# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if (__BYTE_ORDER == __LITTLE_ENDIAN) +# undef BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if (__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) +# undef BOOST_ENDIAN_BIG_BYTE +# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if (_BYTE_ORDER == _LITTLE_ENDIAN) +# undef BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if (_BYTE_ORDER == _PDP_ENDIAN) +# undef BOOST_ENDIAN_LITTLE_WORD +# define BOOST_ENDIAN_LITTLE_WORD BOOST_VERSION_NUMBER_AVAILABLE +# endif +# endif +#endif + +/* Built-in byte-swpped big-endian macros. + */ +#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 +# endif +#endif + +/* Built-in byte-swpped little-endian macros. + */ +#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 +# endif +#endif + +/* Some architectures are strictly one endianess (as opposed + * the current common bi-endianess). + */ +#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ + !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD +# include +# if BOOST_ARCH_M68K || \ + BOOST_ARCH_PARISK || \ + BOOST_ARCH_SYS370 || \ + BOOST_ARCH_SYS390 || \ + BOOST_ARCH_Z +# undef BOOST_ENDIAN_BIG_BYTE +# define BOOST_ENDIAN_BIG_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# if BOOST_ARCH_AMD64 || \ + BOOST_ARCH_IA64 || \ + BOOST_ARCH_X86 || \ + BOOST_ARCH_BLACKFIN +# undef BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +/* Windows on ARM, if not otherwise detected/specified, is always + * byte-swaped little-endian. + */ +#if !BOOST_ENDIAN_BIG_BYTE && !BOOST_ENDIAN_BIG_WORD && \ + !BOOST_ENDIAN_LITTLE_BYTE && !BOOST_ENDIAN_LITTLE_WORD +# if BOOST_ARCH_ARM +# include +# if BOOST_OS_WINDOWS +# undef BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE BOOST_VERSION_NUMBER_AVAILABLE +# endif +# endif +#endif + +#if BOOST_ENDIAN_BIG_BYTE +# define BOOST_ENDIAN_BIG_BYTE_AVAILABLE +#endif +#if BOOST_ENDIAN_BIG_WORD +# define BOOST_ENDIAN_BIG_WORD_BYTE_AVAILABLE +#endif +#if BOOST_ENDIAN_LITTLE_BYTE +# define BOOST_ENDIAN_LITTLE_BYTE_AVAILABLE +#endif +#if BOOST_ENDIAN_LITTLE_WORD +# define BOOST_ENDIAN_LITTLE_WORD_BYTE_AVAILABLE +#endif + +#define BOOST_ENDIAN_BIG_BYTE_NAME "Byte-Swapped Big-Endian" +#define BOOST_ENDIAN_BIG_WORD_NAME "Word-Swapped Big-Endian" +#define BOOST_ENDIAN_LITTLE_BYTE_NAME "Byte-Swapped Little-Endian" +#define BOOST_ENDIAN_LITTLE_WORD_NAME "Word-Swapped Little-Endian" + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ENDIAN_BIG_BYTE,BOOST_ENDIAN_BIG_BYTE_NAME) + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ENDIAN_BIG_WORD,BOOST_ENDIAN_BIG_WORD_NAME) + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ENDIAN_LITTLE_BYTE,BOOST_ENDIAN_LITTLE_BYTE_NAME) + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ENDIAN_LITTLE_WORD,BOOST_ENDIAN_LITTLE_WORD_NAME) + + +#endif diff --git a/boost/boost/predef/version_number.h b/boost/boost/predef/version_number.h new file mode 100644 index 0000000000..2ecccd2ef0 --- /dev/null +++ b/boost/boost/predef/version_number.h @@ -0,0 +1,54 @@ +/* +Copyright Rene Rivera 2005 +Copyright Redshift Software, Inc. 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_VERSION_NUMBER_H +#define BOOST_PREDEF_VERSION_NUMBER_H + +/*` +[heading `BOOST_VERSION_NUMBER`] + +`` +BOOST_VERSION_NUMBER(major,minor,patch) +`` + +Defines standard version numbers, with these properties: + +* Decimal base whole numbers in the range \[0,1000000000). + The number range is designed to allow for a (2,2,5) triplet. + Which fits within a 32 bit value. +* The `major` number can be in the \[0,99\] range. +* The `minor` number can be in the \[0,99\] range. +* The `patch` number can be in the \[0,99999\] range. +* Values can be specified in any base. As the defined value + is an constant expression. +* Value can be directly used in both preprocessor and compiler + expressions for comparison to other similarly defined values. +* The implementation enforces the individual ranges for the + major, minor, and patch numbers. And values over the ranges + are truncated (modulo). + +*/ +#define BOOST_VERSION_NUMBER(major,minor,patch) \ + ( (((major)%100)*10000000) + (((minor)%100)*100000) + ((patch)%100000) ) + +#define BOOST_VERSION_NUMBER_MAX \ + BOOST_VERSION_NUMBER(99,99,99999) + +#define BOOST_VERSION_NUMBER_ZERO \ + BOOST_VERSION_NUMBER(0,0,0) + +#define BOOST_VERSION_NUMBER_MIN \ + BOOST_VERSION_NUMBER(0,0,1) + +#define BOOST_VERSION_NUMBER_AVAILABLE \ + BOOST_VERSION_NUMBER_MIN + +#define BOOST_VERSION_NUMBER_NOT_AVAILABLE \ + BOOST_VERSION_NUMBER_ZERO + +#endif diff --git a/boost/boost/preprocessor/tuple/rem.hpp b/boost/boost/preprocessor/tuple/rem.hpp index 4e3362cb86..af668a02ea 100644 --- a/boost/boost/preprocessor/tuple/rem.hpp +++ b/boost/boost/preprocessor/tuple/rem.hpp @@ -38,6 +38,7 @@ # endif # define BOOST_PP_TUPLE_REM_I(size) BOOST_PP_TUPLE_REM_ ## size # endif +# define BOOST_PP_TUPLE_REM_0() # define BOOST_PP_TUPLE_REM_1(e0) e0 # define BOOST_PP_TUPLE_REM_2(e0, e1) e0, e1 # define BOOST_PP_TUPLE_REM_3(e0, e1, e2) e0, e1, e2 diff --git a/boost/boost/range/concepts.hpp b/boost/boost/range/concepts.hpp index 5965293a3e..5a02a21d8d 100644 --- a/boost/boost/range/concepts.hpp +++ b/boost/boost/range/concepts.hpp @@ -330,8 +330,8 @@ namespace boost { struct BidirectionalRangeConcept : ForwardRangeConcept { #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT - BOOST_RANGE_CONCEPT_ASSERT((BidirectionalIteratorConcept)); - BOOST_RANGE_CONCEPT_ASSERT((BidirectionalIteratorConcept)); + BOOST_RANGE_CONCEPT_ASSERT((range_detail::BidirectionalIteratorConcept)); + BOOST_RANGE_CONCEPT_ASSERT((range_detail::BidirectionalIteratorConcept)); #endif }; @@ -348,8 +348,8 @@ namespace boost { struct RandomAccessRangeConcept : BidirectionalRangeConcept { #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT - BOOST_RANGE_CONCEPT_ASSERT((RandomAccessIteratorConcept)); - BOOST_RANGE_CONCEPT_ASSERT((RandomAccessIteratorConcept)); + BOOST_RANGE_CONCEPT_ASSERT((range_detail::RandomAccessIteratorConcept)); + BOOST_RANGE_CONCEPT_ASSERT((range_detail::RandomAccessIteratorConcept)); #endif }; diff --git a/boost/boost/range/detail/extract_optional_type.hpp b/boost/boost/range/detail/extract_optional_type.hpp index 8292e34fa6..4a7f71a21e 100644 --- a/boost/boost/range/detail/extract_optional_type.hpp +++ b/boost/boost/range/detail/extract_optional_type.hpp @@ -16,7 +16,7 @@ #include -#ifdef BOOST_NO_PARTIAL_TEMPLATE_SPECIALIZATION +#ifdef BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS #define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \ template< typename C > \ diff --git a/boost/boost/range/iterator_range_core.hpp b/boost/boost/range/iterator_range_core.hpp index 60c7670ef9..6e689923ec 100644 --- a/boost/boost/range/iterator_range_core.hpp +++ b/boost/boost/range/iterator_range_core.hpp @@ -21,7 +21,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -167,7 +169,8 @@ namespace boost private: // for return value of operator()() typedef BOOST_DEDUCED_TYPENAME - boost::mpl::if_< boost::is_abstract, + boost::mpl::if_< boost::mpl::or_< boost::is_abstract< value_type >, + boost::is_array< value_type > >, reference, value_type >::type abstract_value_type; public: diff --git a/boost/boost/regex/icu.hpp b/boost/boost/regex/icu.hpp index 772806e97c..a8c52814de 100644 --- a/boost/boost/regex/icu.hpp +++ b/boost/boost/regex/icu.hpp @@ -423,7 +423,7 @@ bool do_regex_match(BidiIterator first, BidiIterator last, { typedef u16_to_u32_iterator conv_type; typedef match_results match_type; - typedef typename match_type::allocator_type alloc_type; + //typedef typename match_type::allocator_type alloc_type; match_type what; bool result = ::boost::regex_match(conv_type(first, first, last), conv_type(last, first, last), what, e, flags); // copy results across to m: @@ -439,7 +439,7 @@ bool do_regex_match(BidiIterator first, BidiIterator last, { typedef u8_to_u32_iterator conv_type; typedef match_results match_type; - typedef typename match_type::allocator_type alloc_type; + //typedef typename match_type::allocator_type alloc_type; match_type what; bool result = ::boost::regex_match(conv_type(first, first, last), conv_type(last, first, last), what, e, flags); // copy results across to m: @@ -598,7 +598,7 @@ bool do_regex_search(BidiIterator first, BidiIterator last, { typedef u16_to_u32_iterator conv_type; typedef match_results match_type; - typedef typename match_type::allocator_type alloc_type; + //typedef typename match_type::allocator_type alloc_type; match_type what; bool result = ::boost::regex_search(conv_type(first, first, last), conv_type(last, first, last), what, e, flags, conv_type(base)); // copy results across to m: @@ -615,7 +615,7 @@ bool do_regex_search(BidiIterator first, BidiIterator last, { typedef u8_to_u32_iterator conv_type; typedef match_results match_type; - typedef typename match_type::allocator_type alloc_type; + //typedef typename match_type::allocator_type alloc_type; match_type what; bool result = ::boost::regex_search(conv_type(first, first, last), conv_type(last, first, last), what, e, flags, conv_type(base)); // copy results across to m: diff --git a/boost/boost/regex/pending/static_mutex.hpp b/boost/boost/regex/pending/static_mutex.hpp index 9c10050b23..5459ef8698 100644 --- a/boost/boost/regex/pending/static_mutex.hpp +++ b/boost/boost/regex/pending/static_mutex.hpp @@ -36,14 +36,7 @@ // namespace boost{ -class BOOST_REGEX_DECL scoped_static_mutex_lock; - -class static_mutex -{ -public: - typedef scoped_static_mutex_lock scoped_lock; - pthread_mutex_t m_mutex; -}; +class static_mutex; #define BOOST_STATIC_MUTEX_INIT { PTHREAD_MUTEX_INITIALIZER, } @@ -67,6 +60,12 @@ private: bool m_have_lock; }; +class static_mutex +{ +public: + typedef scoped_static_mutex_lock scoped_lock; + pthread_mutex_t m_mutex; +}; } // namespace boost #elif defined(BOOST_HAS_WINTHREADS) diff --git a/boost/boost/regex/v4/basic_regex_creator.hpp b/boost/boost/regex/v4/basic_regex_creator.hpp index efb649cd79..c99d320de4 100644 --- a/boost/boost/regex/v4/basic_regex_creator.hpp +++ b/boost/boost/regex/v4/basic_regex_creator.hpp @@ -738,14 +738,14 @@ void basic_regex_creator::fixup_pointers(re_syntax_base* state) case syntax_element_long_set_rep: // set the state_id of this repeat: static_cast(state)->state_id = m_repeater_id++; - // fall through: + BOOST_FALLTHROUGH; case syntax_element_alt: std::memset(static_cast(state)->_map, 0, sizeof(static_cast(state)->_map)); static_cast(state)->can_be_null = 0; - // fall through: + BOOST_FALLTHROUGH; case syntax_element_jump: static_cast(state)->alt.p = getaddress(static_cast(state)->alt.i, state); - // fall through again: + BOOST_FALLTHROUGH; default: if(state->next.i) state->next.p = getaddress(state->next.i, state); @@ -877,6 +877,7 @@ void basic_regex_creator::fixup_recursions(re_syntax_base* state) } } } + break; default: break; } @@ -941,7 +942,7 @@ void basic_regex_creator::create_startmaps(re_syntax_base* state) e.raise(); } } - // fall through: + BOOST_FALLTHROUGH; default: state = state->next.p; } @@ -1153,13 +1154,14 @@ void basic_regex_creator::create_startmap(re_syntax_base* state, break; } m_recursion_checks[recursion_sub] = true; - // fall through, can't handle nested recursion here... + // can't handle nested recursion here... + BOOST_FALLTHROUGH; } case syntax_element_backref: // can be null, and any character can match: if(pnull) *pnull |= mask; - // fall through: + BOOST_FALLTHROUGH; case syntax_element_wild: { // can't be null, any character can match: @@ -1359,7 +1361,7 @@ void basic_regex_creator::create_startmap(re_syntax_base* state, state = state->next.p->next.p; break; } - // otherwise fall through: + BOOST_FALLTHROUGH; default: state = state->next.p; } @@ -1456,6 +1458,7 @@ void basic_regex_creator::set_bad_repeat(re_syntax_base* pt) if(state_id <= sizeof(m_bad_repeats) * CHAR_BIT) m_bad_repeats |= (one << state_id); } + break; default: break; } @@ -1537,7 +1540,7 @@ void basic_regex_creator::probe_leading_repeat(re_syntax_base* st case syntax_element_long_set_rep: if(this->m_has_backrefs == 0) static_cast(state)->leading = true; - // fall through: + BOOST_FALLTHROUGH; default: return; } diff --git a/boost/boost/regex/v4/basic_regex_parser.hpp b/boost/boost/regex/v4/basic_regex_parser.hpp index 72dc4eeb4c..4b103f2257 100644 --- a/boost/boost/regex/v4/basic_regex_parser.hpp +++ b/boost/boost/regex/v4/basic_regex_parser.hpp @@ -369,7 +369,7 @@ bool basic_regex_parser::parse_extended() while((m_position != m_end) && !is_separator(*m_position++)){} return true; } - // Otherwise fall through: + BOOST_FALLTHROUGH; default: result = parse_literal(); break; @@ -623,7 +623,7 @@ bool basic_regex_parser::parse_basic_escape() { case 'w': negate = false; - // fall through: + BOOST_FALLTHROUGH; case 'W': { basic_char_set char_set; @@ -640,7 +640,7 @@ bool basic_regex_parser::parse_basic_escape() } case 's': negate = false; - // fall through: + BOOST_FALLTHROUGH; case 'S': return add_emacs_code(negate); case 'c': @@ -672,7 +672,7 @@ bool basic_regex_parser::parse_extended_escape() { case regex_constants::escape_type_not_class: negate = true; - // fall through: + BOOST_FALLTHROUGH; case regex_constants::escape_type_class: { escape_type_class_jump: @@ -742,7 +742,7 @@ escape_type_class_jump: break; case regex_constants::escape_type_not_property: negate = true; - // fall through: + BOOST_FALLTHROUGH; case regex_constants::escape_type_property: { ++m_position; @@ -901,7 +901,7 @@ escape_type_class_jump: case regex_constants::escape_type_control_v: if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) goto escape_type_class_jump; - // fallthrough: + BOOST_FALLTHROUGH; default: this->append_literal(unescape_character()); break; @@ -1070,26 +1070,46 @@ bool basic_regex_parser::parse_repeat_range(bool isbasic) // skip whitespace: while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) ++m_position; - // fail if at end: if(this->m_position == this->m_end) { - fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); - return false; + if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) + { + fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); + return false; + } + // Treat the opening '{' as a literal character, rewind to start of error: + --m_position; + while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; + return parse_literal(); } // get min: v = this->m_traits.toi(m_position, m_end, 10); // skip whitespace: - while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) - ++m_position; if(v < 0) { - fail(regex_constants::error_badbrace, this->m_position - this->m_base); - return false; + if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) + { + fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); + return false; + } + // Treat the opening '{' as a literal character, rewind to start of error: + --m_position; + while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; + return parse_literal(); } - else if(this->m_position == this->m_end) + while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) + ++m_position; + if(this->m_position == this->m_end) { - fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); - return false; + if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) + { + fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); + return false; + } + // Treat the opening '{' as a literal character, rewind to start of error: + --m_position; + while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; + return parse_literal(); } min = v; // see if we have a comma: @@ -1102,12 +1122,19 @@ bool basic_regex_parser::parse_repeat_range(bool isbasic) ++m_position; if(this->m_position == this->m_end) { - fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); - return false; + if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) + { + fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); + return false; + } + // Treat the opening '{' as a literal character, rewind to start of error: + --m_position; + while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; + return parse_literal(); } // get the value if any: v = this->m_traits.toi(m_position, m_end, 10); - max = (v >= 0) ? v : (std::numeric_limits::max)(); + max = (v >= 0) ? (std::size_t)v : (std::numeric_limits::max)(); } else { @@ -1120,8 +1147,15 @@ bool basic_regex_parser::parse_repeat_range(bool isbasic) // OK now check trailing }: if(this->m_position == this->m_end) { - fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); - return false; + if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) + { + fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); + return false; + } + // Treat the opening '{' as a literal character, rewind to start of error: + --m_position; + while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; + return parse_literal(); } if(isbasic) { @@ -1144,8 +1178,10 @@ bool basic_regex_parser::parse_repeat_range(bool isbasic) ++m_position; else { - fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); - return false; + // Treat the opening '{' as a literal character, rewind to start of error: + --m_position; + while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; + return parse_literal(); } // // finally go and add the repeat, unless error: @@ -1959,7 +1995,7 @@ bool basic_regex_parser::parse_perl_extension() { case regex_constants::syntax_or: m_mark_reset = m_mark_count; - // fall through: + BOOST_FALLTHROUGH; case regex_constants::syntax_colon: // // a non-capturing mark: diff --git a/boost/boost/regex/v4/perl_matcher_common.hpp b/boost/boost/regex/v4/perl_matcher_common.hpp index b8c4e963ca..9a80e5038b 100644 --- a/boost/boost/regex/v4/perl_matcher_common.hpp +++ b/boost/boost/regex/v4/perl_matcher_common.hpp @@ -65,6 +65,8 @@ void perl_matcher::construct_init(const basic_r m_match_flags |= match_perl; else if((re_f & (regbase::main_option_type|regbase::emacs_ex)) == (regbase::basic_syntax_group|regbase::emacs_ex)) m_match_flags |= match_perl; + else if((re_f & (regbase::main_option_type|regbase::literal)) == (regbase::literal)) + m_match_flags |= match_perl; else m_match_flags |= match_posix; } @@ -326,6 +328,10 @@ bool perl_matcher::match_prefix() m_has_found_match = true; m_presult->set_second(last, 0, false); position = last; + if((m_match_flags & match_posix) == match_posix) + { + m_result.maybe_assign(*m_presult); + } } #ifdef BOOST_REGEX_MATCH_EXTRA if(m_has_found_match && (match_extra & m_match_flags)) diff --git a/boost/boost/regex/v4/perl_matcher_non_recursive.hpp b/boost/boost/regex/v4/perl_matcher_non_recursive.hpp index f5eb3feb42..5c1f7a98b0 100644 --- a/boost/boost/regex/v4/perl_matcher_non_recursive.hpp +++ b/boost/boost/regex/v4/perl_matcher_non_recursive.hpp @@ -703,7 +703,13 @@ bool perl_matcher::match_char_repeat() if(::boost::is_random_access_iterator::value) { BidiIterator end = position; - std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired)); + // Move end forward by "desired", preferably without using distance or advance if we can + // as these can be slow for some iterator types. + std::size_t len = (desired == (std::numeric_limits::max)()) ? 0u : ::boost::re_detail::distance(position, last); + if(desired >= len) + end = last; + else + std::advance(end, desired); BidiIterator origin(position); while((position != end) && (traits_inst.translate(*position, icase) == what)) { @@ -771,7 +777,13 @@ bool perl_matcher::match_set_repeat() if(::boost::is_random_access_iterator::value) { BidiIterator end = position; - std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired)); + // Move end forward by "desired", preferably without using distance or advance if we can + // as these can be slow for some iterator types. + std::size_t len = (desired == (std::numeric_limits::max)()) ? 0u : ::boost::re_detail::distance(position, last); + if(desired >= len) + end = last; + else + std::advance(end, desired); BidiIterator origin(position); while((position != end) && map[static_cast(traits_inst.translate(*position, icase))]) { @@ -840,7 +852,13 @@ bool perl_matcher::match_long_set_repeat() if(::boost::is_random_access_iterator::value) { BidiIterator end = position; - std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired)); + // Move end forward by "desired", preferably without using distance or advance if we can + // as these can be slow for some iterator types. + std::size_t len = (desired == (std::numeric_limits::max)()) ? 0u : ::boost::re_detail::distance(position, last); + if(desired >= len) + end = last; + else + std::advance(end, desired); BidiIterator origin(position); while((position != end) && (position != re_is_set_member(position, last, set, re.get_data(), icase))) { diff --git a/boost/boost/regex/v4/perl_matcher_recursive.hpp b/boost/boost/regex/v4/perl_matcher_recursive.hpp index 07a1c20f88..8e0e182b56 100644 --- a/boost/boost/regex/v4/perl_matcher_recursive.hpp +++ b/boost/boost/regex/v4/perl_matcher_recursive.hpp @@ -641,7 +641,13 @@ bool perl_matcher::match_set_repeat() if(::boost::is_random_access_iterator::value) { BidiIterator end = position; - std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired)); + // Move end forward by "desired", preferably without using distance or advance if we can + // as these can be slow for some iterator types. + std::size_t len = (desired == (std::numeric_limits::max)()) ? 0u : ::boost::re_detail::distance(position, last); + if(desired >= len) + end = last; + else + std::advance(end, desired); BidiIterator origin(position); while((position != end) && map[static_cast(traits_inst.translate(*position, icase))]) { @@ -731,7 +737,13 @@ bool perl_matcher::match_long_set_repeat() if(::boost::is_random_access_iterator::value) { BidiIterator end = position; - std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired)); + // Move end forward by "desired", preferably without using distance or advance if we can + // as these can be slow for some iterator types. + std::size_t len = (desired == (std::numeric_limits::max)()) ? 0u : ::boost::re_detail::distance(position, last); + if(desired >= len) + end = last; + else + std::advance(end, desired); BidiIterator origin(position); while((position != end) && (position != re_is_set_member(position, last, set, re.get_data(), icase))) { diff --git a/boost/boost/regex/v4/regex_format.hpp b/boost/boost/regex/v4/regex_format.hpp index 3b1d19da2a..80c654e40e 100644 --- a/boost/boost/regex/v4/regex_format.hpp +++ b/boost/boost/regex/v4/regex_format.hpp @@ -283,7 +283,8 @@ void basic_regex_formatter::format format_perl(); break; } - // fall through, not a special character: + // not a special character: + BOOST_FALLTHROUGH; default: put(*m_position); ++m_position; @@ -354,7 +355,7 @@ void basic_regex_formatter::format case '{': have_brace = true; ++m_position; - // fall through.... + BOOST_FALLTHROUGH; default: // see if we have a number: { @@ -1064,7 +1065,7 @@ struct format_functor_c_string template OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits()) { - typedef typename Match::char_type char_type; + //typedef typename Match::char_type char_type; const charT* end = func; while(*end) ++end; return regex_format_imp(i, m, func, end, f, t); @@ -1083,7 +1084,7 @@ struct format_functor_container template OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits()) { - typedef typename Match::char_type char_type; + //typedef typename Match::char_type char_type; return re_detail::regex_format_imp(i, m, func.begin(), func.end(), f, t); } private: diff --git a/boost/boost/regex/v4/regex_split.hpp b/boost/boost/regex/v4/regex_split.hpp index a7ae350f4a..534fb58e9a 100644 --- a/boost/boost/regex/v4/regex_split.hpp +++ b/boost/boost/regex/v4/regex_split.hpp @@ -107,7 +107,7 @@ std::size_t regex_split(OutputIterator out, std::size_t max_split) { typedef typename std::basic_string::const_iterator ci_t; - typedef typename match_results::allocator_type match_allocator; + //typedef typename match_results::allocator_type match_allocator; ci_t last = s.begin(); std::size_t init_size = max_split; re_detail::split_pred pred(&last, &out, &max_split); diff --git a/boost/boost/regex/v4/regex_traits_defaults.hpp b/boost/boost/regex/v4/regex_traits_defaults.hpp index ca13f195dc..a087d78449 100644 --- a/boost/boost/regex/v4/regex_traits_defaults.hpp +++ b/boost/boost/regex/v4/regex_traits_defaults.hpp @@ -3,12 +3,12 @@ * Copyright (c) 2004 * John Maddock * - * Use, modification and distribution are subject to the - * Boost Software License, Version 1.0. (See accompanying file + * 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) * */ - + /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_traits_defaults.hpp @@ -85,7 +85,7 @@ inline bool is_combining(unsigned char) return false; } #if !defined(__hpux) && !defined(__WINSCW__) // can't use WCHAR_MAX/MIN in pp-directives -#ifdef _MSC_VER +#ifdef _MSC_VER template<> inline bool is_combining(wchar_t c) { @@ -115,11 +115,11 @@ template inline bool is_separator(charT c) { return BOOST_REGEX_MAKE_BOOL( - (c == static_cast('\n')) - || (c == static_cast('\r')) - || (c == static_cast('\f')) - || (static_cast(c) == 0x2028u) - || (static_cast(c) == 0x2029u) + (c == static_cast('\n')) + || (c == static_cast('\r')) + || (c == static_cast('\f')) + || (static_cast(c) == 0x2028u) + || (static_cast(c) == 0x2029u) || (static_cast(c) == 0x85u)); } template <> @@ -177,7 +177,7 @@ int get_default_class_id(const charT* p1, const charT* p2) 'x', 'd', 'i', 'g', 'i', 't', }; - static const character_pointer_range ranges[21] = + static const character_pointer_range ranges[21] = { {data+0, data+5,}, // alnum {data+5, data+10,}, // alpha @@ -203,7 +203,7 @@ int get_default_class_id(const charT* p1, const charT* p2) }; static const character_pointer_range* ranges_begin = ranges; static const character_pointer_range* ranges_end = ranges + (sizeof(ranges)/sizeof(ranges[0])); - + character_pointer_range t = { p1, p2, }; const character_pointer_range* p = std::lower_bound(ranges_begin, ranges_end, t); if((p != ranges_end) && (t == *p)) @@ -324,15 +324,15 @@ inline const charT* get_escape_R_string() # pragma warning(push) # pragma warning(disable:4309 4245) #endif - static const charT e1[] = { '(', '?', '>', '\x0D', '\x0A', '?', - '|', '[', '\x0A', '\x0B', '\x0C', '\x85', '\\', 'x', '{', '2', '0', '2', '8', '}', + static const charT e1[] = { '(', '?', '>', '\x0D', '\x0A', '?', + '|', '[', '\x0A', '\x0B', '\x0C', static_cast('\x85'), '\\', 'x', '{', '2', '0', '2', '8', '}', '\\', 'x', '{', '2', '0', '2', '9', '}', ']', ')', '\0' }; - static const charT e2[] = { '(', '?', '>', '\x0D', '\x0A', '?', - '|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')', '\0' }; + static const charT e2[] = { '(', '?', '>', '\x0D', '\x0A', '?', + '|', '[', '\x0A', '\x0B', '\x0C', static_cast('\x85'), ']', ')', '\0' }; charT c = static_cast(0x2029u); bool b = (static_cast(c) == 0x2029u); - + return (b ? e1 : e2); #ifdef BOOST_MSVC # pragma warning(pop) @@ -346,7 +346,7 @@ inline const char* get_escape_R_string() # pragma warning(push) # pragma warning(disable:4309) #endif - static const char e2[] = { '(', '?', '>', '\x0D', '\x0A', '?', + static const char e2[] = { '(', '?', '>', '\x0D', '\x0A', '?', '|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')', '\0' }; return e2; #ifdef BOOST_MSVC diff --git a/boost/boost/signal.hpp b/boost/boost/signal.hpp index d1538e110d..7b31f36480 100644 --- a/boost/boost/signal.hpp +++ b/boost/boost/signal.hpp @@ -10,6 +10,14 @@ #ifndef BOOST_SIGNAL_HPP #define BOOST_SIGNAL_HPP +#ifndef BOOST_SIGNALS_NO_DEPRECATION_WARNING +# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__) +# pragma message ("Warning: Boost.Signals is no longer being maintained and is now deprecated. Please switch to Boost.Signals2. To disable this warning message, define BOOST_SIGNALS_NO_DEPRECATION_WARNING.") +# elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__) +# warning "Boost.Signals is no longer being maintained and is now deprecated. Please switch to Boost.Signals2. To disable this warning message, define BOOST_SIGNALS_NO_DEPRECATION_WARNING." +# endif +#endif + #ifndef BOOST_SIGNALS_MAX_ARGS # define BOOST_SIGNALS_MAX_ARGS 10 #endif diff --git a/boost/boost/smart_ptr/detail/allocate_array_helper.hpp b/boost/boost/smart_ptr/detail/allocate_array_helper.hpp index f7c64feb6c..2eeea2d3fa 100644 --- a/boost/boost/smart_ptr/detail/allocate_array_helper.hpp +++ b/boost/boost/smart_ptr/detail/allocate_array_helper.hpp @@ -33,10 +33,10 @@ namespace boost { 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) { + 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) @@ -107,9 +107,9 @@ namespace boost { struct rebind { typedef allocate_array_helper other; }; - allocate_array_helper(const A& allocator, T** data) - : allocator(allocator), - data(data) { + allocate_array_helper(const A& allocator_, T** data_) + : allocator(allocator_), + data(data_) { } template allocate_array_helper(const allocate_array_helper& other) diff --git a/boost/boost/smart_ptr/detail/array_deleter.hpp b/boost/boost/smart_ptr/detail/array_deleter.hpp index 11f23fa50e..20f84d1e7b 100644 --- a/boost/boost/smart_ptr/detail/array_deleter.hpp +++ b/boost/boost/smart_ptr/detail/array_deleter.hpp @@ -19,8 +19,8 @@ namespace boost { template class array_deleter { public: - array_deleter(std::size_t size) - : size(size), + array_deleter(std::size_t size_) + : size(size_), object(0) { } ~array_deleter() { diff --git a/boost/boost/smart_ptr/detail/make_array_helper.hpp b/boost/boost/smart_ptr/detail/make_array_helper.hpp index 38c9dc9b04..6cf048316d 100644 --- a/boost/boost/smart_ptr/detail/make_array_helper.hpp +++ b/boost/boost/smart_ptr/detail/make_array_helper.hpp @@ -31,9 +31,9 @@ namespace boost { struct rebind { typedef make_array_helper other; }; - make_array_helper(std::size_t size, T** data) - : size(sizeof(T) * size), - data(data) { + make_array_helper(std::size_t size_, T** data_) + : size(sizeof(T) * size_), + data(data_) { } template make_array_helper(const make_array_helper& other) @@ -72,7 +72,7 @@ namespace boost { memory->~Y(); } template - bool operator==(const make_array_helper& other) const { + bool operator==(const make_array_helper&) const { return true; } template @@ -99,8 +99,8 @@ namespace boost { struct rebind { typedef make_array_helper other; }; - make_array_helper(T** data) - : data(data) { + make_array_helper(T** data_) + : data(data_) { } template make_array_helper(const make_array_helper& other) @@ -138,7 +138,7 @@ namespace boost { memory->~Y(); } template - bool operator==(const make_array_helper& other) const { + bool operator==(const make_array_helper&) const { return true; } template diff --git a/boost/boost/smart_ptr/detail/shared_count.hpp b/boost/boost/smart_ptr/detail/shared_count.hpp index f055fd0dfd..8e1dd4810a 100644 --- a/boost/boost/smart_ptr/detail/shared_count.hpp +++ b/boost/boost/smart_ptr/detail/shared_count.hpp @@ -200,7 +200,7 @@ public: } catch( ... ) { - D()( p ); // delete p + D::operator_fn( p ); // delete p throw; } @@ -210,7 +210,7 @@ public: if( pi_ == 0 ) { - D()( p ); // delete p + D::operator_fn( p ); // delete p boost::throw_exception( std::bad_alloc() ); } @@ -286,7 +286,7 @@ public: } catch(...) { - D()( p ); + D::operator_fn( p ); if( pi_ != 0 ) { @@ -306,7 +306,7 @@ public: } else { - D()( p ); + D::operator_fn( p ); boost::throw_exception( std::bad_alloc() ); } diff --git a/boost/boost/smart_ptr/detail/yield_k.hpp b/boost/boost/smart_ptr/detail/yield_k.hpp index 23eadd808b..14af524944 100644 --- a/boost/boost/smart_ptr/detail/yield_k.hpp +++ b/boost/boost/smart_ptr/detail/yield_k.hpp @@ -30,7 +30,6 @@ #if defined(_MSC_VER) && _MSC_VER >= 1310 && ( defined(_M_IX86) || defined(_M_X64) ) extern "C" void _mm_pause(); -#pragma intrinsic( _mm_pause ) #define BOOST_SMT_PAUSE _mm_pause(); diff --git a/boost/boost/smart_ptr/make_shared_object.hpp b/boost/boost/smart_ptr/make_shared_object.hpp index 89a711684c..52a00cecd9 100644 --- a/boost/boost/smart_ptr/make_shared_object.hpp +++ b/boost/boost/smart_ptr/make_shared_object.hpp @@ -87,6 +87,10 @@ public: destroy(); } + static void operator_fn( T* ) // operator() can't be static + { + } + void * address() BOOST_NOEXCEPT { return storage_.data_; diff --git a/boost/boost/smart_ptr/shared_ptr.hpp b/boost/boost/smart_ptr/shared_ptr.hpp index d2781c1587..9259ca0f06 100644 --- a/boost/boost/smart_ptr/shared_ptr.hpp +++ b/boost/boost/smart_ptr/shared_ptr.hpp @@ -485,7 +485,7 @@ public: #endif // BOOST_NO_AUTO_PTR -#if !defined( BOOST_NO_CXX11_SMART_PTR ) +#if !defined( BOOST_NO_CXX11_SMART_PTR ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) template< class Y, class D > shared_ptr( std::unique_ptr< Y, D > && r ): px( r.get() ), pn() @@ -550,7 +550,7 @@ public: #endif // BOOST_NO_AUTO_PTR -#if !defined( BOOST_NO_CXX11_SMART_PTR ) +#if !defined( BOOST_NO_CXX11_SMART_PTR ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) template shared_ptr & operator=( std::unique_ptr && r ) diff --git a/boost/boost/static_assert.hpp b/boost/boost/static_assert.hpp index 0bc3ef66ff..d083a9c37d 100644 --- a/boost/boost/static_assert.hpp +++ b/boost/boost/static_assert.hpp @@ -17,10 +17,23 @@ #include #include +#if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) +// +// This is horrible, but it seems to be the only we can shut up the +// "anonymous variadic macros were introduced in C99 [-Wvariadic-macros]" +// warning that get spewed out otherwise in non-C++11 mode. +// +#pragma GCC system_header +#endif + #ifndef BOOST_NO_CXX11_STATIC_ASSERT -# define BOOST_STATIC_ASSERT_MSG( B, Msg ) static_assert(B, Msg) +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__) +# else +# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B ) +# endif #else -# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B ) +# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B ) #endif #ifdef __BORLANDC__ @@ -39,13 +52,33 @@ // then enable this: // #if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))) -# define BOOST_STATIC_ASSERT_BOOL_CAST( x ) ((x) == 0 ? false : true) +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) ((__VA_ARGS__) == 0 ? false : true) +# else +# define BOOST_STATIC_ASSERT_BOOL_CAST( x ) ((x) == 0 ? false : true) +# endif #else -# define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x) +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) (bool)(__VA_ARGS__) +# else +# define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x) +# endif +#endif +// +// If the compiler warns about unused typedefs then enable this: +// +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7))) +# define BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused)) +#else +# define BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE #endif #ifndef BOOST_NO_CXX11_STATIC_ASSERT -# define BOOST_STATIC_ASSERT( B ) static_assert(B, #B) +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, #__VA_ARGS__) +# else +# define BOOST_STATIC_ASSERT( B ) static_assert(B, #B) +# endif #else namespace boost{ @@ -91,17 +124,28 @@ template struct static_assert_test{}; typedef ::boost::static_assert_test<\ sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >)\ > boost_static_assert_typedef_ -#elif defined(BOOST_MSVC) +#elif defined(BOOST_MSVC) && defined(BOOST_NO_CXX11_VARIADIC_MACROS) #define BOOST_STATIC_ASSERT( B ) \ typedef ::boost::static_assert_test<\ sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST ( B ) >)>\ BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__) -#elif defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND) +#elif defined(BOOST_MSVC) +#define BOOST_STATIC_ASSERT(...) \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST (__VA_ARGS__) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__) +#elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && defined(BOOST_NO_CXX11_VARIADIC_MACROS) // agurt 15/sep/02: a special care is needed to force Intel C++ issue an error // instead of warning in case of failure # define BOOST_STATIC_ASSERT( B ) \ typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \ [ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >::value ] +#elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && !defined(BOOST_NO_CXX11_VARIADIC_MACROS) +// agurt 15/sep/02: a special care is needed to force Intel C++ issue an error +// instead of warning in case of failure +# define BOOST_STATIC_ASSERT(...) \ + typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \ + [ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >::value ] #elif defined(__sgi) // special version for SGI MIPSpro compiler #define BOOST_STATIC_ASSERT( B ) \ @@ -119,17 +163,30 @@ template struct static_assert_test{}; sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >) ) #else // generic version -#define BOOST_STATIC_ASSERT( B ) \ - typedef ::boost::static_assert_test<\ - sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >)>\ - BOOST_JOIN(boost_static_assert_typedef_, __LINE__) +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT( ... ) \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE +# else +# define BOOST_STATIC_ASSERT( B ) \ + typedef ::boost::static_assert_test<\ + sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >)>\ + BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE +# endif #endif #else // alternative enum based implementation: -#define BOOST_STATIC_ASSERT( B ) \ - enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ - = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) } +# ifndef BOOST_NO_CXX11_VARIADIC_MACROS +# define BOOST_STATIC_ASSERT( ... ) \ + enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ + = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( __VA_ARGS__ ) >) } +# else +# define BOOST_STATIC_ASSERT(B) \ + enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ + = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) } +# endif #endif #endif // defined(BOOST_NO_CXX11_STATIC_ASSERT) diff --git a/boost/boost/throw_exception.hpp b/boost/boost/throw_exception.hpp index c1bff4379f..200683ec25 100644 --- a/boost/boost/throw_exception.hpp +++ b/boost/boost/throw_exception.hpp @@ -1,6 +1,6 @@ #ifndef UUID_AA15E74A856F11E08B8D93F24824019B #define UUID_AA15E74A856F11E08B8D93F24824019B -#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) +#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) @@ -41,8 +41,11 @@ #if !defined( BOOST_EXCEPTION_DISABLE ) # include +#if !defined(BOOST_THROW_EXCEPTION_CURRENT_FUNCTION) # include -# define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_CURRENT_FUNCTION,__FILE__,__LINE__) +# define BOOST_THROW_EXCEPTION_CURRENT_FUNCTION BOOST_CURRENT_FUNCTION +#endif +# define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_THROW_EXCEPTION_CURRENT_FUNCTION,__FILE__,__LINE__) #else # define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x) #endif diff --git a/boost/boost/token_functions.hpp b/boost/boost/token_functions.hpp index 4d1a1dfcfb..98ea80b009 100644 --- a/boost/boost/token_functions.hpp +++ b/boost/boost/token_functions.hpp @@ -1,6 +1,6 @@ // Boost token_functions.hpp ------------------------------------------------// -// Copyright John R. Bandela 2001. +// Copyright John R. Bandela 2001. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at @@ -77,12 +77,12 @@ namespace std{ namespace boost{ //=========================================================================== // The escaped_list_separator class. Which is a model of TokenizerFunction - // An escaped list is a super-set of what is commonly known as a comma - // separated value (csv) list.It is separated into fields by a comma or + // An escaped list is a super-set of what is commonly known as a comma + // separated value (csv) list.It is separated into fields by a comma or // other character. If the delimiting character is inside quotes, then it is // counted as a regular character.To allow for embedded quotes in a field, - // there can be escape sequences using the \ much like C. - // The role of the comma, the quotation mark, and the escape + // there can be escape sequences using the \ much like C. + // The role of the comma, the quotation mark, and the escape // character (backslash \), can be assigned to other characters. struct escaped_list_error : public std::runtime_error{ @@ -181,7 +181,7 @@ namespace boost{ ++next; // The last character was a c, that means there is // 1 more blank field - last_ = true; + last_ = true; return true; } else tok+=*next; @@ -209,7 +209,7 @@ namespace boost{ // Assuming that the conditional will always get optimized out in the function // implementations, argument types are not a problem since both forms of character classifiers // expect an int. - + #if !defined(BOOST_NO_CWCTYPE) template struct traits_extension_details : public traits { @@ -238,7 +238,7 @@ namespace boost{ }; #endif - + // In case there is no cwctype header, we implement the checks manually. // We make use of the fact that the tested categories should fit in ASCII. template @@ -309,8 +309,8 @@ namespace boost{ template <> struct assign_or_plus_equal { template - static void assign(Iterator b, Iterator e, Token &t) { } - template + static void assign(Iterator , Iterator , Token &) { } + template static void plus_equal(Token &t, const Value &v) { t += v; } @@ -444,7 +444,7 @@ namespace boost{ typedef tokenizer_detail::traits_extension Traits; typedef std::basic_string string_type; public: - explicit + explicit char_separator(const Char* dropped_delims, const Char* kept_delims = 0, empty_token_policy empty_tokens = drop_empty_tokens) @@ -511,7 +511,7 @@ namespace boost{ m_output_done = true; assigner::assign(start,next,tok); return true; - } + } else return false; } @@ -524,10 +524,10 @@ namespace boost{ ++next; m_output_done = false; } - } + } else if (m_output_done == false && is_dropped(*next)) { m_output_done = true; - } + } else { if (is_dropped(*next)) start=++next; @@ -618,7 +618,7 @@ namespace boost{ } public: - explicit char_delimiters_separator(bool return_delims = false, + explicit char_delimiters_separator(bool return_delims = false, const Char* returnable = 0, const Char* nonreturnable = 0) : returnable_(returnable ? returnable : string_type().c_str()), @@ -636,7 +636,7 @@ namespace boost{ // skip past all nonreturnable delims // skip past the returnable only if we are not returning delims - for (;next!=end && ( is_nonret(*next) || (is_ret(*next) + for (;next!=end && ( is_nonret(*next) || (is_ret(*next) && !return_delims_ ) );++next) { } if (next == end) { diff --git a/boost/boost/type_traits.hpp b/boost/boost/type_traits.hpp index acd5aff672..9267a7170b 100644 --- a/boost/boost/type_traits.hpp +++ b/boost/boost/type_traits.hpp @@ -37,6 +37,8 @@ #include "boost/type_traits/has_trivial_constructor.hpp" #include "boost/type_traits/has_trivial_copy.hpp" #include "boost/type_traits/has_trivial_destructor.hpp" +#include "boost/type_traits/has_trivial_move_assign.hpp" +#include "boost/type_traits/has_trivial_move_constructor.hpp" #include "boost/type_traits/has_virtual_destructor.hpp" #include "boost/type_traits/is_abstract.hpp" #include "boost/type_traits/is_arithmetic.hpp" @@ -48,6 +50,7 @@ #include "boost/type_traits/is_compound.hpp" #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_empty.hpp" #include "boost/type_traits/is_enum.hpp" #include "boost/type_traits/is_float.hpp" @@ -59,6 +62,8 @@ #include "boost/type_traits/is_member_function_pointer.hpp" #include "boost/type_traits/is_member_object_pointer.hpp" #include "boost/type_traits/is_member_pointer.hpp" +#include "boost/type_traits/is_nothrow_move_assignable.hpp" +#include "boost/type_traits/is_nothrow_move_constructible.hpp" #include "boost/type_traits/is_object.hpp" #include "boost/type_traits/is_pod.hpp" #include "boost/type_traits/is_polymorphic.hpp" diff --git a/boost/boost/type_traits/common_type.hpp b/boost/boost/type_traits/common_type.hpp index 00129d1ecb..f057770568 100644 --- a/boost/boost/type_traits/common_type.hpp +++ b/boost/boost/type_traits/common_type.hpp @@ -24,8 +24,7 @@ #endif //----------------------------------------------------------------------------// -#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) && !defined(BOOST_TYPEOF_SILENT) -#define BOOST_TYPEOF_SILENT +#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) #include // boost wonders never cease! #endif diff --git a/boost/boost/type_traits/detail/has_binary_operator.hpp b/boost/boost/type_traits/detail/has_binary_operator.hpp index 9257bc2220..1fd26efb7d 100644 --- a/boost/boost/type_traits/detail/has_binary_operator.hpp +++ b/boost/boost/type_traits/detail/has_binary_operator.hpp @@ -31,7 +31,7 @@ // msvc: // warning C4018: '<' : signed/unsigned mismatch // warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data -// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect +// warning C4547: '*' : operator before comma has no effect; expected operator with side-effect // warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) // warning C4804: '<' : unsafe use of type 'bool' in operation // warning C4805: '==' : unsafe mix of type 'bool' and type 'char' in operation diff --git a/boost/boost/type_traits/has_trivial_move_assign.hpp b/boost/boost/type_traits/has_trivial_move_assign.hpp new file mode 100644 index 0000000000..db337f77e8 --- /dev/null +++ b/boost/boost/type_traits/has_trivial_move_assign.hpp @@ -0,0 +1,57 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// (C) Copyright Eric Friedman 2002-2003. +// (C) Copyright Antony Polukhin 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). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED +#define BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +template +struct has_trivial_move_assign_impl +{ +#ifdef BOOST_HAS_TRIVIAL_MOVE_ASSIGN + BOOST_STATIC_CONSTANT(bool, value = (BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T))); +#else + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_and< + ::boost::is_pod::value, + ::boost::type_traits::ice_not< ::boost::is_const::value >::value, + ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value + >::value)); +#endif +}; + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_move_assign,T,::boost::detail::has_trivial_move_assign_impl::value) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_assign,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_assign,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_assign,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_assign,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED diff --git a/boost/boost/type_traits/has_trivial_move_constructor.hpp b/boost/boost/type_traits/has_trivial_move_constructor.hpp new file mode 100644 index 0000000000..a3418340b4 --- /dev/null +++ b/boost/boost/type_traits/has_trivial_move_constructor.hpp @@ -0,0 +1,57 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// (C) Copyright Eric Friedman 2002-2003. +// (C) Copyright Antony Polukhin 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). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED +#define BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail { + +template +struct has_trivial_move_ctor_impl +{ +#ifdef BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR + BOOST_STATIC_CONSTANT(bool, value = (BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T))); +#else + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_and< + ::boost::is_pod::value, + ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value + >::value)); +#endif +}; + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_move_constructor,T,::boost::detail::has_trivial_move_ctor_impl::value) + +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_constructor,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_constructor,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_constructor,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_constructor,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED diff --git a/boost/boost/type_traits/intrinsics.hpp b/boost/boost/type_traits/intrinsics.hpp index 1799240038..799f9b63f5 100644 --- a/boost/boost/type_traits/intrinsics.hpp +++ b/boost/boost/type_traits/intrinsics.hpp @@ -24,7 +24,9 @@ // BOOST_IS_EMPTY(T) should evaluate to true if T is an empty class type (and not a union) // BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect // BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy +// BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(boost::move(t)) <==> memcpy // BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy +// BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = boost::move(u) <==> memcpy // BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect // BOOST_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw // BOOST_HAS_NOTHROW_COPY(T) should evaluate to true if T(t) can not throw @@ -106,6 +108,11 @@ // This one fails if the default alignment has been changed with /Zp: // # 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) +# endif + # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif @@ -183,6 +190,12 @@ # if __has_feature(is_polymorphic) # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) # endif +# if __has_feature(has_trivial_move_constructor) +# define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) __has_trivial_move_constructor(T) +# endif +# if __has_feature(has_trivial_move_assign) +# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) __has_trivial_move_assign(T) +# endif # define BOOST_ALIGNMENT_OF(T) __alignof(T) # define BOOST_HAS_TYPE_TRAITS_INTRINSICS diff --git a/boost/boost/type_traits/is_copy_constructible.hpp b/boost/boost/type_traits/is_copy_constructible.hpp new file mode 100644 index 0000000000..e90ecb76d9 --- /dev/null +++ b/boost/boost/type_traits/is_copy_constructible.hpp @@ -0,0 +1,122 @@ +// (C) Copyright Antony Polukhin 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). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail{ + +template +struct is_copy_constructible_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); +// ^ +#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_INTEL_CXX_VERSION) + +#ifdef BOOST_NO_CXX11_DECLTYPE + template + static boost::type_traits::yes_type test(T1&, boost::mpl::int_()))>* = 0); +#else + template + static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval()))* = 0); +#endif + + static boost::type_traits::no_type test(...); +#else + 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(...); +#endif + + // If you see errors like this: + // + // `'T::T(const T&)' is private` + // `boost/type_traits/is_copy_constructible.hpp:68:5: error: within this context` + // + // then you are trying to call that macro for a structure defined like that: + // + // struct T { + // ... + // private: + // T(const T &); + // ... + // }; + // + // To fix that you must modify your structure: + // + // // C++03 and C++11 version + // struct T: private boost::noncopyable { + // ... + // private: + // T(const T &); + // ... + // }; + // + // // C++11 version + // struct T { + // ... + // private: + // T(const T &) = delete; + // ... + // }; + BOOST_STATIC_CONSTANT(bool, value = ( + sizeof(test( + boost::declval::type>() + )) == sizeof(boost::type_traits::yes_type) + || + boost::is_rvalue_reference::value + )); +}; + +template +struct is_copy_constructible_impl2 { + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct is_copy_constructible_impl { + + BOOST_STATIC_CONSTANT(bool, value = ( + boost::detail::is_copy_constructible_impl2< + boost::is_base_and_derived::value, + T + >::value + )); +}; + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_copy_constructible,T,::boost::detail::is_copy_constructible_impl::value) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_copy_constructible,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_copy_constructible,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_copy_constructible,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_copy_constructible,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED diff --git a/boost/boost/type_traits/is_integral.hpp b/boost/boost/type_traits/is_integral.hpp index 4ca9734016..1ab27fd39c 100644 --- a/boost/boost/type_traits/is_integral.hpp +++ b/boost/boost/type_traits/is_integral.hpp @@ -73,6 +73,12 @@ BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,boost::int128_type,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,boost::uint128_type,true) #endif +#ifndef BOOST_NO_CXX11_CHAR16_T +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,char16_t,true) +#endif +#ifndef BOOST_NO_CXX11_CHAR32_T +BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,char32_t,true) +#endif #endif // non-CodeGear implementation diff --git a/boost/boost/type_traits/is_nothrow_move_assignable.hpp b/boost/boost/type_traits/is_nothrow_move_assignable.hpp new file mode 100644 index 0000000000..5a3427f909 --- /dev/null +++ b/boost/boost/type_traits/is_nothrow_move_assignable.hpp @@ -0,0 +1,84 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// (C) Copyright Eric Friedman 2002-2003. +// (C) Copyright Antony Polukhin 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). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED +#define BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail{ + +#ifndef BOOST_NO_CXX11_NOEXCEPT + +template +struct false_or_cpp11_noexcept_move_assignable: public ::boost::false_type {}; + +template +struct false_or_cpp11_noexcept_move_assignable < + T, + typename ::boost::enable_if_c() = ::boost::declval())>::type + > : public ::boost::integral_constant() = ::boost::declval())> +{}; + +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)); +}; + +#else + +template +struct is_nothrow_move_assignable_imp{ + BOOST_STATIC_CONSTANT(bool, value = ( + ::boost::type_traits::ice_and< + ::boost::type_traits::ice_or< + ::boost::has_trivial_move_assign::value, + ::boost::has_nothrow_assign::value + >::value, + ::boost::type_traits::ice_not< ::boost::is_array::value >::value + >::value)); +}; + +#endif + +} + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_nothrow_move_assignable,T,::boost::detail::is_nothrow_move_assignable_imp::value) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_assignable,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_assignable,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_assignable,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_assignable,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED diff --git a/boost/boost/type_traits/is_nothrow_move_constructible.hpp b/boost/boost/type_traits/is_nothrow_move_constructible.hpp new file mode 100644 index 0000000000..bc7fb888cd --- /dev/null +++ b/boost/boost/type_traits/is_nothrow_move_constructible.hpp @@ -0,0 +1,84 @@ + +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// (C) Copyright Eric Friedman 2002-2003. +// (C) Copyright Antony Polukhin 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). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { + +namespace detail{ + +#ifndef BOOST_NO_CXX11_NOEXCEPT + +template +struct false_or_cpp11_noexcept_move_constructible: public ::boost::false_type {}; + +template +struct false_or_cpp11_noexcept_move_constructible < + T, + typename ::boost::enable_if_c()))>::type + > : public ::boost::integral_constant()))> +{}; + +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)); +}; + +#else + +template +struct is_nothrow_move_constructible_imp{ + BOOST_STATIC_CONSTANT(bool, value =( + ::boost::type_traits::ice_and< + ::boost::type_traits::ice_or< + ::boost::has_trivial_move_constructor::value, + ::boost::has_nothrow_copy::value + >::value, + ::boost::type_traits::ice_not< ::boost::is_array::value >::value + >::value)); +}; + +#endif + +} + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_nothrow_move_constructible,T,::boost::detail::is_nothrow_move_constructible_imp::value) + +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_constructible,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_constructible,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_constructible,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_constructible,void volatile,false) +#endif + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED diff --git a/boost/boost/type_traits/is_pod.hpp b/boost/boost/type_traits/is_pod.hpp index 4691e662fe..b4e1733987 100644 --- a/boost/boost/type_traits/is_pod.hpp +++ b/boost/boost/type_traits/is_pod.hpp @@ -131,8 +131,10 @@ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void const volatile,true) } // namespace detail -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::detail::is_pod_impl::value) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pod,T,::boost::detail::is_pod_impl::value) +// is_POD is the old depricated name for this trait, do not use this as it may +// be removed in future without warning!! +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::is_pod::value) } // namespace boost diff --git a/boost/boost/utility/addressof.hpp b/boost/boost/utility/addressof.hpp index 95cd92fca9..ecb77764e6 100644 --- a/boost/boost/utility/addressof.hpp +++ b/boost/boost/utility/addressof.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2002 Brad King (brad.king@kitware.com) +// Copyright (C) 2002 Brad King (brad.king@kitware.com) // Douglas Gregor (gregod@cs.rpi.edu) // // Copyright (C) 2002, 2008 Peter Dimov @@ -50,7 +50,7 @@ template struct addressof_impl template T * addressof( T & v ) { -#if defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) +#if (defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) ) || defined( __SUNPRO_CC ) return boost::detail::addressof_impl::f( v, 0 ); diff --git a/boost/boost/utility/base_from_member.hpp b/boost/boost/utility/base_from_member.hpp index 04aabb59e2..e32ecb8d9c 100644 --- a/boost/boost/utility/base_from_member.hpp +++ b/boost/boost/utility/base_from_member.hpp @@ -1,6 +1,6 @@ // boost utility/base_from_member.hpp header file --------------------------// -// Copyright 2001, 2003, 2004 Daryle Walker. Use, modification, and +// Copyright 2001, 2003, 2004, 2012 Daryle Walker. Use, modification, and // distribution are subject to the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or a copy at // .) @@ -10,10 +10,15 @@ #ifndef BOOST_UTILITY_BASE_FROM_MEMBER_HPP #define BOOST_UTILITY_BASE_FROM_MEMBER_HPP +#include #include #include #include #include +#include +#include +#include +#include // Base-from-member arity configuration macro ------------------------------// @@ -53,6 +58,59 @@ namespace boost { +namespace detail +{ + +// Type-unmarking class template -------------------------------------------// + +// Type-trait to get the raw type, i.e. the type without top-level reference nor +// cv-qualification, from a type expression. Mainly for function arguments, any +// reference part is stripped first. + +// Contributed by Daryle Walker + +template < typename T > +struct remove_cv_ref +{ + typedef typename ::boost::remove_cv::type>::type type; + +}; // boost::detail::remove_cv_ref + +// Unmarked-type comparison class template ---------------------------------// + +// Type-trait to check if two type expressions have the same raw type. + +// Contributed by Daryle Walker, based on a work-around by Luc Danton + +template < typename T, typename U > +struct is_related + : public ::boost::is_same< + typename ::boost::detail::remove_cv_ref::type, + typename ::boost::detail::remove_cv_ref::type > +{}; + +// Enable-if-on-unidentical-unmarked-type class template -------------------// + +// Enable-if on the first two type expressions NOT having the same raw type. + +// Contributed by Daryle Walker, based on a work-around by Luc Danton + +#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES +template +struct enable_if_unrelated + : public ::boost::enable_if_c +{}; + +template +struct enable_if_unrelated + : public ::boost::disable_if< ::boost::detail::is_related > +{}; +#endif + +} // namespace boost::detail + + // Base-from-member class template -----------------------------------------// // Helper to initialize a base object so a derived class can use this @@ -68,12 +126,25 @@ class base_from_member protected: MemberType member; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \ + !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \ + !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && \ + !(defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 4)) + template ::type> + explicit BOOST_CONSTEXPR base_from_member( T&& ...x ) + BOOST_NOEXCEPT_IF( BOOST_NOEXCEPT_EXPR(::new ((void*) 0) MemberType( + static_cast(x)... )) ) // no std::is_nothrow_constructible... + : member( static_cast(x)... ) // ...nor std::forward needed + {} +#else base_from_member() : member() {} BOOST_PP_REPEAT_FROM_TO( 1, BOOST_PP_INC(BOOST_BASE_FROM_MEMBER_MAX_ARITY), BOOST_PRIVATE_CTR_DEF, _ ) +#endif }; // boost::base_from_member diff --git a/boost/boost/utility/declval.hpp b/boost/boost/utility/declval.hpp index d74610c584..a4ab2c8cb4 100644 --- a/boost/boost/utility/declval.hpp +++ b/boost/boost/utility/declval.hpp @@ -1,49 +1,44 @@ -// common_type.hpp ---------------------------------------------------------// +// declval.hpp -------------------------------------------------------------// // Copyright 2010 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt -#ifndef BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP -#define BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP +#ifndef BOOST_UTILITY_DECLVAL_HPP +#define BOOST_UTILITY_DECLVAL_HPP #include //----------------------------------------------------------------------------// #include -//#include //----------------------------------------------------------------------------// // // // C++03 implementation of // +// 20.2.4 Function template declval [declval] // // Written by Vicente J. Botet Escriba // -//~ 20.3.4 Function template declval [declval] -//~ 1 The library provides the function template declval to simplify the definition of expressions which occur as -//~ unevaluated operands. -//~ 2 Remarks: If this function is used, the program is ill-formed. -//~ 3 Remarks: The template parameter T of declval may be an incomplete type. -//~ [ Example: - -//~ template -//~ decltype(static_cast(declval())) convert(From&&); - -//~ declares a function template convert which only participats in overloading if the type From can be -//~ explicitly converted to type To. For another example see class template common_type (20.7.6.6). —end -//~ example ] // // +// 1 The library provides the function template declval to simplify the +// definition of expressions which occur as unevaluated operands. +// 2 Remarks: If this function is used, the program is ill-formed. +// 3 Remarks: The template parameter T of declval may be an incomplete type. +// [ Example: +// +// template +// decltype(static_cast(declval())) convert(From&&); +// +// declares a function template convert which only participates in overloading +// if the type From can be explicitly converted to type To. For another example +// see class template common_type (20.9.7.6). -end example ] //----------------------------------------------------------------------------// namespace boost { -//#if !defined(BOOST_NO_RVALUE_REFERENCES) template typename add_rvalue_reference::type declval() BOOST_NOEXCEPT; // as unevaluated operand -//#else -// template -// typename add_lvalue_reference::type declval() BOOST_NOEXCEPT; // as unevaluated operand -//#endif + } // namespace boost -#endif // BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP +#endif // BOOST_UTILITY_DECLVAL_HPP diff --git a/boost/boost/version.hpp b/boost/boost/version.hpp index e85ed123a4..0df7b2767b 100644 --- a/boost/boost/version.hpp +++ b/boost/boost/version.hpp @@ -19,7 +19,7 @@ // BOOST_VERSION / 100 % 1000 is the minor version // BOOST_VERSION / 100000 is the major version -#define BOOST_VERSION 105300 +#define BOOST_VERSION 105500 // // 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_53" +#define BOOST_LIB_VERSION "1_55" #endif diff --git a/boost/libs/regex/src/w32_regex_traits.cpp b/boost/libs/regex/src/w32_regex_traits.cpp index 8c22214d3c..cf4dc10fd1 100644 --- a/boost/libs/regex/src/w32_regex_traits.cpp +++ b/boost/libs/regex/src/w32_regex_traits.cpp @@ -283,9 +283,11 @@ BOOST_REGEX_DECL std::string BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, l if (r == 0) return def; - LPSTR buf = (LPSTR)_alloca( (r + 1) * 2 ); - if (::WideCharToMultiByte(CP_ACP, 0, wbuf, r, buf, (r + 1) * 2, NULL, NULL) == 0) - return def; + + int buf_size = 1 + ::WideCharToMultiByte(CP_ACP, 0, wbuf, r, NULL, 0, NULL, NULL); + LPSTR buf = (LPSTR)_alloca(buf_size); + if (::WideCharToMultiByte(CP_ACP, 0, wbuf, r, buf, buf_size, NULL, NULL) == 0) + return def; // failed conversion. #endif return std::string(buf); } @@ -485,7 +487,7 @@ BOOST_REGEX_DECL char BOOST_REGEX_CALL w32_tolower(char c, lcid_type idx) return c; if (::WideCharToMultiByte(code_page, 0, &wide_result, 1, result, 2, NULL, NULL) == 0) - return c; + return c; // No single byte lower case equivalent available #endif return result[0]; } @@ -556,7 +558,7 @@ BOOST_REGEX_DECL char BOOST_REGEX_CALL w32_toupper(char c, lcid_type idx) return c; if (::WideCharToMultiByte(code_page, 0, &wide_result, 1, result, 2, NULL, NULL) == 0) - return c; + return c; // No single byte upper case equivalent available. #endif return result[0]; }