compilation fixes for OSX, added some boost files

metadata
Wenzel Jakob 2010-09-29 18:06:18 +02:00
parent f74e40f8cc
commit 5ee46b1f47
248 changed files with 14547 additions and 6734 deletions

View File

@ -1,16 +1,16 @@
#ifndef PLY_PLY_HPP_INCLUDED
#define PLY_PLY_HPP_INCLUDED
#include <tr1/cstdint>
#include <boost/cstdint.hpp>
namespace ply {
typedef std::tr1::int8_t int8;
typedef std::tr1::int16_t int16;
typedef std::tr1::int32_t int32;
typedef std::tr1::uint8_t uint8;
typedef std::tr1::uint16_t uint16;
typedef std::tr1::uint32_t uint32;
typedef boost::int8_t int8;
typedef boost::int16_t int16;
typedef boost::int32_t int32;
typedef boost::uint8_t uint8;
typedef boost::uint16_t uint16;
typedef boost::uint32_t uint32;
typedef float float32;
typedef double float64;

View File

@ -1,46 +0,0 @@
// Copyright David Abrahams 2006. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_CONCEPT_ASSERT_DWA2006430_HPP
# define BOOST_CONCEPT_ASSERT_DWA2006430_HPP
# include <boost/config.hpp>
# include <boost/detail/workaround.hpp>
// The old protocol used a constraints() member function in concept
// checking classes. If the compiler supports SFINAE, we can detect
// that function and seamlessly support the old concept checking
// classes. In this release, backward compatibility with the old
// concept checking classes is enabled by default, where available.
// The old protocol is deprecated, though, and backward compatibility
// will no longer be the default in the next release.
# if !defined(BOOST_NO_OLD_CONCEPT_SUPPORT) \
&& !defined(BOOST_NO_SFINAE) \
\
&& !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4)) \
&& !(BOOST_WORKAROUND(__GNUC__, == 2))
// Note: gcc-2.96 through 3.3.x have some SFINAE, but no ability to
// check for the presence of particularmember functions.
# define BOOST_OLD_CONCEPT_SUPPORT
# endif
# ifdef BOOST_MSVC
# include <boost/concept/detail/msvc.hpp>
# elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
# include <boost/concept/detail/borland.hpp>
# else
# include <boost/concept/detail/general.hpp>
# endif
// Usage, in class or function context:
//
// BOOST_CONCEPT_ASSERT((UnaryFunctionConcept<F,bool,int>));
//
# define BOOST_CONCEPT_ASSERT(ModelInParens) \
BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens)
#endif // BOOST_CONCEPT_ASSERT_DWA2006430_HPP

View File

@ -1,446 +1,446 @@
// boost cstdint.hpp header file ------------------------------------------//
// (C) Copyright Beman Dawes 1999.
// (C) Copyright Jens Mauer 2001
// (C) Copyright John Maddock 2001
// Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/integer for documentation.
// Revision History
// 31 Oct 01 use BOOST_HAS_LONG_LONG to check for "long long" (Jens M.)
// 16 Apr 01 check LONGLONG_MAX when looking for "long long" (Jens Maurer)
// 23 Jan 01 prefer "long" over "int" for int32_t and intmax_t (Jens Maurer)
// 12 Nov 00 Merged <boost/stdint.h> (Jens Maurer)
// 23 Sep 00 Added INTXX_C macro support (John Maddock).
// 22 Sep 00 Better 64-bit support (John Maddock)
// 29 Jun 00 Reimplement to avoid including stdint.h within namespace boost
// 8 Aug 99 Initial version (Beman Dawes)
#ifndef BOOST_CSTDINT_HPP
#define BOOST_CSTDINT_HPP
#include <boost/config.hpp>
#ifdef BOOST_HAS_STDINT_H
// The following #include is an implementation artifact; not part of interface.
# ifdef __hpux
// HP-UX has a vaguely nice <stdint.h> in a non-standard location
# include <inttypes.h>
# ifdef __STDC_32_MODE__
// this is triggered with GCC, because it defines __cplusplus < 199707L
# define BOOST_NO_INT64_T
# endif
# elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX)
# include <inttypes.h>
# else
# include <stdint.h>
// There is a bug in Cygwin two _C macros
# if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__)
# undef INTMAX_C
# undef UINTMAX_C
# define INTMAX_C(c) c##LL
# define UINTMAX_C(c) c##ULL
# endif
# endif
#ifdef __QNX__
// QNX (Dinkumware stdlib) defines these as non-standard names.
// Reflect to the standard names.
typedef ::intleast8_t int_least8_t;
typedef ::intfast8_t int_fast8_t;
typedef ::uintleast8_t uint_least8_t;
typedef ::uintfast8_t uint_fast8_t;
typedef ::intleast16_t int_least16_t;
typedef ::intfast16_t int_fast16_t;
typedef ::uintleast16_t uint_least16_t;
typedef ::uintfast16_t uint_fast16_t;
typedef ::intleast32_t int_least32_t;
typedef ::intfast32_t int_fast32_t;
typedef ::uintleast32_t uint_least32_t;
typedef ::uintfast32_t uint_fast32_t;
# ifndef BOOST_NO_INT64_T
typedef ::intleast64_t int_least64_t;
typedef ::intfast64_t int_fast64_t;
typedef ::uintleast64_t uint_least64_t;
typedef ::uintfast64_t uint_fast64_t;
# endif
#endif
namespace boost
{
using ::int8_t;
using ::int_least8_t;
using ::int_fast8_t;
using ::uint8_t;
using ::uint_least8_t;
using ::uint_fast8_t;
using ::int16_t;
using ::int_least16_t;
using ::int_fast16_t;
using ::uint16_t;
using ::uint_least16_t;
using ::uint_fast16_t;
using ::int32_t;
using ::int_least32_t;
using ::int_fast32_t;
using ::uint32_t;
using ::uint_least32_t;
using ::uint_fast32_t;
# ifndef BOOST_NO_INT64_T
using ::int64_t;
using ::int_least64_t;
using ::int_fast64_t;
using ::uint64_t;
using ::uint_least64_t;
using ::uint_fast64_t;
# endif
using ::intmax_t;
using ::uintmax_t;
} // namespace boost
#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__)
// FreeBSD and Tru64 have an <inttypes.h> that contains much of what we need.
# include <inttypes.h>
namespace boost {
using ::int8_t;
typedef int8_t int_least8_t;
typedef int8_t int_fast8_t;
using ::uint8_t;
typedef uint8_t uint_least8_t;
typedef uint8_t uint_fast8_t;
using ::int16_t;
typedef int16_t int_least16_t;
typedef int16_t int_fast16_t;
using ::uint16_t;
typedef uint16_t uint_least16_t;
typedef uint16_t uint_fast16_t;
using ::int32_t;
typedef int32_t int_least32_t;
typedef int32_t int_fast32_t;
using ::uint32_t;
typedef uint32_t uint_least32_t;
typedef uint32_t uint_fast32_t;
# ifndef BOOST_NO_INT64_T
using ::int64_t;
typedef int64_t int_least64_t;
typedef int64_t int_fast64_t;
using ::uint64_t;
typedef uint64_t uint_least64_t;
typedef uint64_t uint_fast64_t;
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
# else
typedef int32_t intmax_t;
typedef uint32_t uintmax_t;
# endif
} // namespace boost
#else // BOOST_HAS_STDINT_H
# include <boost/limits.hpp> // implementation artifact; not part of interface
# include <limits.h> // needed for limits macros
namespace boost
{
// These are fairly safe guesses for some 16-bit, and most 32-bit and 64-bit
// platforms. For other systems, they will have to be hand tailored.
//
// Because the fast types are assumed to be the same as the undecorated types,
// it may be possible to hand tailor a more efficient implementation. Such
// an optimization may be illusionary; on the Intel x86-family 386 on, for
// example, byte arithmetic and load/stores are as fast as "int" sized ones.
// 8-bit types ------------------------------------------------------------//
# if UCHAR_MAX == 0xff
typedef signed char int8_t;
typedef signed char int_least8_t;
typedef signed char int_fast8_t;
typedef unsigned char uint8_t;
typedef unsigned char uint_least8_t;
typedef unsigned char uint_fast8_t;
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
// 16-bit types -----------------------------------------------------------//
# if USHRT_MAX == 0xffff
# if defined(__crayx1)
// The Cray X1 has a 16-bit short, however it is not recommend
// for use in performance critical code.
typedef short int16_t;
typedef short int_least16_t;
typedef int int_fast16_t;
typedef unsigned short uint16_t;
typedef unsigned short uint_least16_t;
typedef unsigned int uint_fast16_t;
# else
typedef short int16_t;
typedef short int_least16_t;
typedef short int_fast16_t;
typedef unsigned short uint16_t;
typedef unsigned short uint_least16_t;
typedef unsigned short uint_fast16_t;
# endif
# elif (USHRT_MAX == 0xffffffff) && defined(CRAY)
// no 16-bit types on Cray:
typedef short int_least16_t;
typedef short int_fast16_t;
typedef unsigned short uint_least16_t;
typedef unsigned short uint_fast16_t;
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
// 32-bit types -----------------------------------------------------------//
# if ULONG_MAX == 0xffffffff
typedef long int32_t;
typedef long int_least32_t;
typedef long int_fast32_t;
typedef unsigned long uint32_t;
typedef unsigned long uint_least32_t;
typedef unsigned long uint_fast32_t;
# elif UINT_MAX == 0xffffffff
typedef int int32_t;
typedef int int_least32_t;
typedef int int_fast32_t;
typedef unsigned int uint32_t;
typedef unsigned int uint_least32_t;
typedef unsigned int uint_fast32_t;
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
// 64-bit types + intmax_t and uintmax_t ----------------------------------//
# if defined(BOOST_HAS_LONG_LONG) && \
!defined(BOOST_MSVC) && !defined(__BORLANDC__) && \
(!defined(__GLIBCPP__) || defined(_GLIBCPP_USE_LONG_LONG)) && \
(defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
# if defined(__hpux)
// HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions
# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL)
// 2**64 - 1
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
typedef ::boost::long_long_type intmax_t;
typedef ::boost::ulong_long_type uintmax_t;
typedef ::boost::long_long_type int64_t;
typedef ::boost::long_long_type int_least64_t;
typedef ::boost::long_long_type int_fast64_t;
typedef ::boost::ulong_long_type uint64_t;
typedef ::boost::ulong_long_type uint_least64_t;
typedef ::boost::ulong_long_type uint_fast64_t;
# elif ULONG_MAX != 0xffffffff
# if ULONG_MAX == 18446744073709551615 // 2**64 - 1
typedef long intmax_t;
typedef unsigned long uintmax_t;
typedef long int64_t;
typedef long int_least64_t;
typedef long int_fast64_t;
typedef unsigned long uint64_t;
typedef unsigned long uint_least64_t;
typedef unsigned long uint_fast64_t;
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
# elif defined(__GNUC__) && defined(BOOST_HAS_LONG_LONG)
__extension__ typedef long long intmax_t;
__extension__ typedef unsigned long long uintmax_t;
__extension__ typedef long long int64_t;
__extension__ typedef long long int_least64_t;
__extension__ typedef long long int_fast64_t;
__extension__ typedef unsigned long long uint64_t;
__extension__ typedef unsigned long long uint_least64_t;
__extension__ typedef unsigned long long uint_fast64_t;
# elif defined(BOOST_HAS_MS_INT64)
//
// we have Borland/Intel/Microsoft __int64:
//
typedef __int64 intmax_t;
typedef unsigned __int64 uintmax_t;
typedef __int64 int64_t;
typedef __int64 int_least64_t;
typedef __int64 int_fast64_t;
typedef unsigned __int64 uint64_t;
typedef unsigned __int64 uint_least64_t;
typedef unsigned __int64 uint_fast64_t;
# else // assume no 64-bit integers
# define BOOST_NO_INT64_T
typedef int32_t intmax_t;
typedef uint32_t uintmax_t;
# endif
} // namespace boost
#endif // BOOST_HAS_STDINT_H
#endif // BOOST_CSTDINT_HPP
/****************************************************
Macro definition section:
Define various INTXX_C macros only if
__STDC_CONSTANT_MACROS is defined.
Undefine the macros if __STDC_CONSTANT_MACROS is
not defined and the macros are (cf <cassert>).
Added 23rd September 2000 (John Maddock).
Modified 11th September 2001 to be excluded when
BOOST_HAS_STDINT_H is defined (John Maddock).
******************************************************/
#if defined(__STDC_CONSTANT_MACROS) && !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && !defined(BOOST_HAS_STDINT_H)
# define BOOST__STDC_CONSTANT_MACROS_DEFINED
# if defined(BOOST_HAS_MS_INT64)
//
// Borland/Intel/Microsoft compilers have width specific suffixes:
//
# define INT8_C(value) value##i8
# define INT16_C(value) value##i16
# define INT32_C(value) value##i32
# define INT64_C(value) value##i64
# ifdef __BORLANDC__
// Borland bug: appending ui8 makes the type a signed char
# define UINT8_C(value) static_cast<unsigned char>(value##u)
# else
# define UINT8_C(value) value##ui8
# endif
# define UINT16_C(value) value##ui16
# define UINT32_C(value) value##ui32
# define UINT64_C(value) value##ui64
# define INTMAX_C(value) value##i64
# define UINTMAX_C(value) value##ui64
# else
// do it the old fashioned way:
// 8-bit types ------------------------------------------------------------//
# if UCHAR_MAX == 0xff
# define INT8_C(value) static_cast<boost::int8_t>(value)
# define UINT8_C(value) static_cast<boost::uint8_t>(value##u)
# endif
// 16-bit types -----------------------------------------------------------//
# if USHRT_MAX == 0xffff
# define INT16_C(value) static_cast<boost::int16_t>(value)
# define UINT16_C(value) static_cast<boost::uint16_t>(value##u)
# endif
// 32-bit types -----------------------------------------------------------//
# if UINT_MAX == 0xffffffff
# define INT32_C(value) value
# define UINT32_C(value) value##u
# elif ULONG_MAX == 0xffffffff
# define INT32_C(value) value##L
# define UINT32_C(value) value##uL
# endif
// 64-bit types + intmax_t and uintmax_t ----------------------------------//
# if defined(BOOST_HAS_LONG_LONG) && \
(defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
# if defined(__hpux)
// HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions
# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615U) || \
(defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615U) || \
(defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615U)
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
# define INT64_C(value) value##LL
# define UINT64_C(value) value##uLL
# elif ULONG_MAX != 0xffffffff
# if ULONG_MAX == 18446744073709551615 // 2**64 - 1
# define INT64_C(value) value##L
# define UINT64_C(value) value##uL
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
# endif
# ifdef BOOST_NO_INT64_T
# define INTMAX_C(value) INT32_C(value)
# define UINTMAX_C(value) UINT32_C(value)
# else
# define INTMAX_C(value) INT64_C(value)
# define UINTMAX_C(value) UINT64_C(value)
# endif
# endif // Borland/Microsoft specific width suffixes
#elif defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && !defined(__STDC_CONSTANT_MACROS) && !defined(BOOST_HAS_STDINT_H)
//
// undef all the macros:
//
# undef INT8_C
# undef INT16_C
# undef INT32_C
# undef INT64_C
# undef UINT8_C
# undef UINT16_C
# undef UINT32_C
# undef UINT64_C
# undef INTMAX_C
# undef UINTMAX_C
#endif // __STDC_CONSTANT_MACROS_DEFINED etc.
// boost cstdint.hpp header file ------------------------------------------//
// (C) Copyright Beman Dawes 1999.
// (C) Copyright Jens Mauer 2001
// (C) Copyright John Maddock 2001
// Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/integer for documentation.
// Revision History
// 31 Oct 01 use BOOST_HAS_LONG_LONG to check for "long long" (Jens M.)
// 16 Apr 01 check LONGLONG_MAX when looking for "long long" (Jens Maurer)
// 23 Jan 01 prefer "long" over "int" for int32_t and intmax_t (Jens Maurer)
// 12 Nov 00 Merged <boost/stdint.h> (Jens Maurer)
// 23 Sep 00 Added INTXX_C macro support (John Maddock).
// 22 Sep 00 Better 64-bit support (John Maddock)
// 29 Jun 00 Reimplement to avoid including stdint.h within namespace boost
// 8 Aug 99 Initial version (Beman Dawes)
#ifndef BOOST_CSTDINT_HPP
#define BOOST_CSTDINT_HPP
#include <boost/config.hpp>
#ifdef BOOST_HAS_STDINT_H
// The following #include is an implementation artifact; not part of interface.
# ifdef __hpux
// HP-UX has a vaguely nice <stdint.h> in a non-standard location
# include <inttypes.h>
# ifdef __STDC_32_MODE__
// this is triggered with GCC, because it defines __cplusplus < 199707L
# define BOOST_NO_INT64_T
# endif
# elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX)
# include <inttypes.h>
# else
# include <stdint.h>
// There is a bug in Cygwin two _C macros
# if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__)
# undef INTMAX_C
# undef UINTMAX_C
# define INTMAX_C(c) c##LL
# define UINTMAX_C(c) c##ULL
# endif
# endif
#ifdef __QNX__
// QNX (Dinkumware stdlib) defines these as non-standard names.
// Reflect to the standard names.
typedef ::intleast8_t int_least8_t;
typedef ::intfast8_t int_fast8_t;
typedef ::uintleast8_t uint_least8_t;
typedef ::uintfast8_t uint_fast8_t;
typedef ::intleast16_t int_least16_t;
typedef ::intfast16_t int_fast16_t;
typedef ::uintleast16_t uint_least16_t;
typedef ::uintfast16_t uint_fast16_t;
typedef ::intleast32_t int_least32_t;
typedef ::intfast32_t int_fast32_t;
typedef ::uintleast32_t uint_least32_t;
typedef ::uintfast32_t uint_fast32_t;
# ifndef BOOST_NO_INT64_T
typedef ::intleast64_t int_least64_t;
typedef ::intfast64_t int_fast64_t;
typedef ::uintleast64_t uint_least64_t;
typedef ::uintfast64_t uint_fast64_t;
# endif
#endif
namespace boost
{
using ::int8_t;
using ::int_least8_t;
using ::int_fast8_t;
using ::uint8_t;
using ::uint_least8_t;
using ::uint_fast8_t;
using ::int16_t;
using ::int_least16_t;
using ::int_fast16_t;
using ::uint16_t;
using ::uint_least16_t;
using ::uint_fast16_t;
using ::int32_t;
using ::int_least32_t;
using ::int_fast32_t;
using ::uint32_t;
using ::uint_least32_t;
using ::uint_fast32_t;
# ifndef BOOST_NO_INT64_T
using ::int64_t;
using ::int_least64_t;
using ::int_fast64_t;
using ::uint64_t;
using ::uint_least64_t;
using ::uint_fast64_t;
# endif
using ::intmax_t;
using ::uintmax_t;
} // namespace boost
#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__)
// FreeBSD and Tru64 have an <inttypes.h> that contains much of what we need.
# include <inttypes.h>
namespace boost {
using ::int8_t;
typedef int8_t int_least8_t;
typedef int8_t int_fast8_t;
using ::uint8_t;
typedef uint8_t uint_least8_t;
typedef uint8_t uint_fast8_t;
using ::int16_t;
typedef int16_t int_least16_t;
typedef int16_t int_fast16_t;
using ::uint16_t;
typedef uint16_t uint_least16_t;
typedef uint16_t uint_fast16_t;
using ::int32_t;
typedef int32_t int_least32_t;
typedef int32_t int_fast32_t;
using ::uint32_t;
typedef uint32_t uint_least32_t;
typedef uint32_t uint_fast32_t;
# ifndef BOOST_NO_INT64_T
using ::int64_t;
typedef int64_t int_least64_t;
typedef int64_t int_fast64_t;
using ::uint64_t;
typedef uint64_t uint_least64_t;
typedef uint64_t uint_fast64_t;
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
# else
typedef int32_t intmax_t;
typedef uint32_t uintmax_t;
# endif
} // namespace boost
#else // BOOST_HAS_STDINT_H
# include <boost/limits.hpp> // implementation artifact; not part of interface
# include <limits.h> // needed for limits macros
namespace boost
{
// These are fairly safe guesses for some 16-bit, and most 32-bit and 64-bit
// platforms. For other systems, they will have to be hand tailored.
//
// Because the fast types are assumed to be the same as the undecorated types,
// it may be possible to hand tailor a more efficient implementation. Such
// an optimization may be illusionary; on the Intel x86-family 386 on, for
// example, byte arithmetic and load/stores are as fast as "int" sized ones.
// 8-bit types ------------------------------------------------------------//
# if UCHAR_MAX == 0xff
typedef signed char int8_t;
typedef signed char int_least8_t;
typedef signed char int_fast8_t;
typedef unsigned char uint8_t;
typedef unsigned char uint_least8_t;
typedef unsigned char uint_fast8_t;
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
// 16-bit types -----------------------------------------------------------//
# if USHRT_MAX == 0xffff
# if defined(__crayx1)
// The Cray X1 has a 16-bit short, however it is not recommend
// for use in performance critical code.
typedef short int16_t;
typedef short int_least16_t;
typedef int int_fast16_t;
typedef unsigned short uint16_t;
typedef unsigned short uint_least16_t;
typedef unsigned int uint_fast16_t;
# else
typedef short int16_t;
typedef short int_least16_t;
typedef short int_fast16_t;
typedef unsigned short uint16_t;
typedef unsigned short uint_least16_t;
typedef unsigned short uint_fast16_t;
# endif
# elif (USHRT_MAX == 0xffffffff) && defined(CRAY)
// no 16-bit types on Cray:
typedef short int_least16_t;
typedef short int_fast16_t;
typedef unsigned short uint_least16_t;
typedef unsigned short uint_fast16_t;
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
// 32-bit types -----------------------------------------------------------//
# if ULONG_MAX == 0xffffffff
typedef long int32_t;
typedef long int_least32_t;
typedef long int_fast32_t;
typedef unsigned long uint32_t;
typedef unsigned long uint_least32_t;
typedef unsigned long uint_fast32_t;
# elif UINT_MAX == 0xffffffff
typedef int int32_t;
typedef int int_least32_t;
typedef int int_fast32_t;
typedef unsigned int uint32_t;
typedef unsigned int uint_least32_t;
typedef unsigned int uint_fast32_t;
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
// 64-bit types + intmax_t and uintmax_t ----------------------------------//
# if defined(BOOST_HAS_LONG_LONG) && \
!defined(BOOST_MSVC) && !defined(__BORLANDC__) && \
(!defined(__GLIBCPP__) || defined(_GLIBCPP_USE_LONG_LONG)) && \
(defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
# if defined(__hpux)
// HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions
# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL)
// 2**64 - 1
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
typedef ::boost::long_long_type intmax_t;
typedef ::boost::ulong_long_type uintmax_t;
typedef ::boost::long_long_type int64_t;
typedef ::boost::long_long_type int_least64_t;
typedef ::boost::long_long_type int_fast64_t;
typedef ::boost::ulong_long_type uint64_t;
typedef ::boost::ulong_long_type uint_least64_t;
typedef ::boost::ulong_long_type uint_fast64_t;
# elif ULONG_MAX != 0xffffffff
# if ULONG_MAX == 18446744073709551615 // 2**64 - 1
typedef long intmax_t;
typedef unsigned long uintmax_t;
typedef long int64_t;
typedef long int_least64_t;
typedef long int_fast64_t;
typedef unsigned long uint64_t;
typedef unsigned long uint_least64_t;
typedef unsigned long uint_fast64_t;
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
# elif defined(__GNUC__) && defined(BOOST_HAS_LONG_LONG)
__extension__ typedef long long intmax_t;
__extension__ typedef unsigned long long uintmax_t;
__extension__ typedef long long int64_t;
__extension__ typedef long long int_least64_t;
__extension__ typedef long long int_fast64_t;
__extension__ typedef unsigned long long uint64_t;
__extension__ typedef unsigned long long uint_least64_t;
__extension__ typedef unsigned long long uint_fast64_t;
# elif defined(BOOST_HAS_MS_INT64)
//
// we have Borland/Intel/Microsoft __int64:
//
typedef __int64 intmax_t;
typedef unsigned __int64 uintmax_t;
typedef __int64 int64_t;
typedef __int64 int_least64_t;
typedef __int64 int_fast64_t;
typedef unsigned __int64 uint64_t;
typedef unsigned __int64 uint_least64_t;
typedef unsigned __int64 uint_fast64_t;
# else // assume no 64-bit integers
# define BOOST_NO_INT64_T
typedef int32_t intmax_t;
typedef uint32_t uintmax_t;
# endif
} // namespace boost
#endif // BOOST_HAS_STDINT_H
#endif // BOOST_CSTDINT_HPP
/****************************************************
Macro definition section:
Define various INTXX_C macros only if
__STDC_CONSTANT_MACROS is defined.
Undefine the macros if __STDC_CONSTANT_MACROS is
not defined and the macros are (cf <cassert>).
Added 23rd September 2000 (John Maddock).
Modified 11th September 2001 to be excluded when
BOOST_HAS_STDINT_H is defined (John Maddock).
******************************************************/
#if defined(__STDC_CONSTANT_MACROS) && !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && !defined(BOOST_HAS_STDINT_H)
# define BOOST__STDC_CONSTANT_MACROS_DEFINED
# if defined(BOOST_HAS_MS_INT64)
//
// Borland/Intel/Microsoft compilers have width specific suffixes:
//
# define INT8_C(value) value##i8
# define INT16_C(value) value##i16
# define INT32_C(value) value##i32
# define INT64_C(value) value##i64
# ifdef __BORLANDC__
// Borland bug: appending ui8 makes the type a signed char
# define UINT8_C(value) static_cast<unsigned char>(value##u)
# else
# define UINT8_C(value) value##ui8
# endif
# define UINT16_C(value) value##ui16
# define UINT32_C(value) value##ui32
# define UINT64_C(value) value##ui64
# define INTMAX_C(value) value##i64
# define UINTMAX_C(value) value##ui64
# else
// do it the old fashioned way:
// 8-bit types ------------------------------------------------------------//
# if UCHAR_MAX == 0xff
# define INT8_C(value) static_cast<boost::int8_t>(value)
# define UINT8_C(value) static_cast<boost::uint8_t>(value##u)
# endif
// 16-bit types -----------------------------------------------------------//
# if USHRT_MAX == 0xffff
# define INT16_C(value) static_cast<boost::int16_t>(value)
# define UINT16_C(value) static_cast<boost::uint16_t>(value##u)
# endif
// 32-bit types -----------------------------------------------------------//
# if UINT_MAX == 0xffffffff
# define INT32_C(value) value
# define UINT32_C(value) value##u
# elif ULONG_MAX == 0xffffffff
# define INT32_C(value) value##L
# define UINT32_C(value) value##uL
# endif
// 64-bit types + intmax_t and uintmax_t ----------------------------------//
# if defined(BOOST_HAS_LONG_LONG) && \
(defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
# if defined(__hpux)
// HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions
# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615U) || \
(defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615U) || \
(defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615U)
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
# define INT64_C(value) value##LL
# define UINT64_C(value) value##uLL
# elif ULONG_MAX != 0xffffffff
# if ULONG_MAX == 18446744073709551615 // 2**64 - 1
# define INT64_C(value) value##L
# define UINT64_C(value) value##uL
# else
# error defaults not correct; you must hand modify boost/cstdint.hpp
# endif
# endif
# ifdef BOOST_NO_INT64_T
# define INTMAX_C(value) INT32_C(value)
# define UINTMAX_C(value) UINT32_C(value)
# else
# define INTMAX_C(value) INT64_C(value)
# define UINTMAX_C(value) UINT64_C(value)
# endif
# endif // Borland/Microsoft specific width suffixes
#elif defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && !defined(__STDC_CONSTANT_MACROS) && !defined(BOOST_HAS_STDINT_H)
//
// undef all the macros:
//
# undef INT8_C
# undef INT16_C
# undef INT32_C
# undef INT64_C
# undef UINT8_C
# undef UINT16_C
# undef UINT32_C
# undef UINT64_C
# undef INTMAX_C
# undef UINTMAX_C
#endif // __STDC_CONSTANT_MACROS_DEFINED etc.

View File

@ -1,40 +1,40 @@
#ifndef BOOST_MPL_O1_SIZE_HPP_INCLUDED
#define BOOST_MPL_O1_SIZE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/O1_size_fwd.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/O1_size_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
// returns sequence size if it's an O(1) operation; otherwise returns -1
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
>
struct O1_size
: O1_size_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, O1_size, (Sequence))
};
BOOST_MPL_AUX_NA_SPEC(1, O1_size)
}}
#endif // BOOST_MPL_O1_SIZE_HPP_INCLUDED
#ifndef BOOST_MPL_O1_SIZE_HPP_INCLUDED
#define BOOST_MPL_O1_SIZE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/O1_size_fwd.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/O1_size_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
// returns sequence size if it's an O(1) operation; otherwise returns -1
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
>
struct O1_size
: O1_size_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, O1_size, (Sequence))
};
BOOST_MPL_AUX_NA_SPEC(1, O1_size)
}}
#endif // BOOST_MPL_O1_SIZE_HPP_INCLUDED

