#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 <algorithm>
#include <typeinfo>
#include "boost/config.hpp"
#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/decay.hpp>
+#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/is_const.hpp>
#include <boost/throw_exception.hpp>
#include <boost/static_assert.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_const.hpp>
// See boost/python/type_id.hpp
// TODO: add BOOST_TYPEID_COMPARE_BY_NAME to config.hpp
#include <cstring>
# 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<typename ValueType>
any(const ValueType & value)
- : content(new holder<ValueType>(value))
+ : content(new holder<BOOST_DEDUCED_TYPENAME decay<const ValueType>::type>(value))
{
}
{
}
- ~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<typename ValueType>
+ any(ValueType&& value
+ , typename boost::disable_if<boost::is_same<any&, ValueType> >::type* = 0 // disable if value has type `any&`
+ , typename boost::disable_if<boost::is_const<ValueType> >::type* = 0) // disable if value has type `const ValueType&&`
+ : content(new holder< typename decay<ValueType>::type >(static_cast<ValueType&&>(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<typename ValueType>
any & operator=(const ValueType & rhs)
{
}
any & operator=(any rhs)
+ {
+ 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 <class ValueType>
+ any & operator=(ValueType&& rhs)
+ {
+ any(static_cast<ValueType&&>(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);
}
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;
{
}
+#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);
}
private: // representation
template<typename ValueType>
- friend ValueType * any_cast(any *);
+ friend ValueType * any_cast(any *) BOOST_NOEXCEPT;
template<typename ValueType>
- friend ValueType * unsafe_any_cast(any *);
+ friend ValueType * unsafe_any_cast(any *) BOOST_NOEXCEPT;
#else
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";
};
template<typename ValueType>
- ValueType * any_cast(any * operand)
+ ValueType * any_cast(any * operand) BOOST_NOEXCEPT
{
return operand &&
#ifdef BOOST_AUX_ANY_TYPE_ID_NAME
}
template<typename ValueType>
- inline const ValueType * any_cast(const any * operand)
+ inline const ValueType * any_cast(const any * operand) BOOST_NOEXCEPT
{
return any_cast<ValueType>(const_cast<any *>(operand));
}
nonref * result = any_cast<nonref>(&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<std::string>(*result);`
+ // which is equal to `std::string(*result);`
+ typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_<
+ boost::is_reference<ValueType>,
+ ValueType,
+ BOOST_DEDUCED_TYPENAME boost::add_reference<ValueType>::type
+ >::type ref_type;
+
+ return static_cast<ref_type>(*result);
}
template<typename ValueType>
return any_cast<const nonref &>(const_cast<any &>(operand));
}
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template<typename ValueType>
+ inline ValueType&& any_cast(any&& operand)
+ {
+ BOOST_STATIC_ASSERT_MSG(
+ boost::is_rvalue_reference<ValueType&&>::value
+ || boost::is_const< typename boost::remove_reference<ValueType>::type >::value,
+ "boost::any_cast shall not be used for getting nonconst references to temporary objects"
+ );
+ return any_cast<ValueType&&>(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<typename ValueType>
- inline ValueType * unsafe_any_cast(any * operand)
+ inline ValueType * unsafe_any_cast(any * operand) BOOST_NOEXCEPT
{
return &static_cast<any::holder<ValueType> *>(operand->content)->held;
}
template<typename ValueType>
- inline const ValueType * unsafe_any_cast(const any * operand)
+ inline const ValueType * unsafe_any_cast(const any * operand) BOOST_NOEXCEPT
{
return unsafe_any_cast<ValueType>(const_cast<any *>(operand));
}
// 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
#elif defined(BOOST_ENABLE_ASSERT_HANDLER)
+#include <boost/config.hpp>
#include <boost/current_function.hpp>
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__))
#elif defined(BOOST_ENABLE_ASSERT_HANDLER)
+ #include <boost/config.hpp>
#include <boost/current_function.hpp>
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__))
#define BOOST_ASSERT_HPP
#include <cstdlib>
#include <iostream>
+ #include <boost/config.hpp>
#include <boost/current_function.hpp>
// IDE's like Visual Studio perform better if output goes to std::cout or
#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__))
// 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)
// get config suffix code:
#include <boost/config/suffix.hpp>
-#endif // BOOST_CONFIG_HPP
-
-
-
-
-
-
-
-
-
-
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+#endif // BOOST_CONFIG_HPP
// 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:
# undef BOOST_DYN_LINK
#endif
+
# 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
#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
// 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
//
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)
-
-
-
-
// (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
# 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
# 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
# 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
# endif
#endif
+
+// Reportedly, #pragma once is supported since C++ Builder 2010
+#if (__CODEGEARC__ >= 0x620)
+# define BOOST_HAS_PRAGMA_ONCE
+#endif
+
//
// C++0x macros:
//
#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:
// 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
//
-// (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.
#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)
# 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
//
#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
#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
// 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:
#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
//
// 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
#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
//
-// (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:
-
-#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
-
-# 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
+// GNU C++ compiler setup.
+
+//
+// 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__ == 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
# 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
//
#if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__)
# define BOOST_HAS_THREADS
-#endif
+#endif
//
// gcc has "long long"
//
// 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
#endif
//
-// Recent GCC versions have __int128 when in 64-bit mode:
+// Recent GCC versions have __int128 when in 64-bit mode.
+//
+// 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__)
+#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__)
# define BOOST_HAS_INT128
#endif
# 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
# 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__)
#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__
#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
//
-// (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.
//
#if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(linux) && !defined(__linux) && !defined(__linux__)
# define BOOST_HAS_THREADS
-#endif
+#endif
//
// gcc has "long long"
# 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
# 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__
-// (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.
# 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)
#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
*/
#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)
# 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)
# 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
# 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
//
// 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
# 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
# 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 <tuple> seems to be broken in this release as well as <future> :
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_TUPLE
#endif
#if defined(_MSC_VER) && (_MSC_VER <= 1700)
# 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)
# 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)
-// (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.
// 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
#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
#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)
-// (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.
#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:
// 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 <boost/config/compiler/gcc.hpp>
-
-#elif defined(_MSC_VER)
-
-#include <boost/config/compiler/visualc.hpp>
-
-#endif
// (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.
# 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
-
#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
#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:
-// (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.
# 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.
# 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
# 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
#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
-// (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.
# 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.
#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
#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
#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
#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
-// (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.
// 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
-
-#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
-
+#if _MSC_FULL_VER < 180020827
+# define BOOST_NO_FENV_H
#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
#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",
// (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
# 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
# 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:
//
#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"
# 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"
# 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
# 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
#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
-// (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!
+// ====================================================================
+//
+// 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.
+//
+// ====================================================================
+
+// Block out all versions before vxWorks 6.x, as these don't work:
+// Include header with the vxWorks version information and query them
+#include <version.h>
+#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"
-#define BOOST_NO_CWCHAR
-#define BOOST_NO_INTRINSIC_WCHAR_T
+// Special behaviour for DKMs:
+#ifdef _WRS_KERNEL
+ // DKMs do not have the <cwchar>-header,
+ // but apparently they do have an intrinsic wchar_t meanwhile!
+# define BOOST_NO_CWCHAR
-#if defined(__GNUC__) && defined(__STRICT_ANSI__)
-#define BOOST_NO_INT64_T
+ // 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
+
+// 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
+
+// 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
-// these allow posix_features to work, since vxWorks doesn't
-// define them itself
-#define _POSIX_TIMERS 1
-#define _POSIX_THREADS 1
+// Functionality available for DKMs only:
+#ifdef _WRS_KERNEL
+ // Luckily, at the moment there seems to be none!
+#endif
-// vxworks doesn't work with asio serial ports
+// 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?
+
+// vxWorks-around: <time.h> #defines CLOCKS_PER_SEC as sysClkRateGet() but
+// miserably fails to #include the required <sysLib.h> to make
+// sysClkRateGet() available! So we manually include it here.
+#ifdef __RTP__
+# include <time.h>
+# include <sysLib.h>
+#endif
+
+// vxWorks-around: In <stdint.h> 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 <cstdint>
+
+// 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 <ioLib.h>
+#include <tickLib.h>
+#include <sys/time.h>
-// boilerplate code:
+// 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<struct rlimit*>(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<clock_t>(static_cast<double>(ts.tv_sec) * CLOCKS_PER_SEC +
+ static_cast<double>(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 <signal.h>
+
+#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' <signal.h>
+#endif
+//typedef int locale_t; // locale_t is a POSIX-extension, currently unpresent in vxWorks!
+
+// #include boilerplate code:
#include <boost/config/posix_features.hpp>
-
+
+// vxWorks lies about XSI conformance, there is no nl_types.h:
+#undef BOOST_HAS_NL_TYPES_H
#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
// 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"
// 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"
// 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"
// 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"
#endif
#include <typeinfo>
-#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
# 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
# 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
# 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
// 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
# endif
//
-// Without partial specialization, partial
+// Without partial specialization, partial
// specialization with default args won't work either:
//
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
#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 <iostream>
-// #include <ostream>
-// #include <typeinfo>
-//
-// template <int n>
-// void f() { std::cout << n << ' '; }
-//
-// template <typename T>
-// void g() { std::cout << typeid(T).name() << ' '; }
-//
-// int main() {
-// f<1>();
-// f<2>();
-//
-// g<int>();
-// g<double>();
-// }
-//
-// With VC++ 6.0 the output is:
-//
-// 2 2 double double
-//
-// To fix it, write
-//
-// template <int n>
-// void f(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, n)) { ... }
-//
-// template <typename T>
-// 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<t>* = 0
-# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type<t>*
-# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type<t, v>* = 0
-# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type<t, v>*
-# 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)
# 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)
// Set some default values GPU support
//
# ifndef BOOST_GPU_ENABLED
-# define BOOST_GPU_ENABLED
+# define BOOST_GPU_ENABLED
# endif
// BOOST_FORCEINLINE ---------------------------------------------//
# 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
//
#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
# 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
//
#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
#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
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 {
{
(void)ordered_range;
(void)ordered_unique_range;
+ (void)default_init;
}
};
// 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)
#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 <stdint.h> 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
// 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
# 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 <inttypes.h>
# else
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
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 ::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 ::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 ::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;
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;
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
#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 <stddef.h>
+#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
#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:
+//
+// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant
//
-#if defined(__GNUC__) && (__GNUC__ >= 4)
-#pragma GCC system_header
-#endif
+// So we declare this a system header to suppress these warnings.
+//
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+#pragma GCC system_header
+#endif
#include <limits.h>
# define BOOST__STDC_CONSTANT_MACROS_DEFINED
-// 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 <boost/detail/limits.hpp>, from
- * which this code was originally taken.
- *
- * Modified by Caleb Epstein to use <endian.h> 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 <endian.h> which defines
-// __BYTE_ORDER
-
-#if defined (__GLIBC__)
-# include <endian.h>
-# 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 <boost/predef/detail/endian_compat.h>
#endif
#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
//
#include <boost/config.hpp>
+// MS compatible compilers support #pragma once
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
#if defined( BOOST_USE_WINDOWS_H )
# include <windows.h>
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER InterlockedCompareExchangePointer
# define BOOST_INTERLOCKED_EXCHANGE_POINTER InterlockedExchangePointer
+#elif defined( BOOST_USE_INTRIN_H )
+
+#include <intrin.h>
+
+# 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
#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
-#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600
+#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1500
#include <intrin.h>
#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
# 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 <intrin.h>
+
+# 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
{
#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
#undef i
#endif // BOOST_PP_IS_ITERATING
+
+++ /dev/null
-// 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 <cwchar> 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 <climits>
-#include <cfloat>
-#include <boost/config.hpp>
-#include <boost/detail/endian.hpp>
-
-#ifndef BOOST_NO_CWCHAR
-#include <cwchar> // 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 __number>
-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 _Int,
- _Int __imin,
- _Int __imax,
- int __idigits = -1>
-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<class Number, unsigned int Word>
- 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<const Number*>(&_S_word);
- }
-};
-
-#else
-
- template<class Number, unsigned int Word>
- 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<const Number*>(
- reinterpret_cast<const char *>(&_S_word)+16-
- (sizeof(Number) == 12 ? 10 : sizeof(Number)));
- }
-};
-
-#endif
-
-// Base class for floating-point numbers.
-template <class __number,
- int __Digits, int __Digits10,
- int __MinExp, int __MaxExp,
- int __MinExp10, int __MaxExp10,
- unsigned int __InfinityWord,
- unsigned int __QNaNWord, unsigned int __SNaNWord,
- bool __IsIEC559,
- float_round_style __RoundStyle>
-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 T>
-class numeric_limits : public _Numeric_limits_base<T> {};
-
-// Specializations for all built-in integral types.
-
-template<>
-class numeric_limits<bool>
- : public _Integer_limits<bool, false, true, 0>
-{};
-
-template<>
-class numeric_limits<char>
- : public _Integer_limits<char, CHAR_MIN, CHAR_MAX>
-{};
-
-template<>
-class numeric_limits<signed char>
- : public _Integer_limits<signed char, SCHAR_MIN, SCHAR_MAX>
-{};
-
-template<>
-class numeric_limits<unsigned char>
- : public _Integer_limits<unsigned char, 0, UCHAR_MAX>
-{};
-
-#ifndef BOOST_NO_INTRINSIC_WCHAR_T
-template<>
-class numeric_limits<wchar_t>
-#if !defined(WCHAR_MAX) || !defined(WCHAR_MIN)
-#if defined(_WIN32) || defined(__CYGWIN__)
- : public _Integer_limits<wchar_t, 0, USHRT_MAX>
-#elif defined(__hppa)
-// wchar_t has "unsigned int" as the underlying type
- : public _Integer_limits<wchar_t, 0, UINT_MAX>
-#else
-// assume that wchar_t has "int" as the underlying type
- : public _Integer_limits<wchar_t, INT_MIN, INT_MAX>
-#endif
-#else
-// we have WCHAR_MIN and WCHAR_MAX defined, so use it
- : public _Integer_limits<wchar_t, WCHAR_MIN, WCHAR_MAX>
-#endif
-{};
-#endif
-
-template<>
-class numeric_limits<short>
- : public _Integer_limits<short, SHRT_MIN, SHRT_MAX>
-{};
-
-template<>
-class numeric_limits<unsigned short>
- : public _Integer_limits<unsigned short, 0, USHRT_MAX>
-{};
-
-template<>
-class numeric_limits<int>
- : public _Integer_limits<int, INT_MIN, INT_MAX>
-{};
-
-template<>
-class numeric_limits<unsigned int>
- : public _Integer_limits<unsigned int, 0, UINT_MAX>
-{};
-
-template<>
-class numeric_limits<long>
- : public _Integer_limits<long, LONG_MIN, LONG_MAX>
-{};
-
-template<>
-class numeric_limits<unsigned long>
- : public _Integer_limits<unsigned long, 0, ULONG_MAX>
-{};
-
-#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<float>
- : public _Floating_limits<float,
- FLT_MANT_DIG, // Binary digits of precision
- FLT_DIG, // Decimal digits of precision
- FLT_MIN_EXP, // Minimum exponent
- FLT_MAX_EXP, // Maximum exponent
- FLT_MIN_10_EXP, // Minimum base 10 exponent
- FLT_MAX_10_EXP, // Maximum base 10 exponent
-#if defined(BOOST_BIG_ENDIAN)
- 0x7f80 << (sizeof(int)*CHAR_BIT-16), // Last word of +infinity
- 0x7f81 << (sizeof(int)*CHAR_BIT-16), // Last word of quiet NaN
- 0x7fc1 << (sizeof(int)*CHAR_BIT-16), // Last word of signaling NaN
-#else
- 0x7f800000u, // Last word of +infinity
- 0x7f810000u, // Last word of quiet NaN
- 0x7fc10000u, // Last word of signaling NaN
-#endif
- true, // conforms to iec559
- round_to_nearest>
-{
-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<double>
- : public _Floating_limits<double,
- DBL_MANT_DIG, // Binary digits of precision
- DBL_DIG, // Decimal digits of precision
- DBL_MIN_EXP, // Minimum exponent
- DBL_MAX_EXP, // Maximum exponent
- DBL_MIN_10_EXP, // Minimum base 10 exponent
- DBL_MAX_10_EXP, // Maximum base 10 exponent
-#if defined(BOOST_BIG_ENDIAN)
- 0x7ff0 << (sizeof(int)*CHAR_BIT-16), // Last word of +infinity
- 0x7ff1 << (sizeof(int)*CHAR_BIT-16), // Last word of quiet NaN
- 0x7ff9 << (sizeof(int)*CHAR_BIT-16), // Last word of signaling NaN
-#else
- 0x7ff00000u, // Last word of +infinity
- 0x7ff10000u, // Last word of quiet NaN
- 0x7ff90000u, // Last word of signaling NaN
-#endif
- true, // conforms to iec559
- round_to_nearest>
-{
-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<long double>
- : public _Floating_limits<long double,
- LDBL_MANT_DIG, // Binary digits of precision
- LDBL_DIG, // Decimal digits of precision
- LDBL_MIN_EXP, // Minimum exponent
- LDBL_MAX_EXP, // Maximum exponent
- LDBL_MIN_10_EXP,// Minimum base 10 exponent
- LDBL_MAX_10_EXP,// Maximum base 10 exponent
-#if defined(BOOST_BIG_ENDIAN)
- 0x7ff0 << (sizeof(int)*CHAR_BIT-16), // Last word of +infinity
- 0x7ff1 << (sizeof(int)*CHAR_BIT-16), // Last word of quiet NaN
- 0x7ff9 << (sizeof(int)*CHAR_BIT-16), // Last word of signaling NaN
-#else
- 0x7fff8000u, // Last word of +infinity
- 0x7fffc000u, // Last word of quiet NaN
- 0x7fff9000u, // Last word of signaling NaN
-#endif
- false, // Doesn't conform to iec559
- round_to_nearest>
-{
-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:
-
-
-
#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)
return seed;
}
+ template <typename Float, unsigned digits, unsigned max_exponent>
+ struct enable_binary_hash
+ {
+ BOOST_STATIC_CONSTANT(bool, value =
+ std::numeric_limits<Float>::is_iec559 &&
+ std::numeric_limits<Float>::digits == digits &&
+ std::numeric_limits<Float>::radix == 2 &&
+ std::numeric_limits<Float>::max_exponent == max_exponent);
+ };
+
template <typename Float>
inline std::size_t float_hash_impl(Float v,
BOOST_DEDUCED_TYPENAME boost::enable_if_c<
- std::numeric_limits<Float>::is_iec559 &&
- std::numeric_limits<Float>::digits == 24 &&
- std::numeric_limits<Float>::radix == 2 &&
- std::numeric_limits<Float>::max_exponent == 128,
- int>::type
- )
+ enable_binary_hash<Float, 24, 128>::value,
+ std::size_t>::type)
{
return hash_binary((char*) &v, 4);
}
template <typename Float>
inline std::size_t float_hash_impl(Float v,
BOOST_DEDUCED_TYPENAME boost::enable_if_c<
- std::numeric_limits<Float>::is_iec559 &&
- std::numeric_limits<Float>::digits == 53 &&
- std::numeric_limits<Float>::radix == 2 &&
- std::numeric_limits<Float>::max_exponent == 1024,
- int>::type
- )
+ enable_binary_hash<Float, 53, 1024>::value,
+ std::size_t>::type)
{
return hash_binary((char*) &v, 8);
}
template <typename Float>
inline std::size_t float_hash_impl(Float v,
BOOST_DEDUCED_TYPENAME boost::enable_if_c<
- std::numeric_limits<Float>::is_iec559 &&
- std::numeric_limits<Float>::digits == 64 &&
- std::numeric_limits<Float>::radix == 2 &&
- std::numeric_limits<Float>::max_exponent == 16384,
- int>::type
- )
+ enable_binary_hash<Float, 64, 16384>::value,
+ std::size_t>::type)
{
return hash_binary((char*) &v, 10);
}
template <typename Float>
inline std::size_t float_hash_impl(Float v,
BOOST_DEDUCED_TYPENAME boost::enable_if_c<
- std::numeric_limits<Float>::is_iec559 &&
- std::numeric_limits<Float>::digits == 113 &&
- std::numeric_limits<Float>::radix == 2 &&
- std::numeric_limits<Float>::max_exponent == 16384,
- int>::type
- )
+ enable_binary_hash<Float, 113, 16384>::value,
+ std::size_t>::type)
{
return hash_binary((char*) &v, 16);
}
#include <typeindex>
#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
#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
* 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
*/
// 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 <boost/config.hpp>
#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING)
#include <boost/math/special_functions/fpclassify.hpp>
#include <boost/range/iterator_range_core.hpp>
#include <boost/container/container_fwd.hpp>
+#include <boost/integer.hpp>
#ifndef BOOST_NO_CWCHAR
# include <cwchar>
#endif
> {};
#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 >
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
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>(CHAR_MAX) : grp_size;
}
left = last_grp_size;
{
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
BOOST_STATIC_ASSERT(!std::numeric_limits<T>::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<T>::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<CharT>::zero;
--end;
value = 0;
if (begin > end || *end < czero || *end >= czero + 10)
return false;
- value = *end - czero;
+ value = static_cast<T>(*end - czero);
--end;
T multiplier = 1;
bool multiplier_overflowed = false;
{
unsigned char current_grouping = 0;
CharT const thousands_sep = np.thousands_sep();
- char remained = grouping[current_grouping] - 1;
+ char remained = static_cast<char>(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<T>(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<T>(*end - czero);
+ T const new_sub_value = static_cast<T>(multiplier_10 * dig_value);
if (*end < czero || *end >= czero + 10
/* detecting overflow */
)
return false;
- value += new_sub_value;
- multiplier *= 10;
+ value = static_cast<T>(value + new_sub_value);
+ multiplier = static_cast<T>(multiplier * 10);
--remained;
} else {
if ( !Traits::eq(*end, thousands_sep) ) //|| begin == end ) return false;
{
while ( begin <= end )
{
- T const multiplier_10 = multiplier * 10;
+ T const multiplier_10 = static_cast<T>(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<T>(*end - czero);
+ T const new_sub_value = static_cast<T>(multiplier_10 * dig_value);
if (*end < czero || *end >= czero + 10
/* detecting overflow */
)
return false;
- value += new_sub_value;
- multiplier *= 10;
+ value = static_cast<T>(value + new_sub_value);
+ multiplier = static_cast<T>(multiplier * 10);
--end;
}
}
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 <class T>
struct mantissa_holder_type
{
struct mantissa_holder_type<float>
{
typedef unsigned int type;
+ typedef double wide_result_t;
};
template <>
struct mantissa_holder_type<double>
{
+#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
};
: 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<CharT>(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;
typedef typename Traits::int_type int_type;
typedef BOOST_DEDUCED_TYPENAME mantissa_holder_type<T>::type mantissa_type;
+ typedef BOOST_DEDUCED_TYPENAME mantissa_holder_type<T>::wide_result_t wide_result_t;
int_type const zero = Traits::to_int_type(czero);
if (begin == end) return false;
/* 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<wide_result_t>(10.0), pow_of_10) * mantissa;
value = static_cast<T>( 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 BufferType, class charT>
+ 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<off_type>(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<sizeof(way) * CHAR_BIT>::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<cast_type>(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<std::ptrdiff_t>(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<pos_type>(this->gptr() - this->eback());
+#ifdef BOOST_MSVC
+#pragma warning(pop)
#endif
+ }
+ private:
+ parser_buf& operator=(const parser_buf&);
+ parser_buf(const parser_buf&);
};
}
#if defined(BOOST_NO_STRINGSTREAM)
typedef std::ostrstream out_stream_t;
- typedef stl_buf_unlocker<std::strstreambuf, char> unlocked_but_t;
#elif defined(BOOST_NO_STD_LOCALE)
typedef std::ostringstream out_stream_t;
- typedef stl_buf_unlocker<std::stringbuf, char> unlocked_but_t;
+ typedef parser_buf<std::streambuf, char> buffer_t;
#else
- typedef std::basic_ostringstream<CharT, Traits> out_stream_t;
- typedef stl_buf_unlocker<std::basic_stringbuf<CharT, Traits>, CharT> unlocked_but_t;
+ typedef std::basic_ostringstream<CharT, Traits> out_stream_t;
+ typedef parser_buf<std::basic_streambuf<CharT, Traits>, CharT> buffer_t;
#endif
typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
RequiresStringbuffer,
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)
{}
// does not support such conversions. Try updating it.
BOOST_STATIC_ASSERT((boost::is_same<char, CharT>::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<unlocked_but_t*>(out_stream.rdbuf()) ;
+ const buffer_t* const p = static_cast<buffer_t*>(
+ static_cast<std::basic_streambuf<CharT, Traits>*>(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 <class T>
bool operator<<(unsigned __int64 n) { start = lcast_put_unsigned<Traits>(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<Traits>(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) {
template<typename InputStreamable>
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<InputStreamable>::value)
- return false;
+ BOOST_STATIC_ASSERT_MSG(
+ (!boost::is_pointer<InputStreamable>::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<char, CharT>::value));
+ BOOST_STATIC_ASSERT_MSG((boost::is_same<char, CharT>::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<CharT, Traits> stream;
-#endif
- static_cast<unlocked_but_t*>(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<CharT, Traits> 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<InputStreamable*>(0));
-#if (defined _MSC_VER)
-# pragma warning( pop )
-#endif
+
return stream >> output &&
stream.get() ==
#if defined(__GNUC__) && (__GNUC__<3) && defined(BOOST_NO_STD_WSTRING)
#else
Traits::eof();
#endif
+
+#ifndef BOOST_NO_EXCEPTIONS
+ } catch (const ::std::ios_base::failure& /*f*/) {
+ return false;
+ }
+#endif
}
template<class T>
}
/************************************ 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); }
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); }
* 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
> converter_t;
return (
- arg < 0 ? 0u - converter_t::convert(0u - arg) : converter_t::convert(arg)
+ arg < 0 ? static_cast<Target>(0u - converter_t::convert(0u - arg)) : converter_t::convert(arg)
);
}
};
return caster_type::lexical_cast_impl(arg);
}
- template <typename Target, typename CharType>
- inline Target lexical_cast(const CharType* chars, std::size_t count)
+ template <typename Target>
+ inline Target lexical_cast(const char* chars, std::size_t count)
+ {
+ return ::boost::lexical_cast<Target>(
+ ::boost::iterator_range<const char*>(chars, chars + count)
+ );
+ }
+
+
+ template <typename Target>
+ inline Target lexical_cast(const unsigned char* chars, std::size_t count)
{
- BOOST_STATIC_ASSERT_MSG(boost::detail::is_char_or_wchar<CharType>::value,
- "CharType must be a character or wide character type");
+ return ::boost::lexical_cast<Target>(
+ ::boost::iterator_range<const unsigned char*>(chars, chars + count)
+ );
+ }
- return boost::lexical_cast<Target>(
- boost::iterator_range<const CharType*>(chars, chars + count)
+ template <typename Target>
+ inline Target lexical_cast(const signed char* chars, std::size_t count)
+ {
+ return ::boost::lexical_cast<Target>(
+ ::boost::iterator_range<const signed char*>(chars, chars + count)
);
}
+#ifndef BOOST_LCAST_NO_WCHAR_T
+ template <typename Target>
+ inline Target lexical_cast(const wchar_t* chars, std::size_t count)
+ {
+ return ::boost::lexical_cast<Target>(
+ ::boost::iterator_range<const wchar_t*>(chars, chars + count)
+ );
+ }
+#endif
+#ifndef BOOST_NO_CXX11_CHAR16_T
+ template <typename Target>
+ inline Target lexical_cast(const char16_t* chars, std::size_t count)
+ {
+ return ::boost::lexical_cast<Target>(
+ ::boost::iterator_range<const char16_t*>(chars, chars + count)
+ );
+ }
+#endif
+#ifndef BOOST_NO_CXX11_CHAR32_T
+ template <typename Target>
+ inline Target lexical_cast(const char32_t* chars, std::size_t count)
+ {
+ return ::boost::lexical_cast<Target>(
+ ::boost::iterator_range<const char32_t*>(chars, chars + count)
+ );
+ }
+#endif
+
} // namespace boost
#else // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// 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
#include <boost/config.hpp>
#ifdef BOOST_NO_LIMITS
-# include <boost/detail/limits.hpp>
+# error "There is no std::numeric_limits suppport available."
#else
# include <limits>
#endif
#endif
+#ifdef BOOST_MATH_USE_FLOAT128
+
+template <class Policy>
+struct precision<__float128, Policy>
+{
+ typedef mpl::int_<113> type;
+};
+
+#endif
+
namespace detail{
template <class T, class Policy>
#define BOOST_MATH_SPECIAL_ROUND_FWD_HPP
#include <boost/config.hpp>
+#include <boost/math/tools/promotion.hpp>
#ifdef _MSC_VER
#pragma once
{
template <class T, class Policy>
- T trunc(const T& v, const Policy& pol);
+ typename tools::promote_args<T>::type trunc(const T& v, const Policy& pol);
template <class T>
- T trunc(const T& v);
+ typename tools::promote_args<T>::type trunc(const T& v);
template <class T, class Policy>
int itrunc(const T& v, const Policy& pol);
template <class T>
boost::long_long_type lltrunc(const T& v);
#endif
template <class T, class Policy>
- T round(const T& v, const Policy& pol);
+ typename tools::promote_args<T>::type round(const T& v, const Policy& pol);
template <class T>
- T round(const T& v);
+ typename tools::promote_args<T>::type round(const T& v);
template <class T, class Policy>
int iround(const T& v, const Policy& pol);
template <class T>
}
}
+
+#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
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,
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,
namespace std{ using ::abs; using ::fabs; }
#endif
-namespace boost{
+namespace boost{
//
// This must not be located in any namespace under boost::math
//
namespace math_detail{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4800)
+#endif
+
template <class T>
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 <class T>
inline bool is_nan_helper(T, const boost::false_type&)
{
if(std::numeric_limits<T>::is_specialized)
return fpclassify_imp(t, generic_tag<true>());
#endif
- //
+ //
// An unknown type with no numeric_limits support,
// so what are we supposed to do we do here?
//
return t == 0 ? FP_ZERO : FP_NORMAL;
}
-template<class T>
+template<class T>
int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_all_bits_tag)
{
typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
return FP_NAN;
}
-template<class T>
+template<class T>
int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag)
{
typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
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) {
{
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
- typedef typename tools::promote_args<T>::type value_type;
+ typedef typename tools::promote_args_permissive<T>::type value_type;
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
if(std::numeric_limits<T>::is_specialized && detail::is_generic_tag_false(static_cast<method*>(0)))
return detail::fpclassify_imp(static_cast<value_type>(t), detail::generic_tag<true>());
namespace detail {
#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
- template<class T>
+ template<class T>
inline bool isfinite_impl(T x, native_tag const&)
{
return (std::isfinite)(x);
}
#endif
- template<class T>
+ template<class T>
inline bool isfinite_impl(T x, generic_tag<true> const&)
{
return x >= -(std::numeric_limits<T>::max)()
&& x <= (std::numeric_limits<T>::max)();
}
- template<class T>
+ template<class T>
inline bool isfinite_impl(T x, generic_tag<false> const&)
{
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
return true;
}
- template<class T>
+ template<class T>
inline bool isfinite_impl(T x, ieee_tag const&)
{
typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits;
}
-template<class T>
+template<class T>
inline bool (isfinite)(T x)
{ //!< \brief return true if floating-point type t is finite.
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
- typedef typename boost::is_floating_point<T>::type fp_tag;
- typedef typename tools::promote_args<T>::type value_type;
+ // typedef typename boost::is_floating_point<T>::type fp_tag;
+ typedef typename tools::promote_args_permissive<T>::type value_type;
return detail::isfinite_impl(static_cast<value_type>(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<long double>::type traits;
namespace detail {
#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
- template<class T>
+ template<class T>
inline bool isnormal_impl(T x, native_tag const&)
{
return (std::isnormal)(x);
}
#endif
- template<class T>
+ template<class T>
inline bool isnormal_impl(T x, generic_tag<true> const&)
{
if(x < 0) x = -x;
&& x <= (std::numeric_limits<T>::max)();
}
- template<class T>
+ template<class T>
inline bool isnormal_impl(T x, generic_tag<false> const&)
{
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
return !(x == 0);
}
- template<class T>
+ template<class T>
inline bool isnormal_impl(T x, ieee_tag const&)
{
typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits;
}
-template<class T>
+template<class T>
inline bool (isnormal)(T x)
{
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
- typedef typename boost::is_floating_point<T>::type fp_tag;
- typedef typename tools::promote_args<T>::type value_type;
+ //typedef typename boost::is_floating_point<T>::type fp_tag;
+ typedef typename tools::promote_args_permissive<T>::type value_type;
return detail::isnormal_impl(static_cast<value_type>(x), method());
}
#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-template<>
+template<>
inline bool (isnormal)(long double x)
{
typedef detail::fp_traits<long double>::type traits;
namespace detail {
#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
- template<class T>
+ template<class T>
inline bool isinf_impl(T x, native_tag const&)
{
return (std::isinf)(x);
}
#endif
- template<class T>
+ template<class T>
inline bool isinf_impl(T x, generic_tag<true> const&)
{
(void)x; // in case the compiler thinks that x is unused because std::numeric_limits<T>::has_infinity is false
- return std::numeric_limits<T>::has_infinity
+ return std::numeric_limits<T>::has_infinity
&& ( x == std::numeric_limits<T>::infinity()
|| x == -std::numeric_limits<T>::infinity());
}
- template<class T>
+ template<class T>
inline bool isinf_impl(T x, generic_tag<false> const&)
{
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
return false;
}
- template<class T>
+ template<class T>
inline bool isinf_impl(T x, ieee_copy_all_bits_tag const&)
{
typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
return a == traits::exponent;
}
- template<class T>
+ template<class T>
inline bool isinf_impl(T x, ieee_copy_leading_bits_tag const&)
{
typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
} // namespace detail
-template<class T>
+template<class T>
inline bool (isinf)(T x)
{
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
- typedef typename boost::is_floating_point<T>::type fp_tag;
- typedef typename tools::promote_args<T>::type value_type;
+ // typedef typename boost::is_floating_point<T>::type fp_tag;
+ typedef typename tools::promote_args_permissive<T>::type value_type;
return detail::isinf_impl(static_cast<value_type>(x), method());
}
#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
-template<>
+template<>
inline bool (isinf)(long double x)
{
typedef detail::fp_traits<long double>::type traits;
namespace detail {
#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
- template<class T>
+ template<class T>
inline bool isnan_impl(T x, native_tag const&)
{
return (std::isnan)(x);
}
#endif
- template<class T>
+ template<class T>
inline bool isnan_impl(T x, generic_tag<true> const&)
{
return std::numeric_limits<T>::has_infinity
: x != x;
}
- template<class T>
+ template<class T>
inline bool isnan_impl(T x, generic_tag<false> const&)
{
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
return false;
}
- template<class T>
+ template<class T>
inline bool isnan_impl(T x, ieee_copy_all_bits_tag const&)
{
typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
return a > traits::exponent;
}
- template<class T>
+ template<class T>
inline bool isnan_impl(T x, ieee_copy_leading_bits_tag const&)
{
typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
} // namespace detail
-template<class T>
+template<class T>
inline bool (isnan)(T x)
{ //!< \brief return true if floating-point type t is NaN (Not A Number).
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
- typedef typename boost::is_floating_point<T>::type fp_tag;
+ // typedef typename boost::is_floating_point<T>::type fp_tag;
return detail::isnan_impl(x, method());
}
template <> inline bool isnan BOOST_NO_MACRO_EXPAND<double>(double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); }
template <> inline bool isnan BOOST_NO_MACRO_EXPAND<long double>(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<long double>::type traits;
// 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
// Beta functions.
template <class RT1, class RT2>
- typename tools::promote_args<RT1, RT2>::type
+ typename tools::promote_args<RT1, RT2>::type
beta(RT1 a, RT2 b); // Beta function (2 arguments).
template <class RT1, class RT2, class A>
- typename tools::promote_args<RT1, RT2, A>::type
+ typename tools::promote_args<RT1, RT2, A>::type
beta(RT1 a, RT2 b, A x); // Beta function (3 arguments).
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
beta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Beta function (3 arguments).
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
betac(RT1 a, RT2 b, RT3 x);
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
betac(RT1 a, RT2 b, RT3 x, const Policy& pol);
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta(RT1 a, RT2 b, RT3 x); // Incomplete beta function.
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta function.
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibetac(RT1 a, RT2 b, RT3 x); // Incomplete beta complement function.
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibetac(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta complement function.
template <class T1, class T2, class T3, class T4>
- typename tools::promote_args<T1, T2, T3, T4>::type
+ typename tools::promote_args<T1, T2, T3, T4>::type
ibeta_inv(T1 a, T2 b, T3 p, T4* py);
template <class T1, class T2, class T3, class T4, class Policy>
- typename tools::promote_args<T1, T2, T3, T4>::type
+ typename tools::promote_args<T1, T2, T3, T4>::type
ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol);
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta_inv(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta_inv(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta_inva(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta_inva(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta_invb(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta_invb(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
template <class T1, class T2, class T3, class T4>
- typename tools::promote_args<T1, T2, T3, T4>::type
+ typename tools::promote_args<T1, T2, T3, T4>::type
ibetac_inv(T1 a, T2 b, T3 q, T4* py);
template <class T1, class T2, class T3, class T4, class Policy>
- typename tools::promote_args<T1, T2, T3, T4>::type
+ typename tools::promote_args<T1, T2, T3, T4>::type
ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol);
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibetac_inv(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibetac_inva(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibetac_inva(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibetac_invb(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibetac_invb(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta_derivative(RT1 a, RT2 b, RT3 x); // derivative of incomplete beta
template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
+ typename tools::promote_args<RT1, RT2, RT3>::type
ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol); // derivative of incomplete beta
// erf & erfc error functions.
// Polynomials:
template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1);
template <class T>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
legendre_p(int l, T x);
template <class T, class Policy>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
legendre_p(int l, T x, const Policy& pol);
template <class T>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
legendre_q(unsigned l, T x);
template <class T, class Policy>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
legendre_q(unsigned l, T x, const Policy& pol);
template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1);
template <class T>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
legendre_p(int l, int m, T x);
template <class T, class Policy>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
legendre_p(int l, int m, T x, const Policy& pol);
template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1);
template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1);
template <class T>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
laguerre(unsigned n, T x);
template <class T, class Policy>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
laguerre(unsigned n, unsigned m, T x, const Policy& pol);
template <class T1, class T2>
};
template <class T1, class T2>
- typename laguerre_result<T1, T2>::type
+ typename laguerre_result<T1, T2>::type
laguerre(unsigned n, T1 m, T2 x);
template <class T>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
hermite(unsigned n, T x);
template <class T, class Policy>
- typename tools::promote_args<T>::type
+ typename tools::promote_args<T>::type
hermite(unsigned n, T x, const Policy& pol);
template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
template <class T1, class T2>
- std::complex<typename tools::promote_args<T1, T2>::type>
+ std::complex<typename tools::promote_args<T1, T2>::type>
spherical_harmonic(unsigned n, int m, T1 theta, T2 phi);
template <class T1, class T2, class Policy>
- std::complex<typename tools::promote_args<T1, T2>::type>
+ std::complex<typename tools::promote_args<T1, T2>::type>
spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi);
template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi);
template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
// Elliptic integrals:
template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
ellint_rf(T1 x, T2 y, T3 z);
template <class T1, class T2, class T3, class Policy>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
ellint_rf(T1 x, T2 y, T3 z, const Policy& pol);
template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
ellint_rd(T1 x, T2 y, T3 z);
template <class T1, class T2, class T3, class Policy>
- typename tools::promote_args<T1, T2, T3>::type
+ typename tools::promote_args<T1, T2, T3>::type
ellint_rd(T1 x, T2 y, T3 z, const Policy& pol);
template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
ellint_rc(T1 x, T2 y);
template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
ellint_rc(T1 x, T2 y, const Policy& pol);
template <class T1, class T2, class T3, class T4>
- typename tools::promote_args<T1, T2, T3, T4>::type
+ typename tools::promote_args<T1, T2, T3, T4>::type
ellint_rj(T1 x, T2 y, T3 z, T4 p);
template <class T1, class T2, class T3, class T4, class Policy>
- typename tools::promote_args<T1, T2, T3, T4>::type
+ typename tools::promote_args<T1, T2, T3, T4>::type
ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol);
template <typename T>
template <class RT, class Policy>
RT factorial(unsigned int, const Policy& pol);
template <class RT>
- 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 <class RT>
RT double_factorial(unsigned i);
template <class RT, class Policy>
// Hypotenuse function sqrt(x ^ 2 + y ^ 2).
template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
hypot(T1 x, T2 y);
template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
hypot(T1 x, T2 y, const Policy&);
// cbrt - cube root.
// Power - 1
template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
powm1(const T1 a, const T2 z);
template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type
+ typename tools::promote_args<T1, T2>::type
powm1(const T1 a, const T2 z, const Policy&);
// sqrt(1+x) - 1
template <class T>
typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann(unsigned v, T x);
- template <class T1, class T2, class Policy>
- std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol);
+ template <class T, class Policy>
+ typename detail::bessel_traits<T, T, Policy>::result_type cyl_bessel_j_zero(T v, int m, const Policy& pol);
+
+ template <class T>
+ typename detail::bessel_traits<T, T, policies::policy<> >::result_type cyl_bessel_j_zero(T v, int m);
+
+ template <class T, class OutputIterator>
+ OutputIterator cyl_bessel_j_zero(T v,
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it);
+
+ template <class T, class OutputIterator, class Policy>
+ OutputIterator cyl_bessel_j_zero(T v,
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it,
+ const Policy&);
+
+ template <class T, class Policy>
+ typename detail::bessel_traits<T, T, Policy>::result_type cyl_neumann_zero(T v, int m, const Policy& pol);
+
+ template <class T>
+ typename detail::bessel_traits<T, T, policies::policy<> >::result_type cyl_neumann_zero(T v, int m);
+
+ template <class T, class OutputIterator>
+ OutputIterator cyl_neumann_zero(T v,
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it);
+
+ template <class T, class OutputIterator, class Policy>
+ OutputIterator cyl_neumann_zero(T v,
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it,
+ const Policy&);
template <class T1, class T2>
std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_1(T1 v, T2 x);
+ template <class T1, class T2, class Policy>
+ std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol);
+
template <class T1, class T2, class Policy>
std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_2(T1 v, T2 x, const Policy& pol);
template <class T>
typename tools::promote_args<T>::type airy_bi_prime(T x);
+ template <class T>
+ T airy_ai_zero(unsigned m);
+ template <class T, class Policy>
+ T airy_ai_zero(unsigned m, const Policy&);
+
+ template <class OutputIterator>
+ OutputIterator airy_ai_zero(
+ unsigned start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it);
+ template <class OutputIterator, class Policy>
+ OutputIterator airy_ai_zero(
+ unsigned start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it,
+ const Policy&);
+
+ template <class T>
+ T airy_bi_zero(unsigned m);
+ template <class T, class Policy>
+ T airy_bi_zero(unsigned m, const Policy&);
+
+ template <class OutputIterator>
+ OutputIterator airy_bi_zero(
+ unsigned start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it);
+ template <class OutputIterator, class Policy>
+ OutputIterator airy_bi_zero(
+ unsigned start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it,
+ const Policy&);
+
template <class T, class Policy>
typename tools::promote_args<T>::type sin_pi(T x, const Policy&);
template <class T>
bool isnormal BOOST_NO_MACRO_EXPAND(T t);
- template<class T>
+ template<class T>
int signbit BOOST_NO_MACRO_EXPAND(T x);
template <class T>
int sign BOOST_NO_MACRO_EXPAND(const T& z);
- template <class T>
- T copysign BOOST_NO_MACRO_EXPAND(const T& x, const T& y);
+ template <class T, class U>
+ typename tools::promote_args_permissive<T, U>::type copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y);
template <class T>
- T changesign BOOST_NO_MACRO_EXPAND(const T& z);
+ typename tools::promote_args_permissive<T>::type changesign BOOST_NO_MACRO_EXPAND(const T& z);
// Exponential integrals:
namespace detail{
typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a);
// Jacobi Functions:
- template <class T, class Policy>
- typename tools::promote_args<T>::type jacobi_elliptic(T k, T theta, T* pcn, T* pdn, const Policy&);
+ template <class T, class U, class V, class Policy>
+ typename tools::promote_args<T, U, V>::type jacobi_elliptic(T k, U theta, V* pcn, V* pdn, const Policy&);
- template <class T>
- typename tools::promote_args<T>::type jacobi_elliptic(T k, T theta, T* pcn = 0, T* pdn = 0);
+ template <class T, class U, class V>
+ typename tools::promote_args<T, U, V>::type jacobi_elliptic(T k, U theta, V* pcn = 0, V* pdn = 0);
template <class U, class T, class Policy>
typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta, const Policy& pol);
typename tools::promote_args<T>::type pow(T base);
// next:
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type nextafter(const T&, const U&, const Policy&);
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type nextafter(const T&, const U&);
template <class T, class Policy>
- T nextafter(const T&, const T&, const Policy&);
- template <class T>
- T nextafter(const T&, const T&);
- template <class T, class Policy>
- T float_next(const T&, const Policy&);
+ typename tools::promote_args<T>::type float_next(const T&, const Policy&);
template <class T>
- T float_next(const T&);
+ typename tools::promote_args<T>::type float_next(const T&);
template <class T, class Policy>
- T float_prior(const T&, const Policy&);
+ typename tools::promote_args<T>::type float_prior(const T&, const Policy&);
template <class T>
- T float_prior(const T&);
+ typename tools::promote_args<T>::type float_prior(const T&);
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type float_distance(const T&, const U&, const Policy&);
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type float_distance(const T&, const U&);
template <class T, class Policy>
- T float_distance(const T&, const T&, const Policy&);
+ typename tools::promote_args<T>::type float_advance(T val, int distance, const Policy& pol);
template <class T>
- T float_distance(const T&, const T&);
+ typename tools::promote_args<T>::type float_advance(const T& val, int distance);
} // namespace math
} // namespace boost
template <class T>\
inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type \
sph_neumann(unsigned v, T x){ return boost::math::sph_neumann(v, x, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type cyl_bessel_j_zero(T v, int m)\
+ { return boost::math::cyl_bessel_j_zero(v, m, Policy()); }\
+\
+template <class OutputIterator, class T>\
+ 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 <class T>\
+ inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type cyl_neumann_zero(T v, int m)\
+ { return boost::math::cyl_neumann_zero(v, m, Policy()); }\
+\
+template <class OutputIterator, class T>\
+ 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 <class T>\
inline typename boost::math::tools::promote_args<T>::type sin_pi(T x){ return boost::math::sin_pi(x); }\
inline typename boost::math::tools::promote_args<T>::type airy_bi_prime(T x)\
{ return boost::math::airy_bi_prime(x, Policy()); }\
\
+ template <class T>\
+ inline T airy_ai_zero(int m)\
+ { return boost::math::airy_ai_zero<T>(m, Policy()); }\
+ template <class T, class OutputIterator>\
+ OutputIterator airy_ai_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\
+ { return boost::math::airy_ai_zero<T>(start_index, number_of_zeros, out_it, Policy()); }\
+ \
+ template <class T>\
+ inline T airy_bi_zero(int m)\
+ { return boost::math::airy_bi_zero<T>(m, Policy()); }\
+ template <class T, class OutputIterator>\
+ OutputIterator airy_bi_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\
+ { return boost::math::airy_bi_zero<T>(start_index, number_of_zeros, out_it, Policy()); }\
+ \
{
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
- typedef typename boost::is_floating_point<T>::type fp_tag;
- return detail::signbit_impl(x, method());
+ // typedef typename boost::is_floating_point<T>::type fp_tag;
+ typedef typename tools::promote_args_permissive<T>::type result_type;
+ return detail::signbit_impl(static_cast<result_type>(x), method());
}
template <class T>
return (z == 0) ? 0 : (boost::math::signbit)(z) ? -1 : 1;
}
-template<class T> T (changesign)(const T& x)
+template <class T> typename tools::promote_args_permissive<T>::type (changesign)(const T& x)
{ //!< \brief return unchanged binary pattern of x, except for change of sign bit.
typedef typename detail::fp_traits<T>::sign_change_type traits;
typedef typename traits::method method;
- typedef typename boost::is_floating_point<T>::type fp_tag;
+ // typedef typename boost::is_floating_point<T>::type fp_tag;
+ typedef typename tools::promote_args_permissive<T>::type result_type;
- return detail::changesign_impl(x, method());
+ return detail::changesign_impl(static_cast<result_type>(x), method());
}
-template <class T>
-inline T copysign BOOST_NO_MACRO_EXPAND(const T& x, const T& y)
+template <class T, class U>
+inline typename tools::promote_args_permissive<T, U>::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<T, U>::type result_type;
+ return (boost::math::signbit)(static_cast<result_type>(x)) != (boost::math::signbit)(static_cast<result_type>(y))
+ ? (boost::math::changesign)(static_cast<result_type>(x)) : static_cast<result_type>(x);
}
} // namespace math
#endif
#include <boost/math/tools/user.hpp>
-#include <boost/math/special_functions/detail/round_fwd.hpp>
#if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \
|| (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \
#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:
//
// 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;\
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
#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 <iostream>
+# include <iomanip>
+# include <typeinfo>
+
+# 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
//
// Guard against use of long double if it's not supported:
//
- BOOST_STATIC_ASSERT((0 == ::boost::is_same<type, long double>::value));
+ BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same<type, long double>::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 <class T1, class T2=float, class T3=float, class T4=float, class T5=float, class T6=float>
+ struct promote_args_permissive
+ {
+ typedef typename promote_args_2<
+ typename remove_cv<T1>::type,
+ typename promote_args_2<
+ typename remove_cv<T2>::type,
+ typename promote_args_2<
+ typename remove_cv<T3>::type,
+ typename promote_args_2<
+ typename remove_cv<T4>::type,
+ typename promote_args_2<
+ typename remove_cv<T5>::type, typename remove_cv<T6>::type
+ >::type
+ >::type
+ >::type
+ >::type
+ >::type type;
+ };
+
} // namespace tools
} // namespace math
} // namespace boost
//
// 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 <boost/mpl/not.hpp>
#include <boost/mpl/aux_/value_wknd.hpp>
#include <boost/config.hpp> // make sure 'size_t' is placed into 'std'
#include <cstddef>
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1700)
+#include <boost/mpl/if.hpp>
+#endif
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|| (BOOST_MPL_CFG_GCC != 0) \
#endif
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1700)
+
+template<class Pred>
+struct extract_assert_pred;
+
+template<class Pred>
+struct extract_assert_pred<void(Pred)> { typedef Pred type; };
+
+template<class Pred>
+struct eval_assert {
+ typedef typename extract_assert_pred<Pred>::type P;
+ typedef typename P::type p_type;
+ typedef typename ::boost::mpl::if_c<p_type::value,
+ AUX778076_ASSERT_ARG(assert<false>),
+ failed ************ P::************
+ >::type type;
+};
+
+template<class Pred>
+struct eval_assert_not {
+ typedef typename extract_assert_pred<Pred>::type P;
+ typedef typename P::type p_type;
+ typedef typename ::boost::mpl::if_c<!p_type::value,
+ AUX778076_ASSERT_ARG(assert<false>),
+ failed ************ ::boost::mpl::not_<P>::************
+ >::type type;
+};
+
+template< typename T >
+T make_assert_arg();
-#if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)
+#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<true> { typedef void* type; };
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1700)
+
+// BOOST_MPL_ASSERT((pred<x,...>))
+
+#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<false>( \
+ boost::mpl::make_assert_arg< \
+ typename boost::mpl::eval_assert<void pred>::type \
+ >() \
+ ) \
+ ) \
+ ) \
+/**/
+
+// BOOST_MPL_ASSERT_NOT((pred<x,...>))
+
+#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<false>( \
+ boost::mpl::make_assert_arg< \
+ typename boost::mpl::eval_assert_not<void pred>::type \
+ >() \
+ ) \
+ ) \
+ ) \
+/**/
+
+#else
// BOOST_MPL_ASSERT((pred<x,...>))
/**/
#endif
+#endif
+
// BOOST_MPL_ASSERT_RELATION(x, ==|!=|<=|<|>=|>, y)
#if defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES)
#ifndef BOOST_NONCOPYABLE_HPP_INCLUDED
#define BOOST_NONCOPYABLE_HPP_INCLUDED
+#include <boost/config.hpp>
+
namespace boost {
// Private copy constructor and copy assignment ensure classes derived from
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
};
}
--- /dev/null
+/*
+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 <boost/predef/architecture/alpha.h>
+#include <boost/predef/architecture/arm.h>
+#include <boost/predef/architecture/blackfin.h>
+#include <boost/predef/architecture/convex.h>
+#include <boost/predef/architecture/ia64.h>
+#include <boost/predef/architecture/m68k.h>
+#include <boost/predef/architecture/mips.h>
+#include <boost/predef/architecture/parisc.h>
+#include <boost/predef/architecture/ppc.h>
+#include <boost/predef/architecture/pyramid.h>
+#include <boost/predef/architecture/rs6k.h>
+#include <boost/predef/architecture/sparc.h>
+#include <boost/predef/architecture/superh.h>
+#include <boost/predef/architecture/sys370.h>
+#include <boost/predef/architecture/sys390.h>
+#include <boost/predef/architecture/x86.h>
+#include <boost/predef/architecture/z.h>
+/*#include <boost/predef/architecture/.h>*/
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_ALPHA,BOOST_ARCH_ALPHA_NAME)
+
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_ARM,BOOST_ARCH_ARM_NAME)
+
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_BLACKFIN,BOOST_ARCH_BLACKFIN_NAME)
+
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_CONVEX,BOOST_ARCH_CONVEX_NAME)
+
+
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_IA64,BOOST_ARCH_IA64_NAME)
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_M68K,BOOST_ARCH_M68K_NAME)
+
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_MIPS,BOOST_ARCH_MIPS_NAME)
+
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PARISC,BOOST_ARCH_PARISC_NAME)
+
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PPC,BOOST_ARCH_PPC_NAME)
+
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PYRAMID,BOOST_ARCH_PYRAMID_NAME)
+
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+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
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SPARC,BOOST_ARCH_SPARC_NAME)
+
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SH,BOOST_ARCH_SH_NAME)
+
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SYS370,BOOST_ARCH_SYS370_NAME)
+
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_SYS390,BOOST_ARCH_SYS390_NAME)
+
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/architecture/x86/32.h>
+#include <boost/predef/architecture/x86/64.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86,BOOST_ARCH_X86_NAME)
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86_32,BOOST_ARCH_X86_32_NAME)
+
+#include <boost/predef/architecture/x86.h>
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86_64,BOOST_ARCH_X86_64_NAME)
+
+#include <boost/predef/architecture/x86.h>
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_Z,BOOST_ARCH_Z_NAME)
+
+
+#endif
--- /dev/null
+/*
+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 <cassert>
+#else
+#include <assert.h>
+#endif
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/other/endian.h>
+
+#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
--- /dev/null
+/*
+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
--- /dev/null
+/*
+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
--- /dev/null
+/*
+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 <boost/predef/detail/_cassert.h>
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+#include <boost/predef/library/c/_prefix.h>
+
+#if defined(__STDC__)
+#include <stddef.h>
+#elif defined(__cplusplus)
+#include <cstddef>
+#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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_C_GNU,BOOST_LIB_C_GNU_NAME)
+
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/detail/test.h>
+
+#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
--- /dev/null
+/*
+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 <boost/predef/os/macos.h>
+
+#include <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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 <boost/predef/os/bsd/bsdi.h>
+#include <boost/predef/os/bsd/dragonfly.h>
+#include <boost/predef/os/bsd/free.h>
+#include <boost/predef/os/bsd/open.h>
+#include <boost/predef/os/bsd/net.h>
+
+#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 <sys/param.h>
+# 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 <boost/predef/detail/os_detected.h>
+#endif
+
+#define BOOST_OS_BSD_NAME "BSD"
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD,BOOST_OS_BSD_NAME)
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/os/bsd.h>
+
+/*`
+[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 <boost/predef/detail/os_detected.h>
+#endif
+
+#define BOOST_OS_BSD_BSDI_NAME "BSDi BSD/OS"
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_BSDI,BOOST_OS_BSD_BSDI_NAME)
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/os/bsd.h>
+
+/*`
+[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 <boost/predef/detail/os_detected.h>
+#endif
+
+#define BOOST_OS_BSD_DRAGONFLY_NAME "DragonFly BSD"
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_DRAGONFLY,BOOST_OS_BSD_DRAGONFLY_NAME)
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/os/bsd.h>
+
+/*`
+[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 <boost/predef/detail/os_detected.h>
+#endif
+
+#define BOOST_OS_BSD_FREE_NAME "Free BSD"
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_FREE,BOOST_OS_BSD_FREE_NAME)
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/os/bsd.h>
+
+/*`
+[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 <boost/predef/detail/os_detected.h>
+#endif
+
+#define BOOST_OS_BSD_NET_NAME "DragonFly BSD"
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_NET,BOOST_OS_BSD_NET_NAME)
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/os/bsd.h>
+
+/*`
+[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 <boost/predef/detail/os_detected.h>
+#endif
+
+#define BOOST_OS_BSD_OPEN_NAME "OpenBSD"
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_OPEN,BOOST_OS_BSD_OPEN_NAME)
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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 <boost/predef/detail/os_detected.h>
+#endif
+
+#define BOOST_OS_MACOS_NAME "Mac OS"
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_OS_MACOS,BOOST_OS_MACOS_NAME)
+
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[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 <boost/predef/detail/os_detected.h>
+#endif
+
+#define BOOST_OS_WINDOWS_NAME "Microsoft Windows"
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_OS_WINDOWS,BOOST_OS_WINDOWS_NAME)
+
+#endif
--- /dev/null
+/*
+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 <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+#include <boost/predef/library/c/gnu.h>
+#include <boost/predef/os/macos.h>
+#include <boost/predef/os/bsd.h>
+
+/*`
+[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 <endian.h>
+# else
+# if BOOST_OS_MACOS
+# include <machine/endian.h>
+# else
+# if BOOST_OS_BSD
+# if BOOST_OS_BSD_OPEN
+# include <machine/endian.h>
+# else
+# include <sys/endian.h>
+# 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 <boost/predef/architecture.h>
+# 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 <boost/predef/os/windows.h>
+# 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/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ENDIAN_BIG_BYTE,BOOST_ENDIAN_BIG_BYTE_NAME)
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ENDIAN_BIG_WORD,BOOST_ENDIAN_BIG_WORD_NAME)
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ENDIAN_LITTLE_BYTE,BOOST_ENDIAN_LITTLE_BYTE_NAME)
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ENDIAN_LITTLE_WORD,BOOST_ENDIAN_LITTLE_WORD_NAME)
+
+
+#endif
--- /dev/null
+/*
+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
# 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
struct BidirectionalRangeConcept : ForwardRangeConcept<T>
{
#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
- BOOST_RANGE_CONCEPT_ASSERT((BidirectionalIteratorConcept<BOOST_DEDUCED_TYPENAME BidirectionalRangeConcept::iterator>));
- BOOST_RANGE_CONCEPT_ASSERT((BidirectionalIteratorConcept<BOOST_DEDUCED_TYPENAME BidirectionalRangeConcept::const_iterator>));
+ BOOST_RANGE_CONCEPT_ASSERT((range_detail::BidirectionalIteratorConcept<BOOST_DEDUCED_TYPENAME BidirectionalRangeConcept::iterator>));
+ BOOST_RANGE_CONCEPT_ASSERT((range_detail::BidirectionalIteratorConcept<BOOST_DEDUCED_TYPENAME BidirectionalRangeConcept::const_iterator>));
#endif
};
struct RandomAccessRangeConcept : BidirectionalRangeConcept<T>
{
#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
- BOOST_RANGE_CONCEPT_ASSERT((RandomAccessIteratorConcept<BOOST_DEDUCED_TYPENAME RandomAccessRangeConcept::iterator>));
- BOOST_RANGE_CONCEPT_ASSERT((RandomAccessIteratorConcept<BOOST_DEDUCED_TYPENAME RandomAccessRangeConcept::const_iterator>));
+ BOOST_RANGE_CONCEPT_ASSERT((range_detail::RandomAccessIteratorConcept<BOOST_DEDUCED_TYPENAME RandomAccessRangeConcept::iterator>));
+ BOOST_RANGE_CONCEPT_ASSERT((range_detail::RandomAccessIteratorConcept<BOOST_DEDUCED_TYPENAME RandomAccessRangeConcept::const_iterator>));
#endif
};
#include <boost/config.hpp>
-#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 > \
#include <boost/assert.hpp>
#include <boost/iterator/iterator_traits.hpp>
#include <boost/iterator/iterator_facade.hpp>
+#include <boost/mpl/or.hpp>
#include <boost/type_traits/is_abstract.hpp>
+#include <boost/type_traits/is_array.hpp>
#include <boost/type_traits/is_pointer.hpp>
#include <boost/range/functions.hpp>
#include <boost/range/iterator.hpp>
private: // for return value of operator()()
typedef BOOST_DEDUCED_TYPENAME
- boost::mpl::if_< boost::is_abstract<value_type>,
+ boost::mpl::if_< boost::mpl::or_< boost::is_abstract< value_type >,
+ boost::is_array< value_type > >,
reference, value_type >::type abstract_value_type;
public:
{
typedef u16_to_u32_iterator<BidiIterator, UChar32> conv_type;
typedef match_results<conv_type> 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:
{
typedef u8_to_u32_iterator<BidiIterator, UChar32> conv_type;
typedef match_results<conv_type> 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:
{
typedef u16_to_u32_iterator<BidiIterator, UChar32> conv_type;
typedef match_results<conv_type> 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:
{
typedef u8_to_u32_iterator<BidiIterator, UChar32> conv_type;
typedef match_results<conv_type> 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:
//
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, }
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)
case syntax_element_long_set_rep:
// set the state_id of this repeat:
static_cast<re_repeat*>(state)->state_id = m_repeater_id++;
- // fall through:
+ BOOST_FALLTHROUGH;
case syntax_element_alt:
std::memset(static_cast<re_alt*>(state)->_map, 0, sizeof(static_cast<re_alt*>(state)->_map));
static_cast<re_alt*>(state)->can_be_null = 0;
- // fall through:
+ BOOST_FALLTHROUGH;
case syntax_element_jump:
static_cast<re_jump*>(state)->alt.p = getaddress(static_cast<re_jump*>(state)->alt.i, state);
- // fall through again:
+ BOOST_FALLTHROUGH;
default:
if(state->next.i)
state->next.p = getaddress(state->next.i, state);
}
}
}
+ break;
default:
break;
}
e.raise();
}
}
- // fall through:
+ BOOST_FALLTHROUGH;
default:
state = state->next.p;
}
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:
state = state->next.p->next.p;
break;
}
- // otherwise fall through:
+ BOOST_FALLTHROUGH;
default:
state = state->next.p;
}
if(state_id <= sizeof(m_bad_repeats) * CHAR_BIT)
m_bad_repeats |= (one << state_id);
}
+ break;
default:
break;
}
case syntax_element_long_set_rep:
if(this->m_has_backrefs == 0)
static_cast<re_repeat*>(state)->leading = true;
- // fall through:
+ BOOST_FALLTHROUGH;
default:
return;
}
while((m_position != m_end) && !is_separator(*m_position++)){}
return true;
}
- // Otherwise fall through:
+ BOOST_FALLTHROUGH;
default:
result = parse_literal();
break;
{
case 'w':
negate = false;
- // fall through:
+ BOOST_FALLTHROUGH;
case 'W':
{
basic_char_set<charT, traits> char_set;
}
case 's':
negate = false;
- // fall through:
+ BOOST_FALLTHROUGH;
case 'S':
return add_emacs_code(negate);
case 'c':
{
case regex_constants::escape_type_not_class:
negate = true;
- // fall through:
+ BOOST_FALLTHROUGH;
case regex_constants::escape_type_class:
{
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;
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;
// 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:
++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<std::size_t>::max)();
+ max = (v >= 0) ? (std::size_t)v : (std::numeric_limits<std::size_t>::max)();
}
else
{
// 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)
{
++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:
{
case regex_constants::syntax_or:
m_mark_reset = m_mark_count;
- // fall through:
+ BOOST_FALLTHROUGH;
case regex_constants::syntax_colon:
//
// a non-capturing mark:
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;
}
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))
if(::boost::is_random_access_iterator<BidiIterator>::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<std::size_t>::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))
{
if(::boost::is_random_access_iterator<BidiIterator>::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<std::size_t>::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<unsigned char>(traits_inst.translate(*position, icase))])
{
if(::boost::is_random_access_iterator<BidiIterator>::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<std::size_t>::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)))
{
if(::boost::is_random_access_iterator<BidiIterator>::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<std::size_t>::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<unsigned char>(traits_inst.translate(*position, icase))])
{
if(::boost::is_random_access_iterator<BidiIterator>::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<std::size_t>::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)))
{
format_perl();
break;
}
- // fall through, not a special character:
+ // not a special character:
+ BOOST_FALLTHROUGH;
default:
put(*m_position);
++m_position;
case '{':
have_brace = true;
++m_position;
- // fall through....
+ BOOST_FALLTHROUGH;
default:
// see if we have a number:
{
template <class OutputIter>
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);
template <class OutputIter>
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:
std::size_t max_split)
{
typedef typename std::basic_string<charT, Traits1, Alloc1>::const_iterator ci_t;
- typedef typename match_results<ci_t>::allocator_type match_allocator;
+ //typedef typename match_results<ci_t>::allocator_type match_allocator;
ci_t last = s.begin();
std::size_t init_size = max_split;
re_detail::split_pred<OutputIterator, charT, Traits1, Alloc1> pred(&last, &out, &max_split);
* 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
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>(wchar_t c)
{
inline bool is_separator(charT c)
{
return BOOST_REGEX_MAKE_BOOL(
- (c == static_cast<charT>('\n'))
- || (c == static_cast<charT>('\r'))
- || (c == static_cast<charT>('\f'))
- || (static_cast<boost::uint16_t>(c) == 0x2028u)
- || (static_cast<boost::uint16_t>(c) == 0x2029u)
+ (c == static_cast<charT>('\n'))
+ || (c == static_cast<charT>('\r'))
+ || (c == static_cast<charT>('\f'))
+ || (static_cast<boost::uint16_t>(c) == 0x2028u)
+ || (static_cast<boost::uint16_t>(c) == 0x2029u)
|| (static_cast<boost::uint16_t>(c) == 0x85u));
}
template <>
'x', 'd', 'i', 'g', 'i', 't',
};
- static const character_pointer_range<charT> ranges[21] =
+ static const character_pointer_range<charT> ranges[21] =
{
{data+0, data+5,}, // alnum
{data+5, data+10,}, // alpha
};
static const character_pointer_range<charT>* ranges_begin = ranges;
static const character_pointer_range<charT>* ranges_end = ranges + (sizeof(ranges)/sizeof(ranges[0]));
-
+
character_pointer_range<charT> t = { p1, p2, };
const character_pointer_range<charT>* p = std::lower_bound(ranges_begin, ranges_end, t);
if((p != ranges_end) && (t == *p))
# 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<unsigned char>('\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<unsigned char>('\x85'), ']', ')', '\0' };
charT c = static_cast<charT>(0x2029u);
bool b = (static_cast<unsigned>(c) == 0x2029u);
-
+
return (b ? e1 : e2);
#ifdef BOOST_MSVC
# pragma warning(pop)
# 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
#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
struct rebind {
typedef allocate_array_helper<A, T[], U> 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<class U>
allocate_array_helper(const allocate_array_helper<A, T[], U>& other)
struct rebind {
typedef allocate_array_helper<A, T[N], U> 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<class U>
allocate_array_helper(const allocate_array_helper<A, T[N], U>& other)
template<typename T>
class array_deleter<T[]> {
public:
- array_deleter(std::size_t size)
- : size(size),
+ array_deleter(std::size_t size_)
+ : size(size_),
object(0) {
}
~array_deleter() {
struct rebind {
typedef make_array_helper<T[], U> 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<class U>
make_array_helper(const make_array_helper<T[], U>& other)
memory->~Y();
}
template<typename U>
- bool operator==(const make_array_helper<T[], U>& other) const {
+ bool operator==(const make_array_helper<T[], U>&) const {
return true;
}
template<typename U>
struct rebind {
typedef make_array_helper<T[N], U> other;
};
- make_array_helper(T** data)
- : data(data) {
+ make_array_helper(T** data_)
+ : data(data_) {
}
template<class U>
make_array_helper(const make_array_helper<T[N], U>& other)
memory->~Y();
}
template<typename U>
- bool operator==(const make_array_helper<T[N], U>& other) const {
+ bool operator==(const make_array_helper<T[N], U>&) const {
return true;
}
template<typename U>
}
catch( ... )
{
- D()( p ); // delete p
+ D::operator_fn( p ); // delete p
throw;
}
if( pi_ == 0 )
{
- D()( p ); // delete p
+ D::operator_fn( p ); // delete p
boost::throw_exception( std::bad_alloc() );
}
}
catch(...)
{
- D()( p );
+ D::operator_fn( p );
if( pi_ != 0 )
{
}
else
{
- D()( p );
+ D::operator_fn( p );
boost::throw_exception( std::bad_alloc() );
}
#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();
destroy();
}
+ static void operator_fn( T* ) // operator() can't be static
+ {
+ }
+
void * address() BOOST_NOEXCEPT
{
return storage_.data_;
#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()
#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 & operator=( std::unique_ptr<Y, D> && r )
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
+#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__
// 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
+# 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_BOOL_CAST(x) (bool)(x)
+# 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{
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 ) \
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)
#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)
#if !defined( BOOST_EXCEPTION_DISABLE )
# include <boost/exception/exception.hpp>
+#if !defined(BOOST_THROW_EXCEPTION_CURRENT_FUNCTION)
# include <boost/current_function.hpp>
-# 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
// 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
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{
++next;
// The last character was a c, that means there is
// 1 more blank field
- last_ = true;
+ last_ = true;
return true;
}
else tok+=*next;
// 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<typename traits, int N>
struct traits_extension_details : public traits {
};
#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<typename traits>
template <>
struct assign_or_plus_equal<std::input_iterator_tag> {
template<class Iterator, class Token>
- static void assign(Iterator b, Iterator e, Token &t) { }
- template<class Token, class Value>
+ static void assign(Iterator , Iterator , Token &) { }
+ template<class Token, class Value>
static void plus_equal(Token &t, const Value &v) {
t += v;
}
typedef tokenizer_detail::traits_extension<Tr> Traits;
typedef std::basic_string<Char,Tr> string_type;
public:
- explicit
+ explicit
char_separator(const Char* dropped_delims,
const Char* kept_delims = 0,
empty_token_policy empty_tokens = drop_empty_tokens)
m_output_done = true;
assigner::assign(start,next,tok);
return true;
- }
+ }
else
return false;
}
++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;
}
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()),
// 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) {
#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"
#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"
#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"
#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/typeof/typeof.hpp> // boost wonders never cease!
#endif
// 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
--- /dev/null
+
+// (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 <boost/type_traits/config.hpp>
+#include <boost/type_traits/is_pod.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+#include <boost/type_traits/detail/ice_and.hpp>
+#include <boost/type_traits/detail/ice_not.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+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<T>::value,
+ ::boost::type_traits::ice_not< ::boost::is_const<T>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value
+ >::value));
+#endif
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_move_assign,T,::boost::detail::has_trivial_move_assign_impl<T>::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 <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED
--- /dev/null
+
+// (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 <boost/type_traits/config.hpp>
+#include <boost/type_traits/intrinsics.hpp>
+#include <boost/type_traits/is_pod.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+#include <boost/type_traits/detail/ice_and.hpp>
+#include <boost/type_traits/detail/ice_not.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+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<T>::value,
+ ::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value
+ >::value));
+#endif
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_move_constructor,T,::boost::detail::has_trivial_move_ctor_impl<T>::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 <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED
// 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
// 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<T>::value) && !::boost::is_volatile<T>::value)
+# define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__has_trivial_move_assign(T) || ::boost::is_pod<T>::value) && ! ::boost::is_const<T>::value && !::boost::is_volatile<T>::value)
+# endif
+
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#endif
# 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
--- /dev/null
+// (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 <boost/config.hpp>
+#include <boost/type_traits/detail/yes_no_type.hpp>
+#include <boost/type_traits/is_base_and_derived.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/is_rvalue_reference.hpp>
+#include <boost/utility/declval.hpp>
+#include <boost/noncopyable.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail{
+
+template <bool DerivedFromNoncopyable, class T>
+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<T1&>()))* = 0);
+// ^
+#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_INTEL_CXX_VERSION)
+
+#ifdef BOOST_NO_CXX11_DECLTYPE
+ template <class T1>
+ static boost::type_traits::yes_type test(T1&, boost::mpl::int_<sizeof(T1(boost::declval<T1&>()))>* = 0);
+#else
+ template <class T1>
+ static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval<T1&>()))* = 0);
+#endif
+
+ static boost::type_traits::no_type test(...);
+#else
+ template <class T1>
+ 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<BOOST_DEDUCED_TYPENAME boost::add_reference<T>::type>()
+ )) == sizeof(boost::type_traits::yes_type)
+ ||
+ boost::is_rvalue_reference<T>::value
+ ));
+};
+
+template <class T>
+struct is_copy_constructible_impl2<true, T> {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template <class T>
+struct is_copy_constructible_impl {
+
+ BOOST_STATIC_CONSTANT(bool, value = (
+ boost::detail::is_copy_constructible_impl2<
+ boost::is_base_and_derived<boost::noncopyable, T>::value,
+ T
+ >::value
+ ));
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_copy_constructible,T,::boost::detail::is_copy_constructible_impl<T>::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 <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED
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
--- /dev/null
+
+// (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 <boost/config.hpp>
+#include <boost/type_traits/has_trivial_move_assign.hpp>
+#include <boost/type_traits/has_nothrow_assign.hpp>
+#include <boost/type_traits/is_array.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/detail/ice_and.hpp>
+#include <boost/type_traits/detail/ice_or.hpp>
+#include <boost/type_traits/detail/ice_not.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/utility/declval.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail{
+
+#ifndef BOOST_NO_CXX11_NOEXCEPT
+
+template <class T, class Enable = void>
+struct false_or_cpp11_noexcept_move_assignable: public ::boost::false_type {};
+
+template <class T>
+struct false_or_cpp11_noexcept_move_assignable <
+ T,
+ typename ::boost::enable_if_c<sizeof(T) && BOOST_NOEXCEPT_EXPR(::boost::declval<T&>() = ::boost::declval<T>())>::type
+ > : public ::boost::integral_constant<bool, BOOST_NOEXCEPT_EXPR(::boost::declval<T&>() = ::boost::declval<T>())>
+{};
+
+template <class T>
+struct is_nothrow_move_assignable_imp{
+ BOOST_STATIC_CONSTANT(bool, value = (
+ ::boost::type_traits::ice_and<
+ ::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_reference<T>::value >::value,
+ ::boost::detail::false_or_cpp11_noexcept_move_assignable<T>::value
+ >::value));
+};
+
+#else
+
+template <class T>
+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<T>::value,
+ ::boost::has_nothrow_assign<T>::value
+ >::value,
+ ::boost::type_traits::ice_not< ::boost::is_array<T>::value >::value
+ >::value));
+};
+
+#endif
+
+}
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_nothrow_move_assignable,T,::boost::detail::is_nothrow_move_assignable_imp<T>::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 <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED
--- /dev/null
+
+// (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 <boost/config.hpp>
+#include <boost/type_traits/has_trivial_move_constructor.hpp>
+#include <boost/type_traits/has_nothrow_copy.hpp>
+#include <boost/type_traits/is_array.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/detail/ice_or.hpp>
+#include <boost/type_traits/detail/ice_and.hpp>
+#include <boost/utility/declval.hpp>
+#include <boost/utility/enable_if.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail{
+
+#ifndef BOOST_NO_CXX11_NOEXCEPT
+
+template <class T, class Enable = void>
+struct false_or_cpp11_noexcept_move_constructible: public ::boost::false_type {};
+
+template <class T>
+struct false_or_cpp11_noexcept_move_constructible <
+ T,
+ typename ::boost::enable_if_c<sizeof(T) && BOOST_NOEXCEPT_EXPR(T(::boost::declval<T>()))>::type
+ > : public ::boost::integral_constant<bool, BOOST_NOEXCEPT_EXPR(T(::boost::declval<T>()))>
+{};
+
+template <class T>
+struct is_nothrow_move_constructible_imp{
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_and<
+ ::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_reference<T>::value >::value,
+ ::boost::detail::false_or_cpp11_noexcept_move_constructible<T>::value
+ >::value));
+};
+
+#else
+
+template <class T>
+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<T>::value,
+ ::boost::has_nothrow_copy<T>::value
+ >::value,
+ ::boost::type_traits::ice_not< ::boost::is_array<T>::value >::value
+ >::value));
+};
+
+#endif
+
+}
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_nothrow_move_constructible,T,::boost::detail::is_nothrow_move_constructible_imp<T>::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 <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED
} // namespace detail
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::detail::is_pod_impl<T>::value)
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pod,T,::boost::detail::is_pod_impl<T>::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<T>::value)
} // namespace boost
-// 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
template<class T> 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<T>::f( v, 0 );
// 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
// <http://www.boost.org/LICENSE_1_0.txt>.)
#ifndef BOOST_UTILITY_BASE_FROM_MEMBER_HPP
#define BOOST_UTILITY_BASE_FROM_MEMBER_HPP
+#include <boost/config.hpp>
#include <boost/preprocessor/arithmetic/inc.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/utility/enable_if.hpp>
// Base-from-member arity configuration macro ------------------------------//
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<typename
+ ::boost::remove_reference<T>::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<T>::type,
+ typename ::boost::detail::remove_cv_ref<U>::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<typename ...T>
+struct enable_if_unrelated
+ : public ::boost::enable_if_c<true>
+{};
+
+template<typename T, typename U, typename ...U2>
+struct enable_if_unrelated<T, U, U2...>
+ : public ::boost::disable_if< ::boost::detail::is_related<T, U> >
+{};
+#endif
+
+} // namespace boost::detail
+
+
// Base-from-member class template -----------------------------------------//
// Helper to initialize a base object so a derived class can use this
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 <typename ...T, typename EnableIf = typename
+ ::boost::detail::enable_if_unrelated<base_from_member, T...>::type>
+ explicit BOOST_CONSTEXPR base_from_member( T&& ...x )
+ BOOST_NOEXCEPT_IF( BOOST_NOEXCEPT_EXPR(::new ((void*) 0) MemberType(
+ static_cast<T&&>(x)... )) ) // no std::is_nothrow_constructible...
+ : member( static_cast<T&&>(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
-// 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 <boost/config.hpp>
//----------------------------------------------------------------------------//
#include <boost/type_traits/add_rvalue_reference.hpp>
-//#include <boost/type_traits/add_lvalue_reference.hpp>
//----------------------------------------------------------------------------//
// //
// 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 <class To, class From>
-//~ decltype(static_cast<To>(declval<From>())) 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). \97end
-//~ 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 <class To, class From>
+// decltype(static_cast<To>(declval<From>())) 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 T>
typename add_rvalue_reference<T>::type declval() BOOST_NOEXCEPT; // as unevaluated operand
-//#else
-// template <typename T>
-// typename add_lvalue_reference<T>::type declval() BOOST_NOEXCEPT; // as unevaluated operand
-//#endif
+
} // namespace boost
-#endif // BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP
+#endif // BOOST_UTILITY_DECLVAL_HPP
// 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
// number, y is the minor version number, and z is the patch level if not 0.
// This is used by <config/auto_link.hpp> to select which library version to link to.
-#define BOOST_LIB_VERSION "1_53"
+#define BOOST_LIB_VERSION "1_55"
#endif
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);
}
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];
}
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];
}