--- /dev/null
+// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and
+// distribute this software is granted provided this copyright notice appears
+// in all copies. This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+
+// See http://www.boost.org for most recent version.
+
+// All POSIX feature tests go in this file:
+
+# ifdef BOOST_HAS_UNISTD_H
+# include <unistd.h>
+
+ // XOpen has <nl_types.h>, but is this the correct version check?
+# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3)
+# define BOOST_HAS_NL_TYPES_H
+# endif
+
+ // POSIX version 6 requires <stdint.h>
+# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100)
+# define BOOST_HAS_STDINT_H
+# endif
+
+ // POSIX version 2 requires <dirent.h>
+# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L)
+# define BOOST_HAS_DIRENT_H
+# endif
+
+ // POSIX defines _POSIX_THREADS > 0 for pthread support,
+ // however some platforms define _POSIX_THREADS without
+ // a value, hence the (_POSIX_THREADS+0 >= 0) check.
+ // Strictly speaking this may catch platforms with a
+ // non-functioning stub <pthreads.h>, but such occurrences should
+ // occur very rarely if at all.
+# if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS)
+# define BOOST_HAS_PTHREADS
+# endif
+
+ // BOOST_HAS_NANOSLEEP:
+ // This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME:
+# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \
+ || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
+# define BOOST_HAS_NANOSLEEP
+# endif
+
+ // BOOST_HAS_CLOCK_GETTIME:
+ // This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME
+ // but at least one platform - linux - defines that flag without
+ // defining clock_gettime):
+# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0))
+# define BOOST_HAS_CLOCK_GETTIME
+# endif
+
+ // BOOST_HAS_SCHED_YIELD:
+ // This is predicated on _POSIX_PRIORITY_SCHEDULING or
+ // on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME.
+# if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\
+ || (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\
+ || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
+# define BOOST_HAS_SCHED_YIELD
+# endif
+
+ // BOOST_HAS_GETTIMEOFDAY:
+ // BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE:
+ // These are predicated on _XOPEN_VERSION, and appears to be first released
+ // in issue 4, version 2 (_XOPEN_VERSION > 500).
+# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500)
+# define BOOST_HAS_GETTIMEOFDAY
+# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+# endif
+
+# endif
--- /dev/null
+// Boost compiler configuration selection header file
+
+// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and
+// distribute this software is granted provided this copyright notice appears
+// in all copies. This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+
+// See http://www.boost.org for most recent version.
+
+// locate which compiler we are using and define
+// BOOST_COMPILER_CONFIG as needed:
+
+#if defined __GNUC__
+// GNU C++:
+# define BOOST_COMPILER_CONFIG <boost_local/config/compiler/gcc.hpp>
+
+# elif defined __COMO__
+// Comeau C++
+# define BOOST_COMPILER_CONFIG <boost_local/config/compiler/comeau.hpp>
+
+#elif defined __KCC
+// Kai C++
+# define BOOST_COMPILER_CONFIG <boost_local/config/compiler/kai.hpp>
+
+#elif defined __sgi
+// SGI MIPSpro C++
+# define BOOST_COMPILER_CONFIG <boost_local/config/compiler/sgi_mipspro.hpp>
+
+#elif defined __DECCXX
+// Compaq Tru64 Unix cxx
+# define BOOST_COMPILER_CONFIG <boost_local/config/compiler/compaq_cxx.hpp>
+
+#elif defined __ghs
+// Greenhills C++
+# define BOOST_COMPILER_CONFIG <boost_local/config/compiler/greenhills.hpp>
+
+#elif defined __BORLANDC__
+// Borland
+# define BOOST_COMPILER_CONFIG <boost_local/config/compiler/borland.hpp>
+
+#elif defined(__ICL) || defined(__ICC)
+// Intel
+# define BOOST_COMPILER_CONFIG <boost_local/config/compiler/intel.hpp>
+
+#elif defined __MWERKS__
+// Metrowerks CodeWarrior
+# define BOOST_COMPILER_CONFIG <boost_local/config/compiler/metrowerks.hpp>
+
+#elif defined __SUNPRO_CC
+// Sun Workshop Compiler C++
+# define BOOST_COMPILER_CONFIG <boost_local/config/compiler/sunpro_cc.hpp>
+
+#elif defined __HP_aCC
+// HP aCC
+# define BOOST_COMPILER_CONFIG <boost_local/config/compiler/hp_acc.hpp>
+
+#elif defined(__MRC__) || defined(__SC__)
+// MPW MrCpp or SCpp
+# define BOOST_COMPILER_CONFIG <boost_local/config/compiler/mpw.hpp>
+
+#elif defined(__IBMCPP__)
+// IBM Visual Age
+# define BOOST_COMPILER_CONFIG <boost_local/config/compiler/vacpp.hpp>
+
+#elif defined _MSC_VER
+// Microsoft Visual C++
+//
+// Must remain the last #elif since some other vendors (Metrowerks, for
+// example) also #define _MSC_VER
+# define BOOST_COMPILER_CONFIG <boost_local/config/compiler/visualc.hpp>
+
+#elif defined (BOOST_ASSERT_CONFIG)
+// this must come last - generate an error if we don't
+// recognise the compiler:
+# error "Unknown compiler - please configure and report the results to boost.org"
+
+#endif
+
--- /dev/null
+// Boost compiler configuration selection header file
+
+// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and
+// distribute this software is granted provided this copyright notice appears
+// in all copies. This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+
+// See http://www.boost.org for most recent version.
+
+// locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed.
+// Note that we define the headers to include using "header_name" not
+// <header_name> in order to prevent macro expansion within the header
+// name (for example "linux" is a macro on linux systems).
+
+#if defined(linux) || defined(__linux) || defined(__linux__)
+// linux:
+# define BOOST_PLATFORM_CONFIG "boost_local/config/platform/linux.hpp"
+
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+// BSD:
+# define BOOST_PLATFORM_CONFIG "boost_local/config/platform/bsd.hpp"
+
+#elif defined(sun) || defined(__sun)
+// solaris:
+# define BOOST_PLATFORM_CONFIG "boost_local/config/platform/solaris.hpp"
+
+#elif defined(__sgi)
+// SGI Irix:
+# define BOOST_PLATFORM_CONFIG "boost_local/config/platform/irix.hpp"
+
+#elif defined(__hpux)
+// hp unix:
+# define BOOST_PLATFORM_CONFIG "boost_local/config/platform/hpux.hpp"
+
+#elif defined(__CYGWIN__)
+// cygwin is not win32:
+# define BOOST_PLATFORM_CONFIG "boost_local/config/platform/cygwin.hpp"
+
+#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+// win32:
+# define BOOST_PLATFORM_CONFIG "boost_local/config/platform/win32.hpp"
+
+#elif defined(__BEOS__)
+// BeOS
+# define BOOST_PLATFORM_CONFIG "boost_local/config/platform/beos.hpp"
+
+#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
+// MacOS
+# define BOOST_PLATFORM_CONFIG "boost_local/config/platform/macos.hpp"
+
+#elif defined(__IBMCPP__)
+// IBM
+# define BOOST_PLATFORM_CONFIG "boost_local/config/platform/aix.hpp"
+
+#elif defined(__amigaos__)
+// AmigaOS
+# define BOOST_PLATFORM_CONFIG "boost_local/config/platform/amigaos.hpp"
+
+#else
+
+# if defined(unix) \
+ || defined(__unix) \
+ || defined(_XOPEN_SOURCE) \
+ || defined(_POSIX_SOURCE)
+
+ // generic unix platform:
+
+# ifndef BOOST_HAS_UNISTD_H
+# define BOOST_HAS_UNISTD_H
+# endif
+
+# include <boost_local/config/posix_features.hpp>
+
+# endif
+
+# if defined (BOOST_ASSERT_CONFIG)
+ // this must come last - generate an error if we don't
+ // recognise the platform:
+# error "Unknown platform - please configure and report the results to boost.org"
+# endif
+
+#endif
+
+
--- /dev/null
+// Boost compiler configuration selection header file
+
+// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and
+// distribute this software is granted provided this copyright notice appears
+// in all copies. This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+
+// See http://www.boost.org for most recent version.
+
+// locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed:
+
+// we need to include a std lib header here in order to detect which
+// library is in use, use <utility> as it's about the smallest
+// of the std lib headers - do not rely on this header being included -
+// users can short-circuit this header if they know whose std lib
+// they are using.
+
+#include <utility>
+
+#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
+// STLPort library; this _must_ come first, otherwise since
+// STLport typically sits on top of some other library, we
+// can end up detecting that first rather than STLport:
+# define BOOST_STDLIB_CONFIG <boost_local/config/stdlib/stlport.hpp>
+
+#elif defined(__LIBCOMO__)
+// Commeau STL:
+#define BOOST_STDLIB_CONFIG <boost_local/config/stdlib/libcomo.hpp>
+
+#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
+// Rogue Wave library:
+# define BOOST_STDLIB_CONFIG <boost_local/config/stdlib/roguewave.hpp>
+
+#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
+// Dinkumware Library:
+# define BOOST_STDLIB_CONFIG <boost_local/config/stdlib/dinkumware.hpp>
+
+#elif defined(__GLIBCPP__)
+// GNU libstdc++ 3
+# define BOOST_STDLIB_CONFIG <boost_local/config/stdlib/libstdcpp3.hpp>
+
+#elif defined(__STL_CONFIG_H)
+// generic SGI STL
+# define BOOST_STDLIB_CONFIG <boost_local/config/stdlib/sgi.hpp>
+
+#elif defined(__MSL_CPP__)
+// MSL standard lib:
+# define BOOST_STDLIB_CONFIG <boost_local/config/stdlib/msl.hpp>
+
+#elif defined(__IBMCPP__)
+// take the default VACPP std lib
+# define BOOST_STDLIB_CONFIG <boost_local/config/stdlib/vacpp.hpp>
+
+#elif defined(MSIPL_COMPILE_H)
+// Modena C++ standard library
+# define BOOST_STDLIB_CONFIG <boost_local/config/stdlib/modena.hpp>
+
+#elif defined (BOOST_ASSERT_CONFIG)
+// this must come last - generate an error if we don't
+// recognise the library:
+# error "Unknown standard library - please configure and report the results to boost.org"
+
+#endif
+
+
--- /dev/null
+// Boost config.hpp configuration header file ------------------------------//
+
+// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and
+// distribute this software is granted provided this copyright notice appears
+// in all copies. This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+
+// See http://www.boost.org for most recent version.
+
+// Boost config.hpp policy and rationale documentation has been moved to
+// http://www.boost.org/libs/config
+//
+// This file is intended to be stable, and relatively unchanging.
+// It should contain boilerplate code only - no compiler specific
+// code unless it is unavoidable - no changes unless unavoidable.
+
+#ifndef BOOST_CONFIG_SUFFIX_HPP
+#define BOOST_CONFIG_SUFFIX_HPP
+
+# ifndef BOOST_DECL
+# define BOOST_DECL // default for compilers not needing this decoration.
+# endif
+
+//
+// look for long long by looking for the appropriate macros in <limits.h>.
+// Note that we use limits.h rather than climits for maximal portability,
+// remember that since these just declare a bunch of macros, there should be
+// no namespace issues from this.
+//
+#include <limits.h>
+# if !defined(BOOST_HAS_LONG_LONG) \
+ && !(defined(BOOST_MSVC) && BOOST_MSVC <=1300) && !defined(__BORLANDC__) \
+ && (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
+# define BOOST_HAS_LONG_LONG
+#endif
+#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_INTEGRAL_INT64_T)
+# define BOOST_NO_INTEGRAL_INT64_T
+#endif
+
+// GCC 3.x will clean up all of those nasty macro definitions that
+// BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine
+// it under GCC 3.x.
+#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS)
+# undef BOOST_NO_CTYPE_FUNCTIONS
+#endif
+
+
+//
+// Assume any extensions are in namespace std:: unless stated otherwise:
+//
+# ifndef BOOST_STD_EXTENSION_NAMESPACE
+# define BOOST_STD_EXTENSION_NAMESPACE std
+# endif
+
+//
+// If cv-qualified specializations are not allowed, then neither are cv-void ones:
+//
+# if defined(BOOST_NO_CV_SPECIALIZATIONS) \
+ && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
+# define BOOST_NO_CV_VOID_SPECIALIZATIONS
+# endif
+
+//
+// If there is no numeric_limits template, then it can't have any compile time
+// constants either!
+//
+# if defined(BOOST_NO_LIMITS) \
+ && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)
+# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
+# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
+# endif
+
+//
+// if there is no long long then there is no specialisation
+// for numeric_limits<long long> either:
+//
+#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)
+# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
+#endif
+
+//
+// if there is no __int64 then there is no specialisation
+// for numeric_limits<__int64> either:
+//
+#if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)
+# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
+#endif
+
+//
+// if member templates are supported then so is the
+// VC6 subset of member templates:
+//
+# if !defined(BOOST_NO_MEMBER_TEMPLATES) \
+ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
+# define BOOST_MSVC6_MEMBER_TEMPLATES
+# endif
+
+//
+// Without partial specialization, can't test for partial specialisation bugs:
+//
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG)
+# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
+# endif
+
+//
+// Without partial specialization, std::iterator_traits can't work:
+//
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
+# define BOOST_NO_STD_ITERATOR_TRAITS
+# endif
+
+//
+// Without member template support, we can't have template constructors
+// in the standard library either:
+//
+# if defined(BOOST_NO_MEMBER_TEMPLATES) \
+ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
+ && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
+# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
+# endif
+
+//
+// Without member template support, we can't have a conforming
+// std::allocator template either:
+//
+# if defined(BOOST_NO_MEMBER_TEMPLATES) \
+ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
+ && !defined(BOOST_NO_STD_ALLOCATOR)
+# define BOOST_NO_STD_ALLOCATOR
+# endif
+
+//
+// If we have a standard allocator, then we have a partial one as well:
+//
+#if !defined(BOOST_NO_STD_ALLOCATOR)
+# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
+#endif
+
+//
+// We can't have a working std::use_facet if there is no std::locale:
+//
+# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET)
+# define BOOST_NO_STD_USE_FACET
+# endif
+
+//
+// We can't have a std::messages facet if there is no std::locale:
+//
+# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES)
+# define BOOST_NO_STD_MESSAGES
+# endif
+
+//
+// We can't have a working std::wstreambuf if there is no std::locale:
+//
+# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
+# define BOOST_NO_STD_WSTREAMBUF
+# endif
+
+//
+// We can't have a <cwctype> if there is no <cwchar>:
+//
+# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE)
+# define BOOST_NO_CWCTYPE
+# endif
+
+//
+// We can't have a swprintf if there is no <cwchar>:
+//
+# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF)
+# define BOOST_NO_SWPRINTF
+# endif
+
+//
+// If Win32 support is turned off, then we must turn off
+// threading support also, unless there is some other
+// thread API enabled:
+//
+#if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \
+ && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS)
+# define BOOST_DISABLE_THREADS
+#endif
+
+//
+// Turn on threading support if the compiler thinks that it's in
+// multithreaded mode. We put this here because there are only a
+// limited number of macros that identify this (if there's any missing
+// from here then add to the appropriate compiler section):
+//
+#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
+ || defined(_PTHREADS)) && !defined(BOOST_HAS_THREADS)
+# define BOOST_HAS_THREADS
+#endif
+
+//
+// Turn threading support off if BOOST_DISABLE_THREADS is defined:
+//
+#if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS)
+# undef BOOST_HAS_THREADS
+#endif
+
+//
+// Turn threading support off if we don't recognise the threading API:
+//
+#if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\
+ && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\
+ && !defined(BOOST_HAS_MPTASKS)
+# undef BOOST_HAS_THREADS
+#endif
+
+//
+// If the compiler claims to be C99 conformant, then it had better
+// have a <stdint.h>:
+//
+# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
+# define BOOST_HAS_STDINT_H
+# endif
+
+//
+// Define BOOST_NO_SLIST and BOOST_NO_HASH if required.
+// Note that this is for backwards compatibility only.
+//
+# ifndef BOOST_HAS_SLIST
+# define BOOST_NO_SLIST
+# endif
+
+# ifndef BOOST_HAS_HASH
+# define BOOST_NO_HASH
+# endif
+
+// BOOST_NO_STDC_NAMESPACE workaround --------------------------------------//
+// Because std::size_t usage is so common, even in boost headers which do not
+// otherwise use the C library, the <cstddef> workaround is included here so
+// that ugly workaround code need not appear in many other boost headers.
+// NOTE WELL: This is a workaround for non-conforming compilers; <cstddef>
+// must still be #included in the usual places so that <cstddef> inclusion
+// works as expected with standard conforming compilers. The resulting
+// double inclusion of <cstddef> is harmless.
+
+# ifdef BOOST_NO_STDC_NAMESPACE
+# include <cstddef>
+ namespace std { using ::ptrdiff_t; using ::size_t; }
+# endif
+
+// BOOST_NO_STD_MIN_MAX workaround -----------------------------------------//
+
+# ifdef BOOST_NO_STD_MIN_MAX
+
+namespace std {
+ template <class _Tp>
+ inline const _Tp& min(const _Tp& __a, const _Tp& __b) {
+ return __b < __a ? __b : __a;
+ }
+ template <class _Tp>
+ inline const _Tp& max(const _Tp& __a, const _Tp& __b) {
+ return __a < __b ? __b : __a;
+ }
+}
+
+# endif
+
+// BOOST_STATIC_CONSTANT workaround --------------------------------------- //
+// On compilers which don't allow in-class initialization of static integral
+// constant members, we must use enums as a workaround if we want the constants
+// to be available at compile-time. This macro gives us a convenient way to
+// declare such constants.
+
+# ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
+# define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment }
+# else
+# define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
+# endif
+
+// BOOST_USE_FACET workaround ----------------------------------------------//
+// When the standard library does not have a conforming std::use_facet there
+// are various workarounds available, but they differ from library to library.
+// This macro provides a consistent way to access a locale's facets.
+// Usage:
+// replace
+// std::use_facet<Type>(loc);
+// with
+// BOOST_USE_FACET(Type, loc);
+// Note do not add a std:: prefix to the front of BOOST_USE_FACET!
+
+#if defined(BOOST_NO_STD_USE_FACET)
+# ifdef BOOST_HAS_TWO_ARG_USE_FACET
+# define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast<Type*>(0))
+# elif defined(BOOST_HAS_MACRO_USE_FACET)
+# define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type)
+# elif defined(BOOST_HAS_STLP_USE_FACET)
+# define BOOST_USE_FACET(Type, loc) (*std::_Use_facet<Type >(loc))
+# endif
+#else
+# define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc)
+#endif
+
+// BOOST_NESTED_TEMPLATE workaround ------------------------------------------//
+// Member templates are supported by some compilers even though they can't use
+// the A::template member<U> syntax, as a workaround replace:
+//
+// typedef typename A::template rebind<U> binder;
+//
+// with:
+//
+// typedef typename A::BOOST_NESTED_TEMPLATE rebind<U> binder;
+
+#ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD
+# define BOOST_NESTED_TEMPLATE template
+#else
+# define BOOST_NESTED_TEMPLATE
+#endif
+
+// ---------------------------------------------------------------------------//
+
+//
+// Helper macro BOOST_STRINGIZE:
+// Converts the parameter X to a string after macro replacement
+// on X has been performed.
+//
+#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
+#define BOOST_DO_STRINGIZE(X) #X
+
+//
+// Helper macro BOOST_JOIN:
+// The following piece of macro magic joins the two
+// arguments together, even when one of the arguments is
+// itself a macro (see 16.3.1 in C++ standard). The key
+// is that macro expansion of macro arguments does not
+// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
+//
+#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
+#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
+#define BOOST_DO_JOIN2( X, Y ) X##Y
+
+//
+// Set some default values for compiler/library/platform names.
+// These are for debugging config setup only:
+//
+# ifndef BOOST_COMPILER
+# define BOOST_COMPILER "Unknown ISO C++ Compiler"
+# endif
+# ifndef BOOST_STDLIB
+# define BOOST_STDLIB "Unknown ISO standard library"
+# endif
+# ifndef BOOST_PLATFORM
+# if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \
+ || defined(_POSIX_SOURCE)
+# define BOOST_PLATFORM "Generic Unix"
+# else
+# define BOOST_PLATFORM "Unknown"
+# endif
+# endif
+
+#endif
+
+
--- /dev/null
+// boost/config/user.hpp ---------------------------------------------------//
+
+// (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and
+// distribute this software is granted provided this copyright notice appears
+// in all copies. This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+
+// Do not check in modified versions of this file,
+// This file may be customized by the end user, but not by boost.
+
+//
+// Use this file to define a site and compiler specific
+// configuration policy:
+//
+
+// define this to locate a compiler config file:
+// #define BOOST_COMPILER_CONFIG <myheader>
+
+// define this to locate a stdlib config file:
+// #define BOOST_STDLIB_CONFIG <myheader>
+
+// define this to locate a platform config file:
+// #define BOOST_PLATFORM_CONFIG <myheader>
+
+// define this to disable compiler config,
+// use if your compiler config has nothing to set:
+// #define BOOST_NO_COMPILER_CONFIG
+
+// define this to disable stdlib config,
+// use if your stdlib config has nothing to set:
+// #define BOOST_NO_STDLIB_CONFIG
+
+// define this to disable platform config,
+// use if your platform config has nothing to set:
+// #define BOOST_NO_PLATFORM_CONFIG
+
+// define this to disable all config options,
+// excluding the user config. Use if your
+// setup is fully ISO compliant, and has no
+// useful extensions, or for autoconf generated
+// setups:
+// #define BOOST_NO_CONFIG
+
+// define this to make the config "optimistic"
+// about unknown compiler versions. Normally
+// unknown compiler versions are assumed to have
+// all the defects of the last known version, however
+// setting this flag, causes the config to assume
+// that unknown compiler versions are fully conformant
+// with the standard:
+// #define BOOST_STRICT_CONFIG
+
+// define this to cause the config to halt compilation
+// with an #error if it encounters anything unknown --
+// either an unknown compiler version or an unknown
+// compiler/platform/library:
+// #define BOOST_ASSERT_CONFIG
+
+
+// define if you want to disable threading support, even
+// when available:
+// #define BOOST_DISABLE_THREADS
+
+// define when you want to disable Win32 specific features
+// even when available:
+// #define BOOST_DISABLE_WIN32
+
+
--- /dev/null
+#ifndef BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED
+#define BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED
+
+#if _MSC_VER >= 1020
+#pragma once
+#endif
+
+//
+// boost/detail/atomic_count.hpp - thread/SMP safe reference counter
+//
+// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+// typedef <implementation-defined> boost::detail::atomic_count;
+//
+// atomic_count a(n);
+//
+// (n is convertible to long)
+//
+// Effects: Constructs an atomic_count with an initial value of n
+//
+// a;
+//
+// Returns: (long) the current value of a
+//
+// ++a;
+//
+// Effects: Atomically increments the value of a
+// Returns: nothing
+//
+// --a;
+//
+// Effects: Atomically decrements the value of a
+// Returns: (long) zero if the new value of a is zero,
+// unspecified non-zero value otherwise (usually the new value)
+//
+// Important note: when --a returns zero, it must act as a
+// read memory barrier (RMB); i.e. the calling thread must
+// have a synchronized view of the memory
+//
+// On Intel IA-32 (x86) memory is always synchronized, so this
+// is not a problem.
+//
+// On many architectures the atomic instructions already act as
+// a memory barrier.
+//
+// This property is necessary for proper reference counting, since
+// a thread can update the contents of a shared object, then
+// release its reference, and another thread may immediately
+// release the last reference causing object destruction.
+//
+// The destructor needs to have a synchronized view of the
+// object to perform proper cleanup.
+//
+// Original example by Alexander Terekhov:
+//
+// Given:
+//
+// - a mutable shared object OBJ;
+// - two threads THREAD1 and THREAD2 each holding
+// a private smart_ptr object pointing to that OBJ.
+//
+// t1: THREAD1 updates OBJ (thread-safe via some synchronization)
+// and a few cycles later (after "unlock") destroys smart_ptr;
+//
+// t2: THREAD2 destroys smart_ptr WITHOUT doing any synchronization
+// with respect to shared mutable object OBJ; OBJ destructors
+// are called driven by smart_ptr interface...
+//
+
+// Note: atomic_count_linux.hpp has been disabled by default; see the
+// comments inside for more info.
+
+#include <boost_local/config.hpp>
+
+#ifndef BOOST_HAS_THREADS
+
+namespace boost
+{
+
+namespace detail
+{
+
+typedef long atomic_count;
+
+}
+
+}
+
+#elif defined(BOOST_USE_ASM_ATOMIC_H)
+# include <boost_local/detail/atomic_count_linux.hpp>
+#elif defined(BOOST_AC_USE_PTHREADS)
+# include <boost_local/detail/atomic_count_pthreads.hpp>
+#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
+# include <boost_local/detail/atomic_count_win32.hpp>
+#elif defined(__GLIBCPP__)
+# include <boost_local/detail/atomic_count_gcc.hpp>
+#elif defined(BOOST_HAS_PTHREADS)
+# define BOOST_AC_USE_PTHREADS
+# include <boost_local/detail/atomic_count_pthreads.hpp>
+#else
+
+// #warning Unrecognized platform, detail::atomic_count will not be thread safe
+
+namespace boost
+{
+
+namespace detail
+{
+
+typedef long atomic_count;
+
+}
+
+}
+
+#endif
+
+#endif // #ifndef BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED
--- /dev/null
+#ifndef BOOST_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED
+#define BOOST_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED
+
+//
+// boost/detail/atomic_count_gcc.hpp
+//
+// atomic_count for GNU libstdc++ v3
+//
+// http://gcc.gnu.org/onlinedocs/porting/Thread-safety.html
+//
+// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
+// Copyright (c) 2002 Lars Gullik Bjønnes <larsbj@lyx.org>
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+
+#include <bits/atomicity.h>
+
+namespace boost
+{
+
+namespace detail
+{
+
+class atomic_count
+{
+public:
+
+ explicit atomic_count(long v) : value_(v) {}
+
+ void operator++()
+ {
+ __atomic_add(&value_, 1);
+ }
+
+ long operator--()
+ {
+ return !__exchange_and_add(&value_, -1);
+ }
+
+ operator long() const
+ {
+ return __exchange_and_add(&value_, 0);
+ }
+
+private:
+
+ atomic_count(atomic_count const &);
+ atomic_count & operator=(atomic_count const &);
+
+ _Atomic_word value_;
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED
--- /dev/null
+#ifndef BOOST_DETAIL_ATOMIC_COUNT_LINUX_HPP_INCLUDED
+#define BOOST_DETAIL_ATOMIC_COUNT_LINUX_HPP_INCLUDED
+
+//
+// boost/detail/atomic_count_linux.hpp
+//
+// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+
+//
+// This implementation uses <asm/atomic.h>. This is a kernel header;
+// using kernel headers in a user program may cause a number of problems,
+// and not all flavors of Linux provide the atomic instructions.
+//
+// This file is only provided because the performance of this implementation
+// is significantly higher than the pthreads version. Use at your own risk
+// (by defining BOOST_USE_ASM_ATOMIC_H.)
+//
+
+#include <asm/atomic.h>
+
+namespace boost
+{
+
+namespace detail
+{
+
+class atomic_count
+{
+public:
+
+ explicit atomic_count(long v)
+ {
+ atomic_t init = ATOMIC_INIT(v);
+ value_ = init;
+ }
+
+ void operator++()
+ {
+ atomic_inc(&value_);
+ }
+
+ long operator--()
+ {
+ return !atomic_dec_and_test(&value_);
+ }
+
+ operator long() const
+ {
+ return atomic_read(&value_);
+ }
+
+private:
+
+ atomic_count(atomic_count const &);
+ atomic_count & operator=(atomic_count const &);
+
+ atomic_t value_;
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_DETAIL_ATOMIC_COUNT_LINUX_HPP_INCLUDED
--- /dev/null
+#ifndef BOOST_DETAIL_ATOMIC_COUNT_PTHREADS_HPP_INCLUDED
+#define BOOST_DETAIL_ATOMIC_COUNT_PTHREADS_HPP_INCLUDED
+
+//
+// boost/detail/atomic_count_pthreads.hpp
+//
+// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+
+#include <pthread.h>
+
+//
+// The generic pthread_mutex-based implementation sometimes leads to
+// inefficiencies. Example: a class with two atomic_count members
+// can get away with a single mutex.
+//
+// Users can detect this situation by checking BOOST_AC_USE_PTHREADS.
+//
+
+namespace boost
+{
+
+namespace detail
+{
+
+class atomic_count
+{
+private:
+
+ class scoped_lock
+ {
+ public:
+
+ scoped_lock(pthread_mutex_t & m): m_(m)
+ {
+ pthread_mutex_lock(&m_);
+ }
+
+ ~scoped_lock()
+ {
+ pthread_mutex_unlock(&m_);
+ }
+
+ private:
+
+ pthread_mutex_t & m_;
+ };
+
+public:
+
+ explicit atomic_count(long v): value_(v)
+ {
+ pthread_mutex_init(&mutex_, 0);
+ }
+
+ ~atomic_count()
+ {
+ pthread_mutex_destroy(&mutex_);
+ }
+
+ void operator++()
+ {
+ scoped_lock lock(mutex_);
+ ++value_;
+ }
+
+ long operator--()
+ {
+ scoped_lock lock(mutex_);
+ return --value_;
+ }
+
+ operator long() const
+ {
+ scoped_lock lock(mutex_);
+ return value_;
+ }
+
+private:
+
+ atomic_count(atomic_count const &);
+ atomic_count & operator=(atomic_count const &);
+
+ mutable pthread_mutex_t mutex_;
+ long value_;
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_DETAIL_ATOMIC_COUNT_PTHREADS_HPP_INCLUDED
--- /dev/null
+#ifndef BOOST_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED
+#define BOOST_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED
+
+#if _MSC_VER >= 1020
+#pragma once
+#endif
+
+//
+// boost/detail/atomic_count_win32.hpp
+//
+// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+
+#include <boost_local/detail/winapi.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+class atomic_count
+{
+public:
+
+ explicit atomic_count(long v): value_(v)
+ {
+ }
+
+ long operator++()
+ {
+ return winapi::InterlockedIncrement(&value_);
+ }
+
+ long operator--()
+ {
+ return winapi::InterlockedDecrement(&value_);
+ }
+
+ operator long() const
+ {
+ return value_;
+ }
+
+private:
+
+ atomic_count(atomic_count const &);
+ atomic_count & operator=(atomic_count const &);
+
+ volatile long value_;
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED
--- /dev/null
+#ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
+#define BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
+
+#if _MSC_VER >= 1020
+#pragma once
+#endif
+
+//
+// boost/detail/lightweight_mutex.hpp - lightweight mutex
+//
+// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+// typedef <unspecified> boost::detail::lightweight_mutex;
+//
+// boost::detail::lightweight_mutex meets a subset of the Mutex concept
+// requirements: http://www.boost.org/libs/thread/doc/mutex_concept.html#Mutex
+//
+// * Used by the smart pointer library
+// * Performance oriented
+// * Header-only implementation
+// * Small memory footprint
+// * Not a general purpose mutex, use boost::mutex, CRITICAL_SECTION or
+// pthread_mutex instead.
+// * Never spin in a tight lock/do-something/unlock loop, since
+// lightweight_mutex does not guarantee fairness.
+// * Never keep a lightweight_mutex locked for long periods.
+//
+// The current implementation can use a pthread_mutex, a CRITICAL_SECTION,
+// or a platform-specific spinlock.
+//
+// You can force a particular implementation by defining BOOST_LWM_USE_PTHREADS,
+// BOOST_LWM_USE_CRITICAL_SECTION, or BOOST_LWM_USE_SPINLOCK.
+//
+// If neither macro has been defined, the default is to use a spinlock on Win32,
+// and a pthread_mutex otherwise.
+//
+// Note that a spinlock is not a general synchronization primitive. In particular,
+// it is not guaranteed to be a memory barrier, and it is possible to "livelock"
+// if a lower-priority thread has acquired the spinlock but a higher-priority
+// thread is spinning trying to acquire the same lock.
+//
+// For these reasons, spinlocks have been disabled by default except on Windows,
+// where a spinlock can be several orders of magnitude faster than a CRITICAL_SECTION.
+
+
+// Note: lwm_linux.hpp has been disabled by default; see the comments
+// inside for more info.
+
+
+#include <boost_local/config.hpp>
+
+// Note to implementors: if you write a platform-specific spinlock
+// for a platform that supports pthreads, be sure to test its performance
+// against the pthreads-based version using shared_ptr_timing_test.cpp and
+// shared_ptr_mt_test.cpp. Custom versions are usually not worth the trouble
+// _unless_ the performance gains are substantial.
+//
+// Be sure to compare against a "real" pthreads library;
+// shared_ptr_timing_test.cpp will compile succesfully with a stub do-nothing
+// pthreads library, since it doesn't create any threads.
+
+#ifndef BOOST_HAS_THREADS
+# include <boost_local/detail/lwm_nop.hpp>
+#elif defined(BOOST_LWM_USE_SPINLOCK) && defined(BOOST_USE_ASM_ATOMIC_H)
+# include <boost_local/detail/lwm_linux.hpp>
+#elif defined(BOOST_LWM_USE_CRITICAL_SECTION)
+# include <boost_local/detail/lwm_win32_cs.hpp>
+#elif defined(BOOST_LWM_USE_PTHREADS)
+# include <boost_local/detail/lwm_pthreads.hpp>
+#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
+# include <boost_local/detail/lwm_win32.hpp>
+#elif defined(BOOST_LWM_USE_SPINLOCK) && defined(__sgi)
+# include <boost_local/detail/lwm_irix.hpp>
+#elif defined(BOOST_LWM_USE_SPINLOCK) && defined(__GLIBCPP__)
+# include <boost_local/detail/lwm_gcc.hpp>
+#elif defined(BOOST_HAS_PTHREADS)
+# define BOOST_LWM_USE_PTHREADS
+# include <boost_local/detail/lwm_pthreads.hpp>
+#else
+# include <boost_local/detail/lwm_nop.hpp>
+#endif
+
+#endif // #ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
--- /dev/null
+#ifndef BOOST_DETAIL_LWM_GCC_HPP_INCLUDED
+#define BOOST_DETAIL_LWM_GCC_HPP_INCLUDED
+
+//
+// boost/detail/lwm_gcc.hpp
+//
+// lightweight_mutex for GNU libstdc++ v3
+//
+// http://gcc.gnu.org/onlinedocs/porting/Thread-safety.html
+//
+// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+// Copyright (c) 2002 Lars Gullik Bjønnes <larsbj@lyx.org>
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+
+#include <bits/atomicity.h>
+#include <sched.h>
+
+namespace boost
+{
+
+namespace detail
+{
+
+class lightweight_mutex
+{
+private:
+
+ _Atomic_word a_;
+
+ lightweight_mutex(lightweight_mutex const &);
+ lightweight_mutex & operator=(lightweight_mutex const &);
+
+public:
+
+ lightweight_mutex(): a_(1)
+ {
+ }
+
+ class scoped_lock;
+ friend class scoped_lock;
+
+ class scoped_lock
+ {
+ private:
+
+ lightweight_mutex & m_;
+
+ scoped_lock(scoped_lock const &);
+ scoped_lock & operator=(scoped_lock const &);
+
+ public:
+
+ explicit scoped_lock(lightweight_mutex & m): m_(m)
+ {
+ while( !__exchange_and_add(&m_.a_, -1) )
+ {
+ __atomic_add(&m_.a_, 1);
+ sched_yield();
+ }
+ }
+
+ ~scoped_lock()
+ {
+ __atomic_add(&m_.a_, 1);
+ }
+ };
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_DETAIL_LWM_GCC_HPP_INCLUDED
--- /dev/null
+#ifndef BOOST_DETAIL_LWM_IRIX_HPP_INCLUDED
+#define BOOST_DETAIL_LWM_IRIX_HPP_INCLUDED
+
+#if _MSC_VER >= 1020
+#pragma once
+#endif
+
+//
+// boost/detail/lwm_irix.hpp
+//
+// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+// Copyright (c) 2002 Dan Gohman
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+
+#include <sgidefs.h>
+#include <mutex.h>
+#include <sched.h>
+
+namespace boost
+{
+
+namespace detail
+{
+
+class lightweight_mutex
+{
+private:
+
+ __uint32_t l_;
+
+ lightweight_mutex(lightweight_mutex const &);
+ lightweight_mutex & operator=(lightweight_mutex const &);
+
+public:
+
+ lightweight_mutex(): l_(0)
+ {
+ }
+
+ class scoped_lock;
+ friend class scoped_lock;
+
+ class scoped_lock
+ {
+ private:
+
+ lightweight_mutex & m_;
+
+ scoped_lock(scoped_lock const &);
+ scoped_lock & operator=(scoped_lock const &);
+
+ public:
+
+ explicit scoped_lock(lightweight_mutex & m): m_(m)
+ {
+ while( test_and_set32(&m_.l_, 1) )
+ {
+ sched_yield();
+ }
+ }
+
+ ~scoped_lock()
+ {
+ m_.l_ = 0;
+ }
+ };
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_DETAIL_LWM_IRIX_HPP_INCLUDED
--- /dev/null
+#ifndef BOOST_DETAIL_LWM_LINUX_HPP_INCLUDED
+#define BOOST_DETAIL_LWM_LINUX_HPP_INCLUDED
+
+#if _MSC_VER >= 1020
+#pragma once
+#endif
+
+//
+// boost/detail/lwm_linux.hpp
+//
+// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+
+//
+// This implementation uses <asm/atomic.h>. This is a kernel header;
+// using kernel headers in a user program may cause a number of problems,
+// and not all flavors of Linux provide the atomic instructions.
+//
+// This file is only provided because the performance of this implementation
+// is about 3.5 times higher than the pthreads version. Use at your own risk
+// (by defining BOOST_USE_ASM_ATOMIC_H.)
+//
+
+#include <asm/atomic.h>
+#include <sched.h>
+
+namespace boost
+{
+
+namespace detail
+{
+
+class lightweight_mutex
+{
+private:
+
+ atomic_t a_;
+
+ lightweight_mutex(lightweight_mutex const &);
+ lightweight_mutex & operator=(lightweight_mutex const &);
+
+public:
+
+ lightweight_mutex()
+ {
+ atomic_t a = ATOMIC_INIT(1);
+ a_ = a;
+ }
+
+ class scoped_lock;
+ friend class scoped_lock;
+
+ class scoped_lock
+ {
+ private:
+
+ lightweight_mutex & m_;
+
+ scoped_lock(scoped_lock const &);
+ scoped_lock & operator=(scoped_lock const &);
+
+ public:
+
+ explicit scoped_lock(lightweight_mutex & m): m_(m)
+ {
+ while( !atomic_dec_and_test(&m_.a_) )
+ {
+ atomic_inc(&m_.a_);
+ sched_yield();
+ }
+ }
+
+ ~scoped_lock()
+ {
+ atomic_inc(&m_.a_);
+ }
+ };
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_DETAIL_LWM_LINUX_HPP_INCLUDED
--- /dev/null
+#ifndef BOOST_DETAIL_LWM_NOP_HPP_INCLUDED
+#define BOOST_DETAIL_LWM_NOP_HPP_INCLUDED
+
+#if _MSC_VER >= 1020
+#pragma once
+#endif
+
+//
+// boost/detail/lwm_nop.hpp
+//
+// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+
+namespace boost
+{
+
+namespace detail
+{
+
+class lightweight_mutex
+{
+public:
+
+ typedef lightweight_mutex scoped_lock;
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_DETAIL_LWM_NOP_HPP_INCLUDED
--- /dev/null
+#ifndef BOOST_DETAIL_LWM_PTHREADS_HPP_INCLUDED
+#define BOOST_DETAIL_LWM_PTHREADS_HPP_INCLUDED
+
+#if _MSC_VER >= 1020
+#pragma once
+#endif
+
+//
+// boost/detail/lwm_pthreads.hpp
+//
+// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+
+#include <pthread.h>
+
+namespace boost
+{
+
+namespace detail
+{
+
+class lightweight_mutex
+{
+private:
+
+ pthread_mutex_t m_;
+
+ lightweight_mutex(lightweight_mutex const &);
+ lightweight_mutex & operator=(lightweight_mutex const &);
+
+public:
+
+ lightweight_mutex()
+ {
+
+// HPUX 10.20 / DCE has a nonstandard pthread_mutex_init
+
+#if defined(__hpux) && defined(_DECTHREADS_)
+ pthread_mutex_init(&m_, pthread_mutexattr_default);
+#else
+ pthread_mutex_init(&m_, 0);
+#endif
+ }
+
+ ~lightweight_mutex()
+ {
+ pthread_mutex_destroy(&m_);
+ }
+
+ class scoped_lock;
+ friend class scoped_lock;
+
+ class scoped_lock
+ {
+ private:
+
+ pthread_mutex_t & m_;
+
+ scoped_lock(scoped_lock const &);
+ scoped_lock & operator=(scoped_lock const &);
+
+ public:
+
+ scoped_lock(lightweight_mutex & m): m_(m.m_)
+ {
+ pthread_mutex_lock(&m_);
+ }
+
+ ~scoped_lock()
+ {
+ pthread_mutex_unlock(&m_);
+ }
+ };
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_DETAIL_LWM_PTHREADS_HPP_INCLUDED
--- /dev/null
+#ifndef BOOST_DETAIL_LWM_WIN32_HPP_INCLUDED
+#define BOOST_DETAIL_LWM_WIN32_HPP_INCLUDED
+
+#if _MSC_VER >= 1020
+#pragma once
+#endif
+
+//
+// boost/detail/lwm_win32.hpp
+//
+// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+
+#include <boost_local/detail/winapi.hpp>
+
+#ifdef __BORLANDC__
+# pragma warn -8027 // Functions containing while are not expanded inline
+#endif
+
+namespace boost
+{
+
+namespace detail
+{
+
+class lightweight_mutex
+{
+private:
+
+ long l_;
+
+ lightweight_mutex(lightweight_mutex const &);
+ lightweight_mutex & operator=(lightweight_mutex const &);
+
+public:
+
+ lightweight_mutex(): l_(0)
+ {
+ }
+
+ class scoped_lock;
+ friend class scoped_lock;
+
+ class scoped_lock
+ {
+ private:
+
+ lightweight_mutex & m_;
+
+ scoped_lock(scoped_lock const &);
+ scoped_lock & operator=(scoped_lock const &);
+
+ public:
+
+ explicit scoped_lock(lightweight_mutex & m): m_(m)
+ {
+ while( winapi::InterlockedExchange(&m_.l_, 1) )
+ {
+ // Note: changed to Sleep(1) from Sleep(0).
+ // According to MSDN, Sleep(0) will never yield
+ // to a lower-priority thread, whereas Sleep(1)
+ // will. Performance seems not to be affected.
+
+ winapi::Sleep(1);
+ }
+ }
+
+ ~scoped_lock()
+ {
+ winapi::InterlockedExchange(&m_.l_, 0);
+
+ // Note: adding a yield here will make
+ // the spinlock more fair and will increase the overall
+ // performance of some applications substantially in
+ // high contention situations, but will penalize the
+ // low contention / single thread case up to 5x
+ }
+ };
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#ifdef __BORLANDC__
+# pragma warn .8027 // Functions containing while are not expanded inline
+#endif
+
+#endif // #ifndef BOOST_DETAIL_LWM_WIN32_HPP_INCLUDED
--- /dev/null
+#ifndef BOOST_DETAIL_LWM_WIN32_CS_HPP_INCLUDED
+#define BOOST_DETAIL_LWM_WIN32_CS_HPP_INCLUDED
+
+#if _MSC_VER >= 1020
+#pragma once
+#endif
+
+//
+// boost/detail/lwm_win32_cs.hpp
+//
+// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+
+#include <boost_local/detail/winapi.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+class lightweight_mutex
+{
+private:
+
+ winapi::critical_section cs_;
+
+ lightweight_mutex(lightweight_mutex const &);
+ lightweight_mutex & operator=(lightweight_mutex const &);
+
+public:
+
+ lightweight_mutex()
+ {
+ winapi::InitializeCriticalSection(&cs_);
+ }
+
+ ~lightweight_mutex()
+ {
+ winapi::DeleteCriticalSection(&cs_);
+ }
+
+ class scoped_lock;
+ friend class scoped_lock;
+
+ class scoped_lock
+ {
+ private:
+
+ lightweight_mutex & m_;
+
+ scoped_lock(scoped_lock const &);
+ scoped_lock & operator=(scoped_lock const &);
+
+ public:
+
+ explicit scoped_lock(lightweight_mutex & m): m_(m)
+ {
+ winapi::EnterCriticalSection(&m_.cs_);
+ }
+
+ ~scoped_lock()
+ {
+ winapi::LeaveCriticalSection(&m_.cs_);
+ }
+ };
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_DETAIL_LWM_WIN32_CS_HPP_INCLUDED
--- /dev/null
+#ifndef BOOST_DETAIL_SHARED_COUNT_HPP_INCLUDED
+#define BOOST_DETAIL_SHARED_COUNT_HPP_INCLUDED
+
+#if _MSC_VER >= 1020
+#pragma once
+#endif
+
+//
+// detail/shared_count.hpp
+//
+// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+
+#include <boost_local/config.hpp>
+
+#ifndef BOOST_NO_AUTO_PTR
+# include <memory>
+#endif
+
+#include <boost_local/checked_delete.hpp>
+#include <boost_local/throw_exception.hpp>
+#include <boost_local/detail/lightweight_mutex.hpp>
+
+#include <functional> // for std::less
+#include <exception> // for std::exception
+#include <new> // for std::bad_alloc
+
+#ifdef __BORLANDC__
+# pragma warn -8026 // Functions with excep. spec. are not expanded inline
+# pragma warn -8027 // Functions containing try are not expanded inline
+#endif
+
+namespace boost
+{
+
+// The standard library that comes with Borland C++ 5.5.1
+// defines std::exception and its members as having C calling
+// convention (-pc). When the definition of use_count_is_zero
+// is compiled with -ps, the compiler issues an error.
+// Hence, the temporary #pragma option -pc below. The version
+// check is deliberately conservative.
+
+#if defined(__BORLANDC__) && __BORLANDC__ == 0x551
+# pragma option push -pc
+#endif
+
+class use_count_is_zero: public std::exception
+{
+public:
+
+ virtual char const * what() const throw()
+ {
+ return "boost::use_count_is_zero";
+ }
+};
+
+#if defined(__BORLANDC__) && __BORLANDC__ == 0x551
+# pragma option pop
+#endif
+
+class counted_base
+{
+private:
+
+ typedef detail::lightweight_mutex mutex_type;
+
+public:
+
+ counted_base():
+ use_count_(0), weak_count_(0)
+ {
+ }
+
+ // pre: initial_use_count <= initial_weak_count
+
+ explicit counted_base(long initial_use_count, long initial_weak_count):
+ use_count_(initial_use_count), weak_count_(initial_weak_count)
+ {
+ }
+
+ virtual ~counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+ //
+ // counted_base doesn't manage any resources except itself, and
+ // the default implementation is a no-op.
+ //
+ // dispose() is not pure virtual since weak_ptr instantiates a
+ // counted_base in its default constructor.
+
+ virtual void dispose() // nothrow
+ {
+ }
+
+ // destruct() is called when weak_count_ drops to zero.
+
+ virtual void destruct() // nothrow
+ {
+ delete this;
+ }
+
+ void add_ref()
+ {
+#ifdef BOOST_HAS_THREADS
+ mutex_type::scoped_lock lock(mtx_);
+#endif
+ if(use_count_ == 0 && weak_count_ != 0) boost::throw_exception(boost::use_count_is_zero());
+ ++use_count_;
+ ++weak_count_;
+ }
+
+ void release() // nothrow
+ {
+ long new_use_count;
+ long new_weak_count;
+
+ {
+#ifdef BOOST_HAS_THREADS
+ mutex_type::scoped_lock lock(mtx_);
+#endif
+ new_use_count = --use_count_;
+ new_weak_count = --weak_count_;
+ }
+
+ if(new_use_count == 0)
+ {
+ dispose();
+ }
+
+ if(new_weak_count == 0)
+ {
+ destruct();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+#ifdef BOOST_HAS_THREADS
+ mutex_type::scoped_lock lock(mtx_);
+#endif
+ ++weak_count_;
+ }
+
+ void weak_release() // nothrow
+ {
+ long new_weak_count;
+
+ {
+#ifdef BOOST_HAS_THREADS
+ mutex_type::scoped_lock lock(mtx_);
+#endif
+ new_weak_count = --weak_count_;
+ }
+
+ if(new_weak_count == 0)
+ {
+ destruct();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+#ifdef BOOST_HAS_THREADS
+ mutex_type::scoped_lock lock(mtx_);
+#endif
+ return use_count_;
+ }
+
+private:
+
+ counted_base(counted_base const &);
+ counted_base & operator= (counted_base const &);
+
+ // inv: use_count_ <= weak_count_
+
+ long use_count_;
+ long weak_count_;
+
+#ifdef BOOST_HAS_THREADS
+ mutable mutex_type mtx_;
+#endif
+};
+
+inline void intrusive_ptr_add_ref(counted_base * p)
+{
+ p->add_ref();
+}
+
+inline void intrusive_ptr_release(counted_base * p)
+{
+ p->release();
+}
+
+namespace detail
+{
+
+//
+// Borland's Codeguard trips up over the -Vx- option here:
+//
+#ifdef __CODEGUARD__
+#pragma option push -Vx-
+#endif
+
+template<class P, class D> class counted_base_impl: public counted_base
+{
+private:
+
+ P ptr; // copy constructor must not throw
+ D del; // copy constructor must not throw
+
+ counted_base_impl(counted_base_impl const &);
+ counted_base_impl & operator= (counted_base_impl const &);
+
+public:
+
+ // pre: initial_use_count <= initial_weak_count, d(p) must not throw
+
+ counted_base_impl(P p, D d, long initial_use_count, long initial_weak_count):
+ counted_base(initial_use_count, initial_weak_count), ptr(p), del(d)
+ {
+ }
+
+ virtual void dispose() // nothrow
+ {
+ del(ptr);
+ }
+};
+
+class weak_count;
+
+class shared_count
+{
+private:
+
+ counted_base * pi_;
+
+ friend class weak_count;
+
+ template<class P, class D> shared_count(P, D, counted_base const *);
+
+public:
+
+ shared_count(): pi_(new counted_base(1, 1))
+ {
+ }
+
+ explicit shared_count(counted_base * pi): pi_(pi) // never throws
+ {
+ pi_->add_ref();
+ }
+
+ template<class P, class D> shared_count(P p, D d, void const * = 0): pi_(0)
+ {
+#ifndef BOOST_NO_EXCEPTIONS
+
+ try
+ {
+ pi_ = new counted_base_impl<P, D>(p, d, 1, 1);
+ }
+ catch(...)
+ {
+ d(p); // delete p
+ throw;
+ }
+
+#else
+
+ pi_ = new counted_base_impl<P, D>(p, d, 1, 1);
+
+ if(pi_ == 0)
+ {
+ d(p); // delete p
+ boost::throw_exception(std::bad_alloc());
+ }
+
+#endif
+ }
+
+ template<class P, class D> shared_count(P, D, counted_base * pi): pi_(pi)
+ {
+ pi_->add_ref();
+ }
+
+#ifndef BOOST_NO_AUTO_PTR
+
+ // auto_ptr<Y> is special cased to provide the strong guarantee
+
+ template<typename Y>
+ explicit shared_count(std::auto_ptr<Y> & r): pi_(new counted_base_impl< Y *, checked_deleter<Y> >(r.get(), checked_deleter<Y>(), 1, 1))
+ {
+ r.release();
+ }
+
+#endif
+
+ ~shared_count() // nothrow
+ {
+ pi_->release();
+ }
+
+ shared_count(shared_count const & r): pi_(r.pi_) // nothrow
+ {
+ pi_->add_ref();
+ }
+
+ explicit shared_count(weak_count const & r); // throws use_count_is_zero when r.use_count() == 0
+
+ shared_count & operator= (shared_count const & r) // nothrow
+ {
+ counted_base * tmp = r.pi_;
+ tmp->add_ref();
+ pi_->release();
+ pi_ = tmp;
+
+ return *this;
+ }
+
+ void swap(shared_count & r) // nothrow
+ {
+ counted_base * tmp = r.pi_;
+ r.pi_ = pi_;
+ pi_ = tmp;
+ }
+
+ long use_count() const // nothrow
+ {
+ return pi_->use_count();
+ }
+
+ bool unique() const // nothrow
+ {
+ return pi_->use_count() == 1;
+ }
+
+ friend inline bool operator==(shared_count const & a, shared_count const & b)
+ {
+ return a.pi_ == b.pi_;
+ }
+
+ friend inline bool operator<(shared_count const & a, shared_count const & b)
+ {
+ return std::less<counted_base *>()(a.pi_, b.pi_);
+ }
+};
+
+#ifdef __CODEGUARD__
+#pragma option pop
+#endif
+
+
+class weak_count
+{
+private:
+
+ counted_base * pi_;
+
+ friend class shared_count;
+
+public:
+
+ weak_count(): pi_(new counted_base(0, 1)) // can throw
+ {
+ }
+
+ weak_count(shared_count const & r): pi_(r.pi_) // nothrow
+ {
+ pi_->weak_add_ref();
+ }
+
+ weak_count(weak_count const & r): pi_(r.pi_) // nothrow
+ {
+ pi_->weak_add_ref();
+ }
+
+ ~weak_count() // nothrow
+ {
+ pi_->weak_release();
+ }
+
+ weak_count & operator= (shared_count const & r) // nothrow
+ {
+ counted_base * tmp = r.pi_;
+ tmp->weak_add_ref();
+ pi_->weak_release();
+ pi_ = tmp;
+
+ return *this;
+ }
+
+ weak_count & operator= (weak_count const & r) // nothrow
+ {
+ counted_base * tmp = r.pi_;
+ tmp->weak_add_ref();
+ pi_->weak_release();
+ pi_ = tmp;
+
+ return *this;
+ }
+
+ void swap(weak_count & r) // nothrow
+ {
+ counted_base * tmp = r.pi_;
+ r.pi_ = pi_;
+ pi_ = tmp;
+ }
+
+ long use_count() const // nothrow
+ {
+ return pi_->use_count();
+ }
+
+ friend inline bool operator==(weak_count const & a, weak_count const & b)
+ {
+ return a.pi_ == b.pi_;
+ }
+
+ friend inline bool operator<(weak_count const & a, weak_count const & b)
+ {
+ return std::less<counted_base *>()(a.pi_, b.pi_);
+ }
+};
+
+inline shared_count::shared_count(weak_count const & r): pi_(r.pi_)
+{
+ pi_->add_ref();
+}
+
+} // namespace detail
+
+} // namespace boost
+
+#ifdef __BORLANDC__
+# pragma warn .8027 // Functions containing try are not expanded inline
+# pragma warn .8026 // Functions with excep. spec. are not expanded inline
+#endif
+
+#endif // #ifndef BOOST_DETAIL_SHARED_COUNT_HPP_INCLUDED
--- /dev/null
+#ifndef BOOST_DETAIL_SHARED_PTR_NMT_HPP_INCLUDED
+#define BOOST_DETAIL_SHARED_PTR_NMT_HPP_INCLUDED
+
+//
+// detail/shared_ptr_nmt.hpp - shared_ptr.hpp without member templates
+//
+// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
+// Copyright (c) 2001, 2002 Peter Dimov
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation.
+//
+
+#include <boost_local/assert.hpp>
+#include <boost_local/checked_delete.hpp>
+#include <boost_local/throw_exception.hpp>
+#include <boost_local/detail/atomic_count.hpp>
+
+#ifndef BOOST_NO_AUTO_PTR
+# include <memory> // for std::auto_ptr
+#endif
+
+#include <algorithm> // for std::swap
+#include <functional> // for std::less
+#include <new> // for std::bad_alloc
+
+namespace boost
+{
+
+template<class T> class shared_ptr
+{
+private:
+
+ typedef detail::atomic_count count_type;
+
+public:
+
+ typedef T element_type;
+ typedef T value_type;
+
+ explicit shared_ptr(T * p = 0): px(p)
+ {
+#ifndef BOOST_NO_EXCEPTIONS
+
+ try // prevent leak if new throws
+ {
+ pn = new count_type(1);
+ }
+ catch(...)
+ {
+ boost::checked_delete(p);
+ throw;
+ }
+
+#else
+
+ pn = new count_type(1);
+
+ if(pn == 0)
+ {
+ boost::checked_delete(p);
+ boost::throw_exception(std::bad_alloc());
+ }
+
+#endif
+ }
+
+ ~shared_ptr()
+ {
+ if(--*pn == 0)
+ {
+ boost::checked_delete(px);
+ delete pn;
+ }
+ }
+
+ shared_ptr(shared_ptr const & r): px(r.px) // never throws
+ {
+ pn = r.pn;
+ ++*pn;
+ }
+
+ shared_ptr & operator=(shared_ptr const & r)
+ {
+ shared_ptr(r).swap(*this);
+ return *this;
+ }
+
+#ifndef BOOST_NO_AUTO_PTR
+
+ explicit shared_ptr(std::auto_ptr<T> & r)
+ {
+ pn = new count_type(1); // may throw
+ px = r.release(); // fix: moved here to stop leak if new throws
+ }
+
+ shared_ptr & operator=(std::auto_ptr<T> & r)
+ {
+ shared_ptr(r).swap(*this);
+ return *this;
+ }
+
+#endif
+
+ void reset(T * p = 0)
+ {
+ BOOST_ASSERT(p == 0 || p != px);
+ shared_ptr(p).swap(*this);
+ }
+
+ T & operator*() const // never throws
+ {
+ BOOST_ASSERT(px != 0);
+ return *px;
+ }
+
+ T * operator->() const // never throws
+ {
+ BOOST_ASSERT(px != 0);
+ return px;
+ }
+
+ T * get() const // never throws
+ {
+ return px;
+ }
+
+ long use_count() const // never throws
+ {
+ return *pn;
+ }
+
+ bool unique() const // never throws
+ {
+ return *pn == 1;
+ }
+
+ void swap(shared_ptr<T> & other) // never throws
+ {
+ std::swap(px, other.px);
+ std::swap(pn, other.pn);
+ }
+
+private:
+
+ T * px; // contained pointer
+ count_type * pn; // ptr to reference counter
+};
+
+template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b)
+{
+ return a.get() == b.get();
+}
+
+template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b)
+{
+ return a.get() != b.get();
+}
+
+template<class T> inline bool operator<(shared_ptr<T> const & a, shared_ptr<T> const & b)
+{
+ return std::less<T*>()(a.get(), b.get());
+}
+
+template<class T> void swap(shared_ptr<T> & a, shared_ptr<T> & b)
+{
+ a.swap(b);
+}
+
+// get_pointer() enables boost::mem_fn to recognize shared_ptr
+
+template<class T> inline T * get_pointer(shared_ptr<T> const & p)
+{
+ return p.get();
+}
+
+} // namespace boost
+
+#endif // #ifndef BOOST_DETAIL_SHARED_PTR_NMT_HPP_INCLUDED
--- /dev/null
+#ifndef BOOST_DETAIL_WINAPI_HPP_INCLUDED
+#define BOOST_DETAIL_WINAPI_HPP_INCLUDED
+
+#if _MSC_VER >= 1020
+#pragma once
+#endif
+
+//
+// boost/detail/winapi.hpp - a lightweight version of <windows.h>
+//
+// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+
+namespace boost
+{
+
+namespace detail
+{
+
+namespace winapi
+{
+
+typedef long long_type;
+typedef unsigned long dword_type;
+typedef void * handle_type;
+
+#if defined(_WIN64)
+
+typedef __int64 int_ptr_type;
+typedef unsigned __int64 uint_ptr_type;
+typedef __int64 long_ptr_type;
+typedef unsigned __int64 ulong_ptr_type;
+
+#else
+
+typedef int int_ptr_type;
+typedef unsigned int uint_ptr_type;
+typedef long long_ptr_type;
+typedef unsigned long ulong_ptr_type;
+
+#endif
+
+struct critical_section
+{
+ struct critical_section_debug * DebugInfo;
+ long_type LockCount;
+ long_type RecursionCount;
+ handle_type OwningThread;
+ handle_type LockSemaphore;
+ ulong_ptr_type SpinCount;
+};
+
+#if defined(_WIN64)
+
+// Intel 6.0 on Win64 version, posted by Tim Fenders to [boost-users]
+
+extern "C" long_type __cdecl _InterlockedIncrement(long_type volatile *);
+extern "C" long_type __cdecl _InterlockedDecrement(long_type volatile *);
+extern "C" long_type __cdecl _InterlockedExchange(long_type volatile *, long_type);
+
+#pragma intrinsic(_InterlockedIncrement)
+#pragma intrinsic(_InterlockedDecrement)
+#pragma intrinsic(_InterlockedExchange)
+
+inline long_type InterlockedIncrement(long_type volatile * lp)
+{
+ return _InterlockedIncrement(lp);
+}
+
+inline long_type InterlockedDecrement(long_type volatile* lp)
+{
+ return _InterlockedDecrement(lp);
+}
+
+inline long_type InterlockedExchange(long_type volatile* lp, long_type l)
+{
+ return _InterlockedExchange(lp, l);
+}
+
+#else
+
+extern "C" __declspec(dllimport) long_type __stdcall InterlockedIncrement(long_type volatile *);
+extern "C" __declspec(dllimport) long_type __stdcall InterlockedDecrement(long_type volatile *);
+extern "C" __declspec(dllimport) long_type __stdcall InterlockedExchange(long_type volatile *, long_type);
+
+#endif
+
+extern "C" __declspec(dllimport) void __stdcall Sleep(dword_type);
+
+extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(critical_section *);
+extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(critical_section *);
+extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(critical_section *);
+extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(critical_section *);
+
+} // namespace winapi
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_DETAIL_WINAPI_HPP_INCLUDED
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost mpl/bool_c.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2000-02
+// Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_BOOL_C_HPP_INCLUDED
+#define BOOST_MPL_BOOL_C_HPP_INCLUDED
+
+#include <boost_local/config.hpp>
+
+namespace boost {
+namespace mpl {
+
+template< bool C > struct bool_c
+{
+ BOOST_STATIC_CONSTANT(bool, value = C);
+ typedef bool_c type;
+ typedef bool value_type;
+ operator bool() const { return this->value; }
+};
+
+// shorcuts
+typedef bool_c<true> true_c;
+typedef bool_c<false> false_c;
+
+} // namespace mpl
+} // namespace boost
+
+#endif // BOOST_MPL_BOOL_C_HPP_INCLUDED
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost/mpl/if.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2000-02 Boost.org
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_IF_HPP_INCLUDED
+#define BOOST_MPL_IF_HPP_INCLUDED
+
+#include <boost_local/mpl/aux_/value_wknd.hpp>
+#include <boost_local/mpl/aux_/void_spec.hpp>
+#include <boost_local/mpl/aux_/lambda_support.hpp>
+#include <boost_local/config.hpp>
+
+namespace boost {
+namespace mpl {
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template<
+ bool C
+ , typename T1
+ , typename T2
+ >
+struct if_c
+{
+ typedef T1 type;
+};
+
+template<
+ typename T1
+ , typename T2
+ >
+struct if_c<false,T1,T2>
+{
+ typedef T2 type;
+};
+
+template<
+ typename BOOST_MPL_AUX_VOID_SPEC_PARAM(C)
+ , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1)
+ , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2)
+ >
+struct if_
+{
+ typedef typename if_c<
+ BOOST_MPL_AUX_VALUE_WKND(C)::value
+ , T1
+ , T2
+ >::type type;
+
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C,T1,T2))
+};
+
+#elif defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
+
+// MSVC6.5-specific version
+
+template<
+ bool C
+ , typename T1
+ , typename T2
+ >
+struct if_c
+{
+ private:
+ template<bool> struct answer { typedef T1 type; };
+ template<> struct answer<false> { typedef T2 type; };
+
+ public:
+ typedef typename answer< C >::type type;
+};
+
+// (almost) copy & paste in order to save one more
+// recursively nested template instantiation to user
+template<
+ typename C
+ , typename T1
+ , typename T2
+ >
+struct if_
+{
+ private:
+ template<bool> struct answer { typedef T1 type; };
+ template<> struct answer<false> { typedef T2 type; };
+
+ // agurt, 17/sep/02: in some situations MSVC 7.0 doesn't
+ // handle 'answer<C::value>' expression very well
+ enum { c_ = C::value };
+
+ public:
+ typedef typename answer<c_>::type type;
+};
+
+#else
+
+// no partial class template specialization
+
+namespace aux {
+
+template< bool C >
+struct if_impl
+{
+ template< typename T1, typename T2 > struct result_
+ {
+ typedef T1 type;
+ };
+};
+
+template<>
+struct if_impl<false>
+{
+ template< typename T1, typename T2 > struct result_
+ {
+ typedef T2 type;
+ };
+};
+
+} // namespace aux
+
+template<
+ bool C
+ , typename T1
+ , typename T2
+ >
+struct if_c
+{
+ typedef typename aux::if_impl< C >
+ ::template result_<T1,T2>::type type;
+};
+
+// (almost) copy & paste in order to save one more
+// recursively nested template instantiation to user
+template<
+ typename BOOST_MPL_AUX_VOID_SPEC_PARAM(C)
+ , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1)
+ , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2)
+ >
+struct if_
+{
+ typedef typename aux::if_impl< C::value >
+ ::template result_<T1,T2>::type type;
+
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C,T1,T2))
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+BOOST_MPL_AUX_VOID_SPEC(3, if_)
+
+} // namespace mpl
+} // namespace boost
+
+#endif // BOOST_MPL_IF_HPP_INCLUDED
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost/mpl/intergal_c.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2000-02
+// Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
+#define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
+
+#include <boost_local/config.hpp>
+
+namespace boost {
+namespace mpl {
+
+template< typename T, T N >
+struct integral_c
+{
+ BOOST_STATIC_CONSTANT(T, value = N);
+ typedef integral_c type;
+ typedef T value_type;
+
+ // have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC),
+ // while some other don't like 'value + 1' (Borland), and some don't like
+ // either
+#if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 243
+ private:
+ BOOST_STATIC_CONSTANT(T, next_value = (N + 1));
+ BOOST_STATIC_CONSTANT(T, prior_value = (N - 1));
+ public:
+ typedef integral_c<T, next_value> next;
+ typedef integral_c<T, prior_value> prior;
+#elif defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
+ || defined(__IBMCPP__) && (__IBMCPP__ <= 502 || !defined(BOOST_STRICT_CONFIG))
+ typedef integral_c<T, (N + 1)> next;
+ typedef integral_c<T, (N - 1)> prior;
+#else
+ typedef integral_c<T, (value + 1)> next;
+ typedef integral_c<T, (value - 1)> prior;
+#endif
+
+ // enables uniform function call syntax for families of overloaded
+ // functions that return objects of both arithmetic ('int', 'long',
+ // 'double', etc.) and 'integral_c<..>' types (for an example, see
+ // "mpl/example/power.cpp")
+ operator T() const { return this->value; }
+};
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ && !defined(__BORLANDC__) || __BORLANDC__ > 0x551
+// 'bool' constant doesn't have 'next'/'prior' members
+template< bool C >
+struct integral_c<bool, C>
+{
+ BOOST_STATIC_CONSTANT(bool, value = C);
+ typedef integral_c type;
+ operator bool() const { return this->value; }
+};
+#endif
+
+} // namespace mpl
+} // namespace boost
+
+#endif // BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost mpl/labmda_fwd.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2001-02
+// Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED
+#define BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED
+
+#include <boost_local/mpl/aux_/lambda_arity_param.hpp>
+#include <boost_local/mpl/aux_/config/lambda.hpp>
+
+namespace boost {
+namespace mpl {
+
+#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)
+template< typename T BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(long Arity) >
+struct lambda;
+#else
+template< typename T, bool Protect > struct lambda;
+#endif
+
+} // namespace mpl
+} // namespace boost
+
+#endif // BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost mpl/size_t_c.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2000-02
+// Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_SIZE_T_C_HPP_INCLUDED
+#define BOOST_MPL_SIZE_T_C_HPP_INCLUDED
+
+#include <boost_local/mpl/integral_c.hpp>
+#include <boost_local/config.hpp>
+#include <cstddef> // for std::size_t
+
+namespace boost {
+namespace mpl {
+
+template< std::size_t N > struct size_t_c
+#if !defined(__BORLANDC__)
+ : integral_c< std::size_t,N >
+{
+ typedef size_t_c type;
+};
+#else
+{
+ BOOST_STATIC_CONSTANT(std::size_t, value = N);
+ typedef size_t_c type;
+ typedef std::size_t value_type;
+
+ typedef size_t_c<N + 1> next;
+ typedef size_t_c<N - 1> prior;
+
+ operator std::size_t() const { return this->value; }
+};
+#endif
+
+} // namespace mpl
+} // namespace boost
+
+#endif // BOOST_MPL_SIZE_T_C_HPP_INCLUDED
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost mpl/void.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2001-02
+// Peter Dimov, Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_VOID_HPP_INCLUDED
+#define BOOST_MPL_VOID_HPP_INCLUDED
+
+#include <boost_local/mpl/bool_c.hpp>
+#include <boost_local/config.hpp>
+
+namespace boost {
+namespace mpl {
+
+struct void_;
+
+template< typename T >
+struct is_void_
+ : false_c
+{
+#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
+ using false_c::value;
+#endif
+};
+
+template<>
+struct is_void_<void_>
+ : true_c
+{
+#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
+ using true_c::value;
+#endif
+};
+
+} // namespace mpl
+} // namespace boost
+
+#endif // BOOST_MPL_VOID_HPP_INCLUDED
--- /dev/null
+# /* Copyright (C) 2001
+# * Housemarque Oy
+# * http://www.housemarque.com
+# *
+# * Permission to copy, use, modify, sell and distribute this software is
+# * granted provided this copyright notice appears in all copies. This
+# * software is provided "as is" without express or implied warranty, and
+# * with no claim as to its suitability for any purpose.
+# */
+#
+# /* Revised by Paul Mensonides (2002) */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_CAT_HPP
+# define BOOST_PREPROCESSOR_CAT_HPP
+#
+# include <boost_local/preprocessor/config/config.hpp>
+#
+# /* BOOST_PP_CAT */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
+# define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b)
+# else
+# define BOOST_PP_CAT(a, b) BOOST_PP_CAT_OO((a, b))
+# define BOOST_PP_CAT_OO(par) BOOST_PP_CAT_I ## par
+# endif
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
+# define BOOST_PP_CAT_I(a, b) a ## b
+# else
+# define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(a ## b)
+# define BOOST_PP_CAT_II(res) res
+# endif
+#
+# endif
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_COMMA_IF_HPP
+# define BOOST_PREPROCESSOR_COMMA_IF_HPP
+#
+# include <boost_local/preprocessor/punctuation/comma_if.hpp>
+#
+# endif
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_EMPTY_HPP
+# define BOOST_PREPROCESSOR_EMPTY_HPP
+#
+# include <boost_local/preprocessor/facilities/empty.hpp>
+#
+# endif
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_ENUM_PARAMS_HPP
+# define BOOST_PREPROCESSOR_ENUM_PARAMS_HPP
+#
+# include <boost_local/preprocessor/repetition/enum_params.hpp>
+#
+# endif
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_IDENTITY_HPP
+# define BOOST_PREPROCESSOR_IDENTITY_HPP
+#
+# include <boost_local/preprocessor/facilities/identity.hpp>
+#
+# endif
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_INC_HPP
+# define BOOST_PREPROCESSOR_INC_HPP
+#
+# include <boost_local/preprocessor/arithmetic/inc.hpp>
+#
+# endif
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_ITERATE_HPP
+# define BOOST_PREPROCESSOR_ITERATE_HPP
+#
+# include <boost_local/preprocessor/iteration/iterate.hpp>
+#
+# endif
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_REPEAT_HPP
+# define BOOST_PREPROCESSOR_REPEAT_HPP
+#
+# include <boost_local/preprocessor/repetition/repeat.hpp>
+#
+# endif
--- /dev/null
+// tuple.hpp - Boost Tuple Library --------------------------------------
+
+// Copyright (C) 1999, 2000 Jaakko Järvi (jaakko.jarvi@cs.utu.fi)
+//
+// Permission to copy, use, sell and distribute this software is granted
+// provided this copyright notice appears in all copies.
+// Permission to modify the code and to distribute modified code is granted
+// provided this copyright notice appears in all copies, and a notice
+// that the code was modified is included with the copyright notice.
+//
+// This software is provided "as is" without express or implied warranty,
+// and with no claim as to its suitability for any purpose.
+
+// For more information, see http://www.boost.org
+
+// -----------------------------------------------------------------
+
+#ifndef BOOST_TUPLE_HPP
+#define BOOST_TUPLE_HPP
+
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730
+// Work around a compiler bug.
+// boost::python::tuple has to be seen by the compiler before the
+// boost::tuple class template.
+namespace boost { namespace python { class tuple; }}
+#endif
+
+#include <boost_local/config.hpp>
+#include <boost_local/static_assert.hpp>
+
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+// The MSVC version
+#include <boost_local/tuple/detail/tuple_basic_no_partial_spec.hpp>
+
+#else
+// other compilers
+#include <boost_local/ref.hpp>
+#include <boost_local/tuple/detail/tuple_basic.hpp>
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+namespace boost {
+
+using tuples::tuple;
+using tuples::make_tuple;
+using tuples::tie;
+#if !defined(BOOST_NO_USING_TEMPLATE)
+using tuples::get;
+#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+//
+// The "using tuples::get" statement causes the
+// Borland compiler to ICE, use forwarding
+// functions instead:
+//
+template<int N, class HT, class TT>
+inline typename tuples::access_traits<
+ typename tuples::element<N, tuples::cons<HT, TT> >::type
+ >::non_const_type
+get(tuples::cons<HT, TT>& c) {
+ return tuples::get<N,HT,TT>(c);
+}
+// get function for const cons-lists, returns a const reference to
+// the element. If the element is a reference, returns the reference
+// as such (that is, can return a non-const reference)
+template<int N, class HT, class TT>
+inline typename tuples::access_traits<
+ typename tuples::element<N, tuples::cons<HT, TT> >::type
+ >::const_type
+get(const tuples::cons<HT, TT>& c) {
+ return tuples::get<N,HT,TT>(c);
+}
+#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+//
+// MSVC, using declarations don't mix with templates well,
+// so use forwarding functions instead:
+//
+template<int N, typename Head, typename Tail>
+typename tuples::detail::element_ref<N, tuples::cons<Head, Tail> >::RET
+get(tuples::cons<Head, Tail>& t, tuples::detail::workaround_holder<N>* = 0)
+{
+ return tuples::detail::get_class<N>::get(t);
+}
+
+template<int N, typename Head, typename Tail>
+typename tuples::detail::element_const_ref<N, tuples::cons<Head, Tail> >::RET
+get(const tuples::cons<Head, Tail>& t, tuples::detail::workaround_holder<N>* = 0)
+{
+ return tuples::detail::get_class<N>::get(t);
+}
+#endif // BOOST_NO_USING_TEMPLATE
+
+} // end namespace boost
+
+
+#endif // BOOST_TUPLE_HPP
--- /dev/null
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_ADD_CONST_HPP_INCLUDED
+#define BOOST_TT_ADD_CONST_HPP_INCLUDED
+
+#include <boost_local/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/type_trait_def.hpp>
+
+namespace boost {
+
+// * convert a type T to const type - add_const<T>
+// this is not required since the result is always
+// the same as "T const", but it does suppress warnings
+// from some compilers:
+
+#if defined(BOOST_MSVC)
+// This bogus warning will appear when add_const is applied to a
+// const volatile reference because we can't detect const volatile
+// references with MSVC6.
+# pragma warning(push)
+# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored
+#endif
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_const,T,T const)
+
+#if defined(BOOST_MSVC)
+# pragma warning(pop)
+#endif
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_const,T&,T&)
+#endif
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_TT_ADD_CONST_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_ADD_CV_HPP_INCLUDED
+#define BOOST_TT_ADD_CV_HPP_INCLUDED
+
+#include <boost_local/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/type_trait_def.hpp>
+
+namespace boost {
+
+// * convert a type T to a const volatile type - add_cv<T>
+// this is not required since the result is always
+// the same as "T const volatile", but it does suppress warnings
+// from some compilers:
+
+#if defined(BOOST_MSVC)
+// This bogus warning will appear when add_volatile is applied to a
+// const volatile reference because we can't detect const volatile
+// references with MSVC6.
+# pragma warning(push)
+# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored
+#endif
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_cv,T,T const volatile)
+
+#if defined(BOOST_MSVC)
+# pragma warning(pop)
+#endif
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_cv,T&,T&)
+#endif
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_TT_ADD_CV_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_ADD_POINTER_HPP_INCLUDED
+#define BOOST_TT_ADD_POINTER_HPP_INCLUDED
+
+#include <boost_local/type_traits/remove_reference.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/type_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+struct add_pointer_impl
+{
+ typedef typename remove_reference<T>::type no_ref_type;
+ typedef no_ref_type* type;
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_pointer,T,typename detail::add_pointer_impl<T>::type)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_TT_ADD_POINTER_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_ADD_REFERENCE_HPP_INCLUDED
+#define BOOST_TT_ADD_REFERENCE_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_reference.hpp>
+#include <boost_local/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/type_trait_def.hpp>
+
+namespace boost {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_reference,T,T&)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_reference,T&,T&)
+
+#elif defined(BOOST_MSVC6_MEMBER_TEMPLATES)
+
+namespace detail {
+
+template <bool x>
+struct reference_adder
+{
+ template <typename T> struct result_
+ {
+ typedef T& type;
+ };
+};
+
+template <>
+struct reference_adder<true>
+{
+ template <typename T> struct result_
+ {
+ typedef T type;
+ };
+};
+
+template <typename T>
+struct add_reference_impl
+{
+ typedef typename reference_adder<
+ ::boost::is_reference<T>::value
+ >::template result_<T> result;
+
+ typedef typename result::type type;
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_reference,T,typename detail::add_reference_impl<T>::type)
+
+#else
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_reference,T,T&)
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+//
+// these full specialisations are always required:
+BOOST_TT_AUX_TYPE_TRAIT_SPEC1(add_reference,void,void)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_TYPE_TRAIT_SPEC1(add_reference,void const,void const)
+BOOST_TT_AUX_TYPE_TRAIT_SPEC1(add_reference,void volatile,void volatile)
+BOOST_TT_AUX_TYPE_TRAIT_SPEC1(add_reference,void const volatile,void const volatile)
+#endif
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_ADD_VOLATILE_HPP_INCLUDED
+#define BOOST_TT_ADD_VOLATILE_HPP_INCLUDED
+
+#include <boost_local/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/type_trait_def.hpp>
+
+namespace boost {
+
+// * convert a type T to volatile type - add_volatile<T>
+// this is not required since the result is always
+// the same as "T volatile", but it does suppress warnings
+// from some compilers:
+
+#if defined(BOOST_MSVC)
+// This bogus warning will appear when add_volatile is applied to a
+// const volatile reference because we can't detect const volatile
+// references with MSVC6.
+# pragma warning(push)
+# pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored
+#endif
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_volatile,T,T volatile)
+
+#if defined(BOOST_MSVC)
+# pragma warning(pop)
+#endif
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_volatile,T&,T&)
+#endif
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_TT_ADD_VOLATILE_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+
+#ifndef BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED
+#define BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED
+
+#include <boost_local/config.hpp>
+#include <cstddef>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/size_t_trait_def.hpp>
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4121) // alignment is sensitive to packing
+#endif
+
+namespace boost {
+
+template <typename T> struct alignment_of;
+
+// get the alignment of some arbitrary type:
+namespace detail {
+
+template <typename T>
+struct alignment_of_hack
+{
+ char c;
+ T t;
+ alignment_of_hack();
+};
+
+
+template <unsigned A, unsigned S>
+struct alignment_logic
+{
+ BOOST_STATIC_CONSTANT(std::size_t, value = A < S ? A : S);
+};
+
+
+template< typename T >
+struct alignment_of_impl
+{
+ BOOST_STATIC_CONSTANT(std::size_t, value =
+ (::boost::detail::alignment_logic<
+ sizeof(detail::alignment_of_hack<T>) - sizeof(T),
+ sizeof(T)
+ >::value));
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(alignment_of,T,::boost::detail::alignment_of_impl<T>::value)
+
+// references have to be treated specially, assume
+// that a reference is just a special pointer:
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+template <typename T>
+struct alignment_of<T&>
+ : alignment_of<T*>
+{
+};
+#endif
+
+// void has to be treated specially:
+BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void,0)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void const,0)
+BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void volatile,0)
+BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void const volatile,0)
+#endif
+
+} // namespace boost
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+#include <boost_local/type_traits/detail/size_t_trait_undef.hpp>
+
+#endif // BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED
--- /dev/null
+
+// Copyright (c) 2001 Aleksey Gurtovoy.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied warranty,
+// and with no claim as to its suitability for any purpose.
+
+#ifndef BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED
+#define BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED
+
+#include <boost_local/config.hpp>
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+# define BOOST_TT_BROKEN_COMPILER_SPEC(T) /**/
+
+#else
+
+namespace boost {
+// forward declarations
+template< typename T > struct remove_const;
+template< typename T > struct remove_volatile;
+template< typename T > struct remove_cv;
+template< typename T > struct remove_pointer;
+template< typename T > struct remove_reference;
+}
+
+// same as BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1 macro, except that it
+// never gets #undef-ined
+# define BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(trait,spec,result) \
+template<> struct trait<spec> \
+{ \
+ typedef result type; \
+}; \
+/**/
+
+# define BOOST_TT_AUX_REMOVE_CONST_VOLATILE_RANK1_SPEC(T) \
+ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_const,T const,T) \
+ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_const,T const volatile,T volatile) \
+ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_volatile,T volatile,T) \
+ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_volatile,T const volatile,T const) \
+ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_cv,T const,T) \
+ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_cv,T volatile,T) \
+ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_cv,T const volatile,T) \
+ /**/
+
+# define BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T) \
+ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_pointer,T*,T) \
+ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_reference,T&,T) \
+ /**/
+
+# define BOOST_TT_AUX_REMOVE_PTR_REF_RANK_2_SPEC(T) \
+ BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T) \
+ BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T const) \
+ BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T volatile) \
+ BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T const volatile) \
+ /**/
+
+# define BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T) \
+ BOOST_TT_AUX_REMOVE_PTR_REF_RANK_2_SPEC(T) \
+ BOOST_TT_AUX_REMOVE_CONST_VOLATILE_RANK1_SPEC(T) \
+ /**/
+
+# define BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T) \
+ BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T*) \
+ BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T const*) \
+ BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T volatile*) \
+ BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T const volatile*) \
+ /**/
+
+# define BOOST_TT_BROKEN_COMPILER_SPEC(T) \
+ namespace boost { \
+ BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T) \
+ BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T) \
+ BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T*) \
+ BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T const*) \
+ BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T volatile*) \
+ BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T const volatile*) \
+ } \
+ /**/
+
+# include <boost_local/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+BOOST_TT_BROKEN_COMPILER_SPEC(bool)
+BOOST_TT_BROKEN_COMPILER_SPEC(char)
+#ifndef BOOST_NO_INTRINSIC_WCHAR_T
+BOOST_TT_BROKEN_COMPILER_SPEC(wchar_t)
+#endif
+BOOST_TT_BROKEN_COMPILER_SPEC(signed char)
+BOOST_TT_BROKEN_COMPILER_SPEC(unsigned char)
+BOOST_TT_BROKEN_COMPILER_SPEC(signed short)
+BOOST_TT_BROKEN_COMPILER_SPEC(unsigned short)
+BOOST_TT_BROKEN_COMPILER_SPEC(signed int)
+BOOST_TT_BROKEN_COMPILER_SPEC(unsigned int)
+BOOST_TT_BROKEN_COMPILER_SPEC(signed long)
+BOOST_TT_BROKEN_COMPILER_SPEC(unsigned long)
+BOOST_TT_BROKEN_COMPILER_SPEC(float)
+BOOST_TT_BROKEN_COMPILER_SPEC(double)
+BOOST_TT_BROKEN_COMPILER_SPEC(long double)
+
+// for backward compatibility
+#define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(T) \
+ BOOST_TT_BROKEN_COMPILER_SPEC(T) \
+/**/
+
+#endif // BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_CONFIG_HPP_INCLUDED
+#define BOOST_TT_CONFIG_HPP_INCLUDED
+
+#ifndef BOOST_CONFIG_HPP
+#include <boost_local/config.hpp>
+#endif
+
+//
+// Helper macros for builtin compiler support.
+// If your compiler has builtin support for any of the following
+// traits concepts, then redefine the appropriate macros to pick
+// up on the compiler support:
+//
+// (these should largely ignore cv-qualifiers)
+// BOOST_IS_CLASS(T) should evaluate to true if T is a class or struct type
+// BOOST_IS_ENUM(T) should evaluate to true if T is an enumerator type
+// BOOST_IS_UNION(T) should evaluate to true if T is a union type
+// BOOST_IS_POD(T) should evaluate to true if T is a POD type
+// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty struct or union
+// BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
+// BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
+// BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
+// BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect
+
+#ifdef BOOST_HAS_SGI_TYPE_TRAITS
+# include <boost_local/type_traits/is_same.hpp>
+# include <type_traits.h>
+# define BOOST_IS_POD(T) ::boost::is_same< typename ::__type_traits<T>::is_POD_type, ::__true_type>::value
+# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_default_constructor, ::__true_type>::value
+# define BOOST_HAS_TRIVIAL_COPY(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_copy_constructor, ::__true_type>::value
+# define BOOST_HAS_TRIVIAL_ASSIGN(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_assignment_operator, ::__true_type>::value
+# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_destructor, ::__true_type>::value
+#endif
+
+#ifndef BOOST_IS_CLASS
+# define BOOST_IS_CLASS(T) false
+#endif
+
+#ifndef BOOST_IS_ENUM
+# define BOOST_IS_ENUM(T) false
+#endif
+
+#ifndef BOOST_IS_UNION
+# define BOOST_IS_UNION(T) false
+#endif
+
+#ifndef BOOST_IS_POD
+# define BOOST_IS_POD(T) false
+#endif
+
+#ifndef BOOST_IS_EMPTY
+# define BOOST_IS_EMPTY(T) false
+#endif
+
+#ifndef BOOST_HAS_TRIVIAL_CONSTRUCTOR
+# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) false
+#endif
+
+#ifndef BOOST_HAS_TRIVIAL_COPY
+# define BOOST_HAS_TRIVIAL_COPY(T) false
+#endif
+
+#ifndef BOOST_HAS_TRIVIAL_ASSIGN
+# define BOOST_HAS_TRIVIAL_ASSIGN(T) false
+#endif
+
+#ifndef BOOST_HAS_TRIVIAL_DESTRUCTOR
+# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) false
+#endif
+
+//
+// whenever we have a conversion function with elipses
+// it needs to be declared __cdecl to suppress compiler
+// warnings from MS and Borland compilers:
+#if defined(BOOST_MSVC) || defined(__BORLANDC__)
+# define BOOST_TT_DECL __cdecl
+#else
+# define BOOST_TT_DECL /**/
+#endif
+
+# if (defined(__MWERKS__) && __MWERKS__ >= 0x3000) || BOOST_MSVC > 1301 || defined(BOOST_NO_COMPILER_CONFIG)
+# define BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
+#endif
+
+#endif // BOOST_TT_CONFIG_HPP_INCLUDED
--- /dev/null
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+//
+// defines traits classes for cv-qualified types:
+// is_const, is_volatile, remove_const, remove_volatile, remove_cv.
+
+#ifndef BOOST_TT_CV_TRAITS_HPP_INCLUDED
+#define BOOST_TT_CV_TRAITS_HPP_INCLUDED
+
+#include <boost_local/type_traits/add_const.hpp>
+#include <boost_local/type_traits/add_volatile.hpp>
+#include <boost_local/type_traits/add_cv.hpp>
+#include <boost_local/type_traits/is_const.hpp>
+#include <boost_local/type_traits/is_volatile.hpp>
+#include <boost_local/type_traits/remove_const.hpp>
+#include <boost_local/type_traits/remove_volatile.hpp>
+#include <boost_local/type_traits/remove_cv.hpp>
+
+#endif // BOOST_TT_CV_TRAITS_HPP_INCLUDED
--- /dev/null
+
+// Copyright (C) 2000 John Maddock (john_maddock@compuserve.com)
+//
+// Permission to copy and use this software is granted,
+// provided this copyright notice appears in all copies.
+// Permission to modify the code and to distribute modified code is granted,
+// provided this copyright notice appears in all copies, and a notice
+// that the code was modified is included with the copyright notice.
+//
+// This software is provided "as is" without express or implied warranty,
+// and with no claim as to its suitability for any purpose.
+
+#ifndef BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED
+#define BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED
+
+#include <boost_local/config.hpp>
+#include <boost_local/type_traits/is_function.hpp>
+#include <boost_local/type_traits/add_pointer.hpp>
+
+namespace boost {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+namespace detail {
+
+template<typename Function> struct function_traits_helper;
+
+template<typename R>
+struct function_traits_helper<R (*)(void)>
+{
+ BOOST_STATIC_CONSTANT(int, arity = 0);
+ typedef R result_type;
+};
+
+template<typename R, typename T1>
+struct function_traits_helper<R (*)(T1)>
+{
+ BOOST_STATIC_CONSTANT(int, arity = 1);
+ typedef R result_type;
+ typedef T1 arg1_type;
+};
+
+template<typename R, typename T1, typename T2>
+struct function_traits_helper<R (*)(T1, T2)>
+{
+ BOOST_STATIC_CONSTANT(int, arity = 2);
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+};
+
+template<typename R, typename T1, typename T2, typename T3>
+struct function_traits_helper<R (*)(T1, T2, T3)>
+{
+ BOOST_STATIC_CONSTANT(int, arity = 3);
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T3 arg3_type;
+};
+
+template<typename R, typename T1, typename T2, typename T3, typename T4>
+struct function_traits_helper<R (*)(T1, T2, T3, T4)>
+{
+ BOOST_STATIC_CONSTANT(int, arity = 4);
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T3 arg3_type;
+ typedef T4 arg4_type;
+};
+
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5>
+struct function_traits_helper<R (*)(T1, T2, T3, T4, T5)>
+{
+ BOOST_STATIC_CONSTANT(int, arity = 5);
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T3 arg3_type;
+ typedef T4 arg4_type;
+ typedef T5 arg5_type;
+};
+
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6>
+struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6)>
+{
+ BOOST_STATIC_CONSTANT(int, arity = 6);
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T3 arg3_type;
+ typedef T4 arg4_type;
+ typedef T5 arg5_type;
+ typedef T6 arg6_type;
+};
+
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7>
+struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7)>
+{
+ BOOST_STATIC_CONSTANT(int, arity = 7);
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T3 arg3_type;
+ typedef T4 arg4_type;
+ typedef T5 arg5_type;
+ typedef T6 arg6_type;
+ typedef T7 arg7_type;
+};
+
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8>
+struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8)>
+{
+ BOOST_STATIC_CONSTANT(int, arity = 8);
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T3 arg3_type;
+ typedef T4 arg4_type;
+ typedef T5 arg5_type;
+ typedef T6 arg6_type;
+ typedef T7 arg7_type;
+ typedef T8 arg8_type;
+};
+
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8, typename T9>
+struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8, T9)>
+{
+ BOOST_STATIC_CONSTANT(int, arity = 9);
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T3 arg3_type;
+ typedef T4 arg4_type;
+ typedef T5 arg5_type;
+ typedef T6 arg6_type;
+ typedef T7 arg7_type;
+ typedef T8 arg8_type;
+ typedef T9 arg9_type;
+};
+
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8, typename T9,
+ typename T10>
+struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>
+{
+ BOOST_STATIC_CONSTANT(int, arity = 10);
+ typedef R result_type;
+ typedef T1 arg1_type;
+ typedef T2 arg2_type;
+ typedef T3 arg3_type;
+ typedef T4 arg4_type;
+ typedef T5 arg5_type;
+ typedef T6 arg6_type;
+ typedef T7 arg7_type;
+ typedef T8 arg8_type;
+ typedef T9 arg9_type;
+ typedef T10 arg10_type;
+};
+
+} // end namespace detail
+
+template<typename Function>
+struct function_traits :
+ public detail::function_traits_helper<typename add_pointer<Function>::type>
+{
+};
+
+#else
+
+namespace detail {
+
+template<int N>
+struct type_of_size
+{
+ char elements[N];
+};
+
+template<typename R>
+type_of_size<1> function_arity_helper(R (*f)());
+
+template<typename R, typename T1>
+type_of_size<2> function_arity_helper(R (*f)(T1));
+
+template<typename R, typename T1, typename T2>
+type_of_size<3> function_arity_helper(R (*f)(T1, T2));
+
+template<typename R, typename T1, typename T2, typename T3>
+type_of_size<4> function_arity_helper(R (*f)(T1, T2, T3));
+
+template<typename R, typename T1, typename T2, typename T3, typename T4>
+type_of_size<5> function_arity_helper(R (*f)(T1, T2, T3, T4));
+
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5>
+type_of_size<6> function_arity_helper(R (*f)(T1, T2, T3, T4, T5));
+
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6>
+type_of_size<7> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6));
+
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7>
+type_of_size<8> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6, T7));
+
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8>
+type_of_size<9> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6, T7, T8));
+
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8, typename T9>
+type_of_size<10> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6, T7, T8,
+ T9));
+
+template<typename R, typename T1, typename T2, typename T3, typename T4,
+ typename T5, typename T6, typename T7, typename T8, typename T9,
+ typename T10>
+type_of_size<11> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6, T7, T8,
+ T9, T10));
+} // end namespace detail
+
+// Won't work with references
+template<typename Function>
+struct function_traits
+{
+ BOOST_STATIC_CONSTANT(int, arity = (sizeof(detail::function_arity_helper((Function*)0))-1));
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+}
+
+#endif // BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED
+
+#include <boost_local/type_traits/has_trivial_assign.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_assign,T,::boost::has_trivial_assign<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED
+#define BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED
+
+#include <boost_local/type_traits/has_trivial_constructor.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_constructor,T,::boost::has_trivial_constructor<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED
+#define BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED
+
+#include <boost_local/type_traits/has_trivial_copy.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_copy,T,::boost::has_trivial_copy<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_NOTHROW_DESTRUCTOR_HPP_INCLUDED
+#define BOOST_TT_HAS_NOTHROW_DESTRUCTOR_HPP_INCLUDED
+
+#include <boost_local/type_traits/has_trivial_destructor.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_destructor,T,::boost::has_trivial_destructor<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_HAS_NOTHROW_DESTRUCTOR_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_POD.hpp>
+#include <boost_local/type_traits/is_const.hpp>
+#include <boost_local/type_traits/is_volatile.hpp>
+#include <boost_local/type_traits/detail/ice_and.hpp>
+#include <boost_local/type_traits/detail/ice_or.hpp>
+#include <boost_local/type_traits/detail/ice_not.hpp>
+#include <boost_local/type_traits/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+struct has_trivial_assign_impl
+{
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_and<
+ ::boost::type_traits::ice_or<
+ ::boost::is_POD<T>::value,
+ BOOST_HAS_TRIVIAL_ASSIGN(T)
+ >::value,
+ ::boost::type_traits::ice_not< ::boost::is_const<T>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value
+ >::value));
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_assign,T,::boost::detail::has_trivial_assign_impl<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED
+#define BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_POD.hpp>
+#include <boost_local/type_traits/detail/ice_or.hpp>
+#include <boost_local/type_traits/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+struct has_trivial_ctor_impl
+{
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_or<
+ ::boost::is_POD<T>::value,
+ BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
+ >::value));
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_constructor,T,::boost::detail::has_trivial_ctor_impl<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED
+#define BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_volatile.hpp>
+#include <boost_local/type_traits/is_POD.hpp>
+#include <boost_local/type_traits/detail/ice_and.hpp>
+#include <boost_local/type_traits/detail/ice_or.hpp>
+#include <boost_local/type_traits/detail/ice_not.hpp>
+#include <boost_local/type_traits/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+struct has_trivial_copy_impl
+{
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_and<
+ ::boost::type_traits::ice_or<
+ ::boost::is_POD<T>::value,
+ BOOST_HAS_TRIVIAL_COPY(T)
+ >::value,
+ ::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value
+ >::value));
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_copy,T,::boost::detail::has_trivial_copy_impl<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED
+#define BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_POD.hpp>
+#include <boost_local/type_traits/detail/ice_or.hpp>
+#include <boost_local/type_traits/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+struct has_trivial_dtor_impl
+{
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_or<
+ ::boost::is_POD<T>::value,
+ BOOST_HAS_TRIVIAL_DESTRUCTOR(T)
+ >::value));
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_destructor,T,::boost::detail::has_trivial_dtor_impl<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_POD_HPP_INCLUDED
+#define BOOST_TT_IS_POD_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_void.hpp>
+#include <boost_local/type_traits/is_scalar.hpp>
+#include <boost_local/type_traits/detail/ice_or.hpp>
+#include <boost_local/type_traits/config.hpp>
+
+#include <cstddef>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+// forward declaration, needed by 'is_POD_array_helper' template below
+template< typename T > struct is_POD;
+
+namespace detail {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+template <typename T> struct is_POD_impl
+{
+ BOOST_STATIC_CONSTANT(
+ bool, value =
+ (::boost::type_traits::ice_or<
+ ::boost::is_scalar<T>::value,
+ ::boost::is_void<T>::value,
+ BOOST_IS_POD(T)
+ >::value));
+};
+
+template <typename T, std::size_t sz>
+struct is_POD_impl<T[sz]>
+ : is_POD_impl<T>
+{
+};
+
+#else
+
+template <bool is_array = false>
+struct is_POD_helper
+{
+ template <typename T> struct result_
+ {
+ BOOST_STATIC_CONSTANT(
+ bool, value =
+ (::boost::type_traits::ice_or<
+ ::boost::is_scalar<T>::value,
+ ::boost::is_void<T>::value,
+ BOOST_IS_POD(T)
+ >::value));
+ };
+};
+
+template <bool b>
+struct bool_to_yes_no_type
+{
+ typedef ::boost::type_traits::no_type type;
+};
+
+template <>
+struct bool_to_yes_no_type<true>
+{
+ typedef ::boost::type_traits::yes_type type;
+};
+
+template <typename ArrayType>
+struct is_POD_array_helper
+{
+ enum { is_pod = ::boost::is_POD<ArrayType>::value }; // MSVC workaround
+ typedef typename bool_to_yes_no_type<is_pod>::type type;
+ type instance() const;
+};
+
+template <typename T>
+is_POD_array_helper<T> is_POD_array(T*);
+
+template <>
+struct is_POD_helper<true>
+{
+ template <typename T> struct result_
+ {
+ static T& help();
+ BOOST_STATIC_CONSTANT(bool, value =
+ sizeof(is_POD_array(help()).instance()) == sizeof(::boost::type_traits::yes_type)
+ );
+ };
+};
+
+
+template <typename T> struct is_POD_impl
+{
+ BOOST_STATIC_CONSTANT(
+ bool, value = (
+ ::boost::detail::is_POD_helper<
+ ::boost::is_array<T>::value
+ >::template result_<T>::value
+ )
+ );
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::detail::is_POD_impl<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_POD_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED
+#define BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_integral.hpp>
+#include <boost_local/type_traits/is_float.hpp>
+#include <boost_local/type_traits/detail/ice_or.hpp>
+#include <boost_local/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template< typename T >
+struct is_arithmetic_impl
+{
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_or<
+ ::boost::is_integral<T>::value,
+ ::boost::is_float<T>::value
+ >::value));
+};
+
+} // namespace detail
+
+//* is a type T an arithmetic type described in the standard (3.9.1p8)
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_arithmetic,T,::boost::detail::is_arithmetic_impl<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_ARRAY_HPP_INCLUDED
+#define BOOST_TT_IS_ARRAY_HPP_INCLUDED
+
+#include <boost_local/type_traits/config.hpp>
+
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+# include <boost_local/type_traits/detail/yes_no_type.hpp>
+# include <boost_local/type_traits/detail/wrap.hpp>
+#endif
+
+#include <cstddef>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T[N],true)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T const[N],true)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T volatile[N],true)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T const volatile[N],true)
+
+#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+namespace detail {
+
+using ::boost::type_traits::yes_type;
+using ::boost::type_traits::no_type;
+using ::boost::type_traits::wrap;
+
+template< typename T > T(* is_array_tester1(wrap<T>) )(wrap<T>);
+char BOOST_TT_DECL is_array_tester1(...);
+
+template< typename T> no_type is_array_tester2(T(*)(wrap<T>));
+yes_type BOOST_TT_DECL is_array_tester2(...);
+
+template< typename T >
+struct is_array_impl
+{
+ BOOST_STATIC_CONSTANT(bool, value =
+ sizeof(::boost::detail::is_array_tester2(
+ ::boost::detail::is_array_tester1(
+ ::boost::type_traits::wrap<T>()
+ )
+ )) == 1
+ );
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,::boost::detail::is_array_impl<T>::value)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_array,void,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_array,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_array,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_array,void const volatile,false)
+#endif
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_ARRAY_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED
+#define BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_class.hpp>
+#include <boost_local/type_traits/is_convertible.hpp>
+#include <boost_local/type_traits/detail/ice_and.hpp>
+#include <boost_local/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename Base, typename Derived>
+struct is_base_and_derived_impl
+{
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_and<
+ ::boost::is_convertible<Derived*,Base*>::value,
+ ::boost::is_class<Derived>::value,
+ ::boost::is_class<Base>::value
+ >::value)
+ );
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF2(
+ is_base_and_derived
+ , Base
+ , Derived
+ , (::boost::detail::is_base_and_derived_impl<Base,Derived>::value)
+ )
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base&,Derived,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base,Derived&,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base&,Derived&,false)
+#endif
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED
--- /dev/null
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000-2002. Permission to copy, use,
+// modify, sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_CLASS_HPP_INCLUDED
+#define BOOST_TT_IS_CLASS_HPP_INCLUDED
+
+#include <boost_local/type_traits/config.hpp>
+
+#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
+# include <boost_local/type_traits/detail/yes_no_type.hpp>
+#else
+# include <boost_local/type_traits/is_union.hpp>
+# include <boost_local/type_traits/is_scalar.hpp>
+# include <boost_local/type_traits/is_array.hpp>
+# include <boost_local/type_traits/is_reference.hpp>
+# include <boost_local/type_traits/is_void.hpp>
+# include <boost_local/type_traits/is_function.hpp>
+# include <boost_local/type_traits/detail/ice_and.hpp>
+# include <boost_local/type_traits/detail/ice_not.hpp>
+#endif
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
+
+// This is actually the conforming implementation which works with
+// abstract classes. However, enough compilers have trouble with
+// it that most will use the one in
+// boost/type_traits/object_traits.hpp. This implementation
+// actually works with VC7.0, but other interactions seem to fail
+// when we use it.
+
+// is_class<> metafunction due to Paul Mensonides
+// (leavings@attbi.com). For more details:
+// http://groups.google.com/groups?hl=en&selm=000001c1cc83%24e154d5e0%247772e50c%40c161550a&rnum=1
+
+template <typename T>
+struct is_class_impl
+{
+ template <class U> static ::boost::type_traits::yes_type is_class_tester(void(U::*)(void));
+ template <class U> static ::boost::type_traits::no_type is_class_tester(...);
+
+ BOOST_STATIC_CONSTANT(bool, value =
+ sizeof(is_class_tester<T>(0)) == sizeof(::boost::type_traits::yes_type)
+ );
+};
+
+#else
+
+template <typename T>
+struct is_class_impl
+{
+# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_and<
+ ::boost::type_traits::ice_not< ::boost::is_union<T>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_scalar<T>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_array<T>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value,
+ ::boost::type_traits::ice_not< ::boost::is_void<T>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_function<T>::value >::value
+ >::value));
+# else
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_and<
+ ::boost::type_traits::ice_not< ::boost::is_union<T>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_scalar<T>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_array<T>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value,
+ ::boost::type_traits::ice_not< ::boost::is_void<T>::value >::value
+ >::value));
+# endif
+};
+
+# endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_class,T,::boost::detail::is_class_impl<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_CLASS_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_COMPOUND_HPP_INCLUDED
+#define BOOST_TT_IS_COMPOUND_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_array.hpp>
+#include <boost_local/type_traits/is_pointer.hpp>
+#include <boost_local/type_traits/is_reference.hpp>
+#include <boost_local/type_traits/is_class.hpp>
+#include <boost_local/type_traits/is_union.hpp>
+#include <boost_local/type_traits/is_enum.hpp>
+#include <boost_local/type_traits/is_member_pointer.hpp>
+#include <boost_local/type_traits/detail/ice_or.hpp>
+#include <boost_local/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+struct is_compound_impl
+{
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_or<
+ ::boost::is_array<T>::value,
+ ::boost::is_pointer<T>::value,
+ ::boost::is_reference<T>::value,
+ ::boost::is_class<T>::value,
+ ::boost::is_union<T>::value,
+ ::boost::is_enum<T>::value,
+ ::boost::is_member_pointer<T>::value
+ >::value));
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_compound,T,::boost::detail::is_compound_impl<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_COMPOUND_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_CONST_HPP_INCLUDED
+#define BOOST_TT_IS_CONST_HPP_INCLUDED
+
+#include <boost_local/config.hpp>
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+# include <boost_local/type_traits/detail/cv_traits_impl.hpp>
+#else
+# include <boost_local/type_traits/is_reference.hpp>
+# include <boost_local/type_traits/is_array.hpp>
+# include <boost_local/type_traits/detail/yes_no_type.hpp>
+# include <boost_local/type_traits/detail/false_result.hpp>
+#endif
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+//* is a type T declared const - is_const<T>
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::cv_traits_imp<T*>::is_const)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T&,false)
+
+#if defined(__BORLANDC__)
+// these are illegal specialisations; cv-qualifies applied to
+// references have no effect according to [8.3.2p1],
+// C++ Builder requires them though as it treats cv-qualified
+// references as distinct types...
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& const,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& const volatile,false)
+#endif
+
+#else
+
+namespace detail {
+
+using ::boost::type_traits::yes_type;
+using ::boost::type_traits::no_type;
+
+yes_type is_const_tester(const volatile void*);
+no_type is_const_tester(volatile void *);
+
+template <bool is_ref, bool array>
+struct is_const_helper
+ : ::boost::type_traits::false_result
+{
+};
+
+template <>
+struct is_const_helper<false,false>
+{
+ template <typename T> struct result_
+ {
+ static T* t;
+ BOOST_STATIC_CONSTANT(bool, value = (
+ sizeof(detail::yes_type) == sizeof(detail::is_const_tester(t))
+ ));
+ };
+};
+
+template <>
+struct is_const_helper<false,true>
+{
+ template <typename T> struct result_
+ {
+ static T t;
+ BOOST_STATIC_CONSTANT(bool, value = (
+ sizeof(detail::yes_type) == sizeof(detail::is_const_tester(&t))
+ ));
+ };
+};
+
+template <typename T>
+struct is_const_impl
+ : is_const_helper<
+ is_reference<T>::value
+ , is_array<T>::value
+ >::template result_<T>
+{
+};
+
+} // namespace detail
+
+//* is a type T declared const - is_const<T>
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::is_const_impl<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_const,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_const,void const,true)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_const,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_const,void const volatile,true)
+#endif
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_CONST_HPP_INCLUDED
--- /dev/null
+
+// Copyright (C) 2000 John Maddock (john_maddock@compuserve.com)
+// Copyright (C) 2000 Jeremy Siek (jsiek@lsc.nd.edu)
+// Copyright (C) 1999, 2000 Jaakko J\84rvi (jaakko.jarvi@cs.utu.fi)
+//
+// Permission to copy and use this software is granted,
+// provided this copyright notice appears in all copies.
+// Permission to modify the code and to distribute modified code is granted,
+// provided this copyright notice appears in all copies, and a notice
+// that the code was modified is included with the copyright notice.
+//
+// This software is provided "as is" without express or implied warranty,
+// and with no claim as to its suitability for any purpose.
+//
+
+#ifndef BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED
+#define BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED
+
+#include <boost_local/type_traits/detail/yes_no_type.hpp>
+#include <boost_local/type_traits/config.hpp>
+
+#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
+# include <boost_local/type_traits/is_void.hpp>
+#endif
+
+// should be always the last #include directive
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+// is one type convertable to another?
+//
+// there are multiple versions of the is_convertible
+// template, almost every compiler seems to require its
+// own version.
+//
+// Thanks to Andrei Alexandrescu for the original version of the
+// conversion detection technique!
+//
+
+namespace detail {
+
+// MS specific version:
+
+#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
+
+// This workaround is necessary to handle when From is void
+// which is normally taken care of by the partial specialization
+// of the is_convertible typename.
+using ::boost::type_traits::yes_type;
+using ::boost::type_traits::no_type;
+
+template< typename From >
+struct does_conversion_exist
+{
+ template< typename To > struct result_
+ {
+ static no_type BOOST_TT_DECL _m_check(...);
+ static yes_type BOOST_TT_DECL _m_check(To);
+ static From _m_from;
+ enum { value = sizeof( _m_check(_m_from) ) == sizeof(yes_type) };
+ };
+};
+
+template<>
+struct does_conversion_exist<void>
+{
+ template< typename To > struct result_
+ {
+ enum { value = ::boost::is_void<To>::value };
+ };
+};
+
+template <typename From, typename To>
+struct is_convertible_impl
+ : does_conversion_exist<From>::template result_<To>
+{
+};
+
+#elif defined(__BORLANDC__)
+//
+// special version for Borland compilers
+// this version breaks when used for some
+// UDT conversions:
+//
+template <typename From, typename To>
+struct is_convertible_impl
+{
+#pragma option push -w-8074
+ // This workaround for Borland breaks the EDG C++ frontend,
+ // so we only use it for Borland.
+ template <typename T> struct checker
+ {
+ static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...);
+ static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(T);
+ };
+
+ static From _m_from;
+ static bool const value = sizeof( checker<To>::_m_check(_m_from) )
+ == sizeof(::boost::type_traits::yes_type);
+#pragma option pop
+};
+
+#elif defined(__GNUC__)
+// special version for gcc compiler
+
+struct any_conversion
+{
+ template <typename T> any_conversion(const T&);
+ template <typename T> any_conversion(T&);
+};
+
+template <typename T> struct checker
+{
+ static boost::type_traits::no_type _m_check(any_conversion ...);
+ static boost::type_traits::yes_type _m_check(T, int);
+};
+
+template <typename From, typename To>
+struct is_convertible_impl
+{
+ static From _m_from;
+ static bool const value = sizeof( detail::checker<To>::_m_check(_m_from, 0) )
+ == sizeof(::boost::type_traits::yes_type);
+};
+
+#else
+
+template <typename From, typename To>
+struct is_convertible_impl
+{
+ static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...);
+ static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To);
+ static From _m_from;
+
+ BOOST_STATIC_CONSTANT(bool, value =
+ sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type)
+ );
+};
+
+#endif // is_convertible_impl
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convertible_impl<From,To>::value))
+
+//
+// Now add the full and partial specialisations
+// for void types, these are common to all the
+// implementation above:
+//
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename To,is_convertible,void,To,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename From,is_convertible,From,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename To,is_convertible,void const,To,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename To,is_convertible,void volatile,To,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename To,is_convertible,void const volatile,To,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename From,is_convertible,From,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const volatile,false)
+#endif
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+# define TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1,spec2,value) \
+ BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,spec1,spec2,value) \
+ BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,spec1,spec2 const,value) \
+ BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,spec1,spec2 volatile,value) \
+ BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,spec1,spec2 const volatile,value) \
+ /**/
+
+# define TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2(trait,spec1,spec2,value) \
+ TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1,spec2,value) \
+ TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 const,spec2,value) \
+ TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 volatile,spec2,value) \
+ TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 const volatile,spec2,value) \
+ /**/
+
+ TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2(is_convertible,void,void,true)
+
+# undef TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2
+# undef TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1
+
+#else
+ BOOST_TT_AUX_BOOL_TRAIT_SPEC2(is_convertible,void,void,true)
+#endif // BOOST_NO_CV_VOID_SPECIALIZATIONS
+
+
+#if defined(__GNUC__)
+
+// Declare specializations of is_convertible for all of the floating
+// types to all of the integral types. This suppresses some nasty
+// warnings
+
+# define TT_AUX_IS_CONVERTIBLE_SPEC(T1,T2) \
+ BOOST_TT_AUX_BOOL_TRAIT_SPEC2(is_convertible,T1,T2,true) \
+ /**/
+
+# define TT_AUX_IS_CONVERTIBLE_SPEC_2(T1,T2) \
+ TT_AUX_IS_CONVERTIBLE_SPEC(T1,signed T2) \
+ TT_AUX_IS_CONVERTIBLE_SPEC(T1,unsigned T2) \
+ /**/
+
+# define TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_SPEC(F) \
+ TT_AUX_IS_CONVERTIBLE_SPEC(F,char) \
+ TT_AUX_IS_CONVERTIBLE_SPEC_2(F,char) \
+ TT_AUX_IS_CONVERTIBLE_SPEC_2(F,short) \
+ TT_AUX_IS_CONVERTIBLE_SPEC_2(F,int) \
+ TT_AUX_IS_CONVERTIBLE_SPEC_2(F,long) \
+ TT_AUX_IS_CONVERTIBLE_SPEC_2(F,long long) \
+ /**/
+
+# define TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_CV_SPEC(F) \
+ TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_SPEC(F const) \
+ TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_SPEC(F volatile) \
+ TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_SPEC(F const volatile) \
+ /**/
+
+TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_CV_SPEC(float)
+TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_CV_SPEC(double)
+TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_CV_SPEC(long double)
+
+# undef TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_CV_SPEC
+# undef TT_AUX_IS_CONVERTIBLE_FROM_FLOAT_SPEC
+# undef TT_AUX_IS_CONVERTIBLE_SPEC_2
+# undef TT_AUX_IS_CONVERTIBLE_SPEC
+
+#endif // __GNUC__
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_EMPTY_HPP_INCLUDED
+#define BOOST_TT_IS_EMPTY_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_convertible.hpp>
+#include <boost_local/type_traits/detail/ice_or.hpp>
+#include <boost_local/type_traits/config.hpp>
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+# include <boost_local/type_traits/remove_cv.hpp>
+# include <boost_local/type_traits/is_class.hpp>
+# include <boost_local/type_traits/add_reference.hpp>
+#else
+# include <boost_local/type_traits/is_reference.hpp>
+# include <boost_local/type_traits/is_pointer.hpp>
+# include <boost_local/type_traits/is_member_pointer.hpp>
+# include <boost_local/type_traits/is_array.hpp>
+# include <boost_local/type_traits/is_void.hpp>
+# include <boost_local/type_traits/detail/ice_and.hpp>
+# include <boost_local/type_traits/detail/ice_not.hpp>
+#endif
+
+// should be always the last #include directive
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+template <typename T>
+struct empty_helper_t1 : public T
+{
+ empty_helper_t1(); // hh compiler bug workaround
+ int i[256];
+};
+
+struct empty_helper_t2 { int i[256]; };
+
+#ifndef __BORLANDC__
+
+template <typename T, bool is_a_class = false>
+struct empty_helper
+{
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template <typename T>
+struct empty_helper<T, true>
+{
+ BOOST_STATIC_CONSTANT(
+ bool, value = (sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2))
+ );
+};
+
+template <typename T>
+struct is_empty_impl
+{
+ typedef typename remove_cv<T>::type cvt;
+ BOOST_STATIC_CONSTANT(
+ bool, value = (
+ ::boost::type_traits::ice_or<
+ ::boost::detail::empty_helper<cvt,::boost::is_class<T>::value>::value
+ , BOOST_IS_EMPTY(cvt)
+ >::value
+ ));
+};
+
+#else // __BORLANDC__
+
+template <typename T, bool is_a_class, bool convertible_to_int>
+struct empty_helper
+{
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template <typename T>
+struct empty_helper<T, true, false>
+{
+ BOOST_STATIC_CONSTANT(bool, value = (
+ sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2)
+ ));
+};
+
+template <typename T>
+struct is_empty_impl
+{
+ typedef typename remove_cv<T>::type cvt;
+ typedef typename add_reference<T>::type r_type;
+
+ BOOST_STATIC_CONSTANT(
+ bool, value = (
+ ::boost::type_traits::ice_or<
+ ::boost::detail::empty_helper<
+ cvt
+ , ::boost::is_class<T>::value
+ , ::boost::is_convertible< r_type,int>::value
+ >::value
+ , BOOST_IS_EMPTY(cvt)
+ >::value));
+};
+
+#endif // __BORLANDC__
+
+#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#ifdef BOOST_MSVC6_MEMBER_TEMPLATES
+
+template <typename T>
+struct empty_helper_t1 : public T
+{
+ empty_helper_t1();
+ int i[256];
+};
+
+struct empty_helper_t2 { int i[256]; };
+
+template <typename T>
+struct empty_helper_base
+{
+ enum { value = (sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2)) };
+};
+
+template <typename T>
+struct empty_helper_nonbase
+{
+ enum { value = false };
+};
+
+template <bool base>
+struct empty_helper_chooser
+{
+ template <typename T> struct result_
+ {
+ typedef empty_helper_nonbase<T> type;
+ };
+};
+
+template <>
+struct empty_helper_chooser<true>
+{
+ template <typename T> struct result_
+ {
+ typedef empty_helper_base<T> type;
+ };
+};
+
+template <typename T>
+struct is_empty_impl
+{
+ typedef ::boost::detail::empty_helper_chooser<
+ ::boost::type_traits::ice_and<
+ ::boost::type_traits::ice_not< ::boost::is_reference<T>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_convertible<T,double>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_pointer<T>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_member_pointer<T>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_array<T>::value >::value,
+ ::boost::type_traits::ice_not< ::boost::is_void<T>::value >::value,
+ ::boost::type_traits::ice_not<
+ ::boost::is_convertible<T,void const volatile*>::value
+ >::value
+ >::value > chooser;
+
+ typedef typename chooser::template result_<T> result;
+ typedef typename result::type eh_type;
+
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_or<eh_type::value, BOOST_IS_EMPTY(T)>::value));
+};
+
+#else
+
+template <typename T> struct is_empty_impl
+{
+ BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_EMPTY(T));
+};
+
+#endif // BOOST_MSVC6_MEMBER_TEMPLATES
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_empty,T,::boost::detail::is_empty_impl<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_EMPTY_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_ENUM_HPP_INCLUDED
+#define BOOST_TT_IS_ENUM_HPP_INCLUDED
+
+#include <boost_local/type_traits/add_reference.hpp>
+#include <boost_local/type_traits/is_arithmetic.hpp>
+#include <boost_local/type_traits/is_reference.hpp>
+#include <boost_local/type_traits/is_convertible.hpp>
+#include <boost_local/type_traits/config.hpp>
+
+#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
+# include <boost_local/type_traits/is_class.hpp>
+#endif
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+#if !(defined(__BORLANDC__) && (__BORLANDC__ <= 0x551))
+
+namespace detail {
+
+struct int_convertible
+{
+ int_convertible(int);
+};
+
+// Don't evaluate convertibility to int_convertible unless the type
+// is non-arithmetic. This suppresses warnings with GCC.
+template <bool is_typename_arithmetic_or_reference = true>
+struct is_enum_helper
+{
+ template <typename T> struct type
+ {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+};
+
+template <>
+struct is_enum_helper<false>
+{
+ template <typename T> struct type
+ : ::boost::is_convertible<T,::boost::detail::int_convertible>
+ {
+ };
+};
+
+template <typename T> struct is_enum_impl
+{
+ typedef ::boost::add_reference<T> ar_t;
+ typedef typename ar_t::type r_type;
+
+#if defined(BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION)
+ BOOST_STATIC_CONSTANT(bool, selector =
+ (::boost::type_traits::ice_or<
+ ::boost::is_arithmetic<T>::value
+ , ::boost::is_reference<T>::value
+ // We MUST do this on conforming compilers in order to
+ // correctly deduce that noncopyable types are not enums (dwa
+ // 2002/04/15)...
+ , ::boost::is_class<T>::value
+ >::value));
+#else
+ BOOST_STATIC_CONSTANT(bool, selector =
+ (::boost::type_traits::ice_or<
+ ::boost::is_arithmetic<T>::value
+ , ::boost::is_reference<T>::value
+ // However, not doing this on non-conforming compilers prevents
+ // a dependency recursion.
+ >::value));
+#endif
+
+#ifdef __BORLANDC__
+ typedef ::boost::detail::is_enum_helper<
+ ::boost::detail::is_enum_impl<T>::selector
+ > se_t;
+#else
+ typedef ::boost::detail::is_enum_helper<selector> se_t;
+#endif
+ typedef typename se_t::template type<r_type> helper;
+ BOOST_STATIC_CONSTANT(bool, value = helper::value);
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_enum,T,::boost::detail::is_enum_impl<T>::value)
+
+// Specializations suppress some nasty warnings with GCC
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_enum,float,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_enum,double,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_enum,long double,false)
+
+#else // __BORLANDC__
+//
+// buggy is_convertible prevents working
+// implementation of is_enum:
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_enum,T,BOOST_IS_ENUM(T))
+
+#endif
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_ENUM_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED
+#define BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+//* is a type T a floating-point type described in the standard (3.9.1p8)
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_float,T,false)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_float,float,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_float,double,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_float,long double,true)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED
--- /dev/null
+
+// Copyright (C) 2000 John Maddock (john_maddock@compuserve.com)
+// Copyright (C) 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com)
+//
+// Permission to copy and use this software is granted,
+// provided this copyright notice appears in all copies.
+// Permission to modify the code and to distribute modified code is granted,
+// provided this copyright notice appears in all copies, and a notice
+// that the code was modified is included with the copyright notice.
+//
+// This software is provided "as is" without express or implied warranty,
+// and with no claim as to its suitability for any purpose.
+
+#ifndef BOOST_TT_IS_FUNCTION_HPP_INCLUDED
+#define BOOST_TT_IS_FUNCTION_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_reference.hpp>
+#include <boost_local/type_traits/detail/false_result.hpp>
+#include <boost_local/config.hpp>
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+# include <boost_local/type_traits/detail/is_function_ptr_helper.hpp>
+#else
+# include <boost_local/type_traits/detail/is_function_ptr_tester.hpp>
+# include <boost_local/type_traits/detail/yes_no_type.hpp>
+#endif
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+// is a type a function?
+// Please note that this implementation is unnecessarily complex:
+// we could just use !is_convertible<T*, const volatile void*>::value,
+// except that some compilers erroneously allow conversions from
+// function pointers to void*.
+
+namespace boost {
+namespace detail {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+template<bool is_ref = true>
+struct is_function_chooser
+ : ::boost::type_traits::false_result
+{
+};
+
+template <>
+struct is_function_chooser<false>
+{
+ template< typename T > struct result_
+ : ::boost::type_traits::is_function_ptr_helper<T*>
+ {
+ };
+};
+
+template <typename T>
+struct is_function_impl
+ : is_function_chooser< ::boost::is_reference<T>::value >
+ ::template result_<T>
+{
+};
+
+#else
+
+template <typename T>
+struct is_function_impl
+{
+ static T* t;
+ BOOST_STATIC_CONSTANT(
+ bool, value = sizeof(::boost::type_traits::is_function_ptr_tester(t))
+ == sizeof(::boost::type_traits::yes_type)
+ );
+};
+
+#endif
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_function,T,::boost::detail::is_function_impl<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_FUNCTION_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED
+#define BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_arithmetic.hpp>
+#include <boost_local/type_traits/is_void.hpp>
+#include <boost_local/type_traits/detail/ice_or.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+struct is_fundamental_impl
+ : ::boost::type_traits::ice_or<
+ ::boost::is_arithmetic<T>::value
+ , ::boost::is_void<T>::value
+ >
+{
+};
+
+} // namespace detail
+
+//* is a type T a fundamental type described in the standard (3.9.1)
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_fundamental,T,::boost::detail::is_fundamental_impl<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_INTEGRAL_HPP_INCLUDED
+#define BOOST_TT_IS_INTEGRAL_HPP_INCLUDED
+
+#include <boost_local/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+//* is a type T an [cv-qualified-] integral type described in the standard (3.9.1p3)
+// as an extention we include long long, as this is likely to be added to the
+// standard at a later date
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_integral,T,false)
+
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned char,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned short,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned int,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned long,true)
+
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed char,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed short,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed int,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed long,true)
+
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,bool,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,char,true)
+
+#ifndef BOOST_NO_INTRINSIC_WCHAR_T
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,wchar_t,true)
+#endif
+
+# if defined(BOOST_HAS_LONG_LONG)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned long long,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,long long,true)
+#elif defined(BOOST_HAS_MS_INT64)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int64,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true)
+#endif
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_INTEGRAL_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED
+#define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED
+
+#include <boost_local/type_traits/config.hpp>
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(__BORLANDC__)
+# include <boost_local/type_traits/detail/is_mem_fun_pointer_impl.hpp>
+#else
+# include <boost_local/type_traits/is_reference.hpp>
+# include <boost_local/type_traits/is_array.hpp>
+# include <boost_local/type_traits/detail/is_mem_fun_pointer_tester.hpp>
+# include <boost_local/type_traits/detail/yes_no_type.hpp>
+# include <boost_local/type_traits/detail/false_result.hpp>
+# include <boost_local/type_traits/detail/ice_or.hpp>
+#endif
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(__BORLANDC__)
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(
+ is_member_function_pointer
+ , T
+ , ::boost::type_traits::is_mem_fun_pointer_impl<T>::value
+ )
+
+#else
+
+#ifndef __BORLANDC__
+
+namespace detail {
+
+template <bool>
+struct is_member_function_pointer_select
+ : ::boost::type_traits::false_result
+{
+};
+
+template <>
+struct is_member_function_pointer_select<false>
+{
+ template <typename T> struct result_
+ {
+ static T& make_t;
+ typedef result_<T> self_type;
+
+ BOOST_STATIC_CONSTANT(
+ bool, value = (
+ 1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(self_type::make_t))
+ ));
+ };
+};
+
+template <typename T>
+struct is_mem_fun_pointer_impl
+ : is_member_function_pointer_select<
+ ::boost::type_traits::ice_or<
+ ::boost::is_reference<T>::value
+ , ::boost::is_array<T>::value
+ >::value
+ >::template result_<T>
+{
+};
+
+} // namespace detail
+
+#else // Borland C++
+
+namespace detail {
+
+template <typename T>
+struct is_mem_fun_pointer_impl
+{
+ static T& m_t;
+ BOOST_STATIC_CONSTANT(
+ bool, value =
+ (1 == sizeof(type_traits::is_mem_fun_pointer_tester(m_t))) );
+};
+
+template <typename T>
+struct is_mem_fun_pointer_impl<T&>
+{
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+} // namespace detail
+
+#endif
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_function_pointer,T,::boost::detail::is_mem_fun_pointer_impl<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_function_pointer,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_function_pointer,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_function_pointer,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_function_pointer,void const volatile,false)
+#endif
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED
+#define BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED
+
+#include <boost_local/type_traits/config.hpp>
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(__BORLANDC__)
+# include <boost_local/type_traits/is_member_function_pointer.hpp>
+#else
+# include <boost_local/type_traits/is_reference.hpp>
+# include <boost_local/type_traits/is_array.hpp>
+# include <boost_local/type_traits/detail/is_mem_fun_pointer_tester.hpp>
+# include <boost_local/type_traits/detail/yes_no_type.hpp>
+# include <boost_local/type_traits/detail/false_result.hpp>
+# include <boost_local/type_traits/detail/ice_or.hpp>
+#endif
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+#if defined(__BORLANDC__)
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true)
+
+#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,::boost::is_member_function_pointer<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true)
+
+#else // no partial template specialization
+
+namespace detail {
+
+template <typename R, typename T>
+::boost::type_traits::yes_type BOOST_TT_DECL is_member_pointer_tester(R T::*);
+::boost::type_traits::no_type BOOST_TT_DECL is_member_pointer_tester(...);
+
+template <bool>
+struct is_member_pointer_select
+ : ::boost::type_traits::false_result
+{
+};
+
+template <>
+struct is_member_pointer_select<false>
+{
+ template <typename T> struct result_
+ {
+ static T& make_t();
+ BOOST_STATIC_CONSTANT(
+ bool, value =
+ (::boost::type_traits::ice_or<
+ (1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(make_t()))),
+ (1 == sizeof(is_member_pointer_tester(make_t())))
+ >::value) );
+ };
+};
+
+template <typename T>
+struct is_member_pointer_impl
+ : is_member_pointer_select<
+ ::boost::type_traits::ice_or<
+ ::boost::is_reference<T>::value
+ , ::boost::is_array<T>::value
+ >::value
+ >::template result_<T>
+{
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,::boost::detail::is_member_pointer_impl<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_pointer,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_pointer,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_pointer,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_pointer,void const volatile,false)
+#endif
+
+#endif // __BORLANDC__
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_OBJECT_HPP_INCLUDED
+#define BOOST_TT_IS_OBJECT_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_reference.hpp>
+#include <boost_local/type_traits/is_void.hpp>
+#include <boost_local/type_traits/is_function.hpp>
+#include <boost_local/type_traits/detail/ice_and.hpp>
+#include <boost_local/type_traits/detail/ice_not.hpp>
+#include <boost_local/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+struct is_object_impl
+{
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_and<
+ ::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value,
+ ::boost::type_traits::ice_not< ::boost::is_void<T>::value>::value,
+ ::boost::type_traits::ice_not< ::boost::is_function<T>::value>::value
+ >::value));
+#else
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_and<
+ ::boost::type_traits::ice_not< ::boost::is_reference<T>::value>::value,
+ ::boost::type_traits::ice_not< ::boost::is_void<T>::value>::value
+ >::value));
+#endif
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_object,T,::boost::detail::is_object_impl<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_OBJECT_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_POINTER_HPP_INCLUDED
+#define BOOST_TT_IS_POINTER_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_member_pointer.hpp>
+#include <boost_local/type_traits/detail/ice_and.hpp>
+#include <boost_local/type_traits/detail/ice_not.hpp>
+#include <boost_local/type_traits/config.hpp>
+
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+# include <boost_local/type_traits/is_reference.hpp>
+# include <boost_local/type_traits/is_array.hpp>
+# include <boost_local/type_traits/detail/is_function_ptr_tester.hpp>
+# include <boost_local/type_traits/detail/false_result.hpp>
+# include <boost_local/type_traits/detail/ice_or.hpp>
+#endif
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+namespace detail {
+
+template< typename T > struct is_pointer_helper
+{
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+# define TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(helper,sp,result) \
+template< typename T > struct helper<sp> \
+{ \
+ BOOST_STATIC_CONSTANT(bool, value = result); \
+}; \
+/**/
+
+TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(is_pointer_helper,T*,true)
+TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(is_pointer_helper,T* const,true)
+TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(is_pointer_helper,T* volatile,true)
+TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(is_pointer_helper,T* const volatile,true)
+
+# undef TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC
+
+template< typename T >
+struct is_pointer_impl
+{
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_and<
+ ::boost::detail::is_pointer_helper<T>::value
+ , ::boost::type_traits::ice_not<
+ ::boost::is_member_pointer<T>::value
+ >::value
+ >::value)
+ );
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,::boost::detail::is_pointer_impl<T>::value)
+
+#else // no partial template specialization
+
+namespace detail {
+
+struct pointer_helper
+{
+ pointer_helper(const volatile void*);
+};
+
+yes_type BOOST_TT_DECL is_pointer_tester(pointer_helper);
+no_type BOOST_TT_DECL is_pointer_tester(...);
+
+template <bool>
+struct is_pointer_select
+ : ::boost::type_traits::false_result
+{
+};
+
+template <>
+struct is_pointer_select<false>
+{
+ template <typename T> struct result_
+ {
+ static T& make_t();
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_or<
+ (1 == sizeof(is_pointer_tester(make_t()))),
+ (1 == sizeof(type_traits::is_function_ptr_tester(make_t())))
+ >::value));
+ };
+};
+
+template <typename T>
+struct is_pointer_impl
+ : is_pointer_select<
+ ::boost::type_traits::ice_or<
+ ::boost::is_reference<T>::value
+ , ::boost::is_array<T>::value
+ >::value
+ >::template result_<T>
+{
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,::boost::detail::is_pointer_impl<T>::value)
+
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pointer,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pointer,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pointer,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pointer,void const volatile,false)
+#endif
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_POINTER_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright David Abrahams Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000-2002. Permission to copy, use,
+// modify, sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_REFERENCE_HPP_INCLUDED
+#define BOOST_TT_IS_REFERENCE_HPP_INCLUDED
+
+#include <boost_local/type_traits/config.hpp>
+
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+# include <boost_local/type_traits/detail/yes_no_type.hpp>
+# include <boost_local/type_traits/detail/wrap.hpp>
+#endif
+
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && defined(BOOST_MSVC)
+# include <boost_local/type_traits/detail/is_function_type_tester.hpp>
+# include <boost_local/type_traits/detail/false_result.hpp>
+#endif
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T&,true)
+
+#if defined(__BORLANDC__)
+// these are illegal specialisations; cv-qualifies applied to
+// references have no effect according to [8.3.2p1],
+// C++ Builder requires them though as it treats cv-qualified
+// references as distinct types...
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T& const,true)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T& volatile,true)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T& const volatile,true)
+#endif
+
+#else
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4181)
+#endif
+
+namespace detail {
+
+using ::boost::type_traits::yes_type;
+using ::boost::type_traits::no_type;
+using ::boost::type_traits::wrap;
+
+template <class T> T&(* is_reference_helper1(wrap<T>) )(wrap<T>);
+char is_reference_helper1(...);
+
+template <class T> no_type is_reference_helper2(T&(*)(wrap<T>));
+yes_type is_reference_helper2(...);
+
+template <typename T>
+struct is_reference_impl
+{
+ BOOST_STATIC_CONSTANT(
+ bool, value = sizeof(
+ ::boost::detail::is_reference_helper2(
+ ::boost::detail::is_reference_helper1(::boost::type_traits::wrap<T>()))) == 1
+ );
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,::boost::detail::is_reference_impl<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_reference,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_reference,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_reference,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_reference,void const volatile,false)
+#endif
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Aleksey Gurtovoy,
+// Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This
+// software is provided "as is" without express or implied warranty, and
+// with no claim as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_SAME_HPP_INCLUDED
+#define BOOST_TT_IS_SAME_HPP_INCLUDED
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_same,T,U,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename T,is_same,T,T,true)
+
+#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+namespace detail {
+
+#ifdef BOOST_MSVC
+// the following VC6 specific implementation is *NOT* legal
+// C++, but has the advantage that it works for incomplete
+// types.
+
+template< typename T1 >
+struct is_same_part_1
+{
+ template<typename T2> struct part_2 { enum { value = false }; };
+ template<> struct part_2<T1> { enum { value = true }; };
+};
+
+template< typename T1, typename T2 >
+struct is_same_impl
+{
+ enum { value = detail::is_same_part_1<T1>::template part_2<T2>::value };
+};
+
+#else // generic "no-partial-specialization" version
+
+template <typename T>
+::boost::type_traits::yes_type
+BOOST_TT_DECL is_same_tester(T*, T*);
+
+::boost::type_traits::no_type
+BOOST_TT_DECL is_same_tester(...);
+
+template <typename T, typename U>
+struct is_same_impl
+{
+ static T t;
+ static U u;
+
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_and<
+ (sizeof(type_traits::yes_type) == sizeof(detail::is_same_tester(&t,&u))),
+ (::boost::is_reference<T>::value == ::boost::is_reference<U>::value),
+ (sizeof(T) == sizeof(U))
+ >::value));
+};
+
+#endif // BOOST_MSVC
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_same,T,U,(::boost::detail::is_same_impl<T,U>::value))
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_SAME_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and
+// distribute this software is granted provided this copyright notice appears
+// in all copies. This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_SCALAR_HPP_INCLUDED
+#define BOOST_TT_IS_SCALAR_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_arithmetic.hpp>
+#include <boost_local/type_traits/is_enum.hpp>
+#include <boost_local/type_traits/is_pointer.hpp>
+#include <boost_local/type_traits/is_member_pointer.hpp>
+#include <boost_local/type_traits/detail/ice_or.hpp>
+#include <boost_local/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+struct is_scalar_impl
+{
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_or<
+ ::boost::is_arithmetic<T>::value,
+ ::boost::is_enum<T>::value,
+ ::boost::is_pointer<T>::value,
+ ::boost::is_member_pointer<T>::value
+ >::value));
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_scalar,T,::boost::detail::is_scalar_impl<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_SCALAR_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_STATELESS_HPP_INCLUDED
+#define BOOST_TT_IS_STATELESS_HPP_INCLUDED
+
+#include <boost_local/type_traits/has_trivial_constructor.hpp>
+#include <boost_local/type_traits/has_trivial_copy.hpp>
+#include <boost_local/type_traits/has_trivial_destructor.hpp>
+#include <boost_local/type_traits/is_class.hpp>
+#include <boost_local/type_traits/is_empty.hpp>
+#include <boost_local/type_traits/detail/ice_and.hpp>
+#include <boost_local/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+
+template <typename T>
+struct is_stateless_impl
+{
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_and<
+ ::boost::has_trivial_constructor<T>::value,
+ ::boost::has_trivial_copy<T>::value,
+ ::boost::has_trivial_destructor<T>::value,
+ ::boost::is_class<T>::value,
+ ::boost::is_empty<T>::value
+ >::value));
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_stateless,T,::boost::detail::is_stateless_impl<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_STATELESS_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_UNION_HPP_INCLUDED
+#define BOOST_TT_IS_UNION_HPP_INCLUDED
+
+#include <boost_local/type_traits/remove_cv.hpp>
+#include <boost_local/type_traits/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+namespace detail {
+template <typename T> struct is_union_impl
+{
+ typedef typename remove_cv<T>::type cvt;
+ BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(cvt));
+};
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_union,T,::boost::detail::is_union_impl<T>::value)
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_UNION_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_VOID_HPP_INCLUDED
+#define BOOST_TT_IS_VOID_HPP_INCLUDED
+
+#include <boost_local/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+//* is a type T void - is_void<T>
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_void,T,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void,true)
+
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void const,true)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void volatile,true)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void const volatile,true)
+#endif
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_VOID_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_VOLATILE_HPP_INCLUDED
+#define BOOST_TT_IS_VOLATILE_HPP_INCLUDED
+
+#include <boost_local/config.hpp>
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+# include <boost_local/type_traits/detail/cv_traits_impl.hpp>
+#else
+# include <boost_local/type_traits/is_reference.hpp>
+# include <boost_local/type_traits/is_array.hpp>
+# include <boost_local/type_traits/detail/yes_no_type.hpp>
+# include <boost_local/type_traits/detail/false_result.hpp>
+#endif
+
+// should be the last #include
+#include <boost_local/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+//* is a type T declared volatile - is_volatile<T>
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::cv_traits_imp<T*>::is_volatile)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T&,false)
+
+#if defined(__BORLANDC__)
+// these are illegal specialisations; cv-qualifies applied to
+// references have no effect according to [8.3.2p1],
+// C++ Builder requires them though as it treats cv-qualified
+// references as distinct types...
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T& const,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T& volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T& const volatile,false)
+#endif
+
+#else
+
+namespace detail {
+
+using ::boost::type_traits::yes_type;
+using ::boost::type_traits::no_type;
+
+yes_type is_volatile_tester(void const volatile*);
+no_type is_volatile_tester(void const*);
+
+template <bool is_ref, bool array>
+struct is_volatile_helper
+ : ::boost::type_traits::false_result
+{
+};
+
+template <>
+struct is_volatile_helper<false,false>
+{
+ template <typename T> struct result_
+ {
+ static T* t;
+ BOOST_STATIC_CONSTANT(bool, value = (
+ sizeof(detail::yes_type) == sizeof(detail::is_volatile_tester(t))
+ ));
+ };
+};
+
+template <>
+struct is_volatile_helper<false,true>
+{
+ template <typename T> struct result_
+ {
+ static T t;
+ BOOST_STATIC_CONSTANT(bool, value = (
+ sizeof(detail::yes_type) == sizeof(detail::is_volatile_tester(&t))
+ ));
+ };
+};
+
+template <typename T>
+struct is_volatile_impl
+ : is_volatile_helper<
+ is_reference<T>::value
+ , is_array<T>::value
+ >::template result_<T>
+{
+};
+
+} // namespace detail
+
+//* is a type T declared volatile - is_volatile<T>
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::is_volatile_impl<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_volatile,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_volatile,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_volatile,void volatile,true)
+BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_volatile,void const volatile,true)
+#endif
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_VOLATILE_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED
+#define BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED
+
+#include <boost_local/config.hpp>
+#include <cstddef>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/type_trait_def.hpp>
+
+namespace boost {
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_bounds,T,T)
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T[N],T type)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T const[N],T const type)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T volatile[N],T volatile type)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T const volatile[N],T const volatile type)
+#endif
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_REMOVE_CONST_HPP_INCLUDED
+#define BOOST_TT_REMOVE_CONST_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_volatile.hpp>
+#include <boost_local/type_traits/broken_compiler_spec.hpp>
+#include <boost_local/type_traits/detail/cv_traits_impl.hpp>
+#include <boost_local/config.hpp>
+
+#include <cstddef>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/type_trait_def.hpp>
+
+namespace boost {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+namespace detail {
+
+template <typename T, bool is_vol>
+struct remove_const_helper
+{
+ typedef T type;
+};
+
+template <typename T>
+struct remove_const_helper<T, true>
+{
+ typedef T volatile type;
+};
+
+
+template <typename T>
+struct remove_const_impl
+{
+ typedef typename remove_const_helper<
+ typename cv_traits_imp<T*>::unqualified_type
+ , ::boost::is_volatile<T>::value
+ >::type type;
+};
+
+} // namespace detail
+
+// * convert a type T to non-const type - remove_const<T>
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_const,T,typename detail::remove_const_impl<T>::type)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_const,T&,T&)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_const,T const[N],T type[N])
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_const,T const volatile[N],T volatile type[N])
+
+#else
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_const,T,T)
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_TT_REMOVE_CONST_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_REMOVE_CV_HPP_INCLUDED
+#define BOOST_TT_REMOVE_CV_HPP_INCLUDED
+
+#include <boost_local/type_traits/broken_compiler_spec.hpp>
+#include <boost_local/type_traits/detail/cv_traits_impl.hpp>
+#include <boost_local/config.hpp>
+
+#include <cstddef>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/type_trait_def.hpp>
+
+namespace boost {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+// convert a type T to a non-cv-qualified type - remove_cv<T>
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename detail::cv_traits_imp<T*>::unqualified_type)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_cv,T&,T&)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const[N],T type[N])
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T volatile[N],T type[N])
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const volatile[N],T type[N])
+
+#else
+
+// doesn't work
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,T)
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_TT_REMOVE_CV_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_REMOVE_POINTER_HPP_INCLUDED
+#define BOOST_TT_REMOVE_POINTER_HPP_INCLUDED
+
+#include <boost_local/type_traits/broken_compiler_spec.hpp>
+#include <boost_local/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/type_trait_def.hpp>
+
+namespace boost {
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,T)
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T*,T)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const,T)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* volatile,T)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const volatile,T)
+#endif
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_TT_REMOVE_POINTER_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED
+#define BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED
+
+#include <boost_local/type_traits/broken_compiler_spec.hpp>
+#include <boost_local/config.hpp>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/type_trait_def.hpp>
+
+namespace boost {
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,T)
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T&,T)
+
+#if defined(__BORLANDC__)
+// these are illegal specialisations; cv-qualifies applied to
+// references have no effect according to [8.3.2p1],
+// C++ Builder requires them though as it treats cv-qualified
+// references as distinct types...
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& const,T)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& volatile,T)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& const volatile,T)
+#endif
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED
+#define BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED
+
+#include <boost_local/type_traits/is_const.hpp>
+#include <boost_local/type_traits/broken_compiler_spec.hpp>
+#include <boost_local/type_traits/detail/cv_traits_impl.hpp>
+#include <boost_local/config.hpp>
+
+#include <cstddef>
+
+// should be the last #include
+#include <boost_local/type_traits/detail/type_trait_def.hpp>
+
+namespace boost {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+namespace detail {
+
+template <typename T, bool is_const>
+struct remove_volatile_helper
+{
+ typedef T type;
+};
+
+template <typename T>
+struct remove_volatile_helper<T,true>
+{
+ typedef T const type;
+};
+
+template <typename T>
+struct remove_volatile_impl
+{
+ typedef typename remove_volatile_helper<
+ typename cv_traits_imp<T*>::unqualified_type
+ , ::boost::is_const<T>::value
+ >::type type;
+};
+
+} // namespace detail
+
+// * convert a type T to a non-volatile type - remove_volatile<T>
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,typename detail::remove_volatile_impl<T>::type)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_volatile,T&,T&)
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile,T volatile[N],T type[N])
+BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile,T const volatile[N],T const type[N])
+
+#else
+
+// doesn't work
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,T)
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace boost
+
+#include <boost_local/type_traits/detail/type_trait_undef.hpp>
+
+#endif // BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED
--- /dev/null
+
+// (C) Copyright John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This
+// software is provided "as is" without express or implied warranty,
+// and with no claim as to its suitability for any purpose.
+
+#ifndef BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED
+#define BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED
+
+#include <boost_local/mpl/if.hpp>
+#include <boost_local/preprocessor/list/for_each_i.hpp>
+#include <boost_local/preprocessor/tuple/to_list.hpp>
+#include <boost_local/preprocessor/cat.hpp>
+#include <boost_local/type_traits/alignment_of.hpp>
+#include <boost_local/static_assert.hpp>
+#include <boost_local/config.hpp>
+
+#include <cstddef>
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4121) // alignment is sensitive to packing
+#endif
+
+namespace boost {
+
+namespace detail {
+
+class alignment_dummy;
+typedef void (*function_ptr)();
+typedef int (alignment_dummy::*member_ptr);
+typedef int (alignment_dummy::*member_function_ptr)();
+
+#define BOOST_TT_ALIGNMENT_TYPES BOOST_PP_TUPLE_TO_LIST( \
+ 11, ( \
+ char, short, int, long, float, double, long double \
+ , void*, function_ptr, member_ptr, member_function_ptr))
+
+#define BOOST_TT_CHOOSE_MIN_ALIGNMENT(R,P,I,T) \
+ typename mpl::if_c< \
+ alignment_of<T>::value <= target, T, char>::type BOOST_PP_CAT(t,I);
+
+#define BOOST_TT_CHOOSE_T(R,P,I,T) T BOOST_PP_CAT(t,I);
+
+template <std::size_t target>
+union lower_alignment
+{
+ BOOST_PP_LIST_FOR_EACH_I(
+ BOOST_TT_CHOOSE_MIN_ALIGNMENT
+ , ignored
+ , BOOST_TT_ALIGNMENT_TYPES
+ )
+};
+
+union max_align
+{
+ BOOST_PP_LIST_FOR_EACH_I(
+ BOOST_TT_CHOOSE_T
+ , ignored
+ , BOOST_TT_ALIGNMENT_TYPES
+ )
+};
+
+#undef BOOST_TT_ALIGNMENT_TYPES
+#undef BOOST_TT_CHOOSE_MIN_ALIGNMENT
+#undef BOOST_TT_CHOOSE_T
+
+template<int TAlign, int Align>
+struct is_aligned
+{
+ BOOST_STATIC_CONSTANT(bool,
+ value = (TAlign >= Align) & (TAlign % Align == 0)
+ );
+};
+
+} // namespace detail
+
+// This alignment method originally due to Brian Parker, implemented by David
+// Abrahams, and then ported here by Doug Gregor.
+template <int Align>
+class type_with_alignment
+{
+ typedef detail::lower_alignment<Align> t1;
+ typedef typename mpl::if_c<
+ ::boost::detail::is_aligned< ::boost::alignment_of<t1>::value,Align >::value
+ , t1
+ , detail::max_align
+ >::type align_t;
+
+ BOOST_STATIC_CONSTANT(std::size_t, found = alignment_of<align_t>::value);
+
+ BOOST_STATIC_ASSERT(found >= Align);
+ BOOST_STATIC_ASSERT(found % Align == 0);
+
+ public:
+ typedef align_t type;
+};
+
+} // namespace boost
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+#endif // BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED
--- /dev/null
+// Copyright (C) 2002 Brad King (brad.king@kitware.com)
+// Doug Gregor (gregod@cs.rpi.edu)
+// Peter Dimov
+//
+// Permission to copy, use, sell and distribute this software is granted
+// provided this copyright notice appears in all copies.
+// Permission to modify the code and to distribute modified code is granted
+// provided this copyright notice appears in all copies, and a notice
+// that the code was modified is included with the copyright notice.
+//
+// This software is provided "as is" without express or implied warranty,
+// and with no claim as to its suitability for any purpose.
+
+// For more information, see http://www.boost.org
+
+#ifndef BOOST_UTILITY_ADDRESSOF_HPP
+#define BOOST_UTILITY_ADDRESSOF_HPP
+
+namespace boost {
+
+// Do not make addressof() inline. Breaks MSVC 7. (Peter Dimov)
+
+template <typename T> T* addressof(T& v)
+{
+ return reinterpret_cast<T*>(
+ &const_cast<char&>(reinterpret_cast<const volatile char &>(v)));
+}
+
+}
+
+#endif // BOOST_UTILITY_ADDRESSOF_HPP