View File

@ -1,24 +1,24 @@
#ifndef BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
#define BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: O1_size_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct O1_size_impl;
template< typename Sequence > struct O1_size;
}}
#endif // BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
#ifndef BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
#define BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: O1_size_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct O1_size_impl;
template< typename Sequence > struct O1_size;
}}
#endif // BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED

View File

@ -0,0 +1,39 @@
#ifndef BOOST_MPL_ACCUMULATE_HPP_INCLUDED
#define BOOST_MPL_ACCUMULATE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-2004
// Copyright David Abrahams 2001-2002
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: accumulate.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/fold.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(State)
, typename BOOST_MPL_AUX_NA_PARAM(ForwardOp)
>
struct accumulate
: fold<Sequence,State,ForwardOp>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,accumulate,(Sequence,State,ForwardOp))
};
BOOST_MPL_AUX_NA_SPEC(3, accumulate)
}}
#endif // BOOST_MPL_ACCUMULATE_HPP_INCLUDED

View File

@ -1,76 +1,76 @@
#ifndef BOOST_MPL_ADVANCE_HPP_INCLUDED
#define BOOST_MPL_ADVANCE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: advance.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/advance_fwd.hpp>
#include <boost/mpl/less.hpp>
#include <boost/mpl/negate.hpp>
#include <boost/mpl/long.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/tag.hpp>
#include <boost/mpl/apply_wrap.hpp>
#include <boost/mpl/aux_/advance_forward.hpp>
#include <boost/mpl/aux_/advance_backward.hpp>
#include <boost/mpl/aux_/value_wknd.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/nttp_decl.hpp>
namespace boost { namespace mpl {
// default implementation for forward/bidirectional iterators
template< typename Tag >
struct advance_impl
{
template< typename Iterator, typename N > struct apply
{
typedef typename less< N,long_<0> >::type backward_;
typedef typename if_< backward_, negate<N>, N >::type offset_;
typedef typename if_<
backward_
, aux::advance_backward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value >
, aux::advance_forward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value >
>::type f_;
typedef typename apply_wrap1<f_,Iterator>::type type;
};
};
template<
typename BOOST_MPL_AUX_NA_PARAM(Iterator)
, typename BOOST_MPL_AUX_NA_PARAM(N)
>
struct advance
: advance_impl< typename tag<Iterator>::type >
::template apply<Iterator,N>
{
};
template<
typename Iterator
, BOOST_MPL_AUX_NTTP_DECL(long, N)
>
struct advance_c
: advance_impl< typename tag<Iterator>::type >
::template apply<Iterator,long_<N> >
{
};
BOOST_MPL_AUX_NA_SPEC(2, advance)
}}
#endif // BOOST_MPL_ADVANCE_HPP_INCLUDED
#ifndef BOOST_MPL_ADVANCE_HPP_INCLUDED
#define BOOST_MPL_ADVANCE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: advance.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/advance_fwd.hpp>
#include <boost/mpl/less.hpp>
#include <boost/mpl/negate.hpp>
#include <boost/mpl/long.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/tag.hpp>
#include <boost/mpl/apply_wrap.hpp>
#include <boost/mpl/aux_/advance_forward.hpp>
#include <boost/mpl/aux_/advance_backward.hpp>
#include <boost/mpl/aux_/value_wknd.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/nttp_decl.hpp>
namespace boost { namespace mpl {
// default implementation for forward/bidirectional iterators
template< typename Tag >
struct advance_impl
{
template< typename Iterator, typename N > struct apply
{
typedef typename less< N,long_<0> >::type backward_;
typedef typename if_< backward_, negate<N>, N >::type offset_;
typedef typename if_<
backward_
, aux::advance_backward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value >
, aux::advance_forward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value >
>::type f_;
typedef typename apply_wrap1<f_,Iterator>::type type;
};
};
template<
typename BOOST_MPL_AUX_NA_PARAM(Iterator)
, typename BOOST_MPL_AUX_NA_PARAM(N)
>
struct advance
: advance_impl< typename tag<Iterator>::type >
::template apply<Iterator,N>
{
};
template<
typename Iterator
, BOOST_MPL_AUX_NTTP_DECL(long, N)
>
struct advance_c
: advance_impl< typename tag<Iterator>::type >
::template apply<Iterator,long_<N> >
{
};
BOOST_MPL_AUX_NA_SPEC(2, advance)
}}
#endif // BOOST_MPL_ADVANCE_HPP_INCLUDED

View File

@ -1,28 +1,28 @@
#ifndef BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED
#define BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: advance_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/common_name_wknd.hpp>
namespace boost { namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(advance)
template< typename Tag > struct advance_impl;
template< typename Iterator, typename N > struct advance;
}}
#endif // BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED
#ifndef BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED
#define BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: advance_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/common_name_wknd.hpp>
namespace boost { namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(advance)
template< typename Tag > struct advance_impl;
template< typename Iterator, typename N > struct advance;
}}
#endif // BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED

View File

@ -0,0 +1,21 @@
#ifndef BOOST_MPL_ALIAS_HPP_INCLUDED
#define BOOST_MPL_ALIAS_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: alias.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace {
namespace mpl = boost::mpl;
}
#endif // BOOST_MPL_ALIAS_HPP_INCLUDED

View File

@ -1,39 +1,39 @@
#ifndef BOOST_MPL_ALWAYS_HPP_INCLUDED
#define BOOST_MPL_ALWAYS_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: always.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>
#include <boost/mpl/aux_/na.hpp>
#include <boost/mpl/aux_/arity_spec.hpp>
namespace boost { namespace mpl {
template< typename Value > struct always
{
template<
typename T
BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(1, typename T, na)
>
struct apply
{
typedef Value type;
};
};
BOOST_MPL_AUX_ARITY_SPEC(1, always)
}}
#endif // BOOST_MPL_ALWAYS_HPP_INCLUDED
#ifndef BOOST_MPL_ALWAYS_HPP_INCLUDED
#define BOOST_MPL_ALWAYS_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: always.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>
#include <boost/mpl/aux_/na.hpp>
#include <boost/mpl/aux_/arity_spec.hpp>
namespace boost { namespace mpl {
template< typename Value > struct always
{
template<
typename T
BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(1, typename T, na)
>
struct apply
{
typedef Value type;
};
};
BOOST_MPL_AUX_ARITY_SPEC(1, always)
}}
#endif // BOOST_MPL_ALWAYS_HPP_INCLUDED

View File

@ -1,60 +1,60 @@
#ifndef BOOST_MPL_AND_HPP_INCLUDED
#define BOOST_MPL_AND_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: and.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/bool.hpp>
# include <boost/mpl/aux_/nested_type_wknd.hpp>
# include <boost/mpl/aux_/na_spec.hpp>
# include <boost/mpl/aux_/lambda_support.hpp>
// agurt, 19/may/04: workaround a conflict with <iso646.h> header's
// 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(and)'
// has to be checked in a separate condition, otherwise GCC complains
// about 'and' being an alternative token
#if defined(_MSC_VER)
#ifndef __GCCXML__
#if defined(and)
# pragma push_macro("and")
# undef and
# define and(x)
#endif
#endif
#endif
# define BOOST_MPL_PREPROCESSED_HEADER and.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#if defined(_MSC_VER)
#ifndef __GCCXML__
#if defined(and)
# pragma pop_macro("and")
#endif
#endif
#endif
#else
# define AUX778076_OP_NAME and_
# define AUX778076_OP_VALUE1 false
# define AUX778076_OP_VALUE2 true
# include <boost/mpl/aux_/logical_op.hpp>
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_AND_HPP_INCLUDED
#ifndef BOOST_MPL_AND_HPP_INCLUDED
#define BOOST_MPL_AND_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: and.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/bool.hpp>
# include <boost/mpl/aux_/nested_type_wknd.hpp>
# include <boost/mpl/aux_/na_spec.hpp>
# include <boost/mpl/aux_/lambda_support.hpp>
// agurt, 19/may/04: workaround a conflict with <iso646.h> header's
// 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(and)'
// has to be checked in a separate condition, otherwise GCC complains
// about 'and' being an alternative token
#if defined(_MSC_VER)
#ifndef __GCCXML__
#if defined(and)
# pragma push_macro("and")
# undef and
# define and(x)
#endif
#endif
#endif
# define BOOST_MPL_PREPROCESSED_HEADER and.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#if defined(_MSC_VER)
#ifndef __GCCXML__
#if defined(and)
# pragma pop_macro("and")
#endif
#endif
#endif
#else
# define AUX778076_OP_NAME and_
# define AUX778076_OP_VALUE1 false
# define AUX778076_OP_VALUE2 true
# include <boost/mpl/aux_/logical_op.hpp>
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_AND_HPP_INCLUDED

View File

@ -1,229 +1,229 @@
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_APPLY_HPP_INCLUDED
#define BOOST_MPL_APPLY_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/apply_fwd.hpp>
# include <boost/mpl/apply_wrap.hpp>
# include <boost/mpl/placeholders.hpp>
# include <boost/mpl/lambda.hpp>
# include <boost/mpl/aux_/na.hpp>
# include <boost/mpl/aux_/lambda_support.hpp>
#endif
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER apply.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#else
# include <boost/mpl/limits/arity.hpp>
# include <boost/mpl/aux_/preprocessor/params.hpp>
# include <boost/mpl/aux_/preprocessor/default_params.hpp>
# include <boost/mpl/aux_/preprocessor/partial_spec_params.hpp>
# include <boost/mpl/aux_/preprocessor/enum.hpp>
# include <boost/mpl/aux_/config/lambda.hpp>
# include <boost/mpl/aux_/config/dtp.hpp>
# include <boost/mpl/aux_/nttp_decl.hpp>
# include <boost/mpl/aux_/config/eti.hpp>
# include <boost/mpl/aux_/config/msvc.hpp>
# include <boost/mpl/aux_/config/workaround.hpp>
# include <boost/preprocessor/comma_if.hpp>
# include <boost/preprocessor/inc.hpp>
# include <boost/preprocessor/iterate.hpp>
# include <boost/preprocessor/cat.hpp>
namespace boost { namespace mpl {
// local macros, #undef-ined at the end of the header
# define AUX778076_APPLY_PARAMS(param) \
BOOST_MPL_PP_PARAMS( \
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
, param \
) \
/**/
# define AUX778076_APPLY_DEF_PARAMS(param, value) \
BOOST_MPL_PP_DEFAULT_PARAMS( \
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
, param \
, value \
) \
/**/
# define AUX778076_APPLY_N_PARAMS(n, param) \
BOOST_MPL_PP_PARAMS(n, param) \
/**/
# define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \
BOOST_PP_COMMA_IF(n) \
BOOST_MPL_PP_PARAMS(n, param) \
/**/
# define AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(n, param, def) \
BOOST_PP_COMMA_IF(n) \
BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \
/**/
# define AUX778076_APPLY_N_SPEC_PARAMS(n, param) \
BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \
/**/
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/apply.hpp>))
#include BOOST_PP_ITERATE()
# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE)
// real C++ version is already taken care of
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
namespace aux {
// apply_count_args
#define AUX778076_COUNT_ARGS_PREFIX apply
#define AUX778076_COUNT_ARGS_DEFAULT na
#define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY
#include <boost/mpl/aux_/count_args.hpp>
}
template<
typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na)
>
struct apply
: aux::apply_chooser<
aux::apply_count_args< AUX778076_APPLY_PARAMS(T) >::value
>::template result_< F, AUX778076_APPLY_PARAMS(T) >::type
{
};
# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE
# undef AUX778076_APPLY_N_SPEC_PARAMS
# undef AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS
# undef AUX778076_APPLY_N_COMMA_PARAMS
# undef AUX778076_APPLY_N_PARAMS
# undef AUX778076_APPLY_DEF_PARAMS
# undef AUX778076_APPLY_PARAMS
}}
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_APPLY_HPP_INCLUDED
///// iteration, depth == 1
// For gcc 4.4 compatability, we must include the
// BOOST_PP_ITERATION_DEPTH test inside an #else clause.
#else // BOOST_PP_IS_ITERATING
#if BOOST_PP_ITERATION_DEPTH() == 1
# define i_ BOOST_PP_FRAME_ITERATION(1)
template<
typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(apply,i_)
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
: BOOST_PP_CAT(apply_wrap,i_)<
typename lambda<F>::type
AUX778076_APPLY_N_COMMA_PARAMS(i_, T)
>
{
#else
{
typedef typename BOOST_PP_CAT(apply_wrap,i_)<
typename lambda<F>::type
AUX778076_APPLY_N_COMMA_PARAMS(i_, T)
>::type type;
#endif
BOOST_MPL_AUX_LAMBDA_SUPPORT(
BOOST_PP_INC(i_)
, BOOST_PP_CAT(apply,i_)
, (F AUX778076_APPLY_N_COMMA_PARAMS(i_,T))
)
};
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
/// workaround for ETI bug
template<>
struct BOOST_PP_CAT(apply,i_)<AUX778076_APPLY_N_SPEC_PARAMS(i_, int)>
{
typedef int type;
};
#endif
# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE)
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY
/// primary template (not a specialization!)
template<
typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T)
>
struct apply
: BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) >
{
};
#else
template<
typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T)
>
struct apply< F AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(i_, T, na) >
: BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) >
{
};
#endif
# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE)
namespace aux {
template<>
struct apply_chooser<i_>
{
template<
typename F, AUX778076_APPLY_PARAMS(typename T)
>
struct result_
{
typedef BOOST_PP_CAT(apply,i_)<
F AUX778076_APPLY_N_COMMA_PARAMS(i_, T)
> type;
};
};
} // namespace aux
#endif
# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE
# undef i_
#endif // BOOST_PP_ITERATION_DEPTH()
#endif // BOOST_PP_IS_ITERATING
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_APPLY_HPP_INCLUDED
#define BOOST_MPL_APPLY_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/apply_fwd.hpp>
# include <boost/mpl/apply_wrap.hpp>
# include <boost/mpl/placeholders.hpp>
# include <boost/mpl/lambda.hpp>
# include <boost/mpl/aux_/na.hpp>
# include <boost/mpl/aux_/lambda_support.hpp>
#endif
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER apply.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#else
# include <boost/mpl/limits/arity.hpp>
# include <boost/mpl/aux_/preprocessor/params.hpp>
# include <boost/mpl/aux_/preprocessor/default_params.hpp>
# include <boost/mpl/aux_/preprocessor/partial_spec_params.hpp>
# include <boost/mpl/aux_/preprocessor/enum.hpp>
# include <boost/mpl/aux_/config/lambda.hpp>
# include <boost/mpl/aux_/config/dtp.hpp>
# include <boost/mpl/aux_/nttp_decl.hpp>
# include <boost/mpl/aux_/config/eti.hpp>
# include <boost/mpl/aux_/config/msvc.hpp>
# include <boost/mpl/aux_/config/workaround.hpp>
# include <boost/preprocessor/comma_if.hpp>
# include <boost/preprocessor/inc.hpp>
# include <boost/preprocessor/iterate.hpp>
# include <boost/preprocessor/cat.hpp>
namespace boost { namespace mpl {
// local macros, #undef-ined at the end of the header
# define AUX778076_APPLY_PARAMS(param) \
BOOST_MPL_PP_PARAMS( \
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
, param \
) \
/**/
# define AUX778076_APPLY_DEF_PARAMS(param, value) \
BOOST_MPL_PP_DEFAULT_PARAMS( \
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
, param \
, value \
) \
/**/
# define AUX778076_APPLY_N_PARAMS(n, param) \
BOOST_MPL_PP_PARAMS(n, param) \
/**/
# define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \
BOOST_PP_COMMA_IF(n) \
BOOST_MPL_PP_PARAMS(n, param) \
/**/
# define AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(n, param, def) \
BOOST_PP_COMMA_IF(n) \
BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \
/**/
# define AUX778076_APPLY_N_SPEC_PARAMS(n, param) \
BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \
/**/
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/apply.hpp>))
#include BOOST_PP_ITERATE()
# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE)
// real C++ version is already taken care of
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
namespace aux {
// apply_count_args
#define AUX778076_COUNT_ARGS_PREFIX apply
#define AUX778076_COUNT_ARGS_DEFAULT na
#define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY
#include <boost/mpl/aux_/count_args.hpp>
}
template<
typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na)
>
struct apply
: aux::apply_chooser<
aux::apply_count_args< AUX778076_APPLY_PARAMS(T) >::value
>::template result_< F, AUX778076_APPLY_PARAMS(T) >::type
{
};
# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE
# undef AUX778076_APPLY_N_SPEC_PARAMS
# undef AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS
# undef AUX778076_APPLY_N_COMMA_PARAMS
# undef AUX778076_APPLY_N_PARAMS
# undef AUX778076_APPLY_DEF_PARAMS
# undef AUX778076_APPLY_PARAMS
}}
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_APPLY_HPP_INCLUDED
///// iteration, depth == 1
// For gcc 4.4 compatability, we must include the
// BOOST_PP_ITERATION_DEPTH test inside an #else clause.
#else // BOOST_PP_IS_ITERATING
#if BOOST_PP_ITERATION_DEPTH() == 1
# define i_ BOOST_PP_FRAME_ITERATION(1)
template<
typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(apply,i_)
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
: BOOST_PP_CAT(apply_wrap,i_)<
typename lambda<F>::type
AUX778076_APPLY_N_COMMA_PARAMS(i_, T)
>
{
#else
{
typedef typename BOOST_PP_CAT(apply_wrap,i_)<
typename lambda<F>::type
AUX778076_APPLY_N_COMMA_PARAMS(i_, T)
>::type type;
#endif
BOOST_MPL_AUX_LAMBDA_SUPPORT(
BOOST_PP_INC(i_)
, BOOST_PP_CAT(apply,i_)
, (F AUX778076_APPLY_N_COMMA_PARAMS(i_,T))
)
};
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
/// workaround for ETI bug
template<>
struct BOOST_PP_CAT(apply,i_)<AUX778076_APPLY_N_SPEC_PARAMS(i_, int)>
{
typedef int type;
};
#endif
# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE)
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY
/// primary template (not a specialization!)
template<
typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T)
>
struct apply
: BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) >
{
};
#else
template<
typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T)
>
struct apply< F AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(i_, T, na) >
: BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) >
{
};
#endif
# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE)
namespace aux {
template<>
struct apply_chooser<i_>
{
template<
typename F, AUX778076_APPLY_PARAMS(typename T)
>
struct result_
{
typedef BOOST_PP_CAT(apply,i_)<
F AUX778076_APPLY_N_COMMA_PARAMS(i_, T)
> type;
};
};
} // namespace aux
#endif
# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE
# undef i_
#endif // BOOST_PP_ITERATION_DEPTH()
#endif // BOOST_PP_IS_ITERATING

