diff options
Diffstat (limited to 'contrib/src/boost/detail')
18 files changed, 1963 insertions, 1506 deletions
diff --git a/contrib/src/boost/detail/dynamic_bitset.hpp b/contrib/src/boost/detail/dynamic_bitset.hpp index 7ddd6e0..e0f675d 100644 --- a/contrib/src/boost/detail/dynamic_bitset.hpp +++ b/contrib/src/boost/detail/dynamic_bitset.hpp @@ -1,241 +1,241 @@ -// -----------------------------------------------------------
-//
-// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek
-// Copyright (c) 2003-2006, 2008 Gennaro Prota
-//
-// Copyright (c) 2014 Glen Joseph Fernandes
-// glenfe at live dot com
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// -----------------------------------------------------------
-
-#ifndef BOOST_DETAIL_DYNAMIC_BITSET_HPP
-#define BOOST_DETAIL_DYNAMIC_BITSET_HPP
-
-#include <memory>
-#include <cstddef>
-#include "boost/config.hpp"
-#include "boost/detail/workaround.hpp"
-
-
-namespace boost {
-
- namespace detail {
- namespace dynamic_bitset_impl {
-
- // Gives (read-)access to the object representation
- // of an object of type T (3.9p4). CANNOT be used
- // on a base sub-object
- //
- template <typename T>
- inline const unsigned char * object_representation (T* p)
- {
- return static_cast<const unsigned char *>(static_cast<const void *>(p));
- }
-
- template<typename T, int amount, int width /* = default */>
- struct shifter
- {
- static void left_shift(T & v) {
- amount >= width ? (v = 0)
- : (v >>= BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(amount));
- }
- };
-
- // ------- count function implementation --------------
-
- typedef unsigned char byte_type;
-
- // These two entities
- //
- // enum mode { access_by_bytes, access_by_blocks };
- // template <mode> struct mode_to_type {};
- //
- // were removed, since the regression logs (as of 24 Aug 2008)
- // showed that several compilers had troubles with recognizing
- //
- // const mode m = access_by_bytes
- //
- // as a constant expression
- //
- // * So, we'll use bool, instead of enum *.
- //
- template <bool value>
- struct value_to_type
- {
- value_to_type() {}
- };
- const bool access_by_bytes = true;
- const bool access_by_blocks = false;
-
-
- // the table: wrapped in a class template, so
- // that it is only instantiated if/when needed
- //
- template <bool dummy_name = true>
- struct count_table { static const byte_type table[]; };
-
- template <>
- struct count_table<false> { /* no table */ };
-
-
- const unsigned int table_width = 8;
- template <bool b>
- const byte_type count_table<b>::table[] =
- {
- // Automatically generated by GPTableGen.exe v.1.0
- //
- 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
- };
-
-
- // overload for access by bytes
- //
-
- template <typename Iterator>
- inline std::size_t do_count(Iterator first, std::size_t length,
- int /*dummy param*/,
- value_to_type<access_by_bytes>* )
- {
- std::size_t num = 0;
- if (length)
- {
- const byte_type * p = object_representation(&*first);
- length *= sizeof(*first);
-
- do {
- num += count_table<>::table[*p];
- ++p;
- --length;
-
- } while (length);
- }
-
- return num;
- }
-
-
- // overload for access by blocks
- //
- template <typename Iterator, typename ValueType>
- inline std::size_t do_count(Iterator first, std::size_t length, ValueType,
- value_to_type<access_by_blocks>*)
- {
- std::size_t num = 0;
- while (length){
-
- ValueType value = *first;
- while (value) {
- num += count_table<>::table[value & ((1u<<table_width) - 1)];
- value >>= table_width;
- }
-
- ++first;
- --length;
- }
-
- return num;
- }
-
- // -------------------------------------------------------
-
-
- // Some library implementations simply return a dummy
- // value such as
- //
- // size_type(-1) / sizeof(T)
- //
- // from vector<>::max_size. This tries to get more
- // meaningful info.
- //
- template <typename T>
- inline typename T::size_type vector_max_size_workaround(const T & v)
- BOOST_NOEXCEPT
- {
- typedef typename T::allocator_type allocator_type;
-
- const allocator_type& alloc = v.get_allocator();
-
-#if !defined(BOOST_NO_CXX11_ALLOCATOR)
- typedef std::allocator_traits<allocator_type> allocator_traits;
-
- const typename allocator_traits::size_type alloc_max =
- allocator_traits::max_size(alloc);
-#else
- const typename allocator_type::size_type alloc_max = alloc.max_size();
-#endif
-
- const typename T::size_type container_max = v.max_size();
-
- return alloc_max < container_max ? alloc_max : container_max;
- }
-
- // for static_asserts
- template <typename T>
- struct allowed_block_type {
- enum { value = T(-1) > 0 }; // ensure T has no sign
- };
-
- template <>
- struct allowed_block_type<bool> {
- enum { value = false };
- };
-
-
- template <typename T>
- struct is_numeric {
- enum { value = false };
- };
-
-# define BOOST_dynamic_bitset_is_numeric(x) \
- template<> \
- struct is_numeric< x > { \
- enum { value = true }; \
- } /**/
-
- BOOST_dynamic_bitset_is_numeric(bool);
- BOOST_dynamic_bitset_is_numeric(char);
-
-#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
- BOOST_dynamic_bitset_is_numeric(wchar_t);
-#endif
-
- BOOST_dynamic_bitset_is_numeric(signed char);
- BOOST_dynamic_bitset_is_numeric(short int);
- BOOST_dynamic_bitset_is_numeric(int);
- BOOST_dynamic_bitset_is_numeric(long int);
-
- BOOST_dynamic_bitset_is_numeric(unsigned char);
- BOOST_dynamic_bitset_is_numeric(unsigned short);
- BOOST_dynamic_bitset_is_numeric(unsigned int);
- BOOST_dynamic_bitset_is_numeric(unsigned long);
-
-#if defined(BOOST_HAS_LONG_LONG)
- BOOST_dynamic_bitset_is_numeric(::boost::long_long_type);
- BOOST_dynamic_bitset_is_numeric(::boost::ulong_long_type);
-#endif
-
- // intentionally omitted
- //BOOST_dynamic_bitset_is_numeric(float);
- //BOOST_dynamic_bitset_is_numeric(double);
- //BOOST_dynamic_bitset_is_numeric(long double);
-
-#undef BOOST_dynamic_bitset_is_numeric
-
- } // dynamic_bitset_impl
- } // namespace detail
-
-} // namespace boost
-
-#endif // include guard
-
+// ----------------------------------------------------------- +// +// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek +// Copyright (c) 2003-2006, 2008 Gennaro Prota +// +// Copyright (c) 2014 Glen Joseph Fernandes +// glenfe at live dot com +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ----------------------------------------------------------- + +#ifndef BOOST_DETAIL_DYNAMIC_BITSET_HPP +#define BOOST_DETAIL_DYNAMIC_BITSET_HPP + +#include <memory> +#include <cstddef> +#include "boost/config.hpp" +#include "boost/detail/workaround.hpp" + + +namespace boost { + + namespace detail { + namespace dynamic_bitset_impl { + + // Gives (read-)access to the object representation + // of an object of type T (3.9p4). CANNOT be used + // on a base sub-object + // + template <typename T> + inline const unsigned char * object_representation (T* p) + { + return static_cast<const unsigned char *>(static_cast<const void *>(p)); + } + + template<typename T, int amount, int width /* = default */> + struct shifter + { + static void left_shift(T & v) { + amount >= width ? (v = 0) + : (v >>= BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(amount)); + } + }; + + // ------- count function implementation -------------- + + typedef unsigned char byte_type; + + // These two entities + // + // enum mode { access_by_bytes, access_by_blocks }; + // template <mode> struct mode_to_type {}; + // + // were removed, since the regression logs (as of 24 Aug 2008) + // showed that several compilers had troubles with recognizing + // + // const mode m = access_by_bytes + // + // as a constant expression + // + // * So, we'll use bool, instead of enum *. + // + template <bool value> + struct value_to_type + { + value_to_type() {} + }; + const bool access_by_bytes = true; + const bool access_by_blocks = false; + + + // the table: wrapped in a class template, so + // that it is only instantiated if/when needed + // + template <bool dummy_name = true> + struct count_table { static const byte_type table[]; }; + + template <> + struct count_table<false> { /* no table */ }; + + + const unsigned int table_width = 8; + template <bool b> + const byte_type count_table<b>::table[] = + { + // Automatically generated by GPTableGen.exe v.1.0 + // + 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, + 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, + 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, + 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, + 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, + 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, + 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, + 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 + }; + + + // overload for access by bytes + // + + template <typename Iterator> + inline std::size_t do_count(Iterator first, std::size_t length, + int /*dummy param*/, + value_to_type<access_by_bytes>* ) + { + std::size_t num = 0; + if (length) + { + const byte_type * p = object_representation(&*first); + length *= sizeof(*first); + + do { + num += count_table<>::table[*p]; + ++p; + --length; + + } while (length); + } + + return num; + } + + + // overload for access by blocks + // + template <typename Iterator, typename ValueType> + inline std::size_t do_count(Iterator first, std::size_t length, ValueType, + value_to_type<access_by_blocks>*) + { + std::size_t num = 0; + while (length){ + + ValueType value = *first; + while (value) { + num += count_table<>::table[value & ((1u<<table_width) - 1)]; + value >>= table_width; + } + + ++first; + --length; + } + + return num; + } + + // ------------------------------------------------------- + + + // Some library implementations simply return a dummy + // value such as + // + // size_type(-1) / sizeof(T) + // + // from vector<>::max_size. This tries to get more + // meaningful info. + // + template <typename T> + inline typename T::size_type vector_max_size_workaround(const T & v) + BOOST_NOEXCEPT + { + typedef typename T::allocator_type allocator_type; + + const allocator_type& alloc = v.get_allocator(); + +#if !defined(BOOST_NO_CXX11_ALLOCATOR) + typedef std::allocator_traits<allocator_type> allocator_traits; + + const typename allocator_traits::size_type alloc_max = + allocator_traits::max_size(alloc); +#else + const typename allocator_type::size_type alloc_max = alloc.max_size(); +#endif + + const typename T::size_type container_max = v.max_size(); + + return alloc_max < container_max ? alloc_max : container_max; + } + + // for static_asserts + template <typename T> + struct allowed_block_type { + enum { value = T(-1) > 0 }; // ensure T has no sign + }; + + template <> + struct allowed_block_type<bool> { + enum { value = false }; + }; + + + template <typename T> + struct is_numeric { + enum { value = false }; + }; + +# define BOOST_dynamic_bitset_is_numeric(x) \ + template<> \ + struct is_numeric< x > { \ + enum { value = true }; \ + } /**/ + + BOOST_dynamic_bitset_is_numeric(bool); + BOOST_dynamic_bitset_is_numeric(char); + +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) + BOOST_dynamic_bitset_is_numeric(wchar_t); +#endif + + BOOST_dynamic_bitset_is_numeric(signed char); + BOOST_dynamic_bitset_is_numeric(short int); + BOOST_dynamic_bitset_is_numeric(int); + BOOST_dynamic_bitset_is_numeric(long int); + + BOOST_dynamic_bitset_is_numeric(unsigned char); + BOOST_dynamic_bitset_is_numeric(unsigned short); + BOOST_dynamic_bitset_is_numeric(unsigned int); + BOOST_dynamic_bitset_is_numeric(unsigned long); + +#if defined(BOOST_HAS_LONG_LONG) + BOOST_dynamic_bitset_is_numeric(::boost::long_long_type); + BOOST_dynamic_bitset_is_numeric(::boost::ulong_long_type); +#endif + + // intentionally omitted + //BOOST_dynamic_bitset_is_numeric(float); + //BOOST_dynamic_bitset_is_numeric(double); + //BOOST_dynamic_bitset_is_numeric(long double); + +#undef BOOST_dynamic_bitset_is_numeric + + } // dynamic_bitset_impl + } // namespace detail + +} // namespace boost + +#endif // include guard + diff --git a/contrib/src/boost/detail/indirect_traits.hpp b/contrib/src/boost/detail/indirect_traits.hpp index 7d0020b..6294e40 100644 --- a/contrib/src/boost/detail/indirect_traits.hpp +++ b/contrib/src/boost/detail/indirect_traits.hpp @@ -1,204 +1,204 @@ -// Copyright David Abrahams 2002.
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-#ifndef INDIRECT_TRAITS_DWA2002131_HPP
-# define INDIRECT_TRAITS_DWA2002131_HPP
-# include <boost/type_traits/is_function.hpp>
-# include <boost/type_traits/is_reference.hpp>
-# include <boost/type_traits/is_pointer.hpp>
-# include <boost/type_traits/is_class.hpp>
-# include <boost/type_traits/is_const.hpp>
-# include <boost/type_traits/is_volatile.hpp>
-# include <boost/type_traits/is_member_function_pointer.hpp>
-# include <boost/type_traits/is_member_pointer.hpp>
-# include <boost/type_traits/remove_cv.hpp>
-# include <boost/type_traits/remove_reference.hpp>
-# include <boost/type_traits/remove_pointer.hpp>
-
-# include <boost/detail/workaround.hpp>
-
-# include <boost/mpl/eval_if.hpp>
-# include <boost/mpl/if.hpp>
-# include <boost/mpl/bool.hpp>
-# include <boost/mpl/and.hpp>
-# include <boost/mpl/not.hpp>
-# include <boost/mpl/aux_/lambda_support.hpp>
-
-
-namespace boost { namespace detail {
-
-namespace indirect_traits {
-
-template <class T>
-struct is_reference_to_const : mpl::false_
-{
-};
-
-template <class T>
-struct is_reference_to_const<T const&> : mpl::true_
-{
-};
-
-# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround
-template<class T>
-struct is_reference_to_const<T const volatile&> : mpl::true_
-{
-};
-# endif
-
-template <class T>
-struct is_reference_to_function : mpl::false_
-{
-};
-
-template <class T>
-struct is_reference_to_function<T&> : is_function<T>
-{
-};
-
-template <class T>
-struct is_pointer_to_function : mpl::false_
-{
-};
-
-// There's no such thing as a pointer-to-cv-function, so we don't need
-// specializations for those
-template <class T>
-struct is_pointer_to_function<T*> : is_function<T>
-{
-};
-
-template <class T>
-struct is_reference_to_member_function_pointer_impl : mpl::false_
-{
-};
-
-template <class T>
-struct is_reference_to_member_function_pointer_impl<T&>
- : is_member_function_pointer<typename remove_cv<T>::type>
-{
-};
-
-
-template <class T>
-struct is_reference_to_member_function_pointer
- : is_reference_to_member_function_pointer_impl<T>
-{
- BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_member_function_pointer,(T))
-};
-
-template <class T>
-struct is_reference_to_function_pointer_aux
- : mpl::and_<
- is_reference<T>
- , is_pointer_to_function<
- typename remove_cv<
- typename remove_reference<T>::type
- >::type
- >
- >
-{
- // There's no such thing as a pointer-to-cv-function, so we don't need specializations for those
-};
-
-template <class T>
-struct is_reference_to_function_pointer
- : mpl::if_<
- is_reference_to_function<T>
- , mpl::false_
- , is_reference_to_function_pointer_aux<T>
- >::type
-{
-};
-
-template <class T>
-struct is_reference_to_non_const
- : mpl::and_<
- is_reference<T>
- , mpl::not_<
- is_reference_to_const<T>
- >
- >
-{
-};
-
-template <class T>
-struct is_reference_to_volatile : mpl::false_
-{
-};
-
-template <class T>
-struct is_reference_to_volatile<T volatile&> : mpl::true_
-{
-};
-
-# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround
-template <class T>
-struct is_reference_to_volatile<T const volatile&> : mpl::true_
-{
-};
-# endif
-
-
-template <class T>
-struct is_reference_to_pointer : mpl::false_
-{
-};
-
-template <class T>
-struct is_reference_to_pointer<T*&> : mpl::true_
-{
-};
-
-template <class T>
-struct is_reference_to_pointer<T* const&> : mpl::true_
-{
-};
-
-template <class T>
-struct is_reference_to_pointer<T* volatile&> : mpl::true_
-{
-};
-
-template <class T>
-struct is_reference_to_pointer<T* const volatile&> : mpl::true_
-{
-};
-
-template <class T>
-struct is_reference_to_class
- : mpl::and_<
- is_reference<T>
- , is_class<
- typename remove_cv<
- typename remove_reference<T>::type
- >::type
- >
- >
-{
- BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_class,(T))
-};
-
-template <class T>
-struct is_pointer_to_class
- : mpl::and_<
- is_pointer<T>
- , is_class<
- typename remove_cv<
- typename remove_pointer<T>::type
- >::type
- >
- >
-{
- BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_pointer_to_class,(T))
-};
-
-
-}
-
-using namespace indirect_traits;
-
-}} // namespace boost::python::detail
-
-#endif // INDIRECT_TRAITS_DWA2002131_HPP
+// Copyright David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef INDIRECT_TRAITS_DWA2002131_HPP +# define INDIRECT_TRAITS_DWA2002131_HPP +# include <boost/type_traits/is_function.hpp> +# include <boost/type_traits/is_reference.hpp> +# include <boost/type_traits/is_pointer.hpp> +# include <boost/type_traits/is_class.hpp> +# include <boost/type_traits/is_const.hpp> +# include <boost/type_traits/is_volatile.hpp> +# include <boost/type_traits/is_member_function_pointer.hpp> +# include <boost/type_traits/is_member_pointer.hpp> +# include <boost/type_traits/remove_cv.hpp> +# include <boost/type_traits/remove_reference.hpp> +# include <boost/type_traits/remove_pointer.hpp> + +# include <boost/detail/workaround.hpp> + +# include <boost/mpl/eval_if.hpp> +# include <boost/mpl/if.hpp> +# include <boost/mpl/bool.hpp> +# include <boost/mpl/and.hpp> +# include <boost/mpl/not.hpp> +# include <boost/mpl/aux_/lambda_support.hpp> + + +namespace boost { namespace detail { + +namespace indirect_traits { + +template <class T> +struct is_reference_to_const : mpl::false_ +{ +}; + +template <class T> +struct is_reference_to_const<T const&> : mpl::true_ +{ +}; + +# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround +template<class T> +struct is_reference_to_const<T const volatile&> : mpl::true_ +{ +}; +# endif + +template <class T> +struct is_reference_to_function : mpl::false_ +{ +}; + +template <class T> +struct is_reference_to_function<T&> : is_function<T> +{ +}; + +template <class T> +struct is_pointer_to_function : mpl::false_ +{ +}; + +// There's no such thing as a pointer-to-cv-function, so we don't need +// specializations for those +template <class T> +struct is_pointer_to_function<T*> : is_function<T> +{ +}; + +template <class T> +struct is_reference_to_member_function_pointer_impl : mpl::false_ +{ +}; + +template <class T> +struct is_reference_to_member_function_pointer_impl<T&> + : is_member_function_pointer<typename remove_cv<T>::type> +{ +}; + + +template <class T> +struct is_reference_to_member_function_pointer + : is_reference_to_member_function_pointer_impl<T> +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_member_function_pointer,(T)) +}; + +template <class T> +struct is_reference_to_function_pointer_aux + : mpl::and_< + is_reference<T> + , is_pointer_to_function< + typename remove_cv< + typename remove_reference<T>::type + >::type + > + > +{ + // There's no such thing as a pointer-to-cv-function, so we don't need specializations for those +}; + +template <class T> +struct is_reference_to_function_pointer + : mpl::if_< + is_reference_to_function<T> + , mpl::false_ + , is_reference_to_function_pointer_aux<T> + >::type +{ +}; + +template <class T> +struct is_reference_to_non_const + : mpl::and_< + is_reference<T> + , mpl::not_< + is_reference_to_const<T> + > + > +{ +}; + +template <class T> +struct is_reference_to_volatile : mpl::false_ +{ +}; + +template <class T> +struct is_reference_to_volatile<T volatile&> : mpl::true_ +{ +}; + +# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround +template <class T> +struct is_reference_to_volatile<T const volatile&> : mpl::true_ +{ +}; +# endif + + +template <class T> +struct is_reference_to_pointer : mpl::false_ +{ +}; + +template <class T> +struct is_reference_to_pointer<T*&> : mpl::true_ +{ +}; + +template <class T> +struct is_reference_to_pointer<T* const&> : mpl::true_ +{ +}; + +template <class T> +struct is_reference_to_pointer<T* volatile&> : mpl::true_ +{ +}; + +template <class T> +struct is_reference_to_pointer<T* const volatile&> : mpl::true_ +{ +}; + +template <class T> +struct is_reference_to_class + : mpl::and_< + is_reference<T> + , is_class< + typename remove_cv< + typename remove_reference<T>::type + >::type + > + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_class,(T)) +}; + +template <class T> +struct is_pointer_to_class + : mpl::and_< + is_pointer<T> + , is_class< + typename remove_cv< + typename remove_pointer<T>::type + >::type + > + > +{ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_pointer_to_class,(T)) +}; + + +} + +using namespace indirect_traits; + +}} // namespace boost::python::detail + +#endif // INDIRECT_TRAITS_DWA2002131_HPP diff --git a/contrib/src/boost/detail/iterator.hpp b/contrib/src/boost/detail/iterator.hpp index dc748fe..c2e8f1e 100644 --- a/contrib/src/boost/detail/iterator.hpp +++ b/contrib/src/boost/detail/iterator.hpp @@ -1,39 +1,26 @@ -// (C) Copyright David Abrahams 2002.
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef ITERATOR_DWA122600_HPP_
-#define ITERATOR_DWA122600_HPP_
-
-// This header is obsolete and will be deprecated.
-
-#include <iterator>
-#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
-#include <cstddef>
-#endif
-
-namespace boost
-{
-
-namespace detail
-{
-
-using std::iterator_traits;
-using std::distance;
-
-#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
-// std::distance from stlport with Oracle compiler 12.4 and 12.5 fails to deduce template parameters
-// when one of the arguments is an array and the other one is a pointer.
-template< typename T, std::size_t N >
-inline typename std::iterator_traits< T* >::difference_type distance(T (&left)[N], T* right)
-{
- return std::distance(static_cast< T* >(left), right);
-}
-#endif
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // ITERATOR_DWA122600_HPP_
+// (C) Copyright David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef ITERATOR_DWA122600_HPP_ +#define ITERATOR_DWA122600_HPP_ + +// This header is obsolete and will be deprecated. + +#include <iterator> + +namespace boost +{ + +namespace detail +{ + +using std::iterator_traits; +using std::distance; + +} // namespace detail + +} // namespace boost + +#endif // ITERATOR_DWA122600_HPP_ diff --git a/contrib/src/boost/detail/lightweight_mutex.hpp b/contrib/src/boost/detail/lightweight_mutex.hpp new file mode 100644 index 0000000..b7a7f6d --- /dev/null +++ b/contrib/src/boost/detail/lightweight_mutex.hpp @@ -0,0 +1,22 @@ +#ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED +#define BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/detail/lightweight_mutex.hpp - lightweight mutex +// +// Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// + +#include <boost/smart_ptr/detail/lightweight_mutex.hpp> + +#endif // #ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED diff --git a/contrib/src/boost/detail/no_exceptions_support.hpp b/contrib/src/boost/detail/no_exceptions_support.hpp index 7fc400e..7d17454 100644 --- a/contrib/src/boost/detail/no_exceptions_support.hpp +++ b/contrib/src/boost/detail/no_exceptions_support.hpp @@ -1,17 +1,17 @@ -/*
- * Copyright (c) 2014 Glen Fernandes
- *
- * Distributed under the Boost Software License, Version 1.0. (See
- * accompanying file LICENSE_1_0.txt or copy at
- * http://www.boost.org/LICENSE_1_0.txt)
- */
-
-#ifndef BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP
-#define BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP
-
-// The header file at this path is deprecated;
-// use boost/core/no_exceptions_support.hpp instead.
-
-#include <boost/core/no_exceptions_support.hpp>
-
-#endif
+/* + * Copyright (c) 2014 Glen Fernandes + * + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + */ + +#ifndef BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP +#define BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP + +// The header file at this path is deprecated; +// use boost/core/no_exceptions_support.hpp instead. + +#include <boost/core/no_exceptions_support.hpp> + +#endif diff --git a/contrib/src/boost/detail/sp_typeinfo.hpp b/contrib/src/boost/detail/sp_typeinfo.hpp index 09fec4a..4e4de55 100644 --- a/contrib/src/boost/detail/sp_typeinfo.hpp +++ b/contrib/src/boost/detail/sp_typeinfo.hpp @@ -1,36 +1,36 @@ -#ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED
-#define BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-// detail/sp_typeinfo.hpp
-//
-// Deprecated, please use boost/core/typeinfo.hpp
-//
-// Copyright 2007 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0.
-// See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/core/typeinfo.hpp>
-
-namespace boost
-{
-
-namespace detail
-{
-
-typedef boost::core::typeinfo sp_typeinfo;
-
-} // namespace detail
-
-} // namespace boost
-
-#define BOOST_SP_TYPEID(T) BOOST_CORE_TYPEID(T)
-
-#endif // #ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED
+#ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED +#define BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_typeinfo.hpp +// +// Deprecated, please use boost/core/typeinfo.hpp +// +// Copyright 2007 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/core/typeinfo.hpp> + +namespace boost +{ + +namespace detail +{ + +typedef boost::core::typeinfo sp_typeinfo; + +} // namespace detail + +} // namespace boost + +#define BOOST_SP_TYPEID(T) BOOST_CORE_TYPEID(T) + +#endif // #ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED diff --git a/contrib/src/boost/detail/winapi/basic_types.hpp b/contrib/src/boost/detail/winapi/basic_types.hpp index b767a1f..30df135 100644 --- a/contrib/src/boost/detail/winapi/basic_types.hpp +++ b/contrib/src/boost/detail/winapi/basic_types.hpp @@ -1,233 +1,233 @@ -// basic_types.hpp --------------------------------------------------------------//
-
-// Copyright 2010 Vicente J. Botet Escriba
-// Copyright 2015 Andrey Semashev
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-#ifndef BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP
-#define BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP
-
-#include <cstdarg>
-#include <boost/cstdint.hpp>
-#include <boost/detail/winapi/config.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-#if defined( BOOST_USE_WINDOWS_H )
-# include <windows.h>
-#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__)
-# include <winerror.h>
-# ifdef UNDER_CE
-# ifndef WINAPI
-# ifndef _WIN32_WCE_EMULATION
-# define WINAPI __cdecl // Note this doesn't match the desktop definition
-# else
-# define WINAPI __stdcall
-# endif
-# endif
-// Windows CE defines a few functions as inline functions in kfuncs.h
-typedef int BOOL;
-typedef unsigned long DWORD;
-typedef void* HANDLE;
-# include <kfuncs.h>
-# else
-# ifndef WINAPI
-# define WINAPI __stdcall
-# endif
-# endif
-# ifndef NTAPI
-# define NTAPI __stdcall
-# endif
-#else
-# error "Win32 functions not available"
-#endif
-
-#ifndef NO_STRICT
-#ifndef STRICT
-#define STRICT 1
-#endif
-#endif
-
-#if defined(STRICT)
-#define BOOST_DETAIL_WINAPI_DECLARE_HANDLE(x) struct x##__; typedef struct x##__ *x
-#else
-#define BOOST_DETAIL_WINAPI_DECLARE_HANDLE(x) typedef void* x
-#endif
-
-#if !defined( BOOST_USE_WINDOWS_H )
-extern "C" {
-union _LARGE_INTEGER;
-struct _SECURITY_ATTRIBUTES;
-BOOST_DETAIL_WINAPI_DECLARE_HANDLE(HINSTANCE);
-typedef HINSTANCE HMODULE;
-}
-#endif
-
-#if defined(__GNUC__)
-#define BOOST_DETAIL_WINAPI_MAY_ALIAS __attribute__ ((__may_alias__))
-#else
-#define BOOST_DETAIL_WINAPI_MAY_ALIAS
-#endif
-
-// MinGW64 gcc 4.8.2 fails to compile function declarations with boost::detail::winapi::VOID_ arguments even though
-// the typedef expands to void. In Windows SDK, VOID is a macro which unfolds to void. We use our own macro in such cases.
-#define BOOST_DETAIL_WINAPI_VOID void
-
-namespace boost {
-namespace detail {
-namespace winapi {
-#if defined( BOOST_USE_WINDOWS_H )
-
-typedef ::BOOL BOOL_;
-typedef ::PBOOL PBOOL_;
-typedef ::LPBOOL LPBOOL_;
-typedef ::BOOLEAN BOOLEAN_;
-typedef ::PBOOLEAN PBOOLEAN_;
-typedef ::BYTE BYTE_;
-typedef ::PBYTE PBYTE_;
-typedef ::LPBYTE LPBYTE_;
-typedef ::WORD WORD_;
-typedef ::PWORD PWORD_;
-typedef ::LPWORD LPWORD_;
-typedef ::DWORD DWORD_;
-typedef ::PDWORD PDWORD_;
-typedef ::LPDWORD LPDWORD_;
-typedef ::HANDLE HANDLE_;
-typedef ::PHANDLE PHANDLE_;
-typedef ::SHORT SHORT_;
-typedef ::PSHORT PSHORT_;
-typedef ::USHORT USHORT_;
-typedef ::PUSHORT PUSHORT_;
-typedef ::INT INT_;
-typedef ::PINT PINT_;
-typedef ::LPINT LPINT_;
-typedef ::UINT UINT_;
-typedef ::PUINT PUINT_;
-typedef ::LONG LONG_;
-typedef ::PLONG PLONG_;
-typedef ::LPLONG LPLONG_;
-typedef ::ULONG ULONG_;
-typedef ::PULONG PULONG_;
-typedef ::LONGLONG LONGLONG_;
-typedef ::ULONGLONG ULONGLONG_;
-typedef ::INT_PTR INT_PTR_;
-typedef ::UINT_PTR UINT_PTR_;
-typedef ::LONG_PTR LONG_PTR_;
-typedef ::ULONG_PTR ULONG_PTR_;
-typedef ::DWORD_PTR DWORD_PTR_;
-typedef ::PDWORD_PTR PDWORD_PTR_;
-typedef ::SIZE_T SIZE_T_;
-typedef ::PSIZE_T PSIZE_T_;
-typedef ::SSIZE_T SSIZE_T_;
-typedef ::PSSIZE_T PSSIZE_T_;
-typedef VOID VOID_; // VOID is a macro
-typedef ::PVOID PVOID_;
-typedef ::LPVOID LPVOID_;
-typedef ::LPCVOID LPCVOID_;
-typedef ::CHAR CHAR_;
-typedef ::LPSTR LPSTR_;
-typedef ::LPCSTR LPCSTR_;
-typedef ::WCHAR WCHAR_;
-typedef ::LPWSTR LPWSTR_;
-typedef ::LPCWSTR LPCWSTR_;
-
-#else // defined( BOOST_USE_WINDOWS_H )
-
-typedef int BOOL_;
-typedef BOOL_* PBOOL_;
-typedef BOOL_* LPBOOL_;
-typedef unsigned char BYTE_;
-typedef BYTE_* PBYTE_;
-typedef BYTE_* LPBYTE_;
-typedef BYTE_ BOOLEAN_;
-typedef BOOLEAN_* PBOOLEAN_;
-typedef unsigned short WORD_;
-typedef WORD_* PWORD_;
-typedef WORD_* LPWORD_;
-typedef unsigned long DWORD_;
-typedef DWORD_* PDWORD_;
-typedef DWORD_* LPDWORD_;
-typedef void* HANDLE_;
-typedef void** PHANDLE_;
-
-typedef short SHORT_;
-typedef SHORT_* PSHORT_;
-typedef unsigned short USHORT_;
-typedef USHORT_* PUSHORT_;
-typedef int INT_;
-typedef INT_* PINT_;
-typedef INT_* LPINT_;
-typedef unsigned int UINT_;
-typedef UINT_* PUINT_;
-typedef long LONG_;
-typedef LONG_* PLONG_;
-typedef LONG_* LPLONG_;
-typedef unsigned long ULONG_;
-typedef ULONG_* PULONG_;
-
-typedef boost::int64_t LONGLONG_;
-typedef boost::uint64_t ULONGLONG_;
-
-# ifdef _WIN64
-# if defined(__CYGWIN__)
-typedef long INT_PTR_;
-typedef unsigned long UINT_PTR_;
-typedef long LONG_PTR_;
-typedef unsigned long ULONG_PTR_;
-# else
-typedef __int64 INT_PTR_;
-typedef unsigned __int64 UINT_PTR_;
-typedef __int64 LONG_PTR_;
-typedef unsigned __int64 ULONG_PTR_;
-# endif
-# else
-typedef int INT_PTR_;
-typedef unsigned int UINT_PTR_;
-typedef long LONG_PTR_;
-typedef unsigned long ULONG_PTR_;
-# endif
-
-typedef ULONG_PTR_ DWORD_PTR_, *PDWORD_PTR_;
-typedef ULONG_PTR_ SIZE_T_, *PSIZE_T_;
-typedef LONG_PTR_ SSIZE_T_, *PSSIZE_T_;
-
-typedef void VOID_;
-typedef void *PVOID_;
-typedef void *LPVOID_;
-typedef const void *LPCVOID_;
-
-typedef char CHAR_;
-typedef CHAR_ *LPSTR_;
-typedef const CHAR_ *LPCSTR_;
-
-typedef wchar_t WCHAR_;
-typedef WCHAR_ *LPWSTR_;
-typedef const WCHAR_ *LPCWSTR_;
-
-#endif // defined( BOOST_USE_WINDOWS_H )
-
-typedef ::HMODULE HMODULE_;
-
-typedef union BOOST_DETAIL_WINAPI_MAY_ALIAS _LARGE_INTEGER {
- struct {
- DWORD_ LowPart;
- LONG_ HighPart;
- } u;
- LONGLONG_ QuadPart;
-} LARGE_INTEGER_, *PLARGE_INTEGER_;
-
-typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _SECURITY_ATTRIBUTES {
- DWORD_ nLength;
- LPVOID_ lpSecurityDescriptor;
- BOOL_ bInheritHandle;
-} SECURITY_ATTRIBUTES_, *PSECURITY_ATTRIBUTES_, *LPSECURITY_ATTRIBUTES_;
-
-}
-}
-}
-
-#endif // BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP
+// basic_types.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP +#define BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP + +#include <cstdarg> +#include <boost/cstdint.hpp> +#include <boost/detail/winapi/config.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if defined( BOOST_USE_WINDOWS_H ) +# include <windows.h> +#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__) +# include <winerror.h> +# ifdef UNDER_CE +# ifndef WINAPI +# ifndef _WIN32_WCE_EMULATION +# define WINAPI __cdecl // Note this doesn't match the desktop definition +# else +# define WINAPI __stdcall +# endif +# endif +// Windows CE defines a few functions as inline functions in kfuncs.h +typedef int BOOL; +typedef unsigned long DWORD; +typedef void* HANDLE; +# include <kfuncs.h> +# else +# ifndef WINAPI +# define WINAPI __stdcall +# endif +# endif +# ifndef NTAPI +# define NTAPI __stdcall +# endif +#else +# error "Win32 functions not available" +#endif + +#ifndef NO_STRICT +#ifndef STRICT +#define STRICT 1 +#endif +#endif + +#if defined(STRICT) +#define BOOST_DETAIL_WINAPI_DECLARE_HANDLE(x) struct x##__; typedef struct x##__ *x +#else +#define BOOST_DETAIL_WINAPI_DECLARE_HANDLE(x) typedef void* x +#endif + +#if !defined( BOOST_USE_WINDOWS_H ) +extern "C" { +union _LARGE_INTEGER; +struct _SECURITY_ATTRIBUTES; +BOOST_DETAIL_WINAPI_DECLARE_HANDLE(HINSTANCE); +typedef HINSTANCE HMODULE; +} +#endif + +#if defined(__GNUC__) +#define BOOST_DETAIL_WINAPI_MAY_ALIAS __attribute__ ((__may_alias__)) +#else +#define BOOST_DETAIL_WINAPI_MAY_ALIAS +#endif + +// MinGW64 gcc 4.8.2 fails to compile function declarations with boost::detail::winapi::VOID_ arguments even though +// the typedef expands to void. In Windows SDK, VOID is a macro which unfolds to void. We use our own macro in such cases. +#define BOOST_DETAIL_WINAPI_VOID void + +namespace boost { +namespace detail { +namespace winapi { +#if defined( BOOST_USE_WINDOWS_H ) + +typedef ::BOOL BOOL_; +typedef ::PBOOL PBOOL_; +typedef ::LPBOOL LPBOOL_; +typedef ::BOOLEAN BOOLEAN_; +typedef ::PBOOLEAN PBOOLEAN_; +typedef ::BYTE BYTE_; +typedef ::PBYTE PBYTE_; +typedef ::LPBYTE LPBYTE_; +typedef ::WORD WORD_; +typedef ::PWORD PWORD_; +typedef ::LPWORD LPWORD_; +typedef ::DWORD DWORD_; +typedef ::PDWORD PDWORD_; +typedef ::LPDWORD LPDWORD_; +typedef ::HANDLE HANDLE_; +typedef ::PHANDLE PHANDLE_; +typedef ::SHORT SHORT_; +typedef ::PSHORT PSHORT_; +typedef ::USHORT USHORT_; +typedef ::PUSHORT PUSHORT_; +typedef ::INT INT_; +typedef ::PINT PINT_; +typedef ::LPINT LPINT_; +typedef ::UINT UINT_; +typedef ::PUINT PUINT_; +typedef ::LONG LONG_; +typedef ::PLONG PLONG_; +typedef ::LPLONG LPLONG_; +typedef ::ULONG ULONG_; +typedef ::PULONG PULONG_; +typedef ::LONGLONG LONGLONG_; +typedef ::ULONGLONG ULONGLONG_; +typedef ::INT_PTR INT_PTR_; +typedef ::UINT_PTR UINT_PTR_; +typedef ::LONG_PTR LONG_PTR_; +typedef ::ULONG_PTR ULONG_PTR_; +typedef ::DWORD_PTR DWORD_PTR_; +typedef ::PDWORD_PTR PDWORD_PTR_; +typedef ::SIZE_T SIZE_T_; +typedef ::PSIZE_T PSIZE_T_; +typedef ::SSIZE_T SSIZE_T_; +typedef ::PSSIZE_T PSSIZE_T_; +typedef VOID VOID_; // VOID is a macro +typedef ::PVOID PVOID_; +typedef ::LPVOID LPVOID_; +typedef ::LPCVOID LPCVOID_; +typedef ::CHAR CHAR_; +typedef ::LPSTR LPSTR_; +typedef ::LPCSTR LPCSTR_; +typedef ::WCHAR WCHAR_; +typedef ::LPWSTR LPWSTR_; +typedef ::LPCWSTR LPCWSTR_; + +#else // defined( BOOST_USE_WINDOWS_H ) + +typedef int BOOL_; +typedef BOOL_* PBOOL_; +typedef BOOL_* LPBOOL_; +typedef unsigned char BYTE_; +typedef BYTE_* PBYTE_; +typedef BYTE_* LPBYTE_; +typedef BYTE_ BOOLEAN_; +typedef BOOLEAN_* PBOOLEAN_; +typedef unsigned short WORD_; +typedef WORD_* PWORD_; +typedef WORD_* LPWORD_; +typedef unsigned long DWORD_; +typedef DWORD_* PDWORD_; +typedef DWORD_* LPDWORD_; +typedef void* HANDLE_; +typedef void** PHANDLE_; + +typedef short SHORT_; +typedef SHORT_* PSHORT_; +typedef unsigned short USHORT_; +typedef USHORT_* PUSHORT_; +typedef int INT_; +typedef INT_* PINT_; +typedef INT_* LPINT_; +typedef unsigned int UINT_; +typedef UINT_* PUINT_; +typedef long LONG_; +typedef LONG_* PLONG_; +typedef LONG_* LPLONG_; +typedef unsigned long ULONG_; +typedef ULONG_* PULONG_; + +typedef boost::int64_t LONGLONG_; +typedef boost::uint64_t ULONGLONG_; + +# ifdef _WIN64 +# if defined(__CYGWIN__) +typedef long INT_PTR_; +typedef unsigned long UINT_PTR_; +typedef long LONG_PTR_; +typedef unsigned long ULONG_PTR_; +# else +typedef __int64 INT_PTR_; +typedef unsigned __int64 UINT_PTR_; +typedef __int64 LONG_PTR_; +typedef unsigned __int64 ULONG_PTR_; +# endif +# else +typedef int INT_PTR_; +typedef unsigned int UINT_PTR_; +typedef long LONG_PTR_; +typedef unsigned long ULONG_PTR_; +# endif + +typedef ULONG_PTR_ DWORD_PTR_, *PDWORD_PTR_; +typedef ULONG_PTR_ SIZE_T_, *PSIZE_T_; +typedef LONG_PTR_ SSIZE_T_, *PSSIZE_T_; + +typedef void VOID_; +typedef void *PVOID_; +typedef void *LPVOID_; +typedef const void *LPCVOID_; + +typedef char CHAR_; +typedef CHAR_ *LPSTR_; +typedef const CHAR_ *LPCSTR_; + +typedef wchar_t WCHAR_; +typedef WCHAR_ *LPWSTR_; +typedef const WCHAR_ *LPCWSTR_; + +#endif // defined( BOOST_USE_WINDOWS_H ) + +typedef ::HMODULE HMODULE_; + +typedef union BOOST_DETAIL_WINAPI_MAY_ALIAS _LARGE_INTEGER { + struct { + DWORD_ LowPart; + LONG_ HighPart; + } u; + LONGLONG_ QuadPart; +} LARGE_INTEGER_, *PLARGE_INTEGER_; + +typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _SECURITY_ATTRIBUTES { + DWORD_ nLength; + LPVOID_ lpSecurityDescriptor; + BOOL_ bInheritHandle; +} SECURITY_ATTRIBUTES_, *PSECURITY_ATTRIBUTES_, *LPSECURITY_ATTRIBUTES_; + +} +} +} + +#endif // BOOST_DETAIL_WINAPI_BASIC_TYPES_HPP diff --git a/contrib/src/boost/detail/winapi/config.hpp b/contrib/src/boost/detail/winapi/config.hpp index bb36944..1f08c2a 100644 --- a/contrib/src/boost/detail/winapi/config.hpp +++ b/contrib/src/boost/detail/winapi/config.hpp @@ -1,79 +1,73 @@ -// config.hpp --------------------------------------------------------------//
-
-// Copyright 2013 Andrey Semashev
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-
-#ifndef BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
-#define BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
-
-#if defined __MINGW32__
-#include <_mingw.h>
-#endif
-
-// BOOST_WINAPI_IS_MINGW indicates that the target Windows SDK is provided by MinGW (http://mingw.org/).
-// BOOST_WINAPI_IS_MINGW_W64 indicates that the target Windows SDK is provided by MinGW-w64 (http://mingw-w64.org).
-#if defined __MINGW32__
-#if defined __MINGW64_VERSION_MAJOR
-#define BOOST_WINAPI_IS_MINGW_W64
-#else
-#define BOOST_WINAPI_IS_MINGW
-#endif
-#endif
-
-// These constants reflect _WIN32_WINNT_* macros from sdkddkver.h
-// See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx#setting_winver_or__win32_winnt
-#define BOOST_WINAPI_VERSION_NT4 0x0400
-#define BOOST_WINAPI_VERSION_WIN2K 0x0500
-#define BOOST_WINAPI_VERSION_WINXP 0x0501
-#define BOOST_WINAPI_VERSION_WS03 0x0502
-#define BOOST_WINAPI_VERSION_WIN6 0x0600
-#define BOOST_WINAPI_VERSION_VISTA 0x0600
-#define BOOST_WINAPI_VERSION_WS08 0x0600
-#define BOOST_WINAPI_VERSION_LONGHORN 0x0600
-#define BOOST_WINAPI_VERSION_WIN7 0x0601
-#define BOOST_WINAPI_VERSION_WIN8 0x0602
-#define BOOST_WINAPI_VERSION_WINBLUE 0x0603
-#define BOOST_WINAPI_VERSION_WINTHRESHOLD 0x0A00
-#define BOOST_WINAPI_VERSION_WIN10 0x0A00
-
-#if !defined(BOOST_USE_WINAPI_VERSION)
-#if defined(_WIN32_WINNT)
-#define BOOST_USE_WINAPI_VERSION _WIN32_WINNT
-#elif defined(WINVER)
-#define BOOST_USE_WINAPI_VERSION WINVER
-#else
-// By default use Windows Vista API on compilers that support it and XP on the others
-#if (defined(_MSC_VER) && _MSC_VER < 1500) || defined(BOOST_WINAPI_IS_MINGW)
-#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WINXP
-#else
-#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN6
-#endif
-#endif
-#endif
-
-#define BOOST_DETAIL_WINAPI_MAKE_NTDDI_VERSION2(x) x##0000
-#define BOOST_DETAIL_WINAPI_MAKE_NTDDI_VERSION(x) BOOST_DETAIL_WINAPI_MAKE_NTDDI_VERSION2(x)
-
-#if defined(BOOST_USE_WINDOWS_H) || defined(BOOST_WINAPI_DEFINE_VERSION_MACROS)
-// We have to define the version macros so that windows.h provides the necessary symbols
-#if !defined(_WIN32_WINNT)
-#define _WIN32_WINNT BOOST_USE_WINAPI_VERSION
-#endif
-#if !defined(WINVER)
-#define WINVER BOOST_USE_WINAPI_VERSION
-#endif
-#if !defined(NTDDI_VERSION)
-#define NTDDI_VERSION BOOST_DETAIL_WINAPI_MAKE_NTDDI_VERSION(BOOST_USE_WINAPI_VERSION)
-#endif
-#endif
-
-#include <boost/config.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-#endif // BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
+// config.hpp --------------------------------------------------------------// + +// Copyright 2013 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_ +#define BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_ + +#if defined __MINGW32__ +#include <_mingw.h> +#endif + +// BOOST_WINAPI_IS_MINGW indicates that the target Windows SDK is provided by MinGW (http://mingw.org/). +// BOOST_WINAPI_IS_MINGW_W64 indicates that the target Windows SDK is provided by MinGW-w64 (http://mingw-w64.org). +#if defined __MINGW32__ +#if defined __MINGW64_VERSION_MAJOR +#define BOOST_WINAPI_IS_MINGW_W64 +#else +#define BOOST_WINAPI_IS_MINGW +#endif +#endif + +// These constants reflect _WIN32_WINNT_* macros from sdkddkver.h +// See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx#setting_winver_or__win32_winnt +#define BOOST_WINAPI_VERSION_NT4 0x0400 +#define BOOST_WINAPI_VERSION_WIN2K 0x0500 +#define BOOST_WINAPI_VERSION_WINXP 0x0501 +#define BOOST_WINAPI_VERSION_WS03 0x0502 +#define BOOST_WINAPI_VERSION_WIN6 0x0600 +#define BOOST_WINAPI_VERSION_VISTA 0x0600 +#define BOOST_WINAPI_VERSION_WS08 0x0600 +#define BOOST_WINAPI_VERSION_LONGHORN 0x0600 +#define BOOST_WINAPI_VERSION_WIN7 0x0601 +#define BOOST_WINAPI_VERSION_WIN8 0x0602 +#define BOOST_WINAPI_VERSION_WINBLUE 0x0603 +#define BOOST_WINAPI_VERSION_WINTHRESHOLD 0x0A00 +#define BOOST_WINAPI_VERSION_WIN10 0x0A00 + +#if !defined(BOOST_USE_WINAPI_VERSION) +#if defined(_WIN32_WINNT) +#define BOOST_USE_WINAPI_VERSION _WIN32_WINNT +#elif defined(WINVER) +#define BOOST_USE_WINAPI_VERSION WINVER +#else +// By default use Windows Vista API on compilers that support it and XP on the others +#if (defined(_MSC_VER) && _MSC_VER < 1500) || defined(BOOST_WINAPI_IS_MINGW) +#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WINXP +#else +#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN6 +#endif +#endif +#endif + +#if defined(BOOST_USE_WINDOWS_H) +// We have to define the version macros so that windows.h provides the necessary symbols +#if !defined(_WIN32_WINNT) +#define _WIN32_WINNT BOOST_USE_WINAPI_VERSION +#endif +#if !defined(WINVER) +#define WINVER BOOST_USE_WINAPI_VERSION +#endif +#endif + +#include <boost/config.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#endif // BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_ diff --git a/contrib/src/boost/detail/winapi/crypt.hpp b/contrib/src/boost/detail/winapi/crypt.hpp index 4140171..0650845 100644 --- a/contrib/src/boost/detail/winapi/crypt.hpp +++ b/contrib/src/boost/detail/winapi/crypt.hpp @@ -1,230 +1,193 @@ -// crypt.hpp --------------------------------------------------------------//
-
-// Copyright 2014 Antony Polukhin
-// Copyright 2015 Andrey Semashev
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-
-#ifndef BOOST_DETAIL_WINAPI_CRYPT_HPP
-#define BOOST_DETAIL_WINAPI_CRYPT_HPP
-
-#include <boost/detail/winapi/basic_types.hpp>
-#include <boost/detail/winapi/detail/cast_ptr.hpp>
-#if defined( BOOST_USE_WINDOWS_H )
-// This header is not always included as part of windows.h
-#include <wincrypt.h>
-#endif
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-#if !defined( BOOST_USE_WINDOWS_H )
-namespace boost { namespace detail { namespace winapi {
-typedef ULONG_PTR_ HCRYPTPROV_;
-}}}
-
-// Some versions of MinGW (including the latest ones) contain buggy declarations of CryptEnumProvidersA and CryptEnumProvidersW.
-// We cannot detect those broken versions, and we can't include the system header because it's incomplete.
-// So below we duplicate the broken declarations here and work around the problem with cast_ptr. These declarations
-// will have to be removed when MinGW is fixed.
-
-extern "C" {
-#if !defined( BOOST_NO_ANSI_APIS )
-#if !defined( BOOST_WINAPI_IS_MINGW ) || !defined( UNICODE )
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptEnumProvidersA(
- boost::detail::winapi::DWORD_ dwIndex,
- boost::detail::winapi::DWORD_ *pdwReserved,
- boost::detail::winapi::DWORD_ dwFlags,
- boost::detail::winapi::DWORD_ *pdwProvType,
- boost::detail::winapi::LPSTR_ szProvName,
- boost::detail::winapi::DWORD_ *pcbProvName);
-#else
-// Broken declaration in MinGW
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptEnumProvidersA(
- boost::detail::winapi::DWORD_ dwIndex,
- boost::detail::winapi::DWORD_ *pdwReserved,
- boost::detail::winapi::DWORD_ dwFlags,
- boost::detail::winapi::DWORD_ *pdwProvType,
- boost::detail::winapi::LPWSTR_ szProvName,
- boost::detail::winapi::DWORD_ *pcbProvName);
-#endif
-
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptAcquireContextA(
- boost::detail::winapi::HCRYPTPROV_ *phProv,
- boost::detail::winapi::LPCSTR_ pszContainer,
- boost::detail::winapi::LPCSTR_ pszProvider,
- boost::detail::winapi::DWORD_ dwProvType,
- boost::detail::winapi::DWORD_ dwFlags);
-#endif // !defined( BOOST_NO_ANSI_APIS )
-
-#if !defined( BOOST_WINAPI_IS_MINGW ) || defined( UNICODE )
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptEnumProvidersW(
- boost::detail::winapi::DWORD_ dwIndex,
- boost::detail::winapi::DWORD_ *pdwReserved,
- boost::detail::winapi::DWORD_ dwFlags,
- boost::detail::winapi::DWORD_ *pdwProvType,
- boost::detail::winapi::LPWSTR_ szProvName,
- boost::detail::winapi::DWORD_ *pcbProvName);
-#else
-// Broken declaration in MinGW
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptEnumProvidersW(
- boost::detail::winapi::DWORD_ dwIndex,
- boost::detail::winapi::DWORD_ *pdwReserved,
- boost::detail::winapi::DWORD_ dwFlags,
- boost::detail::winapi::DWORD_ *pdwProvType,
- boost::detail::winapi::LPSTR_ szProvName,
- boost::detail::winapi::DWORD_ *pcbProvName);
-#endif
-
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptAcquireContextW(
- boost::detail::winapi::HCRYPTPROV_ *phProv,
- boost::detail::winapi::LPCWSTR_ szContainer,
- boost::detail::winapi::LPCWSTR_ szProvider,
- boost::detail::winapi::DWORD_ dwProvType,
- boost::detail::winapi::DWORD_ dwFlags);
-
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptGenRandom(
- boost::detail::winapi::HCRYPTPROV_ hProv,
- boost::detail::winapi::DWORD_ dwLen,
- boost::detail::winapi::BYTE_ *pbBuffer);
-
-#if defined(_MSC_VER) && (_MSC_VER+0) >= 1500 &&\
- (\
- (defined(NTDDI_VERSION) && (NTDDI_VERSION+0) < BOOST_DETAIL_WINAPI_MAKE_NTDDI_VERSION(BOOST_WINAPI_VERSION_WINXP)) ||\
- (!defined(NTDDI_VERSION) && BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_WINXP)\
- )
-// Standalone MS Windows SDK 6.0A and later provide a different declaration of CryptReleaseContext for Windows 2000 and older.
-// This is not the case for (a) MinGW and MinGW-w64 and (b) MSVC 7.1 and 8, which are shipped with their own Windows SDK.
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptReleaseContext(
- boost::detail::winapi::HCRYPTPROV_ hProv,
- boost::detail::winapi::ULONG_PTR_ dwFlags);
-#else
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-CryptReleaseContext(
- boost::detail::winapi::HCRYPTPROV_ hProv,
- boost::detail::winapi::DWORD_ dwFlags);
-#endif
-}
-#endif // !defined( BOOST_USE_WINDOWS_H )
-
-namespace boost {
-namespace detail {
-namespace winapi {
-
-#if defined( BOOST_USE_WINDOWS_H )
-
-typedef ::HCRYPTPROV HCRYPTPROV_;
-
-const DWORD_ PROV_RSA_FULL_ = PROV_RSA_FULL;
-
-const DWORD_ CRYPT_VERIFYCONTEXT_ = CRYPT_VERIFYCONTEXT;
-const DWORD_ CRYPT_NEWKEYSET_ = CRYPT_NEWKEYSET;
-const DWORD_ CRYPT_DELETEKEYSET_ = CRYPT_DELETEKEYSET;
-const DWORD_ CRYPT_MACHINE_KEYSET_ = CRYPT_MACHINE_KEYSET;
-const DWORD_ CRYPT_SILENT_ = CRYPT_SILENT;
-
-#else
-
-const DWORD_ PROV_RSA_FULL_ = 1;
-
-const DWORD_ CRYPT_VERIFYCONTEXT_ = 0xF0000000;
-const DWORD_ CRYPT_NEWKEYSET_ = 8;
-const DWORD_ CRYPT_DELETEKEYSET_ = 16;
-const DWORD_ CRYPT_MACHINE_KEYSET_ = 32;
-const DWORD_ CRYPT_SILENT_ = 64;
-
-#endif
-
-#if !defined( BOOST_NO_ANSI_APIS )
-using ::CryptAcquireContextA;
-#endif
-using ::CryptAcquireContextW;
-using ::CryptGenRandom;
-
-#if !defined( BOOST_NO_ANSI_APIS )
-BOOST_FORCEINLINE BOOL_ CryptEnumProvidersA(
- DWORD_ dwIndex,
- DWORD_ *pdwReserved,
- DWORD_ dwFlags,
- DWORD_ *pdwProvType,
- LPSTR_ szProvName,
- DWORD_ *pcbProvName)
-{
- return ::CryptEnumProvidersA(dwIndex, pdwReserved, dwFlags, pdwProvType, winapi::detail::cast_ptr(szProvName), pcbProvName);
-}
-
-BOOST_FORCEINLINE BOOL_ crypt_enum_providers(
- DWORD_ dwIndex,
- DWORD_ *pdwReserved,
- DWORD_ dwFlags,
- DWORD_ *pdwProvType,
- LPSTR_ szProvName,
- DWORD_ *pcbProvName)
-{
- return ::CryptEnumProvidersA(dwIndex, pdwReserved, dwFlags, pdwProvType, winapi::detail::cast_ptr(szProvName), pcbProvName);
-}
-
-BOOST_FORCEINLINE BOOL_ crypt_acquire_context(
- HCRYPTPROV_ *phProv,
- LPCSTR_ pszContainer,
- LPCSTR_ pszProvider,
- DWORD_ dwProvType,
- DWORD_ dwFlags)
-{
- return ::CryptAcquireContextA(phProv, pszContainer, pszProvider, dwProvType, dwFlags);
-}
-#endif
-
-BOOST_FORCEINLINE BOOL_ CryptEnumProvidersW(
- DWORD_ dwIndex,
- DWORD_ *pdwReserved,
- DWORD_ dwFlags,
- DWORD_ *pdwProvType,
- LPWSTR_ szProvName,
- DWORD_ *pcbProvName)
-{
- return ::CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, winapi::detail::cast_ptr(szProvName), pcbProvName);
-}
-
-BOOST_FORCEINLINE BOOL_ crypt_enum_providers(
- DWORD_ dwIndex,
- DWORD_ *pdwReserved,
- DWORD_ dwFlags,
- DWORD_ *pdwProvType,
- LPWSTR_ szProvName,
- DWORD_ *pcbProvName)
-{
- return ::CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, winapi::detail::cast_ptr(szProvName), pcbProvName);
-}
-
-BOOST_FORCEINLINE BOOL_ crypt_acquire_context(
- HCRYPTPROV_ *phProv,
- LPCWSTR_ szContainer,
- LPCWSTR_ szProvider,
- DWORD_ dwProvType,
- DWORD_ dwFlags)
-{
- return ::CryptAcquireContextW(phProv, szContainer, szProvider, dwProvType, dwFlags);
-}
-
-BOOST_FORCEINLINE BOOL_ CryptReleaseContext(HCRYPTPROV_ hProv, DWORD_ dwFlags)
-{
- return ::CryptReleaseContext(hProv, dwFlags);
-}
-
-}
-}
-}
-
-#endif // BOOST_DETAIL_WINAPI_CRYPT_HPP
+// crypt.hpp --------------------------------------------------------------// + +// Copyright 2014 Antony Polukhin +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_CRYPT_HPP +#define BOOST_DETAIL_WINAPI_CRYPT_HPP + +#include <boost/detail/winapi/basic_types.hpp> +#include <boost/detail/winapi/detail/cast_ptr.hpp> +#if defined( BOOST_USE_WINDOWS_H ) +// This header is not always included as part of windows.h +#include <wincrypt.h> +#endif + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if !defined( BOOST_USE_WINDOWS_H ) +namespace boost { namespace detail { namespace winapi { +typedef ULONG_PTR_ HCRYPTPROV_; +}}} + +// Some versions of MinGW (including the latest ones) contain buggy declarations of CryptEnumProvidersA and CryptEnumProvidersW. +// We cannot detect those broken versions, and we can't include the system header because it's incomplete. +// So below we duplicate the broken declarations here and work around the problem with cast_ptr. These declarations +// will have to be removed when MinGW is fixed. + +extern "C" { +#if !defined( BOOST_NO_ANSI_APIS ) +#if !defined( BOOST_WINAPI_IS_MINGW ) || !defined( UNICODE ) +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptEnumProvidersA( + boost::detail::winapi::DWORD_ dwIndex, + boost::detail::winapi::DWORD_ *pdwReserved, + boost::detail::winapi::DWORD_ dwFlags, + boost::detail::winapi::DWORD_ *pdwProvType, + boost::detail::winapi::LPSTR_ szProvName, + boost::detail::winapi::DWORD_ *pcbProvName); +#else +// Broken declaration in MinGW +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptEnumProvidersA( + boost::detail::winapi::DWORD_ dwIndex, + boost::detail::winapi::DWORD_ *pdwReserved, + boost::detail::winapi::DWORD_ dwFlags, + boost::detail::winapi::DWORD_ *pdwProvType, + boost::detail::winapi::LPWSTR_ szProvName, + boost::detail::winapi::DWORD_ *pcbProvName); +#endif + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptAcquireContextA( + boost::detail::winapi::HCRYPTPROV_ *phProv, + boost::detail::winapi::LPCSTR_ pszContainer, + boost::detail::winapi::LPCSTR_ pszProvider, + boost::detail::winapi::DWORD_ dwProvType, + boost::detail::winapi::DWORD_ dwFlags); +#endif // !defined( BOOST_NO_ANSI_APIS ) + +#if !defined( BOOST_WINAPI_IS_MINGW ) || defined( UNICODE ) +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptEnumProvidersW( + boost::detail::winapi::DWORD_ dwIndex, + boost::detail::winapi::DWORD_ *pdwReserved, + boost::detail::winapi::DWORD_ dwFlags, + boost::detail::winapi::DWORD_ *pdwProvType, + boost::detail::winapi::LPWSTR_ szProvName, + boost::detail::winapi::DWORD_ *pcbProvName); +#else +// Broken declaration in MinGW +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptEnumProvidersW( + boost::detail::winapi::DWORD_ dwIndex, + boost::detail::winapi::DWORD_ *pdwReserved, + boost::detail::winapi::DWORD_ dwFlags, + boost::detail::winapi::DWORD_ *pdwProvType, + boost::detail::winapi::LPSTR_ szProvName, + boost::detail::winapi::DWORD_ *pcbProvName); +#endif + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptAcquireContextW( + boost::detail::winapi::HCRYPTPROV_ *phProv, + boost::detail::winapi::LPCWSTR_ szContainer, + boost::detail::winapi::LPCWSTR_ szProvider, + boost::detail::winapi::DWORD_ dwProvType, + boost::detail::winapi::DWORD_ dwFlags); + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptGenRandom( + boost::detail::winapi::HCRYPTPROV_ hProv, + boost::detail::winapi::DWORD_ dwLen, + boost::detail::winapi::BYTE_ *pbBuffer); + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +CryptReleaseContext( + boost::detail::winapi::HCRYPTPROV_ hProv, + boost::detail::winapi::DWORD_ dwFlags); +} +#endif // !defined( BOOST_USE_WINDOWS_H ) + +namespace boost { +namespace detail { +namespace winapi { + +#if defined( BOOST_USE_WINDOWS_H ) + +typedef ::HCRYPTPROV HCRYPTPROV_; + +const DWORD_ PROV_RSA_FULL_ = PROV_RSA_FULL; + +const DWORD_ CRYPT_VERIFYCONTEXT_ = CRYPT_VERIFYCONTEXT; +const DWORD_ CRYPT_NEWKEYSET_ = CRYPT_NEWKEYSET; +const DWORD_ CRYPT_DELETEKEYSET_ = CRYPT_DELETEKEYSET; +const DWORD_ CRYPT_MACHINE_KEYSET_ = CRYPT_MACHINE_KEYSET; +const DWORD_ CRYPT_SILENT_ = CRYPT_SILENT; + +#else + +const DWORD_ PROV_RSA_FULL_ = 1; + +const DWORD_ CRYPT_VERIFYCONTEXT_ = 0xF0000000; +const DWORD_ CRYPT_NEWKEYSET_ = 8; +const DWORD_ CRYPT_DELETEKEYSET_ = 16; +const DWORD_ CRYPT_MACHINE_KEYSET_ = 32; +const DWORD_ CRYPT_SILENT_ = 64; + +#endif + +#if !defined( BOOST_NO_ANSI_APIS ) +using ::CryptEnumProvidersA; +using ::CryptAcquireContextA; +#endif +using ::CryptEnumProvidersW; +using ::CryptAcquireContextW; +using ::CryptGenRandom; +using ::CryptReleaseContext; + +#if !defined( BOOST_NO_ANSI_APIS ) +BOOST_FORCEINLINE BOOL_ crypt_enum_providers( + DWORD_ dwIndex, + DWORD_ *pdwReserved, + DWORD_ dwFlags, + DWORD_ *pdwProvType, + LPSTR_ szProvName, + DWORD_ *pcbProvName) +{ + return ::CryptEnumProvidersA(dwIndex, pdwReserved, dwFlags, pdwProvType, winapi::detail::cast_ptr(szProvName), pcbProvName); +} + +BOOST_FORCEINLINE BOOL_ crypt_acquire_context( + HCRYPTPROV_ *phProv, + LPCSTR_ pszContainer, + LPCSTR_ pszProvider, + DWORD_ dwProvType, + DWORD_ dwFlags) +{ + return ::CryptAcquireContextA(phProv, pszContainer, pszProvider, dwProvType, dwFlags); +} +#endif + +BOOST_FORCEINLINE BOOL_ crypt_enum_providers( + DWORD_ dwIndex, + DWORD_ *pdwReserved, + DWORD_ dwFlags, + DWORD_ *pdwProvType, + LPWSTR_ szProvName, + DWORD_ *pcbProvName) +{ + return ::CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, winapi::detail::cast_ptr(szProvName), pcbProvName); +} + +BOOST_FORCEINLINE BOOL_ crypt_acquire_context( + HCRYPTPROV_ *phProv, + LPCWSTR_ szContainer, + LPCWSTR_ szProvider, + DWORD_ dwProvType, + DWORD_ dwFlags) +{ + return ::CryptAcquireContextW(phProv, szContainer, szProvider, dwProvType, dwFlags); +} + +} +} +} + +#endif // BOOST_DETAIL_WINAPI_CRYPT_HPP diff --git a/contrib/src/boost/detail/winapi/detail/cast_ptr.hpp b/contrib/src/boost/detail/winapi/detail/cast_ptr.hpp index 51d00ad..261007e 100644 --- a/contrib/src/boost/detail/winapi/detail/cast_ptr.hpp +++ b/contrib/src/boost/detail/winapi/detail/cast_ptr.hpp @@ -1,40 +1,40 @@ -// cast_ptr.hpp --------------------------------------------------------------//
-
-// Copyright 2015 Andrey Semashev
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-
-#ifndef BOOST_DETAIL_WINAPI_DETAIL_CAST_PTR_HPP
-#define BOOST_DETAIL_WINAPI_DETAIL_CAST_PTR_HPP
-
-#include <boost/detail/winapi/config.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-namespace boost {
-namespace detail {
-namespace winapi {
-namespace detail {
-
-//! This class is used to automatically cast pointers to the type used in the current Windows SDK function declarations
-class cast_ptr
-{
-private:
- const void* m_p;
-
-public:
- explicit BOOST_FORCEINLINE cast_ptr(const void* p) BOOST_NOEXCEPT : m_p(p) {}
- template< typename T >
- BOOST_FORCEINLINE operator T* () const BOOST_NOEXCEPT { return (T*)m_p; }
-};
-
-}
-}
-}
-}
-
-#endif // BOOST_DETAIL_WINAPI_DETAIL_CAST_PTR_HPP
+// cast_ptr.hpp --------------------------------------------------------------// + +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_DETAIL_CAST_PTR_HPP +#define BOOST_DETAIL_WINAPI_DETAIL_CAST_PTR_HPP + +#include <boost/detail/winapi/config.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +namespace boost { +namespace detail { +namespace winapi { +namespace detail { + +//! This class is used to automatically cast pointers to the type used in the current Windows SDK function declarations +class cast_ptr +{ +private: + const void* m_p; + +public: + explicit BOOST_FORCEINLINE cast_ptr(const void* p) BOOST_NOEXCEPT : m_p(p) {} + template< typename T > + BOOST_FORCEINLINE operator T* () const BOOST_NOEXCEPT { return (T*)m_p; } +}; + +} +} +} +} + +#endif // BOOST_DETAIL_WINAPI_DETAIL_CAST_PTR_HPP diff --git a/contrib/src/boost/detail/winapi/get_current_process.hpp b/contrib/src/boost/detail/winapi/get_current_process.hpp new file mode 100644 index 0000000..e5f4f2a --- /dev/null +++ b/contrib/src/boost/detail/winapi/get_current_process.hpp @@ -0,0 +1,34 @@ +// get_current_process.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_HPP +#define BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_HPP + +#include <boost/detail/winapi/basic_types.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +// Windows CE define GetCurrentProcess as an inline function in kfuncs.h +#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE ) +extern "C" { +BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI GetCurrentProcess(BOOST_DETAIL_WINAPI_VOID); +} +#endif + +namespace boost { +namespace detail { +namespace winapi { +using ::GetCurrentProcess; +} +} +} + +#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_HPP diff --git a/contrib/src/boost/detail/winapi/get_current_process_id.hpp b/contrib/src/boost/detail/winapi/get_current_process_id.hpp index 8a9f1fc..aa21e6c 100644 --- a/contrib/src/boost/detail/winapi/get_current_process_id.hpp +++ b/contrib/src/boost/detail/winapi/get_current_process_id.hpp @@ -1,33 +1,33 @@ -// get_current_process_id.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_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP
-#define BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP
-
-#include <boost/detail/winapi/basic_types.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-// Windows CE define GetCurrentProcessId as an inline function in kfuncs.h
-#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE )
-extern "C" {
-BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI GetCurrentProcessId(BOOST_DETAIL_WINAPI_VOID);
-}
-#endif
-
-namespace boost {
-namespace detail {
-namespace winapi {
-using ::GetCurrentProcessId;
-}
-}
-}
-
-#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP
+// get_current_process_id.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_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP +#define BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP + +#include <boost/detail/winapi/basic_types.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +// Windows CE define GetCurrentProcessId as an inline function in kfuncs.h +#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE ) +extern "C" { +BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI GetCurrentProcessId(BOOST_DETAIL_WINAPI_VOID); +} +#endif + +namespace boost { +namespace detail { +namespace winapi { +using ::GetCurrentProcessId; +} +} +} + +#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_ID_HPP diff --git a/contrib/src/boost/detail/winapi/get_current_thread.hpp b/contrib/src/boost/detail/winapi/get_current_thread.hpp new file mode 100644 index 0000000..b52c3a8 --- /dev/null +++ b/contrib/src/boost/detail/winapi/get_current_thread.hpp @@ -0,0 +1,34 @@ +// get_current_thread.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_HPP +#define BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_HPP + +#include <boost/detail/winapi/basic_types.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +// Windows CE define GetCurrentThread as an inline function in kfuncs.h +#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE ) +extern "C" { +BOOST_SYMBOL_IMPORT boost::detail::winapi::HANDLE_ WINAPI GetCurrentThread(BOOST_DETAIL_WINAPI_VOID); +} +#endif + +namespace boost { +namespace detail { +namespace winapi { +using ::GetCurrentThread; +} +} +} + +#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_HPP diff --git a/contrib/src/boost/detail/winapi/get_current_thread_id.hpp b/contrib/src/boost/detail/winapi/get_current_thread_id.hpp index 504b0ff..198af3b 100644 --- a/contrib/src/boost/detail/winapi/get_current_thread_id.hpp +++ b/contrib/src/boost/detail/winapi/get_current_thread_id.hpp @@ -1,34 +1,34 @@ -// get_current_thread_id.hpp --------------------------------------------------------------//
-
-// Copyright 2010 Vicente J. Botet Escriba
-// Copyright 2015 Andrey Semashev
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-
-#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP
-#define BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP
-
-#include <boost/detail/winapi/basic_types.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-// Windows CE define GetCurrentThreadId as an inline function in kfuncs.h
-#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE )
-extern "C" {
-BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI GetCurrentThreadId(BOOST_DETAIL_WINAPI_VOID);
-}
-#endif
-
-namespace boost {
-namespace detail {
-namespace winapi {
-using ::GetCurrentThreadId;
-}
-}
-}
-
-#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP
+// get_current_thread_id.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP +#define BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP + +#include <boost/detail/winapi/basic_types.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +// Windows CE define GetCurrentThreadId as an inline function in kfuncs.h +#if !defined( BOOST_USE_WINDOWS_H ) && !defined( UNDER_CE ) +extern "C" { +BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI GetCurrentThreadId(BOOST_DETAIL_WINAPI_VOID); +} +#endif + +namespace boost { +namespace detail { +namespace winapi { +using ::GetCurrentThreadId; +} +} +} + +#endif // BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_ID_HPP diff --git a/contrib/src/boost/detail/winapi/process.hpp b/contrib/src/boost/detail/winapi/process.hpp new file mode 100644 index 0000000..d980aa6 --- /dev/null +++ b/contrib/src/boost/detail/winapi/process.hpp @@ -0,0 +1,386 @@ +// process.hpp --------------------------------------------------------------// + +// Copyright 2016 Klemens D. Morgenstern +// Copyright 2016 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_DETAIL_WINAPI_PROCESS_HPP_ +#define BOOST_DETAIL_WINAPI_PROCESS_HPP_ + +#include <boost/detail/winapi/config.hpp> +#include <boost/detail/winapi/basic_types.hpp> +#include <boost/detail/winapi/get_current_process.hpp> +#include <boost/detail/winapi/get_current_process_id.hpp> +#include <boost/predef/platform.h> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if BOOST_PLAT_WINDOWS_DESKTOP + +#if !defined( BOOST_USE_WINDOWS_H ) +extern "C" { + +struct _PROCESS_INFORMATION; +#if !defined( BOOST_NO_ANSI_APIS ) +struct _STARTUPINFOA; +#endif +struct _STARTUPINFOW; + +#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 +struct _PROC_THREAD_ATTRIBUTE_LIST; +#if !defined( BOOST_NO_ANSI_APIS ) +struct _STARTUPINFOEXA; +#endif +struct _STARTUPINFOEXW; +#endif + +BOOST_SYMBOL_IMPORT BOOST_NORETURN boost::detail::winapi::VOID_ WINAPI +ExitProcess(boost::detail::winapi::UINT_ uExitCode); + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI TerminateProcess( + boost::detail::winapi::HANDLE_ hProcess, + boost::detail::winapi::UINT_ uExitCode); + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI GetExitCodeProcess( + boost::detail::winapi::HANDLE_ hProcess, + boost::detail::winapi::LPDWORD_ lpExitCode); + +#if !defined( BOOST_NO_ANSI_APIS ) +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI CreateProcessA( + boost::detail::winapi::LPCSTR_ lpApplicationName, + boost::detail::winapi::LPSTR_ lpCommandLine, + ::_SECURITY_ATTRIBUTES* lpProcessAttributes, + ::_SECURITY_ATTRIBUTES* lpThreadAttributes, + boost::detail::winapi::INT_ bInheritHandles, + boost::detail::winapi::DWORD_ dwCreationFlags, + boost::detail::winapi::LPVOID_ lpEnvironment, + boost::detail::winapi::LPCSTR_ lpCurrentDirectory, + ::_STARTUPINFOA* lpStartupInfo, + ::_PROCESS_INFORMATION* lpProcessInformation); +#endif + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI CreateProcessW( + boost::detail::winapi::LPCWSTR_ lpApplicationName, + boost::detail::winapi::LPWSTR_ lpCommandLine, + ::_SECURITY_ATTRIBUTES* lpProcessAttributes, + ::_SECURITY_ATTRIBUTES* lpThreadAttributes, + boost::detail::winapi::INT_ bInheritHandles, + boost::detail::winapi::DWORD_ dwCreationFlags, + boost::detail::winapi::LPVOID_ lpEnvironment, + boost::detail::winapi::LPCWSTR_ lpCurrentDirectory, + ::_STARTUPINFOW* lpStartupInfo, + ::_PROCESS_INFORMATION* lpProcessInformation); + +} // extern "C" +#endif //defined BOOST_WINDOWS_H + +namespace boost { +namespace detail { +namespace winapi { + +#if defined( BOOST_USE_WINDOWS_H ) + +const DWORD_ DEBUG_PROCESS_ = DEBUG_PROCESS; +const DWORD_ DEBUG_ONLY_THIS_PROCESS_ = DEBUG_ONLY_THIS_PROCESS; +const DWORD_ CREATE_SUSPENDED_ = CREATE_SUSPENDED; +const DWORD_ DETACHED_PROCESS_ = DETACHED_PROCESS; +const DWORD_ CREATE_NEW_CONSOLE_ = CREATE_NEW_CONSOLE; +const DWORD_ CREATE_NEW_PROCESS_GROUP_ = CREATE_NEW_PROCESS_GROUP; +const DWORD_ CREATE_UNICODE_ENVIRONMENT_ = CREATE_UNICODE_ENVIRONMENT; +const DWORD_ CREATE_SEPARATE_WOW_VDM_ = CREATE_SEPARATE_WOW_VDM; +const DWORD_ CREATE_SHARED_WOW_VDM_ = CREATE_SHARED_WOW_VDM; +const DWORD_ CREATE_FORCEDOS_ = CREATE_FORCEDOS; +const DWORD_ CREATE_BREAKAWAY_FROM_JOB_ = CREATE_BREAKAWAY_FROM_JOB; +const DWORD_ CREATE_DEFAULT_ERROR_MODE_ = CREATE_DEFAULT_ERROR_MODE; +const DWORD_ CREATE_NO_WINDOW_ = CREATE_NO_WINDOW; + +// Undocumented +const DWORD_ PROFILE_USER_ = PROFILE_USER; +const DWORD_ PROFILE_KERNEL_ = PROFILE_KERNEL; +const DWORD_ PROFILE_SERVER_ = PROFILE_SERVER; + +#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 +const DWORD_ CREATE_PROTECTED_PROCESS_ = CREATE_PROTECTED_PROCESS; +const DWORD_ EXTENDED_STARTUPINFO_PRESENT_ = EXTENDED_STARTUPINFO_PRESENT; +#endif + +#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN7 +const DWORD_ INHERIT_PARENT_AFFINITY_ = INHERIT_PARENT_AFFINITY; +#endif + +// Only documented for Windows CE +#if defined(UNDER_CE) +const DWORD_ INHERIT_CALLER_PRIORITY_ = INHERIT_CALLER_PRIORITY; +#endif + +const DWORD_ STARTF_USESHOWWINDOW_ = STARTF_USESHOWWINDOW; +const DWORD_ STARTF_USESIZE_ = STARTF_USESIZE; +const DWORD_ STARTF_USEPOSITION_ = STARTF_USEPOSITION; +const DWORD_ STARTF_USECOUNTCHARS_ = STARTF_USECOUNTCHARS; +const DWORD_ STARTF_USEFILLATTRIBUTE_ = STARTF_USEFILLATTRIBUTE; +const DWORD_ STARTF_RUNFULLSCREEN_ = STARTF_RUNFULLSCREEN; +const DWORD_ STARTF_FORCEONFEEDBACK_ = STARTF_FORCEONFEEDBACK; +const DWORD_ STARTF_FORCEOFFFEEDBACK_ = STARTF_FORCEOFFFEEDBACK; +const DWORD_ STARTF_USESTDHANDLES_ = STARTF_USESTDHANDLES; +const DWORD_ STARTF_USEHOTKEY_ = STARTF_USEHOTKEY; + +#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN7 +const DWORD_ STARTF_TITLEISLINKNAME_ = STARTF_TITLEISLINKNAME; +const DWORD_ STARTF_TITLEISAPPID_ = STARTF_TITLEISAPPID; +const DWORD_ STARTF_PREVENTPINNING_ = STARTF_PREVENTPINNING; +#endif + +#else // defined( BOOST_USE_WINDOWS_H ) + +const DWORD_ DEBUG_PROCESS_ = 0x1; +const DWORD_ DEBUG_ONLY_THIS_PROCESS_ = 0x2; +const DWORD_ CREATE_SUSPENDED_ = 0x4; +const DWORD_ DETACHED_PROCESS_ = 0x8; +const DWORD_ CREATE_NEW_CONSOLE_ = 0x10; +const DWORD_ CREATE_NEW_PROCESS_GROUP_ = 0x200; +const DWORD_ CREATE_UNICODE_ENVIRONMENT_ = 0x400; +const DWORD_ CREATE_SEPARATE_WOW_VDM_ = 0x800; +const DWORD_ CREATE_SHARED_WOW_VDM_ = 0x1000; +const DWORD_ CREATE_FORCEDOS_ = 0x2000; +const DWORD_ CREATE_BREAKAWAY_FROM_JOB_ = 0x1000000; +const DWORD_ CREATE_DEFAULT_ERROR_MODE_ = 0x4000000; +const DWORD_ CREATE_NO_WINDOW_ = 0x8000000; + +// Undocumented +const DWORD_ PROFILE_USER_ = 0x10000000; +const DWORD_ PROFILE_KERNEL_ = 0x20000000; +const DWORD_ PROFILE_SERVER_ = 0x40000000; + +#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 +const DWORD_ CREATE_PROTECTED_PROCESS_ = 0x40000; +const DWORD_ EXTENDED_STARTUPINFO_PRESENT_ = 0x80000; +#endif + +#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN7 +const DWORD_ INHERIT_PARENT_AFFINITY_ = 0x10000; +#endif + +// Only documented for Windows CE +#if defined(UNDER_CE) +const DWORD_ INHERIT_CALLER_PRIORITY_ = 0x20000; +#endif + +const DWORD_ STARTF_USESHOWWINDOW_ = 0x00000001; +const DWORD_ STARTF_USESIZE_ = 0x00000002; +const DWORD_ STARTF_USEPOSITION_ = 0x00000004; +const DWORD_ STARTF_USECOUNTCHARS_ = 0x00000008; +const DWORD_ STARTF_USEFILLATTRIBUTE_ = 0x00000010; +const DWORD_ STARTF_RUNFULLSCREEN_ = 0x00000020; +const DWORD_ STARTF_FORCEONFEEDBACK_ = 0x00000040; +const DWORD_ STARTF_FORCEOFFFEEDBACK_ = 0x00000080; +const DWORD_ STARTF_USESTDHANDLES_ = 0x00000100; +const DWORD_ STARTF_USEHOTKEY_ = 0x00000200; + +#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN7 +const DWORD_ STARTF_TITLEISLINKNAME_ = 0x00000800; +const DWORD_ STARTF_TITLEISAPPID_ = 0x00001000; +const DWORD_ STARTF_PREVENTPINNING_ = 0x00002000; +#endif + +#endif // defined( BOOST_USE_WINDOWS_H ) + +#if defined( BOOST_USE_WINDOWS_H ) && !defined( BOOST_WINAPI_IS_MINGW ) + +const DWORD_ CREATE_PRESERVE_CODE_AUTHZ_LEVEL_ = CREATE_PRESERVE_CODE_AUTHZ_LEVEL; + +// Undocumented +const DWORD_ CREATE_IGNORE_SYSTEM_DEFAULT_ = CREATE_IGNORE_SYSTEM_DEFAULT; + +#else // defined( BOOST_USE_WINDOWS_H ) && !defined( BOOST_WINAPI_IS_MINGW ) + +const DWORD_ CREATE_PRESERVE_CODE_AUTHZ_LEVEL_ = 0x2000000; + +// Undocumented +const DWORD_ CREATE_IGNORE_SYSTEM_DEFAULT_ = 0x80000000; + +#endif // defined( BOOST_USE_WINDOWS_H ) && !defined( BOOST_WINAPI_IS_MINGW ) + +typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _PROCESS_INFORMATION { + HANDLE_ hProcess; + HANDLE_ hThread; + DWORD_ dwProcessId; + DWORD_ dwThreadId; +} PROCESS_INFORMATION_, *PPROCESS_INFORMATION_, *LPPROCESS_INFORMATION_; + +typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _STARTUPINFOA { + DWORD_ cb; + LPSTR_ lpReserved; + LPSTR_ lpDesktop; + LPSTR_ lpTitle; + DWORD_ dwX; + DWORD_ dwY; + DWORD_ dwXSize; + DWORD_ dwYSize; + DWORD_ dwXCountChars; + DWORD_ dwYCountChars; + DWORD_ dwFillAttribute; + DWORD_ dwFlags; + WORD_ wShowWindow; + WORD_ cbReserved2; + LPBYTE_ lpReserved2; + HANDLE_ hStdInput; + HANDLE_ hStdOutput; + HANDLE_ hStdError; +} STARTUPINFOA_, *LPSTARTUPINFOA_; + +typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _STARTUPINFOW { + DWORD_ cb; + LPWSTR_ lpReserved; + LPWSTR_ lpDesktop; + LPWSTR_ lpTitle; + DWORD_ dwX; + DWORD_ dwY; + DWORD_ dwXSize; + DWORD_ dwYSize; + DWORD_ dwXCountChars; + DWORD_ dwYCountChars; + DWORD_ dwFillAttribute; + DWORD_ dwFlags; + WORD_ wShowWindow; + WORD_ cbReserved2; + LPBYTE_ lpReserved2; + HANDLE_ hStdInput; + HANDLE_ hStdOutput; + HANDLE_ hStdError; +} STARTUPINFOW_, *LPSTARTUPINFOW_; + +#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 + +typedef struct _PROC_THREAD_ATTRIBUTE_LIST PROC_THREAD_ATTRIBUTE_LIST_, *PPROC_THREAD_ATTRIBUTE_LIST_; + +#if !defined(BOOST_NO_ANSI_APIS) +typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _STARTUPINFOEXA { + STARTUPINFOA_ StartupInfo; + PPROC_THREAD_ATTRIBUTE_LIST_ lpAttributeList; +} STARTUPINFOEXA_, *LPSTARTUPINFOEXA_; +#endif //BOOST_NO_ANSI_APIS + +typedef struct BOOST_DETAIL_WINAPI_MAY_ALIAS _STARTUPINFOEXW { + STARTUPINFOW_ StartupInfo; + PPROC_THREAD_ATTRIBUTE_LIST_ lpAttributeList; +} STARTUPINFOEXW_, *LPSTARTUPINFOEXW_; + +#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 + +using ::GetExitCodeProcess; +using ::ExitProcess; +using ::TerminateProcess; + +#if !defined( BOOST_NO_ANSI_APIS ) +BOOST_FORCEINLINE BOOL_ CreateProcessA( + LPCSTR_ lpApplicationName, + LPSTR_ lpCommandLine, + LPSECURITY_ATTRIBUTES_ lpProcessAttributes, + LPSECURITY_ATTRIBUTES_ lpThreadAttributes, + INT_ bInheritHandles, + DWORD_ dwCreationFlags, + LPVOID_ lpEnvironment, + LPCSTR_ lpCurrentDirectory, + LPSTARTUPINFOA_ lpStartupInfo, + LPPROCESS_INFORMATION_ lpProcessInformation) +{ + return ::CreateProcessA( + lpApplicationName, + lpCommandLine, + reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpProcessAttributes), + reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpThreadAttributes), + bInheritHandles, + dwCreationFlags, + lpEnvironment, + lpCurrentDirectory, + reinterpret_cast< ::_STARTUPINFOA* >(lpStartupInfo), + reinterpret_cast< ::_PROCESS_INFORMATION* >(lpProcessInformation)); +} + +BOOST_FORCEINLINE BOOL_ create_process( + LPCSTR_ lpApplicationName, + LPSTR_ lpCommandLine, + LPSECURITY_ATTRIBUTES_ lpProcessAttributes, + LPSECURITY_ATTRIBUTES_ lpThreadAttributes, + INT_ bInheritHandles, + DWORD_ dwCreationFlags, + LPVOID_ lpEnvironment, + LPCSTR_ lpCurrentDirectory, + LPSTARTUPINFOA_ lpStartupInfo, + LPPROCESS_INFORMATION_ lpProcessInformation) +{ + return ::CreateProcessA( + lpApplicationName, + lpCommandLine, + reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpProcessAttributes), + reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpThreadAttributes), + bInheritHandles, + dwCreationFlags, + lpEnvironment, + lpCurrentDirectory, + reinterpret_cast< ::_STARTUPINFOA* >(lpStartupInfo), + reinterpret_cast< ::_PROCESS_INFORMATION* >(lpProcessInformation)); +} +#endif + +BOOST_FORCEINLINE BOOL_ CreateProcessW( + LPCWSTR_ lpApplicationName, + LPWSTR_ lpCommandLine, + LPSECURITY_ATTRIBUTES_ lpProcessAttributes, + LPSECURITY_ATTRIBUTES_ lpThreadAttributes, + INT_ bInheritHandles, + DWORD_ dwCreationFlags, + LPVOID_ lpEnvironment, + LPCWSTR_ lpCurrentDirectory, + LPSTARTUPINFOW_ lpStartupInfo, + LPPROCESS_INFORMATION_ lpProcessInformation) +{ + return ::CreateProcessW( + lpApplicationName, + lpCommandLine, + reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpProcessAttributes), + reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpThreadAttributes), + bInheritHandles, + dwCreationFlags, + lpEnvironment, + lpCurrentDirectory, + reinterpret_cast< ::_STARTUPINFOW* >(lpStartupInfo), + reinterpret_cast< ::_PROCESS_INFORMATION* >(lpProcessInformation)); +} + +BOOST_FORCEINLINE BOOL_ create_process( + LPCWSTR_ lpApplicationName, + LPWSTR_ lpCommandLine, + LPSECURITY_ATTRIBUTES_ lpProcessAttributes, + LPSECURITY_ATTRIBUTES_ lpThreadAttributes, + INT_ bInheritHandles, + DWORD_ dwCreationFlags, + LPVOID_ lpEnvironment, + LPCWSTR_ lpCurrentDirectory, + LPSTARTUPINFOW_ lpStartupInfo, + LPPROCESS_INFORMATION_ lpProcessInformation) +{ + return ::CreateProcessW( + lpApplicationName, + lpCommandLine, + reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpProcessAttributes), + reinterpret_cast< ::_SECURITY_ATTRIBUTES* >(lpThreadAttributes), + bInheritHandles, + dwCreationFlags, + lpEnvironment, + lpCurrentDirectory, + reinterpret_cast< ::_STARTUPINFOW* >(lpStartupInfo), + reinterpret_cast< ::_PROCESS_INFORMATION* >(lpProcessInformation)); +} + +} +} +} + +#endif // BOOST_PLAT_WINDOWS_DESKTOP + +#endif // BOOST_DETAIL_WINAPI_PROCESS_HPP_ diff --git a/contrib/src/boost/detail/winapi/thread.hpp b/contrib/src/boost/detail/winapi/thread.hpp new file mode 100644 index 0000000..6162708 --- /dev/null +++ b/contrib/src/boost/detail/winapi/thread.hpp @@ -0,0 +1,42 @@ +// thread.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_THREAD_HPP +#define BOOST_DETAIL_WINAPI_THREAD_HPP + +#include <boost/detail/winapi/basic_types.hpp> +#include <boost/detail/winapi/get_current_thread.hpp> +#include <boost/detail/winapi/get_current_thread_id.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if !defined( BOOST_USE_WINDOWS_H ) +extern "C" { +BOOST_SYMBOL_IMPORT boost::detail::winapi::DWORD_ WINAPI +SleepEx( + boost::detail::winapi::DWORD_ dwMilliseconds, + boost::detail::winapi::BOOL_ bAlertable); +BOOST_SYMBOL_IMPORT boost::detail::winapi::VOID_ WINAPI Sleep(boost::detail::winapi::DWORD_ dwMilliseconds); +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI SwitchToThread(BOOST_DETAIL_WINAPI_VOID); +} +#endif + +namespace boost { +namespace detail { +namespace winapi { +using ::SleepEx; +using ::Sleep; +using ::SwitchToThread; +} +} +} + +#endif // BOOST_DETAIL_WINAPI_THREAD_HPP diff --git a/contrib/src/boost/detail/winapi/timers.hpp b/contrib/src/boost/detail/winapi/timers.hpp index e129dd9..c3bf826 100644 --- a/contrib/src/boost/detail/winapi/timers.hpp +++ b/contrib/src/boost/detail/winapi/timers.hpp @@ -1,48 +1,48 @@ -// timers.hpp --------------------------------------------------------------//
-
-// Copyright 2010 Vicente J. Botet Escriba
-// Copyright 2015 Andrey Semashev
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-
-#ifndef BOOST_DETAIL_WINAPI_TIMERS_HPP
-#define BOOST_DETAIL_WINAPI_TIMERS_HPP
-
-#include <boost/detail/winapi/basic_types.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-#if !defined( BOOST_USE_WINDOWS_H )
-extern "C" {
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-QueryPerformanceCounter(::_LARGE_INTEGER* lpPerformanceCount);
-
-BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI
-QueryPerformanceFrequency(::_LARGE_INTEGER* lpFrequency);
-}
-#endif
-
-
-namespace boost {
-namespace detail {
-namespace winapi {
-
-BOOST_FORCEINLINE BOOL_ QueryPerformanceCounter(LARGE_INTEGER_* lpPerformanceCount)
-{
- return ::QueryPerformanceCounter(reinterpret_cast< ::_LARGE_INTEGER* >(lpPerformanceCount));
-}
-
-BOOST_FORCEINLINE BOOL_ QueryPerformanceFrequency(LARGE_INTEGER_* lpFrequency)
-{
- return ::QueryPerformanceFrequency(reinterpret_cast< ::_LARGE_INTEGER* >(lpFrequency));
-}
-
-}
-}
-}
-
-#endif // BOOST_DETAIL_WINAPI_TIMERS_HPP
+// timers.hpp --------------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba +// Copyright 2015 Andrey Semashev + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + + +#ifndef BOOST_DETAIL_WINAPI_TIMERS_HPP +#define BOOST_DETAIL_WINAPI_TIMERS_HPP + +#include <boost/detail/winapi/basic_types.hpp> + +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif + +#if !defined( BOOST_USE_WINDOWS_H ) +extern "C" { +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +QueryPerformanceCounter(::_LARGE_INTEGER* lpPerformanceCount); + +BOOST_SYMBOL_IMPORT boost::detail::winapi::BOOL_ WINAPI +QueryPerformanceFrequency(::_LARGE_INTEGER* lpFrequency); +} +#endif + + +namespace boost { +namespace detail { +namespace winapi { + +BOOST_FORCEINLINE BOOL_ QueryPerformanceCounter(LARGE_INTEGER_* lpPerformanceCount) +{ + return ::QueryPerformanceCounter(reinterpret_cast< ::_LARGE_INTEGER* >(lpPerformanceCount)); +} + +BOOST_FORCEINLINE BOOL_ QueryPerformanceFrequency(LARGE_INTEGER_* lpFrequency) +{ + return ::QueryPerformanceFrequency(reinterpret_cast< ::_LARGE_INTEGER* >(lpFrequency)); +} + +} +} +} + +#endif // BOOST_DETAIL_WINAPI_TIMERS_HPP diff --git a/contrib/src/boost/detail/workaround.hpp b/contrib/src/boost/detail/workaround.hpp index 439b146..40b3423 100644 --- a/contrib/src/boost/detail/workaround.hpp +++ b/contrib/src/boost/detail/workaround.hpp @@ -1,272 +1,267 @@ -// Copyright David Abrahams 2002.
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-#ifndef WORKAROUND_DWA2002126_HPP
-# define WORKAROUND_DWA2002126_HPP
-
-// Compiler/library version workaround macro
-//
-// Usage:
-//
-// #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-// // workaround for eVC4 and VC6
-// ... // workaround code here
-// #endif
-//
-// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the
-// first argument must be undefined or expand to a numeric
-// value. The above expands to:
-//
-// (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300
-//
-// When used for workarounds that apply to the latest known version
-// and all earlier versions of a compiler, the following convention
-// should be observed:
-//
-// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301))
-//
-// The version number in this case corresponds to the last version in
-// which the workaround was known to have been required. When
-// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro
-// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates
-// the workaround for any version of the compiler. When
-// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or
-// error will be issued if the compiler version exceeds the argument
-// to BOOST_TESTED_AT(). This can be used to locate workarounds which
-// may be obsoleted by newer versions.
-
-# ifndef BOOST_STRICT_CONFIG
-
-#include <boost/config.hpp>
-
-#ifndef __BORLANDC__
-#define __BORLANDC___WORKAROUND_GUARD 1
-#else
-#define __BORLANDC___WORKAROUND_GUARD 0
-#endif
-#ifndef __CODEGEARC__
-#define __CODEGEARC___WORKAROUND_GUARD 1
-#else
-#define __CODEGEARC___WORKAROUND_GUARD 0
-#endif
-#ifndef _MSC_VER
-#define _MSC_VER_WORKAROUND_GUARD 1
-#else
-#define _MSC_VER_WORKAROUND_GUARD 0
-#endif
-#ifndef _MSC_FULL_VER
-#define _MSC_FULL_VER_WORKAROUND_GUARD 1
-#else
-#define _MSC_FULL_VER_WORKAROUND_GUARD 0
-#endif
-#ifndef BOOST_MSVC
-#define BOOST_MSVC_WORKAROUND_GUARD 1
-#else
-#define BOOST_MSVC_WORKAROUND_GUARD 0
-#endif
-#ifndef BOOST_MSVC_FULL_VER
-#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1
-#else
-#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0
-#endif
-#ifndef __GNUC__
-#define __GNUC___WORKAROUND_GUARD 1
-#else
-#define __GNUC___WORKAROUND_GUARD 0
-#endif
-#ifndef __GNUC_MINOR__
-#define __GNUC_MINOR___WORKAROUND_GUARD 1
-#else
-#define __GNUC_MINOR___WORKAROUND_GUARD 0
-#endif
-#ifndef __GNUC_PATCHLEVEL__
-#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1
-#else
-#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0
-#endif
-#ifndef BOOST_GCC
-#define BOOST_GCC_WORKAROUND_GUARD 1
-#else
-#define BOOST_GCC_WORKAROUND_GUARD 0
-#endif
-#ifndef __IBMCPP__
-#define __IBMCPP___WORKAROUND_GUARD 1
-#else
-#define __IBMCPP___WORKAROUND_GUARD 0
-#endif
-#ifndef __SUNPRO_CC
-#define __SUNPRO_CC_WORKAROUND_GUARD 1
-#else
-#define __SUNPRO_CC_WORKAROUND_GUARD 0
-#endif
-#ifndef __DECCXX_VER
-#define __DECCXX_VER_WORKAROUND_GUARD 1
-#else
-#define __DECCXX_VER_WORKAROUND_GUARD 0
-#endif
-#ifndef __MWERKS__
-#define __MWERKS___WORKAROUND_GUARD 1
-#else
-#define __MWERKS___WORKAROUND_GUARD 0
-#endif
-#ifndef __EDG__
-#define __EDG___WORKAROUND_GUARD 1
-#else
-#define __EDG___WORKAROUND_GUARD 0
-#endif
-#ifndef __EDG_VERSION__
-#define __EDG_VERSION___WORKAROUND_GUARD 1
-#else
-#define __EDG_VERSION___WORKAROUND_GUARD 0
-#endif
-#ifndef __HP_aCC
-#define __HP_aCC_WORKAROUND_GUARD 1
-#else
-#define __HP_aCC_WORKAROUND_GUARD 0
-#endif
-#ifndef __hpxstd98
-#define __hpxstd98_WORKAROUND_GUARD 1
-#else
-#define __hpxstd98_WORKAROUND_GUARD 0
-#endif
-#ifndef _CRAYC
-#define _CRAYC_WORKAROUND_GUARD 1
-#else
-#define _CRAYC_WORKAROUND_GUARD 0
-#endif
-#ifndef __DMC__
-#define __DMC___WORKAROUND_GUARD 1
-#else
-#define __DMC___WORKAROUND_GUARD 0
-#endif
-#ifndef MPW_CPLUS
-#define MPW_CPLUS_WORKAROUND_GUARD 1
-#else
-#define MPW_CPLUS_WORKAROUND_GUARD 0
-#endif
-#ifndef __COMO__
-#define __COMO___WORKAROUND_GUARD 1
-#else
-#define __COMO___WORKAROUND_GUARD 0
-#endif
-#ifndef __COMO_VERSION__
-#define __COMO_VERSION___WORKAROUND_GUARD 1
-#else
-#define __COMO_VERSION___WORKAROUND_GUARD 0
-#endif
-#ifndef __INTEL_COMPILER
-#define __INTEL_COMPILER_WORKAROUND_GUARD 1
-#else
-#define __INTEL_COMPILER_WORKAROUND_GUARD 0
-#endif
-#ifndef __ICL
-#define __ICL_WORKAROUND_GUARD 1
-#else
-#define __ICL_WORKAROUND_GUARD 0
-#endif
-#ifndef _COMPILER_VERSION
-#define _COMPILER_VERSION_WORKAROUND_GUARD 1
-#else
-#define _COMPILER_VERSION_WORKAROUND_GUARD 0
-#endif
-
-#ifndef _RWSTD_VER
-#define _RWSTD_VER_WORKAROUND_GUARD 1
-#else
-#define _RWSTD_VER_WORKAROUND_GUARD 0
-#endif
-#ifndef BOOST_RWSTD_VER
-#define BOOST_RWSTD_VER_WORKAROUND_GUARD 1
-#else
-#define BOOST_RWSTD_VER_WORKAROUND_GUARD 0
-#endif
-#ifndef __GLIBCPP__
-#define __GLIBCPP___WORKAROUND_GUARD 1
-#else
-#define __GLIBCPP___WORKAROUND_GUARD 0
-#endif
-#ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
-#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1
-#else
-#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0
-#endif
-#ifndef __SGI_STL_PORT
-#define __SGI_STL_PORT_WORKAROUND_GUARD 1
-#else
-#define __SGI_STL_PORT_WORKAROUND_GUARD 0
-#endif
-#ifndef _STLPORT_VERSION
-#define _STLPORT_VERSION_WORKAROUND_GUARD 1
-#else
-#define _STLPORT_VERSION_WORKAROUND_GUARD 0
-#endif
-#ifndef __LIBCOMO_VERSION__
-#define __LIBCOMO_VERSION___WORKAROUND_GUARD 1
-#else
-#define __LIBCOMO_VERSION___WORKAROUND_GUARD 0
-#endif
-#ifndef _CPPLIB_VER
-#define _CPPLIB_VER_WORKAROUND_GUARD 1
-#else
-#define _CPPLIB_VER_WORKAROUND_GUARD 0
-#endif
-
-#ifndef BOOST_INTEL_CXX_VERSION
-#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1
-#else
-#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0
-#endif
-#ifndef BOOST_INTEL_WIN
-#define BOOST_INTEL_WIN_WORKAROUND_GUARD 1
-#else
-#define BOOST_INTEL_WIN_WORKAROUND_GUARD 0
-#endif
-#ifndef BOOST_DINKUMWARE_STDLIB
-#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1
-#else
-#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0
-#endif
-#ifndef BOOST_INTEL
-#define BOOST_INTEL_WORKAROUND_GUARD 1
-#else
-#define BOOST_INTEL_WORKAROUND_GUARD 0
-#endif
-// Always define to zero, if it's used it'll be defined my MPL:
-#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0
-
-# define BOOST_WORKAROUND(symbol, test) \
- ((symbol ## _WORKAROUND_GUARD + 0 == 0) && \
- (symbol != 0) && (1 % (( (symbol test) ) + 1)))
-// ^ ^ ^ ^
-// The extra level of parenthesis nesting above, along with the
-// BOOST_OPEN_PAREN indirection below, is required to satisfy the
-// broken preprocessor in MWCW 8.3 and earlier.
-//
-// The basic mechanism works as follows:
-// (symbol test) + 1 => if (symbol test) then 2 else 1
-// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0
-//
-// The complication with % is for cooperation with BOOST_TESTED_AT().
-// When "test" is BOOST_TESTED_AT(x) and
-// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined,
-//
-// symbol test => if (symbol <= x) then 1 else -1
-// (symbol test) + 1 => if (symbol <= x) then 2 else 0
-// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero
-//
-
-# ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS
-# define BOOST_OPEN_PAREN (
-# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1
-# else
-# define BOOST_TESTED_AT(value) != ((value)-(value))
-# endif
-
-# else
-
-# define BOOST_WORKAROUND(symbol, test) 0
-
-# endif
-
-#endif // WORKAROUND_DWA2002126_HPP
+// Copyright David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef WORKAROUND_DWA2002126_HPP +# define WORKAROUND_DWA2002126_HPP + +// Compiler/library version workaround macro +// +// Usage: +// +// #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// // workaround for eVC4 and VC6 +// ... // workaround code here +// #endif +// +// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the +// first argument must be undefined or expand to a numeric +// value. The above expands to: +// +// (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300 +// +// When used for workarounds that apply to the latest known version +// and all earlier versions of a compiler, the following convention +// should be observed: +// +// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301)) +// +// The version number in this case corresponds to the last version in +// which the workaround was known to have been required. When +// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro +// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates +// the workaround for any version of the compiler. When +// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or +// error will be issued if the compiler version exceeds the argument +// to BOOST_TESTED_AT(). This can be used to locate workarounds which +// may be obsoleted by newer versions. + +# ifndef BOOST_STRICT_CONFIG + +#include <boost/config.hpp> + +#ifndef __BORLANDC__ +#define __BORLANDC___WORKAROUND_GUARD 1 +#else +#define __BORLANDC___WORKAROUND_GUARD 0 +#endif +#ifndef __CODEGEARC__ +#define __CODEGEARC___WORKAROUND_GUARD 1 +#else +#define __CODEGEARC___WORKAROUND_GUARD 0 +#endif +#ifndef _MSC_VER +#define _MSC_VER_WORKAROUND_GUARD 1 +#else +#define _MSC_VER_WORKAROUND_GUARD 0 +#endif +#ifndef _MSC_FULL_VER +#define _MSC_FULL_VER_WORKAROUND_GUARD 1 +#else +#define _MSC_FULL_VER_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_MSVC +#define BOOST_MSVC_WORKAROUND_GUARD 1 +#else +#define BOOST_MSVC_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_MSVC_FULL_VER +#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1 +#else +#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0 +#endif +#ifndef __GNUC__ +#define __GNUC___WORKAROUND_GUARD 1 +#else +#define __GNUC___WORKAROUND_GUARD 0 +#endif +#ifndef __GNUC_MINOR__ +#define __GNUC_MINOR___WORKAROUND_GUARD 1 +#else +#define __GNUC_MINOR___WORKAROUND_GUARD 0 +#endif +#ifndef __GNUC_PATCHLEVEL__ +#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1 +#else +#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0 +#endif +#ifndef __IBMCPP__ +#define __IBMCPP___WORKAROUND_GUARD 1 +#else +#define __IBMCPP___WORKAROUND_GUARD 0 +#endif +#ifndef __SUNPRO_CC +#define __SUNPRO_CC_WORKAROUND_GUARD 1 +#else +#define __SUNPRO_CC_WORKAROUND_GUARD 0 +#endif +#ifndef __DECCXX_VER +#define __DECCXX_VER_WORKAROUND_GUARD 1 +#else +#define __DECCXX_VER_WORKAROUND_GUARD 0 +#endif +#ifndef __MWERKS__ +#define __MWERKS___WORKAROUND_GUARD 1 +#else +#define __MWERKS___WORKAROUND_GUARD 0 +#endif +#ifndef __EDG__ +#define __EDG___WORKAROUND_GUARD 1 +#else +#define __EDG___WORKAROUND_GUARD 0 +#endif +#ifndef __EDG_VERSION__ +#define __EDG_VERSION___WORKAROUND_GUARD 1 +#else +#define __EDG_VERSION___WORKAROUND_GUARD 0 +#endif +#ifndef __HP_aCC +#define __HP_aCC_WORKAROUND_GUARD 1 +#else +#define __HP_aCC_WORKAROUND_GUARD 0 +#endif +#ifndef __hpxstd98 +#define __hpxstd98_WORKAROUND_GUARD 1 +#else +#define __hpxstd98_WORKAROUND_GUARD 0 +#endif +#ifndef _CRAYC +#define _CRAYC_WORKAROUND_GUARD 1 +#else +#define _CRAYC_WORKAROUND_GUARD 0 +#endif +#ifndef __DMC__ +#define __DMC___WORKAROUND_GUARD 1 +#else +#define __DMC___WORKAROUND_GUARD 0 +#endif +#ifndef MPW_CPLUS +#define MPW_CPLUS_WORKAROUND_GUARD 1 +#else +#define MPW_CPLUS_WORKAROUND_GUARD 0 +#endif +#ifndef __COMO__ +#define __COMO___WORKAROUND_GUARD 1 +#else +#define __COMO___WORKAROUND_GUARD 0 +#endif +#ifndef __COMO_VERSION__ +#define __COMO_VERSION___WORKAROUND_GUARD 1 +#else +#define __COMO_VERSION___WORKAROUND_GUARD 0 +#endif +#ifndef __INTEL_COMPILER +#define __INTEL_COMPILER_WORKAROUND_GUARD 1 +#else +#define __INTEL_COMPILER_WORKAROUND_GUARD 0 +#endif +#ifndef __ICL +#define __ICL_WORKAROUND_GUARD 1 +#else +#define __ICL_WORKAROUND_GUARD 0 +#endif +#ifndef _COMPILER_VERSION +#define _COMPILER_VERSION_WORKAROUND_GUARD 1 +#else +#define _COMPILER_VERSION_WORKAROUND_GUARD 0 +#endif + +#ifndef _RWSTD_VER +#define _RWSTD_VER_WORKAROUND_GUARD 1 +#else +#define _RWSTD_VER_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_RWSTD_VER +#define BOOST_RWSTD_VER_WORKAROUND_GUARD 1 +#else +#define BOOST_RWSTD_VER_WORKAROUND_GUARD 0 +#endif +#ifndef __GLIBCPP__ +#define __GLIBCPP___WORKAROUND_GUARD 1 +#else +#define __GLIBCPP___WORKAROUND_GUARD 0 +#endif +#ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC +#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1 +#else +#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0 +#endif +#ifndef __SGI_STL_PORT +#define __SGI_STL_PORT_WORKAROUND_GUARD 1 +#else +#define __SGI_STL_PORT_WORKAROUND_GUARD 0 +#endif +#ifndef _STLPORT_VERSION +#define _STLPORT_VERSION_WORKAROUND_GUARD 1 +#else +#define _STLPORT_VERSION_WORKAROUND_GUARD 0 +#endif +#ifndef __LIBCOMO_VERSION__ +#define __LIBCOMO_VERSION___WORKAROUND_GUARD 1 +#else +#define __LIBCOMO_VERSION___WORKAROUND_GUARD 0 +#endif +#ifndef _CPPLIB_VER +#define _CPPLIB_VER_WORKAROUND_GUARD 1 +#else +#define _CPPLIB_VER_WORKAROUND_GUARD 0 +#endif + +#ifndef BOOST_INTEL_CXX_VERSION +#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1 +#else +#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_INTEL_WIN +#define BOOST_INTEL_WIN_WORKAROUND_GUARD 1 +#else +#define BOOST_INTEL_WIN_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_DINKUMWARE_STDLIB +#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1 +#else +#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_INTEL +#define BOOST_INTEL_WORKAROUND_GUARD 1 +#else +#define BOOST_INTEL_WORKAROUND_GUARD 0 +#endif +// Always define to zero, if it's used it'll be defined my MPL: +#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0 + +# define BOOST_WORKAROUND(symbol, test) \ + ((symbol ## _WORKAROUND_GUARD + 0 == 0) && \ + (symbol != 0) && (1 % (( (symbol test) ) + 1))) +// ^ ^ ^ ^ +// The extra level of parenthesis nesting above, along with the +// BOOST_OPEN_PAREN indirection below, is required to satisfy the +// broken preprocessor in MWCW 8.3 and earlier. +// +// The basic mechanism works as follows: +// (symbol test) + 1 => if (symbol test) then 2 else 1 +// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0 +// +// The complication with % is for cooperation with BOOST_TESTED_AT(). +// When "test" is BOOST_TESTED_AT(x) and +// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined, +// +// symbol test => if (symbol <= x) then 1 else -1 +// (symbol test) + 1 => if (symbol <= x) then 2 else 0 +// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero +// + +# ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS +# define BOOST_OPEN_PAREN ( +# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1 +# else +# define BOOST_TESTED_AT(value) != ((value)-(value)) +# endif + +# else + +# define BOOST_WORKAROUND(symbol, test) 0 + +# endif + +#endif // WORKAROUND_DWA2002126_HPP |