View File

@ -1,107 +1,107 @@
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_APPLY_FWD_HPP_INCLUDED
#define BOOST_MPL_APPLY_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: apply_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/aux_/na.hpp>
#endif
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER apply_fwd.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#else
# include <boost/mpl/limits/arity.hpp>
# include <boost/mpl/aux_/preprocessor/params.hpp>
# include <boost/mpl/aux_/preprocessor/default_params.hpp>
# include <boost/mpl/aux_/config/ctps.hpp>
# include <boost/mpl/aux_/nttp_decl.hpp>
# include <boost/preprocessor/comma_if.hpp>
# include <boost/preprocessor/iterate.hpp>
# include <boost/preprocessor/cat.hpp>
// agurt, 15/jan/02: top-level 'apply' template gives an ICE on MSVC
// (for known reasons)
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
# define BOOST_MPL_CFG_NO_APPLY_TEMPLATE
#endif
namespace boost { namespace mpl {
// local macro, #undef-ined at the end of the header
# define AUX778076_APPLY_DEF_PARAMS(param, value) \
BOOST_MPL_PP_DEFAULT_PARAMS( \
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
, param \
, value \
) \
/**/
# define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \
BOOST_PP_COMMA_IF(n) \
BOOST_MPL_PP_PARAMS(n, param) \
/**/
# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE)
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
// forward declaration
template<
typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na)
>
struct apply;
#else
namespace aux {
template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser;
}
#endif
# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/apply_fwd.hpp>))
#include BOOST_PP_ITERATE()
# undef AUX778076_APPLY_N_COMMA_PARAMS
# undef AUX778076_APPLY_DEF_PARAMS
}}
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_APPLY_FWD_HPP_INCLUDED
///// iteration
#else
#define i_ BOOST_PP_FRAME_ITERATION(1)
template<
typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(apply,i_);
#undef i_
#endif // BOOST_PP_IS_ITERATING
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_APPLY_FWD_HPP_INCLUDED
#define BOOST_MPL_APPLY_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: apply_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/aux_/na.hpp>
#endif
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER apply_fwd.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#else
# include <boost/mpl/limits/arity.hpp>
# include <boost/mpl/aux_/preprocessor/params.hpp>
# include <boost/mpl/aux_/preprocessor/default_params.hpp>
# include <boost/mpl/aux_/config/ctps.hpp>
# include <boost/mpl/aux_/nttp_decl.hpp>
# include <boost/preprocessor/comma_if.hpp>
# include <boost/preprocessor/iterate.hpp>
# include <boost/preprocessor/cat.hpp>
// agurt, 15/jan/02: top-level 'apply' template gives an ICE on MSVC
// (for known reasons)
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
# define BOOST_MPL_CFG_NO_APPLY_TEMPLATE
#endif
namespace boost { namespace mpl {
// local macro, #undef-ined at the end of the header
# define AUX778076_APPLY_DEF_PARAMS(param, value) \
BOOST_MPL_PP_DEFAULT_PARAMS( \
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
, param \
, value \
) \
/**/
# define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \
BOOST_PP_COMMA_IF(n) \
BOOST_MPL_PP_PARAMS(n, param) \
/**/
# if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE)
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
// forward declaration
template<
typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na)
>
struct apply;
#else
namespace aux {
template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser;
}
#endif
# endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/apply_fwd.hpp>))
#include BOOST_PP_ITERATE()
# undef AUX778076_APPLY_N_COMMA_PARAMS
# undef AUX778076_APPLY_DEF_PARAMS
}}
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_APPLY_FWD_HPP_INCLUDED
///// iteration
#else
#define i_ BOOST_PP_FRAME_ITERATION(1)
template<
typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(apply,i_);
#undef i_
#endif // BOOST_PP_IS_ITERATING

View File

@ -1,234 +1,234 @@
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_APPLY_WRAP_HPP_INCLUDED
#define BOOST_MPL_APPLY_WRAP_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2008
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: apply_wrap.hpp 49272 2008-10-11 06:50:46Z agurtovoy $
// $Date: 2008-10-11 02:50:46 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49272 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/aux_/arity.hpp>
# include <boost/mpl/aux_/has_apply.hpp>
# include <boost/mpl/aux_/na.hpp>
# include <boost/mpl/aux_/msvc_never_true.hpp>
#endif
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER apply_wrap.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#else
# include <boost/mpl/limits/arity.hpp>
# include <boost/mpl/aux_/preprocessor/params.hpp>
# include <boost/mpl/aux_/preprocessor/enum.hpp>
# include <boost/mpl/aux_/preprocessor/add.hpp>
# include <boost/mpl/aux_/config/bcc.hpp>
# include <boost/mpl/aux_/config/ctps.hpp>
# include <boost/mpl/aux_/config/dtp.hpp>
# include <boost/mpl/aux_/config/eti.hpp>
# include <boost/mpl/aux_/config/msvc.hpp>
# include <boost/mpl/aux_/config/workaround.hpp>
# include <boost/preprocessor/comma_if.hpp>
# include <boost/preprocessor/logical/and.hpp>
# include <boost/preprocessor/inc.hpp>
# include <boost/preprocessor/iterate.hpp>
namespace boost { namespace mpl {
// local macros, #undef-ined at the end of the header
# define AUX778076_APPLY_WRAP_PARAMS(n, param) \
BOOST_MPL_PP_PARAMS(n, param) \
/**/
# define AUX778076_APPLY_WRAP_SPEC_PARAMS(n, param) \
BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \
/**/
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/apply_wrap.hpp>))
#include BOOST_PP_ITERATE()
# undef AUX778076_APPLY_WRAP_SPEC_PARAMS
# undef AUX778076_APPLY_WRAP_PARAMS
}}
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_APPLY_WRAP_HPP_INCLUDED
///// iteration, depth == 1
// For gcc 4.4 compatability, we must include the
// BOOST_PP_ITERATION_DEPTH test inside an #else clause.
#else // BOOST_PP_IS_ITERATING
#if BOOST_PP_ITERATION_DEPTH() == 1
# define i_ BOOST_PP_FRAME_ITERATION(1)
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
// MSVC version
#define AUX778076_MSVC_DTW_NAME BOOST_PP_CAT(msvc_apply,i_)
#define AUX778076_MSVC_DTW_ORIGINAL_NAME apply
#define AUX778076_MSVC_DTW_ARITY i_
#include <boost/mpl/aux_/msvc_dtw.hpp>
template<
typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(apply_wrap,i_)
{
// Metafunction forwarding confuses vc6
typedef typename BOOST_PP_CAT(msvc_apply,i_)<F>::template result_<
AUX778076_APPLY_WRAP_PARAMS(i_, T)
>::type type;
};
# elif defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
// MWCW/Borland version
template<
int N, typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(apply_wrap_impl,i_);
#define BOOST_PP_ITERATION_PARAMS_2 \
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY - i_, <boost/mpl/apply_wrap.hpp>))
#include BOOST_PP_ITERATE()
template<
typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(apply_wrap,i_)
: BOOST_PP_CAT(apply_wrap_impl,i_)<
::boost::mpl::aux::arity<F,i_>::value
, F
BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T)
>::type
{
};
# else
// ISO98 C++, with minor concession to vc7
template<
typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
#if i_ == 0
, typename has_apply_ = typename aux::has_apply<F>::type
#endif
>
struct BOOST_PP_CAT(apply_wrap,i_)
// metafunction forwarding confuses MSVC 7.0
#if !BOOST_WORKAROUND(BOOST_MSVC, == 1300)
: F::template apply< AUX778076_APPLY_WRAP_PARAMS(i_, T) >
{
#else
{
typedef typename F::template apply<
AUX778076_APPLY_WRAP_PARAMS(i_, T)
>::type type;
#endif
};
#if i_ == 0 && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename F >
struct BOOST_PP_CAT(apply_wrap,i_)<F,true_>
: F::apply
{
};
#endif
# endif // workarounds
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
/// workaround for ETI bug
template<>
struct BOOST_PP_CAT(apply_wrap,i_)<AUX778076_APPLY_WRAP_SPEC_PARAMS(i_, int)>
{
typedef int type;
};
#endif
# undef i_
///// iteration, depth == 2
#elif BOOST_PP_ITERATION_DEPTH() == 2
# define j_ BOOST_PP_FRAME_ITERATION(2)
#if i_ == 0 && j_ == 0 \
&& defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) \
&& !defined(BOOST_MPL_CFG_NO_HAS_APPLY)
template< typename F, bool F_has_apply >
struct apply_wrap_impl0_bcb {
typedef typename F::template apply< na > type;
};
template< typename F >
struct apply_wrap_impl0_bcb< F, true > {
typedef typename F::apply type;
};
template<
typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(apply_wrap_impl,i_)<
BOOST_MPL_PP_ADD(i_, j_)
, F
BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T)
>
{
typedef apply_wrap_impl0_bcb< F, aux::has_apply< F >::value >::type type;
};
#else
template<
typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(apply_wrap_impl,i_)<
BOOST_MPL_PP_ADD(i_, j_)
, F
BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T)
>
{
typedef typename F::template apply<
AUX778076_APPLY_WRAP_PARAMS(i_, T)
#if i_ == 0 && j_ == 0
/// since the defaults are "lost", we have to pass *something* even for nullary
/// metafunction classes
na
#else
BOOST_PP_COMMA_IF(BOOST_PP_AND(i_, j_)) BOOST_MPL_PP_ENUM(j_, na)
#endif
> type;
};
#endif
# undef j_
#endif // BOOST_PP_ITERATION_DEPTH()
#endif // BOOST_PP_IS_ITERATING
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_APPLY_WRAP_HPP_INCLUDED
#define BOOST_MPL_APPLY_WRAP_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2008
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: apply_wrap.hpp 49272 2008-10-11 06:50:46Z agurtovoy $
// $Date: 2008-10-11 02:50:46 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49272 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/aux_/arity.hpp>
# include <boost/mpl/aux_/has_apply.hpp>
# include <boost/mpl/aux_/na.hpp>
# include <boost/mpl/aux_/msvc_never_true.hpp>
#endif
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER apply_wrap.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#else
# include <boost/mpl/limits/arity.hpp>
# include <boost/mpl/aux_/preprocessor/params.hpp>
# include <boost/mpl/aux_/preprocessor/enum.hpp>
# include <boost/mpl/aux_/preprocessor/add.hpp>
# include <boost/mpl/aux_/config/bcc.hpp>
# include <boost/mpl/aux_/config/ctps.hpp>
# include <boost/mpl/aux_/config/dtp.hpp>
# include <boost/mpl/aux_/config/eti.hpp>
# include <boost/mpl/aux_/config/msvc.hpp>
# include <boost/mpl/aux_/config/workaround.hpp>
# include <boost/preprocessor/comma_if.hpp>
# include <boost/preprocessor/logical/and.hpp>
# include <boost/preprocessor/inc.hpp>
# include <boost/preprocessor/iterate.hpp>
namespace boost { namespace mpl {
// local macros, #undef-ined at the end of the header
# define AUX778076_APPLY_WRAP_PARAMS(n, param) \
BOOST_MPL_PP_PARAMS(n, param) \
/**/
# define AUX778076_APPLY_WRAP_SPEC_PARAMS(n, param) \
BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \
/**/
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/apply_wrap.hpp>))
#include BOOST_PP_ITERATE()
# undef AUX778076_APPLY_WRAP_SPEC_PARAMS
# undef AUX778076_APPLY_WRAP_PARAMS
}}
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_APPLY_WRAP_HPP_INCLUDED
///// iteration, depth == 1
// For gcc 4.4 compatability, we must include the
// BOOST_PP_ITERATION_DEPTH test inside an #else clause.
#else // BOOST_PP_IS_ITERATING
#if BOOST_PP_ITERATION_DEPTH() == 1
# define i_ BOOST_PP_FRAME_ITERATION(1)
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
// MSVC version
#define AUX778076_MSVC_DTW_NAME BOOST_PP_CAT(msvc_apply,i_)
#define AUX778076_MSVC_DTW_ORIGINAL_NAME apply
#define AUX778076_MSVC_DTW_ARITY i_
#include <boost/mpl/aux_/msvc_dtw.hpp>
template<
typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(apply_wrap,i_)
{
// Metafunction forwarding confuses vc6
typedef typename BOOST_PP_CAT(msvc_apply,i_)<F>::template result_<
AUX778076_APPLY_WRAP_PARAMS(i_, T)
>::type type;
};
# elif defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
// MWCW/Borland version
template<
int N, typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(apply_wrap_impl,i_);
#define BOOST_PP_ITERATION_PARAMS_2 \
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY - i_, <boost/mpl/apply_wrap.hpp>))
#include BOOST_PP_ITERATE()
template<
typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(apply_wrap,i_)
: BOOST_PP_CAT(apply_wrap_impl,i_)<
::boost::mpl::aux::arity<F,i_>::value
, F
BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T)
>::type
{
};
# else
// ISO98 C++, with minor concession to vc7
template<
typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
#if i_ == 0
, typename has_apply_ = typename aux::has_apply<F>::type
#endif
>
struct BOOST_PP_CAT(apply_wrap,i_)
// metafunction forwarding confuses MSVC 7.0
#if !BOOST_WORKAROUND(BOOST_MSVC, == 1300)
: F::template apply< AUX778076_APPLY_WRAP_PARAMS(i_, T) >
{
#else
{
typedef typename F::template apply<
AUX778076_APPLY_WRAP_PARAMS(i_, T)
>::type type;
#endif
};
#if i_ == 0 && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename F >
struct BOOST_PP_CAT(apply_wrap,i_)<F,true_>
: F::apply
{
};
#endif
# endif // workarounds
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
/// workaround for ETI bug
template<>
struct BOOST_PP_CAT(apply_wrap,i_)<AUX778076_APPLY_WRAP_SPEC_PARAMS(i_, int)>
{
typedef int type;
};
#endif
# undef i_
///// iteration, depth == 2
#elif BOOST_PP_ITERATION_DEPTH() == 2
# define j_ BOOST_PP_FRAME_ITERATION(2)
#if i_ == 0 && j_ == 0 \
&& defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) \
&& !defined(BOOST_MPL_CFG_NO_HAS_APPLY)
template< typename F, bool F_has_apply >
struct apply_wrap_impl0_bcb {
typedef typename F::template apply< na > type;
};
template< typename F >
struct apply_wrap_impl0_bcb< F, true > {
typedef typename F::apply type;
};
template<
typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(apply_wrap_impl,i_)<
BOOST_MPL_PP_ADD(i_, j_)
, F
BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T)
>
{
typedef apply_wrap_impl0_bcb< F, aux::has_apply< F >::value >::type type;
};
#else
template<
typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(apply_wrap_impl,i_)<
BOOST_MPL_PP_ADD(i_, j_)
, F
BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T)
>
{
typedef typename F::template apply<
AUX778076_APPLY_WRAP_PARAMS(i_, T)
#if i_ == 0 && j_ == 0
/// since the defaults are "lost", we have to pass *something* even for nullary
/// metafunction classes
na
#else
BOOST_PP_COMMA_IF(BOOST_PP_AND(i_, j_)) BOOST_MPL_PP_ENUM(j_, na)
#endif
> type;
};
#endif
# undef j_
#endif // BOOST_PP_ITERATION_DEPTH()
#endif // BOOST_PP_IS_ITERATING

View File

@ -1,131 +1,131 @@
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_ARG_HPP_INCLUDED
#define BOOST_MPL_ARG_HPP_INCLUDED
// Copyright Peter Dimov 2001-2002
// Copyright Aleksey Gurtovoy 2001-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: arg.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/arg_fwd.hpp>
# include <boost/mpl/aux_/na.hpp>
# include <boost/mpl/aux_/na_assert.hpp>
# include <boost/mpl/aux_/arity_spec.hpp>
# include <boost/mpl/aux_/arg_typedef.hpp>
#endif
#include <boost/mpl/aux_/config/static_constant.hpp>
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER arg.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#else
# include <boost/mpl/limits/arity.hpp>
# include <boost/mpl/aux_/preprocessor/default_params.hpp>
# include <boost/mpl/aux_/preprocessor/params.hpp>
# include <boost/mpl/aux_/config/lambda.hpp>
# include <boost/mpl/aux_/config/dtp.hpp>
# include <boost/mpl/aux_/nttp_decl.hpp>
# include <boost/preprocessor/iterate.hpp>
# include <boost/preprocessor/inc.hpp>
# include <boost/preprocessor/cat.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
// local macro, #undef-ined at the end of the header
#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
# define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \
BOOST_MPL_PP_DEFAULT_PARAMS( \
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
, param \
, value \
) \
/**/
#else
# define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \
BOOST_MPL_PP_PARAMS( \
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
, param \
) \
/**/
#endif
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/arg.hpp>))
#include BOOST_PP_ITERATE()
# undef AUX778076_ARG_N_DEFAULT_PARAMS
BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int,arg)
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_ARG_HPP_INCLUDED
///// iteration
#else
#define i_ BOOST_PP_FRAME_ITERATION(1)
#if i_ > 0
template<> struct arg<i_>
{
BOOST_STATIC_CONSTANT(int, value = i_);
typedef arg<BOOST_PP_INC(i_)> next;
BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
template<
AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na)
>
struct apply
{
typedef BOOST_PP_CAT(U,i_) type;
BOOST_MPL_AUX_ASSERT_NOT_NA(type);
};
};
#else
template<> struct arg<-1>
{
BOOST_STATIC_CONSTANT(int, value = -1);
BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
template<
AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na)
>
struct apply
{
typedef U1 type;
BOOST_MPL_AUX_ASSERT_NOT_NA(type);
};
};
#endif // i_ > 0
#undef i_
#endif // BOOST_PP_IS_ITERATING
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_ARG_HPP_INCLUDED
#define BOOST_MPL_ARG_HPP_INCLUDED
// Copyright Peter Dimov 2001-2002
// Copyright Aleksey Gurtovoy 2001-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: arg.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/arg_fwd.hpp>
# include <boost/mpl/aux_/na.hpp>
# include <boost/mpl/aux_/na_assert.hpp>
# include <boost/mpl/aux_/arity_spec.hpp>
# include <boost/mpl/aux_/arg_typedef.hpp>
#endif
#include <boost/mpl/aux_/config/static_constant.hpp>
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER arg.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#else
# include <boost/mpl/limits/arity.hpp>
# include <boost/mpl/aux_/preprocessor/default_params.hpp>
# include <boost/mpl/aux_/preprocessor/params.hpp>
# include <boost/mpl/aux_/config/lambda.hpp>
# include <boost/mpl/aux_/config/dtp.hpp>
# include <boost/mpl/aux_/nttp_decl.hpp>
# include <boost/preprocessor/iterate.hpp>
# include <boost/preprocessor/inc.hpp>
# include <boost/preprocessor/cat.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
// local macro, #undef-ined at the end of the header
#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
# define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \
BOOST_MPL_PP_DEFAULT_PARAMS( \
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
, param \
, value \
) \
/**/
#else
# define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \
BOOST_MPL_PP_PARAMS( \
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
, param \
) \
/**/
#endif
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/arg.hpp>))
#include BOOST_PP_ITERATE()
# undef AUX778076_ARG_N_DEFAULT_PARAMS
BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int,arg)
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_ARG_HPP_INCLUDED
///// iteration
#else
#define i_ BOOST_PP_FRAME_ITERATION(1)
#if i_ > 0
template<> struct arg<i_>
{
BOOST_STATIC_CONSTANT(int, value = i_);
typedef arg<BOOST_PP_INC(i_)> next;
BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
template<
AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na)
>
struct apply
{
typedef BOOST_PP_CAT(U,i_) type;
BOOST_MPL_AUX_ASSERT_NOT_NA(type);
};
};
#else
template<> struct arg<-1>
{
BOOST_STATIC_CONSTANT(int, value = -1);
BOOST_MPL_AUX_ARG_TYPEDEF(na, tag)
BOOST_MPL_AUX_ARG_TYPEDEF(na, type)
template<
AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na)
>
struct apply
{
typedef U1 type;
BOOST_MPL_AUX_ASSERT_NOT_NA(type);
};
};
#endif // i_ > 0
#undef i_
#endif // BOOST_PP_IS_ITERATING

View File

@ -1,28 +1,28 @@
#ifndef BOOST_MPL_ARG_FWD_HPP_INCLUDED
#define BOOST_MPL_ARG_FWD_HPP_INCLUDED
// Copyright Peter Dimov 2001-2002
// Copyright Aleksey Gurtovoy 2001-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: arg_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/adl_barrier.hpp>
#include <boost/mpl/aux_/nttp_decl.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arg;
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
BOOST_MPL_AUX_ADL_BARRIER_DECL(arg)
#endif // BOOST_MPL_ARG_FWD_HPP_INCLUDED
#ifndef BOOST_MPL_ARG_FWD_HPP_INCLUDED
#define BOOST_MPL_ARG_FWD_HPP_INCLUDED
// Copyright Peter Dimov 2001-2002
// Copyright Aleksey Gurtovoy 2001-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: arg_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/adl_barrier.hpp>
#include <boost/mpl/aux_/nttp_decl.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arg;
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
BOOST_MPL_AUX_ADL_BARRIER_DECL(arg)
#endif // BOOST_MPL_ARG_FWD_HPP_INCLUDED

View File

@ -0,0 +1,25 @@
#ifndef BOOST_MPL_ARITHMETIC_HPP_INCLUDED
#define BOOST_MPL_ARITHMETIC_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: arithmetic.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/plus.hpp>
#include <boost/mpl/minus.hpp>
#include <boost/mpl/times.hpp>
#include <boost/mpl/divides.hpp>
#include <boost/mpl/modulus.hpp>
#include <boost/mpl/negate.hpp>
#include <boost/mpl/multiplies.hpp> // deprecated
#endif // BOOST_MPL_ARITHMETIC_HPP_INCLUDED

View File

@ -0,0 +1,38 @@
#ifndef BOOST_MPL_AS_SEQUENCE_HPP_INCLUDED
#define BOOST_MPL_AS_SEQUENCE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2002-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: as_sequence.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/is_sequence.hpp>
#include <boost/mpl/single_view.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct as_sequence
: if_< is_sequence<T>, T, single_view<T> >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,as_sequence,(T))
};
BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, as_sequence)
}}
#endif // BOOST_MPL_AS_SEQUENCE_HPP_INCLUDED

View File

@ -1,370 +1,370 @@
#ifndef BOOST_MPL_ASSERT_HPP_INCLUDED
#define BOOST_MPL_ASSERT_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2006
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: assert.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/not.hpp>
#include <boost/mpl/aux_/value_wknd.hpp>
#include <boost/mpl/aux_/nested_type_wknd.hpp>
#include <boost/mpl/aux_/yes_no.hpp>
#include <boost/mpl/aux_/na.hpp>
#include <boost/mpl/aux_/adl_barrier.hpp>
#include <boost/mpl/aux_/config/nttp.hpp>
#include <boost/mpl/aux_/config/dtp.hpp>
#include <boost/mpl/aux_/config/gcc.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
#include <boost/mpl/aux_/config/pp_counter.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/config.hpp> // make sure 'size_t' is placed into 'std'
#include <cstddef>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|| (BOOST_MPL_CFG_GCC != 0) \
|| BOOST_WORKAROUND(__IBMCPP__, <= 600)
# define BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES
#endif
#if BOOST_WORKAROUND(__MWERKS__, < 0x3202) \
|| BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|| BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
# define BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER
#endif
// agurt, 10/nov/06: use enums for Borland (which cannot cope with static constants)
// and GCC (which issues "unused variable" warnings when static constants are used
// at a function scope)
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|| (BOOST_MPL_CFG_GCC != 0)
# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
#else
# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr)
#endif
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
struct failed {};
// agurt, 24/aug/04: MSVC 7.1 workaround here and below: return/accept
// 'assert<false>' by reference; can't apply it unconditionally -- apparently it
// degrades the quality of GCC diagnostics
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
# define AUX778076_ASSERT_ARG(x) x&
#else
# define AUX778076_ASSERT_ARG(x) x
#endif
template< bool C > struct assert { typedef void* type; };
template<> struct assert<false> { typedef AUX778076_ASSERT_ARG(assert) type; };
template< bool C >
int assertion_failed( typename assert<C>::type );
template< bool C >
struct assertion
{
static int failed( assert<false> );
};
template<>
struct assertion<true>
{
static int failed( void* );
};
struct assert_
{
#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {};
#endif
static assert_ const arg;
enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal };
};
#if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES)
bool operator==( failed, failed );
bool operator!=( failed, failed );
bool operator>( failed, failed );
bool operator>=( failed, failed );
bool operator<( failed, failed );
bool operator<=( failed, failed );
#if defined(__EDG_VERSION__)
template< bool (*)(failed, failed), long x, long y > struct assert_relation {};
# define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation<r,x,y>
#else
template< BOOST_MPL_AUX_NTTP_DECL(long, x), BOOST_MPL_AUX_NTTP_DECL(long, y), bool (*)(failed, failed) >
struct assert_relation {};
# define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation<x,y,r>
#endif
#else // BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES
boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ );
boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ );
boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ );
boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ );
boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ );
boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ );
template< assert_::relations r, long x, long y > struct assert_relation {};
#endif
#if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)
template< bool > struct assert_arg_pred_impl { typedef int type; };
template<> struct assert_arg_pred_impl<true> { typedef void* type; };
template< typename P > struct assert_arg_pred
{
typedef typename P::type p_type;
typedef typename assert_arg_pred_impl< p_type::value >::type type;
};
template< typename P > struct assert_arg_pred_not
{
typedef typename P::type p_type;
BOOST_MPL_AUX_ASSERT_CONSTANT( bool, p = !p_type::value );
typedef typename assert_arg_pred_impl<p>::type type;
};
template< typename Pred >
failed ************ (Pred::************
assert_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type )
);
template< typename Pred >
failed ************ (boost::mpl::not_<Pred>::************
assert_not_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type )
);
template< typename Pred >
AUX778076_ASSERT_ARG(assert<false>)
assert_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type );
template< typename Pred >
AUX778076_ASSERT_ARG(assert<false>)
assert_not_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type );
#else // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER
template< bool c, typename Pred > struct assert_arg_type_impl
{
typedef failed ************ Pred::* mwcw83_wknd;
typedef mwcw83_wknd ************* type;
};
template< typename Pred > struct assert_arg_type_impl<true,Pred>
{
typedef AUX778076_ASSERT_ARG(assert<false>) type;
};
template< typename Pred > struct assert_arg_type
: assert_arg_type_impl< BOOST_MPL_AUX_VALUE_WKND(BOOST_MPL_AUX_NESTED_TYPE_WKND(Pred))::value, Pred >
{
};
template< typename Pred >
typename assert_arg_type<Pred>::type
assert_arg(void (*)(Pred), int);
template< typename Pred >
typename assert_arg_type< boost::mpl::not_<Pred> >::type
assert_not_arg(void (*)(Pred), int);
# if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES)
template< long x, long y, bool (*r)(failed, failed) >
typename assert_arg_type_impl< false,BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) >::type
assert_rel_arg( BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) );
# else
template< assert_::relations r, long x, long y >
typename assert_arg_type_impl< false,assert_relation<r,x,y> >::type
assert_rel_arg( assert_relation<r,x,y> );
# endif
#endif // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER
#undef AUX778076_ASSERT_ARG
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
// BOOST_MPL_ASSERT((pred<x,...>))
#define BOOST_MPL_ASSERT(pred) \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
boost::mpl::assertion_failed<false>( \
boost::mpl::assert_arg( (void (*) pred)0, 1 ) \
) \
) \
) \
/**/
// BOOST_MPL_ASSERT_NOT((pred<x,...>))
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
# define BOOST_MPL_ASSERT_NOT(pred) \
enum { \
BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
boost::mpl::assertion<false>::failed( \
boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
) \
) \
}\
/**/
#else
# define BOOST_MPL_ASSERT_NOT(pred) \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
boost::mpl::assertion_failed<false>( \
boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
) \
) \
) \
/**/
#endif
// BOOST_MPL_ASSERT_RELATION(x, ==|!=|<=|<|>=|>, y)
#if defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES)
# if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)
// agurt, 9/nov/06: 'enum' below is a workaround for gcc 4.0.4/4.1.1 bugs #29522 and #29518
# define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \
enum { BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) }; \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
boost::mpl::assertion_failed<BOOST_PP_CAT(mpl_assert_rel_value,counter)>( \
(boost::mpl::failed ************ ( boost::mpl::assert_relation< \
boost::mpl::assert_::relations( sizeof( \
boost::mpl::assert_::arg rel boost::mpl::assert_::arg \
) ) \
, x \
, y \
>::************)) 0 ) \
) \
) \
/**/
# else
# define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assert_rel,counter) = sizeof( \
boost::mpl::assert_::arg rel boost::mpl::assert_::arg \
) \
); \
BOOST_MPL_AUX_ASSERT_CONSTANT( bool, BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) ); \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
boost::mpl::assertion_failed<BOOST_PP_CAT(mpl_assert_rel_value,counter)>( \
boost::mpl::assert_rel_arg( boost::mpl::assert_relation< \
boost::mpl::assert_::relations(BOOST_PP_CAT(mpl_assert_rel,counter)) \
, x \
, y \
>() ) \
) \
) \
) \
/**/
# endif
# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \
BOOST_MPL_ASSERT_RELATION_IMPL(BOOST_MPL_AUX_PP_COUNTER(), x, rel, y) \
/**/
#else // !BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES
# if defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)
# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
boost::mpl::assertion_failed<(x rel y)>( boost::mpl::assert_rel_arg( \
boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))() \
) ) \
) \
) \
/**/
# else
# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
boost::mpl::assertion_failed<(x rel y)>( (boost::mpl::failed ************ ( \
boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))::************))0 ) \
) \
) \
/**/
# endif
#endif
// BOOST_MPL_ASSERT_MSG( (pred<x,...>::value), USER_PROVIDED_MESSAGE, (types<x,...>) )
#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202))
# define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \
struct msg; \
typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \
{ \
using boost::mpl::assert_::types; \
static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \
{ return 0; } \
} BOOST_PP_CAT(mpl_assert_arg,counter); \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
boost::mpl::assertion<(c)>::failed( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \
) \
) \
/**/
#else
# define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \
struct msg; \
typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \
{ \
static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \
{ return 0; } \
} BOOST_PP_CAT(mpl_assert_arg,counter); \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
boost::mpl::assertion_failed<(c)>( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \
) \
) \
/**/
#endif
#define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \
BOOST_MPL_ASSERT_MSG_IMPL( BOOST_MPL_AUX_PP_COUNTER(), c, msg, types_ ) \
/**/
#endif // BOOST_MPL_ASSERT_HPP_INCLUDED
#ifndef BOOST_MPL_ASSERT_HPP_INCLUDED
#define BOOST_MPL_ASSERT_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2006
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: assert.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/not.hpp>
#include <boost/mpl/aux_/value_wknd.hpp>
#include <boost/mpl/aux_/nested_type_wknd.hpp>
#include <boost/mpl/aux_/yes_no.hpp>
#include <boost/mpl/aux_/na.hpp>
#include <boost/mpl/aux_/adl_barrier.hpp>
#include <boost/mpl/aux_/config/nttp.hpp>
#include <boost/mpl/aux_/config/dtp.hpp>
#include <boost/mpl/aux_/config/gcc.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
#include <boost/mpl/aux_/config/pp_counter.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/config.hpp> // make sure 'size_t' is placed into 'std'
#include <cstddef>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|| (BOOST_MPL_CFG_GCC != 0) \
|| BOOST_WORKAROUND(__IBMCPP__, <= 600)
# define BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES
#endif
#if BOOST_WORKAROUND(__MWERKS__, < 0x3202) \
|| BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|| BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
# define BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER
#endif
// agurt, 10/nov/06: use enums for Borland (which cannot cope with static constants)
// and GCC (which issues "unused variable" warnings when static constants are used
// at a function scope)
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|| (BOOST_MPL_CFG_GCC != 0)
# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
#else
# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr)
#endif
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
struct failed {};
// agurt, 24/aug/04: MSVC 7.1 workaround here and below: return/accept
// 'assert<false>' by reference; can't apply it unconditionally -- apparently it
// degrades the quality of GCC diagnostics
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
# define AUX778076_ASSERT_ARG(x) x&
#else
# define AUX778076_ASSERT_ARG(x) x
#endif
template< bool C > struct assert { typedef void* type; };
template<> struct assert<false> { typedef AUX778076_ASSERT_ARG(assert) type; };
template< bool C >
int assertion_failed( typename assert<C>::type );
template< bool C >
struct assertion
{
static int failed( assert<false> );
};
template<>
struct assertion<true>
{
static int failed( void* );
};
struct assert_
{
#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {};
#endif
static assert_ const arg;
enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal };
};
#if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES)
bool operator==( failed, failed );
bool operator!=( failed, failed );
bool operator>( failed, failed );
bool operator>=( failed, failed );
bool operator<( failed, failed );
bool operator<=( failed, failed );
#if defined(__EDG_VERSION__)
template< bool (*)(failed, failed), long x, long y > struct assert_relation {};
# define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation<r,x,y>
#else
template< BOOST_MPL_AUX_NTTP_DECL(long, x), BOOST_MPL_AUX_NTTP_DECL(long, y), bool (*)(failed, failed) >
struct assert_relation {};
# define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation<x,y,r>
#endif
#else // BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES
boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ );
boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ );
boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ );
boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ );
boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ );
boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ );
template< assert_::relations r, long x, long y > struct assert_relation {};
#endif
#if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)
template< bool > struct assert_arg_pred_impl { typedef int type; };
template<> struct assert_arg_pred_impl<true> { typedef void* type; };
template< typename P > struct assert_arg_pred
{
typedef typename P::type p_type;
typedef typename assert_arg_pred_impl< p_type::value >::type type;
};
template< typename P > struct assert_arg_pred_not
{
typedef typename P::type p_type;
BOOST_MPL_AUX_ASSERT_CONSTANT( bool, p = !p_type::value );
typedef typename assert_arg_pred_impl<p>::type type;
};
template< typename Pred >
failed ************ (Pred::************
assert_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type )
);
template< typename Pred >
failed ************ (boost::mpl::not_<Pred>::************
assert_not_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type )
);
template< typename Pred >
AUX778076_ASSERT_ARG(assert<false>)
assert_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type );
template< typename Pred >
AUX778076_ASSERT_ARG(assert<false>)
assert_not_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type );
#else // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER
template< bool c, typename Pred > struct assert_arg_type_impl
{
typedef failed ************ Pred::* mwcw83_wknd;
typedef mwcw83_wknd ************* type;
};
template< typename Pred > struct assert_arg_type_impl<true,Pred>
{
typedef AUX778076_ASSERT_ARG(assert<false>) type;
};
template< typename Pred > struct assert_arg_type
: assert_arg_type_impl< BOOST_MPL_AUX_VALUE_WKND(BOOST_MPL_AUX_NESTED_TYPE_WKND(Pred))::value, Pred >
{
};
template< typename Pred >
typename assert_arg_type<Pred>::type
assert_arg(void (*)(Pred), int);
template< typename Pred >
typename assert_arg_type< boost::mpl::not_<Pred> >::type
assert_not_arg(void (*)(Pred), int);
# if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES)
template< long x, long y, bool (*r)(failed, failed) >
typename assert_arg_type_impl< false,BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) >::type
assert_rel_arg( BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) );
# else
template< assert_::relations r, long x, long y >
typename assert_arg_type_impl< false,assert_relation<r,x,y> >::type
assert_rel_arg( assert_relation<r,x,y> );
# endif
#endif // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER
#undef AUX778076_ASSERT_ARG
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
// BOOST_MPL_ASSERT((pred<x,...>))
#define BOOST_MPL_ASSERT(pred) \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
boost::mpl::assertion_failed<false>( \
boost::mpl::assert_arg( (void (*) pred)0, 1 ) \
) \
) \
) \
/**/
// BOOST_MPL_ASSERT_NOT((pred<x,...>))
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
# define BOOST_MPL_ASSERT_NOT(pred) \
enum { \
BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
boost::mpl::assertion<false>::failed( \
boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
) \
) \
}\
/**/
#else
# define BOOST_MPL_ASSERT_NOT(pred) \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
boost::mpl::assertion_failed<false>( \
boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
) \
) \
) \
/**/
#endif
// BOOST_MPL_ASSERT_RELATION(x, ==|!=|<=|<|>=|>, y)
#if defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES)
# if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)
// agurt, 9/nov/06: 'enum' below is a workaround for gcc 4.0.4/4.1.1 bugs #29522 and #29518
# define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \
enum { BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) }; \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
boost::mpl::assertion_failed<BOOST_PP_CAT(mpl_assert_rel_value,counter)>( \
(boost::mpl::failed ************ ( boost::mpl::assert_relation< \
boost::mpl::assert_::relations( sizeof( \
boost::mpl::assert_::arg rel boost::mpl::assert_::arg \
) ) \
, x \
, y \
>::************)) 0 ) \
) \
) \
/**/
# else
# define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assert_rel,counter) = sizeof( \
boost::mpl::assert_::arg rel boost::mpl::assert_::arg \
) \
); \
BOOST_MPL_AUX_ASSERT_CONSTANT( bool, BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) ); \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
boost::mpl::assertion_failed<BOOST_PP_CAT(mpl_assert_rel_value,counter)>( \
boost::mpl::assert_rel_arg( boost::mpl::assert_relation< \
boost::mpl::assert_::relations(BOOST_PP_CAT(mpl_assert_rel,counter)) \
, x \
, y \
>() ) \
) \
) \
) \
/**/
# endif
# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \
BOOST_MPL_ASSERT_RELATION_IMPL(BOOST_MPL_AUX_PP_COUNTER(), x, rel, y) \
/**/
#else // !BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES
# if defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)
# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
boost::mpl::assertion_failed<(x rel y)>( boost::mpl::assert_rel_arg( \
boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))() \
) ) \
) \
) \
/**/
# else
# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
boost::mpl::assertion_failed<(x rel y)>( (boost::mpl::failed ************ ( \
boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))::************))0 ) \
) \
) \
/**/
# endif
#endif
// BOOST_MPL_ASSERT_MSG( (pred<x,...>::value), USER_PROVIDED_MESSAGE, (types<x,...>) )
#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202))
# define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \
struct msg; \
typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \
{ \
using boost::mpl::assert_::types; \
static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \
{ return 0; } \
} BOOST_PP_CAT(mpl_assert_arg,counter); \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
boost::mpl::assertion<(c)>::failed( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \
) \
) \
/**/
#else
# define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \
struct msg; \
typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \
{ \
static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \
{ return 0; } \
} BOOST_PP_CAT(mpl_assert_arg,counter); \
BOOST_MPL_AUX_ASSERT_CONSTANT( \
std::size_t \
, BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
boost::mpl::assertion_failed<(c)>( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \
) \
) \
/**/
#endif
#define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \
BOOST_MPL_ASSERT_MSG_IMPL( BOOST_MPL_AUX_PP_COUNTER(), c, msg, types_ ) \
/**/
#endif // BOOST_MPL_ASSERT_HPP_INCLUDED

View File

@ -1,52 +1,52 @@
#ifndef BOOST_MPL_AT_HPP_INCLUDED
#define BOOST_MPL_AT_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: at.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/at_fwd.hpp>
#include <boost/mpl/aux_/at_impl.hpp>
#include <boost/mpl/long.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/nttp_decl.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(N)
>
struct at
: at_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence,N >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,at,(Sequence,N))
};
template<
typename Sequence
, BOOST_MPL_AUX_NTTP_DECL(long, N)
>
struct at_c
: at_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence,mpl::long_<N> >
{
};
BOOST_MPL_AUX_NA_SPEC(2, at)
}}
#endif // BOOST_MPL_AT_HPP_INCLUDED
#ifndef BOOST_MPL_AT_HPP_INCLUDED
#define BOOST_MPL_AT_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: at.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/at_fwd.hpp>
#include <boost/mpl/aux_/at_impl.hpp>
#include <boost/mpl/long.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/nttp_decl.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(N)
>
struct at
: at_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence,N >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,at,(Sequence,N))
};
template<
typename Sequence
, BOOST_MPL_AUX_NTTP_DECL(long, N)
>
struct at_c
: at_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence,mpl::long_<N> >
{
};
BOOST_MPL_AUX_NA_SPEC(2, at)
}}
#endif // BOOST_MPL_AT_HPP_INCLUDED

View File

@ -1,24 +1,24 @@
#ifndef BOOST_MPL_AT_FWD_HPP_INCLUDED
#define BOOST_MPL_AT_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: at_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct at_impl;
template< typename Sequence, typename N > struct at;
}}
#endif // BOOST_MPL_AT_FWD_HPP_INCLUDED
#ifndef BOOST_MPL_AT_FWD_HPP_INCLUDED
#define BOOST_MPL_AT_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: at_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct at_impl;
template< typename Sequence, typename N > struct at;
}}
#endif // BOOST_MPL_AT_FWD_HPP_INCLUDED

View File

@ -0,0 +1,120 @@
#ifndef BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED
#define BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: joint_iter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/next_prior.hpp>
#include <boost/mpl/deref.hpp>
#include <boost/mpl/iterator_tags.hpp>
#include <boost/mpl/aux_/lambda_spec.hpp>
#include <boost/mpl/aux_/config/ctps.hpp>
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
# include <boost/type_traits/is_same.hpp>
#endif
namespace boost { namespace mpl {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
typename Iterator1
, typename LastIterator1
, typename Iterator2
>
struct joint_iter
{
typedef Iterator1 base;
typedef forward_iterator_tag category;
};
template<
typename LastIterator1
, typename Iterator2
>
struct joint_iter<LastIterator1,LastIterator1,Iterator2>
{
typedef Iterator2 base;
typedef forward_iterator_tag category;
};
template< typename I1, typename L1, typename I2 >
struct deref< joint_iter<I1,L1,I2> >
{
typedef typename joint_iter<I1,L1,I2>::base base_;
typedef typename deref<base_>::type type;
};
template< typename I1, typename L1, typename I2 >
struct next< joint_iter<I1,L1,I2> >
{
typedef joint_iter< typename mpl::next<I1>::type,L1,I2 > type;
};
template< typename L1, typename I2 >
struct next< joint_iter<L1,L1,I2> >
{
typedef joint_iter< L1,L1,typename mpl::next<I2>::type > type;
};
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template<
typename Iterator1
, typename LastIterator1
, typename Iterator2
>
struct joint_iter;
template< bool > struct joint_iter_impl
{
template< typename I1, typename L1, typename I2 > struct result_
{
typedef I1 base;
typedef forward_iterator_tag category;
typedef joint_iter< typename mpl::next<I1>::type,L1,I2 > next;
typedef typename deref<I1>::type type;
};
};
template<> struct joint_iter_impl<true>
{
template< typename I1, typename L1, typename I2 > struct result_
{
typedef I2 base;
typedef forward_iterator_tag category;
typedef joint_iter< L1,L1,typename mpl::next<I2>::type > next;
typedef typename deref<I2>::type type;
};
};
template<
typename Iterator1
, typename LastIterator1
, typename Iterator2
>
struct joint_iter
: joint_iter_impl< is_same<Iterator1,LastIterator1>::value >
::template result_<Iterator1,LastIterator1,Iterator2>
{
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, joint_iter)
}}
#endif // BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED

View File

@ -0,0 +1,39 @@
#ifndef BOOST_MPL_BACK_HPP_INCLUDED
#define BOOST_MPL_BACK_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/back_fwd.hpp>
#include <boost/mpl/aux_/back_impl.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
>
struct back
: back_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,back,(Sequence))
};
BOOST_MPL_AUX_NA_SPEC(1, back)
}}
#endif // BOOST_MPL_BACK_HPP_INCLUDED

View File

@ -1,24 +1,24 @@
#ifndef BOOST_MPL_BACK_FWD_HPP_INCLUDED
#define BOOST_MPL_BACK_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: back_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct back_impl;
template< typename Sequence > struct back;
}}
#endif // BOOST_MPL_BACK_FWD_HPP_INCLUDED
#ifndef BOOST_MPL_BACK_FWD_HPP_INCLUDED
#define BOOST_MPL_BACK_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: back_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct back_impl;
template< typename Sequence > struct back;
}}
#endif // BOOST_MPL_BACK_FWD_HPP_INCLUDED

View File

@ -1,34 +1,34 @@
#ifndef BOOST_MPL_BACK_INSERTER_HPP_INCLUDED
#define BOOST_MPL_BACK_INSERTER_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: back_inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/push_back.hpp>
#include <boost/mpl/inserter.hpp>
namespace boost {
namespace mpl {
template<
typename Sequence
>
struct back_inserter
: inserter< Sequence,push_back<> >
{
};
}}
#endif // BOOST_MPL_BACK_INSERTER_HPP_INCLUDED
#ifndef BOOST_MPL_BACK_INSERTER_HPP_INCLUDED
#define BOOST_MPL_BACK_INSERTER_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: back_inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/push_back.hpp>
#include <boost/mpl/inserter.hpp>
namespace boost {
namespace mpl {
template<
typename Sequence
>
struct back_inserter
: inserter< Sequence,push_back<> >
{
};
}}
#endif // BOOST_MPL_BACK_INSERTER_HPP_INCLUDED

View File

@ -0,0 +1,35 @@
#ifndef BOOST_MPL_BASE_HPP_INCLUDED
#define BOOST_MPL_BASE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: base.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct base
{
typedef typename T::base type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,base,(T))
};
BOOST_MPL_AUX_NA_SPEC(1, base)
}}
#endif // BOOST_MPL_BASE_HPP_INCLUDED

View File

@ -0,0 +1,19 @@
#ifndef BOOST_MPL_BEGIN_HPP_INCLUDED
#define BOOST_MPL_BEGIN_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: begin.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end.hpp>
#endif // BOOST_MPL_BEGIN_HPP_INCLUDED

View File

@ -1,57 +1,57 @@
#ifndef BOOST_MPL_BEGIN_END_HPP_INCLUDED
#define BOOST_MPL_BEGIN_END_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: begin_end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end_fwd.hpp>
#include <boost/mpl/aux_/begin_end_impl.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
// agurt, 13/sep/02: switched from inheritance to typedef; MSVC is more
// happy this way (less ETI-related errors), and it doesn't affect
// anything else
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
>
struct begin
{
typedef typename sequence_tag<Sequence>::type tag_;
typedef typename begin_impl< tag_ >
::template apply< Sequence >::type type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,begin,(Sequence))
};
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
>
struct end
{
typedef typename sequence_tag<Sequence>::type tag_;
typedef typename end_impl< tag_ >
::template apply< Sequence >::type type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,end,(Sequence))
};
BOOST_MPL_AUX_NA_SPEC(1, begin)
BOOST_MPL_AUX_NA_SPEC(1, end)
}}
#endif // BOOST_MPL_BEGIN_END_HPP_INCLUDED
#ifndef BOOST_MPL_BEGIN_END_HPP_INCLUDED
#define BOOST_MPL_BEGIN_END_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: begin_end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end_fwd.hpp>
#include <boost/mpl/aux_/begin_end_impl.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
// agurt, 13/sep/02: switched from inheritance to typedef; MSVC is more
// happy this way (less ETI-related errors), and it doesn't affect
// anything else
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
>
struct begin
{
typedef typename sequence_tag<Sequence>::type tag_;
typedef typename begin_impl< tag_ >
::template apply< Sequence >::type type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,begin,(Sequence))
};
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
>
struct end
{
typedef typename sequence_tag<Sequence>::type tag_;
typedef typename end_impl< tag_ >
::template apply< Sequence >::type type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,end,(Sequence))
};
BOOST_MPL_AUX_NA_SPEC(1, begin)
BOOST_MPL_AUX_NA_SPEC(1, end)
}}
#endif // BOOST_MPL_BEGIN_END_HPP_INCLUDED

View File

@ -1,27 +1,27 @@
#ifndef BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED
#define BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: begin_end_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct begin_impl;
template< typename Tag > struct end_impl;
template< typename Sequence > struct begin;
template< typename Sequence > struct end;
}}
#endif // BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED
#ifndef BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED
#define BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: begin_end_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct begin_impl;
template< typename Tag > struct end_impl;
template< typename Sequence > struct begin;
template< typename Sequence > struct end;
}}
#endif // BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED

File diff suppressed because it is too large Load Diff

View File

@ -1,99 +1,99 @@
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_BIND_FWD_HPP_INCLUDED
#define BOOST_MPL_BIND_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bind_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/aux_/na.hpp>
#endif
#include <boost/mpl/aux_/config/bind.hpp>
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER bind_fwd.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#else
# include <boost/mpl/limits/arity.hpp>
# include <boost/mpl/aux_/preprocessor/params.hpp>
# include <boost/mpl/aux_/preprocessor/default_params.hpp>
# include <boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp>
# include <boost/preprocessor/comma_if.hpp>
# include <boost/preprocessor/iterate.hpp>
# include <boost/preprocessor/cat.hpp>
namespace boost { namespace mpl {
// local macros, #undef-ined at the end of the header
# if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS)
# define AUX778076_DMC_PARAM() , int dummy_ = 0
# else
# define AUX778076_DMC_PARAM()
# endif
# define AUX778076_BIND_DEFAULT_PARAMS(param, value) \
BOOST_MPL_PP_DEFAULT_PARAMS( \
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
, param \
, value \
) \
AUX778076_DMC_PARAM() \
/**/
# define AUX778076_BIND_N_PARAMS(n, param) \
BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \
AUX778076_DMC_PARAM() \
/**/
#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE)
template<
typename F, AUX778076_BIND_DEFAULT_PARAMS(typename T, na)
>
struct bind;
#endif
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/bind_fwd.hpp>))
#include BOOST_PP_ITERATE()
# undef AUX778076_BIND_N_PARAMS
# undef AUX778076_BIND_DEFAULT_PARAMS
# undef AUX778076_DMC_PARAM
}}
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_BIND_FWD_HPP_INCLUDED
///// iteration
#else
#define i_ BOOST_PP_FRAME_ITERATION(1)
template<
typename F AUX778076_BIND_N_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(bind,i_);
#undef i_
#endif // BOOST_PP_IS_ITERATING
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_BIND_FWD_HPP_INCLUDED
#define BOOST_MPL_BIND_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bind_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/aux_/na.hpp>
#endif
#include <boost/mpl/aux_/config/bind.hpp>
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER bind_fwd.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#else
# include <boost/mpl/limits/arity.hpp>
# include <boost/mpl/aux_/preprocessor/params.hpp>
# include <boost/mpl/aux_/preprocessor/default_params.hpp>
# include <boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp>
# include <boost/preprocessor/comma_if.hpp>
# include <boost/preprocessor/iterate.hpp>
# include <boost/preprocessor/cat.hpp>
namespace boost { namespace mpl {
// local macros, #undef-ined at the end of the header
# if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS)
# define AUX778076_DMC_PARAM() , int dummy_ = 0
# else
# define AUX778076_DMC_PARAM()
# endif
# define AUX778076_BIND_DEFAULT_PARAMS(param, value) \
BOOST_MPL_PP_DEFAULT_PARAMS( \
BOOST_MPL_LIMIT_METAFUNCTION_ARITY \
, param \
, value \
) \
AUX778076_DMC_PARAM() \
/**/
# define AUX778076_BIND_N_PARAMS(n, param) \
BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \
AUX778076_DMC_PARAM() \
/**/
#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE)
template<
typename F, AUX778076_BIND_DEFAULT_PARAMS(typename T, na)
>
struct bind;
#endif
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/bind_fwd.hpp>))
#include BOOST_PP_ITERATE()
# undef AUX778076_BIND_N_PARAMS
# undef AUX778076_BIND_DEFAULT_PARAMS
# undef AUX778076_DMC_PARAM
}}
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_BIND_FWD_HPP_INCLUDED
///// iteration
#else
#define i_ BOOST_PP_FRAME_ITERATION(1)
template<
typename F AUX778076_BIND_N_PARAMS(i_, typename T)
>
struct BOOST_PP_CAT(bind,i_);
#undef i_
#endif // BOOST_PP_IS_ITERATING

View File

@ -0,0 +1,23 @@
#ifndef BOOST_MPL_BITAND_HPP_INCLUDED
#define BOOST_MPL_BITAND_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
// Copyright Jaap Suter 2003
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bitand.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME bitand_
#define AUX778076_OP_PREFIX bitand
#define AUX778076_OP_TOKEN &
#include <boost/mpl/aux_/arithmetic_op.hpp>
#endif // BOOST_MPL_BITAND_HPP_INCLUDED

View File

@ -0,0 +1,23 @@
#ifndef BOOST_MPL_BITOR_HPP_INCLUDED
#define BOOST_MPL_BITOR_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
// Copyright Jaap Suter 2003
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bitor.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME bitor_
#define AUX778076_OP_PREFIX bitor
#define AUX778076_OP_TOKEN |
#include <boost/mpl/aux_/arithmetic_op.hpp>
#endif // BOOST_MPL_BITOR_HPP_INCLUDED

View File

@ -0,0 +1,24 @@
#ifndef BOOST_MPL_BITWISE_HPP_INCLUDED
#define BOOST_MPL_BITWISE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright Jaap Suter 2003
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bitwise.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/bitand.hpp>
#include <boost/mpl/bitor.hpp>
#include <boost/mpl/bitxor.hpp>
#include <boost/mpl/shift_left.hpp>
#include <boost/mpl/shift_right.hpp>
#endif // BOOST_MPL_BITWISE_HPP_INCLUDED

View File

@ -0,0 +1,23 @@
#ifndef BOOST_MPL_BITXOR_HPP_INCLUDED
#define BOOST_MPL_BITXOR_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
// Copyright Jaap Suter 2003
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bitxor.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME bitxor_
#define AUX778076_OP_PREFIX bitxor
#define AUX778076_OP_TOKEN ^
#include <boost/mpl/aux_/arithmetic_op.hpp>
#endif // BOOST_MPL_BITXOR_HPP_INCLUDED

View File

@ -1,39 +1,39 @@
#ifndef BOOST_MPL_BOOL_HPP_INCLUDED
#define BOOST_MPL_BOOL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bool.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/bool_fwd.hpp>
#include <boost/mpl/integral_c_tag.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
template< bool C_ > struct bool_
{
BOOST_STATIC_CONSTANT(bool, value = C_);
typedef integral_c_tag tag;
typedef bool_ type;
typedef bool value_type;
operator bool() const { return this->value; }
};
#if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
template< bool C_ >
bool const bool_<C_>::value;
#endif
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
#endif // BOOST_MPL_BOOL_HPP_INCLUDED
#ifndef BOOST_MPL_BOOL_HPP_INCLUDED
#define BOOST_MPL_BOOL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bool.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/bool_fwd.hpp>
#include <boost/mpl/integral_c_tag.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
template< bool C_ > struct bool_
{
BOOST_STATIC_CONSTANT(bool, value = C_);
typedef integral_c_tag tag;
typedef bool_ type;
typedef bool value_type;
operator bool() const { return this->value; }
};
#if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
template< bool C_ >
bool const bool_<C_>::value;
#endif
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
#endif // BOOST_MPL_BOOL_HPP_INCLUDED

View File

@ -1,33 +1,33 @@
#ifndef BOOST_MPL_BOOL_FWD_HPP_INCLUDED
#define BOOST_MPL_BOOL_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bool_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/adl_barrier.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
template< bool C_ > struct bool_;
// shorcuts
typedef bool_<true> true_;
typedef bool_<false> false_;
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
BOOST_MPL_AUX_ADL_BARRIER_DECL(bool_)
BOOST_MPL_AUX_ADL_BARRIER_DECL(true_)
BOOST_MPL_AUX_ADL_BARRIER_DECL(false_)
#endif // BOOST_MPL_BOOL_FWD_HPP_INCLUDED
#ifndef BOOST_MPL_BOOL_FWD_HPP_INCLUDED
#define BOOST_MPL_BOOL_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bool_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/adl_barrier.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
template< bool C_ > struct bool_;
// shorcuts
typedef bool_<true> true_;
typedef bool_<false> false_;
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
BOOST_MPL_AUX_ADL_BARRIER_DECL(bool_)
BOOST_MPL_AUX_ADL_BARRIER_DECL(true_)
BOOST_MPL_AUX_ADL_BARRIER_DECL(false_)
#endif // BOOST_MPL_BOOL_FWD_HPP_INCLUDED

View File

@ -1,39 +1,39 @@
#ifndef BOOST_MPL_CLEAR_HPP_INCLUDED
#define BOOST_MPL_CLEAR_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: clear.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/clear_fwd.hpp>
#include <boost/mpl/aux_/clear_impl.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
>
struct clear
: clear_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,clear,(Sequence))
};
BOOST_MPL_AUX_NA_SPEC(1, clear)
}}
#endif // BOOST_MPL_CLEAR_HPP_INCLUDED
#ifndef BOOST_MPL_CLEAR_HPP_INCLUDED
#define BOOST_MPL_CLEAR_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: clear.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/clear_fwd.hpp>
#include <boost/mpl/aux_/clear_impl.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
>
struct clear
: clear_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,clear,(Sequence))
};
BOOST_MPL_AUX_NA_SPEC(1, clear)
}}
#endif // BOOST_MPL_CLEAR_HPP_INCLUDED

View File

@ -1,24 +1,24 @@
#ifndef BOOST_MPL_CLEAR_FWD_HPP_INCLUDED
#define BOOST_MPL_CLEAR_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: clear_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct clear_impl;
template< typename Sequence > struct clear;
}}
#endif // BOOST_MPL_CLEAR_FWD_HPP_INCLUDED
#ifndef BOOST_MPL_CLEAR_FWD_HPP_INCLUDED
#define BOOST_MPL_CLEAR_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: clear_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct clear_impl;
template< typename Sequence > struct clear;
}}
#endif // BOOST_MPL_CLEAR_FWD_HPP_INCLUDED

View File

@ -1,24 +1,24 @@
#ifndef BOOST_MPL_COMPARISON_HPP_INCLUDED
#define BOOST_MPL_COMPARISON_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: comparison.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/equal_to.hpp>
#include <boost/mpl/not_equal_to.hpp>
#include <boost/mpl/less.hpp>
#include <boost/mpl/greater.hpp>
#include <boost/mpl/less_equal.hpp>
#include <boost/mpl/greater_equal.hpp>
#endif // BOOST_MPL_COMPARISON_HPP_INCLUDED
#ifndef BOOST_MPL_COMPARISON_HPP_INCLUDED
#define BOOST_MPL_COMPARISON_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: comparison.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/equal_to.hpp>
#include <boost/mpl/not_equal_to.hpp>
#include <boost/mpl/less.hpp>
#include <boost/mpl/greater.hpp>
#include <boost/mpl/less_equal.hpp>
#include <boost/mpl/greater_equal.hpp>
#endif // BOOST_MPL_COMPARISON_HPP_INCLUDED

View File

@ -1,41 +1,41 @@
#ifndef BOOST_MPL_CONTAINS_HPP_INCLUDED
#define BOOST_MPL_CONTAINS_HPP_INCLUDED
// Copyright Eric Friedman 2002
// Copyright Aleksey Gurtovoy 2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: contains.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/contains_fwd.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/contains_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct contains
: contains_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence,T >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,contains,(Sequence,T))
};
BOOST_MPL_AUX_NA_SPEC(2, contains)
}}
#endif // BOOST_MPL_CONTAINS_HPP_INCLUDED
#ifndef BOOST_MPL_CONTAINS_HPP_INCLUDED
#define BOOST_MPL_CONTAINS_HPP_INCLUDED
// Copyright Eric Friedman 2002
// Copyright Aleksey Gurtovoy 2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: contains.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/contains_fwd.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/contains_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct contains
: contains_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence,T >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,contains,(Sequence,T))
};
BOOST_MPL_AUX_NA_SPEC(2, contains)
}}
#endif // BOOST_MPL_CONTAINS_HPP_INCLUDED

View File

@ -1,25 +1,25 @@
#ifndef BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED
#define BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED
// Copyright Eric Friedman 2002
// Copyright Aleksey Gurtovoy 2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: contains_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct contains_impl;
template< typename Sequence, typename T > struct contains;
}}
#endif // BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED
#ifndef BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED
#define BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED
// Copyright Eric Friedman 2002
// Copyright Aleksey Gurtovoy 2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: contains_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct contains_impl;
template< typename Sequence, typename T > struct contains;
}}
#endif // BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED

View File

@ -0,0 +1,58 @@
#ifndef BOOST_MPL_COPY_HPP_INCLUDED
#define BOOST_MPL_COPY_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
// Copyright David Abrahams 2003-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: copy.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/fold.hpp>
#include <boost/mpl/reverse_fold.hpp>
#include <boost/mpl/aux_/inserter_algorithm.hpp>
namespace boost { namespace mpl {
namespace aux {
template<
typename Sequence
, typename Inserter
>
struct copy_impl
: fold<
Sequence
, typename Inserter::state
, typename Inserter::operation
>
{
};
template<
typename Sequence
, typename Inserter
>
struct reverse_copy_impl
: reverse_fold<
Sequence
, typename Inserter::state
, typename Inserter::operation
>
{
};
} // namespace aux
BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(2, copy)
}}
#endif // BOOST_MPL_COPY_HPP_INCLUDED

View File

@ -0,0 +1,96 @@
#ifndef BOOST_MPL_COPY_IF_HPP_INCLUDED
#define BOOST_MPL_COPY_IF_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
// Copyright David Abrahams 2003-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: copy_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/fold.hpp>
#include <boost/mpl/reverse_fold.hpp>
#include <boost/mpl/apply.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/protect.hpp>
#include <boost/mpl/aux_/inserter_algorithm.hpp>
#include <boost/mpl/aux_/config/forwarding.hpp>
namespace boost { namespace mpl {
namespace aux {
template<
typename Operation
, typename Predicate
>
struct copy_if_op
{
template< typename Sequence, typename T > struct apply
#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
: eval_if<
typename apply1<Predicate,T>::type
, apply2<Operation,Sequence,T>
, identity<Sequence>
>
{
#else
{
typedef typename eval_if<
typename apply1<Predicate,T>::type
, apply2<Operation,Sequence,T>
, identity<Sequence>
>::type type;
#endif
};
};
template<
typename Sequence
, typename Predicate
, typename Inserter
>
struct copy_if_impl
: fold<
Sequence
, typename Inserter::state
, protect< aux::copy_if_op<
typename Inserter::operation
, Predicate
> >
>
{
};
template<
typename Sequence
, typename Predicate
, typename Inserter
>
struct reverse_copy_if_impl
: reverse_fold<
Sequence
, typename Inserter::state
, protect< aux::copy_if_op<
typename Inserter::operation
, Predicate
> >
>
{
};
} // namespace aux
BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, copy_if)
}}
#endif // BOOST_MPL_COPY_IF_HPP_INCLUDED

View File

@ -0,0 +1,40 @@
#ifndef BOOST_MPL_COUNT_HPP_INCLUDED
#define BOOST_MPL_COUNT_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: count.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/count_fwd.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/count_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct count
: count_impl< typename sequence_tag<Sequence>::type >
::template apply<Sequence,T>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,count,(Sequence,T))
};
BOOST_MPL_AUX_NA_SPEC(2, count)
}}
#endif // BOOST_MPL_COUNT_HPP_INCLUDED

View File

@ -0,0 +1,24 @@
#ifndef BOOST_MPL_COUNT_FWD_HPP_INCLUDED
#define BOOST_MPL_COUNT_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: count_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct count_impl;
template< typename Sequence, typename T > struct count;
}}
#endif // BOOST_MPL_COUNT_FWD_HPP_INCLUDED

View File

@ -0,0 +1,79 @@
#ifndef BOOST_MPL_COUNT_IF_HPP_INCLUDED
#define BOOST_MPL_COUNT_IF_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2002
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: count_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/fold.hpp>
#include <boost/mpl/next.hpp>
#include <boost/mpl/integral_c.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/apply.hpp>
#include <boost/mpl/aux_/msvc_eti_base.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/config/forwarding.hpp>
namespace boost { namespace mpl {
namespace aux {
template< typename Predicate >
struct next_if
{
template<
typename N
, typename T
>
struct apply
#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
: eval_if<
typename apply1<Predicate,T>::type
, next<N>
, identity<N>
>
{
#else
{
typedef typename eval_if<
typename apply1<Predicate,T>::type
, next<N>
, identity<N>
>::type type;
#endif
};
};
} // namespace aux
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(Predicate)
>
struct count_if
: aux::msvc_eti_base< typename fold<
Sequence
, integral_c<unsigned long,0>
, protect< aux::next_if<Predicate> >
>::type >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,count_if,(Sequence,Predicate))
};
BOOST_MPL_AUX_NA_SPEC(2, count_if)
}}
#endif // BOOST_MPL_COUNT_IF_HPP_INCLUDED

View File

@ -0,0 +1,58 @@
#ifndef BOOST_MPL_DEQUE_HPP_INCLUDED
#define BOOST_MPL_DEQUE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: deque.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/limits/vector.hpp>
# include <boost/mpl/aux_/na.hpp>
# include <boost/mpl/aux_/config/preprocessor.hpp>
# include <boost/preprocessor/inc.hpp>
# include <boost/preprocessor/cat.hpp>
# include <boost/preprocessor/stringize.hpp>
#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
# define AUX778076_DEQUE_HEADER \
BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE).hpp \
/**/
#else
# define AUX778076_DEQUE_HEADER \
BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE)##.hpp \
/**/
#endif
# include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_DEQUE_HEADER)
# undef AUX778076_DEQUE_HEADER
#endif
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER deque.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#else
# include <boost/mpl/limits/vector.hpp>
# define AUX778076_SEQUENCE_NAME deque
# define AUX778076_SEQUENCE_BASE_NAME vector
# define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_VECTOR_SIZE
# include <boost/mpl/aux_/sequence_wrapper.hpp>
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_DEQUE_HPP_INCLUDED

View File

@ -1,41 +1,41 @@
#ifndef BOOST_MPL_DEREF_HPP_INCLUDED
#define BOOST_MPL_DEREF_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2002-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: deref.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/msvc_type.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/config/eti.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Iterator)
>
struct deref
{
#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG)
typedef typename Iterator::type type;
#else
typedef typename aux::msvc_type<Iterator>::type type;
#endif
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,deref,(Iterator))
};
BOOST_MPL_AUX_NA_SPEC(1, deref)
}}
#endif // BOOST_MPL_DEREF_HPP_INCLUDED
#ifndef BOOST_MPL_DEREF_HPP_INCLUDED
#define BOOST_MPL_DEREF_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2002-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: deref.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/msvc_type.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/config/eti.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Iterator)
>
struct deref
{
#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG)
typedef typename Iterator::type type;
#else
typedef typename aux::msvc_type<Iterator>::type type;
#endif
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,deref,(Iterator))
};
BOOST_MPL_AUX_NA_SPEC(1, deref)
}}
#endif // BOOST_MPL_DEREF_HPP_INCLUDED

View File

@ -1,78 +1,78 @@
#ifndef BOOST_MPL_DISTANCE_HPP_INCLUDED
#define BOOST_MPL_DISTANCE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: distance.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/distance_fwd.hpp>
#include <boost/mpl/iter_fold.hpp>
#include <boost/mpl/iterator_range.hpp>
#include <boost/mpl/long.hpp>
#include <boost/mpl/next.hpp>
#include <boost/mpl/tag.hpp>
#include <boost/mpl/apply_wrap.hpp>
#include <boost/mpl/aux_/msvc_eti_base.hpp>
#include <boost/mpl/aux_/value_wknd.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/config/forwarding.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
namespace boost { namespace mpl {
// default implementation for forward/bidirectional iterators
template< typename Tag > struct distance_impl
{
template< typename First, typename Last > struct apply
#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
: aux::msvc_eti_base< typename iter_fold<
iterator_range<First,Last>
, mpl::long_<0>
, next<>
>::type >
{
#else
{
typedef typename iter_fold<
iterator_range<First,Last>
, mpl::long_<0>
, next<>
>::type type;
BOOST_STATIC_CONSTANT(long, value =
(iter_fold<
iterator_range<First,Last>
, mpl::long_<0>
, next<>
>::type::value)
);
#endif
};
};
template<
typename BOOST_MPL_AUX_NA_PARAM(First)
, typename BOOST_MPL_AUX_NA_PARAM(Last)
>
struct distance
: distance_impl< typename tag<First>::type >
::template apply<First, Last>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, distance, (First, Last))
};
BOOST_MPL_AUX_NA_SPEC(2, distance)
}}
#endif // BOOST_MPL_DISTANCE_HPP_INCLUDED
#ifndef BOOST_MPL_DISTANCE_HPP_INCLUDED
#define BOOST_MPL_DISTANCE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: distance.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/distance_fwd.hpp>
#include <boost/mpl/iter_fold.hpp>
#include <boost/mpl/iterator_range.hpp>
#include <boost/mpl/long.hpp>
#include <boost/mpl/next.hpp>
#include <boost/mpl/tag.hpp>
#include <boost/mpl/apply_wrap.hpp>
#include <boost/mpl/aux_/msvc_eti_base.hpp>
#include <boost/mpl/aux_/value_wknd.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/config/forwarding.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
namespace boost { namespace mpl {
// default implementation for forward/bidirectional iterators
template< typename Tag > struct distance_impl
{
template< typename First, typename Last > struct apply
#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
: aux::msvc_eti_base< typename iter_fold<
iterator_range<First,Last>
, mpl::long_<0>
, next<>
>::type >
{
#else
{
typedef typename iter_fold<
iterator_range<First,Last>
, mpl::long_<0>
, next<>
>::type type;
BOOST_STATIC_CONSTANT(long, value =
(iter_fold<
iterator_range<First,Last>
, mpl::long_<0>
, next<>
>::type::value)
);
#endif
};
};
template<
typename BOOST_MPL_AUX_NA_PARAM(First)
, typename BOOST_MPL_AUX_NA_PARAM(Last)
>
struct distance
: distance_impl< typename tag<First>::type >
::template apply<First, Last>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, distance, (First, Last))
};
BOOST_MPL_AUX_NA_SPEC(2, distance)
}}
#endif // BOOST_MPL_DISTANCE_HPP_INCLUDED

View File

@ -1,28 +1,28 @@
#ifndef BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED
#define BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: distance_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/common_name_wknd.hpp>
namespace boost { namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(distance)
template< typename Tag > struct distance_impl;
template< typename First, typename Last > struct distance;
}}
#endif // BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED
#ifndef BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED
#define BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: distance_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/common_name_wknd.hpp>
namespace boost { namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(distance)
template< typename Tag > struct distance_impl;
template< typename First, typename Last > struct distance;
}}
#endif // BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED

View File

@ -0,0 +1,21 @@
#ifndef BOOST_MPL_DIVIDES_HPP_INCLUDED
#define BOOST_MPL_DIVIDES_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: divides.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME divides
#define AUX778076_OP_TOKEN /
#include <boost/mpl/aux_/arithmetic_op.hpp>
#endif // BOOST_MPL_DIVIDES_HPP_INCLUDED

View File

@ -0,0 +1,39 @@
#ifndef BOOST_MPL_EMPTY_HPP_INCLUDED
#define BOOST_MPL_EMPTY_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/empty_fwd.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/empty_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
>
struct empty
: empty_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,empty,(Sequence))
};
BOOST_MPL_AUX_NA_SPEC(1, empty)
}}
#endif // BOOST_MPL_EMPTY_HPP_INCLUDED

View File

@ -0,0 +1,59 @@
#ifndef BOOST_MPL_EMPTY_BASE_HPP_INCLUDED
#define BOOST_MPL_EMPTY_BASE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: empty_base.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/bool.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#include <boost/type_traits/is_empty.hpp>
// should be always the last #include directive
#include <boost/type_traits/detail/bool_trait_def.hpp>
namespace boost { namespace mpl {
// empty base class, guaranteed to have no members; inheritance from
// 'empty_base' through the 'inherit' metafunction is a no-op - see
// "mpl/inherit.hpp> header for the details
struct empty_base {};
template< typename T >
struct is_empty_base
: false_
{
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
using false_::value;
#endif
};
template<>
struct is_empty_base<empty_base>
: true_
{
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
using true_::value;
#endif
};
}}
namespace boost {
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_empty, mpl::empty_base, true)
}
#include <boost/type_traits/detail/bool_trait_undef.hpp>
#endif // BOOST_MPL_EMPTY_BASE_HPP_INCLUDED

View File

@ -1,24 +1,24 @@
#ifndef BOOST_MPL_EMPTY_FWD_HPP_INCLUDED
#define BOOST_MPL_EMPTY_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: empty_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct empty_impl;
template< typename Sequence > struct empty;
}}
#endif // BOOST_MPL_EMPTY_FWD_HPP_INCLUDED
#ifndef BOOST_MPL_EMPTY_FWD_HPP_INCLUDED
#define BOOST_MPL_EMPTY_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: empty_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct empty_impl;
template< typename Sequence > struct empty;
}}
#endif // BOOST_MPL_EMPTY_FWD_HPP_INCLUDED

View File

@ -0,0 +1,42 @@
#ifndef BOOST_MPL_EMPTY_SEQUENCE_HPP_INCLUDED
#define BOOST_MPL_EMPTY_SEQUENCE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2004
// Copyright Alexander Nasonov 2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: empty_sequence.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/size_fwd.hpp>
#include <boost/mpl/int.hpp>
#include <boost/mpl/iterator_tags.hpp>
namespace boost { namespace mpl {
struct empty_sequence
{
struct tag;
struct begin { typedef random_access_iterator_tag category; };
typedef begin end;
};
template<>
struct size_impl<empty_sequence::tag>
{
template< typename Sequence > struct apply
: int_<0>
{
};
};
}}
#endif // #ifndef BOOST_MPL_EMPTY_SEQUENCE_HPP_INCLUDED

View File

@ -0,0 +1,19 @@
#ifndef BOOST_MPL_END_HPP_INCLUDED
#define BOOST_MPL_END_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end.hpp>
#endif // BOOST_MPL_END_HPP_INCLUDED

View File

@ -0,0 +1,112 @@
#ifndef BOOST_MPL_EQUAL_HPP_INCLUDED
#define BOOST_MPL_EQUAL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/iter_fold_if_impl.hpp>
#include <boost/mpl/aux_/iter_apply.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/not.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/next.hpp>
#include <boost/mpl/always.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/lambda.hpp>
#include <boost/mpl/bind.hpp>
#include <boost/mpl/apply.hpp>
#include <boost/mpl/void.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/msvc_eti_base.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace mpl {
namespace aux {
template<
typename Predicate
, typename LastIterator1
, typename LastIterator2
>
struct equal_pred
{
template<
typename Iterator2
, typename Iterator1
>
struct apply
{
typedef typename and_<
not_< is_same<Iterator1,LastIterator1> >
, not_< is_same<Iterator2,LastIterator2> >
, aux::iter_apply2<Predicate,Iterator1,Iterator2>
>::type type;
};
};
template<
typename Sequence1
, typename Sequence2
, typename Predicate
>
struct equal_impl
{
typedef typename begin<Sequence1>::type first1_;
typedef typename begin<Sequence2>::type first2_;
typedef typename end<Sequence1>::type last1_;
typedef typename end<Sequence2>::type last2_;
typedef aux::iter_fold_if_impl<
first1_
, first2_
, next<>
, protect< aux::equal_pred<Predicate,last1_,last2_> >
, void_
, always<false_>
> fold_;
typedef typename fold_::iterator iter1_;
typedef typename fold_::state iter2_;
typedef and_<
is_same<iter1_,last1_>
, is_same<iter2_,last2_>
> result_;
typedef typename result_::type type;
};
} // namespace aux
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence1)
, typename BOOST_MPL_AUX_NA_PARAM(Sequence2)
, typename Predicate = is_same<_,_>
>
struct equal
: aux::msvc_eti_base<
typename aux::equal_impl<Sequence1,Sequence2,Predicate>::type
>::type
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,equal,(Sequence1,Sequence2))
};
BOOST_MPL_AUX_NA_SPEC(2, equal)
}}
#endif // BOOST_MPL_EQUAL_HPP_INCLUDED

View File

@ -1,21 +1,21 @@
#ifndef BOOST_MPL_EQUAL_TO_HPP_INCLUDED
#define BOOST_MPL_EQUAL_TO_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: equal_to.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME equal_to
#define AUX778076_OP_TOKEN ==
#include <boost/mpl/aux_/comparison_op.hpp>
#endif // BOOST_MPL_EQUAL_TO_HPP_INCLUDED
#ifndef BOOST_MPL_EQUAL_TO_HPP_INCLUDED
#define BOOST_MPL_EQUAL_TO_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: equal_to.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME equal_to
#define AUX778076_OP_TOKEN ==
#include <boost/mpl/aux_/comparison_op.hpp>
#endif // BOOST_MPL_EQUAL_TO_HPP_INCLUDED

View File

@ -0,0 +1,42 @@
#ifndef BOOST_MPL_ERASE_HPP_INCLUDED
#define BOOST_MPL_ERASE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: erase.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/erase_fwd.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/erase_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/config/msvc_typename.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(First)
, typename BOOST_MPL_AUX_NA_PARAM(Last)
>
struct erase
: erase_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence,First,Last >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,erase,(Sequence,First,Last))
};
BOOST_MPL_AUX_NA_SPEC(3,erase)
}}
#endif // BOOST_MPL_ERASE_HPP_INCLUDED

View File

@ -0,0 +1,24 @@
#ifndef BOOST_MPL_ERASE_FWD_HPP_INCLUDED
#define BOOST_MPL_ERASE_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: erase_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct erase_impl;
template< typename Sequence, typename First, typename Last > struct erase;
}}
#endif // BOOST_MPL_ERASE_FWD_HPP_INCLUDED

View File

@ -0,0 +1,41 @@
#ifndef BOOST_MPL_ERASE_KEY_HPP_INCLUDED
#define BOOST_MPL_ERASE_KEY_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: erase_key.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/erase_key_fwd.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/erase_key_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/config/msvc_typename.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(Key)
>
struct erase_key
: erase_key_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence,Key >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,erase_key,(Sequence,Key))
};
BOOST_MPL_AUX_NA_SPEC(2,erase_key)
}}
#endif // BOOST_MPL_ERASE_KEY_HPP_INCLUDED

View File

@ -0,0 +1,24 @@
#ifndef BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED
#define BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: erase_key_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct erase_key_impl;
template< typename Sequence, typename Key > struct erase_key;
}}
#endif // BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED

View File

@ -1,71 +1,71 @@
#ifndef BOOST_MPL_EVAL_IF_HPP_INCLUDED
#define BOOST_MPL_EVAL_IF_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: eval_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/if.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/gcc.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(C)
, typename BOOST_MPL_AUX_NA_PARAM(F1)
, typename BOOST_MPL_AUX_NA_PARAM(F2)
>
struct eval_if
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|| ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \
&& BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \
)
{
typedef typename if_<C,F1,F2>::type f_;
typedef typename f_::type type;
#else
: if_<C,F1,F2>::type
{
#endif
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,eval_if,(C,F1,F2))
};
// (almost) copy & paste in order to save one more
// recursively nested template instantiation to user
template<
bool C
, typename F1
, typename F2
>
struct eval_if_c
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|| ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \
&& BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \
)
{
typedef typename if_c<C,F1,F2>::type f_;
typedef typename f_::type type;
#else
: if_c<C,F1,F2>::type
{
#endif
};
BOOST_MPL_AUX_NA_SPEC(3, eval_if)
}}
#endif // BOOST_MPL_EVAL_IF_HPP_INCLUDED
#ifndef BOOST_MPL_EVAL_IF_HPP_INCLUDED
#define BOOST_MPL_EVAL_IF_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: eval_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/if.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/gcc.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(C)
, typename BOOST_MPL_AUX_NA_PARAM(F1)
, typename BOOST_MPL_AUX_NA_PARAM(F2)
>
struct eval_if
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|| ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \
&& BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \
)
{
typedef typename if_<C,F1,F2>::type f_;
typedef typename f_::type type;
#else
: if_<C,F1,F2>::type
{
#endif
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,eval_if,(C,F1,F2))
};
// (almost) copy & paste in order to save one more
// recursively nested template instantiation to user
template<
bool C
, typename F1
, typename F2
>
struct eval_if_c
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|| ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \
&& BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \
)
{
typedef typename if_c<C,F1,F2>::type f_;
typedef typename f_::type type;
#else
: if_c<C,F1,F2>::type
{
#endif
};
BOOST_MPL_AUX_NA_SPEC(3, eval_if)
}}
#endif // BOOST_MPL_EVAL_IF_HPP_INCLUDED

View File

@ -0,0 +1,46 @@
#ifndef BOOST_MPL_FILTER_VIEW_HPP_INCLUDED
#define BOOST_MPL_FILTER_VIEW_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: filter_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/lambda.hpp>
#include <boost/mpl/aux_/filter_iter.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(Predicate)
>
struct filter_view
{
private:
typedef typename lambda<Predicate>::type pred_;
typedef typename begin<Sequence>::type first_;
typedef typename end<Sequence>::type last_;
public:
struct tag;
typedef filter_view type;
typedef typename aux::next_filter_iter< first_,last_,pred_ >::type begin;
typedef aux::filter_iter< last_,last_,pred_ > end;
};
BOOST_MPL_AUX_NA_SPEC(2, filter_view)
}}
#endif // BOOST_MPL_FILTER_VIEW_HPP_INCLUDED

View File

@ -1,38 +1,38 @@
#ifndef BOOST_MPL_FIND_HPP_INCLUDED
#define BOOST_MPL_FIND_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2002
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: find.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/find_if.hpp>
#include <boost/mpl/same_as.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct find
: find_if< Sequence,same_as<T> >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find,(Sequence,T))
};
BOOST_MPL_AUX_NA_SPEC(2, find)
}}
#endif // BOOST_MPL_FIND_HPP_INCLUDED
#ifndef BOOST_MPL_FIND_HPP_INCLUDED
#define BOOST_MPL_FIND_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2002
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: find.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/find_if.hpp>
#include <boost/mpl/same_as.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct find
: find_if< Sequence,same_as<T> >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find,(Sequence,T))
};
BOOST_MPL_AUX_NA_SPEC(2, find)
}}
#endif // BOOST_MPL_FIND_HPP_INCLUDED

View File

@ -1,50 +1,50 @@
#ifndef BOOST_MPL_FIND_IF_HPP_INCLUDED
#define BOOST_MPL_FIND_IF_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: find_if.hpp 49274 2008-10-11 07:22:05Z agurtovoy $
// $Date: 2008-10-11 03:22:05 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49274 $
#include <boost/mpl/aux_/find_if_pred.hpp>
#include <boost/mpl/arg.hpp>
#include <boost/mpl/iter_fold_if.hpp>
#include <boost/mpl/aux_/common_name_wknd.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(find_if)
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(Predicate)
>
struct find_if
{
typedef typename iter_fold_if<
Sequence
, void
, mpl::arg<1> // ignore
, protect< aux::find_if_pred<Predicate> >
>::type result_;
typedef typename second<result_>::type type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find_if,(Sequence,Predicate))
};
BOOST_MPL_AUX_NA_SPEC(2,find_if)
}}
#endif // BOOST_MPL_FIND_IF_HPP_INCLUDED
#ifndef BOOST_MPL_FIND_IF_HPP_INCLUDED
#define BOOST_MPL_FIND_IF_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: find_if.hpp 49274 2008-10-11 07:22:05Z agurtovoy $
// $Date: 2008-10-11 03:22:05 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49274 $
#include <boost/mpl/aux_/find_if_pred.hpp>
#include <boost/mpl/arg.hpp>
#include <boost/mpl/iter_fold_if.hpp>
#include <boost/mpl/aux_/common_name_wknd.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
BOOST_MPL_AUX_COMMON_NAME_WKND(find_if)
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(Predicate)
>
struct find_if
{
typedef typename iter_fold_if<
Sequence
, void
, mpl::arg<1> // ignore
, protect< aux::find_if_pred<Predicate> >
>::type result_;
typedef typename second<result_>::type type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find_if,(Sequence,Predicate))
};
BOOST_MPL_AUX_NA_SPEC(2,find_if)
}}
#endif // BOOST_MPL_FIND_IF_HPP_INCLUDED

View File

@ -1,48 +1,48 @@
#ifndef BOOST_MPL_FOLD_HPP_INCLUDED
#define BOOST_MPL_FOLD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-2004
// Copyright David Abrahams 2001-2002
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/O1_size.hpp>
#include <boost/mpl/aux_/fold_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(State)
, typename BOOST_MPL_AUX_NA_PARAM(ForwardOp)
>
struct fold
{
typedef typename aux::fold_impl<
::boost::mpl::O1_size<Sequence>::value
, typename begin<Sequence>::type
, typename end<Sequence>::type
, State
, ForwardOp
>::state type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,fold,(Sequence,State,ForwardOp))
};
BOOST_MPL_AUX_NA_SPEC(3, fold)
}}
#endif // BOOST_MPL_FOLD_HPP_INCLUDED
#ifndef BOOST_MPL_FOLD_HPP_INCLUDED
#define BOOST_MPL_FOLD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-2004
// Copyright David Abrahams 2001-2002
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/O1_size.hpp>
#include <boost/mpl/aux_/fold_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(State)
, typename BOOST_MPL_AUX_NA_PARAM(ForwardOp)
>
struct fold
{
typedef typename aux::fold_impl<
::boost::mpl::O1_size<Sequence>::value
, typename begin<Sequence>::type
, typename end<Sequence>::type
, State
, ForwardOp
>::state type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,fold,(Sequence,State,ForwardOp))
};
BOOST_MPL_AUX_NA_SPEC(3, fold)
}}
#endif // BOOST_MPL_FOLD_HPP_INCLUDED

View File

@ -0,0 +1,116 @@
#ifndef BOOST_MPL_FOR_EACH_HPP_INCLUDED
#define BOOST_MPL_FOR_EACH_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2008
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: for_each.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/is_sequence.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/apply.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/next_prior.hpp>
#include <boost/mpl/deref.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/mpl/aux_/unwrap.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/utility/value_init.hpp>
namespace boost { namespace mpl {
namespace aux {
template< bool done = true >
struct for_each_impl
{
template<
typename Iterator
, typename LastIterator
, typename TransformFunc
, typename F
>
static void execute(
Iterator*
, LastIterator*
, TransformFunc*
, F
)
{
}
};
template<>
struct for_each_impl<false>
{
template<
typename Iterator
, typename LastIterator
, typename TransformFunc
, typename F
>
static void execute(
Iterator*
, LastIterator*
, TransformFunc*
, F f
)
{
typedef typename deref<Iterator>::type item;
typedef typename apply1<TransformFunc,item>::type arg;
// dwa 2002/9/10 -- make sure not to invoke undefined behavior
// when we pass arg.
value_initialized<arg> x;
aux::unwrap(f, 0)(boost::get(x));
typedef typename mpl::next<Iterator>::type iter;
for_each_impl<boost::is_same<iter,LastIterator>::value>
::execute((iter*)0, (LastIterator*)0, (TransformFunc*)0, f);
}
};
} // namespace aux
// agurt, 17/mar/02: pointer default parameters are necessary to workaround
// MSVC 6.5 function template signature's mangling bug
template<
typename Sequence
, typename TransformOp
, typename F
>
inline
void for_each(F f, Sequence* = 0, TransformOp* = 0)
{
BOOST_MPL_ASSERT(( is_sequence<Sequence> ));
typedef typename begin<Sequence>::type first;
typedef typename end<Sequence>::type last;
aux::for_each_impl< boost::is_same<first,last>::value >
::execute((first*)0, (last*)0, (TransformOp*)0, f);
}
template<
typename Sequence
, typename F
>
inline
void for_each(F f, Sequence* = 0)
{
for_each<Sequence, identity<> >(f);
}
}}
#endif // BOOST_MPL_FOR_EACH_HPP_INCLUDED

View File

@ -0,0 +1,39 @@
#ifndef BOOST_MPL_FRONT_HPP_INCLUDED
#define BOOST_MPL_FRONT_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/front_fwd.hpp>
#include <boost/mpl/aux_/front_impl.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
>
struct front
: front_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,front,(Sequence))
};
BOOST_MPL_AUX_NA_SPEC(1, front)
}}
#endif // BOOST_MPL_FRONT_HPP_INCLUDED

View File

@ -1,24 +1,24 @@
#ifndef BOOST_MPL_FRONT_FWD_HPP_INCLUDED
#define BOOST_MPL_FRONT_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: front_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct front_impl;
template< typename Sequence > struct front;
}}
#endif // BOOST_MPL_FRONT_FWD_HPP_INCLUDED
#ifndef BOOST_MPL_FRONT_FWD_HPP_INCLUDED
#define BOOST_MPL_FRONT_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: front_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct front_impl;
template< typename Sequence > struct front;
}}
#endif // BOOST_MPL_FRONT_FWD_HPP_INCLUDED

View File

@ -1,33 +1,33 @@
#ifndef BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED
#define BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: front_inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/push_front.hpp>
#include <boost/mpl/inserter.hpp>
namespace boost { namespace mpl {
template<
typename Sequence
>
struct front_inserter
: inserter< Sequence,push_front<> >
{
};
}}
#endif // BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED
#ifndef BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED
#define BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: front_inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/push_front.hpp>
#include <boost/mpl/inserter.hpp>
namespace boost { namespace mpl {
template<
typename Sequence
>
struct front_inserter
: inserter< Sequence,push_front<> >
{
};
}}
#endif // BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED

View File

@ -1,21 +1,21 @@
#ifndef BOOST_MPL_GREATER_HPP_INCLUDED
#define BOOST_MPL_GREATER_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: greater.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME greater
#define AUX778076_OP_TOKEN >
#include <boost/mpl/aux_/comparison_op.hpp>
#endif // BOOST_MPL_GREATER_HPP_INCLUDED
#ifndef BOOST_MPL_GREATER_HPP_INCLUDED
#define BOOST_MPL_GREATER_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: greater.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME greater
#define AUX778076_OP_TOKEN >
#include <boost/mpl/aux_/comparison_op.hpp>
#endif // BOOST_MPL_GREATER_HPP_INCLUDED

View File

@ -1,21 +1,21 @@
#ifndef BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED
#define BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: greater_equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME greater_equal
#define AUX778076_OP_TOKEN >=
#include <boost/mpl/aux_/comparison_op.hpp>
#endif // BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED
#ifndef BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED
#define BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: greater_equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME greater_equal
#define AUX778076_OP_TOKEN >=
#include <boost/mpl/aux_/comparison_op.hpp>
#endif // BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED

View File

@ -0,0 +1,41 @@
#ifndef BOOST_MPL_HAS_KEY_HPP_INCLUDED
#define BOOST_MPL_HAS_KEY_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: has_key.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/has_key_fwd.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/has_key_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(AssociativeSequence)
, typename BOOST_MPL_AUX_NA_PARAM(Key)
>
struct has_key
: has_key_impl< typename sequence_tag<AssociativeSequence>::type >
::template apply<AssociativeSequence,Key>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,has_key,(AssociativeSequence,Key))
};
BOOST_MPL_AUX_NA_SPEC(2, has_key)
}}
#endif // BOOST_MPL_HAS_KEY_HPP_INCLUDED

View File

@ -0,0 +1,25 @@
#ifndef BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED
#define BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: has_key_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct has_key_impl;
template< typename AssociativeSequence, typename Key > struct has_key;
}}
#endif // BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED

View File

@ -1,274 +1,274 @@
#ifndef BOOST_MPL_HAS_XXX_HPP_INCLUDED
#define BOOST_MPL_HAS_XXX_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2002-2006
// Copyright David Abrahams 2002-2003
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: has_xxx.hpp 49273 2008-10-11 06:54:06Z agurtovoy $
// $Date: 2008-10-11 02:54:06 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49273 $
#include <boost/mpl/bool.hpp>
#include <boost/mpl/aux_/type_wrapper.hpp>
#include <boost/mpl/aux_/yes_no.hpp>
#include <boost/mpl/aux_/config/has_xxx.hpp>
#include <boost/mpl/aux_/config/msvc_typename.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#include <boost/preprocessor/cat.hpp>
#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) )
# include <boost/type_traits/is_class.hpp>
#endif
#if !defined(BOOST_MPL_CFG_NO_HAS_XXX)
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
// agurt, 11/sep/02: MSVC-specific version (< 7.1), based on a USENET
// newsgroup's posting by John Madsen (comp.lang.c++.moderated,
// 1999-11-12 19:17:06 GMT); the code is _not_ standard-conforming, but
// it works way more reliably than the SFINAE-based implementation
// Modified dwa 8/Oct/02 to handle reference types.
# include <boost/mpl/if.hpp>
# include <boost/mpl/bool.hpp>
namespace boost { namespace mpl { namespace aux {
struct has_xxx_tag;
#if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
template< typename U > struct msvc_incomplete_array
{
typedef char (&type)[sizeof(U) + 1];
};
#endif
template< typename T >
struct msvc_is_incomplete
{
// MSVC is capable of some kinds of SFINAE. If U is an incomplete
// type, it won't pick the second overload
static char tester(...);
#if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
template< typename U >
static typename msvc_incomplete_array<U>::type tester(type_wrapper<U>);
#else
template< typename U >
static char (& tester(type_wrapper<U>) )[sizeof(U)+1];
#endif
BOOST_STATIC_CONSTANT(bool, value =
sizeof(tester(type_wrapper<T>())) == 1
);
};
template<>
struct msvc_is_incomplete<int>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
}}}
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, default_) \
template< typename T, typename name = ::boost::mpl::aux::has_xxx_tag > \
struct BOOST_PP_CAT(trait,_impl) : T \
{ \
static boost::mpl::aux::no_tag \
test(void(*)(::boost::mpl::aux::has_xxx_tag)); \
\
static boost::mpl::aux::yes_tag test(...); \
\
BOOST_STATIC_CONSTANT(bool, value = \
sizeof(test(static_cast<void(*)(name)>(0))) \
!= sizeof(boost::mpl::aux::no_tag) \
); \
typedef boost::mpl::bool_<value> type; \
}; \
\
template< typename T, typename fallback_ = boost::mpl::bool_<default_> > \
struct trait \
: boost::mpl::if_c< \
boost::mpl::aux::msvc_is_incomplete<T>::value \
, boost::mpl::bool_<false> \
, BOOST_PP_CAT(trait,_impl)<T> \
>::type \
{ \
}; \
\
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, void) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, bool) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, char) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed char) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned char) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed short) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned short) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed int) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned int) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed long) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned long) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, float) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, double) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, long double) \
/**/
# define BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, T) \
template<> struct trait<T> \
{ \
BOOST_STATIC_CONSTANT(bool, value = false); \
typedef boost::mpl::bool_<false> type; \
}; \
/**/
#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, wchar_t) \
/**/
#else
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \
/**/
#endif
// SFINAE-based implementations below are derived from a USENET newsgroup's
// posting by Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST)
# elif BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
|| BOOST_WORKAROUND(__IBMCPP__, <= 700)
// MSVC 7.1+ & VACPP
// agurt, 15/jun/05: replace overload-based SFINAE implementation with SFINAE
// applied to partial specialization to fix some apparently random failures
// (thanks to Daniel Wallin for researching this!)
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \
template< typename T > \
struct BOOST_PP_CAT(trait, _msvc_sfinae_helper) \
{ \
typedef void type; \
};\
\
template< typename T, typename U = void > \
struct BOOST_PP_CAT(trait,_impl_) \
{ \
BOOST_STATIC_CONSTANT(bool, value = false); \
typedef boost::mpl::bool_<value> type; \
}; \
\
template< typename T > \
struct BOOST_PP_CAT(trait,_impl_)< \
T \
, typename BOOST_PP_CAT(trait, _msvc_sfinae_helper)< typename T::name >::type \
> \
{ \
BOOST_STATIC_CONSTANT(bool, value = true); \
typedef boost::mpl::bool_<value> type; \
}; \
\
template< typename T, typename fallback_ = boost::mpl::bool_<default_> > \
struct trait \
: BOOST_PP_CAT(trait,_impl_)<T> \
{ \
}; \
/**/
# elif BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) )
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF(trait, trait_tester, name, default_) \
template< typename T, bool IS_CLASS > \
struct trait_tester \
{ \
BOOST_STATIC_CONSTANT( bool, value = false ); \
}; \
template< typename T > \
struct trait_tester< T, true > \
{ \
struct trait_tester_impl \
{ \
template < class U > \
static int resolve( boost::mpl::aux::type_wrapper<U> const volatile * \
, boost::mpl::aux::type_wrapper<typename U::name >* = 0 ); \
static char resolve( ... ); \
}; \
typedef boost::mpl::aux::type_wrapper<T> t_; \
BOOST_STATIC_CONSTANT( bool, value = ( sizeof( trait_tester_impl::resolve( static_cast< t_ * >(0) ) ) == sizeof(int) ) ); \
}; \
template< typename T, typename fallback_ = boost::mpl::bool_<default_> > \
struct trait \
{ \
BOOST_STATIC_CONSTANT( bool, value = (trait_tester< T, boost::is_class< T >::value >::value) ); \
typedef boost::mpl::bool_< trait< T, fallback_ >::value > type; \
};
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF( trait \
, BOOST_PP_CAT(trait,_tester) \
, name \
, default_ ) \
/**/
# else // other SFINAE-capable compilers
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \
template< typename T, typename fallback_ = boost::mpl::bool_<default_> > \
struct trait \
{ \
struct gcc_3_2_wknd \
{ \
template< typename U > \
static boost::mpl::aux::yes_tag test( \
boost::mpl::aux::type_wrapper<U> const volatile* \
, boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME U::name>* = 0 \
); \
\
static boost::mpl::aux::no_tag test(...); \
}; \
\
typedef boost::mpl::aux::type_wrapper<T> t_; \
BOOST_STATIC_CONSTANT(bool, value = \
sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) \
== sizeof(boost::mpl::aux::yes_tag) \
); \
typedef boost::mpl::bool_<value> type; \
}; \
/**/
# endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
#else // BOOST_MPL_CFG_NO_HAS_XXX
// placeholder implementation
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \
template< typename T, typename fallback_ = boost::mpl::bool_<default_> > \
struct trait \
{ \
BOOST_STATIC_CONSTANT(bool, value = fallback_::value); \
typedef fallback_ type; \
}; \
/**/
#endif
#define BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(BOOST_PP_CAT(has_,name), name, false) \
/**/
#endif // BOOST_MPL_HAS_XXX_HPP_INCLUDED
#ifndef BOOST_MPL_HAS_XXX_HPP_INCLUDED
#define BOOST_MPL_HAS_XXX_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2002-2006
// Copyright David Abrahams 2002-2003
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: has_xxx.hpp 49273 2008-10-11 06:54:06Z agurtovoy $
// $Date: 2008-10-11 02:54:06 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49273 $
#include <boost/mpl/bool.hpp>
#include <boost/mpl/aux_/type_wrapper.hpp>
#include <boost/mpl/aux_/yes_no.hpp>
#include <boost/mpl/aux_/config/has_xxx.hpp>
#include <boost/mpl/aux_/config/msvc_typename.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#include <boost/preprocessor/cat.hpp>
#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) )
# include <boost/type_traits/is_class.hpp>
#endif
#if !defined(BOOST_MPL_CFG_NO_HAS_XXX)
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
// agurt, 11/sep/02: MSVC-specific version (< 7.1), based on a USENET
// newsgroup's posting by John Madsen (comp.lang.c++.moderated,
// 1999-11-12 19:17:06 GMT); the code is _not_ standard-conforming, but
// it works way more reliably than the SFINAE-based implementation
// Modified dwa 8/Oct/02 to handle reference types.
# include <boost/mpl/if.hpp>
# include <boost/mpl/bool.hpp>
namespace boost { namespace mpl { namespace aux {
struct has_xxx_tag;
#if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
template< typename U > struct msvc_incomplete_array
{
typedef char (&type)[sizeof(U) + 1];
};
#endif
template< typename T >
struct msvc_is_incomplete
{
// MSVC is capable of some kinds of SFINAE. If U is an incomplete
// type, it won't pick the second overload
static char tester(...);
#if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
template< typename U >
static typename msvc_incomplete_array<U>::type tester(type_wrapper<U>);
#else
template< typename U >
static char (& tester(type_wrapper<U>) )[sizeof(U)+1];
#endif
BOOST_STATIC_CONSTANT(bool, value =
sizeof(tester(type_wrapper<T>())) == 1
);
};
template<>
struct msvc_is_incomplete<int>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
}}}
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, default_) \
template< typename T, typename name = ::boost::mpl::aux::has_xxx_tag > \
struct BOOST_PP_CAT(trait,_impl) : T \
{ \
static boost::mpl::aux::no_tag \
test(void(*)(::boost::mpl::aux::has_xxx_tag)); \
\
static boost::mpl::aux::yes_tag test(...); \
\
BOOST_STATIC_CONSTANT(bool, value = \
sizeof(test(static_cast<void(*)(name)>(0))) \
!= sizeof(boost::mpl::aux::no_tag) \
); \
typedef boost::mpl::bool_<value> type; \
}; \
\
template< typename T, typename fallback_ = boost::mpl::bool_<default_> > \
struct trait \
: boost::mpl::if_c< \
boost::mpl::aux::msvc_is_incomplete<T>::value \
, boost::mpl::bool_<false> \
, BOOST_PP_CAT(trait,_impl)<T> \
>::type \
{ \
}; \
\
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, void) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, bool) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, char) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed char) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned char) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed short) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned short) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed int) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned int) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed long) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned long) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, float) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, double) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, long double) \
/**/
# define BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, T) \
template<> struct trait<T> \
{ \
BOOST_STATIC_CONSTANT(bool, value = false); \
typedef boost::mpl::bool_<false> type; \
}; \
/**/
#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, wchar_t) \
/**/
#else
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \
/**/
#endif
// SFINAE-based implementations below are derived from a USENET newsgroup's
// posting by Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST)
# elif BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
|| BOOST_WORKAROUND(__IBMCPP__, <= 700)
// MSVC 7.1+ & VACPP
// agurt, 15/jun/05: replace overload-based SFINAE implementation with SFINAE
// applied to partial specialization to fix some apparently random failures
// (thanks to Daniel Wallin for researching this!)
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \
template< typename T > \
struct BOOST_PP_CAT(trait, _msvc_sfinae_helper) \
{ \
typedef void type; \
};\
\
template< typename T, typename U = void > \
struct BOOST_PP_CAT(trait,_impl_) \
{ \
BOOST_STATIC_CONSTANT(bool, value = false); \
typedef boost::mpl::bool_<value> type; \
}; \
\
template< typename T > \
struct BOOST_PP_CAT(trait,_impl_)< \
T \
, typename BOOST_PP_CAT(trait, _msvc_sfinae_helper)< typename T::name >::type \
> \
{ \
BOOST_STATIC_CONSTANT(bool, value = true); \
typedef boost::mpl::bool_<value> type; \
}; \
\
template< typename T, typename fallback_ = boost::mpl::bool_<default_> > \
struct trait \
: BOOST_PP_CAT(trait,_impl_)<T> \
{ \
}; \
/**/
# elif BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) )
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF(trait, trait_tester, name, default_) \
template< typename T, bool IS_CLASS > \
struct trait_tester \
{ \
BOOST_STATIC_CONSTANT( bool, value = false ); \
}; \
template< typename T > \
struct trait_tester< T, true > \
{ \
struct trait_tester_impl \
{ \
template < class U > \
static int resolve( boost::mpl::aux::type_wrapper<U> const volatile * \
, boost::mpl::aux::type_wrapper<typename U::name >* = 0 ); \
static char resolve( ... ); \
}; \
typedef boost::mpl::aux::type_wrapper<T> t_; \
BOOST_STATIC_CONSTANT( bool, value = ( sizeof( trait_tester_impl::resolve( static_cast< t_ * >(0) ) ) == sizeof(int) ) ); \
}; \
template< typename T, typename fallback_ = boost::mpl::bool_<default_> > \
struct trait \
{ \
BOOST_STATIC_CONSTANT( bool, value = (trait_tester< T, boost::is_class< T >::value >::value) ); \
typedef boost::mpl::bool_< trait< T, fallback_ >::value > type; \
};
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF( trait \
, BOOST_PP_CAT(trait,_tester) \
, name \
, default_ ) \
/**/
# else // other SFINAE-capable compilers
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \
template< typename T, typename fallback_ = boost::mpl::bool_<default_> > \
struct trait \
{ \
struct gcc_3_2_wknd \
{ \
template< typename U > \
static boost::mpl::aux::yes_tag test( \
boost::mpl::aux::type_wrapper<U> const volatile* \
, boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME U::name>* = 0 \
); \
\
static boost::mpl::aux::no_tag test(...); \
}; \
\
typedef boost::mpl::aux::type_wrapper<T> t_; \
BOOST_STATIC_CONSTANT(bool, value = \
sizeof(gcc_3_2_wknd::test(static_cast<t_*>(0))) \
== sizeof(boost::mpl::aux::yes_tag) \
); \
typedef boost::mpl::bool_<value> type; \
}; \
/**/
# endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
#else // BOOST_MPL_CFG_NO_HAS_XXX
// placeholder implementation
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \
template< typename T, typename fallback_ = boost::mpl::bool_<default_> > \
struct trait \
{ \
BOOST_STATIC_CONSTANT(bool, value = fallback_::value); \
typedef fallback_ type; \
}; \
/**/
#endif
#define BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(BOOST_PP_CAT(has_,name), name, false) \
/**/
#endif // BOOST_MPL_HAS_XXX_HPP_INCLUDED

View File

@ -1,45 +1,45 @@
#ifndef BOOST_MPL_IDENTITY_HPP_INCLUDED
#define BOOST_MPL_IDENTITY_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: identity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct identity
{
typedef T type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, identity, (T))
};
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct make_identity
{
typedef identity<T> type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, make_identity, (T))
};
BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, identity)
BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, make_identity)
}}
#endif // BOOST_MPL_IDENTITY_HPP_INCLUDED
#ifndef BOOST_MPL_IDENTITY_HPP_INCLUDED
#define BOOST_MPL_IDENTITY_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: identity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct identity
{
typedef T type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, identity, (T))
};
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct make_identity
{
typedef identity<T> type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, make_identity, (T))
};
BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, identity)
BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, make_identity)
}}
#endif // BOOST_MPL_IDENTITY_HPP_INCLUDED

View File

@ -1,135 +1,135 @@
#ifndef BOOST_MPL_IF_HPP_INCLUDED
#define BOOST_MPL_IF_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/value_wknd.hpp>
#include <boost/mpl/aux_/static_cast.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/config/integral.hpp>
#include <boost/mpl/aux_/config/ctps.hpp>
#include <boost/mpl/aux_/config/workaround.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;
};
// agurt, 05/sep/04: nondescriptive parameter names for the sake of DigitalMars
// (and possibly MWCW < 8.0); see http://article.gmane.org/gmane.comp.lib.boost.devel/108959
template<
typename BOOST_MPL_AUX_NA_PARAM(T1)
, typename BOOST_MPL_AUX_NA_PARAM(T2)
, typename BOOST_MPL_AUX_NA_PARAM(T3)
>
struct if_
{
private:
// agurt, 02/jan/03: two-step 'type' definition for the sake of aCC
typedef if_c<
#if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS)
BOOST_MPL_AUX_VALUE_WKND(T1)::value
#else
BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value)
#endif
, T2
, T3
> almost_type_;
public:
typedef typename almost_type_::type type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(T1,T2,T3))
};
#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_NA_PARAM(C_)
, typename BOOST_MPL_AUX_NA_PARAM(T1)
, typename BOOST_MPL_AUX_NA_PARAM(T2)
>
struct if_
{
enum { msvc_wknd_ = BOOST_MPL_AUX_MSVC_VALUE_WKND(C_)::value };
typedef typename aux::if_impl< BOOST_MPL_AUX_STATIC_CAST(bool, msvc_wknd_) >
::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_NA_SPEC(3, if_)
}}
#endif // BOOST_MPL_IF_HPP_INCLUDED
#ifndef BOOST_MPL_IF_HPP_INCLUDED
#define BOOST_MPL_IF_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/value_wknd.hpp>
#include <boost/mpl/aux_/static_cast.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/config/integral.hpp>
#include <boost/mpl/aux_/config/ctps.hpp>
#include <boost/mpl/aux_/config/workaround.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;
};
// agurt, 05/sep/04: nondescriptive parameter names for the sake of DigitalMars
// (and possibly MWCW < 8.0); see http://article.gmane.org/gmane.comp.lib.boost.devel/108959
template<
typename BOOST_MPL_AUX_NA_PARAM(T1)
, typename BOOST_MPL_AUX_NA_PARAM(T2)
, typename BOOST_MPL_AUX_NA_PARAM(T3)
>
struct if_
{
private:
// agurt, 02/jan/03: two-step 'type' definition for the sake of aCC
typedef if_c<
#if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS)
BOOST_MPL_AUX_VALUE_WKND(T1)::value
#else
BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value)
#endif
, T2
, T3
> almost_type_;
public:
typedef typename almost_type_::type type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(T1,T2,T3))
};
#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_NA_PARAM(C_)
, typename BOOST_MPL_AUX_NA_PARAM(T1)
, typename BOOST_MPL_AUX_NA_PARAM(T2)
>
struct if_
{
enum { msvc_wknd_ = BOOST_MPL_AUX_MSVC_VALUE_WKND(C_)::value };
typedef typename aux::if_impl< BOOST_MPL_AUX_STATIC_CAST(bool, msvc_wknd_) >
::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_NA_SPEC(3, if_)
}}
#endif // BOOST_MPL_IF_HPP_INCLUDED

View File

@ -0,0 +1,60 @@
#ifndef BOOST_MPL_INDEX_IF_HPP_INCLUDED
#define BOOST_MPL_INDEX_IF_HPP_INCLUDED
// Copyright Eric Friedman 2003
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: index_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/find_if_pred.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/int.hpp>
#include <boost/mpl/iter_fold_if.hpp>
#include <boost/mpl/next.hpp>
#include <boost/mpl/void.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(Predicate)
>
struct index_if
{
typedef typename iter_fold_if<
Sequence
, int_<0>
, next<>
, aux::find_if_pred<Predicate>
>::type result_;
typedef typename end<Sequence>::type not_found_;
typedef typename first<result_>::type result_index_;
typedef typename second<result_>::type result_iterator_;
typedef typename if_<
is_same< result_iterator_,not_found_ >
, void_
, result_index_
>::type type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,index_if,(Sequence,Predicate))
};
BOOST_MPL_AUX_NA_SPEC(2, index_if)
}}
#endif // BOOST_MPL_INDEX_IF_HPP_INCLUDED

View File

@ -0,0 +1,39 @@
#ifndef BOOST_MPL_INDEX_OF_HPP_INCLUDED
#define BOOST_MPL_INDEX_OF_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright Eric Friedman 2003
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: index_of.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/index_if.hpp>
#include <boost/mpl/same_as.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct index_of
: index_if< Sequence,same_as<T> >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,index_of,(Sequence,T))
};
BOOST_MPL_AUX_NA_SPEC(2, index_of)
}}
#endif // BOOST_MPL_INDEX_OF_HPP_INCLUDED

View File

@ -0,0 +1,229 @@
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_INHERIT_HPP_INCLUDED
#define BOOST_MPL_INHERIT_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: inherit.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/empty_base.hpp>
# include <boost/mpl/aux_/na_spec.hpp>
# include <boost/mpl/aux_/lambda_support.hpp>
#endif
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER inherit.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#else
# include <boost/mpl/limits/arity.hpp>
# include <boost/mpl/aux_/preprocessor/params.hpp>
# include <boost/mpl/aux_/preprocessor/default_params.hpp>
# include <boost/mpl/aux_/preprocessor/enum.hpp>
# include <boost/mpl/aux_/config/ctps.hpp>
# include <boost/mpl/aux_/config/dtp.hpp>
# include <boost/preprocessor/iterate.hpp>
# include <boost/preprocessor/dec.hpp>
# include <boost/preprocessor/cat.hpp>
namespace boost { namespace mpl {
// 'inherit<T1,T2,..,Tn>' metafunction; returns an unspecified class type
// produced by public derivation from all metafunction's parameters
// (T1,T2,..,Tn), except the parameters of 'empty_base' class type;
// regardless the position and number of 'empty_base' parameters in the
// metafunction's argument list, derivation from them is always a no-op;
// for instance:
// inherit<her>::type == her
// inherit<her,my>::type == struct unspecified : her, my {};
// inherit<empty_base,her>::type == her
// inherit<empty_base,her,empty_base,empty_base>::type == her
// inherit<her,empty_base,my>::type == struct unspecified : her, my {};
// inherit<empty_base,empty_base>::type == empty_base
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template<
typename BOOST_MPL_AUX_NA_PARAM(T1)
, typename BOOST_MPL_AUX_NA_PARAM(T2)
>
struct inherit2
: T1, T2
{
typedef inherit2 type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1,T2))
};
template< typename T1 >
struct inherit2<T1,empty_base>
{
typedef T1 type;
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1,empty_base))
};
template< typename T2 >
struct inherit2<empty_base,T2>
{
typedef T2 type;
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base,T2))
};
// needed to disambiguate the previous two in case when both
// T1 and T2 == empty_base
template<>
struct inherit2<empty_base,empty_base>
{
typedef empty_base type;
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base,empty_base))
};
#else
namespace aux {
template< bool C1, bool C2 >
struct inherit2_impl
{
template< typename Derived, typename T1, typename T2 > struct result_
: T1, T2
{
typedef Derived type_;
};
};
template<>
struct inherit2_impl<false,true>
{
template< typename Derived, typename T1, typename T2 > struct result_
: T1
{
typedef T1 type_;
};
};
template<>
struct inherit2_impl<true,false>
{
template< typename Derived, typename T1, typename T2 > struct result_
: T2
{
typedef T2 type_;
};
};
template<>
struct inherit2_impl<true,true>
{
template< typename Derived, typename T1, typename T2 > struct result_
{
typedef T1 type_;
};
};
} // namespace aux
template<
typename BOOST_MPL_AUX_NA_PARAM(T1)
, typename BOOST_MPL_AUX_NA_PARAM(T2)
>
struct inherit2
: aux::inherit2_impl<
is_empty_base<T1>::value
, is_empty_base<T2>::value
>::template result_< inherit2<T1,T2>,T1,T2 >
{
typedef typename inherit2::type_ type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1,T2))
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
BOOST_MPL_AUX_NA_SPEC(2, inherit2)
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(3, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, <boost/mpl/inherit.hpp>))
#include BOOST_PP_ITERATE()
}}
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_INHERIT_HPP_INCLUDED
///// iteration
#else
#define n_ BOOST_PP_FRAME_ITERATION(1)
template<
BOOST_MPL_PP_DEFAULT_PARAMS(n_, typename T, na)
>
struct BOOST_PP_CAT(inherit,n_)
: inherit2<
typename BOOST_PP_CAT(inherit,BOOST_PP_DEC(n_))<
BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(n_), T)
>::type
, BOOST_PP_CAT(T,n_)
>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(
n_
, BOOST_PP_CAT(inherit,n_)
, (BOOST_MPL_PP_PARAMS(n_, T))
)
};
BOOST_MPL_AUX_NA_SPEC(n_, BOOST_PP_CAT(inherit,n_))
#if n_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY
/// primary template
template<
BOOST_MPL_PP_DEFAULT_PARAMS(n_, typename T, empty_base)
>
struct inherit
: BOOST_PP_CAT(inherit,n_)<BOOST_MPL_PP_PARAMS(n_, T)>
{
};
// 'na' specialization
template<>
struct inherit< BOOST_MPL_PP_ENUM(5, na) >
{
template<
#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
BOOST_MPL_PP_DEFAULT_PARAMS(n_, typename T, empty_base)
#else
BOOST_MPL_PP_PARAMS(n_, typename T)
#endif
>
struct apply
: inherit< BOOST_MPL_PP_PARAMS(n_, T) >
{
};
};
BOOST_MPL_AUX_NA_SPEC_LAMBDA(n_, inherit)
BOOST_MPL_AUX_NA_SPEC_ARITY(n_, inherit)
BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(n_, n_, inherit)
#endif
#undef n_
#endif // BOOST_PP_IS_ITERATING

View File

@ -0,0 +1,39 @@
#ifndef BOOST_MPL_INHERIT_FRONT_TO_BACK_HPP_INCLUDED
#define BOOST_MPL_INHERIT_FRONT_TO_BACK_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: inherit_linearly.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/fold.hpp>
#include <boost/mpl/empty_base.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Types_)
, typename BOOST_MPL_AUX_NA_PARAM(Node_)
, typename Root_ = empty_base
>
struct inherit_linearly
: fold<Types_,Root_,Node_>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,inherit_linearly,(Types_,Node_,Root_))
};
BOOST_MPL_AUX_NA_SPEC(2, inherit_linearly)
}}
#endif // BOOST_MPL_INHERIT_FRONT_TO_BACK_HPP_INCLUDED

View File

@ -0,0 +1,41 @@
#ifndef BOOST_MPL_INSERT_HPP_INCLUDED
#define BOOST_MPL_INSERT_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: insert.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/insert_fwd.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/insert_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(Pos_or_T)
, typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct insert
: insert_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence,Pos_or_T,T >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,insert,(Sequence,Pos_or_T,T))
};
BOOST_MPL_AUX_NA_SPEC(3, insert)
}}
#endif // BOOST_MPL_INSERT_HPP_INCLUDED

View File

@ -0,0 +1,24 @@
#ifndef BOOST_MPL_INSERT_FWD_HPP_INCLUDED
#define BOOST_MPL_INSERT_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: insert_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct insert_impl;
template< typename Sequence, typename Pos_or_T, typename T > struct insert;
}}
#endif // BOOST_MPL_INSERT_FWD_HPP_INCLUDED

View File

@ -0,0 +1,41 @@
#ifndef BOOST_MPL_INSERT_RANGE_HPP_INCLUDED
#define BOOST_MPL_INSERT_RANGE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: insert_range.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/insert_range_fwd.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/insert_range_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(Pos)
, typename BOOST_MPL_AUX_NA_PARAM(Range)
>
struct insert_range
: insert_range_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence,Pos,Range >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,insert_range,(Sequence,Pos,Range))
};
BOOST_MPL_AUX_NA_SPEC(3, insert_range)
}}
#endif // BOOST_MPL_INSERT_RANGE_HPP_INCLUDED

View File

@ -0,0 +1,24 @@
#ifndef BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED
#define BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: insert_range_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template< typename Tag > struct insert_range_impl;
template< typename Sequence, typename Pos, typename Range > struct insert_range;
}}
#endif // BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED

View File

@ -1,32 +1,32 @@
#ifndef BOOST_MPL_INSERTER_HPP_INCLUDED
#define BOOST_MPL_INSERTER_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template<
typename Sequence
, typename Operation
>
struct inserter
{
typedef Sequence state;
typedef Operation operation;
};
}}
#endif // BOOST_MPL_INSERTER_HPP_INCLUDED
#ifndef BOOST_MPL_INSERTER_HPP_INCLUDED
#define BOOST_MPL_INSERTER_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
template<
typename Sequence
, typename Operation
>
struct inserter
{
typedef Sequence state;
typedef Operation operation;
};
}}
#endif // BOOST_MPL_INSERTER_HPP_INCLUDED

View File

@ -1,22 +1,22 @@
#ifndef BOOST_MPL_INT_HPP_INCLUDED
#define BOOST_MPL_INT_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: int.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/int_fwd.hpp>
#define AUX_WRAPPER_VALUE_TYPE int
#include <boost/mpl/aux_/integral_wrapper.hpp>
#endif // BOOST_MPL_INT_HPP_INCLUDED
#ifndef BOOST_MPL_INT_HPP_INCLUDED
#define BOOST_MPL_INT_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: int.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/int_fwd.hpp>
#define AUX_WRAPPER_VALUE_TYPE int
#include <boost/mpl/aux_/integral_wrapper.hpp>
#endif // BOOST_MPL_INT_HPP_INCLUDED

View File

@ -1,27 +1,27 @@
#ifndef BOOST_MPL_INT_FWD_HPP_INCLUDED
#define BOOST_MPL_INT_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: int_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/adl_barrier.hpp>
#include <boost/mpl/aux_/nttp_decl.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct int_;
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
BOOST_MPL_AUX_ADL_BARRIER_DECL(int_)
#endif // BOOST_MPL_INT_FWD_HPP_INCLUDED
#ifndef BOOST_MPL_INT_FWD_HPP_INCLUDED
#define BOOST_MPL_INT_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: int_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/adl_barrier.hpp>
#include <boost/mpl/aux_/nttp_decl.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct int_;
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
BOOST_MPL_AUX_ADL_BARRIER_DECL(int_)
#endif // BOOST_MPL_INT_FWD_HPP_INCLUDED

View File

@ -1,51 +1,51 @@
#ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
#define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2006
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: integral_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/integral_c_fwd.hpp>
#include <boost/mpl/aux_/config/ctps.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#if BOOST_WORKAROUND(__HP_aCC, <= 53800)
// the type of non-type template arguments may not depend on template arguments
# define AUX_WRAPPER_PARAMS(N) typename T, long N
#else
# define AUX_WRAPPER_PARAMS(N) typename T, T N
#endif
#define AUX_WRAPPER_NAME integral_c
#define AUX_WRAPPER_VALUE_TYPE T
#define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< T, value >
#include <boost/mpl/aux_/integral_wrapper.hpp>
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
&& !BOOST_WORKAROUND(__BORLANDC__, <= 0x551)
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
// '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_tag tag;
typedef integral_c type;
typedef bool value_type;
operator bool() const { return this->value; }
};
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
#endif
#endif // BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
#ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
#define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2006
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: integral_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/integral_c_fwd.hpp>
#include <boost/mpl/aux_/config/ctps.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#if BOOST_WORKAROUND(__HP_aCC, <= 53800)
// the type of non-type template arguments may not depend on template arguments
# define AUX_WRAPPER_PARAMS(N) typename T, long N
#else
# define AUX_WRAPPER_PARAMS(N) typename T, T N
#endif
#define AUX_WRAPPER_NAME integral_c
#define AUX_WRAPPER_VALUE_TYPE T
#define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< T, value >
#include <boost/mpl/aux_/integral_wrapper.hpp>
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
&& !BOOST_WORKAROUND(__BORLANDC__, <= 0x551)
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
// '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_tag tag;
typedef integral_c type;
typedef bool value_type;
operator bool() const { return this->value; }
};
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
#endif
#endif // BOOST_MPL_INTEGRAL_C_HPP_INCLUDED

View File

@ -1,32 +1,32 @@
#ifndef BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED
#define BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2006
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: integral_c_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/workaround.hpp>
#include <boost/mpl/aux_/adl_barrier.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
#if BOOST_WORKAROUND(__HP_aCC, <= 53800)
// the type of non-type template arguments may not depend on template arguments
template< typename T, long N > struct integral_c;
#else
template< typename T, T N > struct integral_c;
#endif
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
BOOST_MPL_AUX_ADL_BARRIER_DECL(integral_c)
#endif // BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED
#ifndef BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED
#define BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2006
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: integral_c_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/workaround.hpp>
#include <boost/mpl/aux_/adl_barrier.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
#if BOOST_WORKAROUND(__HP_aCC, <= 53800)
// the type of non-type template arguments may not depend on template arguments
template< typename T, long N > struct integral_c;
#else
template< typename T, T N > struct integral_c;
#endif
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
BOOST_MPL_AUX_ADL_BARRIER_DECL(integral_c)
#endif // BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED

View File

@ -1,26 +1,26 @@
#ifndef BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED
#define BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: integral_c_tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/adl_barrier.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
struct integral_c_tag { BOOST_STATIC_CONSTANT(int, value = 0); };
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
BOOST_MPL_AUX_ADL_BARRIER_DECL(integral_c_tag)
#endif // BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED
#ifndef BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED
#define BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: integral_c_tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/adl_barrier.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
struct integral_c_tag { BOOST_STATIC_CONSTANT(int, value = 0); };
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
BOOST_MPL_AUX_ADL_BARRIER_DECL(integral_c_tag)
#endif // BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED

View File

@ -0,0 +1,67 @@
#ifndef BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED
#define BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: is_placeholder.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/arg_fwd.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/aux_/yes_no.hpp>
#include <boost/mpl/aux_/type_wrapper.hpp>
#include <boost/mpl/aux_/nttp_decl.hpp>
#include <boost/mpl/aux_/config/ctps.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
namespace boost { namespace mpl {
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< typename T >
struct is_placeholder
: bool_<false>
{
};
template< BOOST_MPL_AUX_NTTP_DECL(int, N) >
struct is_placeholder< arg<N> >
: bool_<true>
{
};
#else
namespace aux {
aux::no_tag is_placeholder_helper(...);
template< BOOST_MPL_AUX_NTTP_DECL(int, N) >
aux::yes_tag is_placeholder_helper(aux::type_wrapper< arg<N> >*);
} // namespace aux
template< typename T >
struct is_placeholder
{
static aux::type_wrapper<T>* get();
BOOST_STATIC_CONSTANT(bool, value =
sizeof(aux::is_placeholder_helper(get())) == sizeof(aux::yes_tag)
);
typedef bool_<value> type;
};
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
}}
#endif // BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED

View File

@ -1,112 +1,112 @@
#ifndef BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED
#define BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2002-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: is_sequence.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/not.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/sequence_tag_fwd.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/void.hpp>
#include <boost/mpl/aux_/has_tag.hpp>
#include <boost/mpl/aux_/has_begin.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/config/eti.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
# include <boost/mpl/aux_/msvc_is_class.hpp>
#elif BOOST_WORKAROUND(BOOST_MSVC, == 1300)
# include <boost/type_traits/is_class.hpp>
#endif
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace mpl {
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
namespace aux {
// agurt, 11/jun/03:
// MSVC 6.5/7.0 fails if 'has_begin' is instantiated on a class type that has a
// 'begin' member that doesn't name a type; e.g. 'has_begin< std::vector<int> >'
// would fail; requiring 'T' to have _both_ 'tag' and 'begin' members workarounds
// the issue for most real-world cases
template< typename T > struct is_sequence_impl
: and_<
identity< aux::has_tag<T> >
, identity< aux::has_begin<T> >
>
{
};
} // namespace aux
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct is_sequence
: if_<
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
aux::msvc_is_class<T>
#else
boost::is_class<T>
#endif
, aux::is_sequence_impl<T>
, bool_<false>
>::type
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T))
};
#elif defined(BOOST_MPL_CFG_NO_HAS_XXX)
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct is_sequence
: bool_<false>
{
};
#else
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct is_sequence
: not_< is_same< typename begin<T>::type, void_ > >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T))
};
#endif // BOOST_MSVC
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
template<> struct is_sequence<int>
: bool_<false>
{
};
#endif
BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, is_sequence)
}}
#endif // BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED
#ifndef BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED
#define BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2002-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: is_sequence.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/not.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/sequence_tag_fwd.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/void.hpp>
#include <boost/mpl/aux_/has_tag.hpp>
#include <boost/mpl/aux_/has_begin.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/config/eti.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
# include <boost/mpl/aux_/msvc_is_class.hpp>
#elif BOOST_WORKAROUND(BOOST_MSVC, == 1300)
# include <boost/type_traits/is_class.hpp>
#endif
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace mpl {
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
namespace aux {
// agurt, 11/jun/03:
// MSVC 6.5/7.0 fails if 'has_begin' is instantiated on a class type that has a
// 'begin' member that doesn't name a type; e.g. 'has_begin< std::vector<int> >'
// would fail; requiring 'T' to have _both_ 'tag' and 'begin' members workarounds
// the issue for most real-world cases
template< typename T > struct is_sequence_impl
: and_<
identity< aux::has_tag<T> >
, identity< aux::has_begin<T> >
>
{
};
} // namespace aux
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct is_sequence
: if_<
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
aux::msvc_is_class<T>
#else
boost::is_class<T>
#endif
, aux::is_sequence_impl<T>
, bool_<false>
>::type
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T))
};
#elif defined(BOOST_MPL_CFG_NO_HAS_XXX)
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct is_sequence
: bool_<false>
{
};
#else
template<
typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct is_sequence
: not_< is_same< typename begin<T>::type, void_ > >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T))
};
#endif // BOOST_MSVC
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
template<> struct is_sequence<int>
: bool_<false>
{
};
#endif
BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, is_sequence)
}}
#endif // BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED

View File

@ -1,49 +1,49 @@
#ifndef BOOST_MPL_ITER_FOLD_HPP_INCLUDED
#define BOOST_MPL_ITER_FOLD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-2004
// Copyright David Abrahams 2001-2002
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iter_fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/O1_size.hpp>
#include <boost/mpl/lambda.hpp>
#include <boost/mpl/aux_/iter_fold_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(State)
, typename BOOST_MPL_AUX_NA_PARAM(ForwardOp)
>
struct iter_fold
{
typedef typename aux::iter_fold_impl<
::boost::mpl::O1_size<Sequence>::value
, typename begin<Sequence>::type
, typename end<Sequence>::type
, State
, typename lambda<ForwardOp>::type
>::state type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,iter_fold,(Sequence,State,ForwardOp))
};
BOOST_MPL_AUX_NA_SPEC(3, iter_fold)
}}
#endif // BOOST_MPL_ITER_FOLD_HPP_INCLUDED
#ifndef BOOST_MPL_ITER_FOLD_HPP_INCLUDED
#define BOOST_MPL_ITER_FOLD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-2004
// Copyright David Abrahams 2001-2002
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iter_fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/O1_size.hpp>
#include <boost/mpl/lambda.hpp>
#include <boost/mpl/aux_/iter_fold_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(State)
, typename BOOST_MPL_AUX_NA_PARAM(ForwardOp)
>
struct iter_fold
{
typedef typename aux::iter_fold_impl<
::boost::mpl::O1_size<Sequence>::value
, typename begin<Sequence>::type
, typename end<Sequence>::type
, State
, typename lambda<ForwardOp>::type
>::state type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,iter_fold,(Sequence,State,ForwardOp))
};
BOOST_MPL_AUX_NA_SPEC(3, iter_fold)
}}
#endif // BOOST_MPL_ITER_FOLD_HPP_INCLUDED

View File

@ -1,117 +1,117 @@
#ifndef BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED
#define BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright Eric Friedman 2003
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iter_fold_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/logical.hpp>
#include <boost/mpl/always.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/pair.hpp>
#include <boost/mpl/apply.hpp>
#include <boost/mpl/aux_/iter_fold_if_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/config/forwarding.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace mpl {
namespace aux {
template< typename Predicate, typename LastIterator >
struct iter_fold_if_pred
{
template< typename State, typename Iterator > struct apply
#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
: and_<
not_< is_same<Iterator,LastIterator> >
, apply1<Predicate,Iterator>
>
{
#else
{
typedef and_<
not_< is_same<Iterator,LastIterator> >
, apply1<Predicate,Iterator>
> type;
#endif
};
};
} // namespace aux
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(State)
, typename BOOST_MPL_AUX_NA_PARAM(ForwardOp)
, typename BOOST_MPL_AUX_NA_PARAM(ForwardPredicate)
, typename BOOST_MPL_AUX_NA_PARAM(BackwardOp)
, typename BOOST_MPL_AUX_NA_PARAM(BackwardPredicate)
>
struct iter_fold_if
{
typedef typename begin<Sequence>::type first_;
typedef typename end<Sequence>::type last_;
typedef typename eval_if<
is_na<BackwardPredicate>
, if_< is_na<BackwardOp>, always<false_>, always<true_> >
, identity<BackwardPredicate>
>::type backward_pred_;
// cwpro8 doesn't like 'cut-off' type here (use typedef instead)
#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) && !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
struct result_ :
#else
typedef
#endif
aux::iter_fold_if_impl<
first_
, State
, ForwardOp
, protect< aux::iter_fold_if_pred< ForwardPredicate,last_ > >
, BackwardOp
, backward_pred_
>
#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) && !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
{ };
#else
result_;
#endif
public:
typedef pair<
typename result_::state
, typename result_::iterator
> type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(
6
, iter_fold_if
, (Sequence,State,ForwardOp,ForwardPredicate,BackwardOp,BackwardPredicate)
)
};
BOOST_MPL_AUX_NA_SPEC(6, iter_fold_if)
}}
#endif // BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED
#ifndef BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED
#define BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright Eric Friedman 2003
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iter_fold_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/logical.hpp>
#include <boost/mpl/always.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/pair.hpp>
#include <boost/mpl/apply.hpp>
#include <boost/mpl/aux_/iter_fold_if_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/config/forwarding.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace mpl {
namespace aux {
template< typename Predicate, typename LastIterator >
struct iter_fold_if_pred
{
template< typename State, typename Iterator > struct apply
#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
: and_<
not_< is_same<Iterator,LastIterator> >
, apply1<Predicate,Iterator>
>
{
#else
{
typedef and_<
not_< is_same<Iterator,LastIterator> >
, apply1<Predicate,Iterator>
> type;
#endif
};
};
} // namespace aux
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(State)
, typename BOOST_MPL_AUX_NA_PARAM(ForwardOp)
, typename BOOST_MPL_AUX_NA_PARAM(ForwardPredicate)
, typename BOOST_MPL_AUX_NA_PARAM(BackwardOp)
, typename BOOST_MPL_AUX_NA_PARAM(BackwardPredicate)
>
struct iter_fold_if
{
typedef typename begin<Sequence>::type first_;
typedef typename end<Sequence>::type last_;
typedef typename eval_if<
is_na<BackwardPredicate>
, if_< is_na<BackwardOp>, always<false_>, always<true_> >
, identity<BackwardPredicate>
>::type backward_pred_;
// cwpro8 doesn't like 'cut-off' type here (use typedef instead)
#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) && !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
struct result_ :
#else
typedef
#endif
aux::iter_fold_if_impl<
first_
, State
, ForwardOp
, protect< aux::iter_fold_if_pred< ForwardPredicate,last_ > >
, BackwardOp
, backward_pred_
>
#if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) && !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
{ };
#else
result_;
#endif
public:
typedef pair<
typename result_::state
, typename result_::iterator
> type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(
6
, iter_fold_if
, (Sequence,State,ForwardOp,ForwardPredicate,BackwardOp,BackwardPredicate)
)
};
BOOST_MPL_AUX_NA_SPEC(6, iter_fold_if)
}}
#endif // BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED

View File

@ -0,0 +1,35 @@
#ifndef BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED
#define BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iterator_category.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Iterator)
>
struct iterator_category
{
typedef typename Iterator::category type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,iterator_category,(Iterator))
};
BOOST_MPL_AUX_NA_SPEC(1, iterator_category)
}}
#endif // BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED

View File

@ -1,42 +1,42 @@
#ifndef BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED
#define BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iterator_range.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
struct iterator_range_tag;
template<
typename BOOST_MPL_AUX_NA_PARAM(First)
, typename BOOST_MPL_AUX_NA_PARAM(Last)
>
struct iterator_range
{
typedef iterator_range_tag tag;
typedef iterator_range type;
typedef First begin;
typedef Last end;
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,iterator_range,(First,Last))
};
BOOST_MPL_AUX_NA_SPEC(2, iterator_range)
}}
#endif // BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED
#ifndef BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED
#define BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iterator_range.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
struct iterator_range_tag;
template<
typename BOOST_MPL_AUX_NA_PARAM(First)
, typename BOOST_MPL_AUX_NA_PARAM(Last)
>
struct iterator_range
{
typedef iterator_range_tag tag;
typedef iterator_range type;
typedef First begin;
typedef Last end;
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,iterator_range,(First,Last))
};
BOOST_MPL_AUX_NA_SPEC(2, iterator_range)
}}
#endif // BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED

View File

@ -1,27 +1,27 @@
#ifndef BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED
#define BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iterator_tags.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/int.hpp>
namespace boost { namespace mpl {
struct forward_iterator_tag : int_<0> { typedef forward_iterator_tag type; };
struct bidirectional_iterator_tag : int_<1> { typedef bidirectional_iterator_tag type; };
struct random_access_iterator_tag : int_<2> { typedef random_access_iterator_tag type; };
}}
#endif // BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED
#ifndef BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED
#define BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iterator_tags.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/int.hpp>
namespace boost { namespace mpl {
struct forward_iterator_tag : int_<0> { typedef forward_iterator_tag type; };
struct bidirectional_iterator_tag : int_<1> { typedef bidirectional_iterator_tag type; };
struct random_access_iterator_tag : int_<2> { typedef random_access_iterator_tag type; };
}}
#endif // BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED

Some files were not shown because too many files have changed in this diff Show More