+2003-03-03 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * update boost to version pre-1.30.0
+
2002-11-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
* boost/format/format_implementation.hpp (clear_bind): use
- io::out_of_range
+ io::out_of_range
* boost/config/user.hpp (BOOST_FUNCTION_NO_DEPRECATED): define it.
+// See http://www.boost.org/libs/any for Documentation.
+
#ifndef BOOST_ANY_INCLUDED
#define BOOST_ANY_INCLUDED
* 20 Jan 2001 - STLport fix (Beman Dawes)
* 29 Sep 2000 - Initial Revision (Nico Josuttis)
*/
+
+// See http://www.boost.org/libs/array for Documentation.
+
#ifndef BOOST_ARRAY_HPP
#define BOOST_ARRAY_HPP
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-#elif (defined(BOOST_MSVC) && (BOOST_MSVC == 1300) || (defined(__ICL) && defined(_CPPLIB_VER) && (_CPPLIB_VER == 310))) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310)
// workaround for broken reverse_iterator in VC7
typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator,
reference, iterator, reference> > reverse_iterator;
+
+
+
-#ifndef BOOST_ASSERT_HPP_INCLUDED
-#define BOOST_ASSERT_HPP_INCLUDED
-
-#if _MSC_VER >= 1020
-#pragma once
-#endif
-
//
-// boost/assert.hpp
+// boost/assert.hpp - BOOST_ASSERT(expr)
//
// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
//
// This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
//
-
-//
-// When BOOST_DEBUG is not defined, it defaults to 0 (off)
-// for compatibility with programs that do not expect asserts
-// in the smart pointer class templates.
+// Note: There are no include guards. This is intentional.
//
-// This default may be changed after an initial transition period.
+// See http://www.boost.org/libs/utility/assert.html for documentation.
//
-#ifndef BOOST_DEBUG
-#define BOOST_DEBUG 0
-#endif
+#undef BOOST_ASSERT
-#if BOOST_DEBUG
+#if defined(BOOST_DISABLE_ASSERTS)
-#include <assert.h>
+# define BOOST_ASSERT(expr) ((void)0)
-#ifndef BOOST_ASSERT
+#elif defined(BOOST_ENABLE_ASSERT_HANDLER)
#include <boost/current_function.hpp>
-bool boost_error(char const * expr, char const * func, char const * file, long line);
-
-# define BOOST_ASSERT(expr) ((expr) || !boost_error(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__) || (assert(expr), true))
+namespace boost
+{
-#endif // #ifndef BOOST_ASSERT
+void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined
-#else // #if BOOST_DEBUG
+} // namespace boost
-#undef BOOST_ASSERT
-#define BOOST_ASSERT(expr) ((void)0)
+#define BOOST_ASSERT(expr) ((expr)? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
-#endif // #if BOOST_DEBUG
-
-#endif // #ifndef BOOST_ASSERT_HPP_INCLUDED
+#else
+# include <assert.h>
+# define BOOST_ASSERT(expr) assert(expr)
+#endif
#include <boost/config.hpp>
#include <boost/ref.hpp>
#include <boost/mem_fn.hpp>
+#include <boost/type.hpp>
#include <boost/bind/arg.hpp>
// Borland-specific bug, visit_each() silently fails to produce code
typedef list9<B1, B2, B3, B4, B5, B6, B7, B8, B9> type;
};
+// g++ 2.95 specific helper; used by the data member overload
+
+template<class T> struct add_cref
+{
+ typedef T const & type;
+};
+
+template<> struct add_cref<void>
+{
+ typedef void type;
+};
+
} // namespace _bi
// visit_each
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
}
+// generic function objects, alternative syntax
+
+template<class R, class F>
+ _bi::bind_t<R, F, _bi::list0>
+ BOOST_BIND(boost::type<R>, F f)
+{
+ typedef _bi::list0 list_type;
+ return _bi::bind_t<R, F, list_type> (f, list_type());
+}
+
+template<class R, class F, class A1>
+ _bi::bind_t<R, F, typename _bi::list_av_1<A1>::type>
+ BOOST_BIND(boost::type<R>, F f, A1 a1)
+{
+ typedef typename _bi::list_av_1<A1>::type list_type;
+ return _bi::bind_t<R, F, list_type> (f, list_type(a1));
+}
+
+template<class R, class F, class A1, class A2>
+ _bi::bind_t<R, F, typename _bi::list_av_2<A1, A2>::type>
+ BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2)
+{
+ typedef typename _bi::list_av_2<A1, A2>::type list_type;
+ return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2));
+}
+
+template<class R, class F, class A1, class A2, class A3>
+ _bi::bind_t<R, F, typename _bi::list_av_3<A1, A2, A3>::type>
+ BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3)
+{
+ typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
+ return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4>
+ _bi::bind_t<R, F, typename _bi::list_av_4<A1, A2, A3, A4>::type>
+ BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4)
+{
+ typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
+ return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4, class A5>
+ _bi::bind_t<R, F, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
+ BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
+{
+ typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
+ return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6>
+ _bi::bind_t<R, F, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
+ BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
+{
+ typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
+ return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+ _bi::bind_t<R, F, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
+ BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
+{
+ typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
+ return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+ _bi::bind_t<R, F, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
+ BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
+{
+ typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
+ return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
+}
+
+template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+ _bi::bind_t<R, F, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
+ BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
+{
+ typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
+ return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
+}
+
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
// adaptable function objects
// data member pointers
+#if defined(__GNUC__) && (__GNUC__ == 2)
+
template<class R, class T, class A1>
- _bi::bind_t< R const &, _mfi::dm<R, T>, typename _bi::list_av_1<A1>::type >
+_bi::bind_t< typename _bi::add_cref<R>::type, _mfi::dm<R, T>, typename _bi::list_av_1<A1>::type >
+ BOOST_BIND(R T::*f, A1 a1)
+{
+ typedef _mfi::dm<R, T> F;
+ typedef typename _bi::list_av_1<A1>::type list_type;
+ return _bi::bind_t<typename _bi::add_cref<R>::type, F, list_type>(F(f), list_type(a1));
+}
+
+#else
+
+template<class R, class T, class A1>
+_bi::bind_t< R const &, _mfi::dm<R, T>, typename _bi::list_av_1<A1>::type >
BOOST_BIND(R T::*f, A1 a1)
{
typedef _mfi::dm<R, T> F;
return _bi::bind_t<R const &, F, list_type>(F(f), list_type(a1));
}
+#endif
+
} // namespace boost
#ifndef BOOST_BIND_NO_PLACEHOLDERS
static inline boost::arg<8> _8() { return boost::arg<8>(); }
static inline boost::arg<9> _9() { return boost::arg<9>(); }
-#elif defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+#elif (defined(BOOST_MSVC) && BOOST_MSVC <= 1300) || (defined(__DECCXX_VER) && __DECCXX_VER <= 60590031) || defined(__MWERKS__)
static boost::arg<1> _1;
static boost::arg<2> _2;
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
-// See http://www.boost.org for most recent version including documentation.
+// See http://www.boost.org/libs/utility/call_traits.htm for Documentation.
// See boost/detail/call_traits.hpp and boost/detail/ob_call_traits.hpp
// for full copyright notices.
// express or implied warranty, and with no claim as to its suitability for
// any purpose.
-// See http://www.boost.org for most recent version including documentation.
+// See http://www.boost.org/libs/conversion for Documentation.
// Revision History
// 02 Apr 01 Removed BOOST_NO_LIMITS workarounds and included
template <class T, bool specialized>
struct fixed_numeric_limits_base
: public if_true< std::numeric_limits<T>::is_signed >
- ::template then< signed_numeric_limits<T>,
+ ::BOOST_NESTED_TEMPLATE then< signed_numeric_limits<T>,
std::numeric_limits<T>
>::type
{};
typedef detail::fixed_numeric_limits<Source> arg_traits;
typedef detail::fixed_numeric_limits<Target> result_traits;
-#if !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) || defined(BOOST_SGI_CPP_LIMITS)
+#if defined(BOOST_STRICT_CONFIG) \
+ || (!defined(__HP_aCC) || __HP_aCC > 33900) \
+ && (!defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) \
+ || defined(BOOST_SGI_CPP_LIMITS))
// typedefs that act as compile time assertions
// (to be replaced by boost compile time assertions
// as and when they become available and are stable)
// boost/checked_delete.hpp
//
// Copyright (c) 1999, 2000, 2001, 2002 boost.org
+// Copyright (c) 2002, 2003 Peter Dimov
//
// Permission to copy, use, modify, sell and distribute this software
// is granted provided this copyright notice appears in all copies.
// This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
//
+// See http://www.boost.org/libs/utility/checked_delete.html for documentation.
+//
namespace boost
{
// verify that types are complete for increased safety
-template< typename T > inline void checked_delete(T * x)
+template<class T> inline void checked_delete(T * x)
{
typedef char type_must_be_complete[sizeof(T)];
delete x;
}
-template< typename T > inline void checked_array_delete(T * x)
+template<class T> inline void checked_array_delete(T * x)
{
typedef char type_must_be_complete[sizeof(T)];
delete [] x;
typedef void result_type;
typedef T * argument_type;
- void operator()(T * x)
+ void operator()(T * x) const
{
- checked_delete(x);
+ boost::checked_delete(x);
}
};
typedef void result_type;
typedef T * argument_type;
- void operator()(T * x)
+ void operator()(T * x) const
{
- checked_array_delete(x);
+ boost::checked_array_delete(x);
}
};
* This software is provided "as is" without express or implied
* warranty, and with no claim as to its suitability for any purpose.
*/
+
+// See http://www.boost.org/libs/compose for Documentation.
+
#ifndef BOOST_COMPOSE_HPP
#define BOOST_COMPOSE_HPP
// 17 July 2001: Added const to some member functions. (Jeremy Siek)
// 05 May 2001: Removed static dummy_cons object. (Jeremy Siek)
+// See http://www.boost.org/libs/concept_check for documentation.
+
#ifndef BOOST_CONCEPT_ARCHETYPES_HPP
#define BOOST_CONCEPT_ARCHETYPES_HPP
typedef output_proxy<T> reference;
typedef void pointer;
typedef void difference_type;
+ output_iterator_archetype(detail::dummy_constructor) { }
output_iterator_archetype(const self&) { }
self& operator=(const self&) { return *this; }
bool operator==(const self&) const { return true; }
// 02 April 2001: Removed limits header altogether. (Jeremy Siek)
// 01 April 2001: Modified to use new <boost/limits.hpp> header. (JMaddock)
//
+
+// See http://www.boost.org/libs/concept_check for documentation.
+
#ifndef BOOST_CONCEPT_CHECKS_HPP
#define BOOST_CONCEPT_CHECKS_HPP
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
-// See http://www.boost.org for most recent version.
+// See http://www.boost.org/libs/config for most recent version.
// Boost config.hpp policy and rationale documentation has been moved to
// http://www.boost.org/libs/config
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
#endif
-#if (__EDG_VERSION__ <= 245) && !defined(BOOST_NO_TEMPLATE_TEMPLATES)
+#if (__EDG_VERSION__ <= 244) && !defined(BOOST_NO_TEMPLATE_TEMPLATES)
# define BOOST_NO_TEMPLATE_TEMPLATES
#endif
# endif
//
-// Threading support:
-// Turn this on unconditionally here, it will get turned off again later
-// if no threading API is detected.
+// Threading support: Turn this on unconditionally here (except for
+// MinGW, where we can know for sure). It will get turned off again
+// later if no threading API is detected.
//
-#define BOOST_HAS_THREADS
+#if !defined(__MINGW32__) || defined(_MT)
+# define BOOST_HAS_THREADS
+#endif
//
// gcc has "long long"
//
#define BOOST_HAS_LONG_LONG
-#define BOOST_COMPILER "GNU C++ version " BOOST_STRINGIZE(__GNUC__) "." BOOST_STRINGIZE(__GNUC_MINOR__)
+//
+// gcc implements the named return value optimization since version 3.1
+//
+#if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 )
+#define BOOST_HAS_NRVO
+#endif
+
+#define BOOST_COMPILER "GNU C++ version " __VERSION__
//
// versions check:
# endif
#endif
-#if (__HP_aCC <= 33300) || !defined(BOOST_STRICT_CONFIG)
+#if (__HP_aCC <= 33300)
// member templates are sufficiently broken that we disable them for now
# define BOOST_NO_MEMBER_TEMPLATES
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
+#endif
+
+#if (__HP_aCC <= 33900) || !defined(BOOST_STRICT_CONFIG)
+# define BOOST_NO_UNREACHABLE_RETURN_DETECTION
+# define BOOST_NO_TEMPLATE_TEMPLATES
+# define BOOST_NO_SWPRINTF
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
+// std lib config should set this one already:
+//# define BOOST_NO_STD_ALLOCATOR
+#endif
+
+// optional features rather than defects:
+#if (__HP_aCC >= 33900)
+# define BOOST_HAS_LONG_LONG
+# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
#endif
#define BOOST_COMPILER "HP aCC version " BOOST_STRINGIZE(__HP_aCC)
#endif
//
// last known and checked version is 0:
-#if (__HP_aCC > 33300)
+#if (__HP_aCC > 33900)
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results"
# endif
#endif
+
+
#if (BOOST_INTEL_CXX_VERSION <= 500) && defined(_MSC_VER)
# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
+# define BOOST_NO_TEMPLATE_TEMPLATES
#endif
#if (BOOST_INTEL_CXX_VERSION <= 600) || !defined(BOOST_STRICT_CONFIG)
# define BOOST_DISABLE_WIN32
#endif
+// I checked version 6.0 build 020312Z, it implements the NRVO.
+// Correct this as you find out which version of the compiler
+// implemented the NRVO first. (Daniel Frey)
+#if (BOOST_INTEL_CXX_VERSION >= 600)
+# define BOOST_HAS_NRVO
+#endif
//
// versions check:
# error "Compiler not supported or configured - please reconfigure"
#endif
//
-// last known and checked version is 600:
-#if (BOOST_INTEL_CXX_VERSION > 600)
+// last known and checked version:
+#if (BOOST_INTEL_CXX_VERSION > 700)
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results"
# elif defined(_MSC_VER)
# endif
# if(__MWERKS__ <= 0x2407) // 7.x
-# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
+# define BOOST_NO_UNREACHABLE_RETURN_DETECTION
# endif
+# if(__MWERKS__ <= 0x3003) // 8.x
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+# endif
+
#if !__option(wchar_type)
# define BOOST_NO_INTRINSIC_WCHAR_T
#endif
+#if !__option(exceptions)
+# define BOOST_NO_EXCEPTIONS
+#endif
+
# if __MWERKS__ == 0x3000
# define BOOST_COMPILER_VERSION 8.0
# elif __MWERKS__ == 0x3001
# define BOOST_COMPILER_VERSION 8.1
# elif __MWERKS__ == 0x3002
# define BOOST_COMPILER_VERSION 8.2
+# elif __MWERKS__ == 0x3003
+# define BOOST_COMPILER_VERSION 8.3
# else
# define BOOST_COMPILER_VERSION __MWERKS__
# endif
#endif
//
// last known and checked version:
-#if (__MWERKS__ > 0x3002)
+#if (__MWERKS__ > 0x3003)
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results"
# endif
// integral constant expressions with 64 bit numbers fail
# define BOOST_NO_INTEGRAL_INT64_T
+# endif
+
+# if (__SUNPRO_CC <= 0x540) || !defined(BOOST_STRICT_CONFIG)
# define BOOST_NO_TEMPLATE_TEMPLATES
# endif
# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
#endif
+#if (__IBMCPP__ <= 502)
+# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
+#endif
+
#if (__IBMCPP__ <= 502) || !defined(BOOST_STRICT_CONFIG)
// Actually the compiler supports inclass member initialization but it
// requires a definition for the class member and it doesn't recognize
// it as an integral constant expression when used as a template argument.
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-
-# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
# define BOOST_NO_INTEGRAL_INT64_T
#endif
# define BOOST_HAS_THREADS
#endif
-#define BOOST_COMPILER "IBM Visual Age" BOOST_STRINGIZE(__IBMCPP__)
+#define BOOST_COMPILER "IBM Visual Age version " BOOST_STRINGIZE(__IBMCPP__)
//
// versions check:
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
# define BOOST_NO_VOID_RETURNS
# define BOOST_NO_EXCEPTION_STD_NAMESPACE
+# define BOOST_NO_DEDUCED_TYPENAME
// disable min/max macro defines on vc6:
//
#endif
-#if (_MSC_VER <= 1300)
+#if (_MSC_VER <= 1300) // 1200 == VC++ 7.0
#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
#endif
-#if _MSC_VER < 1310
+#if _MSC_VER < 1310 // 1310 == VC++ 7.1
# define BOOST_NO_SWPRINTF
#endif
+#if _MSC_VER <= 1310
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+#endif
+
#ifndef _NATIVE_WCHAR_T_DEFINED
# define BOOST_NO_INTRINSIC_WCHAR_T
#endif
#define BOOST_HAS_NANOSLEEP
#define BOOST_HAS_GETTIMEOFDAY
#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+#define BOOST_HAS_SIGACTION
// boilerplate code:
#define BOOST_HAS_UNISTD_H
#include <boost/config/posix_features.hpp>
+
+
+
#define BOOST_NO_CWCTYPE
#define BOOST_NO_CWCHAR
#define BOOST_NO_SWPRINTF
+#define BOOST_HAS_DIRENT_H
//
// Threading API:
# define BOOST_HAS_SCHED_YIELD
# define BOOST_HAS_GETTIMEOFDAY
# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+# define BOOST_HAS_SIGACTION
#else
# if !defined(BOOST_HAS_WINTHREADS)
# define BOOST_HAS_WINTHREADS
#define BOOST_HAS_UNISTD_H
#include <boost/config/posix_features.hpp>
+// HPUX has an incomplete pthreads implementation, so it doesn't
+// define _POSIX_THREADS, but it might be enough to implement
+// Boost.Threads.
+#if !defined(BOOST_HAS_PTHREADS) && defined(_POSIX_THREAD_ATTR_STACKADDR)
+# define BOOST_HAS_PTHREADS
+#endif
+
+// the following are always available:
+#ifndef BOOST_HAS_GETTIMEOFDAY
+# define BOOST_HAS_GETTIMEOFDAY
+#endif
+#ifndef BOOST_HAS_SCHED_YIELD
+# define BOOST_HAS_SCHED_YIELD
+#endif
+#ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+#endif
+#ifndef BOOST_HAS_NL_TYPES_H
+# define BOOST_HAS_NL_TYPES_H
+#endif
+#ifndef BOOST_HAS_NANOSLEEP
+# define BOOST_HAS_NANOSLEEP
+#endif
#ifndef BOOST_HAS_GETTIMEOFDAY
-// gettimeofday is always available
-#define BOOST_HAS_GETTIMEOFDAY
+# define BOOST_HAS_GETTIMEOFDAY
+#endif
+#ifndef BOOST_HAS_DIRENT_H
+# define BOOST_HAS_DIRENT_H
#endif
+#ifndef BOOST_HAS_CLOCK_GETTIME
+# define BOOST_HAS_CLOCK_GETTIME
+#endif
+#ifndef BOOST_HAS_SIGACTION
+# define BOOST_HAS_SIGACTION
+#endif
+
#define BOOST_PLATFORM "Mac OS"
-// If __MACH__, we're using the BSD standard C library, not the MSL:
-#if __MACH__
+#if __MACH__ && !defined(_MSL_USING_MSL_C)
+
+// Using the Mac OS X system BSD-style C library.
# define BOOST_NO_CTYPE_FUNCTIONS
# define BOOST_NO_CWCHAR
# define BOOST_HAS_UNISTD_H
# endif
// boilerplate code:
-# include <boost/config/posix_features.hpp>
+# ifndef TARGET_CARBON
+# include <boost/config/posix_features.hpp>
+# endif
# ifndef BOOST_HAS_STDINT_H
# define BOOST_HAS_STDINT_H
# endif
//
-// BSD runtime has pthreads, sched_yield and gettimeofday,
+// BSD runtime has pthreads, sigaction, sched_yield and gettimeofday,
// of these only pthreads are advertised in <unistd.h>, so set the
// other options explicitly:
//
# define BOOST_HAS_SCHED_YIELD
# define BOOST_HAS_GETTIMEOFDAY
+# define BOOST_HAS_SIGACTION
# ifndef __APPLE_CC__
#else
+// Using the MSL C library.
+
// We will eventually support threads in non-Carbon builds, but we do
// not support this yet.
# if TARGET_CARBON
# endif
#endif
+
#define BOOST_PLATFORM "Win32"
-#if defined BOOST_DECL_EXPORTS
-# if defined BOOST_DECL_IMPORTS
-# error Not valid to define both BOOST_DECL_EXPORTS and BOOST_DECL_IMPORTS
-# endif
-# define BOOST_DECL __declspec(dllexport)
-#elif defined BOOST_DECL_IMPORTS
-# define BOOST_DECL __declspec(dllimport)
-#else
-# define BOOST_DECL
-#endif
-
#if defined(__GNUC__) && !defined(BOOST_NO_SWPRINTF)
# define BOOST_NO_SWPRINTF
#endif
// See http://www.boost.org for most recent version.
-// All POSIX feature tests go in this file:
+// All POSIX feature tests go in this file,
+// Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well
+// _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's
+// may be present but none-functional unless _POSIX_C_SOURCE and
+// _XOPEN_SOURCE have been defined to the right value (it's up
+// to the user to do this *before* including any header, although
+// in most cases the compiler will do this for you).
-# ifdef BOOST_HAS_UNISTD_H
+# if defined(BOOST_HAS_UNISTD_H)
# include <unistd.h>
// XOpen has <nl_types.h>, but is this the correct version check?
# define BOOST_HAS_DIRENT_H
# endif
+ // POSIX version 3 requires <signal.h> to have sigaction:
+# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L)
+# define BOOST_HAS_SIGACTION
+# endif
// POSIX defines _POSIX_THREADS > 0 for pthread support,
// however some platforms define _POSIX_THREADS without
// a value, hence the (_POSIX_THREADS+0 >= 0) check.
// Strictly speaking this may catch platforms with a
// non-functioning stub <pthreads.h>, but such occurrences should
// occur very rarely if at all.
-# if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS)
+# if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS)
# define BOOST_HAS_PTHREADS
# endif
// in issue 4, version 2 (_XOPEN_VERSION > 500).
# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500)
# define BOOST_HAS_GETTIMEOFDAY
-# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+# if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+# endif
# endif
# endif
+
+
// Rogue Wave library:
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp"
-#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
-// Dinkumware Library:
-# define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp"
-
#elif defined(__GLIBCPP__)
// GNU libstdc++ 3
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp"
// Modena C++ standard library
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp"
+#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
+// Dinkumware Library (this has to appear after any possible replacement libraries):
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp"
+
#elif defined (BOOST_ASSERT_CONFIG)
// this must come last - generate an error if we don't
// recognise the library:
# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(_STD) // can be defined in yvals.h
# define BOOST_NO_STDC_NAMESPACE
# endif
-# if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300))
+# if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC)
# define BOOST_NO_STD_ALLOCATOR
# endif
# if defined(_MSC_VER) && (_MSC_VER < 1300)
# define BOOST_NO_STD_LOCALE
#endif
+#ifdef _CPPLIB_VER
+# define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER
+#else
+# define BOOST_DINKUMWARE_STDLIB 1
+#endif
+
#ifdef _CPPLIB_VER
# define BOOST_STDLIB "Dinkumware standard library version " BOOST_STRINGIZE(_CPPLIB_VER)
#else
+
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
#endif
+#if BOOST_RWSTD_VER <= 0x020101
+# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
+# endif
+
//
// Borland version of numeric_limits lacks __int64 specialisation:
//
//
#if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE)
# define BOOST_NO_CWCHAR
-# define BOOST_NO_CWTYPE
+# define BOOST_NO_CWCTYPE
#endif
//
#ifndef BOOST_CONFIG_SUFFIX_HPP
#define BOOST_CONFIG_SUFFIX_HPP
-# ifndef BOOST_DECL
-# define BOOST_DECL // default for compilers not needing this decoration.
-# endif
-
//
// look for long long by looking for the appropriate macros in <limits.h>.
// Note that we use limits.h rather than climits for maximal portability,
# define BOOST_NESTED_TEMPLATE
#endif
+// BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------//
+// Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION
+// is defined, in which case it evaluates to return x; Use when you have a return
+// statement that can never be reached.
+
+#ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
+# define BOOST_UNREACHABLE_RETURN(x) return x;
+#else
+# define BOOST_UNREACHABLE_RETURN(x)
+#endif
+
+// BOOST_DEDUCED_TYPENAME workaround ------------------------------------------//
+//
+// Some compilers don't support the use of `typename' for dependent
+// types in deduced contexts, e.g.
+//
+// template <class T> void f(T, typename T::type);
+// ^^^^^^^^
+// Replace these declarations with:
+//
+// template <class T> void f(T, BOOST_DEDUCED_TYPENAME T::type);
+
+#ifndef BOOST_NO_DEDUCED_TYPENAME
+# define BOOST_DEDUCED_TYPENAME typename
+#else
+# define BOOST_DEDUCED_TYPENAME
+#endif
+
// ---------------------------------------------------------------------------//
//
#define BOOST_NO_EXCEPTIONS 1
#define BOOST_NO_WREGEX 1
#define BOOST_NO_WSTRING 1
-#define BOOST_FUNCTION_NO_DEPRECATED 1
// without express or implied warranty, and with no claim as to its suitability
// for any purpose.
//
-// See http://www.boost.org for most recent version including documentation.
+// See http://www.boost.org/libs/utility/counting_iterator.htm for documentation.
//
// Supplies:
//
// in all copies. This software is provided "as is" without express or
// implied warranty, and with no claim as to its suitability for any purpose.
-// See http://www.boost.org for updates, documentation, and revision history.
+// See http://www.boost.org/libs/crc for documentation.
#ifndef BOOST_CRC_HPP
#define BOOST_CRC_HPP
*/
/*
- * LOCATION: see http://www.boost.org for most recent version.
+ * LOCATION: see http://www.boost.org/libs/regex for most recent version.
* FILE cregex.cpp
* VERSION see <boost/version.hpp>
* DESCRIPTION: Declares POSIX API functions
#ifndef BOOST_RE_CREGEX_HPP
#define BOOST_RE_CREGEX_HPP
-#include <boost/regex/config.hpp>
-
-#ifdef __BORLANDC__
- #pragma option push -a8 -b -Vx -Ve -pc
-#endif
-
-/* include these defs only for POSIX compatablity */
-#ifdef __cplusplus
-namespace boost{
-extern "C" {
-#endif
-
-#if defined(__cplusplus) && !defined(BOOST_NO_STDC_NAMESPACE)
-typedef std::ptrdiff_t regoff_t;
-typedef std::size_t regsize_t;
-#else
-typedef ptrdiff_t regoff_t;
-typedef size_t regsize_t;
-#endif
-
-typedef struct
-{
- unsigned int re_magic;
- unsigned int re_nsub; /* number of parenthesized subexpressions */
- const char* re_endp; /* end pointer for REG_PEND */
- void* guts; /* none of your business :-) */
- unsigned int eflags; /* none of your business :-) */
-} regex_tA;
-
-#ifndef BOOST_NO_WREGEX
-typedef struct
-{
- unsigned int re_magic;
- unsigned int re_nsub; /* number of parenthesized subexpressions */
- const wchar_t* re_endp; /* end pointer for REG_PEND */
- void* guts; /* none of your business :-) */
- unsigned int eflags; /* none of your business :-) */
-} regex_tW;
-#endif
-
-typedef struct
-{
- regoff_t rm_so; /* start of match */
- regoff_t rm_eo; /* end of match */
-} regmatch_t;
-
-/* regcomp() flags */
-typedef enum{
- REG_BASIC = 0000,
- REG_EXTENDED = 0001,
- REG_ICASE = 0002,
- REG_NOSUB = 0004,
- REG_NEWLINE = 0010,
- REG_NOSPEC = 0020,
- REG_PEND = 0040,
- REG_DUMP = 0200,
- REG_NOCOLLATE = 0400,
- REG_ESCAPE_IN_LISTS = 01000,
- REG_NEWLINE_ALT = 02000,
-
- REG_PERL = REG_EXTENDED | REG_NOCOLLATE | REG_ESCAPE_IN_LISTS,
- REG_AWK = REG_EXTENDED | REG_ESCAPE_IN_LISTS,
- REG_GREP = REG_BASIC | REG_NEWLINE_ALT,
- REG_EGREP = REG_EXTENDED | REG_NEWLINE_ALT,
-
- REG_ASSERT = 15,
- REG_INVARG = 16,
- REG_ATOI = 255, /* convert name to number (!) */
- REG_ITOA = 0400 /* convert number to name (!) */
-} reg_comp_flags;
-
-/* regexec() flags */
-typedef enum{
- REG_NOTBOL = 00001,
- REG_NOTEOL = 00002,
- REG_STARTEND = 00004
-} reg_exec_flags;
-
-BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA*, const char*, int);
-BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int, const regex_tA*, char*, regsize_t);
-BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecA(const regex_tA*, const char*, regsize_t, regmatch_t*, int);
-BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeA(regex_tA*);
-
-#ifndef BOOST_NO_WREGEX
-BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW*, const wchar_t*, int);
-BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int, const regex_tW*, wchar_t*, regsize_t);
-BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecW(const regex_tW*, const wchar_t*, regsize_t, regmatch_t*, int);
-BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeW(regex_tW*);
-#endif
-
-#ifdef UNICODE
-#define regcomp regcompW
-#define regerror regerrorW
-#define regexec regexecW
-#define regfree regfreeW
-#define regex_t regex_tW
-#else
-#define regcomp regcompA
-#define regerror regerrorA
-#define regexec regexecA
-#define regfree regfreeA
-#define regex_t regex_tA
-#endif
-
-/* regerror() flags */
-typedef enum
-{
- REG_NOERROR = 0, /* Success. */
- REG_NOMATCH = 1, /* Didn't find a match (for regexec). */
-
- /* POSIX regcomp return error codes. (In the order listed in the
- standard.) */
- REG_BADPAT = 2, /* Invalid pattern. */
- REG_ECOLLATE = 3, /* Undefined collating element. */
- REG_ECTYPE = 4, /* Invalid character class name. */
- REG_EESCAPE = 5, /* Trailing backslash. */
- REG_ESUBREG = 6, /* Invalid back reference. */
- REG_EBRACK = 7, /* Unmatched left bracket. */
- REG_EPAREN = 8, /* Parenthesis imbalance. */
- REG_EBRACE = 9, /* Unmatched \{. */
- REG_BADBR = 10, /* Invalid contents of \{\}. */
- REG_ERANGE = 11, /* Invalid range end. */
- REG_ESPACE = 12, /* Ran out of memory. */
- REG_BADRPT = 13, /* No preceding re for repetition op. */
- REG_EEND = 14, /* unexpected end of expression */
- REG_ESIZE = 15, /* expression too big */
- REG_ERPAREN = 16, /* unmatched right parenthesis */
- REG_EMPTY = 17, /* empty expression */
- REG_E_MEMORY = REG_ESIZE, /* out of memory */
- REG_E_UNKNOWN = 18 /* unknown error */
-} reg_errcode_t;
-
-enum match_flags
-{
- match_default = 0,
- match_not_bol = 1, // first is not start of line
- match_not_eol = match_not_bol << 1, // last is not end of line
- match_not_bob = match_not_eol << 1, // first is not start of buffer
- match_not_eob = match_not_bob << 1, // last is not end of buffer
- match_not_bow = match_not_eob << 1, // first is not start of word
- match_not_eow = match_not_bow << 1, // last is not end of word
- match_not_dot_newline = match_not_eow << 1, // \n is not matched by '.'
- match_not_dot_null = match_not_dot_newline << 1, // '\0' is not matched by '.'
- match_prev_avail = match_not_dot_null << 1, // *--first is a valid expression
- match_init = match_prev_avail << 1, // internal use
- match_any = match_init << 1, // don't care what we match
- match_not_null = match_any << 1, // string can't be null
- match_continuous = match_not_null << 1, // each grep match must continue from
- // uninterupted from the previous one
- match_partial = match_continuous << 1, // find partial matches
-
- match_stop = match_partial << 1, // stop after first match (grep)
- match_all = match_stop << 1, // must find the whole of input even if match_any is set
- match_max = match_all
-};
-
-
-#ifdef __cplusplus
-} // extern "C"
-} // namespace
-#endif
-
-
-#ifdef __BORLANDC__
- #if __BORLANDC__ > 0x520
- #pragma option pop
- #endif
-#endif
-
-
-//
-// C++ high level wrapper goes here:
-//
-#if defined(__cplusplus)
-#include <string>
-#include <vector>
-namespace boost{
-
-#ifdef __BORLANDC__
- #if __BORLANDC__ == 0x530
- #pragma option push -a4 -b
- #elif __BORLANDC__ > 0x530
- #pragma option push -a8 -b
- #endif
-#endif
-
-class RegEx;
-
-namespace re_detail{
-
-class RegExData;
-struct pred1;
-struct pred2;
-struct pred3;
-struct pred4;
-
-} // namespace re_detail
-
-#if defined(BOOST_MSVC) || defined(__BORLANDC__)
-typedef bool (__cdecl *GrepCallback)(const RegEx& expression);
-typedef bool (__cdecl *GrepFileCallback)(const char* file, const RegEx& expression);
-typedef bool (__cdecl *FindFilesCallback)(const char* file);
-#else
-typedef bool (*GrepCallback)(const RegEx& expression);
-typedef bool (*GrepFileCallback)(const char* file, const RegEx& expression);
-typedef bool (*FindFilesCallback)(const char* file);
-#endif
-
-class BOOST_REGEX_DECL RegEx
-{
-private:
- re_detail::RegExData* pdata;
-public:
- RegEx();
- RegEx(const RegEx& o);
- ~RegEx();
- explicit RegEx(const char* c, bool icase = false);
- explicit RegEx(const std::string& s, bool icase = false);
- RegEx& operator=(const RegEx& o);
- RegEx& operator=(const char* p);
- RegEx& operator=(const std::string& s){ return this->operator=(s.c_str()); }
- unsigned int SetExpression(const char* p, bool icase = false);
- unsigned int SetExpression(const std::string& s, bool icase = false){ return SetExpression(s.c_str(), icase); }
- std::string Expression()const;
- unsigned int error_code()const;
- //
- // now matching operators:
- //
- bool Match(const char* p, unsigned int flags = match_default);
- bool Match(const std::string& s, unsigned int flags = match_default) { return Match(s.c_str(), flags); }
- bool Search(const char* p, unsigned int flags = match_default);
- bool Search(const std::string& s, unsigned int flags = match_default) { return Search(s.c_str(), flags); }
- unsigned int Grep(GrepCallback cb, const char* p, unsigned int flags = match_default);
- unsigned int Grep(GrepCallback cb, const std::string& s, unsigned int flags = match_default) { return Grep(cb, s.c_str(), flags); }
- unsigned int Grep(std::vector<std::string>& v, const char* p, unsigned int flags = match_default);
- unsigned int Grep(std::vector<std::string>& v, const std::string& s, unsigned int flags = match_default) { return Grep(v, s.c_str(), flags); }
- unsigned int Grep(std::vector<std::size_t>& v, const char* p, unsigned int flags = match_default);
- unsigned int Grep(std::vector<std::size_t>& v, const std::string& s, unsigned int flags = match_default) { return Grep(v, s.c_str(), flags); }
-#ifndef BOOST_REGEX_NO_FILEITER
- unsigned int GrepFiles(GrepFileCallback cb, const char* files, bool recurse = false, unsigned int flags = match_default);
- unsigned int GrepFiles(GrepFileCallback cb, const std::string& files, bool recurse = false, unsigned int flags = match_default) { return GrepFiles(cb, files.c_str(), recurse, flags); }
- unsigned int FindFiles(FindFilesCallback cb, const char* files, bool recurse = false, unsigned int flags = match_default);
- unsigned int FindFiles(FindFilesCallback cb, const std::string& files, bool recurse = false, unsigned int flags = match_default) { return FindFiles(cb, files.c_str(), recurse, flags); }
-#endif
-
- std::string Merge(const std::string& in, const std::string& fmt,
- bool copy = true, unsigned int flags = match_default);
- std::string Merge(const char* in, const char* fmt,
- bool copy = true, unsigned int flags = match_default);
-
- std::size_t Split(std::vector<std::string>& v, std::string& s, unsigned flags = match_default, unsigned max_count = ~0);
- //
- // now operators for returning what matched in more detail:
- //
- std::size_t Position(int i = 0)const;
- std::size_t Length(int i = 0)const;
- bool Matched(int i = 0)const;
- unsigned int Line()const;
- unsigned int Marks()const;
- std::string What(int i = 0)const;
- std::string operator[](int i)const { return What(i); }
-
- static const unsigned int npos;
-
- friend struct re_detail::pred1;
- friend struct re_detail::pred2;
- friend struct re_detail::pred3;
- friend struct re_detail::pred4;
-};
-
-#ifdef __BORLANDC__
- #pragma option pop
-#endif
-
-} // namespace boost
-
-#endif
+#include <boost/regex/v3/cregex.hpp>
#endif // include guard
+
// express or implied warranty, and with no claim as to its suitability for
// any purpose.
-// See http://www.boost.org for most recent version including documentation.
+// 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-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
#endif // __STDC_CONSTANT_MACROS_DEFINED etc.
+
+
// appears in all copies. This software is provided "as is" without express or
// implied warranty, and with no claim as to its suitability for any purpose.
-// See http://www.boost.org for updates and documentation.
+// See http://www.boost.org/libs/utility/cstdlib.html for documentation.
// Revision History
// 26 Feb 01 Initial version (Beman Dawes)
// This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
//
+// http://www.boost.org/libs/utility/current_function.html
+//
namespace boost
{
inline void current_function_helper()
{
-#if defined(__GNUC__)
+#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000))
# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__
# define BOOST_CURRENT_FUNCTION __FUNCSIG__
-#elif defined(__BORLANDC__)
+#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
# define BOOST_CURRENT_FUNCTION __FUNC__
template <class T>
void allocator_destroy(T* p)
-{ p->~T(); }
+{
+ (void)p; // warning suppression
+ p->~T();
+}
} }
#include <memory>
-#define BOOST_DEFAULT_ALLOCATOR(T) std::allocator<T>
+#define BOOST_DEFAULT_ALLOCATOR(T) std::allocator< T >
namespace boost{ namespace detail{
// no std::allocator, but the compiler supports the necessary syntax,
// write our own allocator instead:
-#define BOOST_DEFAULT_ALLOCATOR(T) ::boost::detail::allocator<T>
+#define BOOST_DEFAULT_ALLOCATOR(T) ::boost::detail::allocator< T >
namespace boost{ namespace detail{
# include <boost/detail/atomic_count_pthreads.hpp>
#else
-// #warning Unrecognized platform, detail::atomic_count will not be thread safe
-
-namespace boost
-{
-
-namespace detail
-{
-
-typedef long atomic_count;
-
-}
-
-}
+// Use #define BOOST_DISABLE_THREADS to avoid the error
+#error Unrecognized threading platform
#endif
//
// boost/detail/atomic_count_win32.hpp
//
-// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
+// Copyright (c) 2001, 2002, 2003 Peter Dimov
//
// Permission to copy, use, modify, sell and distribute this software
// is granted provided this copyright notice appears in all copies.
// warranty, and with no claim as to its suitability for any purpose.
//
-#include <boost/detail/winapi.hpp>
+#ifdef BOOST_USE_WINDOWS_H
+# include <windows.h>
+#endif
namespace boost
{
namespace detail
{
+#ifndef BOOST_USE_WINDOWS_H
+
+#ifdef _WIN64
+
+// Intel 6.0 on Win64 version, posted by Tim Fenders to [boost-users]
+
+extern "C" long_type __cdecl _InterlockedIncrement(long volatile *);
+extern "C" long_type __cdecl _InterlockedDecrement(long volatile *);
+
+#pragma intrinsic(_InterlockedIncrement)
+#pragma intrinsic(_InterlockedDecrement)
+
+inline long InterlockedIncrement(long volatile * lp)
+{
+ return _InterlockedIncrement(lp);
+}
+
+inline long InterlockedDecrement(long volatile* lp)
+{
+ return _InterlockedDecrement(lp);
+}
+
+#else // _WIN64
+
+extern "C" __declspec(dllimport) long __stdcall InterlockedIncrement(long volatile *);
+extern "C" __declspec(dllimport) long __stdcall InterlockedDecrement(long volatile *);
+
+#endif // _WIN64
+
+#endif // #ifndef BOOST_USE_WINDOWS_H
+
class atomic_count
{
public:
long operator++()
{
- return winapi::InterlockedIncrement(&value_);
+ // Some older <windows.h> versions do not accept volatile
+ return InterlockedIncrement(const_cast<long*>(&value_));
}
long operator--()
{
- return winapi::InterlockedDecrement(&value_);
+ return InterlockedDecrement(const_cast<long*>(&value_));
}
operator long() const
-// (C) Copyright David Abrahams 2001. Permission to copy, use, modify,
+// (C) Copyright David Abrahams 2002. Permission to copy, use, modify,
// sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided
// "as is" without express or implied warranty, and with no claim as
// std::iterator_traits<X>::pointer
// std::iterator_traits<X>::reference
//
-// CAVEAT: When using the VC6 standard library, an iterator derived from
-// std::iterator but not boost::iterator or from one supplied by the standard
-// will always have pointer == const value_type* and reference == const
-// value_type&, whether that's correct or not.
-
// See http://www.boost.org for most recent version including documentation.
// Revision History
# define ITERATOR_DWA122600_HPP_
# include <boost/config.hpp>
-# include <boost/type_traits.hpp>
-# include <boost/iterator.hpp>
+# include <boost/type_traits/remove_const.hpp>
+# include <boost/type_traits/detail/yes_no_type.hpp>
+# include <boost/type_traits/is_pointer.hpp>
+# include <boost/type_traits/is_base_and_derived.hpp>
+# include <boost/mpl/if.hpp>
+# include <boost/mpl/aux_/has_xxx.hpp>
# include <iterator>
# include <cstddef>
-# if defined(BOOST_MSVC_STD_ITERATOR) && !defined(__SGI_STL_PORT)
-# include <xtree>
-# include <deque>
-# include <list>
-# endif
-
+// should be the last #include
+#include "boost/type_traits/detail/bool_trait_def.hpp"
// STLPort 4.0 and betas have a bug when debugging is enabled and there is no
// partial specialization: instead of an iterator_category typedef, the standard
// Also, whether debugging is enabled or not, there is a broken specialization
// of std::iterator<output_iterator_tag,void,void,void,void> which has no
// typedefs but iterator_category.
-# if defined(__SGI_STL_PORT) && (__SGI_STL_PORT <= 0x410) && !defined(__STL_CLASS_PARTIAL_SPECIALIZATION)
+# if defined(__SGI_STL_PORT)
-# ifdef __STL_DEBUG
+# if (__SGI_STL_PORT <= 0x410) && !defined(__STL_CLASS_PARTIAL_SPECIALIZATION) && defined(__STL_DEBUG)
# define BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF
# endif
# endif // STLPort <= 4.1b4 && no partial specialization
namespace boost { namespace detail {
-# if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR)
-using std::iterator_traits;
+
+BOOST_MPL_HAS_XXX_TRAIT_DEF(value_type)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(reference)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(pointer)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(difference_type)
+BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator_category)
+
+# if !defined(BOOST_NO_STD_ITERATOR_TRAITS) \
+ && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ && !defined(BOOST_MSVC_STD_ITERATOR)
+// Define a new template so it can be specialized
+template <class Iterator>
+struct iterator_traits
+ : std::iterator_traits<Iterator>
+{};
using std::distance;
-# else
+# elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ && !defined(BOOST_MSVC_STD_ITERATOR)
-namespace iterator_traits_ {
+// Rogue Wave Standard Library fools itself into thinking partial
+// specialization is missing on some platforms (e.g. Sun), so fails to
+// supply iterator_traits!
+template <class Iterator>
+struct iterator_traits
+{
+ typedef typename Iterator::value_type value_type;
+ typedef typename Iterator::reference reference;
+ typedef typename Iterator::pointer pointer;
+ typedef typename Iterator::difference_type difference_type;
+ typedef typename Iterator::iterator_category iterator_category;
+};
-// Workarounds for less-capable implementations
-template <bool is_ptr> struct iterator_traits_select;
+template <class T>
+struct iterator_traits<T*>
+{
+ typedef T value_type;
+ typedef T& reference;
+ typedef T* pointer;
+ typedef std::ptrdiff_t difference_type;
+ typedef std::random_access_iterator_tag iterator_category;
+};
-template <class T> struct undefined;
-template <> struct iterator_traits_select<true>
+template <class T>
+struct iterator_traits<T const*>
{
- template <class Ptr>
- struct traits
- {
- typedef std::ptrdiff_t difference_type;
- typedef std::random_access_iterator_tag iterator_category;
- typedef Ptr pointer;
-#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
-// Keeps MSVC happy under certain circumstances. It seems class template default
-// arguments are partly instantiated even when not used when the class template
-// is the return type of a function template.
- typedef undefined<void> value_type;
- typedef undefined<void> reference;
-#endif
- };
+ typedef T value_type;
+ typedef T const& reference;
+ typedef T const* pointer;
+ typedef std::ptrdiff_t difference_type;
+ typedef std::random_access_iterator_tag iterator_category;
};
+# else
-typedef char yes_type;
-typedef double no_type;
+// is_mutable_iterator --
+//
+// A metafunction returning true iff T is a mutable iterator type
+// with a nested value_type. Will only work portably with iterators
+// whose operator* returns a reference, but that seems to be OK for
+// the iterators supplied by Dinkumware. Some input iterators may
+// compile-time if they arrive here, and if the compiler is strict
+// about not taking the address of an rvalue.
+
+// This one detects ordinary mutable iterators - the result of
+// operator* is convertible to the value_type.
+template <class T>
+type_traits::yes_type is_mutable_iterator_helper(T const*, BOOST_DEDUCED_TYPENAME T::value_type*);
-# ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF
+// This one detects output iterators such as ostream_iterator which
+// return references to themselves.
+template <class T>
+type_traits::yes_type is_mutable_iterator_helper(T const*, T const*);
-no_type bad_category_helper(...);
-template <class C, class T> yes_type bad_category_helper(std::_DBG_iter<C,T>*);
+type_traits::no_type is_mutable_iterator_helper(...);
-template <bool has_bad_category_typedef> struct bad_category_select;
-template <>
-struct bad_category_select<true>
+template <class T>
+struct is_mutable_iterator_impl
{
- template <class Iterator>
- struct category { typedef typename Iterator::_Iterator_category type; };
+ static T t;
+
+ BOOST_STATIC_CONSTANT(bool, value = sizeof(
+ detail::is_mutable_iterator_helper((T*)0, &*t))
+ == sizeof(type_traits::yes_type)
+ );
};
-template <>
-struct bad_category_select<false>
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(
+ is_mutable_iterator,T,::boost::detail::is_mutable_iterator_impl<T>::value)
+
+
+// is_full_iterator_traits --
+//
+// A metafunction returning true iff T has all the requisite nested
+// types to satisfy the requirements for a fully-conforming
+// iterator_traits implementation.
+template <class T>
+struct is_full_iterator_traits_impl
{
- template <class Iterator>
- struct category { typedef typename Iterator::iterator_category type; };
+ enum { value =
+ has_value_type<T>::value
+ & has_reference<T>::value
+ & has_pointer<T>::value
+ & has_difference_type<T>::value
+ & has_iterator_category<T>::value
+ };
};
-template <class Iterator>
-struct iterator_category_select
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(
+ is_full_iterator_traits,T,::boost::detail::is_full_iterator_traits_impl<T>::value)
+
+
+# ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF
+BOOST_MPL_HAS_XXX_TRAIT_DEF(_Iterator_category)
+
+// is_stlport_40_debug_iterator --
+//
+// A metafunction returning true iff T has all the requisite nested
+// types to satisfy the requirements of an STLPort 4.0 debug iterator
+// iterator_traits implementation.
+template <class T>
+struct is_stlport_40_debug_iterator_impl
{
- private:
- static Iterator p;
- enum { has_bad_category
- = sizeof(bad_category_helper(&p)) == sizeof(yes_type) };
- typedef bad_category_select<has_bad_category> category_select;
- public:
- typedef typename category_select::template category<Iterator>::type type;
+ enum { value =
+ has_value_type<T>::value
+ & has_reference<T>::value
+ & has_pointer<T>::value
+ & has_difference_type<T>::value
+ & has__Iterator_category<T>::value
+ };
};
-# endif
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(
+ is_stlport_40_debug_iterator,T,::boost::detail::is_stlport_40_debug_iterator_impl<T>::value)
-# ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION
-template <bool is_bad_output_iterator> struct bad_output_iterator_select;
-template <>
-struct bad_output_iterator_select<true>
+template <class T>
+struct stlport_40_debug_iterator_traits
{
- template <class Iterator>
- struct non_category_traits {
- typedef void value_type;
- typedef void difference_type;
- typedef void pointer;
- typedef void reference;
- };
+ typedef typename T::value_type value_type;
+ typedef typename T::reference reference;
+ typedef typename T::pointer pointer;
+ typedef typename T::difference_type difference_type;
+ typedef typename T::_Iterator_category iterator_category;
};
-template <>
-struct bad_output_iterator_select<false>
+# endif // BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF
+
+template <class T> struct pointer_iterator_traits;
+
+# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+template <class T>
+struct pointer_iterator_traits<T*>
{
- template <class Iterator>
- struct non_category_traits {
- typedef typename Iterator::value_type value_type;
- typedef typename Iterator::difference_type difference_type;
- typedef typename Iterator::pointer pointer;
- typedef typename Iterator::reference reference;
- };
+ typedef remove_const<T>::type value_type;
+ typedef T* pointer;
+ typedef T& reference;
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef std::ptrdiff_t difference_type;
};
-# endif
+# else
+template <class Ptr>
+struct must_manually_specialize_boost_detail_iterator_traits;
-# if defined(BOOST_MSVC_STD_ITERATOR) && !defined(__SGI_STL_PORT)
+template <class T>
+struct pointer_iterator_traits
+{
+ typedef T pointer;
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef std::ptrdiff_t difference_type;
-// We'll sort iterator types into one of these classifications, from which we
-// can determine the difference_type, pointer, reference, and value_type
-enum {
- not_msvc_stdlib_iterator,
- msvc_stdlib_const_iterator,
- msvc_stdlib_mutable_iterator,
- msvc_stdlib_ostream_iterator
+ // Makes MSVC6 happy under some circumstances
+ typedef must_manually_specialize_boost_detail_iterator_traits<T> value_type;
+ typedef must_manually_specialize_boost_detail_iterator_traits<T> reference;
};
-
-template <unsigned> struct msvc_traits_select;
-template <> struct msvc_traits_select<not_msvc_stdlib_iterator>
+// Use this as a base class in manual iterator_traits specializations
+// for pointer types. T should be the value_type. CV should be the
+// cv-qualified value_type to which */& is added in order to produce
+// pointer/reference.
+template <class T, class CV = T>
+struct ptr_iter_traits
{
- template <class Iterator>
- struct traits_ // calling this "traits" will confuse VC.
- {
- typedef typename Iterator::difference_type difference_type;
- typedef typename Iterator::value_type value_type;
- typedef typename Iterator::pointer pointer;
- typedef typename Iterator::reference reference;
- };
+ typedef T value_type;
+ typedef CV* pointer;
+ typedef CV& reference;
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef std::ptrdiff_t difference_type;
};
+# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-template <> struct msvc_traits_select<msvc_stdlib_mutable_iterator>
+// We'll sort iterator types into one of these classifications, from which we
+// can determine the difference_type, pointer, reference, and value_type
+template <class Iterator>
+struct standard_iterator_traits
{
- template <class Iterator>
- struct traits_
- {
- typedef typename Iterator::distance_type difference_type;
- typedef typename Iterator::value_type value_type;
- typedef value_type* pointer;
- typedef value_type& reference;
- };
+ typedef typename Iterator::difference_type difference_type;
+ typedef typename Iterator::value_type value_type;
+ typedef typename Iterator::pointer pointer;
+ typedef typename Iterator::reference reference;
+ typedef typename Iterator::iterator_category iterator_category;
};
-template <> struct msvc_traits_select<msvc_stdlib_const_iterator>
+template <class Iterator>
+struct msvc_stdlib_mutable_traits
+ : std::iterator_traits<Iterator>
{
- template <class Iterator>
- struct traits_
- {
- typedef typename Iterator::distance_type difference_type;
- typedef typename Iterator::value_type value_type;
- typedef const value_type* pointer;
- typedef const value_type& reference;
- };
+ typedef typename std::iterator_traits<Iterator>::distance_type difference_type;
+ typedef value_type* pointer;
+ typedef value_type& reference;
};
-template <> struct msvc_traits_select<msvc_stdlib_ostream_iterator>
+template <class Iterator>
+struct msvc_stdlib_const_traits
+ : std::iterator_traits<Iterator>
{
- template <class Iterator>
- struct traits_
- {
- typedef typename Iterator::distance_type difference_type;
- typedef typename Iterator::value_type value_type;
- typedef void pointer;
- typedef void reference;
- };
+ typedef typename std::iterator_traits<Iterator>::distance_type difference_type;
+ typedef const value_type* pointer;
+ typedef const value_type& reference;
};
-// These functions allow us to detect which classification a given iterator type
-// falls into.
-
-// Is the iterator derived from std::iterator?
-no_type is_std_iterator_helper(...);
-template <class V, class D, class C>
-yes_type is_std_iterator_helper(const volatile std::iterator<V,D,C>*);
-
-// Is the iterator derived from boost::iterator?
-template <class C, class T, class D, class P, class R>
-yes_type is_boost_iterator_helper(const volatile boost::iterator<C,T,D,P,R>*);
-no_type is_boost_iterator_helper(...);
-
-// Is the iterator one of the known mutable container iterators?
-template<class K, class Ty, class Kfn, class Pr, class A>
-yes_type is_mutable_iterator_helper(const volatile typename std::_Tree<K,Ty,Kfn,Pr,A>::iterator*);
-template<class Ty, class A>
-yes_type is_mutable_iterator_helper(const volatile typename std::list<Ty,A>::iterator*);
-template<class Ty, class A>
-yes_type is_mutable_iterator_helper(const volatile typename std::deque<Ty,A>::iterator*);
-no_type is_mutable_iterator_helper(...);
-
-// Is the iterator an ostream_iterator?
-template<class T, class CharT, class Traits>
-yes_type is_ostream_iterator_helper(const volatile std::ostream_iterator<T,CharT,Traits>*);
-no_type is_ostream_iterator_helper(...);
+# ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION
+template <class Iterator>
+struct is_bad_output_iterator
+ : is_base_and_derived<
+ std::iterator<std::output_iterator_tag,void,void,void,void>
+ , Iterator>
+{
+};
-template <class T>
-struct msvc_iterator_classification {
- BOOST_STATIC_CONSTANT(unsigned,
- value = (sizeof(is_ostream_iterator_helper((T*)0)) == sizeof(yes_type))
- ? msvc_stdlib_ostream_iterator
- : (sizeof(is_mutable_iterator_helper((T*)0)) == sizeof(yes_type))
- ? msvc_stdlib_mutable_iterator
- : (sizeof(is_std_iterator_helper((T*)0)) == sizeof(yes_type)
- && sizeof(is_boost_iterator_helper((T*)0)) == sizeof(no_type))
- ? msvc_stdlib_const_iterator
- : not_msvc_stdlib_iterator
- );
+struct bad_output_iterator_traits
+{
+ typedef void value_type;
+ typedef void difference_type;
+ typedef std::output_iterator_tag iterator_category;
+ typedef void pointer;
+ typedef void reference;
};
# endif
-template <> struct iterator_traits_select<false>
+// If we're looking at an MSVC6 (old Dinkumware) ``standard''
+// iterator, this will generate an appropriate traits class.
+template <class Iterator>
+struct msvc_stdlib_iterator_traits
+ : mpl::if_<
+ is_mutable_iterator<Iterator>
+ , msvc_stdlib_mutable_traits<Iterator>
+ , msvc_stdlib_const_traits<Iterator>
+ >::type
+{};
+
+template <class Iterator>
+struct non_pointer_iterator_traits
+ : mpl::if_<
+ // if the iterator contains all the right nested types...
+ is_full_iterator_traits<Iterator>
+ // Use a standard iterator_traits implementation
+ , standard_iterator_traits<Iterator>
+# ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF
+ // Check for STLPort 4.0 broken _Iterator_category type
+ , mpl::if_<
+ is_stlport_40_debug_iterator<Iterator>
+ , stlport_40_debug_iterator_traits<Iterator>
+# endif
+ // Otherwise, assume it's a Dinkum iterator
+ , msvc_stdlib_iterator_traits<Iterator>
+# ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF
+ >::type
+# endif
+ >::type
{
- template <class Iterator>
- struct traits
- {
-# if defined(BOOST_MSVC_STD_ITERATOR) && !defined(__SGI_STL_PORT)
- typedef msvc_traits_select<(
- msvc_iterator_classification<Iterator>::value
- )>::template traits_<Iterator> inner_traits;
-
- typedef typename inner_traits::difference_type difference_type;
- typedef typename inner_traits::value_type value_type;
- typedef typename inner_traits::pointer pointer;
- typedef typename inner_traits::reference reference;
-# elif !defined(BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION)
- typedef typename Iterator::difference_type difference_type;
- typedef typename Iterator::value_type value_type;
- typedef typename Iterator::pointer pointer;
- typedef typename Iterator::reference reference;
-# else
- typedef bad_output_iterator_select<
- is_convertible<const volatile Iterator*,
- const volatile std::iterator<std::output_iterator_tag,void,void,void,void>*
- >::value> non_category_traits_select;
- typedef non_category_traits_select::template non_category_traits<Iterator> non_category_traits;
- public:
- typedef typename non_category_traits::value_type value_type;
- typedef typename non_category_traits::difference_type difference_type;
- typedef typename non_category_traits::pointer pointer;
- typedef typename non_category_traits::reference reference;
-# endif
-
-# if !defined(BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF)
- typedef typename Iterator::iterator_category iterator_category;
-# else
- typedef typename iterator_category_select<Iterator>::type iterator_category;
-# endif
- };
};
-} // namespace boost::detail::iterator_traits_
+template <class Iterator>
+struct iterator_traits_aux
+ : mpl::if_<
+ is_pointer<Iterator>
+ , pointer_iterator_traits<Iterator>
+ , non_pointer_iterator_traits<Iterator>
+ >::type
+{
+};
template <class Iterator>
struct iterator_traits
- : iterator_traits_::iterator_traits_select<is_pointer<Iterator>::value>::template traits<Iterator>
{
+ // Explicit forwarding from base class needed to keep MSVC6 happy
+ // under some circumstances.
private:
- typedef typename iterator_traits_::iterator_traits_select<
- is_pointer<remove_cv<Iterator>::type>::value>::template traits<Iterator> traits;
+# ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION
+ typedef
+ typename mpl::if_<
+ is_bad_output_iterator<Iterator>
+ , bad_output_iterator_traits
+ , iterator_traits_aux<Iterator>
+ >::type base;
+# else
+ typedef iterator_traits_aux<Iterator> base;
+# endif
public:
- // Why do I need to define these typedefs? It keeps MSVC happy somehow.
- // Why don't I need to define the other typedefs? Who knows?!?
- typedef typename traits::difference_type difference_type;
- typedef typename traits::iterator_category iterator_category;
+ typedef typename base::value_type value_type;
+ typedef typename base::pointer pointer;
+ typedef typename base::reference reference;
+ typedef typename base::difference_type difference_type;
+ typedef typename base::iterator_category iterator_category;
};
-namespace iterator_traits_ {
-
-template <class Category>
-struct distance_select {
- template <class Iterator>
- static typename ::boost::detail::iterator_traits<Iterator>::difference_type
- distance(Iterator i1, const Iterator i2)
- {
- typename ::boost::detail::iterator_traits<Iterator>::difference_type result = 0;
- while (i1 != i2)
- {
- ++i1;
- ++result;
- }
- return result;
- }
-};
-
-template <>
-struct distance_select<std::random_access_iterator_tag> {
- template <class Iterator>
- static typename ::boost::detail::iterator_traits<Iterator>::difference_type
- distance(const Iterator i1, const Iterator i2)
- {
- return i2 - i1;
- }
-};
+// This specialization cuts off ETI (Early Template Instantiation) for MSVC.
+template <> struct iterator_traits<int>{};
+namespace iterator_traits_
+{
+ template <class Iterator, class Difference>
+ struct distance_select
+ {
+ static Difference execute(Iterator i1, const Iterator i2, ...)
+ {
+ typename Difference result = 0;
+ while (i1 != i2)
+ {
+ ++i1;
+ ++result;
+ }
+ return result;
+ }
+
+ static Difference execute(Iterator i1, const Iterator i2, std::random_access_iterator_tag*)
+ {
+ return i2 - i1;
+ }
+ };
} // namespace boost::detail::iterator_traits_
template <class Iterator>
-inline typename ::boost::detail::iterator_traits<Iterator>::difference_type
-distance(const Iterator& first, const Iterator& last)
+inline typename iterator_traits<Iterator>::difference_type
+distance(Iterator first, Iterator last)
{
+ typedef typename iterator_traits<Iterator>::difference_type diff_t;
typedef typename ::boost::detail::iterator_traits<Iterator>::iterator_category iterator_category;
- return iterator_traits_::distance_select<iterator_category>::distance(first, last);
+
+ return iterator_traits_::distance_select<Iterator,diff_t>::execute(
+ first, last, (iterator_category*)0);
}
# endif // workarounds
# define BOOST_LWM_USE_PTHREADS
# include <boost/detail/lwm_pthreads.hpp>
#else
-# include <boost/detail/lwm_nop.hpp>
+// Use #define BOOST_DISABLE_THREADS to avoid the error
+# error Unrecognized threading platform
#endif
#endif // #ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
//
// boost/detail/lwm_win32.hpp
//
-// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+// Copyright (c) 2002, 2003 Peter Dimov
//
// Permission to copy, use, modify, sell and distribute this software
// is granted provided this copyright notice appears in all copies.
// warranty, and with no claim as to its suitability for any purpose.
//
-#include <boost/detail/winapi.hpp>
+#ifdef BOOST_USE_WINDOWS_H
+# include <windows.h>
+#endif
#ifdef __BORLANDC__
# pragma warn -8027 // Functions containing while are not expanded inline
namespace detail
{
+#ifndef BOOST_USE_WINDOWS_H
+
+#ifdef _WIN64
+
+// Intel 6.0 on Win64 version, posted by Tim Fenders to [boost-users]
+
+extern "C" long_type __cdecl _InterlockedExchange(long volatile *, long);
+
+#pragma intrinsic(_InterlockedExchange)
+
+inline long InterlockedExchange(long volatile* lp, long l)
+{
+ return _InterlockedExchange(lp, l);
+}
+
+#else // _WIN64
+
+extern "C" __declspec(dllimport) long __stdcall InterlockedExchange(long volatile *, long);
+
+#endif // _WIN64
+
+extern "C" __declspec(dllimport) void __stdcall Sleep(unsigned long);
+
+#endif // #ifndef BOOST_USE_WINDOWS_H
+
class lightweight_mutex
{
private:
explicit scoped_lock(lightweight_mutex & m): m_(m)
{
- while( winapi::InterlockedExchange(&m_.l_, 1) )
+ while( InterlockedExchange(&m_.l_, 1) )
{
// Note: changed to Sleep(1) from Sleep(0).
// According to MSDN, Sleep(0) will never yield
// to a lower-priority thread, whereas Sleep(1)
// will. Performance seems not to be affected.
- winapi::Sleep(1);
+ Sleep(1);
}
}
~scoped_lock()
{
- winapi::InterlockedExchange(&m_.l_, 0);
+ InterlockedExchange(&m_.l_, 0);
// Note: adding a yield here will make
// the spinlock more fair and will increase the overall
//
// boost/detail/lwm_win32_cs.hpp
//
-// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+// Copyright (c) 2002, 2003 Peter Dimov
//
// Permission to copy, use, modify, sell and distribute this software
// is granted provided this copyright notice appears in all copies.
// warranty, and with no claim as to its suitability for any purpose.
//
-#include <boost/detail/winapi.hpp>
+#ifdef BOOST_USE_WINDOWS_H
+# include <windows.h>
+#endif
namespace boost
{
namespace detail
{
+#ifndef BOOST_USE_WINDOWS_H
+
+struct CRITICAL_SECTION
+{
+ struct critical_section_debug * DebugInfo;
+ long LockCount;
+ long RecursionCount;
+ void * OwningThread;
+ void * LockSemaphore;
+#if defined(_WIN64)
+ unsigned __int64 SpinCount;
+#else
+ unsigned long SpinCount;
+#endif
+};
+
+extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(CRITICAL_SECTION *);
+extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(CRITICAL_SECTION *);
+extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(CRITICAL_SECTION *);
+extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(CRITICAL_SECTION *);
+
+#endif // #ifndef BOOST_USE_WINDOWS_H
+
class lightweight_mutex
{
private:
- winapi::critical_section cs_;
+ CRITICAL_SECTION cs_;
lightweight_mutex(lightweight_mutex const &);
lightweight_mutex & operator=(lightweight_mutex const &);
lightweight_mutex()
{
- winapi::InitializeCriticalSection(&cs_);
+ InitializeCriticalSection(&cs_);
}
~lightweight_mutex()
{
- winapi::DeleteCriticalSection(&cs_);
+ DeleteCriticalSection(&cs_);
}
class scoped_lock;
explicit scoped_lock(lightweight_mutex & m): m_(m)
{
- winapi::EnterCriticalSection(&m_.cs_);
+ EnterCriticalSection(&m_.cs_);
}
~scoped_lock()
{
- winapi::LeaveCriticalSection(&m_.cs_);
+ LeaveCriticalSection(&m_.cs_);
}
};
};
//
// detail/shared_count.hpp
//
-// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
//
// Permission to copy, use, modify, sell and distribute this software
// is granted provided this copyright notice appears in all copies.
#include <boost/config.hpp>
-#ifndef BOOST_NO_AUTO_PTR
-# include <memory>
+#if defined(BOOST_SP_USE_STD_ALLOCATOR) && defined(BOOST_SP_USE_QUICK_ALLOCATOR)
+# error BOOST_SP_USE_STD_ALLOCATOR and BOOST_SP_USE_QUICK_ALLOCATOR are incompatible.
#endif
#include <boost/checked_delete.hpp>
#include <boost/throw_exception.hpp>
#include <boost/detail/lightweight_mutex.hpp>
-#include <functional> // for std::less
-#include <exception> // for std::exception
-#include <new> // for std::bad_alloc
+#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
+#include <boost/detail/quick_allocator.hpp>
+#endif
+
+#include <memory> // std::auto_ptr, std::allocator
+#include <functional> // std::less
+#include <exception> // std::exception
+#include <new> // std::bad_alloc
+#include <typeinfo> // std::type_info in get_deleter
+#include <cstddef> // std::size_t
#ifdef __BORLANDC__
# pragma warn -8026 // Functions with excep. spec. are not expanded inline
namespace boost
{
+// Debug hooks
+
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+
+void sp_scalar_constructor_hook(void * px, std::size_t size, void * pn);
+void sp_array_constructor_hook(void * px);
+void sp_scalar_destructor_hook(void * px, std::size_t size, void * pn);
+void sp_array_destructor_hook(void * px);
+
+#endif
+
+
// The standard library that comes with Borland C++ 5.5.1
// defines std::exception and its members as having C calling
-// convention (-pc). When the definition of use_count_is_zero
+// convention (-pc). When the definition of bad_weak_ptr
// is compiled with -ps, the compiler issues an error.
// Hence, the temporary #pragma option -pc below. The version
// check is deliberately conservative.
# pragma option push -pc
#endif
-class use_count_is_zero: public std::exception
+class bad_weak_ptr: public std::exception
{
public:
virtual char const * what() const throw()
{
- return "boost::use_count_is_zero";
+ return "boost::bad_weak_ptr";
}
};
# pragma option pop
#endif
-class counted_base
+namespace detail
+{
+
+class sp_counted_base
{
private:
public:
- counted_base():
- use_count_(0), weak_count_(0)
- {
- }
-
- // pre: initial_use_count <= initial_weak_count
-
- explicit counted_base(long initial_use_count, long initial_weak_count):
- use_count_(initial_use_count), weak_count_(initial_weak_count)
+ sp_counted_base(): use_count_(1), weak_count_(1)
{
}
- virtual ~counted_base() // nothrow
+ virtual ~sp_counted_base() // nothrow
{
}
// dispose() is called when use_count_ drops to zero, to release
// the resources managed by *this.
- //
- // counted_base doesn't manage any resources except itself, and
- // the default implementation is a no-op.
- //
- // dispose() is not pure virtual since weak_ptr instantiates a
- // counted_base in its default constructor.
- virtual void dispose() // nothrow
- {
- }
+ virtual void dispose() = 0; // nothrow
// destruct() is called when weak_count_ drops to zero.
delete this;
}
+ virtual void * get_deleter(std::type_info const & ti) = 0;
+
void add_ref()
{
-#ifdef BOOST_HAS_THREADS
+#if defined(BOOST_HAS_THREADS)
mutex_type::scoped_lock lock(mtx_);
#endif
- if(use_count_ == 0 && weak_count_ != 0) boost::throw_exception(boost::use_count_is_zero());
+ if(use_count_ == 0 && weak_count_ != 0) boost::throw_exception(boost::bad_weak_ptr());
++use_count_;
++weak_count_;
}
void release() // nothrow
{
- long new_use_count;
- long new_weak_count;
-
{
-#ifdef BOOST_HAS_THREADS
+#if defined(BOOST_HAS_THREADS)
mutex_type::scoped_lock lock(mtx_);
#endif
- new_use_count = --use_count_;
- new_weak_count = --weak_count_;
- }
+ long new_use_count = --use_count_;
- if(new_use_count == 0)
- {
- dispose();
+ if(new_use_count != 0)
+ {
+ --weak_count_;
+ return;
+ }
}
- if(new_weak_count == 0)
- {
- destruct();
- }
+ dispose();
+ weak_release();
}
void weak_add_ref() // nothrow
{
-#ifdef BOOST_HAS_THREADS
+#if defined(BOOST_HAS_THREADS)
mutex_type::scoped_lock lock(mtx_);
#endif
++weak_count_;
long new_weak_count;
{
-#ifdef BOOST_HAS_THREADS
+#if defined(BOOST_HAS_THREADS)
mutex_type::scoped_lock lock(mtx_);
#endif
new_weak_count = --weak_count_;
long use_count() const // nothrow
{
-#ifdef BOOST_HAS_THREADS
+#if defined(BOOST_HAS_THREADS)
mutex_type::scoped_lock lock(mtx_);
#endif
return use_count_;
private:
- counted_base(counted_base const &);
- counted_base & operator= (counted_base const &);
+ sp_counted_base(sp_counted_base const &);
+ sp_counted_base & operator= (sp_counted_base const &);
// inv: use_count_ <= weak_count_
long use_count_;
long weak_count_;
-#ifdef BOOST_HAS_THREADS
+#if defined(BOOST_HAS_THREADS)
mutable mutex_type mtx_;
#endif
};
-inline void intrusive_ptr_add_ref(counted_base * p)
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+
+template<class T> void cbi_call_constructor_hook(sp_counted_base * pn, T * px, checked_deleter<T> const &, int)
{
- p->add_ref();
+ boost::sp_scalar_constructor_hook(px, sizeof(T), pn);
}
-inline void intrusive_ptr_release(counted_base * p)
+template<class T> void cbi_call_constructor_hook(sp_counted_base *, T * px, checked_array_deleter<T> const &, int)
{
- p->release();
+ boost::sp_array_constructor_hook(px);
}
-namespace detail
+template<class P, class D> void cbi_call_constructor_hook(sp_counted_base *, P const &, D const &, long)
+{
+}
+
+template<class T> void cbi_call_destructor_hook(sp_counted_base * pn, T * px, checked_deleter<T> const &, int)
+{
+ boost::sp_scalar_destructor_hook(px, sizeof(T), pn);
+}
+
+template<class T> void cbi_call_destructor_hook(sp_counted_base *, T * px, checked_array_deleter<T> const &, int)
+{
+ boost::sp_array_destructor_hook(px);
+}
+
+template<class P, class D> void cbi_call_destructor_hook(sp_counted_base *, P const &, D const &, long)
{
+}
+
+#endif
//
// Borland's Codeguard trips up over the -Vx- option here:
//
#ifdef __CODEGUARD__
-#pragma option push -Vx-
+# pragma option push -Vx-
#endif
-template<class P, class D> class counted_base_impl: public counted_base
+template<class P, class D> class sp_counted_base_impl: public sp_counted_base
{
private:
P ptr; // copy constructor must not throw
D del; // copy constructor must not throw
- counted_base_impl(counted_base_impl const &);
- counted_base_impl & operator= (counted_base_impl const &);
+ sp_counted_base_impl(sp_counted_base_impl const &);
+ sp_counted_base_impl & operator= (sp_counted_base_impl const &);
+
+ typedef sp_counted_base_impl<P, D> this_type;
public:
// pre: initial_use_count <= initial_weak_count, d(p) must not throw
- counted_base_impl(P p, D d, long initial_use_count, long initial_weak_count):
- counted_base(initial_use_count, initial_weak_count), ptr(p), del(d)
+ sp_counted_base_impl(P p, D d): ptr(p), del(d)
{
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ detail::cbi_call_constructor_hook(this, p, d, 0);
+#endif
}
virtual void dispose() // nothrow
{
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ detail::cbi_call_destructor_hook(this, ptr, del, 0);
+#endif
del(ptr);
}
+
+ virtual void * get_deleter(std::type_info const & ti)
+ {
+ return ti == typeid(D)? &del: 0;
+ }
+
+#if defined(BOOST_SP_USE_STD_ALLOCATOR)
+
+ void * operator new(std::size_t)
+ {
+ return std::allocator<this_type>().allocate(1, static_cast<this_type *>(0));
+ }
+
+ void operator delete(void * p)
+ {
+ std::allocator<this_type>().deallocate(static_cast<this_type *>(p), 1);
+ }
+
+#endif
+
+#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
+
+ void * operator new(std::size_t)
+ {
+ return quick_allocator<this_type>::alloc();
+ }
+
+ void operator delete(void * p)
+ {
+ quick_allocator<this_type>::dealloc(p);
+ }
+
+#endif
};
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+
+int const shared_count_id = 0x2C35F101;
+int const weak_count_id = 0x298C38A4;
+
+#endif
+
class weak_count;
class shared_count
{
private:
- counted_base * pi_;
+ sp_counted_base * pi_;
- friend class weak_count;
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ int id_;
+#endif
- template<class P, class D> shared_count(P, D, counted_base const *);
+ friend class weak_count;
public:
- shared_count(): pi_(new counted_base(1, 1))
- {
- }
-
- explicit shared_count(counted_base * pi): pi_(pi) // never throws
+ shared_count(): pi_(0) // nothrow
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
{
- pi_->add_ref();
}
- template<class P, class D> shared_count(P p, D d, void const * = 0): pi_(0)
+ template<class P, class D> shared_count(P p, D d): pi_(0)
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
{
#ifndef BOOST_NO_EXCEPTIONS
try
{
- pi_ = new counted_base_impl<P, D>(p, d, 1, 1);
+ pi_ = new sp_counted_base_impl<P, D>(p, d);
}
catch(...)
{
#else
- pi_ = new counted_base_impl<P, D>(p, d, 1, 1);
+ pi_ = new sp_counted_base_impl<P, D>(p, d);
if(pi_ == 0)
{
#endif
}
- template<class P, class D> shared_count(P, D, counted_base * pi): pi_(pi)
- {
- pi_->add_ref();
- }
-
#ifndef BOOST_NO_AUTO_PTR
// auto_ptr<Y> is special cased to provide the strong guarantee
- template<typename Y>
- explicit shared_count(std::auto_ptr<Y> & r): pi_(new counted_base_impl< Y *, checked_deleter<Y> >(r.get(), checked_deleter<Y>(), 1, 1))
+ template<class Y>
+ explicit shared_count(std::auto_ptr<Y> & r): pi_(new sp_counted_base_impl< Y *, checked_deleter<Y> >(r.get(), checked_deleter<Y>()))
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
{
r.release();
}
~shared_count() // nothrow
{
- pi_->release();
+ if(pi_ != 0) pi_->release();
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ id_ = 0;
+#endif
}
shared_count(shared_count const & r): pi_(r.pi_) // nothrow
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
{
- pi_->add_ref();
+ if(pi_ != 0) pi_->add_ref();
}
- explicit shared_count(weak_count const & r); // throws use_count_is_zero when r.use_count() == 0
+ explicit shared_count(weak_count const & r); // throws bad_weak_ptr when r.use_count() == 0
shared_count & operator= (shared_count const & r) // nothrow
{
- counted_base * tmp = r.pi_;
- tmp->add_ref();
- pi_->release();
+ sp_counted_base * tmp = r.pi_;
+ if(tmp != 0) tmp->add_ref();
+ if(pi_ != 0) pi_->release();
pi_ = tmp;
return *this;
void swap(shared_count & r) // nothrow
{
- counted_base * tmp = r.pi_;
+ sp_counted_base * tmp = r.pi_;
r.pi_ = pi_;
pi_ = tmp;
}
long use_count() const // nothrow
{
- return pi_->use_count();
+ return pi_ != 0? pi_->use_count(): 0;
}
bool unique() const // nothrow
{
- return pi_->use_count() == 1;
+ return use_count() == 1;
}
friend inline bool operator==(shared_count const & a, shared_count const & b)
friend inline bool operator<(shared_count const & a, shared_count const & b)
{
- return std::less<counted_base *>()(a.pi_, b.pi_);
+ return std::less<sp_counted_base *>()(a.pi_, b.pi_);
+ }
+
+ void * get_deleter(std::type_info const & ti) const
+ {
+ return pi_? pi_->get_deleter(ti): 0;
}
};
#ifdef __CODEGUARD__
-#pragma option pop
+# pragma option pop
#endif
{
private:
- counted_base * pi_;
+ sp_counted_base * pi_;
+
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ int id_;
+#endif
friend class shared_count;
public:
- weak_count(): pi_(new counted_base(0, 1)) // can throw
+ weak_count(): pi_(0) // nothrow
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(weak_count_id)
+#endif
{
}
weak_count(shared_count const & r): pi_(r.pi_) // nothrow
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
{
- pi_->weak_add_ref();
+ if(pi_ != 0) pi_->weak_add_ref();
}
weak_count(weak_count const & r): pi_(r.pi_) // nothrow
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
{
- pi_->weak_add_ref();
+ if(pi_ != 0) pi_->weak_add_ref();
}
~weak_count() // nothrow
{
- pi_->weak_release();
+ if(pi_ != 0) pi_->weak_release();
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ id_ = 0;
+#endif
}
weak_count & operator= (shared_count const & r) // nothrow
{
- counted_base * tmp = r.pi_;
- tmp->weak_add_ref();
- pi_->weak_release();
+ sp_counted_base * tmp = r.pi_;
+ if(tmp != 0) tmp->weak_add_ref();
+ if(pi_ != 0) pi_->weak_release();
pi_ = tmp;
return *this;
weak_count & operator= (weak_count const & r) // nothrow
{
- counted_base * tmp = r.pi_;
- tmp->weak_add_ref();
- pi_->weak_release();
+ sp_counted_base * tmp = r.pi_;
+ if(tmp != 0) tmp->weak_add_ref();
+ if(pi_ != 0) pi_->weak_release();
pi_ = tmp;
return *this;
void swap(weak_count & r) // nothrow
{
- counted_base * tmp = r.pi_;
+ sp_counted_base * tmp = r.pi_;
r.pi_ = pi_;
pi_ = tmp;
}
long use_count() const // nothrow
{
- return pi_->use_count();
+ return pi_ != 0? pi_->use_count(): 0;
}
friend inline bool operator==(weak_count const & a, weak_count const & b)
friend inline bool operator<(weak_count const & a, weak_count const & b)
{
- return std::less<counted_base *>()(a.pi_, b.pi_);
+ return std::less<sp_counted_base *>()(a.pi_, b.pi_);
}
};
inline shared_count::shared_count(weak_count const & r): pi_(r.pi_)
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
{
- pi_->add_ref();
+ if(pi_ != 0)
+ {
+ pi_->add_ref();
+ }
+ else
+ {
+ boost::throw_exception(boost::bad_weak_ptr());
+ }
}
} // namespace detail
+++ /dev/null
-#ifndef BOOST_DETAIL_WINAPI_HPP_INCLUDED
-#define BOOST_DETAIL_WINAPI_HPP_INCLUDED
-
-#if _MSC_VER >= 1020
-#pragma once
-#endif
-
-//
-// boost/detail/winapi.hpp - a lightweight version of <windows.h>
-//
-// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
-//
-// Permission to copy, use, modify, sell and distribute this software
-// is granted provided this copyright notice appears in all copies.
-// This software is provided "as is" without express or implied
-// warranty, and with no claim as to its suitability for any purpose.
-//
-
-namespace boost
-{
-
-namespace detail
-{
-
-namespace winapi
-{
-
-typedef long long_type;
-typedef unsigned long dword_type;
-typedef void * handle_type;
-
-#if defined(_WIN64)
-
-typedef __int64 int_ptr_type;
-typedef unsigned __int64 uint_ptr_type;
-typedef __int64 long_ptr_type;
-typedef unsigned __int64 ulong_ptr_type;
-
-#else
-
-typedef int int_ptr_type;
-typedef unsigned int uint_ptr_type;
-typedef long long_ptr_type;
-typedef unsigned long ulong_ptr_type;
-
-#endif
-
-struct critical_section
-{
- struct critical_section_debug * DebugInfo;
- long_type LockCount;
- long_type RecursionCount;
- handle_type OwningThread;
- handle_type LockSemaphore;
- ulong_ptr_type SpinCount;
-};
-
-#if defined(_WIN64)
-
-// Intel 6.0 on Win64 version, posted by Tim Fenders to [boost-users]
-
-extern "C" long_type __cdecl _InterlockedIncrement(long_type volatile *);
-extern "C" long_type __cdecl _InterlockedDecrement(long_type volatile *);
-extern "C" long_type __cdecl _InterlockedExchange(long_type volatile *, long_type);
-
-#pragma intrinsic(_InterlockedIncrement)
-#pragma intrinsic(_InterlockedDecrement)
-#pragma intrinsic(_InterlockedExchange)
-
-inline long_type InterlockedIncrement(long_type volatile * lp)
-{
- return _InterlockedIncrement(lp);
-}
-
-inline long_type InterlockedDecrement(long_type volatile* lp)
-{
- return _InterlockedDecrement(lp);
-}
-
-inline long_type InterlockedExchange(long_type volatile* lp, long_type l)
-{
- return _InterlockedExchange(lp, l);
-}
-
-#else
-
-extern "C" __declspec(dllimport) long_type __stdcall InterlockedIncrement(long_type volatile *);
-extern "C" __declspec(dllimport) long_type __stdcall InterlockedDecrement(long_type volatile *);
-extern "C" __declspec(dllimport) long_type __stdcall InterlockedExchange(long_type volatile *, long_type);
-
-#endif
-
-extern "C" __declspec(dllimport) void __stdcall Sleep(dword_type);
-
-extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(critical_section *);
-extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(critical_section *);
-extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(critical_section *);
-extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(critical_section *);
-
-} // namespace winapi
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_DETAIL_WINAPI_HPP_INCLUDED
--- /dev/null
+// Copyright David Abrahams 2002. Permission to copy, use,
+// modify, sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+#ifndef WORKAROUND_DWA2002126_HPP
+# define WORKAROUND_DWA2002126_HPP
+
+// Compiler/library version workaround macro
+//
+// Usage:
+//
+// #if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
+// ... // workaround code here
+// #endif
+//
+// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the
+// first argument must be undefined or expand to a numeric
+// value. The above expands to:
+//
+// (BOOST_MSVC) != 0 && (BOOST_MSVC) <= 1200
+//
+// When used for workarounds on the latest known version of a
+// compiler, the following convention should be observed:
+//
+// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301))
+//
+// The version number in this case corresponds to the last version in
+// which the workaround was known to have been required. It only has
+// value as a comment unless BOOST_DETECT_OUTDATED_WORKAROUNDS is
+// defined, in which case a compiler warning or error will be issued
+// when the compiler version exceeds the argument to BOOST_TESTED_AT
+
+# ifndef BOOST_STRICT_CONFIG
+
+# define BOOST_WORKAROUND(symbol, test) \
+ ((symbol != 0) && (1 % (( (symbol test) ) + 1)))
+// ^ ^ ^ ^
+// The extra level of parenthesis nesting above, along with the
+// BOOST_OPEN_PAREN indirection below, is required to satisfy the
+// broken preprocessor in MWCW 8.3 and earlier.
+//
+// The basic mechanism works as follows:
+// (symbol test) + 1 => 2 if the test passes, 1 otherwise
+// 1 % ((symbol test) + 1) => 1 if the test passes, 0 otherwise
+//
+// The complication with % is for cooperation with BOOST_TESTED_AT().
+// When "test" is BOOST_TESTED_AT(x) and
+// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined,
+//
+// symbol test => 1 if symbol <= x, -1 otherwise
+// (symbol test) + 1 => 2 if symbol <= x, 0 otherwise
+// 1 % ((symbol test) + 1) => 1 if symbol <= x, zero divide otherwise
+//
+
+# ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS
+# define BOOST_OPEN_PAREN (
+# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1
+# else
+# define BOOST_TESTED_AT(value) != 0
+# endif
+
+# else
+
+# define BOOST_WORKAROUND(symbol, test) 0
+
+# endif
+
+#endif // WORKAROUND_DWA2002126_HPP
#include <vector>
#include <string>
#include <sstream>
-#include <ostream>
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
-#include "boost/config.hpp"
-#include "boost/format/format_config.hpp"
+#ifndef BOOST_NO_STD_LOCALE
+#include <locale>
+#endif
+
+
+// make sure our local macros wont override something :
+#if defined(BOOST_NO_LOCALE_ISDIGIT) || defined(BOOST_OVERLOAD_FOR_NON_CONST) \
+ || defined(BOOST_IO_STD) || defined( BOOST_IO_NEEDS_USING_DECLARATION )
+#error "a local macro would overwrite a previously defined macro"
+#endif
+
+
+#include <boost/format/macros_stlport.hpp> // stlport workarounds
+#include <boost/format/macros_default.hpp>
+
+#if defined(BOOST_NO_STD_LOCALE) || ( BOOST_WORKAROUND(__BORLANDC__, <= 0x561) \
+ && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT( 0x570 ) ) )
+#define BOOST_BAD_ISDIGIT
+#endif
-#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
-#define BOOST_OVERLOAD_FOR_NON_CONST
+#ifdef BOOST_BAD_ISDIGIT
+#include <cctype> // we'll use the non-locale <cctype>'s std::isdigit(int)
+#endif
+
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570) ) || BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1300))
+#define BOOST_NO_OVERLOAD_FOR_NON_CONST
#endif
// **** Forward declarations ----------------------------------
-#include "boost/format/format_fwd.hpp" // basic_format<Ch,Tr>, and other frontends
-#include "boost/format/internals_fwd.hpp" // misc forward declarations for internal use
+#include <boost/format/format_fwd.hpp> // basic_format<Ch,Tr>, and other frontends
+#include <boost/format/internals_fwd.hpp> // misc forward declarations for internal use
// **** Auxiliary structs (stream_format_state<Ch,Tr> , and format_item<Ch,Tr> )
-#include "boost/format/internals.hpp"
+#include <boost/format/internals.hpp>
// **** Format class interface --------------------------------
-#include "boost/format/format_class.hpp"
+#include <boost/format/format_class.hpp>
// **** Exceptions -----------------------------------------------
-#include "boost/format/exceptions.hpp"
+#include <boost/format/exceptions.hpp>
// **** Implementation -------------------------------------------
-#include "boost/format/format_implementation.hpp" // member functions
+#include <boost/format/format_implementation.hpp> // member functions
-#include "boost/format/group.hpp" // class for grouping arguments
+#include <boost/format/group.hpp> // class for grouping arguments
-#include "boost/format/feed_args.hpp" // argument-feeding functions
-#include "boost/format/parsing.hpp" // format-string parsing (member-)functions
+#include <boost/format/feed_args.hpp> // argument-feeding functions
+#include <boost/format/parsing.hpp> // format-string parsing (member-)functions
// **** Implementation of the free functions ----------------------
-#include "boost/format/free_funcs.hpp"
+#include <boost/format/free_funcs.hpp>
-#ifdef BOOST_OVERLOAD_FOR_NON_CONST
-#undef BOOST_OVERLOAD_FOR_NON_CONST
-#endif
+// *** Undefine 'local' macros :
+#ifdef BOOST_NO_OVERLOAD_FOR_NON_CONST
+#undef BOOST_NO_OVERLOAD_FOR_NON_CONST
+#endif
+#ifdef BOOST_BAD_ISDIGIT
+#undef BOOST_BAD_ISDIGIT
+#endif
+#ifdef BOOST_IO_STD
+#undef BOOST_IO_STD
+#endif
+#ifdef BOOST_IO_NEEDS_USING_DECLARATION
+#undef BOOST_IO_NEEDS_USING_DECLARATION
+#endif
#endif // BOOST_FORMAT_HPP
// and Karl Nelson's ofstream
// ----------------------------------------------------------------------------
-// feed_args.hpp : functions for processing each argument
+// feed_args.hpp : functions for processing each argument
// (feed, feed_manip, and distribute)
// ----------------------------------------------------------------------------
namespace boost {
namespace io {
namespace detail {
-namespace {
+namespace {
template<class Tr, class Ch> inline
- void empty_buf(BOOST_IO_STD basic_ostringstream<Ch,Tr> & os) {
- static const std::basic_string<Ch, Tr> emptyStr; // avoids 2 cases ( "" and L"" )
- os.str(emptyStr);
+ void empty_buf(BOOST_IO_STD basic_ostringstream<Ch,Tr> & os) {
+ static const std::basic_string<Ch, Tr> emptyStr;
+ os.str(emptyStr);
}
template<class Ch, class Tr>
- void do_fill( std::basic_string<Ch,Tr> & s,
- std::streamsize w,
- const Ch c,
- std::ios_base::fmtflags f,
- bool center)
+ void do_pad( std::basic_string<Ch,Tr> & s,
+ std::streamsize w,
+ const Ch c,
+ std::ios_base::fmtflags f,
+ bool center)
+ // applies centered / left / right padding to the string s.
+ // Effects : string s is padded.
{
std::streamsize n=w-s.size();
if(n<=0) {
return;
}
- if(center)
+ if(center)
{
- s.reserve(w); // allocate once for the 2 inserts
- const std::streamsize n1 = n /2, n0 = n - n1;
- s.insert(s.begin(), n0, c);
- s.append(n1, c);
- }
- else
+ s.reserve(w); // allocate once for the 2 inserts
+ const std::streamsize n1 = n /2, n0 = n - n1;
+ s.insert(s.begin(), n0, c);
+ s.append(n1, c);
+ }
+ else
{
- if(f & std::ios_base::left) {
- s.append(n, c);
- }
- else {
- s.insert(s.begin(), n, c);
- }
+ if(f & std::ios_base::left) {
+ s.append(n, c);
+ }
+ else {
+ s.insert(s.begin(), n, c);
+ }
}
- } // -do_fill(..)
+ } // -do_pad(..)
-#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
+#if BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT(1300))
+// MSVC needs to be tricked to disambiguate this simple overload..
+// the trick is in "boost/format/msvc_disambiguater.hpp"
+
+ template< class Ch, class Tr, class T> inline
+ void put_head( BOOST_IO_STD basic_ostream<Ch, Tr>& os, const T& x ) {
+ disambiguater<Ch, Tr, T>::put_head(os, x, 1L);
+ }
+ template< class Ch, class Tr, class T> inline
+ void put_last( BOOST_IO_STD basic_ostream<Ch, Tr>& os, const T& x ) {
+ disambiguater<Ch, Tr, T>::put_last(os, x, 1L);
+ }
+
+#else
+
template< class Ch, class Tr, class T> inline
void put_head(BOOST_IO_STD basic_ostream<Ch, Tr>& , const T& ) {
}
os << group_last(x.a1_); // this selects the last element
}
-#ifdef BOOST_OVERLOAD_FOR_NON_CONST
+#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST
template< class Ch, class Tr, class T> inline
void put_head( BOOST_IO_STD basic_ostream<Ch, Tr>& , T& ) {
}
os << x ;
}
#endif
-
-#else // MSVC needs to be tricked to disambiguate this simple overload..
- // the trick is in "boost/format/msvc_disambiguater.hpp"
-
- template< class Ch, class Tr, class T> inline
- void put_head( BOOST_IO_STD basic_ostream<Ch, Tr>& os, const T& x ) {
- disambiguater<Ch, Tr, T>::put_head(os, x, 1L);
- }
- template< class Ch, class Tr, class T> inline
- void put_last( BOOST_IO_STD basic_ostream<Ch, Tr>& os, const T& x ) {
- disambiguater<Ch, Tr, T>::put_last(os, x, 1L);
- }
-
#endif // -msvc workaround
+
+template< class Ch, class Tr, class T>
+void put( T x,
+ const format_item<Ch, Tr>& specs,
+ std::basic_string<Ch, Tr> & res,
+ BOOST_IO_STD basic_ostringstream<Ch, Tr>& oss_ )
+{
+ // does the actual conversion of x, with given params, into a string
+ // using the *supplied* strinstream. (the stream state is important)
+
+ typedef std::basic_string<Ch, Tr> string_t;
+ typedef format_item<Ch, Tr> format_item_t;
+
+ stream_format_state<Ch, Tr> prev_state(oss_);
+
+ specs.state_.apply_on(oss_);
+
+ // in case x is a group, apply the manip part of it,
+ // in order to find width
+ put_head( oss_, x );
+ empty_buf( oss_);
+
+ const std::streamsize w=oss_.width();
+ const std::ios_base::fmtflags fl=oss_.flags();
+ const bool internal = (fl & std::ios_base::internal) != 0;
+ const bool two_stepped_padding = internal
+ && ! ( specs.pad_scheme_ & format_item_t::spacepad )
+ && specs.truncate_ < 0 ;
+
+
+ if(! two_stepped_padding)
+ {
+ if(w>0) // handle simple padding via do_pad, not natively in stream
+ oss_.width(0);
+ put_last( oss_, x);
+ res = oss_.str();
+
+ if (specs.truncate_ >= 0)
+ res.erase(specs.truncate_);
+
+ // complex pads :
+ if(specs.pad_scheme_ & format_item_t::spacepad)
+ {
+ if( res.size()==0 || ( res[0]!='+' && res[0]!='-' ))
+ {
+ res.insert(res.begin(), 1, ' '); // insert 1 space at pos 0
+ }
+ }
+ if(w > 0) // need do_pad
+ {
+ do_pad(res,w,oss_.fill(), fl, (specs.pad_scheme_ & format_item_t::centered) !=0 );
+ }
+ }
+ else // 2-stepped padding
+ {
+ put_last( oss_, x); // oss_.width() may result in padding.
+ res = oss_.str();
+
+ if (specs.truncate_ >= 0)
+ res.erase(specs.truncate_);
+
+ if( res.size() - w > 0)
+ { // length w exceeded
+ // either it was multi-output with first output padding up all width..
+ // either it was one big arg and we are fine.
+ empty_buf( oss_);
+ oss_.width(0);
+ put_last(oss_, x );
+ string_t tmp = oss_.str(); // minimal-length output
+ std::streamsize d;
+ if( (d=w - tmp.size()) <=0 )
+ {
+ // minimal length is already >= w, so no padding (cool!)
+ res.swap(tmp);
+ }
+ else
+ { // hum.. we need to pad (it was necessarily multi-output)
+ typedef typename string_t::size_type size_type;
+ size_type i = 0;
+ while( i<tmp.size() && tmp[i] == res[i] ) // find where we should pad.
+ ++i;
+ tmp.insert(i, static_cast<size_type>( d ), oss_.fill());
+ res.swap( tmp );
+ }
+ }
+ else
+ { // okay, only one thing was printed and padded, so res is fine.
+ }
+ }
- template< class Ch, class Tr, class T>
- void put( T x,
- const format_item<Ch, Tr>& specs,
- std::basic_string<Ch, Tr> & res,
- BOOST_IO_STD basic_ostringstream<Ch, Tr>& oss_ )
- {
- // does the actual conversion of x, with given params, into a string
- // using the *supplied* strinstream. (the stream state is important)
-
- typedef std::basic_string<Ch, Tr> string_t;
- typedef format_item<Ch, Tr> format_item_t;
-
- stream_format_state<Ch, Tr> prev_state(oss_);
-
- specs.state_.apply_on(oss_);
-
- // in case x is a group, apply the manip part of it,
- // in order to find width
- put_head( oss_, x );
- empty_buf( oss_);
-
- const std::streamsize w=oss_.width();
- const std::ios_base::fmtflags fl=oss_.flags();
- const bool internal = (fl & std::ios_base::internal) != 0;
- const bool two_phased_filling = internal
- && ! ( specs.pad_scheme_ & format_item_t::spacepad )
- && specs.truncate_ < 0 ;
-
- if( w > 0)
- {
- if(two_phased_filling)
- { } // in this case, let the stream do the padding, and later on, we'll do our hack..
- else {
- oss_.width(0);
- }
- }
-
- put_last( oss_, x);
- res = oss_.str();
-
- if (specs.truncate_ >= 0)
- res.erase(specs.truncate_);
-
- // complex fills :
-
- if(specs.pad_scheme_ & format_item_t::spacepad)
- {
- if( res.size()==0 || ( res[0]!='+' && res[0]!='-' ))
- {
- res.insert(res.begin(), 1, ' '); // insert 1 space at pos 0
- }
- }
-
- if(two_phased_filling)
- {
- if( res.size() - w > 0)
- {
- // either it was one big arg and we have nothing to do about it,
- // either it was multi-output with first output filling up all width..
- empty_buf( oss_);
- oss_.width(0);
- put_last(oss_, x );
- string_t tmp = oss_.str(); // minimal-length output
- std::streamsize d;
- if( (d=w - tmp.size()) >0 ) // hum.. then we need to pad.
- {
- typedef typename string_t::size_type size_type;
- size_type i = 0;
- while( i<tmp.size() && tmp[i] == res[i] ) // find where we should pad.
- ++i;
- tmp.insert(i, static_cast<size_type>( d ), oss_.fill());
- std::swap(res, tmp );
- }
- else
- {
- // size is already >= w, so no padding (cool!)
- std::swap(res, tmp );
- }
- }
- else
- { // okay, only one thing was printed and padded, so res is fine.
- }
- }
- else if(w > 0) // other cases that need do_fill
- {
- do_fill(res,w,oss_.fill(), fl, (specs.pad_scheme_ & format_item_t::centered) !=0 );
- }
+ prev_state.apply_on(oss_);
+ empty_buf( oss_);
+ oss_.clear();
+} // end- put(..)
- prev_state.apply_on(oss_);
- empty_buf( oss_);
- oss_.clear();
- }
} // local namespace
-template< class Ch, class Tr, class T>
-void distribute(basic_format<Ch,Tr>& self, T x)
+template< class Ch, class Tr, class T>
+void distribute(basic_format<Ch,Tr>& self, T x)
// call put(x, ..) on every occurence of the current argument :
{
- if(self.cur_arg_ >= self.num_args_)
- {
- if( self.exceptions() & too_many_args_bit )
- boost::throw_exception(too_many_args()); // too many variables have been supplied !
- else return;
- }
- for(unsigned long i=0; i < self.items_.size(); ++i)
+ if(self.cur_arg_ >= self.num_args_)
+ {
+ if( self.exceptions() & too_many_args_bit )
+ boost::throw_exception(too_many_args()); // too many variables have been supplied !
+ else return;
+ }
+ for(unsigned long i=0; i < self.items_.size(); ++i)
{
if(self.items_[i].argN_ == self.cur_arg_)
- {
- put<Ch, Tr, T> (x, self.items_[i], self.items_[i].res_, self.oss_ );
- }
- }
+ {
+ put<Ch, Tr, T> (x, self.items_[i], self.items_[i].res_, self.oss_ );
+ }
+ }
}
-
-template<class Ch, class Tr, class T>
-basic_format<Ch, Tr>& feed(basic_format<Ch,Tr>& self, T x)
+template<class Ch, class Tr, class T>
+basic_format<Ch, Tr>& feed(basic_format<Ch,Tr>& self, T x)
{
if(self.dumped_) self.clear();
distribute<Ch, Tr, T> (self, x);
if(self.bound_.size() != 0)
{
while( self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_] )
- ++self.cur_arg_;
+ ++self.cur_arg_;
}
// this arg is finished, reset the stream's format state
self.state0_.apply_on(self.oss_);
return self;
}
-
+
} // namespace detail
} // namespace io
#define BOOST_FORMAT_CLASS_HPP
#include <vector>
-#include <sstream>
#include <string>
-#include <ostream>
-#include <locale>
-#include "boost/format/format_fwd.hpp"
-#include "boost/format/internals_fwd.hpp"
-#include "boost/format/internals.hpp"
+#include <boost/format/format_fwd.hpp>
+#include <boost/format/internals_fwd.hpp>
+
+#include <boost/format/internals.hpp>
namespace boost {
template<class Ch, class Tr>
class basic_format
{
- typedef BOOST_IO_STD basic_ostream<Ch, Tr> stream_t;
- typedef io::detail::stream_format_state<Ch, Tr> stream_format_state;
- typedef io::detail::format_item<Ch, Tr> format_item_t;
public:
+ typedef Ch CharT; // those 2 are necessary for borland compatibilty,
+ typedef Tr Traits; // in the body of the operator% template.
+
+
typedef std::basic_string<Ch, Tr> string_t;
- typedef BOOST_IO_STD basic_ostringstream<Ch, Tr> internal_stream_t;
+ typedef BOOST_IO_STD basic_ostringstream<Ch, Tr> internal_stream_t;
+private:
+ typedef BOOST_IO_STD basic_ostream<Ch, Tr> stream_t;
+ typedef io::detail::stream_format_state<Ch, Tr> stream_format_state;
+ typedef io::detail::format_item<Ch, Tr> format_item_t;
public:
basic_format(const Ch* str);
- basic_format(const Ch* str, const std::locale & loc);
basic_format(const string_t& s);
+#ifndef BOOST_NO_STD_LOCALE
+ basic_format(const Ch* str, const std::locale & loc);
basic_format(const string_t& s, const std::locale & loc);
+#endif // no locale
basic_format(const basic_format& x);
basic_format& operator= (const basic_format& x);
// pass arguments through those operators :
template<class T> basic_format& operator%(const T& x)
{
- return io::detail::feed<Ch, Tr, const T&>(*this,x);
+ return io::detail::feed<CharT, Traits, const T&>(*this,x);
}
-#ifdef BOOST_OVERLOAD_FOR_NON_CONST
+#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST
template<class T> basic_format& operator%(T& x)
{
- return io::detail::feed<Ch, Tr, T&>(*this,x);
+ return io::detail::feed<CharT, Traits, T&>(*this,x);
}
#endif
// final output
string_t str() const;
friend BOOST_IO_STD basic_ostream<Ch, Tr>&
-#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
- operator<< <Ch, Tr> ( BOOST_IO_STD basic_ostream<Ch, Tr>& , const basic_format& );
-#else
+#if BOOST_WORKAROUND( BOOST_MSVC, <= 1300) \
+ && BOOST_WORKAROUND( BOOST_MSVC, BOOST_TESTED_AT( 1300) )
operator<< ( BOOST_IO_STD basic_ostream<Ch, Tr>& , const basic_format& );
+#else
+ operator<< <Ch, Tr> ( BOOST_IO_STD basic_ostream<Ch, Tr>& , const basic_format& );
#endif
-#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+#if !defined( BOOST_NO_MEMBER_TEMPLATE_FRIENDS ) && ! BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570) ) && !BOOST_WORKAROUND( _CRAYC, != 0)
+
template<class Ch2, class Tr2, class T> friend basic_format<Ch2, Tr2>&
io::detail::feed(basic_format<Ch2,Tr2>&, T);
+++ /dev/null
-// ------------------------------------------------------------------------------
-// format_config.hpp : configuration for the format library
-// The contents of this file should be integrated into the boost config system.
-// ------------------------------------------------------------------------------
-
-#ifndef BOOST_FORMAT_CONFIG_HPP
-#define BOOST_FORMAT_CONFIG_HPP
-
-#include "boost/config.hpp"
-
-// *** This should go to "boost/config/stdlib/stlport.hpp".
-
-// If the streams are not native and there are problems with using templates
-// accross namespaces, we define some macros to enable a workaround for this.
-
-// STLport 4.5
-#if !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE)
-# define BOOST_IO_STD
-# define BOOST_IO_NEEDS_USING_DECLARATION
-#endif
-
-// STLport 4.0
-#if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_OWN_NAMESPACE) && defined(BOOST_NO_USING_TEMPLATE)
-# define BOOST_IO_STD
-# define BOOST_IO_NEEDS_USING_DECLARATION
-#endif
-
-// *** This should go to "boost/config/suffix.hpp".
-
-#ifndef BOOST_IO_STD
-# define BOOST_IO_STD std::
-#endif
-
-// **** Workaround for io streams, stlport and msvc.
-#ifdef BOOST_IO_NEEDS_USING_DECLARATION
-namespace boost {
- using std::char_traits;
- using std::basic_ostream;
- using std::basic_ostringstream;
- namespace io {
- using std::basic_ostream;
- namespace detail {
- using std::basic_ios;
- using std::basic_ostream;
- using std::basic_ostringstream;
- }
- }
-}
-#endif
-
-// ------------------------------------------------------------------------------
-
-#endif // BOOST_FORMAT_CONFIG_HPP
#define BOOST_FORMAT_FWD_HPP
#include <string>
-#include <ostream>
-#include "boost/config.hpp"
+#include <iosfwd>
+
+#include <boost/config.hpp>
namespace boost {
typedef basic_format<char > format;
-#if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_STD_WSTREAM)
+#if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_STD_WSTREAMBUF)
typedef basic_format<wchar_t > wformat;
#endif
#ifndef BOOST_FORMAT_IMPLEMENTATION_HPP
#define BOOST_FORMAT_IMPLEMENTATION_HPP
-#include <cassert>
-
-#include "boost/format/format_class.hpp"
-#include "boost/throw_exception.hpp"
+#include <boost/throw_exception.hpp>
+#include <boost/assert.hpp>
+#include <boost/format/format_class.hpp>
namespace boost {
if( !str) str = emptyStr.c_str();
parse( str );
}
+
+#ifndef BOOST_NO_STD_LOCALE
template< class Ch, class Tr>
basic_format<Ch, Tr> ::basic_format(const Ch* str, const std::locale & loc)
: style_(0), cur_arg_(0), num_args_(0), dumped_(false),
}
template< class Ch, class Tr>
-basic_format<Ch, Tr> ::basic_format(const string_t& s)
+basic_format<Ch, Tr> ::basic_format(const string_t& s, const std::locale & loc)
: style_(0), cur_arg_(0), num_args_(0), dumped_(false),
items_(), oss_(), exceptions_(io::all_error_bits)
{
+ oss_.imbue( loc );
state0_.set_by_stream(oss_);
- parse(s);
+ parse(s);
}
+#endif //BOOST_NO_STD_LOCALE
template< class Ch, class Tr>
-basic_format<Ch, Tr> ::basic_format(const string_t& s, const std::locale & loc)
+basic_format<Ch, Tr> ::basic_format(const string_t& s)
: style_(0), cur_arg_(0), num_args_(0), dumped_(false),
items_(), oss_(), exceptions_(io::all_error_bits)
{
- oss_.imbue( loc );
state0_.set_by_stream(oss_);
- parse(s);
+ parse(s);
}
template< class Ch, class Tr>
basic_format<Ch, Tr> :: basic_format(const basic_format& x)
- : style_(x.style_), cur_arg_(x.cur_arg_), num_args_(x.num_args_), dumped_(false),
- items_(x.items_), prefix_(x.prefix_), bound_(x.bound_),
+ : style_(x.style_), cur_arg_(x.cur_arg_), num_args_(x.num_args_), dumped_(false),
+ items_(x.items_), prefix_(x.prefix_), bound_(x.bound_),
oss_(), // <- we obviously can't copy x.oss_
state0_(x.state0_), exceptions_(x.exceptions_)
-{
+{
state0_.apply_on(oss_);
-}
+}
template< class Ch, class Tr>
basic_format<Ch, Tr>& basic_format<Ch, Tr> ::operator= (const basic_format& x)
items_ = x.items_;
prefix_ = x.prefix_;
bound_=x.bound_;
- style_=x.style_;
- cur_arg_=x.cur_arg_;
+ style_=x.style_;
+ cur_arg_=x.cur_arg_;
num_args_=x.num_args_;
dumped_=x.dumped_;
return *this;
template< class Ch, class Tr>
-unsigned char basic_format<Ch,Tr> ::exceptions() const
+unsigned char basic_format<Ch,Tr> ::exceptions() const
{
- return exceptions_;
+ return exceptions_;
}
template< class Ch, class Tr>
-unsigned char basic_format<Ch,Tr> ::exceptions(unsigned char newexcept)
-{
- unsigned char swp = exceptions_;
- exceptions_ = newexcept;
- return swp;
+unsigned char basic_format<Ch,Tr> ::exceptions(unsigned char newexcept)
+{
+ unsigned char swp = exceptions_;
+ exceptions_ = newexcept;
+ return swp;
}
// empty the string buffers (except bound arguments, see clear_binds() )
// and make the format object ready for formatting a new set of arguments
{
- assert( bound_.size()==0 || num_args_ == static_cast<int>(bound_.size()) );
+ BOOST_ASSERT( bound_.size()==0 || num_args_ == static_cast<int>(bound_.size()) );
for(unsigned long i=0; i<items_.size(); ++i){
items_[i].state_ = items_[i].ref_state_;
// maybe first arg is bound:
if(bound_.size() != 0)
{
- while(cur_arg_ < num_args_ && bound_[cur_arg_] ) ++cur_arg_;
+ while(cur_arg_ < num_args_ && bound_[cur_arg_] ) ++cur_arg_;
}
return *this;
}
template< class Ch, class Tr>
-basic_format<Ch,Tr>& basic_format<Ch,Tr> ::clear_binds()
+basic_format<Ch,Tr>& basic_format<Ch,Tr> ::clear_binds()
// cancel all bindings, and clear()
{
bound_.resize(0);
}
template< class Ch, class Tr>
-basic_format<Ch,Tr>& basic_format<Ch,Tr> ::clear_bind(int argN)
+basic_format<Ch,Tr>& basic_format<Ch,Tr> ::clear_bind(int argN)
// cancel the binding of ONE argument, and clear()
{
- if(argN<1 || argN > num_args_ || bound_.size()==0 || !bound_[argN-1] )
+ if(argN<1 || argN > num_args_ || bound_.size()==0 || !bound_[argN-1] )
{
- if( exceptions() & out_of_range_bit )
- boost::throw_exception(io::out_of_range()); // arg not in range.
- else return *this;
+ if( exceptions() & io::out_of_range_bit )
+ boost::throw_exception(io::out_of_range()); // arg not in range.
+ else return *this;
}
bound_[argN-1]=false;
clear();
return prefix_;
if( cur_arg_ < num_args_)
if( exceptions() & io::too_few_args_bit )
- boost::throw_exception(io::too_few_args()); // not enough variables have been supplied !
+ boost::throw_exception(io::too_few_args()); // not enough variables have been supplied !
unsigned long sz = prefix_.size();
unsigned long i;
- for(i=0; i < items_.size(); ++i)
+ for(i=0; i < items_.size(); ++i)
sz += items_[i].res_.size() + items_[i].appendix_.size();
string_t res;
res.reserve(sz);
res += prefix_;
- for(i=0; i < items_.size(); ++i)
+ for(i=0; i < items_.size(); ++i)
{
const format_item_t& item = items_[i];
res += item.res_;
- if( item.argN_ == format_item_t::argN_tabulation)
- {
- assert( item.pad_scheme_ & format_item_t::tabulation);
+ if( item.argN_ == format_item_t::argN_tabulation)
+ {
+ BOOST_ASSERT( item.pad_scheme_ & format_item_t::tabulation);
std::streamsize n = item.state_.width_ - res.size();
if( n > 0 )
- res.append( n, item.state_.fill_ );
+ res.append( n, item.state_.fill_ );
}
res += item.appendix_;
}
namespace io {
namespace detail {
-template<class Ch, class Tr, class T>
-basic_format<Ch, Tr>& bind_arg_body( basic_format<Ch, Tr>& self,
- int argN,
- const T& val)
+template<class Ch, class Tr, class T>
+basic_format<Ch, Tr>& bind_arg_body( basic_format<Ch, Tr>& self,
+ int argN,
+ const T& val)
// bind one argument to a fixed value
// this is persistent over clear() calls, thus also over str() and <<
{
if(self.dumped_) self.clear(); // needed, because we will modify cur_arg_..
- if(argN<1 || argN > self.num_args_)
+ if(argN<1 || argN > self.num_args_)
{
- if( self.exceptions() & out_of_range_bit )
- boost::throw_exception(out_of_range()); // arg not in range.
- else return self;
+ if( self.exceptions() & io::out_of_range_bit )
+ boost::throw_exception(io::out_of_range()); // arg not in range.
+ else return self;
}
- if(self.bound_.size()==0)
+ if(self.bound_.size()==0)
self.bound_.assign(self.num_args_,false);
- else
- assert( self.num_args_ == static_cast<signed int>(self.bound_.size()) );
+ else
+ BOOST_ASSERT( self.num_args_ == static_cast<signed int>(self.bound_.size()) );
int o_cur_arg = self.cur_arg_;
self.cur_arg_ = argN-1; // arrays begin at 0
self.bound_[self.cur_arg_]=false; // if already set, we unset and re-sets..
self.operator%(val); // put val at the right place, because cur_arg is set
-
+
// Now re-position cur_arg before leaving :
- self.cur_arg_ = o_cur_arg;
+ self.cur_arg_ = o_cur_arg;
self.bound_[argN-1]=true;
if(self.cur_arg_ == argN-1 )
// hum, now this arg is bound, so move to next free arg
{
- while(self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_]) ++self.cur_arg_;
+ while(self.cur_arg_ < self.num_args_ && self.bound_[self.cur_arg_]) ++self.cur_arg_;
}
// In any case, we either have all args, or are on a non-binded arg :
- assert( self.cur_arg_ >= self.num_args_ || ! self.bound_[self.cur_arg_]);
+ BOOST_ASSERT( self.cur_arg_ >= self.num_args_ || ! self.bound_[self.cur_arg_]);
return self;
}
-template<class Ch, class Tr, class T>
+template<class Ch, class Tr, class T>
basic_format<Ch, Tr>& modify_item_body( basic_format<Ch, Tr>& self,
- int itemN,
- const T& manipulator)
+ int itemN,
+ const T& manipulator)
// applies a manipulator to the format_item describing a given directive.
// this is a permanent change, clear or clear_binds won't cancel that.
{
- if(itemN<1 || itemN >= static_cast<signed int>(self.items_.size() ))
+ if(itemN<1 || itemN >= static_cast<signed int>(self.items_.size() ))
{
- if( self.exceptions() & out_of_range_bit )
- boost::throw_exception(out_of_range()); // item not in range.
+ if( self.exceptions() & io::out_of_range_bit )
+ boost::throw_exception(io::out_of_range()); // item not in range.
else return self;
}
self.items_[itemN-1].ref_state_.apply_manip( manipulator );
namespace boost {
namespace io {
- template<class Ch, class Tr> inline
- std::basic_string<Ch, Tr> str(const basic_format<Ch, Tr>& f)
+ template<class Ch, class Tr> inline
+ std::basic_string<Ch, Tr> str(const basic_format<Ch, Tr>& f)
// adds up all pieces of strings and converted items, and return the formatted string
{
return f.str();
} // - namespace io
template< class Ch, class Tr>
-BOOST_IO_STD basic_ostream<Ch, Tr>&
-operator<<( BOOST_IO_STD basic_ostream<Ch, Tr>& os,
- const boost::basic_format<Ch, Tr>& f)
+BOOST_IO_STD basic_ostream<Ch, Tr>&
+operator<<( BOOST_IO_STD basic_ostream<Ch, Tr>& os,
+ const boost::basic_format<Ch, Tr>& f)
// effect: "return os << str(f);" but we can try to do it faster
{
typedef boost::basic_format<Ch, Tr> format_t;
- if(f.items_.size()==0)
+ if(f.items_.size()==0)
os << f.prefix_;
else {
if(f.cur_arg_ < f.num_args_)
if( f.exceptions() & io::too_few_args_bit )
- boost::throw_exception(io::too_few_args()); // not enough variables have been supplied !
- if(f.style_ & format_t::special_needs)
- os << f.str();
+ boost::throw_exception(io::too_few_args()); // not enough variables have been supplied !
+ if(f.style_ & format_t::special_needs)
+ os << f.str();
else {
// else we dont have to count chars output, so we dump directly to os :
os << f.prefix_;
- for(unsigned long i=0; i<f.items_.size(); ++i)
- {
- const typename format_t::format_item_t& item = f.items_[i];
- os << item.res_;
- os << item.appendix_;
+ for(unsigned long i=0; i<f.items_.size(); ++i)
+ {
+ const typename format_t::format_item_t& item = f.items_[i];
+ os << item.res_;
+ os << item.appendix_;
- }
+ }
}
}
f.dumped_=true;
}
-#ifdef BOOST_OVERLOAD_FOR_NON_CONST
+#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST
template <class T1, class Var>
inline
}
-#endif // from #ifdef BOOST_OVERLOAD_FOR_NON_CONST
+#endif //end- #ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST
} // namespace io
#include <string>
-#include <ios>
#include <sstream>
namespace boost {
string_t res_; //- result of the formatting of this item
string_t appendix_; //- piece of string between this item and the next
- stream_format_state state_; // can be modified by manipulators
- stream_format_state ref_state_;// set from the format_string, is only affected by modify_item
+ stream_format_state ref_state_;// set by parsing the format_string, is only affected by modify_item
+ stream_format_state state_; // always same as ref_state, _unless_ modified by manipulators 'group(..)'
// non-stream format-state parameters
signed int truncate_; //- is >=0 for directives like %.5s (take 5 chars from the string)
template<class Ch, class Tr> inline
void format_item<Ch, Tr> ::compute_states()
// reflect pad_scheme_ on state_ and ref_state_
- // because some apd_schemes has complex consequences on several state params.
+ // because some pad_schemes has complex consequences on several state params.
{
if(pad_scheme_ & zeropad)
{
--- /dev/null
+// -*- C++ -*-
+// Boost general library 'format' ---------------------------
+// See http://www.boost.org for updates, documentation, and revision history.
+
+// (C) Samuel Krempp 2001
+// krempp@crans.ens-cachan.fr
+// Permission to copy, use, modify, sell and
+// distribute this software is granted provided this copyright notice appears
+// in all copies. This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+
+// ideas taken from Rüdiger Loos's format class
+// and Karl Nelson's ofstream (also took its parsing code as basis for printf parsing)
+
+// ------------------------------------------------------------------------------
+// macros_default.hpp : configuration for the format library
+// provides default values for the stl workaround macros
+// ------------------------------------------------------------------------------
+
+#ifndef BOOST_FORMAT_MACROS_DEFAULT_HPP
+#define BOOST_FORMAT_MACROS_DEFAULT_HPP
+
+#include <boost/config.hpp>
+
+// *** This should go to "boost/config/suffix.hpp".
+
+#ifndef BOOST_IO_STD
+# define BOOST_IO_STD std::
+#endif
+
+// **** Workaround for io streams, stlport and msvc.
+#ifdef BOOST_IO_NEEDS_USING_DECLARATION
+namespace boost {
+ using std::char_traits;
+ using std::basic_ostream;
+ using std::basic_ostringstream;
+ namespace io {
+ using std::basic_ostream;
+ namespace detail {
+ using std::basic_ios;
+ using std::basic_ostream;
+ using std::basic_ostringstream;
+ }
+ }
+}
+#endif
+
+// ------------------------------------------------------------------------------
+
+#endif // BOOST_FORMAT_MACROS_DEFAULT_HPP
--- /dev/null
+// -*- C++ -*-
+// Boost general library 'format' ---------------------------
+// See http://www.boost.org for updates, documentation, and revision history.
+
+// (C) Samuel Krempp 2001
+// krempp@crans.ens-cachan.fr
+// Permission to copy, use, modify, sell and
+// distribute this software is granted provided this copyright notice appears
+// in all copies. This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+
+// ideas taken from Rüdiger Loos's format class
+// and Karl Nelson's ofstream (also took its parsing code as basis for printf parsing)
+
+// ------------------------------------------------------------------------------
+// macros_stlport.hpp : configuration for the format library
+// The contents of this file should be integrated into the boost config system.
+// ------------------------------------------------------------------------------
+
+#ifndef BOOST_MACROS_STLPORT_HPP
+#define BOOST_MACROS_STLPORT_HPP
+
+#include <boost/config.hpp>
+
+// *** This should go to "boost/config/stdlib/stlport.hpp".
+
+// If the streams are not native and there are problems with using templates
+// accross namespaces, we define some macros to enable a workaround for this.
+
+// STLport 4.5
+#if !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE)
+# define BOOST_IO_STD
+# define BOOST_IO_NEEDS_USING_DECLARATION
+#endif
+
+// STLport 4.0
+#if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_OWN_NAMESPACE) && defined(BOOST_NO_USING_TEMPLATE)
+# define BOOST_IO_STD
+# define BOOST_IO_NEEDS_USING_DECLARATION
+#endif
+
+
+// ------------------------------------------------------------------------------
+
+#endif // BOOST_MACROS_STLPORT_HPP
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
-// ideas taken from Rüdiger Loos's format class
+// ideas taken from Rudiger Loos's format class
// and Karl Nelson's ofstream (also took its parsing code as basis for printf parsing)
// ------------------------------------------------------------------------------
#ifndef BOOST_FORMAT_PARSING_HPP
#define BOOST_FORMAT_PARSING_HPP
-#ifdef BOOST_MSVC
-#ifdef isdigit
-#undef isdigit
-#endif
-#endif // MSVC workaround
-#include <locale>
+#include <boost/format/format_class.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/assert.hpp>
-
-#include "boost/format/format_class.hpp"
-#include "boost/throw_exception.hpp"
-
namespace boost {
namespace io {
namespace detail {
+ template<class Ch, class Stream> inline
+ bool wrap_isdigit(Ch c, Stream &os)
+ {
+#ifndef BOOST_BAD_ISDIGIT
+ return std::isdigit(c, os.rdbuf()->getloc() );
+# else
+ using namespace std;
+ return isdigit(c);
+#endif
+ } //end- wrap_isdigit(..)
+
template<class Res, class Ch, class Tr> inline
- Res str2int(const std::basic_string<Ch, Tr>& s,
- typename std::basic_string<Ch, Tr>::size_type start,
- BOOST_IO_STD basic_ios<Ch,Tr> &os,
- const Res = Res(0) )
+ Res str2int(const std::basic_string<Ch, Tr>& s,
+ typename std::basic_string<Ch, Tr>::size_type start,
+ BOOST_IO_STD basic_ios<Ch,Tr> &os,
+ const Res = Res(0) )
// Input : char string, with starting index
- // a stream, so we can use its locale and call narrow.
+ // a basic_ios& merely to call its widen/narrow member function in the desired locale.
// Effects : reads s[start:] and converts digits into an integral n, of type Res
// Returns : n
{
Res n = 0;
- while(start<s.size() && std::isdigit(s[start], os.rdbuf()->getloc() ) ) {
+ while(start<s.size() && wrap_isdigit(s[start], os) ) {
char cur_ch = os.narrow( s[start], 0);
- assert(cur_ch != 0 ); // since we called isdigit, this should not happen.
+ BOOST_ASSERT(cur_ch != 0 ); // since we called isdigit, this should not happen.
n *= 10;
- n += cur_ch - '0'; // §22.2.1.1.2 of the C++ standard
+ n += cur_ch - '0'; // 22.2.1.1.2 of the C++ standard
++start;
}
return n;
}
template<class Ch, class Tr>
- void skip_asterisk(const std::basic_string<Ch,Tr> & buf,
- typename std::basic_string<Ch,Tr>::size_type * pos_p,
- BOOST_IO_STD basic_ios<Ch, Tr> &os)
+ void skip_asterisk(const std::basic_string<Ch,Tr> & buf,
+ typename std::basic_string<Ch,Tr>::size_type * pos_p,
+ BOOST_IO_STD basic_ios<Ch, Tr> &os)
// skip printf's "asterisk-fields" directives in the format-string buf
// Input : char string, with starting index *pos_p
- // a stream, so we can use its locale and call narrow.
+ // a basic_ios& merely to call its widen/narrow member function in the desired locale.
// Effects : advance *pos_p by skipping printf's asterisk fields.
// Returns : nothing
{
- assert( pos_p != 0);
+ using namespace std;
+ BOOST_ASSERT( pos_p != 0);
if(*pos_p >= buf.size() ) return;
if(buf[ *pos_p]==os.widen('*')) {
++ (*pos_p);
- while (*pos_p < buf.size() && std::isdigit(buf[*pos_p],os.rdbuf()->getloc())) ++(*pos_p);
+ while (*pos_p < buf.size() && wrap_isdigit(buf[*pos_p],os)) ++(*pos_p);
if(buf[*pos_p]==os.widen('$')) ++(*pos_p);
}
}
// it either throws if user sets the corresponding flag, or does nothing.
{
if(exceptions & io::bad_format_string_bit)
- boost::throw_exception(io::bad_format_string());
+ boost::throw_exception(io::bad_format_string());
}
-
+
template<class Ch, class Tr>
bool parse_printf_directive(const std::basic_string<Ch, Tr> & buf,
- typename std::basic_string<Ch, Tr>::size_type * pos_p,
- detail::format_item<Ch, Tr> * fpar,
- BOOST_IO_STD basic_ios<Ch,Tr> &os,
- unsigned char exceptions)
+ typename std::basic_string<Ch, Tr>::size_type * pos_p,
+ detail::format_item<Ch, Tr> * fpar,
+ BOOST_IO_STD basic_ios<Ch,Tr> &os,
+ unsigned char exceptions)
// Input : a 'printf-directive' in the format-string, starting at buf[ *pos_p ]
- // a stream merely to call 'widen' member function in the desired locale.
+ // a basic_ios& merely to call its widen/narrow member function in the desired locale.
// a bitset'excpetions' telling whether to throw exceptions on errors.
- // Returns : true if parse somehow succeded (possibly ignoring errors if exceptions disabled)
+ // Returns : true if parse somehow succeeded (possibly ignoring errors if exceptions disabled)
// false if it failed so bad that the directive should be printed verbatim
// Effects : - *pos_p is incremented so that buf[*pos_p] is the first char after the directive
// - *fpar is set with the parameters read in the directive
{
typedef format_item<Ch, Tr> format_item_t;
- assert( pos_p != 0);
- typename std::basic_string<Ch, Tr>::size_type &i1 = *pos_p,
- i0;
+ BOOST_ASSERT( pos_p != 0);
+ typename std::basic_string<Ch, Tr>::size_type &i1 = *pos_p,
+ i0;
fpar->argN_ = format_item_t::argN_no_posit; // if no positional-directive
bool in_brackets=false;
if(buf[i1]==os.widen('|'))
{
- in_brackets=true;
- if( ++i1 >= buf.size() ) {
- maybe_throw_exception(exceptions);
- return false;
- }
+ in_brackets=true;
+ if( ++i1 >= buf.size() ) {
+ maybe_throw_exception(exceptions);
+ return false;
+ }
}
// the flag '0' would be picked as a digit for argument order, but here it's a flag :
- if(buf[i1]==os.widen('0'))
+ if(buf[i1]==os.widen('0'))
goto parse_flags;
// handle argument order (%2$d) or possibly width specification: %2d
i0 = i1; // save position before digits
- while (i1 < buf.size() && std::isdigit(buf[i1], os.rdbuf()->getloc()))
+ while (i1 < buf.size() && wrap_isdigit(buf[i1], os))
++i1;
- if (i1!=i0)
+ if (i1!=i0)
{
- if( i1 >= buf.size() ) {
- maybe_throw_exception(exceptions);
- return false;
- }
- int n=str2int(buf,i0, os, int(0) );
-
- // %N% case : this is already the end of the directive
- if( buf[i1] == os.widen('%') )
- {
- fpar->argN_ = n-1;
- ++i1;
- if( in_brackets)
- maybe_throw_exception(exceptions);
- // but don't return. maybe "%" was used in lieu of '$', so we go on.
- else return true;
- }
-
- if ( buf[i1]==os.widen('$') )
- {
- fpar->argN_ = n-1;
- ++i1;
- }
- else
- {
- // non-positionnal directive
- fpar->ref_state_.width_ = n;
- fpar->argN_ = format_item_t::argN_no_posit;
- goto parse_precision;
- }
+ if( i1 >= buf.size() ) {
+ maybe_throw_exception(exceptions);
+ return false;
+ }
+ int n=str2int(buf,i0, os, int(0) );
+
+ // %N% case : this is already the end of the directive
+ if( buf[i1] == os.widen('%') )
+ {
+ fpar->argN_ = n-1;
+ ++i1;
+ if( in_brackets)
+ maybe_throw_exception(exceptions);
+ // but don't return. maybe "%" was used in lieu of '$', so we go on.
+ else return true;
+ }
+
+ if ( buf[i1]==os.widen('$') )
+ {
+ fpar->argN_ = n-1;
+ ++i1;
+ }
+ else
+ {
+ // non-positionnal directive
+ fpar->ref_state_.width_ = n;
+ fpar->argN_ = format_item_t::argN_no_posit;
+ goto parse_precision;
+ }
}
-
- parse_flags:
+
+ parse_flags:
// handle flags
while ( i1 <buf.size()) // as long as char is one of + - = # 0 l h or ' '
- {
- // misc switches
- switch (os.narrow(buf[i1], 0))
- {
- case '\'' : break; // no effect yet. (painful to implement)
- case 'l':
- case 'h': // short/long modifier : for printf-comaptibility (no action needed)
- break;
- case '-':
- fpar->ref_state_.flags_ |= std::ios_base::left;
- break;
- case '=':
- fpar->pad_scheme_ |= format_item_t::centered;
- break;
- case ' ':
- fpar->pad_scheme_ |= format_item_t::spacepad;
- break;
- case '+':
- fpar->ref_state_.flags_ |= std::ios_base::showpos;
- break;
- case '0':
- fpar->pad_scheme_ |= format_item_t::zeropad;
- // need to know alignment before really setting flags,
- // so just add 'zeropad' flag for now, it will be processed later.
- break;
- case '#':
- fpar->ref_state_.flags_ |= std::ios_base::showpoint | std::ios_base::showbase;
- break;
- default:
- goto parse_width;
- }
- ++i1;
+ {
+ // misc switches
+ switch (os.narrow(buf[i1], 0))
+ {
+ case '\'' : break; // no effect yet. (painful to implement)
+ case 'l':
+ case 'h': // short/long modifier : for printf-comaptibility (no action needed)
+ break;
+ case '-':
+ fpar->ref_state_.flags_ |= std::ios_base::left;
+ break;
+ case '=':
+ fpar->pad_scheme_ |= format_item_t::centered;
+ break;
+ case ' ':
+ fpar->pad_scheme_ |= format_item_t::spacepad;
+ break;
+ case '+':
+ fpar->ref_state_.flags_ |= std::ios_base::showpos;
+ break;
+ case '0':
+ fpar->pad_scheme_ |= format_item_t::zeropad;
+ // need to know alignment before really setting flags,
+ // so just add 'zeropad' flag for now, it will be processed later.
+ break;
+ case '#':
+ fpar->ref_state_.flags_ |= std::ios_base::showpoint | std::ios_base::showbase;
+ break;
+ default:
+ goto parse_width;
+ }
+ ++i1;
} // loop on flag.
if( i1>=buf.size()) {
maybe_throw_exception(exceptions);
- return true;
+ return true;
}
parse_width:
// handle width spec
skip_asterisk(buf, &i1, os); // skips 'asterisk fields' : *, or *N$
i0 = i1; // save position before digits
- while (i1<buf.size() && std::isdigit(buf[i1], os.rdbuf()->getloc()))
+ while (i1<buf.size() && wrap_isdigit(buf[i1], os))
i1++;
-
- if (i1!=i0)
+
+ if (i1!=i0)
{ fpar->ref_state_.width_ = str2int( buf,i0, os, std::streamsize(0) ); }
parse_precision:
- if( i1>=buf.size()) {
+ if( i1>=buf.size()) {
maybe_throw_exception(exceptions);
return true;
}
// handle precision spec
- if (buf[i1]==os.widen('.'))
+ if (buf[i1]==os.widen('.'))
{
- ++i1;
- skip_asterisk(buf, &i1, os);
- i0 = i1; // save position before digits
- while (i1<buf.size() && std::isdigit(buf[i1], os.rdbuf()->getloc()))
- ++i1;
-
- if(i1==i0)
- fpar->ref_state_.precision_ = 0;
- else
- fpar->ref_state_.precision_ = str2int(buf,i0, os, std::streamsize(0) );
+ ++i1;
+ skip_asterisk(buf, &i1, os);
+ i0 = i1; // save position before digits
+ while (i1<buf.size() && wrap_isdigit(buf[i1], os))
+ ++i1;
+
+ if(i1==i0)
+ fpar->ref_state_.precision_ = 0;
+ else
+ fpar->ref_state_.precision_ = str2int(buf,i0, os, std::streamsize(0) );
}
-
+
// handle formatting-type flags :
- while( i1<buf.size() &&
- ( buf[i1]==os.widen('l') || buf[i1]==os.widen('L') || buf[i1]==os.widen('h')) )
+ while( i1<buf.size() &&
+ ( buf[i1]==os.widen('l') || buf[i1]==os.widen('L') || buf[i1]==os.widen('h')) )
++i1;
if( i1>=buf.size()) {
maybe_throw_exception(exceptions);
return true;
}
-
- if( in_brackets && buf[i1]==os.widen('|') )
+
+ if( in_brackets && buf[i1]==os.widen('|') )
{
- ++i1;
- return true;
+ ++i1;
+ return true;
}
- switch (os.narrow(buf[i1], 0) )
+ switch (os.narrow(buf[i1], 0) )
{
case 'X':
- fpar->ref_state_.flags_ |= std::ios_base::uppercase;
+ fpar->ref_state_.flags_ |= std::ios_base::uppercase;
case 'p': // pointer => set hex.
case 'x':
- fpar->ref_state_.flags_ &= ~std::ios_base::basefield;
- fpar->ref_state_.flags_ |= std::ios_base::hex;
- break;
-
+ fpar->ref_state_.flags_ &= ~std::ios_base::basefield;
+ fpar->ref_state_.flags_ |= std::ios_base::hex;
+ break;
+
case 'o':
- fpar->ref_state_.flags_ &= ~std::ios_base::basefield;
- fpar->ref_state_.flags_ |= std::ios_base::oct;
- break;
+ fpar->ref_state_.flags_ &= ~std::ios_base::basefield;
+ fpar->ref_state_.flags_ |= std::ios_base::oct;
+ break;
case 'E':
- fpar->ref_state_.flags_ |= std::ios_base::uppercase;
+ fpar->ref_state_.flags_ |= std::ios_base::uppercase;
case 'e':
- fpar->ref_state_.flags_ &= ~std::ios_base::floatfield;
- fpar->ref_state_.flags_ |= std::ios_base::scientific;
-
- fpar->ref_state_.flags_ &= ~std::ios_base::basefield;
- fpar->ref_state_.flags_ |= std::ios_base::dec;
- break;
+ fpar->ref_state_.flags_ &= ~std::ios_base::floatfield;
+ fpar->ref_state_.flags_ |= std::ios_base::scientific;
+ fpar->ref_state_.flags_ &= ~std::ios_base::basefield;
+ fpar->ref_state_.flags_ |= std::ios_base::dec;
+ break;
+
case 'f':
- fpar->ref_state_.flags_ &= ~std::ios_base::floatfield;
- fpar->ref_state_.flags_ |= std::ios_base::fixed;
+ fpar->ref_state_.flags_ &= ~std::ios_base::floatfield;
+ fpar->ref_state_.flags_ |= std::ios_base::fixed;
case 'u':
case 'd':
case 'i':
- fpar->ref_state_.flags_ &= ~std::ios_base::basefield;
- fpar->ref_state_.flags_ |= std::ios_base::dec;
- break;
+ fpar->ref_state_.flags_ &= ~std::ios_base::basefield;
+ fpar->ref_state_.flags_ |= std::ios_base::dec;
+ break;
case 'T':
- ++i1;
- if( i1 >= buf.size())
- maybe_throw_exception(exceptions);
- else
- fpar->ref_state_.fill_ = buf[i1];
- fpar->pad_scheme_ |= format_item_t::tabulation;
- fpar->argN_ = format_item_t::argN_tabulation;
- break;
- case 't':
- fpar->ref_state_.fill_ = os.widen(' ');
- fpar->pad_scheme_ |= format_item_t::tabulation;
- fpar->argN_ = format_item_t::argN_tabulation;
- break;
+ ++i1;
+ if( i1 >= buf.size())
+ maybe_throw_exception(exceptions);
+ else
+ fpar->ref_state_.fill_ = buf[i1];
+ fpar->pad_scheme_ |= format_item_t::tabulation;
+ fpar->argN_ = format_item_t::argN_tabulation;
+ break;
+ case 't':
+ fpar->ref_state_.fill_ = os.widen(' ');
+ fpar->pad_scheme_ |= format_item_t::tabulation;
+ fpar->argN_ = format_item_t::argN_tabulation;
+ break;
case 'G':
- fpar->ref_state_.flags_ |= std::ios_base::uppercase;
- break;
+ fpar->ref_state_.flags_ |= std::ios_base::uppercase;
+ break;
case 'g': // 'g' conversion is default for floats.
- fpar->ref_state_.flags_ &= ~std::ios_base::basefield;
- fpar->ref_state_.flags_ |= std::ios_base::dec;
+ fpar->ref_state_.flags_ &= ~std::ios_base::basefield;
+ fpar->ref_state_.flags_ |= std::ios_base::dec;
- // CLEAR all floatield flags, so stream will CHOOSE
- fpar->ref_state_.flags_ &= ~std::ios_base::floatfield;
- break;
+ // CLEAR all floatield flags, so stream will CHOOSE
+ fpar->ref_state_.flags_ &= ~std::ios_base::floatfield;
+ break;
case 'C':
- case 'c':
- fpar->truncate_ = 1;
- break;
+ case 'c':
+ fpar->truncate_ = 1;
+ break;
case 'S':
- case 's':
- fpar->truncate_ = fpar->ref_state_.precision_;
- fpar->ref_state_.precision_ = -1;
- break;
- case 'n' :
- fpar->argN_ = format_item_t::argN_ignored;
- break;
- default:
- maybe_throw_exception(exceptions);
+ case 's':
+ fpar->truncate_ = fpar->ref_state_.precision_;
+ fpar->ref_state_.precision_ = -1;
+ break;
+ case 'n' :
+ fpar->argN_ = format_item_t::argN_ignored;
+ break;
+ default:
+ maybe_throw_exception(exceptions);
}
++i1;
if( in_brackets )
{
- if( i1<buf.size() && buf[i1]==os.widen('|') )
- {
- ++i1;
- return true;
- }
- else maybe_throw_exception(exceptions);
+ if( i1<buf.size() && buf[i1]==os.widen('|') )
+ {
+ ++i1;
+ return true;
+ }
+ else maybe_throw_exception(exceptions);
}
return true;
}
// format :: parse(..)
template<class Ch, class Traits>
-void basic_format<Ch, Traits> ::parse(const string_t & buf)
+void basic_format<Ch, Traits> ::parse(const string_t & buf)
// parse the format-string
{
using namespace std;
const Ch arg_mark = oss_.widen('%');
- bool ordered_args=true;
+ bool ordered_args=true;
int max_argN=-1;
typename string_t::size_type i1=0;
int num_items=0;
-
+
// A: find upper_bound on num_items and allocates arrays
- i1=0;
- while( (i1=buf.find(arg_mark,i1)) != string::npos )
+ i1=0;
+ while( (i1=buf.find(arg_mark,i1)) != string::npos )
{
if( i1+1 >= buf.size() ) {
- if(exceptions() & io::bad_format_string_bit)
- boost::throw_exception(io::bad_format_string()); // must not end in "bla bla %"
- else break; // stop there, ignore last '%'
+ if(exceptions() & io::bad_format_string_bit)
+ boost::throw_exception(io::bad_format_string()); // must not end in "bla bla %"
+ else break; // stop there, ignore last '%'
}
if(buf[i1+1] == buf[i1] ) { i1+=2; continue; } // escaped "%%" / "##"
++i1;
-
+
// in case of %N% directives, dont count it double (wastes allocations..) :
- while(i1 < buf.size() && std::isdigit(buf[i1],oss_.rdbuf()->getloc())) ++i1;
+ while(i1 < buf.size() && io::detail::wrap_isdigit(buf[i1],oss_)) ++i1;
if( i1 < buf.size() && buf[i1] == arg_mark ) ++ i1;
++num_items;
}
items_.assign( num_items, format_item_t() );
-
+
// B: Now the real parsing of the format string :
num_items=0;
i1 = 0;
typename string_t::size_type i0 = i1;
bool special_things=false;
int cur_it=0;
- while( (i1=buf.find(arg_mark,i1)) != string::npos )
+ while( (i1=buf.find(arg_mark,i1)) != string::npos )
{
string_t & piece = (cur_it==0) ? prefix_ : items_[cur_it-1].appendix_;
if( buf[i1+1] == buf[i1] ) // escaped mark, '%%'
{
- piece += buf.substr(i0, i1-i0) + buf[i1];
- i1+=2; i0=i1;
- continue;
+ piece += buf.substr(i0, i1-i0) + buf[i1];
+ i1+=2; i0=i1;
+ continue;
}
- assert( static_cast<unsigned int>(cur_it) < items_.size() || cur_it==0);
+ BOOST_ASSERT( static_cast<unsigned int>(cur_it) < items_.size() || cur_it==0);
if(i1!=i0) piece += buf.substr(i0, i1-i0);
++i1;
-
+
bool parse_ok;
parse_ok = io::detail::parse_printf_directive(buf, &i1, &items_[cur_it], oss_, exceptions());
if( ! parse_ok ) continue; // the directive will be printed verbatim
i0=i1;
- items_[cur_it].compute_states();
+ items_[cur_it].compute_states(); // process complex options, like zeropad, into stream params.
+
int argN=items_[cur_it].argN_;
if(argN == format_item_t::argN_ignored)
- continue;
+ continue;
if(argN ==format_item_t::argN_no_posit)
- ordered_args=false;
+ ordered_args=false;
else if(argN == format_item_t::argN_tabulation) special_things=true;
else if(argN > max_argN) max_argN = argN;
++num_items;
++cur_it;
} // loop on %'s
- assert(cur_it == num_items);
-
+ BOOST_ASSERT(cur_it == num_items);
+
// store the final piece of string
string_t & piece = (cur_it==0) ? prefix_ : items_[cur_it-1].appendix_;
piece += buf.substr(i0);
-
- if( !ordered_args)
+
+ if( !ordered_args)
{
if(max_argN >= 0 ) // dont mix positional with non-positionnal directives
- {
- if(exceptions() & io::bad_format_string_bit)
- boost::throw_exception(io::bad_format_string());
- // else do nothing. => positionnal arguments are processed as non-positionnal
- }
+ {
+ if(exceptions() & io::bad_format_string_bit)
+ boost::throw_exception(io::bad_format_string());
+ // else do nothing. => positionnal arguments are processed as non-positionnal
+ }
// set things like it would have been with positional directives :
int non_ordered_items = 0;
for(int i=0; i< num_items; ++i)
- if(items_[i].argN_ == format_item_t::argN_no_posit)
- {
- items_[i].argN_ = non_ordered_items;
- ++non_ordered_items;
- }
+ if(items_[i].argN_ == format_item_t::argN_no_posit)
+ {
+ items_[i].argN_ = non_ordered_items;
+ ++non_ordered_items;
+ }
max_argN = non_ordered_items-1;
}
-
+
// C: set some member data :
items_.resize(num_items);
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-// For more information, see http://www.boost.org
+// For more information, see http://www.boost.org/libs/function
// William Kempf, Jesse Jones and Karl Nelson were all very helpful in the
// design of this library.
-#ifndef BOOST_FUNCTION_HPP
-#define BOOST_FUNCTION_HPP
-
-#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730
-// Work around a compiler bug.
-// boost::python::detail::function has to be seen by the compiler before the
-// boost::function class template.
-namespace boost { namespace python { namespace detail {
- class function;
-}}}
-#endif
-
-#include <boost/function/function_base.hpp>
-#include <boost/type_traits/function_traits.hpp>
-#include <boost/type_traits/same_traits.hpp>
-#include <boost/type_traits/transform_traits.hpp>
-#include <boost/type_traits/ice.hpp>
-#include <boost/function/function0.hpp>
-#include <boost/function/function1.hpp>
-#include <boost/function/function2.hpp>
-#include <boost/function/function3.hpp>
-#include <boost/function/function4.hpp>
-#include <boost/function/function5.hpp>
-#include <boost/function/function6.hpp>
-#include <boost/function/function7.hpp>
-#include <boost/function/function8.hpp>
-#include <boost/function/function9.hpp>
-#include <boost/function/function10.hpp>
-
-// Don't compile any of this code if we've asked not to include the deprecated
-// syntax and we don't have partial specialization, because none of this code
-// can work.
-#if !defined (BOOST_FUNCTION_NO_DEPRECATED) || !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-
-namespace boost {
- namespace detail {
- namespace function {
- // Choose the appropriate underlying implementation
- template<int Args> struct real_get_function_impl {};
-
- template<>
- struct real_get_function_impl<0>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function0<R,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
- template<>
- struct real_get_function_impl<1>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function1<R, T1,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
- template<>
- struct real_get_function_impl<2>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function2<R, T1, T2,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
- template<>
- struct real_get_function_impl<3>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function3<R, T1, T2, T3,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
- template<>
- struct real_get_function_impl<4>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function4<R, T1, T2, T3, T4,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
- template<>
- struct real_get_function_impl<5>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function5<R, T1, T2, T3, T4, T5,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator>
- type;
- };
- };
-
- template<>
- struct real_get_function_impl<6>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function6<R, T1, T2, T3, T4, T5, T6,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator>
- type;
- };
- };
-
- template<>
- struct real_get_function_impl<7>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function7<R, T1, T2, T3, T4, T5, T6, T7,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
- template<>
- struct real_get_function_impl<8>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function8<R, T1, T2, T3, T4, T5, T6, T7, T8,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
- template<>
- struct real_get_function_impl<9>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function9<R, T1, T2, T3, T4, T5, T6, T7, T8, T9,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
- template<>
- struct real_get_function_impl<10>
- {
- template<
- typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy,
- typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename Allocator
- >
- struct params
- {
- typedef function10<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator> type;
- };
- };
-
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- template<bool GetIt, typename Traits>
- struct get_arg1_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg1_type<true, Traits>
- {
- typedef typename Traits::arg1_type type;
- };
-
- template<bool GetIt, typename Traits>
- struct get_arg2_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg2_type<true, Traits>
- {
- typedef typename Traits::arg2_type type;
- };
-
- template<bool GetIt, typename Traits>
- struct get_arg3_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg3_type<true, Traits>
- {
- typedef typename Traits::arg3_type type;
- };
-
- template<bool GetIt, typename Traits>
- struct get_arg4_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg4_type<true, Traits>
- {
- typedef typename Traits::arg4_type type;
- };
-
- template<bool GetIt, typename Traits>
- struct get_arg5_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg5_type<true, Traits>
- {
- typedef typename Traits::arg5_type type;
- };
-
- template<bool GetIt, typename Traits>
- struct get_arg6_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg6_type<true, Traits>
- {
- typedef typename Traits::arg6_type type;
- };
-
- template<bool GetIt, typename Traits>
- struct get_arg7_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg7_type<true, Traits>
- {
- typedef typename Traits::arg7_type type;
- };
-
- template<bool GetIt, typename Traits>
- struct get_arg8_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg8_type<true, Traits>
- {
- typedef typename Traits::arg8_type type;
- };
-
- template<bool GetIt, typename Traits>
- struct get_arg9_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg9_type<true, Traits>
- {
- typedef typename Traits::arg9_type type;
- };
-
- template<bool GetIt, typename Traits>
- struct get_arg10_type
- {
- typedef unusable type;
- };
-
- template<typename Traits>
- struct get_arg10_type<true, Traits>
- {
- typedef typename Traits::arg10_type type;
- };
-
- template<int X, int Y>
- struct gte
- {
- BOOST_STATIC_CONSTANT(bool, value = (X >= Y));
- };
-
- template<bool IsFunction,
- typename InR,
- typename InT1,
- typename InT2,
- typename InT3,
- typename InT4,
- typename InT5,
- typename InT6,
- typename InT7,
- typename InT8,
- typename InT9,
- typename InT10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename InPolicy,
- typename InMixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename InAllocator>
- struct maybe_decode_function_args
- {
- typedef function_traits<InR> traits;
-
- typedef typename traits::result_type R;
- typedef typename get_arg1_type<(gte<(traits::arity), 1>::value),
- traits>::type T1;
- typedef typename get_arg2_type<(gte<(traits::arity), 2>::value),
- traits>::type T2;
- typedef typename get_arg3_type<(gte<(traits::arity), 3>::value),
- traits>::type T3;
- typedef typename get_arg4_type<(gte<(traits::arity), 4>::value),
- traits>::type T4;
- typedef typename get_arg5_type<(gte<(traits::arity), 5>::value),
- traits>::type T5;
- typedef typename get_arg6_type<(gte<(traits::arity), 6>::value),
- traits>::type T6;
- typedef typename get_arg7_type<(gte<(traits::arity), 7>::value),
- traits>::type T7;
- typedef typename get_arg8_type<(gte<(traits::arity), 8>::value),
- traits>::type T8;
- typedef typename get_arg9_type<(gte<(traits::arity), 9>::value),
- traits>::type T9;
- typedef typename get_arg10_type<(gte<(traits::arity), 10>::value),
- traits>::type T10;
-
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typedef typename ct_if<(is_same<InT1, unusable>::value),
- empty_function_policy,
- InT1>::type Policy;
- typedef typename ct_if<(is_same<InT2, unusable>::value),
- empty_function_mixin,
- InT2>::type Mixin;
- typedef typename ct_if<(is_same<InT3, unusable>::value),
- std::allocator<function_base>,
- InT3>::type Allocator;
-#else
- typedef typename ct_if<(is_same<InT1, unusable>::value),
- std::allocator<function_base>,
- InT1>::type Allocator;
-#endif // BOOST_FUNCTION_NO_DEPRECATED
- };
-
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- template<typename InR,
- typename InT1,
- typename InT2,
- typename InT3,
- typename InT4,
- typename InT5,
- typename InT6,
- typename InT7,
- typename InT8,
- typename InT9,
- typename InT10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename InPolicy,
- typename InMixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typename InAllocator>
- struct maybe_decode_function_args<false, InR, InT1, InT2, InT3, InT4,
- InT5, InT6, InT7, InT8, InT9, InT10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- InPolicy, InMixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- InAllocator>
- {
- // Not a function, so just map the types directly
- typedef InR R;
- typedef InT1 T1;
- typedef InT2 T2;
- typedef InT3 T3;
- typedef InT4 T4;
- typedef InT5 T5;
- typedef InT6 T6;
- typedef InT7 T7;
- typedef InT8 T8;
- typedef InT9 T9;
- typedef InT10 T10;
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typedef InPolicy Policy;
- typedef InMixin Mixin;
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typedef InAllocator Allocator;
-
- };
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
-
-#endif // ndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
- template<
- typename InR,
- typename InT1,
- typename InT2,
- typename InT3,
- typename InT4,
- typename InT5,
- typename InT6,
- typename InT7,
- typename InT8,
- typename InT9,
- typename InT10,
- typename InPolicy = empty_function_policy,
- typename InMixin = empty_function_mixin,
- typename InAllocator = std::allocator<function_base>
- >
- struct get_function_impl
- {
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- typedef maybe_decode_function_args<(is_function<InR>::value),
- InR, InT1, InT2, InT3, InT4, InT5,
- InT6, InT7, InT8, InT9, InT10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- InPolicy, InMixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- InAllocator> decoder;
- typedef typename decoder::R R;
- typedef typename decoder::T1 T1;
- typedef typename decoder::T2 T2;
- typedef typename decoder::T3 T3;
- typedef typename decoder::T4 T4;
- typedef typename decoder::T5 T5;
- typedef typename decoder::T6 T6;
- typedef typename decoder::T7 T7;
- typedef typename decoder::T8 T8;
- typedef typename decoder::T9 T9;
- typedef typename decoder::T10 T10;
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typedef typename decoder::Policy Policy;
- typedef typename decoder::Mixin Mixin;
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typedef typename decoder::Allocator Allocator;
-#else
- typedef InR R;
- typedef InT1 T1;
- typedef InT2 T2;
- typedef InT3 T3;
- typedef InT4 T4;
- typedef InT5 T5;
- typedef InT6 T6;
- typedef InT7 T7;
- typedef InT8 T8;
- typedef InT9 T9;
- typedef InT10 T10;
- typedef InPolicy Policy;
- typedef InMixin Mixin;
- typedef InAllocator Allocator;
-#endif // def BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
- typedef typename real_get_function_impl<
- (count_used_args<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>::value)
- >::template params<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy, Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- Allocator>::type
- type;
- };
-
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- template<
- typename InR,
- typename InT1,
- typename InT2,
- typename InT3,
- typename InT4,
- typename InT5,
- typename InT6,
- typename InT7,
- typename InT8,
- typename InT9,
- typename InT10,
- typename InMyPolicy = empty_function_policy,
- typename InMyMixin = empty_function_mixin,
- typename InMyAllocator = std::allocator<function_base>
- >
- class function_traits_builder
- {
- typedef get_function_impl<InR, InT1, InT2, InT3, InT4, InT5, InT6, InT7,
- InT8, InT9, InT10, InMyPolicy, InMyMixin,
- InMyAllocator>
- impl;
-
- typedef typename impl::R MyR;
- typedef typename impl::T1 MyT1;
- typedef typename impl::T2 MyT2;
- typedef typename impl::T3 MyT3;
- typedef typename impl::T4 MyT4;
- typedef typename impl::T5 MyT5;
- typedef typename impl::T6 MyT6;
- typedef typename impl::T7 MyT7;
- typedef typename impl::T8 MyT8;
- typedef typename impl::T9 MyT9;
- typedef typename impl::T10 MyT10;
- typedef typename impl::Policy MyPolicy;
- typedef typename impl::Mixin MyMixin;
- typedef typename impl::Allocator MyAllocator;
-
- public:
- typedef typename impl::type type;
- typedef MyPolicy policy_type;
- typedef MyMixin mixin_type;
- typedef MyAllocator allocator_type;
-
-#ifndef BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
- template<typename Policy>
- struct policy :
- public function_traits_builder<MyR, MyT1, MyT2, MyT3, MyT4, MyT5, MyT6,
- MyT7, MyT8, MyT9, MyT10, Policy,
- mixin_type, allocator_type> {};
-
- template<typename Mixin>
- struct mixin :
- public function_traits_builder<MyR, MyT1, MyT2, MyT3, MyT4, MyT5, MyT6,
- MyT7, MyT8, MyT9, MyT10, policy_type,
- Mixin, allocator_type> {};
-
- template<typename Allocator>
- struct allocator :
- public function_traits_builder<MyR, MyT1, MyT2, MyT3, MyT4, MyT5, MyT6,
- MyT7, MyT8, MyT9, MyT10, policy_type,
- mixin_type, Allocator> {};
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/detail/workaround.hpp>
+
+#ifndef BOOST_FUNCTION_MAX_ARGS
+# define BOOST_FUNCTION_MAX_ARGS 10
+#endif // BOOST_FUNCTION_MAX_ARGS
+
+// Include the prologue here so that the use of file-level iteration
+// in anything that may be included by function_template.hpp doesn't break
+#include <boost/function/detail/prologue.hpp>
+
+// Visual Age C++ doesn't handle the file iteration well
+#if BOOST_WORKAROUND(__IBMCPP__, <= 600)
+# if BOOST_FUNCTION_MAX_ARGS >= 0
+# include <boost/function/function0.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 1
+# include <boost/function/function1.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 2
+# include <boost/function/function2.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 3
+# include <boost/function/function3.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 4
+# include <boost/function/function4.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 5
+# include <boost/function/function5.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 6
+# include <boost/function/function6.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 7
+# include <boost/function/function7.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 8
+# include <boost/function/function8.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 9
+# include <boost/function/function9.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 10
+# include <boost/function/function10.hpp>
+# endif
#else
- template<typename Policy>
- struct policy
- {
- typedef typename function_traits_builder<MyR, MyT1, MyT2, MyT3, MyT4,
- MyT5, MyT6, MyT7, MyT8, MyT9,
- MyT10, Policy, mixin_type,
- allocator_type>::type
- type;
- };
-
- template<typename Mixin>
- struct mixin
- {
- typedef typename function_traits_builder<MyR, MyT1, MyT2, MyT3, MyT4,
- MyT5, MyT6, MyT7, MyT8, MyT9,
- MyT10, policy_type, Mixin,
- allocator_type>::type
- type;
- };
-
- template<typename Allocator>
- struct allocator
- {
- typedef typename function_traits_builder<MyR, MyT1, MyT2, MyT3, MyT4,
- MyT5, MyT6, MyT7, MyT8, MyT9,
- MyT10, policy_type, mixin_type,
- Allocator>::type
- type;
- };
-#endif // ndef NO_DEPENDENT_NESTED_DERIVATIONS
- };
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- } // end namespace function
- } // end namespace detail
-
- template<
- typename R,
- typename T1 = detail::function::unusable,
- typename T2 = detail::function::unusable,
- typename T3 = detail::function::unusable,
- typename T4 = detail::function::unusable,
- typename T5 = detail::function::unusable,
- typename T6 = detail::function::unusable,
- typename T7 = detail::function::unusable,
- typename T8 = detail::function::unusable,
- typename T9 = detail::function::unusable,
- typename T10 = detail::function::unusable
- >
- class function :
- public detail::function::get_function_impl<R, T1, T2, T3, T4, T5, T6, T7,
- T8, T9, T10>::type
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- , public detail::function::function_traits_builder<R, T1, T2, T3, T4, T5,
- T6, T7, T8, T9, T10>
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- {
- typedef typename detail::function::get_function_impl<R, T1, T2, T3, T4, T5,
- T6, T7, T8, T9, T10
- >::type
- base_type;
-
- public:
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typedef typename base_type::policy_type policy_type;
- typedef typename base_type::mixin_type mixin_type;
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- typedef typename base_type::allocator_type allocator_type;
- typedef function self_type;
-
- function() : base_type() {}
-
- template<typename Functor>
- function(Functor BOOST_FUNCTION_TARGET_FIX(const &) f) : base_type(f) {}
-
- function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
-
- template<typename Functor>
- self_type& operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f)
- {
- self_type(f).swap(*this);
- return *this;
- }
-
- self_type& operator=(const base_type& f)
- {
- self_type(f).swap(*this);
- return *this;
- }
-
- self_type& operator=(const self_type& f)
- {
- self_type(f).swap(*this);
- return *this;
- }
-
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- template<typename Functor>
- BOOST_FUNCTION_DEPRECATED_PRE
- void set(Functor BOOST_FUNCTION_TARGET_FIX(const &) f)
- {
- BOOST_FUNCTION_DEPRECATED_INNER
- self_type(f).swap(*this);
- }
-
- BOOST_FUNCTION_DEPRECATED_PRE
- void set(const base_type& f)
- {
- BOOST_FUNCTION_DEPRECATED_INNER
- self_type(f).swap(*this);
- }
-
- BOOST_FUNCTION_DEPRECATED_PRE
- void set(const self_type& f)
- {
- BOOST_FUNCTION_DEPRECATED_INNER
- self_type(f).swap(*this);
- }
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
- };
-
- template<typename R,
- typename T1,
- typename T2,
- typename T3,
- typename T4,
- typename T5,
- typename T6,
- typename T7,
- typename T8,
- typename T9,
- typename T10>
- inline void swap(function<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& f1,
- function<R, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>& f2)
- {
- f1.swap(f2);
- }
-} // end namespace boost
-
-#endif // !no deprecated || !no partial specialization
-
+// What is the '3' for?
+# define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_FUNCTION_MAX_ARGS,<boost/function/detail/function_iterate.hpp>))
+# include BOOST_PP_ITERATE()
+# undef BOOST_PP_ITERATION_PARAMS_1
#endif
--- /dev/null
+// Boost.Function library
+
+// Copyright (C) 2002-2003 Doug Gregor (gregod@cs.rpi.edu)
+//
+// Permission to copy, use, sell and distribute this software is granted
+// provided this copyright notice appears in all copies.
+// Permission to modify the code and to distribute modified code is granted
+// provided this copyright notice appears in all copies, and a notice
+// that the code was modified is included with the copyright notice.
+//
+// This software is provided "as is" without express or implied warranty,
+// and with no claim as to its suitability for any purpose.
+
+// For more information, see http://www.boost.org
+#if !defined(BOOST_PP_IS_ITERATING)
+# error Boost.Function - do not include this file!
+#endif
+
+#define BOOST_FUNCTION_NUM_ARGS BOOST_PP_ITERATION()
+#include <boost/function/detail/maybe_include.hpp>
+#undef BOOST_FUNCTION_NUM_ARGS
+
--- /dev/null
+#!/usr/bin/perl -w
+#
+# Boost.Function library
+#
+# Copyright (C) 2001-2003 Doug Gregor (gregod@cs.rpi.edu)
+#
+# Permission to copy, use, sell and distribute this software is granted
+# provided this copyright notice appears in all copies.
+# Permission to modify the code and to distribute modified code is granted
+# provided this copyright notice appears in all copies, and a notice
+# that the code was modified is included with the copyright notice.
+#
+# This software is provided "as is" without express or implied warranty,
+# and with no claim as to its suitability for any purpose.
+#
+# For more information, see http://www.boost.org
+use English;
+
+$max_args = $ARGV[0];
+
+open (OUT, ">maybe_include.hpp") or die("Cannot write to maybe_include.hpp");
+for($on_arg = 0; $on_arg <= $max_args; ++$on_arg) {
+ if ($on_arg == 0) {
+ print OUT "#if";
+ }
+ else {
+ print OUT "#elif";
+ }
+ print OUT " BOOST_FUNCTION_NUM_ARGS == $on_arg\n";
+ print OUT "# ifndef BOOST_FUNCTION_$on_arg\n";
+ print OUT "# define BOOST_FUNCTION_$on_arg\n";
+ print OUT "# include <boost/function/function_template.hpp>\n";
+ print OUT "# endif\n";
+}
+print OUT "#else\n";
+print OUT "# error Cannot handle Boost.Function objects that accept more than $max_args arguments!\n";
+print OUT "#endif\n";
--- /dev/null
+// Boost.Function library
+
+// Copyright (C) 2003 Doug Gregor (gregod@cs.rpi.edu)
+//
+// Permission to copy, use, sell and distribute this software is granted
+// provided this copyright notice appears in all copies.
+// Permission to modify the code and to distribute modified code is granted
+// provided this copyright notice appears in all copies, and a notice
+// that the code was modified is included with the copyright notice.
+//
+// This software is provided "as is" without express or implied warranty,
+// and with no claim as to its suitability for any purpose.
+
+// For more information, see http://www.boost.org
+
+#if BOOST_FUNCTION_NUM_ARGS == 0
+# ifndef BOOST_FUNCTION_0
+# define BOOST_FUNCTION_0
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 1
+# ifndef BOOST_FUNCTION_1
+# define BOOST_FUNCTION_1
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 2
+# ifndef BOOST_FUNCTION_2
+# define BOOST_FUNCTION_2
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 3
+# ifndef BOOST_FUNCTION_3
+# define BOOST_FUNCTION_3
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 4
+# ifndef BOOST_FUNCTION_4
+# define BOOST_FUNCTION_4
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 5
+# ifndef BOOST_FUNCTION_5
+# define BOOST_FUNCTION_5
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 6
+# ifndef BOOST_FUNCTION_6
+# define BOOST_FUNCTION_6
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 7
+# ifndef BOOST_FUNCTION_7
+# define BOOST_FUNCTION_7
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 8
+# ifndef BOOST_FUNCTION_8
+# define BOOST_FUNCTION_8
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 9
+# ifndef BOOST_FUNCTION_9
+# define BOOST_FUNCTION_9
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 10
+# ifndef BOOST_FUNCTION_10
+# define BOOST_FUNCTION_10
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 11
+# ifndef BOOST_FUNCTION_11
+# define BOOST_FUNCTION_11
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 12
+# ifndef BOOST_FUNCTION_12
+# define BOOST_FUNCTION_12
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 13
+# ifndef BOOST_FUNCTION_13
+# define BOOST_FUNCTION_13
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 14
+# ifndef BOOST_FUNCTION_14
+# define BOOST_FUNCTION_14
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 15
+# ifndef BOOST_FUNCTION_15
+# define BOOST_FUNCTION_15
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 16
+# ifndef BOOST_FUNCTION_16
+# define BOOST_FUNCTION_16
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 17
+# ifndef BOOST_FUNCTION_17
+# define BOOST_FUNCTION_17
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 18
+# ifndef BOOST_FUNCTION_18
+# define BOOST_FUNCTION_18
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 19
+# ifndef BOOST_FUNCTION_19
+# define BOOST_FUNCTION_19
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 20
+# ifndef BOOST_FUNCTION_20
+# define BOOST_FUNCTION_20
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 21
+# ifndef BOOST_FUNCTION_21
+# define BOOST_FUNCTION_21
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 22
+# ifndef BOOST_FUNCTION_22
+# define BOOST_FUNCTION_22
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 23
+# ifndef BOOST_FUNCTION_23
+# define BOOST_FUNCTION_23
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 24
+# ifndef BOOST_FUNCTION_24
+# define BOOST_FUNCTION_24
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 25
+# ifndef BOOST_FUNCTION_25
+# define BOOST_FUNCTION_25
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 26
+# ifndef BOOST_FUNCTION_26
+# define BOOST_FUNCTION_26
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 27
+# ifndef BOOST_FUNCTION_27
+# define BOOST_FUNCTION_27
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 28
+# ifndef BOOST_FUNCTION_28
+# define BOOST_FUNCTION_28
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 29
+# ifndef BOOST_FUNCTION_29
+# define BOOST_FUNCTION_29
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 30
+# ifndef BOOST_FUNCTION_30
+# define BOOST_FUNCTION_30
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 31
+# ifndef BOOST_FUNCTION_31
+# define BOOST_FUNCTION_31
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 32
+# ifndef BOOST_FUNCTION_32
+# define BOOST_FUNCTION_32
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 33
+# ifndef BOOST_FUNCTION_33
+# define BOOST_FUNCTION_33
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 34
+# ifndef BOOST_FUNCTION_34
+# define BOOST_FUNCTION_34
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 35
+# ifndef BOOST_FUNCTION_35
+# define BOOST_FUNCTION_35
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 36
+# ifndef BOOST_FUNCTION_36
+# define BOOST_FUNCTION_36
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 37
+# ifndef BOOST_FUNCTION_37
+# define BOOST_FUNCTION_37
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 38
+# ifndef BOOST_FUNCTION_38
+# define BOOST_FUNCTION_38
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 39
+# ifndef BOOST_FUNCTION_39
+# define BOOST_FUNCTION_39
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 40
+# ifndef BOOST_FUNCTION_40
+# define BOOST_FUNCTION_40
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 41
+# ifndef BOOST_FUNCTION_41
+# define BOOST_FUNCTION_41
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 42
+# ifndef BOOST_FUNCTION_42
+# define BOOST_FUNCTION_42
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 43
+# ifndef BOOST_FUNCTION_43
+# define BOOST_FUNCTION_43
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 44
+# ifndef BOOST_FUNCTION_44
+# define BOOST_FUNCTION_44
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 45
+# ifndef BOOST_FUNCTION_45
+# define BOOST_FUNCTION_45
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 46
+# ifndef BOOST_FUNCTION_46
+# define BOOST_FUNCTION_46
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 47
+# ifndef BOOST_FUNCTION_47
+# define BOOST_FUNCTION_47
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 48
+# ifndef BOOST_FUNCTION_48
+# define BOOST_FUNCTION_48
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 49
+# ifndef BOOST_FUNCTION_49
+# define BOOST_FUNCTION_49
+# include <boost/function/function_template.hpp>
+# endif
+#elif BOOST_FUNCTION_NUM_ARGS == 50
+# ifndef BOOST_FUNCTION_50
+# define BOOST_FUNCTION_50
+# include <boost/function/function_template.hpp>
+# endif
+#else
+# error Cannot handle Boost.Function objects that accept more than 50 arguments!
+#endif
--- /dev/null
+// Boost.Function library
+
+// Copyright (C) 2002-2003 Doug Gregor (gregod@cs.rpi.edu)
+//
+// Permission to copy, use, sell and distribute this software is granted
+// provided this copyright notice appears in all copies.
+// Permission to modify the code and to distribute modified code is granted
+// provided this copyright notice appears in all copies, and a notice
+// that the code was modified is included with the copyright notice.
+//
+// This software is provided "as is" without express or implied warranty,
+// and with no claim as to its suitability for any purpose.
+
+// For more information, see http://www.boost.org
+
+#ifndef BOOST_FUNCTION_PROLOGUE_HPP
+#define BOOST_FUNCTION_PROLOGUE_HPP
+# include <cassert>
+# include <algorithm>
+# include <boost/throw_exception.hpp>
+# include <boost/config.hpp>
+# include <boost/function/function_base.hpp>
+# include <boost/mem_fn.hpp>
+# include <boost/type_traits/is_same.hpp>
+# include <boost/preprocessor/enum.hpp>
+# include <boost/preprocessor/enum_params.hpp>
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/repeat.hpp>
+# include <boost/preprocessor/inc.hpp>
+#endif // BOOST_FUNCTION_PROLOGUE_HPP
// Boost.Function library
-//
-// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
+
+// Copyright (C) 2002-2003 Doug Gregor (gregod@cs.rpi.edu)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-
-// For more information, see http://www.boost.org
-#ifndef BOOST_FUNCTION_FUNCTION0_HEADER
-#define BOOST_FUNCTION_FUNCTION0_HEADER
+// For more information, see http://www.boost.org
#define BOOST_FUNCTION_NUM_ARGS 0
-#define BOOST_FUNCTION_TEMPLATE_PARMS
-#define BOOST_FUNCTION_TEMPLATE_ARGS
-#define BOOST_FUNCTION_PARMS
-#define BOOST_FUNCTION_ARGS
-#define BOOST_FUNCTION_NOT_0_PARMS
-#define BOOST_FUNCTION_NOT_0_ARGS
-#define BOOST_FUNCTION_ARG_TYPES
-
-#include <boost/function/function_template.hpp>
-
-#undef BOOST_FUNCTION_ARG_TYPES
-#undef BOOST_FUNCTION_NOT_0_ARGS
-#undef BOOST_FUNCTION_NOT_0_PARMS
-#undef BOOST_FUNCTION_ARGS
-#undef BOOST_FUNCTION_PARMS
-#undef BOOST_FUNCTION_TEMPLATE_ARGS
-#undef BOOST_FUNCTION_TEMPLATE_PARMS
+#include <boost/function/detail/maybe_include.hpp>
#undef BOOST_FUNCTION_NUM_ARGS
-
-#endif // BOOST_FUNCTION_FUNCTION0_HEADER
// Boost.Function library
-//
-// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
+
+// Copyright (C) 2002-2003 Doug Gregor (gregod@cs.rpi.edu)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-
-// For more information, see http://www.boost.org
-#ifndef BOOST_FUNCTION_FUNCTION1_HEADER
-#define BOOST_FUNCTION_FUNCTION1_HEADER
+// For more information, see http://www.boost.org
#define BOOST_FUNCTION_NUM_ARGS 1
-#define BOOST_FUNCTION_TEMPLATE_PARMS typename T0
-#define BOOST_FUNCTION_TEMPLATE_ARGS T0
-#define BOOST_FUNCTION_PARMS T0 a0
-#define BOOST_FUNCTION_ARGS a0
-#define BOOST_FUNCTION_NOT_0_PARMS
-#define BOOST_FUNCTION_NOT_0_ARGS
-#define BOOST_FUNCTION_ARG_TYPES typedef T0 arg1_type;
-
-#include <boost/function/function_template.hpp>
-
-#undef BOOST_FUNCTION_ARG_TYPES
-#undef BOOST_FUNCTION_NOT_0_ARGS
-#undef BOOST_FUNCTION_NOT_0_PARMS
-#undef BOOST_FUNCTION_ARGS
-#undef BOOST_FUNCTION_PARMS
-#undef BOOST_FUNCTION_TEMPLATE_ARGS
-#undef BOOST_FUNCTION_TEMPLATE_PARMS
+#include <boost/function/detail/maybe_include.hpp>
#undef BOOST_FUNCTION_NUM_ARGS
-
-#endif // BOOST_FUNCTION_FUNCTION1_HEADER
// Boost.Function library
-//
-// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
+
+// Copyright (C) 2002-2003 Doug Gregor (gregod@cs.rpi.edu)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-
-// For more information, see http://www.boost.org
-#ifndef BOOST_FUNCTION_FUNCTION10_HEADER
-#define BOOST_FUNCTION_FUNCTION10_HEADER
+// For more information, see http://www.boost.org
#define BOOST_FUNCTION_NUM_ARGS 10
-#define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9
-#define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1, T2, T3, T4, T5, T6, T7, T8, T9
-#define BOOST_FUNCTION_PARMS T0 a0, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9
-#define BOOST_FUNCTION_ARGS a0, a1, a2, a3, a4, a5, a6, a7, a8, a9
-#define BOOST_FUNCTION_NOT_0_PARMS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8, T9 a9
-#define BOOST_FUNCTION_NOT_0_ARGS a1, a2, a3, a4, a5, a6, a7, a8, a9
-#define BOOST_FUNCTION_ARG_TYPES typedef T0 arg1_type; typedef T1 arg2_type; typedef T2 arg3_type; typedef T3 arg4_type; typedef T4 arg5_type; typedef T5 arg6_type; typedef T6 arg7_type; typedef T7 arg8_type; typedef T8 arg9_type; typedef T9 arg10_type;
-
-#include <boost/function/function_template.hpp>
-
-#undef BOOST_FUNCTION_ARG_TYPES
-#undef BOOST_FUNCTION_NOT_0_ARGS
-#undef BOOST_FUNCTION_NOT_0_PARMS
-#undef BOOST_FUNCTION_ARGS
-#undef BOOST_FUNCTION_PARMS
-#undef BOOST_FUNCTION_TEMPLATE_ARGS
-#undef BOOST_FUNCTION_TEMPLATE_PARMS
+#include <boost/function/detail/maybe_include.hpp>
#undef BOOST_FUNCTION_NUM_ARGS
-
-#endif // BOOST_FUNCTION_FUNCTION10_HEADER
// Boost.Function library
-//
-// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
+
+// Copyright (C) 2002-2003 Doug Gregor (gregod@cs.rpi.edu)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-
-// For more information, see http://www.boost.org
-#ifndef BOOST_FUNCTION_FUNCTION2_HEADER
-#define BOOST_FUNCTION_FUNCTION2_HEADER
+// For more information, see http://www.boost.org
#define BOOST_FUNCTION_NUM_ARGS 2
-#define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1
-#define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1
-#define BOOST_FUNCTION_PARMS T0 a0, T1 a1
-#define BOOST_FUNCTION_ARGS a0, a1
-#define BOOST_FUNCTION_NOT_0_PARMS T1 a1
-#define BOOST_FUNCTION_NOT_0_ARGS a1
-#define BOOST_FUNCTION_ARG_TYPES typedef T0 arg1_type; typedef T1 arg2_type;
-
-#include <boost/function/function_template.hpp>
-
-#undef BOOST_FUNCTION_ARG_TYPES
-#undef BOOST_FUNCTION_NOT_0_ARGS
-#undef BOOST_FUNCTION_NOT_0_PARMS
-#undef BOOST_FUNCTION_ARGS
-#undef BOOST_FUNCTION_PARMS
-#undef BOOST_FUNCTION_TEMPLATE_ARGS
-#undef BOOST_FUNCTION_TEMPLATE_PARMS
+#include <boost/function/detail/maybe_include.hpp>
#undef BOOST_FUNCTION_NUM_ARGS
-
-#endif // BOOST_FUNCTION_FUNCTION2_HEADER
// Boost.Function library
-//
-// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
+
+// Copyright (C) 2002-2003 Doug Gregor (gregod@cs.rpi.edu)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-
-// For more information, see http://www.boost.org
-#ifndef BOOST_FUNCTION_FUNCTION3_HEADER
-#define BOOST_FUNCTION_FUNCTION3_HEADER
+// For more information, see http://www.boost.org
#define BOOST_FUNCTION_NUM_ARGS 3
-#define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1, typename T2
-#define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1, T2
-#define BOOST_FUNCTION_PARMS T0 a0, T1 a1, T2 a2
-#define BOOST_FUNCTION_ARGS a0, a1, a2
-#define BOOST_FUNCTION_NOT_0_PARMS T1 a1, T2 a2
-#define BOOST_FUNCTION_NOT_0_ARGS a1, a2
-#define BOOST_FUNCTION_ARG_TYPES typedef T0 arg1_type; typedef T1 arg2_type; typedef T2 arg3_type;
-
-#include <boost/function/function_template.hpp>
-#undef BOOST_FUNCTION_ARG_TYPES
-#undef BOOST_FUNCTION_NOT_0_ARGS
-#undef BOOST_FUNCTION_NOT_0_PARMS
-#undef BOOST_FUNCTION_ARGS
-#undef BOOST_FUNCTION_PARMS
-#undef BOOST_FUNCTION_TEMPLATE_ARGS
-#undef BOOST_FUNCTION_TEMPLATE_PARMS
+#include <boost/function/detail/maybe_include.hpp>
#undef BOOST_FUNCTION_NUM_ARGS
-
-#endif // BOOST_FUNCTION_FUNCTION3_HEADER
// Boost.Function library
-//
-// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
+
+// Copyright (C) 2002-2003 Doug Gregor (gregod@cs.rpi.edu)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-
-// For more information, see http://www.boost.org
-#ifndef BOOST_FUNCTION_FUNCTION4_HEADER
-#define BOOST_FUNCTION_FUNCTION4_HEADER
+// For more information, see http://www.boost.org
#define BOOST_FUNCTION_NUM_ARGS 4
-#define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1, typename T2, typename T3
-#define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1, T2, T3
-#define BOOST_FUNCTION_PARMS T0 a0, T1 a1, T2 a2, T3 a3
-#define BOOST_FUNCTION_ARGS a0, a1, a2, a3
-#define BOOST_FUNCTION_NOT_0_PARMS T1 a1, T2 a2, T3 a3
-#define BOOST_FUNCTION_NOT_0_ARGS a1, a2, a3
-#define BOOST_FUNCTION_ARG_TYPES typedef T0 arg1_type; typedef T1 arg2_type; typedef T2 arg3_type; typedef T3 arg4_type;
-
-#include <boost/function/function_template.hpp>
-
-#undef BOOST_FUNCTION_ARG_TYPES
-#undef BOOST_FUNCTION_NOT_0_ARGS
-#undef BOOST_FUNCTION_NOT_0_PARMS
-#undef BOOST_FUNCTION_ARGS
-#undef BOOST_FUNCTION_PARMS
-#undef BOOST_FUNCTION_TEMPLATE_ARGS
-#undef BOOST_FUNCTION_TEMPLATE_PARMS
+#include <boost/function/detail/maybe_include.hpp>
#undef BOOST_FUNCTION_NUM_ARGS
-
-#endif // BOOST_FUNCTION_FUNCTION4_HEADER
// Boost.Function library
-//
-// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
+
+// Copyright (C) 2002-2003 Doug Gregor (gregod@cs.rpi.edu)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-
-// For more information, see http://www.boost.org
-#ifndef BOOST_FUNCTION_FUNCTION5_HEADER
-#define BOOST_FUNCTION_FUNCTION5_HEADER
+// For more information, see http://www.boost.org
#define BOOST_FUNCTION_NUM_ARGS 5
-#define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1, typename T2, typename T3, typename T4
-#define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1, T2, T3, T4
-#define BOOST_FUNCTION_PARMS T0 a0, T1 a1, T2 a2, T3 a3, T4 a4
-#define BOOST_FUNCTION_ARGS a0, a1, a2, a3, a4
-#define BOOST_FUNCTION_NOT_0_PARMS T1 a1, T2 a2, T3 a3, T4 a4
-#define BOOST_FUNCTION_NOT_0_ARGS a1, a2, a3, a4
-#define BOOST_FUNCTION_ARG_TYPES typedef T0 arg1_type; typedef T1 arg2_type; typedef T2 arg3_type; typedef T3 arg4_type; typedef T4 arg5_type;
-
-#include <boost/function/function_template.hpp>
-
-#undef BOOST_FUNCTION_ARG_TYPES
-#undef BOOST_FUNCTION_NOT_0_ARGS
-#undef BOOST_FUNCTION_NOT_0_PARMS
-#undef BOOST_FUNCTION_ARGS
-#undef BOOST_FUNCTION_PARMS
-#undef BOOST_FUNCTION_TEMPLATE_ARGS
-#undef BOOST_FUNCTION_TEMPLATE_PARMS
+#include <boost/function/detail/maybe_include.hpp>
#undef BOOST_FUNCTION_NUM_ARGS
-
-#endif // BOOST_FUNCTION_FUNCTION5_HEADER
// Boost.Function library
-//
-// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
+
+// Copyright (C) 2002-2003 Doug Gregor (gregod@cs.rpi.edu)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-
-// For more information, see http://www.boost.org
-#ifndef BOOST_FUNCTION_FUNCTION6_HEADER
-#define BOOST_FUNCTION_FUNCTION6_HEADER
+// For more information, see http://www.boost.org
#define BOOST_FUNCTION_NUM_ARGS 6
-#define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1, typename T2, typename T3, typename T4, typename T5
-#define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1, T2, T3, T4, T5
-#define BOOST_FUNCTION_PARMS T0 a0, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5
-#define BOOST_FUNCTION_ARGS a0, a1, a2, a3, a4, a5
-#define BOOST_FUNCTION_NOT_0_PARMS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5
-#define BOOST_FUNCTION_NOT_0_ARGS a1, a2, a3, a4, a5
-#define BOOST_FUNCTION_ARG_TYPES typedef T0 arg1_type; typedef T1 arg2_type; typedef T2 arg3_type; typedef T3 arg4_type; typedef T4 arg5_type; typedef T5 arg6_type;
-
-#include <boost/function/function_template.hpp>
-
-#undef BOOST_FUNCTION_ARG_TYPES
-#undef BOOST_FUNCTION_NOT_0_ARGS
-#undef BOOST_FUNCTION_NOT_0_PARMS
-#undef BOOST_FUNCTION_ARGS
-#undef BOOST_FUNCTION_PARMS
-#undef BOOST_FUNCTION_TEMPLATE_ARGS
-#undef BOOST_FUNCTION_TEMPLATE_PARMS
+#include <boost/function/detail/maybe_include.hpp>
#undef BOOST_FUNCTION_NUM_ARGS
-
-#endif // BOOST_FUNCTION_FUNCTION6_HEADER
// Boost.Function library
-//
-// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
+
+// Copyright (C) 2002-2003 Doug Gregor (gregod@cs.rpi.edu)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-
-// For more information, see http://www.boost.org
-#ifndef BOOST_FUNCTION_FUNCTION7_HEADER
-#define BOOST_FUNCTION_FUNCTION7_HEADER
+// For more information, see http://www.boost.org
#define BOOST_FUNCTION_NUM_ARGS 7
-#define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6
-#define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1, T2, T3, T4, T5, T6
-#define BOOST_FUNCTION_PARMS T0 a0, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6
-#define BOOST_FUNCTION_ARGS a0, a1, a2, a3, a4, a5, a6
-#define BOOST_FUNCTION_NOT_0_PARMS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6
-#define BOOST_FUNCTION_NOT_0_ARGS a1, a2, a3, a4, a5, a6
-#define BOOST_FUNCTION_ARG_TYPES typedef T0 arg1_type; typedef T1 arg2_type; typedef T2 arg3_type; typedef T3 arg4_type; typedef T4 arg5_type; typedef T5 arg6_type; typedef T6 arg7_type;
-
-#include <boost/function/function_template.hpp>
-
-#undef BOOST_FUNCTION_ARG_TYPES
-#undef BOOST_FUNCTION_NOT_0_ARGS
-#undef BOOST_FUNCTION_NOT_0_PARMS
-#undef BOOST_FUNCTION_ARGS
-#undef BOOST_FUNCTION_PARMS
-#undef BOOST_FUNCTION_TEMPLATE_ARGS
-#undef BOOST_FUNCTION_TEMPLATE_PARMS
+#include <boost/function/detail/maybe_include.hpp>
#undef BOOST_FUNCTION_NUM_ARGS
-
-#endif // BOOST_FUNCTION_FUNCTION7_HEADER
// Boost.Function library
-//
-// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
+
+// Copyright (C) 2002-2003 Doug Gregor (gregod@cs.rpi.edu)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-
-// For more information, see http://www.boost.org
-#ifndef BOOST_FUNCTION_FUNCTION8_HEADER
-#define BOOST_FUNCTION_FUNCTION8_HEADER
+// For more information, see http://www.boost.org
#define BOOST_FUNCTION_NUM_ARGS 8
-#define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7
-#define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1, T2, T3, T4, T5, T6, T7
-#define BOOST_FUNCTION_PARMS T0 a0, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7
-#define BOOST_FUNCTION_ARGS a0, a1, a2, a3, a4, a5, a6, a7
-#define BOOST_FUNCTION_NOT_0_PARMS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7
-#define BOOST_FUNCTION_NOT_0_ARGS a1, a2, a3, a4, a5, a6, a7
-#define BOOST_FUNCTION_ARG_TYPES typedef T0 arg1_type; typedef T1 arg2_type; typedef T2 arg3_type; typedef T3 arg4_type; typedef T4 arg5_type; typedef T5 arg6_type; typedef T6 arg7_type; typedef T7 arg8_type;
-
-#include <boost/function/function_template.hpp>
-
-#undef BOOST_FUNCTION_ARG_TYPES
-#undef BOOST_FUNCTION_NOT_0_ARGS
-#undef BOOST_FUNCTION_NOT_0_PARMS
-#undef BOOST_FUNCTION_ARGS
-#undef BOOST_FUNCTION_PARMS
-#undef BOOST_FUNCTION_TEMPLATE_ARGS
-#undef BOOST_FUNCTION_TEMPLATE_PARMS
+#include <boost/function/detail/maybe_include.hpp>
#undef BOOST_FUNCTION_NUM_ARGS
-
-#endif // BOOST_FUNCTION_FUNCTION8_HEADER
// Boost.Function library
-//
-// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
+
+// Copyright (C) 2002-2003 Doug Gregor (gregod@cs.rpi.edu)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-
-// For more information, see http://www.boost.org
-#ifndef BOOST_FUNCTION_FUNCTION9_HEADER
-#define BOOST_FUNCTION_FUNCTION9_HEADER
+// For more information, see http://www.boost.org
#define BOOST_FUNCTION_NUM_ARGS 9
-#define BOOST_FUNCTION_TEMPLATE_PARMS typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8
-#define BOOST_FUNCTION_TEMPLATE_ARGS T0, T1, T2, T3, T4, T5, T6, T7, T8
-#define BOOST_FUNCTION_PARMS T0 a0, T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8
-#define BOOST_FUNCTION_ARGS a0, a1, a2, a3, a4, a5, a6, a7, a8
-#define BOOST_FUNCTION_NOT_0_PARMS T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7, T8 a8
-#define BOOST_FUNCTION_NOT_0_ARGS a1, a2, a3, a4, a5, a6, a7, a8
-#define BOOST_FUNCTION_ARG_TYPES typedef T0 arg1_type; typedef T1 arg2_type; typedef T2 arg3_type; typedef T3 arg4_type; typedef T4 arg5_type; typedef T5 arg6_type; typedef T6 arg7_type; typedef T7 arg8_type; typedef T8 arg9_type;
-
-#include <boost/function/function_template.hpp>
-
-#undef BOOST_FUNCTION_ARG_TYPES
-#undef BOOST_FUNCTION_NOT_0_ARGS
-#undef BOOST_FUNCTION_NOT_0_PARMS
-#undef BOOST_FUNCTION_ARGS
-#undef BOOST_FUNCTION_PARMS
-#undef BOOST_FUNCTION_TEMPLATE_ARGS
-#undef BOOST_FUNCTION_TEMPLATE_PARMS
+#include <boost/function/detail/maybe_include.hpp>
#undef BOOST_FUNCTION_NUM_ARGS
-
-#endif // BOOST_FUNCTION_FUNCTION9_HEADER
// Boost.Function library
-// Copyright (C) 2001, 2002 Doug Gregor (gregod@cs.rpi.edu)
+// Copyright (C) 2001-2003 Doug Gregor (gregod@cs.rpi.edu)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-
+
// For more information, see http://www.boost.org
#ifndef BOOST_FUNCTION_BASE_HEADER
#define BOOST_FUNCTION_BASE_HEADER
-#include <string>
#include <stdexcept>
+#include <string>
#include <memory>
#include <new>
-#include <typeinfo>
#include <boost/config.hpp>
-#include <boost/type_traits.hpp>
+#include <boost/assert.hpp>
+#include <boost/type_traits/arithmetic_traits.hpp>
+#include <boost/type_traits/composite_traits.hpp>
+#include <boost/type_traits/is_stateless.hpp>
#include <boost/ref.hpp>
#include <boost/pending/ct_if.hpp>
+#include <boost/detail/workaround.hpp>
-#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 || defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 || defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406 && !defined(BOOST_STRICT_CONFIG)
# define BOOST_FUNCTION_TARGET_FIX(x) x
#else
# define BOOST_FUNCTION_TARGET_FIX(x)
#endif // not MSVC
-#ifdef BOOST_FUNCTION_SILENT_DEPRECATED
-# define BOOST_FUNCTION_DEPRECATED_PRE
-# define BOOST_FUNCTION_DEPRECATED_INNER
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730 && !defined(BOOST_STRICT_CONFIG)
+// Work around a compiler bug.
+// boost::python::objects::function has to be seen by the compiler before the
+// boost::function class template.
+namespace boost { namespace python { namespace objects {
+ class function;
+}}}
+#endif
+
+// GCC 2.95.3 (or earlier) doesn't support enable_if
+#if BOOST_WORKAROUND(__GNUC__, < 3)
+# define BOOST_FUNCTION_NO_ENABLE_IF
+#endif
+
+// MIPSpro 7.3.1.3m doesn't support enable_if
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730 && !defined(BOOST_STRICT_CONFIG)
+# define BOOST_FUNCTION_NO_ENABLE_IF
+#endif
+
+// MSVC 7.0 doesn't support enable_if
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 && !defined(BOOST_STRICT_CONFIG)
+# define BOOST_FUNCTION_NO_ENABLE_IF
+#endif
+
+// Borland C++ 5.6.0 doesn't support enable_if
+#if BOOST_WORKAROUND(__BORLANDC__, <= 0x562)
+# define BOOST_FUNCTION_NO_ENABLE_IF
+#endif
+
+// Metrowerks 7.2 doesn't support enable_if
+#if BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
+# define BOOST_FUNCTION_NO_ENABLE_IF
+#endif
+
+#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x540)
+# define BOOST_FUNCTION_NO_ENABLE_IF
+#endif
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+namespace boost {
+
+#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730 && !defined(BOOST_STRICT_CONFIG)
+// The library shipping with MIPSpro 7.3.1.3m has a broken allocator<void>
+class function_base;
+
+template<typename Signature,
+ typename Allocator = std::allocator<function_base> >
+class function;
#else
-# if defined (BOOST_MSVC) && (BOOST_MSVC >= 1300)
-# define BOOST_FUNCTION_DEPRECATED_PRE __declspec(deprecated)
-# define BOOST_FUNCTION_DEPRECATED_INNER
-# else
-# define BOOST_FUNCTION_DEPRECATED_PRE
-# define BOOST_FUNCTION_DEPRECATED_INNER int deprecated;
-# endif
+template<typename Signature, typename Allocator = std::allocator<void> >
+class function;
#endif
+template<typename Signature, typename Allocator>
+inline void swap(function<Signature, Allocator>& f1,
+ function<Signature, Allocator>& f2)
+{
+ f1.swap(f2);
+}
+
+} // end namespace boost
+#endif // have partial specialization
+
namespace boost {
namespace detail {
namespace function {
/**
* A union of a function pointer and a void pointer. This is necessary
- * because 5.2.10/6 allows reinterpret_cast<> to safely cast between
+ * because 5.2.10/6 allows reinterpret_cast<> to safely cast between
* function pointer types and 5.2.9/10 allows static_cast<> to safely
* cast between a void pointer and an object pointer. But it is not legal
* to cast between a function pointer and a void* (in either direction),
* so function requires a union of the two. */
- union any_pointer
+ union any_pointer
{
void* obj_ptr;
const void* const_obj_ptr;
void (*func_ptr)();
-
- explicit any_pointer(void* p) : obj_ptr(p) {}
- explicit any_pointer(const void* p) : const_obj_ptr(p) {}
- explicit any_pointer(void (*p)()) : func_ptr(p) {}
+ char data[1];
};
+ inline any_pointer make_any_pointer(void* o)
+ {
+ any_pointer p;
+ p.obj_ptr = o;
+ return p;
+ }
+
+ inline any_pointer make_any_pointer(const void* o)
+ {
+ any_pointer p;
+ p.const_obj_ptr = o;
+ return p;
+ }
+
+ inline any_pointer make_any_pointer(void (*f)())
+ {
+ any_pointer p;
+ p.func_ptr = f;
+ return p;
+ }
+
/**
* The unusable class is a placeholder for unused function arguments
* It is also completely unusable except that it constructable from
* anything. This helps compilers without partial specialization to
* handle Boost.Function objects returning void.
*/
- struct unusable
+ struct unusable
{
unusable() {}
template<typename T> unusable(const T&) {}
/* Determine the return type. This supports compilers that do not support
* void returns or partial specialization by silently changing the return
- * type to "unusable".
+ * type to "unusable".
*/
template<typename T> struct function_return_type { typedef T type; };
- template<>
- struct function_return_type<void>
+ template<>
+ struct function_return_type<void>
{
typedef unusable type;
};
// The operation type to perform on the given functor/function pointer
- enum functor_manager_operation_type {
- clone_functor_tag,
+ enum functor_manager_operation_type {
+ clone_functor_tag,
destroy_functor_tag
};
// The trivial manager does nothing but return the same pointer (if we
// are cloning) or return the null pointer (if we are deleting).
- inline any_pointer trivial_manager(any_pointer f,
+ inline any_pointer trivial_manager(any_pointer f,
functor_manager_operation_type op)
{
if (op == clone_functor_tag)
return f;
else
- return any_pointer(reinterpret_cast<void*>(0));
+ return make_any_pointer(reinterpret_cast<void*>(0));
}
/**
* The functor_manager class contains a static function "manage" which
- * can clone or destroy the given function/function object pointer.
+ * can clone or destroy the given function/function object pointer.
*/
template<typename Functor, typename Allocator>
struct functor_manager
// For function pointers, the manager is trivial
static inline any_pointer
- manager(any_pointer function_ptr,
+ manager(any_pointer function_ptr,
functor_manager_operation_type op,
function_ptr_tag)
{
if (op == clone_functor_tag)
return function_ptr;
else
- return any_pointer(static_cast<void (*)()>(0));
+ return make_any_pointer(static_cast<void (*)()>(0));
}
- // For function object pointers, we clone the pointer to each
+ // For function object pointers, we clone the pointer to each
// function has its own version.
static inline any_pointer
- manager(any_pointer function_obj_ptr,
+ manager(any_pointer function_obj_ptr,
functor_manager_operation_type op,
function_obj_tag)
{
#ifndef BOOST_NO_STD_ALLOCATOR
- typedef typename Allocator::template rebind<functor_type>::other
+ typedef typename Allocator::template rebind<functor_type>::other
allocator_type;
typedef typename allocator_type::pointer pointer_type;
#else
# endif // BOOST_NO_STD_ALLOCATOR
if (op == clone_functor_tag) {
- functor_type* f =
+ functor_type* f =
static_cast<functor_type*>(function_obj_ptr.obj_ptr);
// Clone the functor
# else
functor_type* new_f = new functor_type(*f);
# endif // BOOST_NO_STD_ALLOCATOR
- return any_pointer(static_cast<void*>(new_f));
+ return make_any_pointer(static_cast<void*>(new_f));
}
else {
/* Cast from the void pointer to the functor pointer type */
- functor_type* f =
+ functor_type* f =
reinterpret_cast<functor_type*>(function_obj_ptr.obj_ptr);
# ifndef BOOST_NO_STD_ALLOCATOR
delete f;
# endif // BOOST_NO_STD_ALLOCATOR
- return any_pointer(static_cast<void*>(0));
+ return make_any_pointer(static_cast<void*>(0));
}
}
public:
}
};
- // value=1 if the given type is not "unusable"
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ template<bool cond, typename T> struct enable_if;
+ template<typename T> struct enable_if<true, T> { typedef T type; };
+ template<typename T> struct enable_if<false, T> {};
+
+ template<bool x>
+ struct enabled
+ {
template<typename T>
- struct count_if_used
+ struct base
{
- BOOST_STATIC_CONSTANT(int, value = 1);
+ typedef T type;
};
-
- // value=0 for unusable types
- template<>
- struct count_if_used<unusable>
- {
- BOOST_STATIC_CONSTANT(int, value = 0);
- };
-
- // Count the number of arguments (from the given set) which are not
- // "unusable" (therefore, count those arguments that are used).
- template<typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7, typename T8,
- typename T9, typename T10>
- struct count_used_args
+ };
+
+ template<>
+ struct enabled<false>
+ {
+ template<typename T>
+ struct base
{
- BOOST_STATIC_CONSTANT(int, value =
- (count_if_used<T1>::value +
- count_if_used<T2>::value +
- count_if_used<T3>::value +
- count_if_used<T4>::value +
- count_if_used<T5>::value +
- count_if_used<T6>::value +
- count_if_used<T7>::value +
- count_if_used<T8>::value +
- count_if_used<T9>::value +
- count_if_used<T10>::value));
};
+ };
+
+ template<bool Enabled, typename T>
+ struct enable_if : public enabled<Enabled>::template base<T>
+ {
+ };
+#endif
+
+ // A type that is only used for comparisons against zero
+ struct useless_clear_type {};
} // end namespace function
} // end namespace detail
- /**
- * The function_base class contains the basic elements needed for the
- * function1, function2, function3, etc. classes. It is common to all
- * functions (and as such can be used to tell if we have one of the
- * functionN objects).
- */
- class function_base
+/**
+ * The function_base class contains the basic elements needed for the
+ * function1, function2, function3, etc. classes. It is common to all
+ * functions (and as such can be used to tell if we have one of the
+ * functionN objects).
+ */
+class function_base
+{
+public:
+ function_base() : manager(0)
{
- public:
- function_base() : manager(0), functor(static_cast<void*>(0)) {}
-
- // Is this function empty?
- bool empty() const { return !manager; }
-
- public: // should be protected, but GCC 2.95.3 will fail to allow access
- detail::function::any_pointer (*manager)(
- detail::function::any_pointer,
- detail::function::functor_manager_operation_type);
- detail::function::any_pointer functor;
- };
-
- /* Poison comparison between Boost.Function objects (because it is
- * meaningless). The comparisons would otherwise be allowed because of the
- * conversion required to allow syntax such as:
- * boost::function<int, int> f;
- * if (f) { f(5); }
- */
- void operator==(const function_base&, const function_base&);
- void operator!=(const function_base&, const function_base&);
+ functor.obj_ptr = 0;
+ }
+
+ // Is this function empty?
+ bool empty() const { return !manager; }
+
+public: // should be protected, but GCC 2.95.3 will fail to allow access
+ detail::function::any_pointer (*manager)(
+ detail::function::any_pointer,
+ detail::function::functor_manager_operation_type);
+ detail::function::any_pointer functor;
+};
+
+/**
+ * The bad_function_call exception class is thrown when a boost::function
+ * object is invoked
+ */
+class bad_function_call : public std::runtime_error
+{
+public:
+ bad_function_call() : std::runtime_error("call to empty boost::function") {}
+};
+
+/* Poison comparison between Boost.Function objects (because it is
+ * meaningless). The comparisons would otherwise be allowed because of the
+ * conversion required to allow syntax such as:
+ * boost::function<int, int> f;
+ * if (f) { f(5); }
+ */
+void operator==(const function_base&, const function_base&);
+void operator!=(const function_base&, const function_base&);
+
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+inline bool operator==(const function_base& f,
+ detail::function::useless_clear_type*)
+{
+ return f.empty();
+}
- namespace detail {
- namespace function {
- inline bool has_empty_target(const function_base* f)
- {
- return f->empty();
- }
+inline bool operator!=(const function_base& f,
+ detail::function::useless_clear_type*)
+{
+ return !f.empty();
+}
- inline bool has_empty_target(...)
- {
- return false;
- }
- } // end namespace function
- } // end namespace detail
+inline bool operator==(detail::function::useless_clear_type*,
+ const function_base& f)
+{
+ return f.empty();
+}
- // The default function policy is to do nothing before and after the call.
- struct empty_function_policy
- {
- inline void precall(const function_base*) {}
- inline void postcall(const function_base*) {}
- };
-
- // The default function mixin does nothing. The assignment and
- // copy-construction operators are all defined because MSVC defines broken
- // versions.
- struct empty_function_mixin
- {
- empty_function_mixin() {}
- empty_function_mixin(const empty_function_mixin&) {}
+inline bool operator!=(detail::function::useless_clear_type*,
+ const function_base& f)
+{
+ return !f.empty();
+}
+#endif
- empty_function_mixin& operator=(const empty_function_mixin&)
+namespace detail {
+ namespace function {
+ inline bool has_empty_target(const function_base* f)
{
- return *this;
+ return f->empty();
}
- };
-}
+
+ inline bool has_empty_target(...)
+ {
+ return false;
+ }
+ } // end namespace function
+} // end namespace detail
+} // end namespace boost
#endif // BOOST_FUNCTION_BASE_HEADER
// Boost.Function library
-// Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
+// Copyright (C) 2001-2003 Doug Gregor (gregod@cs.rpi.edu)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies.
// For more information, see http://www.boost.org
// Note: this header is a header template and must NOT have multiple-inclusion
-// protection.
+// protection.
+#include <boost/function/detail/prologue.hpp>
-#ifndef BOOST_FUNCTION_FUNCTION_TEMPLATE_HPP
-#define BOOST_FUNCTION_FUNCTION_TEMPLATE_HPP
-# include <cassert>
-# include <algorithm>
-# include <boost/config.hpp>
-# include <boost/function/function_base.hpp>
-# include <boost/mem_fn.hpp>
-#endif // BOOST_FUNCTION_FUNCTION_TEMPLATE_HPP
+#define BOOST_FUNCTION_TEMPLATE_PARMS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, typename T)
+
+#define BOOST_FUNCTION_TEMPLATE_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, T)
+
+#define BOOST_FUNCTION_PARM(J,I,D) BOOST_PP_CAT(T,I) BOOST_PP_CAT(a,I)
+
+#define BOOST_FUNCTION_PARMS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_PARM,BOOST_PP_EMPTY)
+
+#define BOOST_FUNCTION_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, a)
+
+#define BOOST_FUNCTION_ARG_TYPE(J,I,D) \
+ typedef BOOST_PP_CAT(T,I) BOOST_PP_CAT(arg, BOOST_PP_CAT(BOOST_PP_INC(I),_type));
+
+#define BOOST_FUNCTION_ARG_TYPES BOOST_PP_REPEAT(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_ARG_TYPE,BOOST_PP_EMPTY)
// Type of the default allocator
#ifndef BOOST_NO_STD_ALLOCATOR
// Comma if nonzero number of arguments
#if BOOST_FUNCTION_NUM_ARGS == 0
-# define BOOST_FUNCTION_COMMA
+# define BOOST_FUNCTION_COMMA
#else
# define BOOST_FUNCTION_COMMA ,
#endif // BOOST_FUNCTION_NUM_ARGS > 0
#define BOOST_FUNCTION_FUNCTION_INVOKER \
BOOST_JOIN(function_invoker,BOOST_FUNCTION_NUM_ARGS)
#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER \
- BOOST_JOIN(void_function_invoker,BOOST_FUNCTION_NUM_ARGS)
+ BOOST_JOIN(void_function_invoker,BOOST_FUNCTION_NUM_ARGS)
#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER \
BOOST_JOIN(function_obj_invoker,BOOST_FUNCTION_NUM_ARGS)
#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER \
>
struct BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
{
- static unusable invoke(any_pointer function_obj_ptr
+ static unusable invoke(any_pointer function_obj_ptr
BOOST_FUNCTION_COMMA
BOOST_FUNCTION_PARMS)
>
struct BOOST_FUNCTION_STATELESS_VOID_FUNCTION_OBJ_INVOKER
{
- static unusable invoke(any_pointer BOOST_FUNCTION_COMMA
+ static unusable invoke(any_pointer BOOST_FUNCTION_COMMA
BOOST_FUNCTION_PARMS)
{
template<
typename R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_PARMS,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy = empty_function_policy,
- typename Mixin = empty_function_mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
typename Allocator = BOOST_FUNCTION_DEFAULT_ALLOCATOR
>
class BOOST_FUNCTION_FUNCTION : public function_base
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- , public Mixin
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
{
- typedef typename detail::function::function_return_type<R>::type
+ typedef typename detail::function::function_return_type<R>::type
internal_result_type;
+ struct clear_type {};
+
public:
BOOST_STATIC_CONSTANT(int, args = BOOST_FUNCTION_NUM_ARGS);
-
+
+ // add signature for boost::lambda
+ template<typename Args>
+ struct sig
+ {
+ typedef internal_result_type type;
+ };
+
#if BOOST_FUNCTION_NUM_ARGS == 1
typedef T0 argument_type;
#elif BOOST_FUNCTION_NUM_ARGS == 2
#else
typedef internal_result_type result_type;
#endif // BOOST_NO_VOID_RETURNS
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typedef Policy policy_type;
- typedef Mixin mixin_type;
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
typedef Allocator allocator_type;
typedef BOOST_FUNCTION_FUNCTION self_type;
BOOST_FUNCTION_FUNCTION() : function_base()
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- , Mixin()
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
, invoker(0) {}
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- explicit BOOST_FUNCTION_FUNCTION(const Mixin& m) :
- function_base(),
- Mixin(m),
- invoker(0)
- {
- }
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
-
// MSVC chokes if the following two constructors are collapsed into
// one with a default parameter.
template<typename Functor>
- BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f) :
- function_base(),
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Mixin(),
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
+ BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f
+#ifndef BOOST_FUNCTION_NO_ENABLE_IF
+ ,typename detail::function::enable_if<
+ (::boost::type_traits::ice_not<
+ (is_same<Functor, int>::value)>::value),
+ int>::type = 0
+#endif // BOOST_FUNCTION_NO_ENABLE_IF
+ ) :
+ function_base(),
invoker(0)
{
this->assign_to(f);
}
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- template<typename Functor>
- BOOST_FUNCTION_FUNCTION(Functor f, const Mixin& m) :
- function_base(),
- Mixin(m),
- invoker(0)
+#ifndef BOOST_FUNCTION_NO_ENABLE_IF
+ BOOST_FUNCTION_FUNCTION(clear_type*) : function_base(), invoker(0) {}
+#else
+ BOOST_FUNCTION_FUNCTION(int zero) : function_base(), invoker(0)
{
- this->assign_to(f);
+ BOOST_ASSERT(zero == 0);
}
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
+#endif
BOOST_FUNCTION_FUNCTION(const BOOST_FUNCTION_FUNCTION& f) :
function_base(),
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Mixin(static_cast<const Mixin&>(f)),
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
invoker(0)
{
this->assign_to_own(f);
result_type operator()(BOOST_FUNCTION_PARMS) const
{
- assert(!this->empty());
-
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- policy_type policy;
- policy.precall(this);
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
+ if (this->empty())
+ boost::throw_exception(bad_function_call());
- internal_result_type result = invoker(function_base::functor
+ internal_result_type result = invoker(function_base::functor
BOOST_FUNCTION_COMMA
BOOST_FUNCTION_ARGS);
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- policy.postcall(this);
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
-
#ifndef BOOST_NO_VOID_RETURNS
return static_cast<result_type>(result);
#else
// The distinction between when to use BOOST_FUNCTION_FUNCTION and
// when to use self_type is obnoxious. MSVC cannot handle self_type as
// the return type of these assignment operators, but Borland C++ cannot
- // handle BOOST_FUNCTION_FUNCTION as the type of the temporary to
+ // handle BOOST_FUNCTION_FUNCTION as the type of the temporary to
// construct.
template<typename Functor>
- BOOST_FUNCTION_FUNCTION&
+#ifndef BOOST_FUNCTION_NO_ENABLE_IF
+ typename detail::function::enable_if<
+ (::boost::type_traits::ice_not<
+ (is_same<Functor, int>::value)>::value),
+ BOOST_FUNCTION_FUNCTION&>::type
+#else
+ BOOST_FUNCTION_FUNCTION&
+#endif
operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f)
{
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- self_type(f, static_cast<const Mixin&>(*this)).swap(*this);
-#else
self_type(f).swap(*this);
-#endif // BOOST_FUNCTION_NO_DEPRECATED
return *this;
}
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- template<typename Functor>
- BOOST_FUNCTION_DEPRECATED_PRE
- void set(Functor BOOST_FUNCTION_TARGET_FIX(const &) f)
+#ifndef BOOST_FUNCTION_NO_ENABLE_IF
+ BOOST_FUNCTION_FUNCTION& operator=(clear_type*)
{
- BOOST_FUNCTION_DEPRECATED_INNER
- self_type(f, static_cast<const Mixin&>(*this)).swap(*this);
+ this->clear();
+ return *this;
}
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
-
- // Assignment from another BOOST_FUNCTION_FUNCTION
- BOOST_FUNCTION_FUNCTION& operator=(const BOOST_FUNCTION_FUNCTION& f)
+#else
+ BOOST_FUNCTION_FUNCTION& operator=(int zero)
{
- if (&f == this)
- return *this;
-
- self_type(f).swap(*this);
+ BOOST_ASSERT(zero == 0);
+ this->clear();
return *this;
}
+#endif
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
// Assignment from another BOOST_FUNCTION_FUNCTION
- BOOST_FUNCTION_DEPRECATED_PRE
- void set(const BOOST_FUNCTION_FUNCTION& f)
+ BOOST_FUNCTION_FUNCTION& operator=(const BOOST_FUNCTION_FUNCTION& f)
{
- BOOST_FUNCTION_DEPRECATED_INNER
if (&f == this)
- return;
+ return *this;
self_type(f).swap(*this);
+ return *this;
}
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
void swap(BOOST_FUNCTION_FUNCTION& other)
{
std::swap(function_base::manager, other.manager);
std::swap(function_base::functor, other.functor);
std::swap(invoker, other.invoker);
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- std::swap(static_cast<Mixin&>(*this), static_cast<Mixin&>(other));
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
}
// Clear out a target, if there is one
void clear()
{
if (function_base::manager) {
- function_base::functor =
- function_base::manager(function_base::functor,
+ function_base::functor =
+ function_base::manager(function_base::functor,
detail::function::destroy_functor_tag);
}
typedef void (dummy::*safe_bool)();
public:
- operator safe_bool () const
+ operator safe_bool () const
{ return (this->empty())? 0 : &dummy::nonnull; }
bool operator!() const
if (!f.empty()) {
invoker = f.invoker;
function_base::manager = f.manager;
- function_base::functor =
+ function_base::functor =
f.manager(f.functor, detail::function::clone_functor_tag);
- }
+ }
}
template<typename Functor>
void assign_to(FunctionPtr f, detail::function::function_ptr_tag)
{
clear();
-
+
if (f) {
typedef typename detail::function::BOOST_FUNCTION_GET_FUNCTION_INVOKER<
FunctionPtr,
BOOST_FUNCTION_TEMPLATE_ARGS
>::type
invoker_type;
-
+
invoker = &invoker_type::invoke;
- function_base::manager =
+ function_base::manager =
&detail::function::functor_manager<FunctionPtr, Allocator>::manage;
- function_base::functor =
- function_base::manager(detail::function::any_pointer(
+ function_base::functor =
+ function_base::manager(detail::function::make_any_pointer(
// should be a reinterpret cast, but some compilers
// insist on giving cv-qualifiers to free functions
(void (*)())(f)
),
detail::function::clone_functor_tag);
}
- }
+ }
#if BOOST_FUNCTION_NUM_ARGS > 0
template<typename MemberPtr>
this->assign_to(mem_fn(f));
}
#endif // BOOST_FUNCTION_NUM_ARGS > 0
-
+
template<typename FunctionObj>
void assign_to(FunctionObj f, detail::function::function_obj_tag)
{
if (!detail::function::has_empty_target(addressof(f))) {
- typedef
+ typedef
typename detail::function::BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER<
FunctionObj,
R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_ARGS
>::type
invoker_type;
-
+
invoker = &invoker_type::invoke;
function_base::manager = &detail::function::functor_manager<
FunctionObj, Allocator>::manage;
#ifndef BOOST_NO_STD_ALLOCATOR
- typedef typename Allocator::template rebind<FunctionObj>::other
+ typedef typename Allocator::template rebind<FunctionObj>::other
allocator_type;
typedef typename allocator_type::pointer pointer_type;
allocator_type allocator;
#else
FunctionObj* new_f = new FunctionObj(f);
#endif // BOOST_NO_STD_ALLOCATOR
- function_base::functor =
- detail::function::any_pointer(static_cast<void*>(new_f));
+ function_base::functor =
+ detail::function::make_any_pointer(static_cast<void*>(new_f));
}
}
-
+
template<typename FunctionObj>
- void assign_to(const reference_wrapper<FunctionObj>& f,
+ void assign_to(const reference_wrapper<FunctionObj>& f,
detail::function::function_obj_ref_tag)
{
if (!detail::function::has_empty_target(f.get_pointer())) {
- typedef
+ typedef
typename detail::function::BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER<
FunctionObj,
R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_ARGS
>::type
invoker_type;
-
+
invoker = &invoker_type::invoke;
function_base::manager = &detail::function::trivial_manager;
- function_base::functor =
+ function_base::functor =
function_base::manager(
- detail::function::any_pointer(
+ detail::function::make_any_pointer(
const_cast<FunctionObj*>(f.get_pointer())),
detail::function::clone_functor_tag);
}
}
-
+
template<typename FunctionObj>
void assign_to(FunctionObj, detail::function::stateless_function_obj_tag)
{
- typedef
+ typedef
typename detail::function::
BOOST_FUNCTION_GET_STATELESS_FUNCTION_OBJ_INVOKER<
FunctionObj,
invoker_type;
invoker = &invoker_type::invoke;
function_base::manager = &detail::function::trivial_manager;
- function_base::functor = detail::function::any_pointer(this);
+ function_base::functor = detail::function::make_any_pointer(this);
}
typedef internal_result_type (*invoker_type)(detail::function::any_pointer
BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_ARGS);
-
+
invoker_type invoker;
};
template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS ,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- typename Policy, typename Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
typename Allocator>
inline void swap(BOOST_FUNCTION_FUNCTION<
R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_ARGS ,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy,
- Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
Allocator
>& f1,
BOOST_FUNCTION_FUNCTION<
- R BOOST_FUNCTION_COMMA
+ R BOOST_FUNCTION_COMMA
BOOST_FUNCTION_TEMPLATE_ARGS,
-#ifndef BOOST_FUNCTION_NO_DEPRECATED
- Policy,
- Mixin,
-#endif // ndef BOOST_FUNCTION_NO_DEPRECATED
Allocator
>& f2)
{
f1.swap(f2);
}
-}
+
+#if !defined (BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) \
+ && (BOOST_STRICT_CONFIG || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540)
+
+#if BOOST_FUNCTION_NUM_ARGS == 0
+#define BOOST_FUNCTION_PARTIAL_SPEC R (void)
+#else
+#define BOOST_FUNCTION_PARTIAL_SPEC R (BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS,T))
+#endif
+
+template<typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS,
+ typename Allocator>
+class function<BOOST_FUNCTION_PARTIAL_SPEC, Allocator>
+ : public BOOST_FUNCTION_FUNCTION<R, BOOST_FUNCTION_TEMPLATE_ARGS
+ BOOST_FUNCTION_COMMA Allocator>
+{
+ typedef BOOST_FUNCTION_FUNCTION<R, BOOST_FUNCTION_TEMPLATE_ARGS
+ BOOST_FUNCTION_COMMA Allocator> base_type;
+ typedef function self_type;
+
+ struct clear_type {};
+
+public:
+ typedef typename base_type::allocator_type allocator_type;
+
+ function() : base_type() {}
+
+ template<typename Functor>
+ function(Functor f
+#ifndef BOOST_FUNCTION_NO_ENABLE_IF
+ ,typename detail::function::enable_if<
+ (::boost::type_traits::ice_not<
+ (is_same<Functor, int>::value)>::value),
+ int>::type = 0
+#endif
+ ) :
+ base_type(f)
+ {
+ }
+
+#ifndef BOOST_FUNCTION_NO_ENABLE_IF
+ function(clear_type*) : base_type() {}
+#endif
+
+ function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
+
+ function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
+
+ self_type& operator=(const self_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+
+ template<typename Functor>
+#ifndef BOOST_FUNCTION_NO_ENABLE_IF
+ typename detail::function::enable_if<
+ (::boost::type_traits::ice_not<
+ (is_same<Functor, int>::value)>::value),
+ self_type&>::type
+#else
+ self_type&
+#endif
+ operator=(Functor f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+
+#ifndef BOOST_FUNCTION_NO_ENABLE_IF
+ self_type& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+#endif
+
+ self_type& operator=(const base_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+};
+
+#undef BOOST_FUNCTION_PARTIAL_SPEC
+#endif // have partial specialization
+
+} // end namespace boost
// Cleanup after ourselves...
#undef BOOST_FUNCTION_DEFAULT_ALLOCATOR
#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_GET_STATELESS_FUNCTION_OBJ_INVOKER
#undef BOOST_FUNCTION_GET_MEM_FUNCTION_INVOKER
+#undef BOOST_FUNCTION_TEMPLATE_PARMS
+#undef BOOST_FUNCTION_TEMPLATE_ARGS
+#undef BOOST_FUNCTION_PARMS
+#undef BOOST_FUNCTION_PARM
+#undef BOOST_FUNCTION_ARGS
+#undef BOOST_FUNCTION_ARG_TYPE
+#undef BOOST_FUNCTION_ARG_TYPES
#
# Boost.Function library
#
-# Copyright (C) 2001 Doug Gregor (gregod@cs.rpi.edu)
+# Copyright (C) 2001-2003 Doug Gregor (gregod@cs.rpi.edu)
#
# Permission to copy, use, sell and distribute this software is granted
# provided this copyright notice appears in all copies.
$totalNumArgs = $ARGV[0];
for ($numArgs = 0; $numArgs <= $totalNumArgs; ++$numArgs) {
open OUT, ">function$numArgs.hpp";
- print OUT "// Boost.Function library\n";
- print OUT "//\n";
- print OUT "// Copyright (C) 2001 Doug Gregor (gregod\@cs.rpi.edu)\n";
- print OUT "//\n";
- print OUT "// Permission to copy, use, sell and distribute this software is granted\n";
- print OUT "// provided this copyright notice appears in all copies.\n";
- print OUT "// Permission to modify the code and to distribute modified code is granted\n";
- print OUT "// provided this copyright notice appears in all copies, and a notice\n";
- print OUT "// that the code was modified is included with the copyright notice.\n";
- print OUT "//\n";
- print OUT "// This software is provided \"as is\" without express or implied warranty,\n";
- print OUT "// and with no claim as to its suitability for any purpose.\n";
- print OUT " \n";
- print OUT "// For more information, see http://www.boost.org\n";
- print OUT "\n";
- print OUT "#ifndef BOOST_FUNCTION_FUNCTION" . $numArgs . "_HEADER\n";
- print OUT "#define BOOST_FUNCTION_FUNCTION" , $numArgs . "_HEADER\n";
- print OUT "\n";
print OUT "#define BOOST_FUNCTION_NUM_ARGS $numArgs\n";
-
- $templateParms = "";
- for ($i = 0; $i < $numArgs; ++$i) {
- if ($i > 0) {
- $templateParms .= ", ";
- }
- $templateParms .= "typename T$i";
- }
- print OUT "#define BOOST_FUNCTION_TEMPLATE_PARMS $templateParms\n";
-
- $_ = $templateParms;
- s/typename //g;
- $templateArgs = $_;
- print OUT "#define BOOST_FUNCTION_TEMPLATE_ARGS $templateArgs\n";
-
- $parms = "";
- for ($i = 0; $i < $numArgs; ++$i) {
- if ($i > 0) {
- $parms .= ", ";
- }
- $parms .= "T$i a$i";
- }
- print OUT "#define BOOST_FUNCTION_PARMS $parms\n";
-
- $args = "";
- for ($i = 0; $i < $numArgs; ++$i) {
- if ($i > 0) {
- $args .= ", ";
- }
- $args .= "a$i";
- }
- print OUT "#define BOOST_FUNCTION_ARGS $args\n";
-
- $not0Parms = "";
- for ($i = 1; $i < $numArgs; ++$i) {
- if ($i > 1) {
- $not0Parms .= ", ";
- }
- $not0Parms .= "T$i a$i";
- }
- print OUT "#define BOOST_FUNCTION_NOT_0_PARMS $not0Parms\n";
-
- $not0Args = "";
- for ($i = 1; $i < $numArgs; ++$i) {
- if ($i > 1) {
- $not0Args .= ", ";
- }
- $not0Args .= "a$i";
- }
- print OUT "#define BOOST_FUNCTION_NOT_0_ARGS $not0Args\n";
-
- print OUT "\n";
- print OUT "#include <boost/function/function_template.hpp>\n";
- print OUT "\n";
- print OUT "#undef BOOST_FUNCTION_NOT_0_ARGS\n";
- print OUT "#undef BOOST_FUNCTION_NOT_0_PARMS\n";
- print OUT "#undef BOOST_FUNCTION_ARGS\n";
- print OUT "#undef BOOST_FUNCTION_PARMS\n";
- print OUT "#undef BOOST_FUNCTION_TEMPLATE_ARGS\n";
- print OUT "#undef BOOST_FUNCTION_TEMPLATE_PARMS\n";
+ print OUT "#include <boost/function/detail/maybe_include.hpp>\n";
print OUT "#undef BOOST_FUNCTION_NUM_ARGS\n";
- print OUT "\n";
- print OUT "#endif // BOOST_FUNCTION_FUNCTION" . $numArgs . "_HEADER\n";
close OUT;
}
// ------------------------------------------------------------------------------
// Boost functional.hpp header file
-// See http://www.boost.org for updates, documentation, and revision history.
+// See http://www.boost.org/libs/functional for documentation.
// ------------------------------------------------------------------------------
// Copyright (c) 2000
// Cadenza New Zealand Ltd
// purpose. It is provided "as is" without express or implied
// warranty.
// ------------------------------------------------------------------------------
-// $Id: functional.hpp,v 1.3 2000/11/22 09:04:28 mark_rodgers Exp $
+// $Id: functional.hpp,v 1.4 2002/12/27 16:51:52 beman_dawes Exp $
// ------------------------------------------------------------------------------
#ifndef BOOST_FUNCTIONAL_HPP
// 15 Nov 2001 Jens Maurer
// created.
+// See http://www.boost.org/libs/utility/iterator_adaptors.htm for documentation.
+
#ifndef BOOST_ITERATOR_ADAPTOR_GENERATOR_ITERATOR_HPP
#define BOOST_ITERATOR_ADAPTOR_GENERATOR_ITERATOR_HPP
--- /dev/null
+// Copyright Peter Dimov and David Abrahams 2002. Permission to copy,
+// use, modify, sell and distribute this software is granted provided
+// this copyright notice appears in all copies of the source. This
+// software is provided "as is" without express or implied warranty,
+// and with no claim as to its suitability for any purpose.
+#ifndef GET_POINTER_DWA20021219_HPP
+# define GET_POINTER_DWA20021219_HPP
+
+# include <memory>
+
+namespace boost {
+
+// get_pointer(p) extracts a ->* capable pointer from p
+
+template<class T> T * get_pointer(T * p)
+{
+ return p;
+}
+
+// get_pointer(shared_ptr<T> const & p) has been moved to shared_ptr.hpp
+
+template<class T> T * get_pointer(std::auto_ptr<T> const& p)
+{
+ return p.get();
+}
+
+
+} // namespace boost
+
+#endif // GET_POINTER_DWA20021219_HPP
// express or implied warranty, and with no claim as to its suitability for
// any purpose.
-// See http://www.boost.org for most recent version including documentation.
+// See http://www.boost.org/libs/integer for documentation.
// Revision History
// 22 Sep 01 Added value-based integer templates. (Daryle Walker)
// express or implied warranty, and with no claim as to its suitability for
// any purpose.
-// See http://www.boost.org for most recent version including documentation.
+// See http://www.boost.org/libs/integer for documentation.
#ifndef BOOST_INTEGER_FWD_HPP
#define BOOST_INTEGER_FWD_HPP
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
- * $Id: integer_traits.hpp,v 1.19.4.1 2002/09/24 11:38:33 johnmaddock Exp $
+ * $Id: integer_traits.hpp,v 1.22 2002/12/27 16:51:52 beman_dawes Exp $
*
* Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers
*/
+// See http://www.boost.org/libs/integer for documentation.
+
+
#ifndef BOOST_INTEGER_TRAITS_HPP
#define BOOST_INTEGER_TRAITS_HPP
#elif defined(__BORLANDC__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__BEOS__) && defined(__GNUC__))
// No WCHAR_MIN and WCHAR_MAX, whar_t is short and unsigned:
public detail::integer_traits_base<wchar_t, 0, 0xffff>
-#elif (defined(__sgi) && (!defined(__SGI_STL_PORT) || __SGI_STL_PORT < 0x400)) || (defined __APPLE__) || (defined(__FreeBSD__) && defined(__GNUC__)) || (defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 3) && !defined(__SGI_STL_PORT))
+#elif (defined(__sgi) && (!defined(__SGI_STL_PORT) || __SGI_STL_PORT < 0x400))\
+ || (defined __APPLE__)\
+ || (defined(__OpenBSD__) && defined(__GNUC__))\
+ || (defined(__FreeBSD__) && defined(__GNUC__))\
+ || (defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 3) && !defined(__SGI_STL_PORT))
// No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as int.
// - SGI MIPSpro with native library
// - gcc 3.x on HP-UX
# pragma warning(disable:4284) // odd return type for operator->
#endif
-#include <functional> // std::less
+#include <boost/assert.hpp>
+#include <boost/detail/workaround.hpp>
+
+#include <functional> // for std::less
+#include <iosfwd> // for std::basic_ostream
+
namespace boost
{
public:
+ typedef T element_type;
+
intrusive_ptr(): p_(0)
{
}
- intrusive_ptr(T * p): p_(p)
+ intrusive_ptr(T * p, bool add_ref = true): p_(p)
{
- if(p_ != 0) intrusive_ptr_add_ref(p_);
- }
-
- ~intrusive_ptr()
- {
- if(p_ != 0) intrusive_ptr_release(p_);
+ if(p_ != 0 && add_ref) intrusive_ptr_add_ref(p_);
}
#if !defined(BOOST_NO_MEMBER_TEMPLATES) || defined(BOOST_MSVC6_MEMBER_TEMPLATES)
if(p_ != 0) intrusive_ptr_add_ref(p_);
}
+ ~intrusive_ptr()
+ {
+ if(p_ != 0) intrusive_ptr_release(p_);
+ }
+
#if !defined(BOOST_NO_MEMBER_TEMPLATES) || defined(BOOST_MSVC6_MEMBER_TEMPLATES)
template<class U> intrusive_ptr & operator=(intrusive_ptr<U> const & rhs)
return *this;
}
- void swap(intrusive_ptr & rhs)
- {
- T * tmp = p_;
- p_ = rhs.p_;
- rhs.p_ = tmp;
- }
-
T * get() const
{
return p_;
return p_;
}
- bool empty() const
+ typedef T * (intrusive_ptr::*unspecified_bool_type) () const;
+
+ operator unspecified_bool_type () const
{
- return p_ == 0;
+ return p_ == 0? 0: &intrusive_ptr::get;
}
- typedef bool (intrusive_ptr::*bool_type) () const;
+ // operator! is a Borland-specific workaround
+ bool operator! () const
+ {
+ return p_ == 0;
+ }
- operator bool_type () const
+ void swap(intrusive_ptr & rhs)
{
- return p_ == 0? 0: &intrusive_ptr::empty;
+ T * tmp = p_;
+ p_ = rhs.p_;
+ rhs.p_ = tmp;
}
private:
T * p_;
};
-template<class T> void swap(intrusive_ptr<T> & lhs, intrusive_ptr<T> & rhs)
-{
- lhs.swap(rhs);
-}
-
-template<class T, class U> intrusive_ptr<T> shared_dynamic_cast(intrusive_ptr<U> const & p)
-{
- return dynamic_cast<T *>(p.get());
-}
-
-template<class T, class U> intrusive_ptr<T> shared_static_cast(intrusive_ptr<U> const & p)
-{
- return static_cast<T *>(p.get());
-}
-
template<class T, class U> inline bool operator==(intrusive_ptr<T> const & a, intrusive_ptr<U> const & b)
{
return a.get() == b.get();
return a.get() != b.get();
}
-template<class T> inline bool operator<(intrusive_ptr<T> const & a, intrusive_ptr<T> const & b)
-{
- return std::less<T *>(a.get(), b.get());
-}
-
template<class T> inline bool operator==(intrusive_ptr<T> const & a, T * b)
{
return a.get() == b;
return a != b.get();
}
+#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96
+
+// Resolve the ambiguity between our op!= and the one in rel_ops
+
+template<class T> inline bool operator!=(intrusive_ptr<T> const & a, intrusive_ptr<T> const & b)
+{
+ return a.get() != b.get();
+}
+
+#endif
+
+template<class T> inline bool operator<(intrusive_ptr<T> const & a, intrusive_ptr<T> const & b)
+{
+ return std::less<T *>()(a.get(), b.get());
+}
+
+template<class T> void swap(intrusive_ptr<T> & lhs, intrusive_ptr<T> & rhs)
+{
+ lhs.swap(rhs);
+}
+
// mem_fn support
template<class T> T * get_pointer(intrusive_ptr<T> const & p)
return p.get();
}
+template<class T, class U> intrusive_ptr<T> static_pointer_cast(intrusive_ptr<U> const & p)
+{
+ return static_cast<T *>(p.get());
+}
+
+template<class T, class U> intrusive_ptr<T> dynamic_pointer_cast(intrusive_ptr<U> const & p)
+{
+ return dynamic_cast<T *>(p.get());
+}
+
+// operator<<
+
+#if defined(__GNUC__) && (__GNUC__ < 3)
+
+template<class Y> std::ostream & operator<< (std::ostream & os, intrusive_ptr<Y> const & p)
+{
+ os << p.get();
+ return os;
+}
+
+#else
+
+# if BOOST_WORKAROUND(BOOST_MSVC, <= 1200 && __SGI_STL_PORT)
+// MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL
+using std::basic_ostream;
+template<class E, class T, class Y> basic_ostream<E, T> & operator<< (basic_ostream<E, T> & os, intrusive_ptr<Y> const & p)
+# else
+template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, intrusive_ptr<Y> const & p)
+# endif
+{
+ os << p.get();
+ return os;
+}
+
+#endif
+
} // namespace boost
#ifdef BOOST_MSVC
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
-// See http://www.boost.org for most recent version including documentation.
+// See http://www.boost.org/libs/utility for documentation.
// Revision History
// 12 Jan 01 added <cstddef> for std::ptrdiff_t (Jens Maurer)
// copyright notice appears in all copies. This software is provided
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
-//
+
+// See http://www.boost.org/libs/utility/iterator_adaptors.htm for documentation.
+
// Revision History:
// 01 Feb 2002 Jeremy Siek
# include <boost/type_traits/conversion_traits.hpp>
# include <boost/detail/iterator.hpp>
# include <boost/detail/select_type.hpp>
+# include <boost/detail/workaround.hpp>
-// I was having some problems with VC6. I couldn't tell whether our hack for
-// stock GCC was causing problems so I needed an easy way to turn it on and
-// off. Now we can test the hack with various compilers and still have an
-// "out" if it doesn't work. -dwa 7/31/00
-# if __GNUC__ == 2 && __GNUC_MINOR__ <= 96 && !defined(__STL_USE_NAMESPACES)
+# if BOOST_WORKAROUND(__GNUC__, == 2) && __GNUC_MINOR__ <= 96 && !defined(__STL_USE_NAMESPACES)
# define BOOST_RELOPS_AMBIGUITY_BUG 1
# endif
// An associative list is a list of key-value pairs. The list is
// built out of cons_type's and is terminated by end_of_list.
-# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || defined(__BORLANDC__)
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || BOOST_WORKAROUND(__BORLANDC__, != 0)
template <class AssocList, class Key>
struct find_param;
enum { value = is_convertible< typename add_reference< Value >::type, add_reference< named_template_param_base >::type >::value };
};
-# if defined(__MWERKS__) && __MWERKS__ <= 0x2406 // workaround for broken is_convertible implementation
+# if BOOST_WORKAROUND(__MWERKS__, <= 0x2407) // workaround for broken is_convertible implementation
template <class T> struct is_named_parameter<value_type_is<T> > { enum { value = true }; };
template <class T> struct is_named_parameter<reference_is<T> > { enum { value = true }; };
template <class T> struct is_named_parameter<pointer_is<T> > { enum { value = true }; };
template <class Key, class Value>
struct make_arg {
-# ifdef __BORLANDC__
+# if BOOST_WORKAROUND(__BORLANDC__, > 0)
// Borland C++ doesn't like the extra indirection of is_named_parameter
typedef typename
if_true<(is_convertible<Value,named_template_param_base>::value)>::
// This macro definition is only temporary in this file
-# if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
+# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
# define BOOST_ARG_DEPENDENT_TYPENAME typename
# else
# define BOOST_ARG_DEPENDENT_TYPENAME
policies().initialize(base());
}
-#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 || defined(__BORLANDC__)
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(__BORLANDC__, > 0)
// This is required to prevent a bug in how VC++ generates
// the assignment operator for compressed_pair
iterator_adaptor& operator= (const iterator_adaptor& x) {
return policies().dereference(*this);
}
-#ifdef BOOST_MSVC
+#if BOOST_WORKAROUND(BOOST_MSVC, > 0)
# pragma warning(push)
# pragma warning( disable : 4284 )
#endif
operator->() const
{ return detail::operator_arrow(*this, iterator_category()); }
-#ifdef BOOST_MSVC
+#if BOOST_WORKAROUND(BOOST_MSVC, > 0)
# pragma warning(pop)
#endif
{ return *(*this + n); }
self& operator++() {
-#if !defined(__MWERKS__) || __MWERKS__ >= 0x2405
+#if !BOOST_WORKAROUND(__MWERKS__, < 0x2405)
policies().increment(*this);
#else
// Odd bug, MWERKS couldn't deduce the type for the member template
self operator++(int) { self tmp(*this); ++*this; return tmp; }
self& operator--() {
-#if !defined(__MWERKS__) || __MWERKS__ >= 0x2405
+#if !BOOST_WORKAROUND(__MWERKS__, < 0x2405)
policies().decrement(*this);
#else
policies().decrement<self>(*this);
};
namespace detail {
-# if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 // strangely instantiated even when unused! Maybe try a recursive template someday ;-)
+# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) // strangely instantiated even when unused! Maybe try a recursive template someday ;-)
template <class T>
struct traits_of_value_type {
typedef typename boost::detail::iterator_traits<T>::value_type outer_value;
template <class OuterIterator, // Mutable or Immutable, does not matter
class Value
-#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
+#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
= BOOST_ARG_DEPENDENT_TYPENAME detail::traits_of_value_type<
OuterIterator>::value_type
#endif
, class Reference
-#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
+#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
= BOOST_ARG_DEPENDENT_TYPENAME detail::traits_of_value_type<
OuterIterator>::reference
#else
, class Category = BOOST_ARG_DEPENDENT_TYPENAME boost::detail::iterator_traits<
OuterIterator>::iterator_category
, class Pointer
-#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
+#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
= BOOST_ARG_DEPENDENT_TYPENAME detail::traits_of_value_type<
OuterIterator>::pointer
#else
template <class OuterIterator, // Mutable or Immutable, does not matter
class Value
-#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
+#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
= BOOST_ARG_DEPENDENT_TYPENAME detail::traits_of_value_type<
OuterIterator>::value_type
#endif
, class Reference
-#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
+#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
= BOOST_ARG_DEPENDENT_TYPENAME detail::traits_of_value_type<
OuterIterator>::reference
#else
, class Category = BOOST_ARG_DEPENDENT_TYPENAME boost::detail::iterator_traits<
OuterIterator>::iterator_category
, class Pointer
-#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
+#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
= BOOST_ARG_DEPENDENT_TYPENAME detail::traits_of_value_type<
OuterIterator>::pointer
#else
Value, ConstReference,Category,ConstPointer>::type const_iterator;
};
-#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
+#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
template <class OuterIterator>
inline typename indirect_iterator_generator<OuterIterator>::type
make_indirect_iterator(OuterIterator base)
template <class Iterator>
struct non_bidirectional_category
{
-# if !defined(__MWERKS__) || __MWERKS__ > 0x2406
+# if !BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
typedef typename reduce_to_base_class<
std::forward_iterator_tag,
typename iterator_traits<Iterator>::iterator_category
class filter_iterator_generator {
BOOST_STATIC_CONSTANT(bool, is_bidirectional
= (boost::is_convertible<Category*, std::bidirectional_iterator_tag*>::value));
-#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 // I don't have any idea why this occurs, but it doesn't seem to hurt too badly.
+#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) // I don't have any idea why this occurs, but it doesn't seem to hurt too badly.
BOOST_STATIC_ASSERT(!is_bidirectional);
#endif
typedef filter_iterator_policies<Predicate,Iterator> policies_type;
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-// For more information, see http://www.boost.org
+// For more information, see http://www.boost.org/libs/signals
#ifndef BOOST_LAST_VALUE_HPP
#define BOOST_LAST_VALUE_HPP
// boost lexical_cast.hpp header -------------------------------------------//
-// See http://www.boost.org for most recent version including documentation.
+// See http://www.boost.org/libs/conversion for documentation.
#ifndef BOOST_LEXICAL_CAST_INCLUDED
#define BOOST_LEXICAL_CAST_INCLUDED
//
// use this header as a workaround for missing <limits>
+// See http://www.boost.org/libs/utility/limits.html for documentation.
+
#ifndef BOOST_LIMITS
#define BOOST_LIMITS
//
#include <boost/config.hpp>
+#include <boost/get_pointer.hpp>
namespace boost
{
-// get_pointer(p) extracts a ->* capable pointer from p
-
-template<class T> T * get_pointer(T * p)
-{
- return p;
-}
-
-// get_pointer(shared_ptr<T> const & p) has been moved to shared_ptr.hpp
-
#if defined(BOOST_NO_VOID_RETURNS)
#define BOOST_MEM_FN_CLASS_F , class F
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost mpl/aux_/algorithm_namespace.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2002
+// Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_AUX_ALGORITHM_NAMESPACE_HPP_INCLUDED
+#define BOOST_MPL_AUX_ALGORITHM_NAMESPACE_HPP_INCLUDED
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+
+# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_PREFIX algo_::
+# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN namespace algo_ {
+# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END } using namespace algo_;
+
+#else
+
+# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_PREFIX /**/
+# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN /**/
+# define BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END /**/
+
+#endif
+
+#endif // BOOST_MPL_AUX_ALGORITHM_NAMESPACE_HPP_INCLUDED
#define BOOST_MPL_AUX_ARITY_HPP_INCLUDED
#include "boost/mpl/aux_/config/dtp.hpp"
+#include "boost/mpl/aux_/config/nttp.hpp"
#if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
// agurt, 15/mar/02: it's possible to implement the template so that it will
// "just work" and do not require any specialization, but not on the compilers
// that require the arity workaround in the first place
-template< typename F, int N >
+template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) >
struct arity
{
BOOST_STATIC_CONSTANT(int, value = N);
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost mpl/aux_/config/ctps.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2000-02
+// Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED
+#define BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED
+
+#include "boost/config.hpp"
+
+#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
+ && !defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION)
+# define BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION
+#endif
+
+// BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION is defined in "boost/config.hpp"
+
+#endif // BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost mpl/aux_/config/eti.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2001-02
+// Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED
+#define BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED
+
+#include "boost/config.hpp"
+
+// flags for MSVC 6.5's so-called "early template instantiation bug"
+#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300
+# if BOOST_MSVC < 1300
+# define BOOST_MPL_MSVC_60_ETI_BUG
+# endif
+# define BOOST_MPL_MSVC_ETI_BUG
+#endif
+
+#endif // BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost mpl/aux_/config/msvc.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2000-02
+// Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED
+#define BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED
+
+// BOOST_MSVC is defined here:
+#include "boost/config.hpp"
+
+#endif // BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost mpl/aux_/config/msvc_typename.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2000-02
+// Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED
+#define BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED
+
+#include "boost/config.hpp"
+
+#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
+# define BOOST_MSVC_TYPENAME
+#else
+# define BOOST_MSVC_TYPENAME typename
+#endif
+
+#endif // BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost mpl/aux_/config/nttp.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2001-02
+// Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED
+#define BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED
+
+#include "boost/mpl/aux_/config/msvc.hpp"
+
+// MSVC 6.5 ICE-s on the code as simple as this:
+//
+// namespace std {
+// template< typename Char > struct string;
+// }
+//
+// void foo(std::string<char>);
+//
+// namespace boost { namespace mpl {
+// template< int > struct arg;
+// }}
+//
+// fortunately, a workaround is simple as well:
+//
+// typedef int nttp_int;
+// template< nttp_int > struct arg;
+
+#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
+
+#include "boost/preprocessor/cat.hpp"
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+namespace boost { namespace mpl {
+typedef int nttp_int;
+typedef long nttp_long;
+}}
+#endif
+
+# define BOOST_MPL_AUX_NTTP_DECL(T, x) BOOST_PP_CAT(nttp_,T) x /**/
+
+#else
+# define BOOST_MPL_AUX_NTTP_DECL(T, x) T x /**/
+#endif
+
+#endif // BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost mpl/aux_/config/static_constant.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2000-02
+// Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED
+#define BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+// BOOST_STATIC_CONSTANT is defined here:
+# include "boost/config.hpp"
+#endif
+
+#endif // BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost mpl/aux_/config/workaround.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2002
+// Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED
+#define BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED
+
+#include "boost/detail/workaround.hpp"
+
+#endif // BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost mpl/aux_/has_xxx.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2002
+// Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_AUX_HAS_XXX_HPP_INCLUDED
+#define BOOST_MPL_AUX_HAS_XXX_HPP_INCLUDED
+
+#include "boost/mpl/aux_/type_wrapper.hpp"
+#include "boost/mpl/aux_/yes_no.hpp"
+#include "boost/mpl/aux_/config/msvc_typename.hpp"
+#include "boost/mpl/aux_/config/overload_resolution.hpp"
+#include "boost/mpl/aux_/config/static_constant.hpp"
+
+#if !defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION) && (!defined(__GNUC__) || __GNUC__ == 3)
+
+# if (!defined(BOOST_MSVC) || BOOST_MSVC > 1300)
+
+// the implementation below is based on a USENET newsgroup's posting by
+// Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST)
+
+# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
+template< typename T > \
+boost::mpl::aux::yes_tag \
+trait##_helper( \
+ boost::mpl::aux::type_wrapper<T> const volatile* \
+ , boost::mpl::aux::type_wrapper<BOOST_MSVC_TYPENAME T::name>* = 0 \
+ ); \
+\
+boost::mpl::aux::no_tag \
+trait##_helper(...); \
+\
+template< typename T > \
+struct trait \
+{ \
+ typedef boost::mpl::aux::type_wrapper<T> t_; \
+ BOOST_STATIC_CONSTANT(bool, value = \
+ sizeof((trait##_helper)(static_cast<t_*>(0))) \
+ == sizeof(boost::mpl::aux::yes_tag) \
+ ); \
+}; \
+/**/
+
+# else
+
+#include "boost/mpl/if.hpp"
+#include "boost/mpl/bool.hpp"
+#include "boost/preprocessor/cat.hpp"
+
+// agurt, 11/sep/02: MSVC version, based on a USENET newsgroup's posting by
+// John Madsen (comp.lang.c++.moderated, 1999-11-12 19:17:06 GMT);
+// note that the code is _not_ standard-conforming, but it works,
+// and it resolves some nasty ICE cases with the above implementation
+
+// Modified dwa 8/Oct/02 to handle reference types.
+
+namespace boost { namespace mpl { namespace aux {
+
+struct has_xxx_tag;
+
+template< typename T >
+struct msvc_is_incomplete
+{
+ struct incomplete_;
+ BOOST_STATIC_CONSTANT(bool, value =
+ sizeof(void (T::*)()) == sizeof(void (incomplete_::*)())
+ );
+};
+
+template<>
+struct msvc_is_incomplete<int>
+{
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+}}}
+
+# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \
+template< typename T, typename name = ::boost::mpl::aux::has_xxx_tag > \
+struct BOOST_PP_CAT(trait,_impl) : T \
+{ \
+ private: \
+ static boost::mpl::aux::no_tag test(void(*)(::boost::mpl::aux::has_xxx_tag)); \
+ static boost::mpl::aux::yes_tag test(...); \
+\
+ public: \
+ BOOST_STATIC_CONSTANT(bool, value = \
+ sizeof(test(static_cast<void(*)(name)>(0))) \
+ != sizeof(boost::mpl::aux::no_tag) \
+ ); \
+}; \
+\
+template< typename T > 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); \
+}; \
+/**/
+
+#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
+
+# endif // BOOST_MSVC > 1300
+
+#else
+
+// agurt, 11/jan/03: signals a stub-only implementation
+# define BOOST_NO_MPL_AUX_HAS_XXX
+
+# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_value) \
+template< typename T > \
+struct trait \
+{ \
+ BOOST_STATIC_CONSTANT(bool, value = default_value); \
+}; \
+/**/
+
+#endif // BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION
+
+#define BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \
+BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_##name, name, false) \
+/**/
+
+#endif // BOOST_MPL_AUX_HAS_XXX_HPP_INCLUDED
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost mpl/aux_/ice_cast.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2001-03
+// Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_AUX_ICE_CAST_HPP_INCLUDED
+#define BOOST_MPL_AUX_ICE_CAST_HPP_INCLUDED
+
+#include "boost/mpl/aux_/config/workaround.hpp"
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \
+ || BOOST_WORKAROUND(__GNUC__, < 3)
+# define BOOST_MPL_AUX_ICE_CAST(T, expr) T(expr)
+#elif BOOST_WORKAROUND(__MWERKS__, <= 0x3001)
+# define BOOST_MPL_AUX_ICE_CAST(T, expr) (T)(expr)
+#else
+# define BOOST_MPL_AUX_ICE_CAST(T, expr) static_cast<T>(expr)
+#endif
+
+#endif // BOOST_MPL_AUX_ICE_CAST_HPP_INCLUDED
--- /dev/null
+
+// + file: boost/mpl/aux_/intergal_wrapper.hpp
+// + last modified: 27/jan/03
+
+// Copyright (c) 2000-03
+// Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// no include guards, the header is intended for multiple inclusion!
+
+#include "boost/mpl/aux_/ice_cast.hpp"
+#include "boost/mpl/aux_/config/nttp.hpp"
+#include "boost/mpl/aux_/config/static_constant.hpp"
+#include "boost/mpl/aux_/config/workaround.hpp"
+
+#include "boost/preprocessor/cat.hpp"
+
+#if !defined(AUX_WRAPPER_NAME)
+# define AUX_WRAPPER_NAME BOOST_PP_CAT(AUX_WRAPPER_VALUE_TYPE,_)
+# define AUX_WRAPPER_PARAMS(N) BOOST_MPL_AUX_NTTP_DECL(AUX_WRAPPER_VALUE_TYPE, N)
+# define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< value >
+#endif
+
+namespace boost { namespace mpl {
+
+template< AUX_WRAPPER_PARAMS(N) >
+struct AUX_WRAPPER_NAME
+{
+ BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, value = N);
+ typedef AUX_WRAPPER_NAME type;
+ typedef AUX_WRAPPER_VALUE_TYPE value_type;
+
+ // have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC),
+ // while some other don't like 'value + 1' (Borland), and some don't like
+ // either
+#if BOOST_WORKAROUND(__EDG_VERSION__, <= 243)
+ private:
+ BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_ICE_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)));
+ BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_ICE_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)));
+ public:
+ typedef AUX_WRAPPER_INST(next_value) next;
+ typedef AUX_WRAPPER_INST(prior_value) prior;
+#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \
+ || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \
+ || BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(53800))
+ typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_ICE_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)) ) next;
+ typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_ICE_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)) ) prior;
+#else
+ typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_ICE_CAST(AUX_WRAPPER_VALUE_TYPE, (value + 1)) ) next;
+ typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_ICE_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior;
+#endif
+
+ // enables uniform function call syntax for families of overloaded
+ // functions that return objects of both arithmetic ('int', 'long',
+ // 'double', etc.) and wrapped integral types (for an example, see
+ // "mpl/example/power.cpp")
+ operator AUX_WRAPPER_VALUE_TYPE() const { return this->value; }
+};
+
+}} // namespace boost::mpl
+
+#undef AUX_WRAPPER_NAME
+#undef AUX_WRAPPER_PARAMS
+#undef AUX_WRAPPER_INST
+#undef AUX_WRAPPER_VALUE_TYPE
#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)
+# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) /**/
# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i,name,params) /**/
#else
typedef_ param BOOST_PP_CAT(arg,BOOST_PP_INC(i)); \
/**/
-# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i,name,params) \
- struct rebind \
+// agurt, 18/jan/03: old EDG-based compilers actually enforce 11.4 para 9
+// (in strict mode), so we have to provide an alternative to the
+// MSVC-optimized implementation
+#if defined(__EDG_VERSION__) && !defined(BOOST_INTEL_CXX_VERSION)
+
+# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
+ BOOST_STATIC_CONSTANT(int, arity = i); \
+ BOOST_PP_LIST_FOR_EACH_I_R( \
+ 1 \
+ , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \
+ , typedef \
+ , BOOST_PP_TUPLE_TO_LIST(i,params) \
+ ) \
+ struct rebind; \
+/**/
+
+# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
+ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
+}; \
+template< BOOST_MPL_PP_PARAMS(i,typename T) > \
+struct name<BOOST_MPL_PP_PARAMS(i,T)>::rebind \
+{ \
+ template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
+ : name< BOOST_MPL_PP_PARAMS(i,U) > \
{ \
- BOOST_STATIC_CONSTANT(int, arity = i); \
- BOOST_PP_LIST_FOR_EACH_I_R( \
- 1 \
- , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \
- , typedef \
- , BOOST_PP_TUPLE_TO_LIST(i,params) \
- ) \
- \
- template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
- { \
- typedef typename name< BOOST_MPL_PP_PARAMS(i,U) >::type type; \
- }; \
}; \
- /**/
+/**/
+
+#else // __EDG_VERSION__
+
+# define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
+ BOOST_STATIC_CONSTANT(int, arity = i); \
+ BOOST_PP_LIST_FOR_EACH_I_R( \
+ 1 \
+ , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \
+ , typedef \
+ , BOOST_PP_TUPLE_TO_LIST(i,params) \
+ ) \
+ friend class BOOST_PP_CAT(name,_rebind); \
+ typedef BOOST_PP_CAT(name,_rebind) rebind; \
+/**/
+
+# if !defined(__BORLANDC__)
+# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
+ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
+}; \
+class BOOST_PP_CAT(name,_rebind) \
+{ \
+ public: \
+ template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
+ : name< BOOST_MPL_PP_PARAMS(i,U) > \
+ { \
+ }; \
+/**/
+# else
+# define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \
+ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \
+}; \
+class BOOST_PP_CAT(name,_rebind) \
+{ \
+ public: \
+ template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \
+ { \
+ typedef typename name< BOOST_MPL_PP_PARAMS(i,U) >::type type; \
+ }; \
+/**/
+# endif // __BORLANDC__
+
+#endif // __EDG_VERSION__
#endif // BOOST_MPL_NO_FULL_LAMBDA_SUPPORT
#include "boost/mpl/aux_/config/dtp.hpp"
#include "boost/mpl/aux_/config/preprocessor.hpp"
+#include "boost/preprocessor/comma_if.hpp"
+#include "boost/preprocessor/logical/and.hpp"
#include "boost/preprocessor/identity.hpp"
#include "boost/preprocessor/empty.hpp"
/**/
# define BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_2(i, n, param, value_func) \
- , BOOST_MPL_PP_DEF_PARAMS_TAIL_##i(n,param,value_func) \
+ BOOST_PP_COMMA_IF(BOOST_PP_AND(i,n)) \
+ BOOST_MPL_PP_DEF_PARAMS_TAIL_##i(n,param,value_func) \
/**/
+# define BOOST_MPL_PP_DEF_PARAMS_TAIL_0(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##1 v(),p##2 v(),p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v())
# define BOOST_MPL_PP_DEF_PARAMS_TAIL_1(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##2 v(),p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1)
# define BOOST_MPL_PP_DEF_PARAMS_TAIL_2(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2)
# define BOOST_MPL_PP_DEF_PARAMS_TAIL_3(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2,p3)
# include "boost/preprocessor/cat.hpp"
# define BOOST_MPL_PP_AUX_TAIL_PARAM_FUNC(unused, i, op) \
- , BOOST_PP_CAT( \
+ BOOST_PP_COMMA_IF(i) \
+ BOOST_PP_CAT( \
BOOST_PP_TUPLE_ELEM(3, 1, op) \
, BOOST_PP_ADD_D(1, i, BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(3, 0, op))) \
) BOOST_PP_TUPLE_ELEM(3, 2, op)() \
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost mpl/aux/type_wrapper.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2000-02
+// Peter Dimov, Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED
+#define BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED
+
+namespace boost {
+namespace mpl {
+namespace aux {
+
+template< typename T > struct type_wrapper
+{
+ typedef T type;
+};
+
+} // namespace aux
+} // namespace mpl
+} // namespace boost
+
+#endif // BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED
#ifndef BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED
#define BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED
-#include "boost/config.hpp"
+#include "boost/mpl/aux_/config/eti.hpp"
-#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG))
+#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
+ || defined(BOOST_MPL_MSVC_60_ETI_BUG)
+
+# include "boost/mpl/int.hpp"
namespace boost { namespace mpl { namespace aux {
-template< typename C >
+template< typename C_ >
struct value_wknd
- : C
+ : C_
{
};
+#if defined(BOOST_MPL_MSVC_60_ETI_BUG)
+template<>
+struct value_wknd<int>
+ : int_<0>
+{
+};
+#endif
+
}}} // namespace boost::mpl::aux
-# define BOOST_MPL_AUX_VALUE_WKND(C) ::boost::mpl::aux::value_wknd< C >
+# if !defined(BOOST_MPL_MSVC_60_ETI_BUG)
+# define BOOST_MPL_AUX_VALUE_WKND(C) ::boost::mpl::aux::value_wknd< C >
+# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) BOOST_MPL_AUX_VALUE_WKND(C)
+# else
+# define BOOST_MPL_AUX_VALUE_WKND(C) C
+# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) ::boost::mpl::aux::value_wknd< C >
+# endif
#else
# define BOOST_MPL_AUX_VALUE_WKND(C) C
+# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) C
-#endif // __BORLANDC__
+#endif // __BORLANDC__ || BOOST_MPL_MSVC_60_ETI_BUG
#endif // BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED
#include "boost/mpl/aux_/arity.hpp"
#include "boost/mpl/aux_/template_arity_fwd.hpp"
#include "boost/mpl/aux_/lambda_arity_param.hpp"
+#include "boost/mpl/aux_/algorithm_namespace.hpp"
#include "boost/mpl/aux_/config/dtp.hpp"
+#include "boost/mpl/aux_/config/nttp.hpp"
#include "boost/mpl/aux_/config/ttp.hpp"
#include "boost/mpl/aux_/config/lambda.hpp"
#include "boost/mpl/aux_/config/overload_resolution.hpp"
#if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES)
# define BOOST_MPL_AUX_VOID_SPEC_ARITY(i, name) \
namespace aux { \
-template< int N > \
+template< BOOST_MPL_AUX_NTTP_DECL(int, N) > \
struct arity< \
name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > \
, N \
BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(i, j, name) \
/**/
+#define BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(i, name) \
+BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN \
+BOOST_MPL_AUX_VOID_SPEC_MAIN(i, name) \
+BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END \
+BOOST_MPL_AUX_VOID_SPEC_LAMBDA(i, BOOST_MPL_AUX_AGLORITHM_NAMESPACE_PREFIX name) \
+BOOST_MPL_AUX_VOID_SPEC_ARITY(i, BOOST_MPL_AUX_AGLORITHM_NAMESPACE_PREFIX name) \
+BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(i, i, BOOST_MPL_AUX_AGLORITHM_NAMESPACE_PREFIX name) \
+/**/
+
#endif // BOOST_MPL_AUX_VOID_SPEC_HPP_INCLUDED
--- /dev/null
+//-----------------------------------------------------------------------------
+// boost mpl/aux_/yes_no.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2001-02
+// Peter Dimov, Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+
+#ifndef BOOST_MPL_AUX_YES_NO_HPP_INCLUDED
+#define BOOST_MPL_AUX_YES_NO_HPP_INCLUDED
+
+namespace boost {
+namespace mpl {
+namespace aux {
+
+typedef char (&no_tag)[1];
+typedef char (&yes_tag)[2];
+
+} // namespace aux
+} // namespace mpl
+} // namespace boost
+
+#endif // BOOST_MPL_AUX_YES_NO_HPP_INCLUDED
--- /dev/null
+
+#ifndef BOOST_MPL_BOOL_HPP_INCLUDED
+#define BOOST_MPL_BOOL_HPP_INCLUDED
+
+// + file: boost/mpl/bool.hpp
+// + last modified: 25/feb/03
+
+// Copyright (c) 2000-03
+// Aleksey Gurtovoy
+//
+// Permission to use, copy, modify, distribute and sell this software
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
+// without express or implied warranty.
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+#include "boost/mpl/aux_/config/static_constant.hpp"
+
+namespace boost { namespace mpl {
+
+template< bool C_ > struct bool_
+{
+ BOOST_STATIC_CONSTANT(bool, value = C_);
+ typedef bool_ type;
+ typedef bool value_type;
+ operator bool() const { return this->value; }
+};
+
+// shorcuts
+typedef bool_<true> true_;
+typedef bool_<false> false_;
+
+}} // namespace boost::mpl
+
+#endif // BOOST_MPL_BOOL_HPP_INCLUDED
+++ /dev/null
-//-----------------------------------------------------------------------------
-// boost mpl/bool_c.hpp header file
-// See http://www.boost.org for updates, documentation, and revision history.
-//-----------------------------------------------------------------------------
-//
-// Copyright (c) 2000-02
-// Aleksey Gurtovoy
-//
-// Permission to use, copy, modify, distribute and sell this software
-// and its documentation for any purpose is hereby granted without fee,
-// provided that the above copyright notice appears in all copies and
-// that both the copyright notice and this permission notice appear in
-// supporting documentation. No representations are made about the
-// suitability of this software for any purpose. It is provided "as is"
-// without express or implied warranty.
-
-#ifndef BOOST_MPL_BOOL_C_HPP_INCLUDED
-#define BOOST_MPL_BOOL_C_HPP_INCLUDED
-
-#include "boost/config.hpp"
-
-namespace boost {
-namespace mpl {
-
-template< bool C > struct bool_c
-{
- BOOST_STATIC_CONSTANT(bool, value = C);
- typedef bool_c type;
- typedef bool value_type;
- operator bool() const { return this->value; }
-};
-
-// shorcuts
-typedef bool_c<true> true_c;
-typedef bool_c<false> false_c;
-
-} // namespace mpl
-} // namespace boost
-
-#endif // BOOST_MPL_BOOL_C_HPP_INCLUDED
#define BOOST_MPL_IF_HPP_INCLUDED
#include "boost/mpl/aux_/value_wknd.hpp"
+#include "boost/mpl/aux_/ice_cast.hpp"
#include "boost/mpl/aux_/void_spec.hpp"
#include "boost/mpl/aux_/lambda_support.hpp"
+#include "boost/mpl/aux_/config/workaround.hpp"
#include "boost/config.hpp"
namespace boost {
>
struct if_
{
- typedef typename if_c<
+ private:
+ // agurt, 02/jan/03: two-step 'type' definition for the sake of aCC
+ typedef if_c<
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561))
BOOST_MPL_AUX_VALUE_WKND(C)::value
+#else
+ BOOST_MPL_AUX_ICE_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(C)::value)
+#endif
, T1
, T2
- >::type type;
-
+ > almost_type_;
+
+ public:
+ typedef typename almost_type_::type type;
+
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C,T1,T2))
};
// MSVC6.5-specific version
template<
- bool C
+ bool C_
, typename T1
, typename T2
>
template<> struct answer<false> { typedef T2 type; };
public:
- typedef typename answer< C >::type type;
+ typedef typename answer< C_ >::type type;
};
// (almost) copy & paste in order to save one more
// recursively nested template instantiation to user
template<
- typename C
+ typename C_
, typename T1
, typename T2
>
// agurt, 17/sep/02: in some situations MSVC 7.0 doesn't
// handle 'answer<C::value>' expression very well
- enum { c_ = C::value };
+ enum { c_ = C_::value };
public:
- typedef typename answer<c_>::type type;
+ typedef typename answer< BOOST_MPL_AUX_ICE_CAST(bool, c_) >::type type;
+
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C_,T1,T2))
};
#else
>
struct if_
{
- typedef typename aux::if_impl< C::value >
+ typedef typename aux::if_impl< BOOST_MPL_AUX_ICE_CAST(bool, C::value) >
::template result_<T1,T2>::type type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C,T1,T2))
-//-----------------------------------------------------------------------------
-// boost/mpl/intergal_c.hpp header file
-// See http://www.boost.org for updates, documentation, and revision history.
-//-----------------------------------------------------------------------------
-//
-// Copyright (c) 2000-02
+
+#ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
+#define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
+
+// + file: boost/mpl/integral_c.hpp
+// + last modified: 25/feb/03
+
+// Copyright (c) 2000-03
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
+//
+// See http://www.boost.org/libs/mpl for documentation.
-#ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
-#define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
-
-#include "boost/config.hpp"
-
-namespace boost {
-namespace mpl {
-
-template< typename T, T N >
-struct integral_c
-{
- BOOST_STATIC_CONSTANT(T, value = N);
- typedef integral_c type;
- typedef T value_type;
+#include "boost/mpl/aux_/ice_cast.hpp"
+#include "boost/mpl/aux_/config/ctps.hpp"
+#include "boost/mpl/aux_/config/workaround.hpp"
- // have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC),
- // while some other don't like 'value + 1' (Borland), and some don't like
- // either
-#if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 243
- private:
- BOOST_STATIC_CONSTANT(T, next_value = (N + 1));
- BOOST_STATIC_CONSTANT(T, prior_value = (N - 1));
- public:
- typedef integral_c<T, next_value> next;
- typedef integral_c<T, prior_value> prior;
-#elif defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
- || defined(__IBMCPP__) && (__IBMCPP__ <= 502 || !defined(BOOST_STRICT_CONFIG))
- typedef integral_c<T, (N + 1)> next;
- typedef integral_c<T, (N - 1)> prior;
+#if BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(53800))
+// the type of non-type template arguments may not depend on template arguments
+# define AUX_WRAPPER_PARAMS(N) typename T, long N
#else
- typedef integral_c<T, (value + 1)> next;
- typedef integral_c<T, (value - 1)> prior;
+# define AUX_WRAPPER_PARAMS(N) typename T, T N
#endif
- // enables uniform function call syntax for families of overloaded
- // functions that return objects of both arithmetic ('int', 'long',
- // 'double', etc.) and 'integral_c<..>' types (for an example, see
- // "mpl/example/power.cpp")
- operator T() const { return this->value; }
-};
+#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) \
- && !defined(__BORLANDC__) || __BORLANDC__ > 0x551
+ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x551)
+namespace boost { namespace mpl {
// 'bool' constant doesn't have 'next'/'prior' members
template< bool C >
struct integral_c<bool, C>
typedef integral_c type;
operator bool() const { return this->value; }
};
+}}
#endif
-} // namespace mpl
-} // namespace boost
-
#endif // BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
// Peter Dimov, Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
-// and its documentation for any purpose is hereby granted without fee,
-// provided that the above copyright notice appears in all copies and
-// that both the copyright notice and this permission notice appear in
-// supporting documentation. No representations are made about the
-// suitability of this software for any purpose. It is provided "as is"
+// and its documentation for any purpose is hereby granted without fee,
+// provided that the above copyright notice appears in all copies and
+// that both the copyright notice and this permission notice appear in
+// supporting documentation. No representations are made about the
+// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
#ifndef BOOST_MPL_VOID_HPP_INCLUDED
#define BOOST_MPL_VOID_HPP_INCLUDED
-#include "boost/mpl/bool_c.hpp"
+#include "boost/mpl/bool.hpp"
#include "boost/config.hpp"
namespace boost {
namespace mpl {
-struct void_;
+// [JDG Feb-4-2003] made void_ a complete type to allow it to be
+// instantiated so that it can be passed in as an object that can be
+// used to select an overloaded function. Possible use includes signaling
+// a zero arity functor evaluation call.
+struct void_ {};
template< typename T >
struct is_void_
- : false_c
+ : false_
{
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
- using false_c::value;
+ using false_::value;
#endif
};
template<>
struct is_void_<void_>
- : true_c
+ : true_
{
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
- using true_c::value;
+ using true_::value;
#endif
};
// and with no claim as to its suitability for any purpose.
//
+// See http://www.boost.org/libs/multi_array for documentation.
+
#ifndef BOOST_MULTI_ARRAY_RG071801_HPP
#define BOOST_MULTI_ARRAY_RG071801_HPP
#include <numeric>
#include <vector>
+
+
namespace boost {
+ namespace detail {
+ namespace multi_array {
+ struct populate_index_ranges {
+ multi_array_types::index_range
+ operator()(multi_array_types::index base,
+ multi_array_types::size_type extent) {
+ return multi_array_types::index_range(base,base+extent);
+ }
+ };
+ } //namespace multi_array
+ } // namespace detail
template<typename T, std::size_t NumDims,
typename Allocator>
const_sub_array<T,NumDims,OPtr>& rhs) :
super_type(rhs) {
allocate_space();
- std::copy(rhs.begin(),rhs.end(),begin());
+ std::copy(rhs.begin(),rhs.end(),this->begin());
}
// For some reason, gcc 2.95.2 doesn't pick the above template
sub_array<T,NumDims>& rhs) :
super_type(rhs) {
allocate_space();
- std::copy(rhs.begin(),rhs.end(),begin());
+ std::copy(rhs.begin(),rhs.end(),this->begin());
}
// Since assignment is a deep copy, multi_array_ref
}
+ multi_array& resize(const detail::multi_array
+ ::extent_gen<NumDims>& ranges) {
+
+
+ // build a multi_array with the specs given
+ multi_array new_array(ranges);
+
+
+ // build a view of tmp with the minimum extents
+
+ // Get the minimum extents of the arrays.
+ boost::array<size_type,NumDims> min_extents;
+
+ const size_type& (*min)(const size_type&, const size_type&) =
+ std::min<size_type>;
+ std::transform(new_array.extent_list_.begin(),new_array.extent_list_.end(),
+ this->extent_list_.begin(),
+ min_extents.begin(),
+ min);
+
+
+ // typedef boost::array<index,NumDims> index_list;
+ // Build index_gen objects to create views with the same shape
+
+ // these need to be separate to handle non-zero index bases
+ typedef detail::multi_array::index_gen<NumDims,NumDims> index_gen;
+ index_gen old_idxes;
+ index_gen new_idxes;
+
+ std::transform(new_array.index_base_list_.begin(),
+ new_array.index_base_list_.end(),
+ min_extents.begin(),old_idxes.ranges_.begin(),
+ detail::multi_array::populate_index_ranges());
+
+ std::transform(this->index_base_list_.begin(),
+ this->index_base_list_.end(),
+ min_extents.begin(),new_idxes.ranges_.begin(),
+ detail::multi_array::populate_index_ranges());
+
+ // Build same-shape views of the two arrays
+ typename multi_array::array_view<3>::type view_old = (*this)[old_idxes];
+ typename multi_array::array_view<3>::type view_new = new_array[new_idxes];
+
+ // Set the right portion of the new array
+ view_new = view_old;
+
+ using std::swap;
+ // Swap the internals of these arrays.
+ swap(this->super_type::base_,new_array.super_type::base_);
+ swap(this->storage_,new_array.storage_);
+ swap(this->extent_list_,new_array.extent_list_);
+ swap(this->stride_list_,new_array.stride_list_);
+ swap(this->index_base_list_,new_array.index_base_list_);
+ swap(this->origin_offset_,new_array.origin_offset_);
+ swap(this->directional_offset_,new_array.directional_offset_);
+ swap(this->num_elements_,new_array.num_elements_);
+ swap(this->allocator_,new_array.allocator_);
+ swap(this->base_,new_array.base_);
+ swap(this->allocated_elements_,new_array.allocated_elements_);
+
+ return *this;
+ }
+
+
~multi_array() {
deallocate_space();
}
private:
void allocate_space() {
typename Allocator::const_pointer no_hint=0;
- base_ = allocator_.allocate(super_type::num_elements(),no_hint);
- super_type::set_base_ptr(base_);
- allocated_elements_ = super_type::num_elements();
+ base_ = allocator_.allocate(this->num_elements(),no_hint);
+ this->set_base_ptr(base_);
+ allocated_elements_ = this->num_elements();
std::uninitialized_fill_n(base_,allocated_elements_,T());
}
template <class IteratorAdaptor, class DifferenceType>
static void advance(IteratorAdaptor& x, DifferenceType n) {
- x.idx_ += n;
+ x.base().idx_ += n;
}
template <class IteratorAdaptor1, class IteratorAdaptor2>
detail::multi_array::CollectionConcept<BaseList> >();
boost::copy_n(values.begin(),num_dimensions(),index_base_list_.begin());
origin_offset_ =
- calculate_origin_offset(stride_list_,extent_list_,
+ this->calculate_origin_offset(stride_list_,extent_list_,
storage_,index_base_list_);
}
void reindex(index value) {
index_base_list_.assign(value);
origin_offset_ =
- calculate_origin_offset(stride_list_,extent_list_,
+ this->calculate_origin_offset(stride_list_,extent_list_,
storage_,index_base_list_);
}
size_type(1),std::multiplies<size_type>()));
std::copy(extents.begin(),extents.end(),extent_list_.begin());
- compute_strides(stride_list_,extent_list_,storage_);
+ this->compute_strides(stride_list_,extent_list_,storage_);
origin_offset_ =
- calculate_origin_offset(stride_list_,extent_list_,
+ this->calculate_origin_offset(stride_list_,extent_list_,
storage_,index_base_list_);
}
1,std::multiplies<index>());
assert(num_elements_ != 0);
- compute_strides(stride_list_,extent_list_,storage_);
+ this->compute_strides(stride_list_,extent_list_,storage_);
origin_offset_ =
- calculate_origin_offset(stride_list_,extent_list_,
+ this->calculate_origin_offset(stride_list_,extent_list_,
storage_,index_base_list_);
directional_offset_ =
- calculate_descending_dimension_offset(stride_list_,extent_list_,
+ this->calculate_descending_dimension_offset(stride_list_,extent_list_,
storage_);
}
};
ConstMultiArrayConcept<ConstMultiArray,NumDims> >();
// make sure the dimensions agree
- assert(other.num_dimensions() == num_dimensions());
- assert(std::equal(other.shape(),other.shape()+num_dimensions(),
- shape()));
+ assert(other.num_dimensions() == this->num_dimensions());
+ assert(std::equal(other.shape(),other.shape()+this->num_dimensions(),
+ this->shape()));
// iterator-based copy
- std::copy(other.begin(),other.end(),begin());
+ std::copy(other.begin(),other.end(),this->begin());
return *this;
}
if (&other != this) {
// make sure the dimensions agree
- assert(other.num_dimensions() == num_dimensions());
- assert(std::equal(other.shape(),other.shape()+num_dimensions(),
- shape()));
+ assert(other.num_dimensions() == this->num_dimensions());
+ assert(std::equal(other.shape(),other.shape()+this->num_dimensions(),
+ this->shape()));
// iterator-based copy
- std::copy(other.begin(),other.end(),begin());
+ std::copy(other.begin(),other.end(),this->begin());
}
return *this;
}
- element* origin() { return base_+origin_offset_; }
+ element* origin() { return super_type::base_+super_type::origin_offset_; }
- element* data() { return base_; }
+ element* data() { return super_type::base_; }
template <class IndexList>
element& operator()(const IndexList& indices) {
detail::multi_array::CollectionConcept<IndexList> >();
return super_type::access_element(boost::type<element&>(),
origin(),
- indices,strides());
+ indices,this->strides());
}
reference operator[](index idx) {
return super_type::access(boost::type<reference>(),
idx,origin(),
- shape(),strides(),
- index_bases());
+ this->shape(),this->strides(),
+ this->index_bases());
}
return
super_type::generate_array_view(boost::type<return_type>(),
indices,
- shape(),
- strides(),
- index_bases(),
+ this->shape(),
+ this->strides(),
+ this->index_bases(),
origin());
}
iterator begin() {
- return iterator(iter_base(*index_bases(),origin(),shape(),
- strides(),index_bases()));
+ return iterator(iter_base(*this->index_bases(),origin(),this->shape(),
+ this->strides(),this->index_bases()));
}
iterator end() {
- return iterator(iter_base(*index_bases()+*shape(),origin(),
- shape(),strides(),index_bases()));
+ return iterator(iter_base(*this->index_bases()+*this->shape(),origin(),
+ this->shape(),this->strides(),
+ this->index_bases()));
}
// RG - rbegin() and rend() written naively to thwart MSVC ICE.
const_reference operator[](index idx) const {
return super_type::access(boost::type<const_reference>(),
idx,origin(),
- shape(),strides(),index_bases());
+ this->shape(),this->strides(),
+ this->index_bases());
}
// See note attached to generate_array_view in base.hpp
ConstMultiArray, NumDims> >();
// make sure the dimensions agree
- assert(other.num_dimensions() == num_dimensions());
- assert(std::equal(other.shape(),other.shape()+num_dimensions(),
- shape()));
+ assert(other.num_dimensions() == this->num_dimensions());
+ assert(std::equal(other.shape(),other.shape()+this->num_dimensions(),
+ this->shape()));
// iterator-based copy
std::copy(other.begin(),other.end(),begin());
return *this;
sub_array& operator=(const sub_array& other) {
if (&other != this) {
// make sure the dimensions agree
- assert(other.num_dimensions() == num_dimensions());
- assert(std::equal(other.shape(),other.shape()+num_dimensions(),
- shape()));
+ assert(other.num_dimensions() == this->num_dimensions());
+ assert(std::equal(other.shape(),other.shape()+this->num_dimensions(),
+ this->shape()));
// iterator-based copy
std::copy(other.begin(),other.end(),begin());
}
return *this;
}
- T* origin() { return base_; }
- const T* origin() const { return base_; }
+ T* origin() { return this->base_; }
+ const T* origin() const { return this->base_; }
reference operator[](index idx) {
return super_type::access(boost::type<reference>(),
- idx,base_,shape(),strides(),index_bases());
+ idx,this->base_,this->shape(),this->strides(),
+ this->index_bases());
}
// see generate_array_view in base.hpp
return
super_type::generate_array_view(boost::type<return_type>(),
indices,
- shape(),
- strides(),
- index_bases(),
+ this->shape(),
+ this->strides(),
+ this->index_bases(),
origin());
}
element& operator()(const IndexList& indices) {
return super_type::access_element(boost::type<element&>(),
origin(),
- indices,strides());
+ indices,this->strides());
}
iterator begin() {
- return iterator(iter_base(*index_bases(),origin(),
- shape(),strides(),index_bases()));
+ return iterator(iter_base(*this->index_bases(),origin(),
+ this->shape(),this->strides(),this->index_bases()));
}
iterator end() {
- return iterator(iter_base(*index_bases()+*shape(),origin(),
- shape(),strides(),index_bases()));
+ return iterator(iter_base(*this->index_bases()+*this->shape(),origin(),
+ this->shape(),this->strides(),this->index_bases()));
}
// RG - rbegin() and rend() written naively to thwart MSVC ICE.
void reindex(const BaseList& values) {
boost::copy_n(values.begin(),num_dimensions(),index_base_list_.begin());
origin_offset_ =
- calculate_indexing_offset(stride_list_,index_base_list_);
+ this->calculate_indexing_offset(stride_list_,index_base_list_);
}
void reindex(index value) {
index_base_list_.assign(value);
origin_offset_ =
- calculate_indexing_offset(stride_list_,index_base_list_);
+ this->calculate_indexing_offset(stride_list_,index_base_list_);
}
size_type num_dimensions() const { return NumDims; }
ConstMultiArrayConcept<ConstMultiArray,NumDims> >();
// make sure the dimensions agree
- assert(other.num_dimensions() == num_dimensions());
- assert(std::equal(other.shape(),other.shape()+num_dimensions(),
- shape()));
+ assert(other.num_dimensions() == this->num_dimensions());
+ assert(std::equal(other.shape(),other.shape()+this->num_dimensions(),
+ this->shape()));
// iterator-based copy
std::copy(other.begin(),other.end(),begin());
return *this;
multi_array_view& operator=(const multi_array_view& other) {
if (&other != this) {
// make sure the dimensions agree
- assert(other.num_dimensions() == num_dimensions());
- assert(std::equal(other.shape(),other.shape()+num_dimensions(),
- shape()));
+ assert(other.num_dimensions() == this->num_dimensions());
+ assert(std::equal(other.shape(),other.shape()+this->num_dimensions(),
+ this->shape()));
// iterator-based copy
std::copy(other.begin(),other.end(),begin());
}
return *this;
}
- element* origin() { return base_+origin_offset_; }
+ element* origin() { return this->base_+this->origin_offset_; }
template <class IndexList>
element& operator()(const IndexList& indices) {
return super_type::access_element(boost::type<element&>(),
origin(),
- indices,strides());
+ indices,this->strides());
}
reference operator[](index idx) {
return super_type::access(boost::type<reference>(),
idx,origin(),
- shape(),strides(),
- index_bases());
+ this->shape(),this->strides(),
+ this->index_bases());
}
return
super_type::generate_array_view(boost::type<return_type>(),
indices,
- shape(),
- strides(),
- index_bases(),
+ this->shape(),
+ this->strides(),
+ this->index_bases(),
origin());
}
iterator begin() {
- return iterator(iter_base(*index_bases(),origin(),
- shape(),strides(),index_bases()));
+ return iterator(iter_base(*this->index_bases(),origin(),
+ this->shape(),this->strides(),
+ this->index_bases()));
}
iterator end() {
- return iterator(iter_base(*index_bases()+*shape(),origin(),
- shape(),strides(),index_bases()));
+ return iterator(iter_base(*this->index_bases()+*this->shape(),origin(),
+ this->shape(),this->strides(),
+ this->index_bases()));
}
reverse_iterator rbegin() {
--- /dev/null
+// Boost next_prior.hpp header file ---------------------------------------//
+
+// (C) Copyright Boost.org 1999-2003. Permission to copy, use, modify, sell
+// and distribute this software is granted provided this copyright
+// notice appears in all copies. This software is provided "as is" without
+// express or implied warranty, and with no claim as to its suitability for
+// any purpose.
+
+// See http://www.boost.org/libs/utility for documentation.
+
+#ifndef BOOST_NEXT_PRIOR_HPP_INCLUDED
+#define BOOST_NEXT_PRIOR_HPP_INCLUDED
+
+namespace boost {
+
+// Helper functions for classes like bidirectional iterators not supporting
+// operator+ and operator-
+//
+// Usage:
+// const std::list<T>::iterator p = get_some_iterator();
+// const std::list<T>::iterator prev = boost::prior(p);
+
+// Contributed by Dave Abrahams
+
+template <class T>
+inline T next(T x) { return ++x; }
+
+template <class T>
+inline T prior(T x) { return --x; }
+
+} // namespace boost
+
+#endif // BOOST_NEXT_PRIOR_HPP_INCLUDED
--- /dev/null
+// Boost noncopyable.hpp header file --------------------------------------//
+
+// (C) Copyright Boost.org 1999-2003. Permission to copy, use, modify, sell
+// and distribute this software is granted provided this copyright
+// notice appears in all copies. This software is provided "as is" without
+// express or implied warranty, and with no claim as to its suitability for
+// any purpose.
+
+// See http://www.boost.org/libs/utility for documentation.
+
+#ifndef BOOST_NONCOPYABLE_HPP_INCLUDED
+#define BOOST_NONCOPYABLE_HPP_INCLUDED
+
+namespace boost {
+
+// Private copy constructor and copy assignment ensure classes derived from
+// class noncopyable cannot be copied.
+
+// Contributed by Dave Abrahams
+
+class noncopyable
+{
+ protected:
+ noncopyable() {}
+ ~noncopyable() {}
+ private: // emphasize the following members are private
+ noncopyable( const noncopyable& );
+ const noncopyable& operator=( const noncopyable& );
+};
+
+} // namespace boost
+
+#endif // BOOST_NONCOPYABLE_HPP_INCLUDED
// software is provided "as is" without express or implied warranty, and
// with no claim as to its suitability for any purpose.
-// See http://www.boost.org for most recent version including documentation.
+// See http://www.boost.org/libs/utility/operators.htm for documentation.
// Revision History
+// 21 Oct 02 Modified implementation of operators to allow compilers with a
+// correct named return value optimization (NRVO) to produce optimal
+// code. (Daniel Frey)
// 02 Dec 01 Bug fixed in random_access_iteratable. (Helmut Zeisel)
// 28 Sep 01 Factored out iterator operator groups. (Daryle Walker)
// 27 Aug 01 'left' form for non commutative operators added;
friend bool operator!=(const T& x, const T& y) { return !(x == y); }
};
-template <class T, class U, class B = ::boost::detail::empty_base>
-struct multipliable2 : B
-{
- friend T operator*(T x, const U& y) { return x *= y; }
- friend T operator*(const U& y, T x) { return x *= y; }
-};
-
-template <class T, class B = ::boost::detail::empty_base>
-struct multipliable1 : B
-{
- friend T operator*(T x, const T& y) { return x *= y; }
-};
-
-template <class T, class U, class B = ::boost::detail::empty_base>
-struct addable2 : B
-{
- friend T operator+(T x, const U& y) { return x += y; }
- friend T operator+(const U& y, T x) { return x += y; }
-};
-
-template <class T, class B = ::boost::detail::empty_base>
-struct addable1 : B
-{
- friend T operator+(T x, const T& y) { return x += y; }
-};
-
-template <class T, class U, class B = ::boost::detail::empty_base>
-struct subtractable2 : B
-{
- friend T operator-(T x, const U& y) { return x -= y; }
-};
-
-template <class T, class U, class B = ::boost::detail::empty_base>
-struct subtractable2_left : B
-{
- friend T operator-(const U& x, const T& y)
- { T result(x); return result -= y; }
-};
-
-template <class T, class B = ::boost::detail::empty_base>
-struct subtractable1 : B
-{
- friend T operator-(T x, const T& y) { return x -= y; }
-};
-
-template <class T, class U, class B = ::boost::detail::empty_base>
-struct dividable2 : B
-{
- friend T operator/(T x, const U& y) { return x /= y; }
-};
-
-template <class T, class U, class B = ::boost::detail::empty_base>
-struct dividable2_left : B
-{
- friend T operator/(const U& x, const T& y)
- { T result(x); return result /= y; }
-};
-
-template <class T, class B = ::boost::detail::empty_base>
-struct dividable1 : B
-{
- friend T operator/(T x, const T& y) { return x /= y; }
-};
-
-template <class T, class U, class B = ::boost::detail::empty_base>
-struct modable2 : B
-{
- friend T operator%(T x, const U& y) { return x %= y; }
-};
-
-template <class T, class U, class B = ::boost::detail::empty_base>
-struct modable2_left : B
-{
- friend T operator%(const U& x, const T& y)
- { T result(x); return result %= y; }
-};
-
-template <class T, class B = ::boost::detail::empty_base>
-struct modable1 : B
-{
- friend T operator%(T x, const T& y) { return x %= y; }
-};
-
-template <class T, class U, class B = ::boost::detail::empty_base>
-struct xorable2 : B
-{
- friend T operator^(T x, const U& y) { return x ^= y; }
- friend T operator^(const U& y, T x) { return x ^= y; }
-};
-
-template <class T, class B = ::boost::detail::empty_base>
-struct xorable1 : B
-{
- friend T operator^(T x, const T& y) { return x ^= y; }
-};
-
-template <class T, class U, class B = ::boost::detail::empty_base>
-struct andable2 : B
-{
- friend T operator&(T x, const U& y) { return x &= y; }
- friend T operator&(const U& y, T x) { return x &= y; }
-};
-
-template <class T, class B = ::boost::detail::empty_base>
-struct andable1 : B
-{
- friend T operator&(T x, const T& y) { return x &= y; }
-};
-
-template <class T, class U, class B = ::boost::detail::empty_base>
-struct orable2 : B
-{
- friend T operator|(T x, const U& y) { return x |= y; }
- friend T operator|(const U& y, T x) { return x |= y; }
-};
-
-template <class T, class B = ::boost::detail::empty_base>
-struct orable1 : B
-{
- friend T operator|(T x, const T& y) { return x |= y; }
-};
+// NRVO-friendly implementation (contributed by Daniel Frey) ---------------//
+
+#if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS)
+
+// This is the optimal implementation for ISO/ANSI C++,
+// but it requires the compiler to implement the NRVO.
+// If the compiler has no NRVO, this is the best symmetric
+// implementation available.
+
+#define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP ) \
+template <class T, class U, class B = ::boost::detail::empty_base> \
+struct NAME##2 : B \
+{ \
+ friend T operator OP( const T& lhs, const U& rhs ) \
+ { T nrv( lhs ); nrv OP##= rhs; return nrv; } \
+ friend T operator OP( const U& lhs, const T& rhs ) \
+ { T nrv( rhs ); nrv OP##= lhs; return nrv; } \
+}; \
+ \
+template <class T, class B = ::boost::detail::empty_base> \
+struct NAME##1 : B \
+{ \
+ friend T operator OP( const T& lhs, const T& rhs ) \
+ { T nrv( lhs ); nrv OP##= rhs; return nrv; } \
+};
+
+#define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP ) \
+template <class T, class U, class B = ::boost::detail::empty_base> \
+struct NAME##2 : B \
+{ \
+ friend T operator OP( const T& lhs, const U& rhs ) \
+ { T nrv( lhs ); nrv OP##= rhs; return nrv; } \
+}; \
+ \
+template <class T, class U, class B = ::boost::detail::empty_base> \
+struct NAME##2_left : B \
+{ \
+ friend T operator OP( const U& lhs, const T& rhs ) \
+ { T nrv( lhs ); nrv OP##= rhs; return nrv; } \
+}; \
+ \
+template <class T, class B = ::boost::detail::empty_base> \
+struct NAME##1 : B \
+{ \
+ friend T operator OP( const T& lhs, const T& rhs ) \
+ { T nrv( lhs ); nrv OP##= rhs; return nrv; } \
+};
+
+#else // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS)
+
+// For compilers without NRVO the following code is optimal, but not symmetric!
+// Note that the implementation of NAME##2_left only looks cool, but doesn't
+// provide optimization opportunities to the compiler :)
+
+#define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP ) \
+template <class T, class U, class B = ::boost::detail::empty_base> \
+struct NAME##2 : B \
+{ \
+ friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \
+ friend T operator OP( const U& lhs, T rhs ) { return rhs OP##= lhs; } \
+}; \
+ \
+template <class T, class B = ::boost::detail::empty_base> \
+struct NAME##1 : B \
+{ \
+ friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \
+};
+
+#define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP ) \
+template <class T, class U, class B = ::boost::detail::empty_base> \
+struct NAME##2 : B \
+{ \
+ friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \
+}; \
+ \
+template <class T, class U, class B = ::boost::detail::empty_base> \
+struct NAME##2_left : B \
+{ \
+ friend T operator OP( const U& lhs, const T& rhs ) \
+ { return T( lhs ) OP##= rhs; } \
+}; \
+ \
+template <class T, class B = ::boost::detail::empty_base> \
+struct NAME##1 : B \
+{ \
+ friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \
+};
+
+#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS)
+
+BOOST_BINARY_OPERATOR_COMMUTATIVE( multipliable, * )
+BOOST_BINARY_OPERATOR_COMMUTATIVE( addable, + )
+BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( subtractable, - )
+BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( dividable, / )
+BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( modable, % )
+BOOST_BINARY_OPERATOR_COMMUTATIVE( xorable, ^ )
+BOOST_BINARY_OPERATOR_COMMUTATIVE( andable, & )
+BOOST_BINARY_OPERATOR_COMMUTATIVE( orable, | )
+
+#undef BOOST_BINARY_OPERATOR_COMMUTATIVE
+#undef BOOST_BINARY_OPERATOR_NON_COMMUTATIVE
// incrementable and decrementable contributed by Jeremy Siek
{
friend T operator++(T& x, int)
{
- incrementable_type tmp(x);
+ incrementable_type nrv(x);
++x;
- return tmp;
+ return nrv;
}
private: // The use of this typedef works around a Borland bug
typedef T incrementable_type;
{
friend T operator--(T& x, int)
{
- decrementable_type tmp(x);
+ decrementable_type nrv(x);
--x;
- return tmp;
+ return nrv;
}
private: // The use of this typedef works around a Borland bug
typedef T decrementable_type;
};
// More operator classes (contributed by Daryle Walker) --------------------//
-
-template <class T, class U, class B = ::boost::detail::empty_base>
-struct left_shiftable2 : B
-{
- friend T operator<<(T x, const U& y) { return x <<= y; }
-};
-
-template <class T, class B = ::boost::detail::empty_base>
-struct left_shiftable1 : B
-{
- friend T operator<<(T x, const T& y) { return x <<= y; }
-};
-
-template <class T, class U, class B = ::boost::detail::empty_base>
-struct right_shiftable2 : B
-{
- friend T operator>>(T x, const U& y) { return x >>= y; }
-};
-
-template <class T, class B = ::boost::detail::empty_base>
-struct right_shiftable1 : B
-{
- friend T operator>>(T x, const T& y) { return x >>= y; }
-};
+// (NRVO-friendly implementation contributed by Daniel Frey) ---------------//
+
+#if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS)
+
+#define BOOST_BINARY_OPERATOR( NAME, OP ) \
+template <class T, class U, class B = ::boost::detail::empty_base> \
+struct NAME##2 : B \
+{ \
+ friend T operator OP( const T& lhs, const U& rhs ) \
+ { T nrv( lhs ); nrv OP##= rhs; return nrv; } \
+}; \
+ \
+template <class T, class B = ::boost::detail::empty_base> \
+struct NAME##1 : B \
+{ \
+ friend T operator OP( const T& lhs, const T& rhs ) \
+ { T nrv( lhs ); nrv OP##= rhs; return nrv; } \
+};
+
+#else // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS)
+
+#define BOOST_BINARY_OPERATOR( NAME, OP ) \
+template <class T, class U, class B = ::boost::detail::empty_base> \
+struct NAME##2 : B \
+{ \
+ friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \
+}; \
+ \
+template <class T, class B = ::boost::detail::empty_base> \
+struct NAME##1 : B \
+{ \
+ friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \
+};
+
+#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS)
+
+BOOST_BINARY_OPERATOR( left_shiftable, << )
+BOOST_BINARY_OPERATOR( right_shiftable, >> )
+
+#undef BOOST_BINARY_OPERATOR
template <class T, class U, class B = ::boost::detail::empty_base>
struct equivalent2 : B
// to its suitability for any purpose.
//
+// See http://www.boost.org/libs/utility/permutation_iterator.htm for documentation.
+
#ifndef boost_permutation_iterator_hpp
#define boost_permutation_iterator_hpp
-//-----------------------------------------------------------------------------
-// boost mpl/aux_/config/preprocessor.hpp header file
-// See http://www.boost.org for updates, documentation, and revision history.
-//-----------------------------------------------------------------------------
-//
-// Copyright (c) 2000-02
-// Aleksey Gurtovoy
-//
-// Permission to use, copy, modify, distribute and sell this software
-// and its documentation for any purpose is hereby granted without fee,
-// provided that the above copyright notice appears in all copies and
-// that both the copyright notice and this permission notice appear in
-// supporting documentation. No representations are made about the
-// suitability of this software for any purpose. It is provided "as is"
-// without express or implied warranty.
-
-#ifndef BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED
-#define BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED
-
-#include "boost/config.hpp"
-
-#if defined(__MWERKS__) && (__MWERKS__ <= 0x3003 || !defined(BOOST_STRICT_CONFIG)) \
- || defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \
- || defined(__IBMCPP__) && (__IBMCPP__ <= 502 || !defined(BOOST_STRICT_CONFIG))
-# define BOOST_MPL_BROKEN_PP_MACRO_EXPANSION
-#endif
-
-//#define BOOST_MPL_NO_OWN_PP_PRIMITIVES
-
-#endif // BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED
+# /* Copyright (C) 2001
+# * Housemarque Oy
+# * http://www.housemarque.com
+# *
+# * Permission to copy, use, modify, sell and distribute this software is
+# * granted provided this copyright notice appears in all copies. This
+# * software is provided "as is" without express or implied warranty, and
+# * with no claim as to its suitability for any purpose.
+# */
+#
+# /* Revised by Paul Mensonides (2002) */
+#
+# /* See http://www.boost.org/libs/preprocessor for documentation. */
+#
+# ifndef BOOST_PREPROCESSOR_HPP
+# define BOOST_PREPROCESSOR_HPP
+#
+# include <boost/preprocessor/library.hpp>
+#
+# endif
--- /dev/null
+# /* Copyright (C) 2001
+# * Housemarque Oy
+# * http://www.housemarque.com
+# *
+# * Permission to copy, use, modify, sell and distribute this software is
+# * granted provided this copyright notice appears in all copies. This
+# * software is provided "as is" without express or implied warranty, and
+# * with no claim as to its suitability for any purpose.
+# */
+#
+# /* Revised by Paul Mensonides (2002) */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_ARITHMETIC_DEC_HPP
+# define BOOST_PREPROCESSOR_ARITHMETIC_DEC_HPP
+#
+# include <boost/preprocessor/config/config.hpp>
+#
+# /* BOOST_PP_DEC */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
+# define BOOST_PP_DEC(x) BOOST_PP_DEC_I(x)
+# else
+# define BOOST_PP_DEC(x) BOOST_PP_DEC_OO((x))
+# define BOOST_PP_DEC_OO(par) BOOST_PP_DEC_I ## par
+# endif
+#
+# define BOOST_PP_DEC_I(x) BOOST_PP_DEC_ ## x
+#
+# define BOOST_PP_DEC_0 0
+# define BOOST_PP_DEC_1 0
+# define BOOST_PP_DEC_2 1
+# define BOOST_PP_DEC_3 2
+# define BOOST_PP_DEC_4 3
+# define BOOST_PP_DEC_5 4
+# define BOOST_PP_DEC_6 5
+# define BOOST_PP_DEC_7 6
+# define BOOST_PP_DEC_8 7
+# define BOOST_PP_DEC_9 8
+# define BOOST_PP_DEC_10 9
+# define BOOST_PP_DEC_11 10
+# define BOOST_PP_DEC_12 11
+# define BOOST_PP_DEC_13 12
+# define BOOST_PP_DEC_14 13
+# define BOOST_PP_DEC_15 14
+# define BOOST_PP_DEC_16 15
+# define BOOST_PP_DEC_17 16
+# define BOOST_PP_DEC_18 17
+# define BOOST_PP_DEC_19 18
+# define BOOST_PP_DEC_20 19
+# define BOOST_PP_DEC_21 20
+# define BOOST_PP_DEC_22 21
+# define BOOST_PP_DEC_23 22
+# define BOOST_PP_DEC_24 23
+# define BOOST_PP_DEC_25 24
+# define BOOST_PP_DEC_26 25
+# define BOOST_PP_DEC_27 26
+# define BOOST_PP_DEC_28 27
+# define BOOST_PP_DEC_29 28
+# define BOOST_PP_DEC_30 29
+# define BOOST_PP_DEC_31 30
+# define BOOST_PP_DEC_32 31
+# define BOOST_PP_DEC_33 32
+# define BOOST_PP_DEC_34 33
+# define BOOST_PP_DEC_35 34
+# define BOOST_PP_DEC_36 35
+# define BOOST_PP_DEC_37 36
+# define BOOST_PP_DEC_38 37
+# define BOOST_PP_DEC_39 38
+# define BOOST_PP_DEC_40 39
+# define BOOST_PP_DEC_41 40
+# define BOOST_PP_DEC_42 41
+# define BOOST_PP_DEC_43 42
+# define BOOST_PP_DEC_44 43
+# define BOOST_PP_DEC_45 44
+# define BOOST_PP_DEC_46 45
+# define BOOST_PP_DEC_47 46
+# define BOOST_PP_DEC_48 47
+# define BOOST_PP_DEC_49 48
+# define BOOST_PP_DEC_50 49
+# define BOOST_PP_DEC_51 50
+# define BOOST_PP_DEC_52 51
+# define BOOST_PP_DEC_53 52
+# define BOOST_PP_DEC_54 53
+# define BOOST_PP_DEC_55 54
+# define BOOST_PP_DEC_56 55
+# define BOOST_PP_DEC_57 56
+# define BOOST_PP_DEC_58 57
+# define BOOST_PP_DEC_59 58
+# define BOOST_PP_DEC_60 59
+# define BOOST_PP_DEC_61 60
+# define BOOST_PP_DEC_62 61
+# define BOOST_PP_DEC_63 62
+# define BOOST_PP_DEC_64 63
+# define BOOST_PP_DEC_65 64
+# define BOOST_PP_DEC_66 65
+# define BOOST_PP_DEC_67 66
+# define BOOST_PP_DEC_68 67
+# define BOOST_PP_DEC_69 68
+# define BOOST_PP_DEC_70 69
+# define BOOST_PP_DEC_71 70
+# define BOOST_PP_DEC_72 71
+# define BOOST_PP_DEC_73 72
+# define BOOST_PP_DEC_74 73
+# define BOOST_PP_DEC_75 74
+# define BOOST_PP_DEC_76 75
+# define BOOST_PP_DEC_77 76
+# define BOOST_PP_DEC_78 77
+# define BOOST_PP_DEC_79 78
+# define BOOST_PP_DEC_80 79
+# define BOOST_PP_DEC_81 80
+# define BOOST_PP_DEC_82 81
+# define BOOST_PP_DEC_83 82
+# define BOOST_PP_DEC_84 83
+# define BOOST_PP_DEC_85 84
+# define BOOST_PP_DEC_86 85
+# define BOOST_PP_DEC_87 86
+# define BOOST_PP_DEC_88 87
+# define BOOST_PP_DEC_89 88
+# define BOOST_PP_DEC_90 89
+# define BOOST_PP_DEC_91 90
+# define BOOST_PP_DEC_92 91
+# define BOOST_PP_DEC_93 92
+# define BOOST_PP_DEC_94 93
+# define BOOST_PP_DEC_95 94
+# define BOOST_PP_DEC_96 95
+# define BOOST_PP_DEC_97 96
+# define BOOST_PP_DEC_98 97
+# define BOOST_PP_DEC_99 98
+# define BOOST_PP_DEC_100 99
+# define BOOST_PP_DEC_101 100
+# define BOOST_PP_DEC_102 101
+# define BOOST_PP_DEC_103 102
+# define BOOST_PP_DEC_104 103
+# define BOOST_PP_DEC_105 104
+# define BOOST_PP_DEC_106 105
+# define BOOST_PP_DEC_107 106
+# define BOOST_PP_DEC_108 107
+# define BOOST_PP_DEC_109 108
+# define BOOST_PP_DEC_110 109
+# define BOOST_PP_DEC_111 110
+# define BOOST_PP_DEC_112 111
+# define BOOST_PP_DEC_113 112
+# define BOOST_PP_DEC_114 113
+# define BOOST_PP_DEC_115 114
+# define BOOST_PP_DEC_116 115
+# define BOOST_PP_DEC_117 116
+# define BOOST_PP_DEC_118 117
+# define BOOST_PP_DEC_119 118
+# define BOOST_PP_DEC_120 119
+# define BOOST_PP_DEC_121 120
+# define BOOST_PP_DEC_122 121
+# define BOOST_PP_DEC_123 122
+# define BOOST_PP_DEC_124 123
+# define BOOST_PP_DEC_125 124
+# define BOOST_PP_DEC_126 125
+# define BOOST_PP_DEC_127 126
+# define BOOST_PP_DEC_128 127
+# define BOOST_PP_DEC_129 128
+# define BOOST_PP_DEC_130 129
+# define BOOST_PP_DEC_131 130
+# define BOOST_PP_DEC_132 131
+# define BOOST_PP_DEC_133 132
+# define BOOST_PP_DEC_134 133
+# define BOOST_PP_DEC_135 134
+# define BOOST_PP_DEC_136 135
+# define BOOST_PP_DEC_137 136
+# define BOOST_PP_DEC_138 137
+# define BOOST_PP_DEC_139 138
+# define BOOST_PP_DEC_140 139
+# define BOOST_PP_DEC_141 140
+# define BOOST_PP_DEC_142 141
+# define BOOST_PP_DEC_143 142
+# define BOOST_PP_DEC_144 143
+# define BOOST_PP_DEC_145 144
+# define BOOST_PP_DEC_146 145
+# define BOOST_PP_DEC_147 146
+# define BOOST_PP_DEC_148 147
+# define BOOST_PP_DEC_149 148
+# define BOOST_PP_DEC_150 149
+# define BOOST_PP_DEC_151 150
+# define BOOST_PP_DEC_152 151
+# define BOOST_PP_DEC_153 152
+# define BOOST_PP_DEC_154 153
+# define BOOST_PP_DEC_155 154
+# define BOOST_PP_DEC_156 155
+# define BOOST_PP_DEC_157 156
+# define BOOST_PP_DEC_158 157
+# define BOOST_PP_DEC_159 158
+# define BOOST_PP_DEC_160 159
+# define BOOST_PP_DEC_161 160
+# define BOOST_PP_DEC_162 161
+# define BOOST_PP_DEC_163 162
+# define BOOST_PP_DEC_164 163
+# define BOOST_PP_DEC_165 164
+# define BOOST_PP_DEC_166 165
+# define BOOST_PP_DEC_167 166
+# define BOOST_PP_DEC_168 167
+# define BOOST_PP_DEC_169 168
+# define BOOST_PP_DEC_170 169
+# define BOOST_PP_DEC_171 170
+# define BOOST_PP_DEC_172 171
+# define BOOST_PP_DEC_173 172
+# define BOOST_PP_DEC_174 173
+# define BOOST_PP_DEC_175 174
+# define BOOST_PP_DEC_176 175
+# define BOOST_PP_DEC_177 176
+# define BOOST_PP_DEC_178 177
+# define BOOST_PP_DEC_179 178
+# define BOOST_PP_DEC_180 179
+# define BOOST_PP_DEC_181 180
+# define BOOST_PP_DEC_182 181
+# define BOOST_PP_DEC_183 182
+# define BOOST_PP_DEC_184 183
+# define BOOST_PP_DEC_185 184
+# define BOOST_PP_DEC_186 185
+# define BOOST_PP_DEC_187 186
+# define BOOST_PP_DEC_188 187
+# define BOOST_PP_DEC_189 188
+# define BOOST_PP_DEC_190 189
+# define BOOST_PP_DEC_191 190
+# define BOOST_PP_DEC_192 191
+# define BOOST_PP_DEC_193 192
+# define BOOST_PP_DEC_194 193
+# define BOOST_PP_DEC_195 194
+# define BOOST_PP_DEC_196 195
+# define BOOST_PP_DEC_197 196
+# define BOOST_PP_DEC_198 197
+# define BOOST_PP_DEC_199 198
+# define BOOST_PP_DEC_200 199
+# define BOOST_PP_DEC_201 200
+# define BOOST_PP_DEC_202 201
+# define BOOST_PP_DEC_203 202
+# define BOOST_PP_DEC_204 203
+# define BOOST_PP_DEC_205 204
+# define BOOST_PP_DEC_206 205
+# define BOOST_PP_DEC_207 206
+# define BOOST_PP_DEC_208 207
+# define BOOST_PP_DEC_209 208
+# define BOOST_PP_DEC_210 209
+# define BOOST_PP_DEC_211 210
+# define BOOST_PP_DEC_212 211
+# define BOOST_PP_DEC_213 212
+# define BOOST_PP_DEC_214 213
+# define BOOST_PP_DEC_215 214
+# define BOOST_PP_DEC_216 215
+# define BOOST_PP_DEC_217 216
+# define BOOST_PP_DEC_218 217
+# define BOOST_PP_DEC_219 218
+# define BOOST_PP_DEC_220 219
+# define BOOST_PP_DEC_221 220
+# define BOOST_PP_DEC_222 221
+# define BOOST_PP_DEC_223 222
+# define BOOST_PP_DEC_224 223
+# define BOOST_PP_DEC_225 224
+# define BOOST_PP_DEC_226 225
+# define BOOST_PP_DEC_227 226
+# define BOOST_PP_DEC_228 227
+# define BOOST_PP_DEC_229 228
+# define BOOST_PP_DEC_230 229
+# define BOOST_PP_DEC_231 230
+# define BOOST_PP_DEC_232 231
+# define BOOST_PP_DEC_233 232
+# define BOOST_PP_DEC_234 233
+# define BOOST_PP_DEC_235 234
+# define BOOST_PP_DEC_236 235
+# define BOOST_PP_DEC_237 236
+# define BOOST_PP_DEC_238 237
+# define BOOST_PP_DEC_239 238
+# define BOOST_PP_DEC_240 239
+# define BOOST_PP_DEC_241 240
+# define BOOST_PP_DEC_242 241
+# define BOOST_PP_DEC_243 242
+# define BOOST_PP_DEC_244 243
+# define BOOST_PP_DEC_245 244
+# define BOOST_PP_DEC_246 245
+# define BOOST_PP_DEC_247 246
+# define BOOST_PP_DEC_248 247
+# define BOOST_PP_DEC_249 248
+# define BOOST_PP_DEC_250 249
+# define BOOST_PP_DEC_251 250
+# define BOOST_PP_DEC_252 251
+# define BOOST_PP_DEC_253 252
+# define BOOST_PP_DEC_254 253
+# define BOOST_PP_DEC_255 254
+# define BOOST_PP_DEC_256 255
+#
+# endif
#
# include <boost/preprocessor/array/data.hpp>
# include <boost/preprocessor/array/elem.hpp>
+# include <boost/preprocessor/array/insert.hpp>
+# include <boost/preprocessor/array/pop_back.hpp>
+# include <boost/preprocessor/array/pop_front.hpp>
+# include <boost/preprocessor/array/push_back.hpp>
+# include <boost/preprocessor/array/push_front.hpp>
+# include <boost/preprocessor/array/remove.hpp>
+# include <boost/preprocessor/array/replace.hpp>
+# include <boost/preprocessor/array/reverse.hpp>
# include <boost/preprocessor/array/size.hpp>
#
# endif
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_ARRAY_DATA_HPP
+# define BOOST_PREPROCESSOR_ARRAY_DATA_HPP
+#
+# include <boost/preprocessor/config/config.hpp>
+# include <boost/preprocessor/tuple/elem.hpp>
+#
+# /* BOOST_PP_ARRAY_DATA */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+# define BOOST_PP_ARRAY_DATA(array) BOOST_PP_TUPLE_ELEM(2, 1, array)
+# else
+# define BOOST_PP_ARRAY_DATA(array) BOOST_PP_ARRAY_DATA_I(array)
+# define BOOST_PP_ARRAY_DATA_I(array) BOOST_PP_ARRAY_DATA_II array
+# define BOOST_PP_ARRAY_DATA_II(size, data) data
+# endif
+#
+# endif
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_ARRAY_ELEM_HPP
+# define BOOST_PREPROCESSOR_ARRAY_ELEM_HPP
+#
+# include <boost/preprocessor/array/data.hpp>
+# include <boost/preprocessor/array/size.hpp>
+# include <boost/preprocessor/config/config.hpp>
+# include <boost/preprocessor/tuple/elem.hpp>
+#
+# /* BOOST_PP_ARRAY_ELEM */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+# define BOOST_PP_ARRAY_ELEM(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array))
+# else
+# define BOOST_PP_ARRAY_ELEM(i, array) BOOST_PP_ARRAY_ELEM_I(i, array)
+# define BOOST_PP_ARRAY_ELEM_I(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array))
+# endif
+#
+# endif
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_ARRAY_SIZE_HPP
+# define BOOST_PREPROCESSOR_ARRAY_SIZE_HPP
+#
+# include <boost/preprocessor/config/config.hpp>
+# include <boost/preprocessor/tuple/elem.hpp>
+#
+# /* BOOST_PP_ARRAY_SIZE */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+# define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_TUPLE_ELEM(2, 0, array)
+# else
+# define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_ARRAY_SIZE_I(array)
+# define BOOST_PP_ARRAY_SIZE_I(array) BOOST_PP_ARRAY_SIZE_II array
+# define BOOST_PP_ARRAY_SIZE_II(size, data) size
+# endif
+#
+# endif
# define BOOST_PP_CONFIG_EDG() 0x0020
#
# ifndef BOOST_PP_CONFIG_FLAGS
-# if defined(__EDG__) || defined(__EDG_VERSION__)
+# if defined(__SPIRIT_PP__)
+# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
+# elif defined(__EDG__) || defined(__EDG_VERSION__)
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_EDG() | BOOST_PP_CONFIG_STRICT())
# elif defined(__MWERKS__)
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MWCC())
-# elif defined(__BORLANDC__) || defined(__IBMC__) || defined(__IBMCPP__)
+# elif defined(__BORLANDC__) || defined(__IBMC__) || defined(__IBMCPP__) || defined(__SUNPRO_CC)
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_BCC())
# elif defined(_MSC_VER)
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC())
# define BOOST_PP_CONFIG_EXTENDED_LINE_INFO 0
# endif
#
+# /* BOOST_PP_CONFIG_ERRORS */
+#
+# ifndef BOOST_PP_CONFIG_ERRORS
+# ifdef NDEBUG
+# define BOOST_PP_CONFIG_ERRORS 0
+# else
+# define BOOST_PP_CONFIG_ERRORS 1
+# endif
+# endif
+#
# endif
# define BOOST_PP_IIF_OO(par) BOOST_PP_IIF_I ## par
# endif
#
-# define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_ ## bit(t, f)
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
+# define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_ ## bit(t, f)
+# else
+# define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_II(BOOST_PP_IIF_ ## bit(t, f))
+# define BOOST_PP_IIF_II(id) id
+# endif
#
# define BOOST_PP_IIF_0(t, f) f
# define BOOST_PP_IIF_1(t, f) t
# define BOOST_PP_ERROR_0x0001 BOOST_PP_ERROR(0x0001, BOOST_PP_WHILE_OVERFLOW)
# define BOOST_PP_ERROR_0x0002 BOOST_PP_ERROR(0x0002, BOOST_PP_FOR_OVERFLOW)
# define BOOST_PP_ERROR_0x0003 BOOST_PP_ERROR(0x0003, BOOST_PP_REPEAT_OVERFLOW)
-# define BOOST_PP_ERROR_0x0004 BOOST_PP_ERROR(0x0004, BOOST_PP_FOLD_OVERFLOW)
+# define BOOST_PP_ERROR_0x0004 BOOST_PP_ERROR(0x0004, BOOST_PP_LIST_FOLD_OVERFLOW)
+# define BOOST_PP_ERROR_0x0005 BOOST_PP_ERROR(0x0005, BOOST_PP_SEQ_FOLD_OVERFLOW)
+# define BOOST_PP_ERROR_0x0006 BOOST_PP_ERROR(0x0006, BOOST_PP_ARITHMETIC_OVERFLOW)
+# define BOOST_PP_ERROR_0x0007 BOOST_PP_ERROR(0x0007, BOOST_PP_DIVISION_BY_ZERO)
#
# endif
# ifndef BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP
# define BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP
#
-# //include <boost/preprocessor/config/config.hpp>
# include <boost/preprocessor/control/iif.hpp>
#
# /* BOOST_PP_AUTO_REC */
+++ /dev/null
-#ifndef BOOST_PREPROCESSOR_DETAIL_CAT_HPP
-#define BOOST_PREPROCESSOR_DETAIL_CAT_HPP
-
-/* Copyright (C) 2002 Vesa Karvonen
-*
-* Permission to copy, use, modify, sell and distribute this software is
-* granted provided this copyright notice appears in all copies. This
-* software is provided "as is" without express or implied warranty, and
-* with no claim as to its suitability for any purpose.
-*
-* See http://www.boost.org for most recent version.
-*/
-
-#define BOOST_PP_DETAIL_CAT2(A,B) BOOST_PP_DETAIL_CAT2_DELAY(A,B)
-#define BOOST_PP_DETAIL_CAT2_DELAY(A, B) BOOST_PP_DETAIL_DO_CAT2(A, B)
-#define BOOST_PP_DETAIL_DO_CAT2(A,B) A##B
-
-#define BOOST_PP_DETAIL_CAT3(A,B,C) BOOST_PP_DETAIL_CAT3_DELAY(A,B,C)
-#define BOOST_PP_DETAIL_CAT3_DELAY(A,B,C) BOOST_PP_DETAIL_DO_CAT3(A,B,C)
-#define BOOST_PP_DETAIL_DO_CAT3(A,B,C) A##B##C
-
-#define BOOST_PP_DETAIL_CAT4(A,B,C,D) BOOST_PP_DETAIL_CAT4_DELAY(A,B,C,D)
-#define BOOST_PP_DETAIL_CAT4_DELAY(A,B,C,D) BOOST_PP_DETAIL_DO_CAT4(A,B,C,D)
-#define BOOST_PP_DETAIL_DO_CAT4(A,B,C,D) A##B##C##D
-
-#define BOOST_PP_DETAIL_CAT5(A,B,C,D,E) BOOST_PP_DETAIL_CAT5_DELAY(A,B,C,D,E)
-#define BOOST_PP_DETAIL_CAT5_DELAY(A,B,C,D,E) BOOST_PP_DETAIL_DO_CAT5(A,B,C,D,E)
-#define BOOST_PP_DETAIL_DO_CAT5(A,B,C,D,E) A##B##C##D##E
-
-#endif
+++ /dev/null
-#ifndef BOOST_PREPROCESSOR_DETAIL_EXPAND_HPP
-# define BOOST_PREPROCESSOR_DETAIL_EXPAND_HPP
-
-/* Copyright (C) 2002 Vesa Karvonen
- *
- * Permission to copy, use, modify, sell and distribute this software is
- * granted provided this copyright notice appears in all copies. This
- * software is provided "as is" without express or implied warranty, and
- * with no claim as to its suitability for any purpose.
- *
- * See http://www.boost.org for most recent version.
- */
-
-# define BOOST_PP_DETAIL_EXPAND(X) X
-# if !defined(__MWERKS__) || defined(BOOST_NO_COMPILER_CONFIG) || __MWERKS__ > 0x3002
-# define BOOST_PP_DETAIL_EXPAND2(X,Y) BOOST_PP_DETAIL_EXPAND(X Y)
-# else
-# define BOOST_PP_DETAIL_EXPAND2(X, Y) BOOST_PP_DETAIL_EXPAND2_DELAY(X, Y)
-# define BOOST_PP_DETAIL_EXPAND2_DELAY(X, Y) X ## Y
-# endif
-#endif
+++ /dev/null
-# ifndef BOOST_PREPROCESSOR_DETAIL_LINE_HPP
-# define BOOST_PREPROCESSOR_DETAIL_LINE_HPP
-#
-# /* **************************************************************************
-# * *
-# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
-# * modify, sell, and distribute this software is granted provided *
-# * this copyright notice appears in all copies. This software is *
-# * provided "as is" without express or implied warranty, and with *
-# * no claim at to its suitability for any purpose. *
-# * *
-# ************************************************************************** */
-#
-# include <boost/preprocessor/stringize.hpp>
-#
-# if !defined(__MWERKS__) || defined(BOOST_NO_COMPILER_CONFIG) || __MWERKS__ > 0x3002
-# define BOOST_PP_DETAIL_LINE(text) 1 BOOST_PP_STRINGIZE(text)
-# else
-# define BOOST_PP_DETAIL_LINE(text) 1
-# endif
-#
-# endif
+++ /dev/null
-#ifndef BOOST_PREPROCESSOR_REPEAT_EDG_HPP
-#define BOOST_PREPROCESSOR_REPEAT_EDG_HPP
-
-/* Copyright (C) 2002 Vesa Karvonen
- *
- * Permission to copy, use, modify, sell and distribute this software is
- * granted provided this copyright notice appears in all copies. This
- * software is provided "as is" without express or implied warranty, and
- * with no claim as to its suitability for any purpose.
- *
- * See http://www.boost.org for most recent version.
- */
-
-#define BOOST_PP_R1_0(M,D)
-#define BOOST_PP_R1_1(M,D) M(0,D)
-#define BOOST_PP_R1_2(M,D) M(0,D) M(1,D)
-#define BOOST_PP_R1_3(M,D) M(0,D) M(1,D) M(2,D)
-#define BOOST_PP_R1_4(M,D) M(0,D) M(1,D) M(2,D) M(3,D)
-#define BOOST_PP_R1_5(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D)
-#define BOOST_PP_R1_6(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D)
-#define BOOST_PP_R1_7(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D)
-#define BOOST_PP_R1_8(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D)
-#define BOOST_PP_R1_9(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D)
-#define BOOST_PP_R1_10(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D)
-#define BOOST_PP_R1_11(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D)
-#define BOOST_PP_R1_12(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D)
-#define BOOST_PP_R1_13(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D)
-#define BOOST_PP_R1_14(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D)
-#define BOOST_PP_R1_15(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D)
-#define BOOST_PP_R1_16(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D)
-#define BOOST_PP_R1_17(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D)
-#define BOOST_PP_R1_18(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D)
-#define BOOST_PP_R1_19(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D)
-#define BOOST_PP_R1_20(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D)
-#define BOOST_PP_R1_21(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D)
-#define BOOST_PP_R1_22(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D)
-#define BOOST_PP_R1_23(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D)
-#define BOOST_PP_R1_24(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D)
-#define BOOST_PP_R1_25(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D)
-#define BOOST_PP_R1_26(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D)
-#define BOOST_PP_R1_27(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D)
-#define BOOST_PP_R1_28(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D)
-#define BOOST_PP_R1_29(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D)
-#define BOOST_PP_R1_30(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D)
-#define BOOST_PP_R1_31(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D)
-#define BOOST_PP_R1_32(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D)
-#define BOOST_PP_R1_33(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D)
-#define BOOST_PP_R1_34(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D)
-#define BOOST_PP_R1_35(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D)
-#define BOOST_PP_R1_36(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D)
-#define BOOST_PP_R1_37(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D)
-#define BOOST_PP_R1_38(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D)
-#define BOOST_PP_R1_39(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D)
-#define BOOST_PP_R1_40(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D)
-#define BOOST_PP_R1_41(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D)
-#define BOOST_PP_R1_42(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D)
-#define BOOST_PP_R1_43(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D)
-#define BOOST_PP_R1_44(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D)
-#define BOOST_PP_R1_45(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D)
-#define BOOST_PP_R1_46(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D)
-#define BOOST_PP_R1_47(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D)
-#define BOOST_PP_R1_48(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D)
-#define BOOST_PP_R1_49(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D)
-#define BOOST_PP_R1_50(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D)
-#define BOOST_PP_R1_51(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D)
-#define BOOST_PP_R1_52(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D)
-#define BOOST_PP_R1_53(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D)
-#define BOOST_PP_R1_54(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D)
-#define BOOST_PP_R1_55(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D)
-#define BOOST_PP_R1_56(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D)
-#define BOOST_PP_R1_57(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D)
-#define BOOST_PP_R1_58(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D)
-#define BOOST_PP_R1_59(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D)
-#define BOOST_PP_R1_60(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D)
-#define BOOST_PP_R1_61(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D)
-#define BOOST_PP_R1_62(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D)
-#define BOOST_PP_R1_63(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D)
-#define BOOST_PP_R1_64(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D)
-#define BOOST_PP_R1_65(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D)
-#define BOOST_PP_R1_66(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D)
-#define BOOST_PP_R1_67(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D)
-#define BOOST_PP_R1_68(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D)
-#define BOOST_PP_R1_69(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D)
-#define BOOST_PP_R1_70(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D)
-#define BOOST_PP_R1_71(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D)
-#define BOOST_PP_R1_72(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D)
-#define BOOST_PP_R1_73(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D)
-#define BOOST_PP_R1_74(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D)
-#define BOOST_PP_R1_75(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D)
-#define BOOST_PP_R1_76(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D)
-#define BOOST_PP_R1_77(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D)
-#define BOOST_PP_R1_78(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D)
-#define BOOST_PP_R1_79(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D)
-#define BOOST_PP_R1_80(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D)
-#define BOOST_PP_R1_81(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D)
-#define BOOST_PP_R1_82(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D)
-#define BOOST_PP_R1_83(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D)
-#define BOOST_PP_R1_84(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D)
-#define BOOST_PP_R1_85(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D)
-#define BOOST_PP_R1_86(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D)
-#define BOOST_PP_R1_87(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D)
-#define BOOST_PP_R1_88(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D)
-#define BOOST_PP_R1_89(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D)
-#define BOOST_PP_R1_90(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D)
-#define BOOST_PP_R1_91(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D)
-#define BOOST_PP_R1_92(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D)
-#define BOOST_PP_R1_93(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D)
-#define BOOST_PP_R1_94(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D)
-#define BOOST_PP_R1_95(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D)
-#define BOOST_PP_R1_96(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D)
-#define BOOST_PP_R1_97(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D)
-#define BOOST_PP_R1_98(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D)
-#define BOOST_PP_R1_99(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D)
-#define BOOST_PP_R1_100(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D)
-#define BOOST_PP_R1_101(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D)
-#define BOOST_PP_R1_102(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D)
-#define BOOST_PP_R1_103(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D)
-#define BOOST_PP_R1_104(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D)
-#define BOOST_PP_R1_105(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D)
-#define BOOST_PP_R1_106(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D)
-#define BOOST_PP_R1_107(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D)
-#define BOOST_PP_R1_108(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D)
-#define BOOST_PP_R1_109(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D)
-#define BOOST_PP_R1_110(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D)
-#define BOOST_PP_R1_111(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D)
-#define BOOST_PP_R1_112(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D)
-#define BOOST_PP_R1_113(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D)
-#define BOOST_PP_R1_114(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D)
-#define BOOST_PP_R1_115(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D)
-#define BOOST_PP_R1_116(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D)
-#define BOOST_PP_R1_117(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D)
-#define BOOST_PP_R1_118(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D)
-#define BOOST_PP_R1_119(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D)
-#define BOOST_PP_R1_120(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D)
-#define BOOST_PP_R1_121(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D)
-#define BOOST_PP_R1_122(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D)
-#define BOOST_PP_R1_123(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D)
-#define BOOST_PP_R1_124(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D) M(123,D)
-#define BOOST_PP_R1_125(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D) M(123,D) M(124,D)
-#define BOOST_PP_R1_126(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D) M(123,D) M(124,D) M(125,D)
-#define BOOST_PP_R1_127(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D) M(123,D) M(124,D) M(125,D) M(126,D)
-#define BOOST_PP_R1_128(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D) M(123,D) M(124,D) M(125,D) M(126,D) M(127,D)
-
-#define BOOST_PP_R2_0(M,D)
-#define BOOST_PP_R2_1(M,D) M(0,D)
-#define BOOST_PP_R2_2(M,D) M(0,D) M(1,D)
-#define BOOST_PP_R2_3(M,D) M(0,D) M(1,D) M(2,D)
-#define BOOST_PP_R2_4(M,D) M(0,D) M(1,D) M(2,D) M(3,D)
-#define BOOST_PP_R2_5(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D)
-#define BOOST_PP_R2_6(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D)
-#define BOOST_PP_R2_7(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D)
-#define BOOST_PP_R2_8(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D)
-#define BOOST_PP_R2_9(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D)
-#define BOOST_PP_R2_10(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D)
-#define BOOST_PP_R2_11(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D)
-#define BOOST_PP_R2_12(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D)
-#define BOOST_PP_R2_13(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D)
-#define BOOST_PP_R2_14(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D)
-#define BOOST_PP_R2_15(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D)
-#define BOOST_PP_R2_16(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D)
-#define BOOST_PP_R2_17(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D)
-#define BOOST_PP_R2_18(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D)
-#define BOOST_PP_R2_19(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D)
-#define BOOST_PP_R2_20(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D)
-#define BOOST_PP_R2_21(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D)
-#define BOOST_PP_R2_22(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D)
-#define BOOST_PP_R2_23(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D)
-#define BOOST_PP_R2_24(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D)
-#define BOOST_PP_R2_25(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D)
-#define BOOST_PP_R2_26(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D)
-#define BOOST_PP_R2_27(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D)
-#define BOOST_PP_R2_28(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D)
-#define BOOST_PP_R2_29(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D)
-#define BOOST_PP_R2_30(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D)
-#define BOOST_PP_R2_31(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D)
-#define BOOST_PP_R2_32(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D)
-#define BOOST_PP_R2_33(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D)
-#define BOOST_PP_R2_34(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D)
-#define BOOST_PP_R2_35(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D)
-#define BOOST_PP_R2_36(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D)
-#define BOOST_PP_R2_37(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D)
-#define BOOST_PP_R2_38(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D)
-#define BOOST_PP_R2_39(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D)
-#define BOOST_PP_R2_40(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D)
-#define BOOST_PP_R2_41(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D)
-#define BOOST_PP_R2_42(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D)
-#define BOOST_PP_R2_43(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D)
-#define BOOST_PP_R2_44(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D)
-#define BOOST_PP_R2_45(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D)
-#define BOOST_PP_R2_46(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D)
-#define BOOST_PP_R2_47(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D)
-#define BOOST_PP_R2_48(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D)
-#define BOOST_PP_R2_49(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D)
-#define BOOST_PP_R2_50(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D)
-#define BOOST_PP_R2_51(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D)
-#define BOOST_PP_R2_52(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D)
-#define BOOST_PP_R2_53(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D)
-#define BOOST_PP_R2_54(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D)
-#define BOOST_PP_R2_55(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D)
-#define BOOST_PP_R2_56(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D)
-#define BOOST_PP_R2_57(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D)
-#define BOOST_PP_R2_58(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D)
-#define BOOST_PP_R2_59(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D)
-#define BOOST_PP_R2_60(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D)
-#define BOOST_PP_R2_61(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D)
-#define BOOST_PP_R2_62(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D)
-#define BOOST_PP_R2_63(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D)
-#define BOOST_PP_R2_64(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D)
-#define BOOST_PP_R2_65(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D)
-#define BOOST_PP_R2_66(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D)
-#define BOOST_PP_R2_67(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D)
-#define BOOST_PP_R2_68(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D)
-#define BOOST_PP_R2_69(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D)
-#define BOOST_PP_R2_70(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D)
-#define BOOST_PP_R2_71(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D)
-#define BOOST_PP_R2_72(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D)
-#define BOOST_PP_R2_73(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D)
-#define BOOST_PP_R2_74(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D)
-#define BOOST_PP_R2_75(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D)
-#define BOOST_PP_R2_76(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D)
-#define BOOST_PP_R2_77(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D)
-#define BOOST_PP_R2_78(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D)
-#define BOOST_PP_R2_79(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D)
-#define BOOST_PP_R2_80(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D)
-#define BOOST_PP_R2_81(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D)
-#define BOOST_PP_R2_82(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D)
-#define BOOST_PP_R2_83(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D)
-#define BOOST_PP_R2_84(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D)
-#define BOOST_PP_R2_85(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D)
-#define BOOST_PP_R2_86(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D)
-#define BOOST_PP_R2_87(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D)
-#define BOOST_PP_R2_88(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D)
-#define BOOST_PP_R2_89(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D)
-#define BOOST_PP_R2_90(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D)
-#define BOOST_PP_R2_91(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D)
-#define BOOST_PP_R2_92(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D)
-#define BOOST_PP_R2_93(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D)
-#define BOOST_PP_R2_94(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D)
-#define BOOST_PP_R2_95(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D)
-#define BOOST_PP_R2_96(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D)
-#define BOOST_PP_R2_97(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D)
-#define BOOST_PP_R2_98(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D)
-#define BOOST_PP_R2_99(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D)
-#define BOOST_PP_R2_100(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D)
-#define BOOST_PP_R2_101(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D)
-#define BOOST_PP_R2_102(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D)
-#define BOOST_PP_R2_103(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D)
-#define BOOST_PP_R2_104(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D)
-#define BOOST_PP_R2_105(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D)
-#define BOOST_PP_R2_106(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D)
-#define BOOST_PP_R2_107(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D)
-#define BOOST_PP_R2_108(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D)
-#define BOOST_PP_R2_109(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D)
-#define BOOST_PP_R2_110(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D)
-#define BOOST_PP_R2_111(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D)
-#define BOOST_PP_R2_112(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D)
-#define BOOST_PP_R2_113(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D)
-#define BOOST_PP_R2_114(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D)
-#define BOOST_PP_R2_115(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D)
-#define BOOST_PP_R2_116(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D)
-#define BOOST_PP_R2_117(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D)
-#define BOOST_PP_R2_118(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D)
-#define BOOST_PP_R2_119(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D)
-#define BOOST_PP_R2_120(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D)
-#define BOOST_PP_R2_121(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D)
-#define BOOST_PP_R2_122(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D)
-#define BOOST_PP_R2_123(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D)
-#define BOOST_PP_R2_124(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D) M(123,D)
-#define BOOST_PP_R2_125(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D) M(123,D) M(124,D)
-#define BOOST_PP_R2_126(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D) M(123,D) M(124,D) M(125,D)
-#define BOOST_PP_R2_127(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D) M(123,D) M(124,D) M(125,D) M(126,D)
-#define BOOST_PP_R2_128(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D) M(123,D) M(124,D) M(125,D) M(126,D) M(127,D)
-
-#define BOOST_PP_R3_0(M,D)
-#define BOOST_PP_R3_1(M,D) M(0,D)
-#define BOOST_PP_R3_2(M,D) M(0,D) M(1,D)
-#define BOOST_PP_R3_3(M,D) M(0,D) M(1,D) M(2,D)
-#define BOOST_PP_R3_4(M,D) M(0,D) M(1,D) M(2,D) M(3,D)
-#define BOOST_PP_R3_5(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D)
-#define BOOST_PP_R3_6(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D)
-#define BOOST_PP_R3_7(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D)
-#define BOOST_PP_R3_8(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D)
-#define BOOST_PP_R3_9(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D)
-#define BOOST_PP_R3_10(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D)
-#define BOOST_PP_R3_11(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D)
-#define BOOST_PP_R3_12(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D)
-#define BOOST_PP_R3_13(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D)
-#define BOOST_PP_R3_14(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D)
-#define BOOST_PP_R3_15(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D)
-#define BOOST_PP_R3_16(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D)
-#define BOOST_PP_R3_17(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D)
-#define BOOST_PP_R3_18(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D)
-#define BOOST_PP_R3_19(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D)
-#define BOOST_PP_R3_20(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D)
-#define BOOST_PP_R3_21(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D)
-#define BOOST_PP_R3_22(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D)
-#define BOOST_PP_R3_23(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D)
-#define BOOST_PP_R3_24(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D)
-#define BOOST_PP_R3_25(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D)
-#define BOOST_PP_R3_26(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D)
-#define BOOST_PP_R3_27(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D)
-#define BOOST_PP_R3_28(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D)
-#define BOOST_PP_R3_29(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D)
-#define BOOST_PP_R3_30(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D)
-#define BOOST_PP_R3_31(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D)
-#define BOOST_PP_R3_32(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D)
-#define BOOST_PP_R3_33(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D)
-#define BOOST_PP_R3_34(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D)
-#define BOOST_PP_R3_35(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D)
-#define BOOST_PP_R3_36(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D)
-#define BOOST_PP_R3_37(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D)
-#define BOOST_PP_R3_38(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D)
-#define BOOST_PP_R3_39(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D)
-#define BOOST_PP_R3_40(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D)
-#define BOOST_PP_R3_41(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D)
-#define BOOST_PP_R3_42(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D)
-#define BOOST_PP_R3_43(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D)
-#define BOOST_PP_R3_44(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D)
-#define BOOST_PP_R3_45(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D)
-#define BOOST_PP_R3_46(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D)
-#define BOOST_PP_R3_47(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D)
-#define BOOST_PP_R3_48(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D)
-#define BOOST_PP_R3_49(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D)
-#define BOOST_PP_R3_50(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D)
-#define BOOST_PP_R3_51(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D)
-#define BOOST_PP_R3_52(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D)
-#define BOOST_PP_R3_53(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D)
-#define BOOST_PP_R3_54(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D)
-#define BOOST_PP_R3_55(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D)
-#define BOOST_PP_R3_56(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D)
-#define BOOST_PP_R3_57(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D)
-#define BOOST_PP_R3_58(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D)
-#define BOOST_PP_R3_59(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D)
-#define BOOST_PP_R3_60(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D)
-#define BOOST_PP_R3_61(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D)
-#define BOOST_PP_R3_62(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D)
-#define BOOST_PP_R3_63(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D)
-#define BOOST_PP_R3_64(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D)
-#define BOOST_PP_R3_65(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D)
-#define BOOST_PP_R3_66(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D)
-#define BOOST_PP_R3_67(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D)
-#define BOOST_PP_R3_68(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D)
-#define BOOST_PP_R3_69(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D)
-#define BOOST_PP_R3_70(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D)
-#define BOOST_PP_R3_71(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D)
-#define BOOST_PP_R3_72(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D)
-#define BOOST_PP_R3_73(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D)
-#define BOOST_PP_R3_74(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D)
-#define BOOST_PP_R3_75(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D)
-#define BOOST_PP_R3_76(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D)
-#define BOOST_PP_R3_77(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D)
-#define BOOST_PP_R3_78(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D)
-#define BOOST_PP_R3_79(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D)
-#define BOOST_PP_R3_80(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D)
-#define BOOST_PP_R3_81(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D)
-#define BOOST_PP_R3_82(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D)
-#define BOOST_PP_R3_83(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D)
-#define BOOST_PP_R3_84(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D)
-#define BOOST_PP_R3_85(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D)
-#define BOOST_PP_R3_86(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D)
-#define BOOST_PP_R3_87(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D)
-#define BOOST_PP_R3_88(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D)
-#define BOOST_PP_R3_89(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D)
-#define BOOST_PP_R3_90(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D)
-#define BOOST_PP_R3_91(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D)
-#define BOOST_PP_R3_92(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D)
-#define BOOST_PP_R3_93(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D)
-#define BOOST_PP_R3_94(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D)
-#define BOOST_PP_R3_95(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D)
-#define BOOST_PP_R3_96(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D)
-#define BOOST_PP_R3_97(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D)
-#define BOOST_PP_R3_98(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D)
-#define BOOST_PP_R3_99(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D)
-#define BOOST_PP_R3_100(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D)
-#define BOOST_PP_R3_101(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D)
-#define BOOST_PP_R3_102(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D)
-#define BOOST_PP_R3_103(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D)
-#define BOOST_PP_R3_104(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D)
-#define BOOST_PP_R3_105(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D)
-#define BOOST_PP_R3_106(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D)
-#define BOOST_PP_R3_107(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D)
-#define BOOST_PP_R3_108(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D)
-#define BOOST_PP_R3_109(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D)
-#define BOOST_PP_R3_110(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D)
-#define BOOST_PP_R3_111(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D)
-#define BOOST_PP_R3_112(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D)
-#define BOOST_PP_R3_113(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D)
-#define BOOST_PP_R3_114(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D)
-#define BOOST_PP_R3_115(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D)
-#define BOOST_PP_R3_116(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D)
-#define BOOST_PP_R3_117(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D)
-#define BOOST_PP_R3_118(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D)
-#define BOOST_PP_R3_119(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D)
-#define BOOST_PP_R3_120(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D)
-#define BOOST_PP_R3_121(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D)
-#define BOOST_PP_R3_122(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D)
-#define BOOST_PP_R3_123(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D)
-#define BOOST_PP_R3_124(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D) M(123,D)
-#define BOOST_PP_R3_125(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D) M(123,D) M(124,D)
-#define BOOST_PP_R3_126(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D) M(123,D) M(124,D) M(125,D)
-#define BOOST_PP_R3_127(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D) M(123,D) M(124,D) M(125,D) M(126,D)
-#define BOOST_PP_R3_128(M,D) M(0,D) M(1,D) M(2,D) M(3,D) M(4,D) M(5,D) M(6,D) M(7,D) M(8,D) M(9,D) M(10,D) M(11,D) M(12,D) M(13,D) M(14,D) M(15,D) M(16,D) M(17,D) M(18,D) M(19,D) M(20,D) M(21,D) M(22,D) M(23,D) M(24,D) M(25,D) M(26,D) M(27,D) M(28,D) M(29,D) M(30,D) M(31,D) M(32,D) M(33,D) M(34,D) M(35,D) M(36,D) M(37,D) M(38,D) M(39,D) M(40,D) M(41,D) M(42,D) M(43,D) M(44,D) M(45,D) M(46,D) M(47,D) M(48,D) M(49,D) M(50,D) M(51,D) M(52,D) M(53,D) M(54,D) M(55,D) M(56,D) M(57,D) M(58,D) M(59,D) M(60,D) M(61,D) M(62,D) M(63,D) M(64,D) M(65,D) M(66,D) M(67,D) M(68,D) M(69,D) M(70,D) M(71,D) M(72,D) M(73,D) M(74,D) M(75,D) M(76,D) M(77,D) M(78,D) M(79,D) M(80,D) M(81,D) M(82,D) M(83,D) M(84,D) M(85,D) M(86,D) M(87,D) M(88,D) M(89,D) M(90,D) M(91,D) M(92,D) M(93,D) M(94,D) M(95,D) M(96,D) M(97,D) M(98,D) M(99,D) M(100,D) M(101,D) M(102,D) M(103,D) M(104,D) M(105,D) M(106,D) M(107,D) M(108,D) M(109,D) M(110,D) M(111,D) M(112,D) M(113,D) M(114,D) M(115,D) M(116,D) M(117,D) M(118,D) M(119,D) M(120,D) M(121,D) M(122,D) M(123,D) M(124,D) M(125,D) M(126,D) M(127,D)
-
-#endif
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# include <boost/preprocessor/slot/detail/shared.hpp>
+#
+# undef BOOST_PP_ITERATION_START_1
+#
+# undef BOOST_PP_ITERATION_START_1_DIGIT_1
+# undef BOOST_PP_ITERATION_START_1_DIGIT_2
+# undef BOOST_PP_ITERATION_START_1_DIGIT_3
+# undef BOOST_PP_ITERATION_START_1_DIGIT_4
+# undef BOOST_PP_ITERATION_START_1_DIGIT_5
+# undef BOOST_PP_ITERATION_START_1_DIGIT_6
+# undef BOOST_PP_ITERATION_START_1_DIGIT_7
+# undef BOOST_PP_ITERATION_START_1_DIGIT_8
+# undef BOOST_PP_ITERATION_START_1_DIGIT_9
+# undef BOOST_PP_ITERATION_START_1_DIGIT_10
+#
+# if BOOST_PP_SLOT_TEMP_3 == 0
+# define BOOST_PP_ITERATION_START_1_DIGIT_3 0
+# elif BOOST_PP_SLOT_TEMP_3 == 1
+# define BOOST_PP_ITERATION_START_1_DIGIT_3 1
+# elif BOOST_PP_SLOT_TEMP_3 == 2
+# define BOOST_PP_ITERATION_START_1_DIGIT_3 2
+# elif BOOST_PP_SLOT_TEMP_3 == 3
+# define BOOST_PP_ITERATION_START_1_DIGIT_3 3
+# elif BOOST_PP_SLOT_TEMP_3 == 4
+# define BOOST_PP_ITERATION_START_1_DIGIT_3 4
+# elif BOOST_PP_SLOT_TEMP_3 == 5
+# define BOOST_PP_ITERATION_START_1_DIGIT_3 5
+# elif BOOST_PP_SLOT_TEMP_3 == 6
+# define BOOST_PP_ITERATION_START_1_DIGIT_3 6
+# elif BOOST_PP_SLOT_TEMP_3 == 7
+# define BOOST_PP_ITERATION_START_1_DIGIT_3 7
+# elif BOOST_PP_SLOT_TEMP_3 == 8
+# define BOOST_PP_ITERATION_START_1_DIGIT_3 8
+# elif BOOST_PP_SLOT_TEMP_3 == 9
+# define BOOST_PP_ITERATION_START_1_DIGIT_3 9
+# endif
+#
+# if BOOST_PP_SLOT_TEMP_2 == 0
+# define BOOST_PP_ITERATION_START_1_DIGIT_2 0
+# elif BOOST_PP_SLOT_TEMP_2 == 1
+# define BOOST_PP_ITERATION_START_1_DIGIT_2 1
+# elif BOOST_PP_SLOT_TEMP_2 == 2
+# define BOOST_PP_ITERATION_START_1_DIGIT_2 2
+# elif BOOST_PP_SLOT_TEMP_2 == 3
+# define BOOST_PP_ITERATION_START_1_DIGIT_2 3
+# elif BOOST_PP_SLOT_TEMP_2 == 4
+# define BOOST_PP_ITERATION_START_1_DIGIT_2 4
+# elif BOOST_PP_SLOT_TEMP_2 == 5
+# define BOOST_PP_ITERATION_START_1_DIGIT_2 5
+# elif BOOST_PP_SLOT_TEMP_2 == 6
+# define BOOST_PP_ITERATION_START_1_DIGIT_2 6
+# elif BOOST_PP_SLOT_TEMP_2 == 7
+# define BOOST_PP_ITERATION_START_1_DIGIT_2 7
+# elif BOOST_PP_SLOT_TEMP_2 == 8
+# define BOOST_PP_ITERATION_START_1_DIGIT_2 8
+# elif BOOST_PP_SLOT_TEMP_2 == 9
+# define BOOST_PP_ITERATION_START_1_DIGIT_2 9
+# endif
+#
+# if BOOST_PP_SLOT_TEMP_1 == 0
+# define BOOST_PP_ITERATION_START_1_DIGIT_1 0
+# elif BOOST_PP_SLOT_TEMP_1 == 1
+# define BOOST_PP_ITERATION_START_1_DIGIT_1 1
+# elif BOOST_PP_SLOT_TEMP_1 == 2
+# define BOOST_PP_ITERATION_START_1_DIGIT_1 2
+# elif BOOST_PP_SLOT_TEMP_1 == 3
+# define BOOST_PP_ITERATION_START_1_DIGIT_1 3
+# elif BOOST_PP_SLOT_TEMP_1 == 4
+# define BOOST_PP_ITERATION_START_1_DIGIT_1 4
+# elif BOOST_PP_SLOT_TEMP_1 == 5
+# define BOOST_PP_ITERATION_START_1_DIGIT_1 5
+# elif BOOST_PP_SLOT_TEMP_1 == 6
+# define BOOST_PP_ITERATION_START_1_DIGIT_1 6
+# elif BOOST_PP_SLOT_TEMP_1 == 7
+# define BOOST_PP_ITERATION_START_1_DIGIT_1 7
+# elif BOOST_PP_SLOT_TEMP_1 == 8
+# define BOOST_PP_ITERATION_START_1_DIGIT_1 8
+# elif BOOST_PP_SLOT_TEMP_1 == 9
+# define BOOST_PP_ITERATION_START_1_DIGIT_1 9
+# endif
+#
+# if BOOST_PP_ITERATION_START_1_DIGIT_3
+# define BOOST_PP_ITERATION_START_1 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_1_DIGIT_3, BOOST_PP_ITERATION_START_1_DIGIT_2, BOOST_PP_ITERATION_START_1_DIGIT_1)
+# elif BOOST_PP_ITERATION_START_1_DIGIT_2
+# define BOOST_PP_ITERATION_START_1 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_1_DIGIT_2, BOOST_PP_ITERATION_START_1_DIGIT_1)
+# else
+# define BOOST_PP_ITERATION_START_1 BOOST_PP_ITERATION_START_1_DIGIT_1
+# endif
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# include <boost/preprocessor/slot/detail/shared.hpp>
+#
+# undef BOOST_PP_ITERATION_FINISH_1
+#
+# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_1
+# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_2
+# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_3
+# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_4
+# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_5
+# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_6
+# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_7
+# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_8
+# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_9
+# undef BOOST_PP_ITERATION_FINISH_1_DIGIT_10
+#
+# if BOOST_PP_SLOT_TEMP_3 == 0
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 0
+# elif BOOST_PP_SLOT_TEMP_3 == 1
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 1
+# elif BOOST_PP_SLOT_TEMP_3 == 2
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 2
+# elif BOOST_PP_SLOT_TEMP_3 == 3
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 3
+# elif BOOST_PP_SLOT_TEMP_3 == 4
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 4
+# elif BOOST_PP_SLOT_TEMP_3 == 5
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 5
+# elif BOOST_PP_SLOT_TEMP_3 == 6
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 6
+# elif BOOST_PP_SLOT_TEMP_3 == 7
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 7
+# elif BOOST_PP_SLOT_TEMP_3 == 8
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 8
+# elif BOOST_PP_SLOT_TEMP_3 == 9
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 9
+# endif
+#
+# if BOOST_PP_SLOT_TEMP_2 == 0
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 0
+# elif BOOST_PP_SLOT_TEMP_2 == 1
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 1
+# elif BOOST_PP_SLOT_TEMP_2 == 2
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 2
+# elif BOOST_PP_SLOT_TEMP_2 == 3
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 3
+# elif BOOST_PP_SLOT_TEMP_2 == 4
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 4
+# elif BOOST_PP_SLOT_TEMP_2 == 5
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 5
+# elif BOOST_PP_SLOT_TEMP_2 == 6
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 6
+# elif BOOST_PP_SLOT_TEMP_2 == 7
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 7
+# elif BOOST_PP_SLOT_TEMP_2 == 8
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 8
+# elif BOOST_PP_SLOT_TEMP_2 == 9
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 9
+# endif
+#
+# if BOOST_PP_SLOT_TEMP_1 == 0
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 0
+# elif BOOST_PP_SLOT_TEMP_1 == 1
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 1
+# elif BOOST_PP_SLOT_TEMP_1 == 2
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 2
+# elif BOOST_PP_SLOT_TEMP_1 == 3
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 3
+# elif BOOST_PP_SLOT_TEMP_1 == 4
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 4
+# elif BOOST_PP_SLOT_TEMP_1 == 5
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 5
+# elif BOOST_PP_SLOT_TEMP_1 == 6
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 6
+# elif BOOST_PP_SLOT_TEMP_1 == 7
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 7
+# elif BOOST_PP_SLOT_TEMP_1 == 8
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 8
+# elif BOOST_PP_SLOT_TEMP_1 == 9
+# define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 9
+# endif
+#
+# if BOOST_PP_ITERATION_FINISH_1_DIGIT_3
+# define BOOST_PP_ITERATION_FINISH_1 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_1_DIGIT_3, BOOST_PP_ITERATION_FINISH_1_DIGIT_2, BOOST_PP_ITERATION_FINISH_1_DIGIT_1)
+# elif BOOST_PP_ITERATION_FINISH_1_DIGIT_2
+# define BOOST_PP_ITERATION_FINISH_1 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_1_DIGIT_2, BOOST_PP_ITERATION_FINISH_1_DIGIT_1)
+# else
+# define BOOST_PP_ITERATION_FINISH_1 BOOST_PP_ITERATION_FINISH_1_DIGIT_1
+# endif
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# if defined(BOOST_PP_ITERATION_LIMITS)
+# if !defined(BOOST_PP_FILENAME_1)
+# error BOOST_PP_ERROR: depth #1 filename is not defined
+# endif
+# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS)
+# include <boost/preprocessor/iteration/detail/bounds/lower1.hpp>
+# define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS)
+# include <boost/preprocessor/iteration/detail/bounds/upper1.hpp>
+# define BOOST_PP_ITERATION_FLAGS_1 0
+# undef BOOST_PP_ITERATION_LIMITS
+# elif defined(BOOST_PP_ITERATION_PARAMS_1)
+# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_1)
+# include <boost/preprocessor/iteration/detail/bounds/lower1.hpp>
+# define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_1)
+# include <boost/preprocessor/iteration/detail/bounds/upper1.hpp>
+# define BOOST_PP_FILENAME_1 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_1)
+# if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_1) >= 4
+# define BOOST_PP_ITERATION_FLAGS_1 BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_1)
+# else
+# define BOOST_PP_ITERATION_FLAGS_1 0
+# endif
+# else
+# error BOOST_PP_ERROR: depth #1 iteration boundaries or filename not defined
+# endif
+#
+# undef BOOST_PP_ITERATION_DEPTH
+# define BOOST_PP_ITERATION_DEPTH() 1
+#
+# define BOOST_PP_IS_ITERATING 1
+#
+# if (BOOST_PP_ITERATION_START_1) > (BOOST_PP_ITERATION_FINISH_1)
+# include <boost/preprocessor/iteration/detail/iter/reverse1.hpp>
+# else
+# if BOOST_PP_ITERATION_START_1 <= 0 && BOOST_PP_ITERATION_FINISH_1 >= 0
+# define BOOST_PP_ITERATION_1 0
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 1 && BOOST_PP_ITERATION_FINISH_1 >= 1
+# define BOOST_PP_ITERATION_1 1
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 2 && BOOST_PP_ITERATION_FINISH_1 >= 2
+# define BOOST_PP_ITERATION_1 2
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 3 && BOOST_PP_ITERATION_FINISH_1 >= 3
+# define BOOST_PP_ITERATION_1 3
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 4 && BOOST_PP_ITERATION_FINISH_1 >= 4
+# define BOOST_PP_ITERATION_1 4
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 5 && BOOST_PP_ITERATION_FINISH_1 >= 5
+# define BOOST_PP_ITERATION_1 5
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 6 && BOOST_PP_ITERATION_FINISH_1 >= 6
+# define BOOST_PP_ITERATION_1 6
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 7 && BOOST_PP_ITERATION_FINISH_1 >= 7
+# define BOOST_PP_ITERATION_1 7
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 8 && BOOST_PP_ITERATION_FINISH_1 >= 8
+# define BOOST_PP_ITERATION_1 8
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 9 && BOOST_PP_ITERATION_FINISH_1 >= 9
+# define BOOST_PP_ITERATION_1 9
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 10 && BOOST_PP_ITERATION_FINISH_1 >= 10
+# define BOOST_PP_ITERATION_1 10
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 11 && BOOST_PP_ITERATION_FINISH_1 >= 11
+# define BOOST_PP_ITERATION_1 11
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 12 && BOOST_PP_ITERATION_FINISH_1 >= 12
+# define BOOST_PP_ITERATION_1 12
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 13 && BOOST_PP_ITERATION_FINISH_1 >= 13
+# define BOOST_PP_ITERATION_1 13
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 14 && BOOST_PP_ITERATION_FINISH_1 >= 14
+# define BOOST_PP_ITERATION_1 14
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 15 && BOOST_PP_ITERATION_FINISH_1 >= 15
+# define BOOST_PP_ITERATION_1 15
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 16 && BOOST_PP_ITERATION_FINISH_1 >= 16
+# define BOOST_PP_ITERATION_1 16
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 17 && BOOST_PP_ITERATION_FINISH_1 >= 17
+# define BOOST_PP_ITERATION_1 17
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 18 && BOOST_PP_ITERATION_FINISH_1 >= 18
+# define BOOST_PP_ITERATION_1 18
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 19 && BOOST_PP_ITERATION_FINISH_1 >= 19
+# define BOOST_PP_ITERATION_1 19
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 20 && BOOST_PP_ITERATION_FINISH_1 >= 20
+# define BOOST_PP_ITERATION_1 20
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 21 && BOOST_PP_ITERATION_FINISH_1 >= 21
+# define BOOST_PP_ITERATION_1 21
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 22 && BOOST_PP_ITERATION_FINISH_1 >= 22
+# define BOOST_PP_ITERATION_1 22
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 23 && BOOST_PP_ITERATION_FINISH_1 >= 23
+# define BOOST_PP_ITERATION_1 23
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 24 && BOOST_PP_ITERATION_FINISH_1 >= 24
+# define BOOST_PP_ITERATION_1 24
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 25 && BOOST_PP_ITERATION_FINISH_1 >= 25
+# define BOOST_PP_ITERATION_1 25
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 26 && BOOST_PP_ITERATION_FINISH_1 >= 26
+# define BOOST_PP_ITERATION_1 26
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 27 && BOOST_PP_ITERATION_FINISH_1 >= 27
+# define BOOST_PP_ITERATION_1 27
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 28 && BOOST_PP_ITERATION_FINISH_1 >= 28
+# define BOOST_PP_ITERATION_1 28
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 29 && BOOST_PP_ITERATION_FINISH_1 >= 29
+# define BOOST_PP_ITERATION_1 29
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 30 && BOOST_PP_ITERATION_FINISH_1 >= 30
+# define BOOST_PP_ITERATION_1 30
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 31 && BOOST_PP_ITERATION_FINISH_1 >= 31
+# define BOOST_PP_ITERATION_1 31
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 32 && BOOST_PP_ITERATION_FINISH_1 >= 32
+# define BOOST_PP_ITERATION_1 32
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 33 && BOOST_PP_ITERATION_FINISH_1 >= 33
+# define BOOST_PP_ITERATION_1 33
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 34 && BOOST_PP_ITERATION_FINISH_1 >= 34
+# define BOOST_PP_ITERATION_1 34
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 35 && BOOST_PP_ITERATION_FINISH_1 >= 35
+# define BOOST_PP_ITERATION_1 35
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 36 && BOOST_PP_ITERATION_FINISH_1 >= 36
+# define BOOST_PP_ITERATION_1 36
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 37 && BOOST_PP_ITERATION_FINISH_1 >= 37
+# define BOOST_PP_ITERATION_1 37
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 38 && BOOST_PP_ITERATION_FINISH_1 >= 38
+# define BOOST_PP_ITERATION_1 38
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 39 && BOOST_PP_ITERATION_FINISH_1 >= 39
+# define BOOST_PP_ITERATION_1 39
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 40 && BOOST_PP_ITERATION_FINISH_1 >= 40
+# define BOOST_PP_ITERATION_1 40
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 41 && BOOST_PP_ITERATION_FINISH_1 >= 41
+# define BOOST_PP_ITERATION_1 41
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 42 && BOOST_PP_ITERATION_FINISH_1 >= 42
+# define BOOST_PP_ITERATION_1 42
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 43 && BOOST_PP_ITERATION_FINISH_1 >= 43
+# define BOOST_PP_ITERATION_1 43
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 44 && BOOST_PP_ITERATION_FINISH_1 >= 44
+# define BOOST_PP_ITERATION_1 44
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 45 && BOOST_PP_ITERATION_FINISH_1 >= 45
+# define BOOST_PP_ITERATION_1 45
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 46 && BOOST_PP_ITERATION_FINISH_1 >= 46
+# define BOOST_PP_ITERATION_1 46
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 47 && BOOST_PP_ITERATION_FINISH_1 >= 47
+# define BOOST_PP_ITERATION_1 47
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 48 && BOOST_PP_ITERATION_FINISH_1 >= 48
+# define BOOST_PP_ITERATION_1 48
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 49 && BOOST_PP_ITERATION_FINISH_1 >= 49
+# define BOOST_PP_ITERATION_1 49
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 50 && BOOST_PP_ITERATION_FINISH_1 >= 50
+# define BOOST_PP_ITERATION_1 50
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 51 && BOOST_PP_ITERATION_FINISH_1 >= 51
+# define BOOST_PP_ITERATION_1 51
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 52 && BOOST_PP_ITERATION_FINISH_1 >= 52
+# define BOOST_PP_ITERATION_1 52
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 53 && BOOST_PP_ITERATION_FINISH_1 >= 53
+# define BOOST_PP_ITERATION_1 53
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 54 && BOOST_PP_ITERATION_FINISH_1 >= 54
+# define BOOST_PP_ITERATION_1 54
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 55 && BOOST_PP_ITERATION_FINISH_1 >= 55
+# define BOOST_PP_ITERATION_1 55
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 56 && BOOST_PP_ITERATION_FINISH_1 >= 56
+# define BOOST_PP_ITERATION_1 56
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 57 && BOOST_PP_ITERATION_FINISH_1 >= 57
+# define BOOST_PP_ITERATION_1 57
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 58 && BOOST_PP_ITERATION_FINISH_1 >= 58
+# define BOOST_PP_ITERATION_1 58
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 59 && BOOST_PP_ITERATION_FINISH_1 >= 59
+# define BOOST_PP_ITERATION_1 59
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 60 && BOOST_PP_ITERATION_FINISH_1 >= 60
+# define BOOST_PP_ITERATION_1 60
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 61 && BOOST_PP_ITERATION_FINISH_1 >= 61
+# define BOOST_PP_ITERATION_1 61
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 62 && BOOST_PP_ITERATION_FINISH_1 >= 62
+# define BOOST_PP_ITERATION_1 62
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 63 && BOOST_PP_ITERATION_FINISH_1 >= 63
+# define BOOST_PP_ITERATION_1 63
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 64 && BOOST_PP_ITERATION_FINISH_1 >= 64
+# define BOOST_PP_ITERATION_1 64
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 65 && BOOST_PP_ITERATION_FINISH_1 >= 65
+# define BOOST_PP_ITERATION_1 65
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 66 && BOOST_PP_ITERATION_FINISH_1 >= 66
+# define BOOST_PP_ITERATION_1 66
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 67 && BOOST_PP_ITERATION_FINISH_1 >= 67
+# define BOOST_PP_ITERATION_1 67
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 68 && BOOST_PP_ITERATION_FINISH_1 >= 68
+# define BOOST_PP_ITERATION_1 68
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 69 && BOOST_PP_ITERATION_FINISH_1 >= 69
+# define BOOST_PP_ITERATION_1 69
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 70 && BOOST_PP_ITERATION_FINISH_1 >= 70
+# define BOOST_PP_ITERATION_1 70
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 71 && BOOST_PP_ITERATION_FINISH_1 >= 71
+# define BOOST_PP_ITERATION_1 71
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 72 && BOOST_PP_ITERATION_FINISH_1 >= 72
+# define BOOST_PP_ITERATION_1 72
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 73 && BOOST_PP_ITERATION_FINISH_1 >= 73
+# define BOOST_PP_ITERATION_1 73
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 74 && BOOST_PP_ITERATION_FINISH_1 >= 74
+# define BOOST_PP_ITERATION_1 74
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 75 && BOOST_PP_ITERATION_FINISH_1 >= 75
+# define BOOST_PP_ITERATION_1 75
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 76 && BOOST_PP_ITERATION_FINISH_1 >= 76
+# define BOOST_PP_ITERATION_1 76
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 77 && BOOST_PP_ITERATION_FINISH_1 >= 77
+# define BOOST_PP_ITERATION_1 77
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 78 && BOOST_PP_ITERATION_FINISH_1 >= 78
+# define BOOST_PP_ITERATION_1 78
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 79 && BOOST_PP_ITERATION_FINISH_1 >= 79
+# define BOOST_PP_ITERATION_1 79
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 80 && BOOST_PP_ITERATION_FINISH_1 >= 80
+# define BOOST_PP_ITERATION_1 80
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 81 && BOOST_PP_ITERATION_FINISH_1 >= 81
+# define BOOST_PP_ITERATION_1 81
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 82 && BOOST_PP_ITERATION_FINISH_1 >= 82
+# define BOOST_PP_ITERATION_1 82
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 83 && BOOST_PP_ITERATION_FINISH_1 >= 83
+# define BOOST_PP_ITERATION_1 83
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 84 && BOOST_PP_ITERATION_FINISH_1 >= 84
+# define BOOST_PP_ITERATION_1 84
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 85 && BOOST_PP_ITERATION_FINISH_1 >= 85
+# define BOOST_PP_ITERATION_1 85
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 86 && BOOST_PP_ITERATION_FINISH_1 >= 86
+# define BOOST_PP_ITERATION_1 86
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 87 && BOOST_PP_ITERATION_FINISH_1 >= 87
+# define BOOST_PP_ITERATION_1 87
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 88 && BOOST_PP_ITERATION_FINISH_1 >= 88
+# define BOOST_PP_ITERATION_1 88
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 89 && BOOST_PP_ITERATION_FINISH_1 >= 89
+# define BOOST_PP_ITERATION_1 89
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 90 && BOOST_PP_ITERATION_FINISH_1 >= 90
+# define BOOST_PP_ITERATION_1 90
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 91 && BOOST_PP_ITERATION_FINISH_1 >= 91
+# define BOOST_PP_ITERATION_1 91
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 92 && BOOST_PP_ITERATION_FINISH_1 >= 92
+# define BOOST_PP_ITERATION_1 92
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 93 && BOOST_PP_ITERATION_FINISH_1 >= 93
+# define BOOST_PP_ITERATION_1 93
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 94 && BOOST_PP_ITERATION_FINISH_1 >= 94
+# define BOOST_PP_ITERATION_1 94
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 95 && BOOST_PP_ITERATION_FINISH_1 >= 95
+# define BOOST_PP_ITERATION_1 95
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 96 && BOOST_PP_ITERATION_FINISH_1 >= 96
+# define BOOST_PP_ITERATION_1 96
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 97 && BOOST_PP_ITERATION_FINISH_1 >= 97
+# define BOOST_PP_ITERATION_1 97
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 98 && BOOST_PP_ITERATION_FINISH_1 >= 98
+# define BOOST_PP_ITERATION_1 98
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 99 && BOOST_PP_ITERATION_FINISH_1 >= 99
+# define BOOST_PP_ITERATION_1 99
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 100 && BOOST_PP_ITERATION_FINISH_1 >= 100
+# define BOOST_PP_ITERATION_1 100
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 101 && BOOST_PP_ITERATION_FINISH_1 >= 101
+# define BOOST_PP_ITERATION_1 101
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 102 && BOOST_PP_ITERATION_FINISH_1 >= 102
+# define BOOST_PP_ITERATION_1 102
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 103 && BOOST_PP_ITERATION_FINISH_1 >= 103
+# define BOOST_PP_ITERATION_1 103
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 104 && BOOST_PP_ITERATION_FINISH_1 >= 104
+# define BOOST_PP_ITERATION_1 104
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 105 && BOOST_PP_ITERATION_FINISH_1 >= 105
+# define BOOST_PP_ITERATION_1 105
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 106 && BOOST_PP_ITERATION_FINISH_1 >= 106
+# define BOOST_PP_ITERATION_1 106
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 107 && BOOST_PP_ITERATION_FINISH_1 >= 107
+# define BOOST_PP_ITERATION_1 107
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 108 && BOOST_PP_ITERATION_FINISH_1 >= 108
+# define BOOST_PP_ITERATION_1 108
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 109 && BOOST_PP_ITERATION_FINISH_1 >= 109
+# define BOOST_PP_ITERATION_1 109
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 110 && BOOST_PP_ITERATION_FINISH_1 >= 110
+# define BOOST_PP_ITERATION_1 110
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 111 && BOOST_PP_ITERATION_FINISH_1 >= 111
+# define BOOST_PP_ITERATION_1 111
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 112 && BOOST_PP_ITERATION_FINISH_1 >= 112
+# define BOOST_PP_ITERATION_1 112
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 113 && BOOST_PP_ITERATION_FINISH_1 >= 113
+# define BOOST_PP_ITERATION_1 113
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 114 && BOOST_PP_ITERATION_FINISH_1 >= 114
+# define BOOST_PP_ITERATION_1 114
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 115 && BOOST_PP_ITERATION_FINISH_1 >= 115
+# define BOOST_PP_ITERATION_1 115
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 116 && BOOST_PP_ITERATION_FINISH_1 >= 116
+# define BOOST_PP_ITERATION_1 116
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 117 && BOOST_PP_ITERATION_FINISH_1 >= 117
+# define BOOST_PP_ITERATION_1 117
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 118 && BOOST_PP_ITERATION_FINISH_1 >= 118
+# define BOOST_PP_ITERATION_1 118
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 119 && BOOST_PP_ITERATION_FINISH_1 >= 119
+# define BOOST_PP_ITERATION_1 119
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 120 && BOOST_PP_ITERATION_FINISH_1 >= 120
+# define BOOST_PP_ITERATION_1 120
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 121 && BOOST_PP_ITERATION_FINISH_1 >= 121
+# define BOOST_PP_ITERATION_1 121
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 122 && BOOST_PP_ITERATION_FINISH_1 >= 122
+# define BOOST_PP_ITERATION_1 122
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 123 && BOOST_PP_ITERATION_FINISH_1 >= 123
+# define BOOST_PP_ITERATION_1 123
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 124 && BOOST_PP_ITERATION_FINISH_1 >= 124
+# define BOOST_PP_ITERATION_1 124
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 125 && BOOST_PP_ITERATION_FINISH_1 >= 125
+# define BOOST_PP_ITERATION_1 125
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 126 && BOOST_PP_ITERATION_FINISH_1 >= 126
+# define BOOST_PP_ITERATION_1 126
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 127 && BOOST_PP_ITERATION_FINISH_1 >= 127
+# define BOOST_PP_ITERATION_1 127
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 128 && BOOST_PP_ITERATION_FINISH_1 >= 128
+# define BOOST_PP_ITERATION_1 128
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 129 && BOOST_PP_ITERATION_FINISH_1 >= 129
+# define BOOST_PP_ITERATION_1 129
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 130 && BOOST_PP_ITERATION_FINISH_1 >= 130
+# define BOOST_PP_ITERATION_1 130
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 131 && BOOST_PP_ITERATION_FINISH_1 >= 131
+# define BOOST_PP_ITERATION_1 131
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 132 && BOOST_PP_ITERATION_FINISH_1 >= 132
+# define BOOST_PP_ITERATION_1 132
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 133 && BOOST_PP_ITERATION_FINISH_1 >= 133
+# define BOOST_PP_ITERATION_1 133
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 134 && BOOST_PP_ITERATION_FINISH_1 >= 134
+# define BOOST_PP_ITERATION_1 134
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 135 && BOOST_PP_ITERATION_FINISH_1 >= 135
+# define BOOST_PP_ITERATION_1 135
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 136 && BOOST_PP_ITERATION_FINISH_1 >= 136
+# define BOOST_PP_ITERATION_1 136
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 137 && BOOST_PP_ITERATION_FINISH_1 >= 137
+# define BOOST_PP_ITERATION_1 137
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 138 && BOOST_PP_ITERATION_FINISH_1 >= 138
+# define BOOST_PP_ITERATION_1 138
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 139 && BOOST_PP_ITERATION_FINISH_1 >= 139
+# define BOOST_PP_ITERATION_1 139
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 140 && BOOST_PP_ITERATION_FINISH_1 >= 140
+# define BOOST_PP_ITERATION_1 140
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 141 && BOOST_PP_ITERATION_FINISH_1 >= 141
+# define BOOST_PP_ITERATION_1 141
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 142 && BOOST_PP_ITERATION_FINISH_1 >= 142
+# define BOOST_PP_ITERATION_1 142
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 143 && BOOST_PP_ITERATION_FINISH_1 >= 143
+# define BOOST_PP_ITERATION_1 143
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 144 && BOOST_PP_ITERATION_FINISH_1 >= 144
+# define BOOST_PP_ITERATION_1 144
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 145 && BOOST_PP_ITERATION_FINISH_1 >= 145
+# define BOOST_PP_ITERATION_1 145
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 146 && BOOST_PP_ITERATION_FINISH_1 >= 146
+# define BOOST_PP_ITERATION_1 146
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 147 && BOOST_PP_ITERATION_FINISH_1 >= 147
+# define BOOST_PP_ITERATION_1 147
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 148 && BOOST_PP_ITERATION_FINISH_1 >= 148
+# define BOOST_PP_ITERATION_1 148
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 149 && BOOST_PP_ITERATION_FINISH_1 >= 149
+# define BOOST_PP_ITERATION_1 149
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 150 && BOOST_PP_ITERATION_FINISH_1 >= 150
+# define BOOST_PP_ITERATION_1 150
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 151 && BOOST_PP_ITERATION_FINISH_1 >= 151
+# define BOOST_PP_ITERATION_1 151
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 152 && BOOST_PP_ITERATION_FINISH_1 >= 152
+# define BOOST_PP_ITERATION_1 152
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 153 && BOOST_PP_ITERATION_FINISH_1 >= 153
+# define BOOST_PP_ITERATION_1 153
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 154 && BOOST_PP_ITERATION_FINISH_1 >= 154
+# define BOOST_PP_ITERATION_1 154
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 155 && BOOST_PP_ITERATION_FINISH_1 >= 155
+# define BOOST_PP_ITERATION_1 155
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 156 && BOOST_PP_ITERATION_FINISH_1 >= 156
+# define BOOST_PP_ITERATION_1 156
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 157 && BOOST_PP_ITERATION_FINISH_1 >= 157
+# define BOOST_PP_ITERATION_1 157
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 158 && BOOST_PP_ITERATION_FINISH_1 >= 158
+# define BOOST_PP_ITERATION_1 158
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 159 && BOOST_PP_ITERATION_FINISH_1 >= 159
+# define BOOST_PP_ITERATION_1 159
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 160 && BOOST_PP_ITERATION_FINISH_1 >= 160
+# define BOOST_PP_ITERATION_1 160
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 161 && BOOST_PP_ITERATION_FINISH_1 >= 161
+# define BOOST_PP_ITERATION_1 161
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 162 && BOOST_PP_ITERATION_FINISH_1 >= 162
+# define BOOST_PP_ITERATION_1 162
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 163 && BOOST_PP_ITERATION_FINISH_1 >= 163
+# define BOOST_PP_ITERATION_1 163
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 164 && BOOST_PP_ITERATION_FINISH_1 >= 164
+# define BOOST_PP_ITERATION_1 164
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 165 && BOOST_PP_ITERATION_FINISH_1 >= 165
+# define BOOST_PP_ITERATION_1 165
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 166 && BOOST_PP_ITERATION_FINISH_1 >= 166
+# define BOOST_PP_ITERATION_1 166
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 167 && BOOST_PP_ITERATION_FINISH_1 >= 167
+# define BOOST_PP_ITERATION_1 167
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 168 && BOOST_PP_ITERATION_FINISH_1 >= 168
+# define BOOST_PP_ITERATION_1 168
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 169 && BOOST_PP_ITERATION_FINISH_1 >= 169
+# define BOOST_PP_ITERATION_1 169
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 170 && BOOST_PP_ITERATION_FINISH_1 >= 170
+# define BOOST_PP_ITERATION_1 170
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 171 && BOOST_PP_ITERATION_FINISH_1 >= 171
+# define BOOST_PP_ITERATION_1 171
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 172 && BOOST_PP_ITERATION_FINISH_1 >= 172
+# define BOOST_PP_ITERATION_1 172
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 173 && BOOST_PP_ITERATION_FINISH_1 >= 173
+# define BOOST_PP_ITERATION_1 173
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 174 && BOOST_PP_ITERATION_FINISH_1 >= 174
+# define BOOST_PP_ITERATION_1 174
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 175 && BOOST_PP_ITERATION_FINISH_1 >= 175
+# define BOOST_PP_ITERATION_1 175
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 176 && BOOST_PP_ITERATION_FINISH_1 >= 176
+# define BOOST_PP_ITERATION_1 176
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 177 && BOOST_PP_ITERATION_FINISH_1 >= 177
+# define BOOST_PP_ITERATION_1 177
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 178 && BOOST_PP_ITERATION_FINISH_1 >= 178
+# define BOOST_PP_ITERATION_1 178
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 179 && BOOST_PP_ITERATION_FINISH_1 >= 179
+# define BOOST_PP_ITERATION_1 179
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 180 && BOOST_PP_ITERATION_FINISH_1 >= 180
+# define BOOST_PP_ITERATION_1 180
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 181 && BOOST_PP_ITERATION_FINISH_1 >= 181
+# define BOOST_PP_ITERATION_1 181
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 182 && BOOST_PP_ITERATION_FINISH_1 >= 182
+# define BOOST_PP_ITERATION_1 182
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 183 && BOOST_PP_ITERATION_FINISH_1 >= 183
+# define BOOST_PP_ITERATION_1 183
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 184 && BOOST_PP_ITERATION_FINISH_1 >= 184
+# define BOOST_PP_ITERATION_1 184
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 185 && BOOST_PP_ITERATION_FINISH_1 >= 185
+# define BOOST_PP_ITERATION_1 185
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 186 && BOOST_PP_ITERATION_FINISH_1 >= 186
+# define BOOST_PP_ITERATION_1 186
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 187 && BOOST_PP_ITERATION_FINISH_1 >= 187
+# define BOOST_PP_ITERATION_1 187
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 188 && BOOST_PP_ITERATION_FINISH_1 >= 188
+# define BOOST_PP_ITERATION_1 188
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 189 && BOOST_PP_ITERATION_FINISH_1 >= 189
+# define BOOST_PP_ITERATION_1 189
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 190 && BOOST_PP_ITERATION_FINISH_1 >= 190
+# define BOOST_PP_ITERATION_1 190
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 191 && BOOST_PP_ITERATION_FINISH_1 >= 191
+# define BOOST_PP_ITERATION_1 191
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 192 && BOOST_PP_ITERATION_FINISH_1 >= 192
+# define BOOST_PP_ITERATION_1 192
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 193 && BOOST_PP_ITERATION_FINISH_1 >= 193
+# define BOOST_PP_ITERATION_1 193
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 194 && BOOST_PP_ITERATION_FINISH_1 >= 194
+# define BOOST_PP_ITERATION_1 194
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 195 && BOOST_PP_ITERATION_FINISH_1 >= 195
+# define BOOST_PP_ITERATION_1 195
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 196 && BOOST_PP_ITERATION_FINISH_1 >= 196
+# define BOOST_PP_ITERATION_1 196
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 197 && BOOST_PP_ITERATION_FINISH_1 >= 197
+# define BOOST_PP_ITERATION_1 197
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 198 && BOOST_PP_ITERATION_FINISH_1 >= 198
+# define BOOST_PP_ITERATION_1 198
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 199 && BOOST_PP_ITERATION_FINISH_1 >= 199
+# define BOOST_PP_ITERATION_1 199
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 200 && BOOST_PP_ITERATION_FINISH_1 >= 200
+# define BOOST_PP_ITERATION_1 200
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 201 && BOOST_PP_ITERATION_FINISH_1 >= 201
+# define BOOST_PP_ITERATION_1 201
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 202 && BOOST_PP_ITERATION_FINISH_1 >= 202
+# define BOOST_PP_ITERATION_1 202
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 203 && BOOST_PP_ITERATION_FINISH_1 >= 203
+# define BOOST_PP_ITERATION_1 203
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 204 && BOOST_PP_ITERATION_FINISH_1 >= 204
+# define BOOST_PP_ITERATION_1 204
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 205 && BOOST_PP_ITERATION_FINISH_1 >= 205
+# define BOOST_PP_ITERATION_1 205
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 206 && BOOST_PP_ITERATION_FINISH_1 >= 206
+# define BOOST_PP_ITERATION_1 206
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 207 && BOOST_PP_ITERATION_FINISH_1 >= 207
+# define BOOST_PP_ITERATION_1 207
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 208 && BOOST_PP_ITERATION_FINISH_1 >= 208
+# define BOOST_PP_ITERATION_1 208
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 209 && BOOST_PP_ITERATION_FINISH_1 >= 209
+# define BOOST_PP_ITERATION_1 209
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 210 && BOOST_PP_ITERATION_FINISH_1 >= 210
+# define BOOST_PP_ITERATION_1 210
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 211 && BOOST_PP_ITERATION_FINISH_1 >= 211
+# define BOOST_PP_ITERATION_1 211
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 212 && BOOST_PP_ITERATION_FINISH_1 >= 212
+# define BOOST_PP_ITERATION_1 212
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 213 && BOOST_PP_ITERATION_FINISH_1 >= 213
+# define BOOST_PP_ITERATION_1 213
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 214 && BOOST_PP_ITERATION_FINISH_1 >= 214
+# define BOOST_PP_ITERATION_1 214
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 215 && BOOST_PP_ITERATION_FINISH_1 >= 215
+# define BOOST_PP_ITERATION_1 215
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 216 && BOOST_PP_ITERATION_FINISH_1 >= 216
+# define BOOST_PP_ITERATION_1 216
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 217 && BOOST_PP_ITERATION_FINISH_1 >= 217
+# define BOOST_PP_ITERATION_1 217
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 218 && BOOST_PP_ITERATION_FINISH_1 >= 218
+# define BOOST_PP_ITERATION_1 218
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 219 && BOOST_PP_ITERATION_FINISH_1 >= 219
+# define BOOST_PP_ITERATION_1 219
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 220 && BOOST_PP_ITERATION_FINISH_1 >= 220
+# define BOOST_PP_ITERATION_1 220
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 221 && BOOST_PP_ITERATION_FINISH_1 >= 221
+# define BOOST_PP_ITERATION_1 221
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 222 && BOOST_PP_ITERATION_FINISH_1 >= 222
+# define BOOST_PP_ITERATION_1 222
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 223 && BOOST_PP_ITERATION_FINISH_1 >= 223
+# define BOOST_PP_ITERATION_1 223
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 224 && BOOST_PP_ITERATION_FINISH_1 >= 224
+# define BOOST_PP_ITERATION_1 224
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 225 && BOOST_PP_ITERATION_FINISH_1 >= 225
+# define BOOST_PP_ITERATION_1 225
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 226 && BOOST_PP_ITERATION_FINISH_1 >= 226
+# define BOOST_PP_ITERATION_1 226
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 227 && BOOST_PP_ITERATION_FINISH_1 >= 227
+# define BOOST_PP_ITERATION_1 227
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 228 && BOOST_PP_ITERATION_FINISH_1 >= 228
+# define BOOST_PP_ITERATION_1 228
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 229 && BOOST_PP_ITERATION_FINISH_1 >= 229
+# define BOOST_PP_ITERATION_1 229
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 230 && BOOST_PP_ITERATION_FINISH_1 >= 230
+# define BOOST_PP_ITERATION_1 230
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 231 && BOOST_PP_ITERATION_FINISH_1 >= 231
+# define BOOST_PP_ITERATION_1 231
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 232 && BOOST_PP_ITERATION_FINISH_1 >= 232
+# define BOOST_PP_ITERATION_1 232
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 233 && BOOST_PP_ITERATION_FINISH_1 >= 233
+# define BOOST_PP_ITERATION_1 233
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 234 && BOOST_PP_ITERATION_FINISH_1 >= 234
+# define BOOST_PP_ITERATION_1 234
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 235 && BOOST_PP_ITERATION_FINISH_1 >= 235
+# define BOOST_PP_ITERATION_1 235
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 236 && BOOST_PP_ITERATION_FINISH_1 >= 236
+# define BOOST_PP_ITERATION_1 236
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 237 && BOOST_PP_ITERATION_FINISH_1 >= 237
+# define BOOST_PP_ITERATION_1 237
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 238 && BOOST_PP_ITERATION_FINISH_1 >= 238
+# define BOOST_PP_ITERATION_1 238
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 239 && BOOST_PP_ITERATION_FINISH_1 >= 239
+# define BOOST_PP_ITERATION_1 239
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 240 && BOOST_PP_ITERATION_FINISH_1 >= 240
+# define BOOST_PP_ITERATION_1 240
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 241 && BOOST_PP_ITERATION_FINISH_1 >= 241
+# define BOOST_PP_ITERATION_1 241
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 242 && BOOST_PP_ITERATION_FINISH_1 >= 242
+# define BOOST_PP_ITERATION_1 242
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 243 && BOOST_PP_ITERATION_FINISH_1 >= 243
+# define BOOST_PP_ITERATION_1 243
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 244 && BOOST_PP_ITERATION_FINISH_1 >= 244
+# define BOOST_PP_ITERATION_1 244
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 245 && BOOST_PP_ITERATION_FINISH_1 >= 245
+# define BOOST_PP_ITERATION_1 245
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 246 && BOOST_PP_ITERATION_FINISH_1 >= 246
+# define BOOST_PP_ITERATION_1 246
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 247 && BOOST_PP_ITERATION_FINISH_1 >= 247
+# define BOOST_PP_ITERATION_1 247
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 248 && BOOST_PP_ITERATION_FINISH_1 >= 248
+# define BOOST_PP_ITERATION_1 248
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 249 && BOOST_PP_ITERATION_FINISH_1 >= 249
+# define BOOST_PP_ITERATION_1 249
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 250 && BOOST_PP_ITERATION_FINISH_1 >= 250
+# define BOOST_PP_ITERATION_1 250
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 251 && BOOST_PP_ITERATION_FINISH_1 >= 251
+# define BOOST_PP_ITERATION_1 251
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 252 && BOOST_PP_ITERATION_FINISH_1 >= 252
+# define BOOST_PP_ITERATION_1 252
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 253 && BOOST_PP_ITERATION_FINISH_1 >= 253
+# define BOOST_PP_ITERATION_1 253
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 254 && BOOST_PP_ITERATION_FINISH_1 >= 254
+# define BOOST_PP_ITERATION_1 254
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 255 && BOOST_PP_ITERATION_FINISH_1 >= 255
+# define BOOST_PP_ITERATION_1 255
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# if BOOST_PP_ITERATION_START_1 <= 256 && BOOST_PP_ITERATION_FINISH_1 >= 256
+# define BOOST_PP_ITERATION_1 256
+# include BOOST_PP_FILENAME_1
+# undef BOOST_PP_ITERATION_1
+# endif
+# endif
+#
+# undef BOOST_PP_IS_ITERATING
+#
+# undef BOOST_PP_ITERATION_DEPTH
+# define BOOST_PP_ITERATION_DEPTH() 0
+#
+# undef BOOST_PP_ITERATION_START_1
+# undef BOOST_PP_ITERATION_FINISH_1
+# undef BOOST_PP_FILENAME_1
+#
+# undef BOOST_PP_ITERATION_FLAGS_1
+# undef BOOST_PP_ITERATION_PARAMS_1
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_ITERATION_ITERATE_HPP
+# define BOOST_PREPROCESSOR_ITERATION_ITERATE_HPP
+#
+# include <boost/preprocessor/arithmetic/dec.hpp>
+# include <boost/preprocessor/arithmetic/inc.hpp>
+# include <boost/preprocessor/array/elem.hpp>
+# include <boost/preprocessor/array/size.hpp>
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/slot/slot.hpp>
+# include <boost/preprocessor/tuple/elem.hpp>
+#
+# /* BOOST_PP_ITERATION_DEPTH */
+#
+# define BOOST_PP_ITERATION_DEPTH() 0
+#
+# /* BOOST_PP_ITERATION */
+#
+# define BOOST_PP_ITERATION() BOOST_PP_CAT(BOOST_PP_ITERATION_, BOOST_PP_ITERATION_DEPTH())
+#
+# /* BOOST_PP_ITERATION_START && BOOST_PP_ITERATION_FINISH */
+#
+# define BOOST_PP_ITERATION_START() BOOST_PP_CAT(BOOST_PP_ITERATION_START_, BOOST_PP_ITERATION_DEPTH())
+# define BOOST_PP_ITERATION_FINISH() BOOST_PP_CAT(BOOST_PP_ITERATION_FINISH_, BOOST_PP_ITERATION_DEPTH())
+#
+# /* BOOST_PP_ITERATION_FLAGS */
+#
+# define BOOST_PP_ITERATION_FLAGS() (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, BOOST_PP_ITERATION_DEPTH()))
+#
+# /* BOOST_PP_FRAME_ITERATION */
+#
+# define BOOST_PP_FRAME_ITERATION(i) BOOST_PP_CAT(BOOST_PP_ITERATION_, i)
+#
+# /* BOOST_PP_FRAME_START && BOOST_PP_FRAME_FINISH */
+#
+# define BOOST_PP_FRAME_START(i) BOOST_PP_CAT(BOOST_PP_ITERATION_START_, i)
+# define BOOST_PP_FRAME_FINISH(i) BOOST_PP_CAT(BOOST_PP_ITERATION_FINISH_, i)
+#
+# /* BOOST_PP_FRAME_FLAGS */
+#
+# define BOOST_PP_FRAME_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, i))
+#
+# /* BOOST_PP_RELATIVE_ITERATION */
+#
+# define BOOST_PP_RELATIVE_ITERATION(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_)
+#
+# define BOOST_PP_RELATIVE_0(m) BOOST_PP_CAT(m, BOOST_PP_ITERATION_DEPTH())
+# define BOOST_PP_RELATIVE_1(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))
+# define BOOST_PP_RELATIVE_2(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())))
+# define BOOST_PP_RELATIVE_3(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))))
+# define BOOST_PP_RELATIVE_4(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())))))
+#
+# /* BOOST_PP_RELATIVE_START && BOOST_PP_RELATIVE_FINISH */
+#
+# define BOOST_PP_RELATIVE_START(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_START_)
+# define BOOST_PP_RELATIVE_FINISH(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FINISH_)
+#
+# /* BOOST_PP_RELATIVE_FLAGS */
+#
+# define BOOST_PP_RELATIVE_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FLAGS_))
+#
+# /* BOOST_PP_ITERATE */
+#
+# define BOOST_PP_ITERATE() BOOST_PP_CAT(BOOST_PP_ITERATE_, BOOST_PP_INC(BOOST_PP_ITERATION_DEPTH()))
+#
+# define BOOST_PP_ITERATE_1 <boost/preprocessor/iteration/detail/iter/forward1.hpp>
+# define BOOST_PP_ITERATE_2 <boost/preprocessor/iteration/detail/iter/forward2.hpp>
+# define BOOST_PP_ITERATE_3 <boost/preprocessor/iteration/detail/iter/forward3.hpp>
+# define BOOST_PP_ITERATE_4 <boost/preprocessor/iteration/detail/iter/forward4.hpp>
+# define BOOST_PP_ITERATE_5 <boost/preprocessor/iteration/detail/iter/forward5.hpp>
+#
+# endif
+++ /dev/null
-#ifndef BOOST_PREPROCESSOR_LIST_FOLD_LEFT_2ND_HPP
-#define BOOST_PREPROCESSOR_LIST_FOLD_LEFT_2ND_HPP
-
-/* Copyright (C) 2002
- * Housemarque Oy
- * http://www.housemarque.com
- *
- * Permission to copy, use, modify, sell and distribute this software is
- * granted provided this copyright notice appears in all copies. This
- * software is provided "as is" without express or implied warranty, and
- * with no claim as to its suitability for any purpose.
- *
- * See http://www.boost.org for most recent version.
- */
-
-/** <p>This header is obsolete. Use the following code instead.</p>
-
-<pre>
-#include <boost/preprocessor/list/fold_left.hpp>
-</pre>
-*/
-
-#include <boost/preprocessor/list/fold_left.hpp>
-#endif
+++ /dev/null
-#ifndef BOOST_PREPROCESSOR_LIST_FOLD_RIGHT_2ND_HPP
-#define BOOST_PREPROCESSOR_LIST_FOLD_RIGHT_2ND_HPP
-
-/* Copyright (C) 2002
- * Housemarque Oy
- * http://www.housemarque.com
- *
- * Permission to copy, use, modify, sell and distribute this software is
- * granted provided this copyright notice appears in all copies. This
- * software is provided "as is" without express or implied warranty, and
- * with no claim as to its suitability for any purpose.
- *
- * See http://www.boost.org for most recent version.
- */
-
-/** <p>This header is obsolete. Use the following code instead.</p>
-
-<pre>
-#include <boost/preprocessor/list/fold_right.hpp>
-</pre>
-*/
-
-#include <boost/preprocessor/list/fold_right.hpp>
-#endif
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_LOGICAL_BITAND_HPP
+# define BOOST_PREPROCESSOR_LOGICAL_BITAND_HPP
+#
+# include <boost/preprocessor/config/config.hpp>
+#
+# /* BOOST_PP_BITAND */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
+# define BOOST_PP_BITAND(x, y) BOOST_PP_BITAND_I(x, y)
+# else
+# define BOOST_PP_BITAND(x, y) BOOST_PP_BITAND_OO((x, y))
+# define BOOST_PP_BITAND_OO(par) BOOST_PP_BITAND_I ## par
+# endif
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
+# define BOOST_PP_BITAND_I(x, y) BOOST_PP_BITAND_ ## x ## y
+# else
+# define BOOST_PP_BITAND_I(x, y) BOOST_PP_BITAND_ID(BOOST_PP_BITAND_ ## x ## y)
+# define BOOST_PP_BITAND_ID(res) res
+# endif
+#
+# define BOOST_PP_BITAND_00 0
+# define BOOST_PP_BITAND_01 0
+# define BOOST_PP_BITAND_10 0
+# define BOOST_PP_BITAND_11 1
+#
+# endif
# define BOOST_PP_COMPL_OO(par) BOOST_PP_COMPL_I ## par
# endif
#
-# define BOOST_PP_COMPL_I(x) BOOST_PP_COMPL_ ## x
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
+# define BOOST_PP_COMPL_I(x) BOOST_PP_COMPL_ ## x
+# else
+# define BOOST_PP_COMPL_I(x) BOOST_PP_COMPL_ID(BOOST_PP_COMPL_ ## x)
+# define BOOST_PP_COMPL_ID(id) id
+# endif
#
# define BOOST_PP_COMPL_0 1
# define BOOST_PP_COMPL_1 0
--- /dev/null
+# /* Copyright (C) 2001
+# * Housemarque Oy
+# * http://www.housemarque.com
+# *
+# * Permission to copy, use, modify, sell and distribute this software is
+# * granted provided this copyright notice appears in all copies. This
+# * software is provided "as is" without express or implied warranty, and
+# * with no claim as to its suitability for any purpose.
+# */
+#
+# /* Revised by Paul Mensonides (2002) */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_HPP
+# define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_HPP
+#
+# /* BOOST_PP_COMMA */
+#
+# define BOOST_PP_COMMA() ,
+#
+# endif
--- /dev/null
+# /* Copyright (C) 2001
+# * Housemarque Oy
+# * http://www.housemarque.com
+# *
+# * Permission to copy, use, modify, sell and distribute this software is
+# * granted provided this copyright notice appears in all copies. This
+# * software is provided "as is" without express or implied warranty, and
+# * with no claim as to its suitability for any purpose.
+# */
+#
+# /* Revised by Paul Mensonides (2002) */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP
+# define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP
+#
+# include <boost/preprocessor/config/config.hpp>
+# include <boost/preprocessor/control/if.hpp>
+# include <boost/preprocessor/facilities/empty.hpp>
+# include <boost/preprocessor/punctuation/comma.hpp>
+#
+# /* BOOST_PP_COMMA_IF */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+# define BOOST_PP_COMMA_IF(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)()
+# else
+# define BOOST_PP_COMMA_IF(cond) BOOST_PP_COMMA_IF_I(cond)
+# define BOOST_PP_COMMA_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)()
+# endif
+#
+# endif
--- /dev/null
+# /* Copyright (C) 2001
+# * Housemarque Oy
+# * http://www.housemarque.com
+# *
+# * Permission to copy, use, modify, sell and distribute this software is
+# * granted provided this copyright notice appears in all copies. This
+# * software is provided "as is" without express or implied warranty, and
+# * with no claim as to its suitability for any purpose.
+# */
+#
+# /* Revised by Paul Mensonides (2002) */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_HPP
+# define BOOST_PREPROCESSOR_REPETITION_ENUM_HPP
+#
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/config/config.hpp>
+# include <boost/preprocessor/debug/error.hpp>
+# include <boost/preprocessor/detail/auto_rec.hpp>
+# include <boost/preprocessor/punctuation/comma_if.hpp>
+# include <boost/preprocessor/repetition/repeat.hpp>
+# include <boost/preprocessor/tuple/elem.hpp>
+# include <boost/preprocessor/tuple/rem.hpp>
+#
+# /* BOOST_PP_ENUM */
+#
+# if 0
+# define BOOST_PP_ENUM(count, macro, data)
+# endif
+#
+# define BOOST_PP_ENUM BOOST_PP_CAT(BOOST_PP_ENUM_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4))
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+# define BOOST_PP_ENUM_1(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_M_1, (m, d))
+# define BOOST_PP_ENUM_2(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_M_2, (m, d))
+# define BOOST_PP_ENUM_3(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_M_3, (m, d))
+# else
+# define BOOST_PP_ENUM_1(c, m, d) BOOST_PP_ENUM_1_I(c, m, d)
+# define BOOST_PP_ENUM_2(c, m, d) BOOST_PP_ENUM_2_I(c, m, d)
+# define BOOST_PP_ENUM_3(c, m, d) BOOST_PP_ENUM_3_I(c, m, d)
+# define BOOST_PP_ENUM_1_I(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_M_1, (m, d))
+# define BOOST_PP_ENUM_2_I(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_M_2, (m, d))
+# define BOOST_PP_ENUM_3_I(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_M_3, (m, d))
+# endif
+#
+# define BOOST_PP_ENUM_4(c, m, d) BOOST_PP_ERROR(0x0003)
+#
+# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
+# define BOOST_PP_ENUM_M_1(z, n, md) BOOST_PP_ENUM_M_1_IM(z, n, BOOST_PP_TUPLE_REM_2 md)
+# define BOOST_PP_ENUM_M_2(z, n, md) BOOST_PP_ENUM_M_2_IM(z, n, BOOST_PP_TUPLE_REM_2 md)
+# define BOOST_PP_ENUM_M_3(z, n, md) BOOST_PP_ENUM_M_3_IM(z, n, BOOST_PP_TUPLE_REM_2 md)
+# define BOOST_PP_ENUM_M_1_IM(z, n, im) BOOST_PP_ENUM_M_1_I(z, n, im)
+# define BOOST_PP_ENUM_M_2_IM(z, n, im) BOOST_PP_ENUM_M_2_I(z, n, im)
+# define BOOST_PP_ENUM_M_3_IM(z, n, im) BOOST_PP_ENUM_M_3_I(z, n, im)
+# else
+# define BOOST_PP_ENUM_M_1(z, n, md) BOOST_PP_ENUM_M_1_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md))
+# define BOOST_PP_ENUM_M_2(z, n, md) BOOST_PP_ENUM_M_2_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md))
+# define BOOST_PP_ENUM_M_3(z, n, md) BOOST_PP_ENUM_M_3_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md))
+# endif
+#
+# define BOOST_PP_ENUM_M_1_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d)
+# define BOOST_PP_ENUM_M_2_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d)
+# define BOOST_PP_ENUM_M_3_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d)
+#
+# endif
--- /dev/null
+# /* Copyright (C) 2001
+# * Housemarque Oy
+# * http://www.housemarque.com
+# *
+# * Permission to copy, use, modify, sell and distribute this software is
+# * granted provided this copyright notice appears in all copies. This
+# * software is provided "as is" without express or implied warranty, and
+# * with no claim as to its suitability for any purpose.
+# */
+#
+# /* Revised by Paul Mensonides (2002) */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP
+# define BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP
+#
+# include <boost/preprocessor/config/config.hpp>
+# include <boost/preprocessor/punctuation/comma_if.hpp>
+# include <boost/preprocessor/repetition/repeat.hpp>
+#
+# /* BOOST_PP_ENUM_PARAMS */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+# define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param)
+# else
+# define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_ENUM_PARAMS_I(count, param)
+# define BOOST_PP_ENUM_PARAMS_I(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param)
+# endif
+#
+# define BOOST_PP_ENUM_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) param ## n
+#
+# /* BOOST_PP_ENUM_PARAMS_Z */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+# define BOOST_PP_ENUM_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_PARAMS_M, param)
+# else
+# define BOOST_PP_ENUM_PARAMS_Z(z, count, param) BOOST_PP_ENUM_PARAMS_Z_I(z, count, param)
+# define BOOST_PP_ENUM_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_PARAMS_M, param)
+# endif
+#
+# endif
--- /dev/null
+# /* Copyright (C) 2001
+# * Housemarque Oy
+# * http://www.housemarque.com
+# *
+# * Permission to copy, use, modify, sell and distribute this software is
+# * granted provided this copyright notice appears in all copies. This
+# * software is provided "as is" without express or implied warranty, and
+# * with no claim as to its suitability for any purpose.
+# */
+#
+# /* Revised by Paul Mensonides (2002) */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_REPETITION_REPEAT_HPP
+# define BOOST_PREPROCESSOR_REPETITION_REPEAT_HPP
+#
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/config/config.hpp>
+# include <boost/preprocessor/debug/error.hpp>
+# include <boost/preprocessor/detail/auto_rec.hpp>
+# include <boost/preprocessor/tuple/eat.hpp>
+#
+# /* BOOST_PP_REPEAT */
+#
+# if 0
+# define BOOST_PP_REPEAT(count, macro, data)
+# endif
+#
+# define BOOST_PP_REPEAT BOOST_PP_CAT(BOOST_PP_REPEAT_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4))
+#
+# define BOOST_PP_REPEAT_P(n) BOOST_PP_CAT(BOOST_PP_REPEAT_CHECK_, BOOST_PP_REPEAT_ ## n(1, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3, BOOST_PP_NIL))
+#
+# define BOOST_PP_REPEAT_CHECK_BOOST_PP_NIL 1
+# define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_1(c, m, d) 0
+# define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_2(c, m, d) 0
+# define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_3(c, m, d) 0
+#
+# define BOOST_PP_REPEAT_1(c, m, d) BOOST_PP_REPEAT_1_I(c, m, d)
+# define BOOST_PP_REPEAT_2(c, m, d) BOOST_PP_REPEAT_2_I(c, m, d)
+# define BOOST_PP_REPEAT_3(c, m, d) BOOST_PP_REPEAT_3_I(c, m, d)
+# define BOOST_PP_REPEAT_4(c, m, d) BOOST_PP_ERROR(0x0003)
+#
+# define BOOST_PP_REPEAT_1_I(c, m, d) BOOST_PP_REPEAT_1_ ## c(m, d)
+# define BOOST_PP_REPEAT_2_I(c, m, d) BOOST_PP_REPEAT_2_ ## c(m, d)
+# define BOOST_PP_REPEAT_3_I(c, m, d) BOOST_PP_REPEAT_3_ ## c(m, d)
+#
+# define BOOST_PP_REPEAT_1ST BOOST_PP_REPEAT_1
+# define BOOST_PP_REPEAT_2ND BOOST_PP_REPEAT_2
+# define BOOST_PP_REPEAT_3RD BOOST_PP_REPEAT_3
+#
+# define BOOST_PP_REPEAT_1_0(m, d)
+# define BOOST_PP_REPEAT_1_1(m, d) m(2, 0, d)
+# define BOOST_PP_REPEAT_1_2(m, d) BOOST_PP_REPEAT_1_1(m, d) m(2, 1, d)
+# define BOOST_PP_REPEAT_1_3(m, d) BOOST_PP_REPEAT_1_2(m, d) m(2, 2, d)
+# define BOOST_PP_REPEAT_1_4(m, d) BOOST_PP_REPEAT_1_3(m, d) m(2, 3, d)
+# define BOOST_PP_REPEAT_1_5(m, d) BOOST_PP_REPEAT_1_4(m, d) m(2, 4, d)
+# define BOOST_PP_REPEAT_1_6(m, d) BOOST_PP_REPEAT_1_5(m, d) m(2, 5, d)
+# define BOOST_PP_REPEAT_1_7(m, d) BOOST_PP_REPEAT_1_6(m, d) m(2, 6, d)
+# define BOOST_PP_REPEAT_1_8(m, d) BOOST_PP_REPEAT_1_7(m, d) m(2, 7, d)
+# define BOOST_PP_REPEAT_1_9(m, d) BOOST_PP_REPEAT_1_8(m, d) m(2, 8, d)
+# define BOOST_PP_REPEAT_1_10(m, d) BOOST_PP_REPEAT_1_9(m, d) m(2, 9, d)
+# define BOOST_PP_REPEAT_1_11(m, d) BOOST_PP_REPEAT_1_10(m, d) m(2, 10, d)
+# define BOOST_PP_REPEAT_1_12(m, d) BOOST_PP_REPEAT_1_11(m, d) m(2, 11, d)
+# define BOOST_PP_REPEAT_1_13(m, d) BOOST_PP_REPEAT_1_12(m, d) m(2, 12, d)
+# define BOOST_PP_REPEAT_1_14(m, d) BOOST_PP_REPEAT_1_13(m, d) m(2, 13, d)
+# define BOOST_PP_REPEAT_1_15(m, d) BOOST_PP_REPEAT_1_14(m, d) m(2, 14, d)
+# define BOOST_PP_REPEAT_1_16(m, d) BOOST_PP_REPEAT_1_15(m, d) m(2, 15, d)
+# define BOOST_PP_REPEAT_1_17(m, d) BOOST_PP_REPEAT_1_16(m, d) m(2, 16, d)
+# define BOOST_PP_REPEAT_1_18(m, d) BOOST_PP_REPEAT_1_17(m, d) m(2, 17, d)
+# define BOOST_PP_REPEAT_1_19(m, d) BOOST_PP_REPEAT_1_18(m, d) m(2, 18, d)
+# define BOOST_PP_REPEAT_1_20(m, d) BOOST_PP_REPEAT_1_19(m, d) m(2, 19, d)
+# define BOOST_PP_REPEAT_1_21(m, d) BOOST_PP_REPEAT_1_20(m, d) m(2, 20, d)
+# define BOOST_PP_REPEAT_1_22(m, d) BOOST_PP_REPEAT_1_21(m, d) m(2, 21, d)
+# define BOOST_PP_REPEAT_1_23(m, d) BOOST_PP_REPEAT_1_22(m, d) m(2, 22, d)
+# define BOOST_PP_REPEAT_1_24(m, d) BOOST_PP_REPEAT_1_23(m, d) m(2, 23, d)
+# define BOOST_PP_REPEAT_1_25(m, d) BOOST_PP_REPEAT_1_24(m, d) m(2, 24, d)
+# define BOOST_PP_REPEAT_1_26(m, d) BOOST_PP_REPEAT_1_25(m, d) m(2, 25, d)
+# define BOOST_PP_REPEAT_1_27(m, d) BOOST_PP_REPEAT_1_26(m, d) m(2, 26, d)
+# define BOOST_PP_REPEAT_1_28(m, d) BOOST_PP_REPEAT_1_27(m, d) m(2, 27, d)
+# define BOOST_PP_REPEAT_1_29(m, d) BOOST_PP_REPEAT_1_28(m, d) m(2, 28, d)
+# define BOOST_PP_REPEAT_1_30(m, d) BOOST_PP_REPEAT_1_29(m, d) m(2, 29, d)
+# define BOOST_PP_REPEAT_1_31(m, d) BOOST_PP_REPEAT_1_30(m, d) m(2, 30, d)
+# define BOOST_PP_REPEAT_1_32(m, d) BOOST_PP_REPEAT_1_31(m, d) m(2, 31, d)
+# define BOOST_PP_REPEAT_1_33(m, d) BOOST_PP_REPEAT_1_32(m, d) m(2, 32, d)
+# define BOOST_PP_REPEAT_1_34(m, d) BOOST_PP_REPEAT_1_33(m, d) m(2, 33, d)
+# define BOOST_PP_REPEAT_1_35(m, d) BOOST_PP_REPEAT_1_34(m, d) m(2, 34, d)
+# define BOOST_PP_REPEAT_1_36(m, d) BOOST_PP_REPEAT_1_35(m, d) m(2, 35, d)
+# define BOOST_PP_REPEAT_1_37(m, d) BOOST_PP_REPEAT_1_36(m, d) m(2, 36, d)
+# define BOOST_PP_REPEAT_1_38(m, d) BOOST_PP_REPEAT_1_37(m, d) m(2, 37, d)
+# define BOOST_PP_REPEAT_1_39(m, d) BOOST_PP_REPEAT_1_38(m, d) m(2, 38, d)
+# define BOOST_PP_REPEAT_1_40(m, d) BOOST_PP_REPEAT_1_39(m, d) m(2, 39, d)
+# define BOOST_PP_REPEAT_1_41(m, d) BOOST_PP_REPEAT_1_40(m, d) m(2, 40, d)
+# define BOOST_PP_REPEAT_1_42(m, d) BOOST_PP_REPEAT_1_41(m, d) m(2, 41, d)
+# define BOOST_PP_REPEAT_1_43(m, d) BOOST_PP_REPEAT_1_42(m, d) m(2, 42, d)
+# define BOOST_PP_REPEAT_1_44(m, d) BOOST_PP_REPEAT_1_43(m, d) m(2, 43, d)
+# define BOOST_PP_REPEAT_1_45(m, d) BOOST_PP_REPEAT_1_44(m, d) m(2, 44, d)
+# define BOOST_PP_REPEAT_1_46(m, d) BOOST_PP_REPEAT_1_45(m, d) m(2, 45, d)
+# define BOOST_PP_REPEAT_1_47(m, d) BOOST_PP_REPEAT_1_46(m, d) m(2, 46, d)
+# define BOOST_PP_REPEAT_1_48(m, d) BOOST_PP_REPEAT_1_47(m, d) m(2, 47, d)
+# define BOOST_PP_REPEAT_1_49(m, d) BOOST_PP_REPEAT_1_48(m, d) m(2, 48, d)
+# define BOOST_PP_REPEAT_1_50(m, d) BOOST_PP_REPEAT_1_49(m, d) m(2, 49, d)
+# define BOOST_PP_REPEAT_1_51(m, d) BOOST_PP_REPEAT_1_50(m, d) m(2, 50, d)
+# define BOOST_PP_REPEAT_1_52(m, d) BOOST_PP_REPEAT_1_51(m, d) m(2, 51, d)
+# define BOOST_PP_REPEAT_1_53(m, d) BOOST_PP_REPEAT_1_52(m, d) m(2, 52, d)
+# define BOOST_PP_REPEAT_1_54(m, d) BOOST_PP_REPEAT_1_53(m, d) m(2, 53, d)
+# define BOOST_PP_REPEAT_1_55(m, d) BOOST_PP_REPEAT_1_54(m, d) m(2, 54, d)
+# define BOOST_PP_REPEAT_1_56(m, d) BOOST_PP_REPEAT_1_55(m, d) m(2, 55, d)
+# define BOOST_PP_REPEAT_1_57(m, d) BOOST_PP_REPEAT_1_56(m, d) m(2, 56, d)
+# define BOOST_PP_REPEAT_1_58(m, d) BOOST_PP_REPEAT_1_57(m, d) m(2, 57, d)
+# define BOOST_PP_REPEAT_1_59(m, d) BOOST_PP_REPEAT_1_58(m, d) m(2, 58, d)
+# define BOOST_PP_REPEAT_1_60(m, d) BOOST_PP_REPEAT_1_59(m, d) m(2, 59, d)
+# define BOOST_PP_REPEAT_1_61(m, d) BOOST_PP_REPEAT_1_60(m, d) m(2, 60, d)
+# define BOOST_PP_REPEAT_1_62(m, d) BOOST_PP_REPEAT_1_61(m, d) m(2, 61, d)
+# define BOOST_PP_REPEAT_1_63(m, d) BOOST_PP_REPEAT_1_62(m, d) m(2, 62, d)
+# define BOOST_PP_REPEAT_1_64(m, d) BOOST_PP_REPEAT_1_63(m, d) m(2, 63, d)
+# define BOOST_PP_REPEAT_1_65(m, d) BOOST_PP_REPEAT_1_64(m, d) m(2, 64, d)
+# define BOOST_PP_REPEAT_1_66(m, d) BOOST_PP_REPEAT_1_65(m, d) m(2, 65, d)
+# define BOOST_PP_REPEAT_1_67(m, d) BOOST_PP_REPEAT_1_66(m, d) m(2, 66, d)
+# define BOOST_PP_REPEAT_1_68(m, d) BOOST_PP_REPEAT_1_67(m, d) m(2, 67, d)
+# define BOOST_PP_REPEAT_1_69(m, d) BOOST_PP_REPEAT_1_68(m, d) m(2, 68, d)
+# define BOOST_PP_REPEAT_1_70(m, d) BOOST_PP_REPEAT_1_69(m, d) m(2, 69, d)
+# define BOOST_PP_REPEAT_1_71(m, d) BOOST_PP_REPEAT_1_70(m, d) m(2, 70, d)
+# define BOOST_PP_REPEAT_1_72(m, d) BOOST_PP_REPEAT_1_71(m, d) m(2, 71, d)
+# define BOOST_PP_REPEAT_1_73(m, d) BOOST_PP_REPEAT_1_72(m, d) m(2, 72, d)
+# define BOOST_PP_REPEAT_1_74(m, d) BOOST_PP_REPEAT_1_73(m, d) m(2, 73, d)
+# define BOOST_PP_REPEAT_1_75(m, d) BOOST_PP_REPEAT_1_74(m, d) m(2, 74, d)
+# define BOOST_PP_REPEAT_1_76(m, d) BOOST_PP_REPEAT_1_75(m, d) m(2, 75, d)
+# define BOOST_PP_REPEAT_1_77(m, d) BOOST_PP_REPEAT_1_76(m, d) m(2, 76, d)
+# define BOOST_PP_REPEAT_1_78(m, d) BOOST_PP_REPEAT_1_77(m, d) m(2, 77, d)
+# define BOOST_PP_REPEAT_1_79(m, d) BOOST_PP_REPEAT_1_78(m, d) m(2, 78, d)
+# define BOOST_PP_REPEAT_1_80(m, d) BOOST_PP_REPEAT_1_79(m, d) m(2, 79, d)
+# define BOOST_PP_REPEAT_1_81(m, d) BOOST_PP_REPEAT_1_80(m, d) m(2, 80, d)
+# define BOOST_PP_REPEAT_1_82(m, d) BOOST_PP_REPEAT_1_81(m, d) m(2, 81, d)
+# define BOOST_PP_REPEAT_1_83(m, d) BOOST_PP_REPEAT_1_82(m, d) m(2, 82, d)
+# define BOOST_PP_REPEAT_1_84(m, d) BOOST_PP_REPEAT_1_83(m, d) m(2, 83, d)
+# define BOOST_PP_REPEAT_1_85(m, d) BOOST_PP_REPEAT_1_84(m, d) m(2, 84, d)
+# define BOOST_PP_REPEAT_1_86(m, d) BOOST_PP_REPEAT_1_85(m, d) m(2, 85, d)
+# define BOOST_PP_REPEAT_1_87(m, d) BOOST_PP_REPEAT_1_86(m, d) m(2, 86, d)
+# define BOOST_PP_REPEAT_1_88(m, d) BOOST_PP_REPEAT_1_87(m, d) m(2, 87, d)
+# define BOOST_PP_REPEAT_1_89(m, d) BOOST_PP_REPEAT_1_88(m, d) m(2, 88, d)
+# define BOOST_PP_REPEAT_1_90(m, d) BOOST_PP_REPEAT_1_89(m, d) m(2, 89, d)
+# define BOOST_PP_REPEAT_1_91(m, d) BOOST_PP_REPEAT_1_90(m, d) m(2, 90, d)
+# define BOOST_PP_REPEAT_1_92(m, d) BOOST_PP_REPEAT_1_91(m, d) m(2, 91, d)
+# define BOOST_PP_REPEAT_1_93(m, d) BOOST_PP_REPEAT_1_92(m, d) m(2, 92, d)
+# define BOOST_PP_REPEAT_1_94(m, d) BOOST_PP_REPEAT_1_93(m, d) m(2, 93, d)
+# define BOOST_PP_REPEAT_1_95(m, d) BOOST_PP_REPEAT_1_94(m, d) m(2, 94, d)
+# define BOOST_PP_REPEAT_1_96(m, d) BOOST_PP_REPEAT_1_95(m, d) m(2, 95, d)
+# define BOOST_PP_REPEAT_1_97(m, d) BOOST_PP_REPEAT_1_96(m, d) m(2, 96, d)
+# define BOOST_PP_REPEAT_1_98(m, d) BOOST_PP_REPEAT_1_97(m, d) m(2, 97, d)
+# define BOOST_PP_REPEAT_1_99(m, d) BOOST_PP_REPEAT_1_98(m, d) m(2, 98, d)
+# define BOOST_PP_REPEAT_1_100(m, d) BOOST_PP_REPEAT_1_99(m, d) m(2, 99, d)
+# define BOOST_PP_REPEAT_1_101(m, d) BOOST_PP_REPEAT_1_100(m, d) m(2, 100, d)
+# define BOOST_PP_REPEAT_1_102(m, d) BOOST_PP_REPEAT_1_101(m, d) m(2, 101, d)
+# define BOOST_PP_REPEAT_1_103(m, d) BOOST_PP_REPEAT_1_102(m, d) m(2, 102, d)
+# define BOOST_PP_REPEAT_1_104(m, d) BOOST_PP_REPEAT_1_103(m, d) m(2, 103, d)
+# define BOOST_PP_REPEAT_1_105(m, d) BOOST_PP_REPEAT_1_104(m, d) m(2, 104, d)
+# define BOOST_PP_REPEAT_1_106(m, d) BOOST_PP_REPEAT_1_105(m, d) m(2, 105, d)
+# define BOOST_PP_REPEAT_1_107(m, d) BOOST_PP_REPEAT_1_106(m, d) m(2, 106, d)
+# define BOOST_PP_REPEAT_1_108(m, d) BOOST_PP_REPEAT_1_107(m, d) m(2, 107, d)
+# define BOOST_PP_REPEAT_1_109(m, d) BOOST_PP_REPEAT_1_108(m, d) m(2, 108, d)
+# define BOOST_PP_REPEAT_1_110(m, d) BOOST_PP_REPEAT_1_109(m, d) m(2, 109, d)
+# define BOOST_PP_REPEAT_1_111(m, d) BOOST_PP_REPEAT_1_110(m, d) m(2, 110, d)
+# define BOOST_PP_REPEAT_1_112(m, d) BOOST_PP_REPEAT_1_111(m, d) m(2, 111, d)
+# define BOOST_PP_REPEAT_1_113(m, d) BOOST_PP_REPEAT_1_112(m, d) m(2, 112, d)
+# define BOOST_PP_REPEAT_1_114(m, d) BOOST_PP_REPEAT_1_113(m, d) m(2, 113, d)
+# define BOOST_PP_REPEAT_1_115(m, d) BOOST_PP_REPEAT_1_114(m, d) m(2, 114, d)
+# define BOOST_PP_REPEAT_1_116(m, d) BOOST_PP_REPEAT_1_115(m, d) m(2, 115, d)
+# define BOOST_PP_REPEAT_1_117(m, d) BOOST_PP_REPEAT_1_116(m, d) m(2, 116, d)
+# define BOOST_PP_REPEAT_1_118(m, d) BOOST_PP_REPEAT_1_117(m, d) m(2, 117, d)
+# define BOOST_PP_REPEAT_1_119(m, d) BOOST_PP_REPEAT_1_118(m, d) m(2, 118, d)
+# define BOOST_PP_REPEAT_1_120(m, d) BOOST_PP_REPEAT_1_119(m, d) m(2, 119, d)
+# define BOOST_PP_REPEAT_1_121(m, d) BOOST_PP_REPEAT_1_120(m, d) m(2, 120, d)
+# define BOOST_PP_REPEAT_1_122(m, d) BOOST_PP_REPEAT_1_121(m, d) m(2, 121, d)
+# define BOOST_PP_REPEAT_1_123(m, d) BOOST_PP_REPEAT_1_122(m, d) m(2, 122, d)
+# define BOOST_PP_REPEAT_1_124(m, d) BOOST_PP_REPEAT_1_123(m, d) m(2, 123, d)
+# define BOOST_PP_REPEAT_1_125(m, d) BOOST_PP_REPEAT_1_124(m, d) m(2, 124, d)
+# define BOOST_PP_REPEAT_1_126(m, d) BOOST_PP_REPEAT_1_125(m, d) m(2, 125, d)
+# define BOOST_PP_REPEAT_1_127(m, d) BOOST_PP_REPEAT_1_126(m, d) m(2, 126, d)
+# define BOOST_PP_REPEAT_1_128(m, d) BOOST_PP_REPEAT_1_127(m, d) m(2, 127, d)
+# define BOOST_PP_REPEAT_1_129(m, d) BOOST_PP_REPEAT_1_128(m, d) m(2, 128, d)
+# define BOOST_PP_REPEAT_1_130(m, d) BOOST_PP_REPEAT_1_129(m, d) m(2, 129, d)
+# define BOOST_PP_REPEAT_1_131(m, d) BOOST_PP_REPEAT_1_130(m, d) m(2, 130, d)
+# define BOOST_PP_REPEAT_1_132(m, d) BOOST_PP_REPEAT_1_131(m, d) m(2, 131, d)
+# define BOOST_PP_REPEAT_1_133(m, d) BOOST_PP_REPEAT_1_132(m, d) m(2, 132, d)
+# define BOOST_PP_REPEAT_1_134(m, d) BOOST_PP_REPEAT_1_133(m, d) m(2, 133, d)
+# define BOOST_PP_REPEAT_1_135(m, d) BOOST_PP_REPEAT_1_134(m, d) m(2, 134, d)
+# define BOOST_PP_REPEAT_1_136(m, d) BOOST_PP_REPEAT_1_135(m, d) m(2, 135, d)
+# define BOOST_PP_REPEAT_1_137(m, d) BOOST_PP_REPEAT_1_136(m, d) m(2, 136, d)
+# define BOOST_PP_REPEAT_1_138(m, d) BOOST_PP_REPEAT_1_137(m, d) m(2, 137, d)
+# define BOOST_PP_REPEAT_1_139(m, d) BOOST_PP_REPEAT_1_138(m, d) m(2, 138, d)
+# define BOOST_PP_REPEAT_1_140(m, d) BOOST_PP_REPEAT_1_139(m, d) m(2, 139, d)
+# define BOOST_PP_REPEAT_1_141(m, d) BOOST_PP_REPEAT_1_140(m, d) m(2, 140, d)
+# define BOOST_PP_REPEAT_1_142(m, d) BOOST_PP_REPEAT_1_141(m, d) m(2, 141, d)
+# define BOOST_PP_REPEAT_1_143(m, d) BOOST_PP_REPEAT_1_142(m, d) m(2, 142, d)
+# define BOOST_PP_REPEAT_1_144(m, d) BOOST_PP_REPEAT_1_143(m, d) m(2, 143, d)
+# define BOOST_PP_REPEAT_1_145(m, d) BOOST_PP_REPEAT_1_144(m, d) m(2, 144, d)
+# define BOOST_PP_REPEAT_1_146(m, d) BOOST_PP_REPEAT_1_145(m, d) m(2, 145, d)
+# define BOOST_PP_REPEAT_1_147(m, d) BOOST_PP_REPEAT_1_146(m, d) m(2, 146, d)
+# define BOOST_PP_REPEAT_1_148(m, d) BOOST_PP_REPEAT_1_147(m, d) m(2, 147, d)
+# define BOOST_PP_REPEAT_1_149(m, d) BOOST_PP_REPEAT_1_148(m, d) m(2, 148, d)
+# define BOOST_PP_REPEAT_1_150(m, d) BOOST_PP_REPEAT_1_149(m, d) m(2, 149, d)
+# define BOOST_PP_REPEAT_1_151(m, d) BOOST_PP_REPEAT_1_150(m, d) m(2, 150, d)
+# define BOOST_PP_REPEAT_1_152(m, d) BOOST_PP_REPEAT_1_151(m, d) m(2, 151, d)
+# define BOOST_PP_REPEAT_1_153(m, d) BOOST_PP_REPEAT_1_152(m, d) m(2, 152, d)
+# define BOOST_PP_REPEAT_1_154(m, d) BOOST_PP_REPEAT_1_153(m, d) m(2, 153, d)
+# define BOOST_PP_REPEAT_1_155(m, d) BOOST_PP_REPEAT_1_154(m, d) m(2, 154, d)
+# define BOOST_PP_REPEAT_1_156(m, d) BOOST_PP_REPEAT_1_155(m, d) m(2, 155, d)
+# define BOOST_PP_REPEAT_1_157(m, d) BOOST_PP_REPEAT_1_156(m, d) m(2, 156, d)
+# define BOOST_PP_REPEAT_1_158(m, d) BOOST_PP_REPEAT_1_157(m, d) m(2, 157, d)
+# define BOOST_PP_REPEAT_1_159(m, d) BOOST_PP_REPEAT_1_158(m, d) m(2, 158, d)
+# define BOOST_PP_REPEAT_1_160(m, d) BOOST_PP_REPEAT_1_159(m, d) m(2, 159, d)
+# define BOOST_PP_REPEAT_1_161(m, d) BOOST_PP_REPEAT_1_160(m, d) m(2, 160, d)
+# define BOOST_PP_REPEAT_1_162(m, d) BOOST_PP_REPEAT_1_161(m, d) m(2, 161, d)
+# define BOOST_PP_REPEAT_1_163(m, d) BOOST_PP_REPEAT_1_162(m, d) m(2, 162, d)
+# define BOOST_PP_REPEAT_1_164(m, d) BOOST_PP_REPEAT_1_163(m, d) m(2, 163, d)
+# define BOOST_PP_REPEAT_1_165(m, d) BOOST_PP_REPEAT_1_164(m, d) m(2, 164, d)
+# define BOOST_PP_REPEAT_1_166(m, d) BOOST_PP_REPEAT_1_165(m, d) m(2, 165, d)
+# define BOOST_PP_REPEAT_1_167(m, d) BOOST_PP_REPEAT_1_166(m, d) m(2, 166, d)
+# define BOOST_PP_REPEAT_1_168(m, d) BOOST_PP_REPEAT_1_167(m, d) m(2, 167, d)
+# define BOOST_PP_REPEAT_1_169(m, d) BOOST_PP_REPEAT_1_168(m, d) m(2, 168, d)
+# define BOOST_PP_REPEAT_1_170(m, d) BOOST_PP_REPEAT_1_169(m, d) m(2, 169, d)
+# define BOOST_PP_REPEAT_1_171(m, d) BOOST_PP_REPEAT_1_170(m, d) m(2, 170, d)
+# define BOOST_PP_REPEAT_1_172(m, d) BOOST_PP_REPEAT_1_171(m, d) m(2, 171, d)
+# define BOOST_PP_REPEAT_1_173(m, d) BOOST_PP_REPEAT_1_172(m, d) m(2, 172, d)
+# define BOOST_PP_REPEAT_1_174(m, d) BOOST_PP_REPEAT_1_173(m, d) m(2, 173, d)
+# define BOOST_PP_REPEAT_1_175(m, d) BOOST_PP_REPEAT_1_174(m, d) m(2, 174, d)
+# define BOOST_PP_REPEAT_1_176(m, d) BOOST_PP_REPEAT_1_175(m, d) m(2, 175, d)
+# define BOOST_PP_REPEAT_1_177(m, d) BOOST_PP_REPEAT_1_176(m, d) m(2, 176, d)
+# define BOOST_PP_REPEAT_1_178(m, d) BOOST_PP_REPEAT_1_177(m, d) m(2, 177, d)
+# define BOOST_PP_REPEAT_1_179(m, d) BOOST_PP_REPEAT_1_178(m, d) m(2, 178, d)
+# define BOOST_PP_REPEAT_1_180(m, d) BOOST_PP_REPEAT_1_179(m, d) m(2, 179, d)
+# define BOOST_PP_REPEAT_1_181(m, d) BOOST_PP_REPEAT_1_180(m, d) m(2, 180, d)
+# define BOOST_PP_REPEAT_1_182(m, d) BOOST_PP_REPEAT_1_181(m, d) m(2, 181, d)
+# define BOOST_PP_REPEAT_1_183(m, d) BOOST_PP_REPEAT_1_182(m, d) m(2, 182, d)
+# define BOOST_PP_REPEAT_1_184(m, d) BOOST_PP_REPEAT_1_183(m, d) m(2, 183, d)
+# define BOOST_PP_REPEAT_1_185(m, d) BOOST_PP_REPEAT_1_184(m, d) m(2, 184, d)
+# define BOOST_PP_REPEAT_1_186(m, d) BOOST_PP_REPEAT_1_185(m, d) m(2, 185, d)
+# define BOOST_PP_REPEAT_1_187(m, d) BOOST_PP_REPEAT_1_186(m, d) m(2, 186, d)
+# define BOOST_PP_REPEAT_1_188(m, d) BOOST_PP_REPEAT_1_187(m, d) m(2, 187, d)
+# define BOOST_PP_REPEAT_1_189(m, d) BOOST_PP_REPEAT_1_188(m, d) m(2, 188, d)
+# define BOOST_PP_REPEAT_1_190(m, d) BOOST_PP_REPEAT_1_189(m, d) m(2, 189, d)
+# define BOOST_PP_REPEAT_1_191(m, d) BOOST_PP_REPEAT_1_190(m, d) m(2, 190, d)
+# define BOOST_PP_REPEAT_1_192(m, d) BOOST_PP_REPEAT_1_191(m, d) m(2, 191, d)
+# define BOOST_PP_REPEAT_1_193(m, d) BOOST_PP_REPEAT_1_192(m, d) m(2, 192, d)
+# define BOOST_PP_REPEAT_1_194(m, d) BOOST_PP_REPEAT_1_193(m, d) m(2, 193, d)
+# define BOOST_PP_REPEAT_1_195(m, d) BOOST_PP_REPEAT_1_194(m, d) m(2, 194, d)
+# define BOOST_PP_REPEAT_1_196(m, d) BOOST_PP_REPEAT_1_195(m, d) m(2, 195, d)
+# define BOOST_PP_REPEAT_1_197(m, d) BOOST_PP_REPEAT_1_196(m, d) m(2, 196, d)
+# define BOOST_PP_REPEAT_1_198(m, d) BOOST_PP_REPEAT_1_197(m, d) m(2, 197, d)
+# define BOOST_PP_REPEAT_1_199(m, d) BOOST_PP_REPEAT_1_198(m, d) m(2, 198, d)
+# define BOOST_PP_REPEAT_1_200(m, d) BOOST_PP_REPEAT_1_199(m, d) m(2, 199, d)
+# define BOOST_PP_REPEAT_1_201(m, d) BOOST_PP_REPEAT_1_200(m, d) m(2, 200, d)
+# define BOOST_PP_REPEAT_1_202(m, d) BOOST_PP_REPEAT_1_201(m, d) m(2, 201, d)
+# define BOOST_PP_REPEAT_1_203(m, d) BOOST_PP_REPEAT_1_202(m, d) m(2, 202, d)
+# define BOOST_PP_REPEAT_1_204(m, d) BOOST_PP_REPEAT_1_203(m, d) m(2, 203, d)
+# define BOOST_PP_REPEAT_1_205(m, d) BOOST_PP_REPEAT_1_204(m, d) m(2, 204, d)
+# define BOOST_PP_REPEAT_1_206(m, d) BOOST_PP_REPEAT_1_205(m, d) m(2, 205, d)
+# define BOOST_PP_REPEAT_1_207(m, d) BOOST_PP_REPEAT_1_206(m, d) m(2, 206, d)
+# define BOOST_PP_REPEAT_1_208(m, d) BOOST_PP_REPEAT_1_207(m, d) m(2, 207, d)
+# define BOOST_PP_REPEAT_1_209(m, d) BOOST_PP_REPEAT_1_208(m, d) m(2, 208, d)
+# define BOOST_PP_REPEAT_1_210(m, d) BOOST_PP_REPEAT_1_209(m, d) m(2, 209, d)
+# define BOOST_PP_REPEAT_1_211(m, d) BOOST_PP_REPEAT_1_210(m, d) m(2, 210, d)
+# define BOOST_PP_REPEAT_1_212(m, d) BOOST_PP_REPEAT_1_211(m, d) m(2, 211, d)
+# define BOOST_PP_REPEAT_1_213(m, d) BOOST_PP_REPEAT_1_212(m, d) m(2, 212, d)
+# define BOOST_PP_REPEAT_1_214(m, d) BOOST_PP_REPEAT_1_213(m, d) m(2, 213, d)
+# define BOOST_PP_REPEAT_1_215(m, d) BOOST_PP_REPEAT_1_214(m, d) m(2, 214, d)
+# define BOOST_PP_REPEAT_1_216(m, d) BOOST_PP_REPEAT_1_215(m, d) m(2, 215, d)
+# define BOOST_PP_REPEAT_1_217(m, d) BOOST_PP_REPEAT_1_216(m, d) m(2, 216, d)
+# define BOOST_PP_REPEAT_1_218(m, d) BOOST_PP_REPEAT_1_217(m, d) m(2, 217, d)
+# define BOOST_PP_REPEAT_1_219(m, d) BOOST_PP_REPEAT_1_218(m, d) m(2, 218, d)
+# define BOOST_PP_REPEAT_1_220(m, d) BOOST_PP_REPEAT_1_219(m, d) m(2, 219, d)
+# define BOOST_PP_REPEAT_1_221(m, d) BOOST_PP_REPEAT_1_220(m, d) m(2, 220, d)
+# define BOOST_PP_REPEAT_1_222(m, d) BOOST_PP_REPEAT_1_221(m, d) m(2, 221, d)
+# define BOOST_PP_REPEAT_1_223(m, d) BOOST_PP_REPEAT_1_222(m, d) m(2, 222, d)
+# define BOOST_PP_REPEAT_1_224(m, d) BOOST_PP_REPEAT_1_223(m, d) m(2, 223, d)
+# define BOOST_PP_REPEAT_1_225(m, d) BOOST_PP_REPEAT_1_224(m, d) m(2, 224, d)
+# define BOOST_PP_REPEAT_1_226(m, d) BOOST_PP_REPEAT_1_225(m, d) m(2, 225, d)
+# define BOOST_PP_REPEAT_1_227(m, d) BOOST_PP_REPEAT_1_226(m, d) m(2, 226, d)
+# define BOOST_PP_REPEAT_1_228(m, d) BOOST_PP_REPEAT_1_227(m, d) m(2, 227, d)
+# define BOOST_PP_REPEAT_1_229(m, d) BOOST_PP_REPEAT_1_228(m, d) m(2, 228, d)
+# define BOOST_PP_REPEAT_1_230(m, d) BOOST_PP_REPEAT_1_229(m, d) m(2, 229, d)
+# define BOOST_PP_REPEAT_1_231(m, d) BOOST_PP_REPEAT_1_230(m, d) m(2, 230, d)
+# define BOOST_PP_REPEAT_1_232(m, d) BOOST_PP_REPEAT_1_231(m, d) m(2, 231, d)
+# define BOOST_PP_REPEAT_1_233(m, d) BOOST_PP_REPEAT_1_232(m, d) m(2, 232, d)
+# define BOOST_PP_REPEAT_1_234(m, d) BOOST_PP_REPEAT_1_233(m, d) m(2, 233, d)
+# define BOOST_PP_REPEAT_1_235(m, d) BOOST_PP_REPEAT_1_234(m, d) m(2, 234, d)
+# define BOOST_PP_REPEAT_1_236(m, d) BOOST_PP_REPEAT_1_235(m, d) m(2, 235, d)
+# define BOOST_PP_REPEAT_1_237(m, d) BOOST_PP_REPEAT_1_236(m, d) m(2, 236, d)
+# define BOOST_PP_REPEAT_1_238(m, d) BOOST_PP_REPEAT_1_237(m, d) m(2, 237, d)
+# define BOOST_PP_REPEAT_1_239(m, d) BOOST_PP_REPEAT_1_238(m, d) m(2, 238, d)
+# define BOOST_PP_REPEAT_1_240(m, d) BOOST_PP_REPEAT_1_239(m, d) m(2, 239, d)
+# define BOOST_PP_REPEAT_1_241(m, d) BOOST_PP_REPEAT_1_240(m, d) m(2, 240, d)
+# define BOOST_PP_REPEAT_1_242(m, d) BOOST_PP_REPEAT_1_241(m, d) m(2, 241, d)
+# define BOOST_PP_REPEAT_1_243(m, d) BOOST_PP_REPEAT_1_242(m, d) m(2, 242, d)
+# define BOOST_PP_REPEAT_1_244(m, d) BOOST_PP_REPEAT_1_243(m, d) m(2, 243, d)
+# define BOOST_PP_REPEAT_1_245(m, d) BOOST_PP_REPEAT_1_244(m, d) m(2, 244, d)
+# define BOOST_PP_REPEAT_1_246(m, d) BOOST_PP_REPEAT_1_245(m, d) m(2, 245, d)
+# define BOOST_PP_REPEAT_1_247(m, d) BOOST_PP_REPEAT_1_246(m, d) m(2, 246, d)
+# define BOOST_PP_REPEAT_1_248(m, d) BOOST_PP_REPEAT_1_247(m, d) m(2, 247, d)
+# define BOOST_PP_REPEAT_1_249(m, d) BOOST_PP_REPEAT_1_248(m, d) m(2, 248, d)
+# define BOOST_PP_REPEAT_1_250(m, d) BOOST_PP_REPEAT_1_249(m, d) m(2, 249, d)
+# define BOOST_PP_REPEAT_1_251(m, d) BOOST_PP_REPEAT_1_250(m, d) m(2, 250, d)
+# define BOOST_PP_REPEAT_1_252(m, d) BOOST_PP_REPEAT_1_251(m, d) m(2, 251, d)
+# define BOOST_PP_REPEAT_1_253(m, d) BOOST_PP_REPEAT_1_252(m, d) m(2, 252, d)
+# define BOOST_PP_REPEAT_1_254(m, d) BOOST_PP_REPEAT_1_253(m, d) m(2, 253, d)
+# define BOOST_PP_REPEAT_1_255(m, d) BOOST_PP_REPEAT_1_254(m, d) m(2, 254, d)
+# define BOOST_PP_REPEAT_1_256(m, d) BOOST_PP_REPEAT_1_255(m, d) m(2, 255, d)
+#
+# define BOOST_PP_REPEAT_2_0(m, d)
+# define BOOST_PP_REPEAT_2_1(m, d) m(3, 0, d)
+# define BOOST_PP_REPEAT_2_2(m, d) BOOST_PP_REPEAT_2_1(m, d) m(3, 1, d)
+# define BOOST_PP_REPEAT_2_3(m, d) BOOST_PP_REPEAT_2_2(m, d) m(3, 2, d)
+# define BOOST_PP_REPEAT_2_4(m, d) BOOST_PP_REPEAT_2_3(m, d) m(3, 3, d)
+# define BOOST_PP_REPEAT_2_5(m, d) BOOST_PP_REPEAT_2_4(m, d) m(3, 4, d)
+# define BOOST_PP_REPEAT_2_6(m, d) BOOST_PP_REPEAT_2_5(m, d) m(3, 5, d)
+# define BOOST_PP_REPEAT_2_7(m, d) BOOST_PP_REPEAT_2_6(m, d) m(3, 6, d)
+# define BOOST_PP_REPEAT_2_8(m, d) BOOST_PP_REPEAT_2_7(m, d) m(3, 7, d)
+# define BOOST_PP_REPEAT_2_9(m, d) BOOST_PP_REPEAT_2_8(m, d) m(3, 8, d)
+# define BOOST_PP_REPEAT_2_10(m, d) BOOST_PP_REPEAT_2_9(m, d) m(3, 9, d)
+# define BOOST_PP_REPEAT_2_11(m, d) BOOST_PP_REPEAT_2_10(m, d) m(3, 10, d)
+# define BOOST_PP_REPEAT_2_12(m, d) BOOST_PP_REPEAT_2_11(m, d) m(3, 11, d)
+# define BOOST_PP_REPEAT_2_13(m, d) BOOST_PP_REPEAT_2_12(m, d) m(3, 12, d)
+# define BOOST_PP_REPEAT_2_14(m, d) BOOST_PP_REPEAT_2_13(m, d) m(3, 13, d)
+# define BOOST_PP_REPEAT_2_15(m, d) BOOST_PP_REPEAT_2_14(m, d) m(3, 14, d)
+# define BOOST_PP_REPEAT_2_16(m, d) BOOST_PP_REPEAT_2_15(m, d) m(3, 15, d)
+# define BOOST_PP_REPEAT_2_17(m, d) BOOST_PP_REPEAT_2_16(m, d) m(3, 16, d)
+# define BOOST_PP_REPEAT_2_18(m, d) BOOST_PP_REPEAT_2_17(m, d) m(3, 17, d)
+# define BOOST_PP_REPEAT_2_19(m, d) BOOST_PP_REPEAT_2_18(m, d) m(3, 18, d)
+# define BOOST_PP_REPEAT_2_20(m, d) BOOST_PP_REPEAT_2_19(m, d) m(3, 19, d)
+# define BOOST_PP_REPEAT_2_21(m, d) BOOST_PP_REPEAT_2_20(m, d) m(3, 20, d)
+# define BOOST_PP_REPEAT_2_22(m, d) BOOST_PP_REPEAT_2_21(m, d) m(3, 21, d)
+# define BOOST_PP_REPEAT_2_23(m, d) BOOST_PP_REPEAT_2_22(m, d) m(3, 22, d)
+# define BOOST_PP_REPEAT_2_24(m, d) BOOST_PP_REPEAT_2_23(m, d) m(3, 23, d)
+# define BOOST_PP_REPEAT_2_25(m, d) BOOST_PP_REPEAT_2_24(m, d) m(3, 24, d)
+# define BOOST_PP_REPEAT_2_26(m, d) BOOST_PP_REPEAT_2_25(m, d) m(3, 25, d)
+# define BOOST_PP_REPEAT_2_27(m, d) BOOST_PP_REPEAT_2_26(m, d) m(3, 26, d)
+# define BOOST_PP_REPEAT_2_28(m, d) BOOST_PP_REPEAT_2_27(m, d) m(3, 27, d)
+# define BOOST_PP_REPEAT_2_29(m, d) BOOST_PP_REPEAT_2_28(m, d) m(3, 28, d)
+# define BOOST_PP_REPEAT_2_30(m, d) BOOST_PP_REPEAT_2_29(m, d) m(3, 29, d)
+# define BOOST_PP_REPEAT_2_31(m, d) BOOST_PP_REPEAT_2_30(m, d) m(3, 30, d)
+# define BOOST_PP_REPEAT_2_32(m, d) BOOST_PP_REPEAT_2_31(m, d) m(3, 31, d)
+# define BOOST_PP_REPEAT_2_33(m, d) BOOST_PP_REPEAT_2_32(m, d) m(3, 32, d)
+# define BOOST_PP_REPEAT_2_34(m, d) BOOST_PP_REPEAT_2_33(m, d) m(3, 33, d)
+# define BOOST_PP_REPEAT_2_35(m, d) BOOST_PP_REPEAT_2_34(m, d) m(3, 34, d)
+# define BOOST_PP_REPEAT_2_36(m, d) BOOST_PP_REPEAT_2_35(m, d) m(3, 35, d)
+# define BOOST_PP_REPEAT_2_37(m, d) BOOST_PP_REPEAT_2_36(m, d) m(3, 36, d)
+# define BOOST_PP_REPEAT_2_38(m, d) BOOST_PP_REPEAT_2_37(m, d) m(3, 37, d)
+# define BOOST_PP_REPEAT_2_39(m, d) BOOST_PP_REPEAT_2_38(m, d) m(3, 38, d)
+# define BOOST_PP_REPEAT_2_40(m, d) BOOST_PP_REPEAT_2_39(m, d) m(3, 39, d)
+# define BOOST_PP_REPEAT_2_41(m, d) BOOST_PP_REPEAT_2_40(m, d) m(3, 40, d)
+# define BOOST_PP_REPEAT_2_42(m, d) BOOST_PP_REPEAT_2_41(m, d) m(3, 41, d)
+# define BOOST_PP_REPEAT_2_43(m, d) BOOST_PP_REPEAT_2_42(m, d) m(3, 42, d)
+# define BOOST_PP_REPEAT_2_44(m, d) BOOST_PP_REPEAT_2_43(m, d) m(3, 43, d)
+# define BOOST_PP_REPEAT_2_45(m, d) BOOST_PP_REPEAT_2_44(m, d) m(3, 44, d)
+# define BOOST_PP_REPEAT_2_46(m, d) BOOST_PP_REPEAT_2_45(m, d) m(3, 45, d)
+# define BOOST_PP_REPEAT_2_47(m, d) BOOST_PP_REPEAT_2_46(m, d) m(3, 46, d)
+# define BOOST_PP_REPEAT_2_48(m, d) BOOST_PP_REPEAT_2_47(m, d) m(3, 47, d)
+# define BOOST_PP_REPEAT_2_49(m, d) BOOST_PP_REPEAT_2_48(m, d) m(3, 48, d)
+# define BOOST_PP_REPEAT_2_50(m, d) BOOST_PP_REPEAT_2_49(m, d) m(3, 49, d)
+# define BOOST_PP_REPEAT_2_51(m, d) BOOST_PP_REPEAT_2_50(m, d) m(3, 50, d)
+# define BOOST_PP_REPEAT_2_52(m, d) BOOST_PP_REPEAT_2_51(m, d) m(3, 51, d)
+# define BOOST_PP_REPEAT_2_53(m, d) BOOST_PP_REPEAT_2_52(m, d) m(3, 52, d)
+# define BOOST_PP_REPEAT_2_54(m, d) BOOST_PP_REPEAT_2_53(m, d) m(3, 53, d)
+# define BOOST_PP_REPEAT_2_55(m, d) BOOST_PP_REPEAT_2_54(m, d) m(3, 54, d)
+# define BOOST_PP_REPEAT_2_56(m, d) BOOST_PP_REPEAT_2_55(m, d) m(3, 55, d)
+# define BOOST_PP_REPEAT_2_57(m, d) BOOST_PP_REPEAT_2_56(m, d) m(3, 56, d)
+# define BOOST_PP_REPEAT_2_58(m, d) BOOST_PP_REPEAT_2_57(m, d) m(3, 57, d)
+# define BOOST_PP_REPEAT_2_59(m, d) BOOST_PP_REPEAT_2_58(m, d) m(3, 58, d)
+# define BOOST_PP_REPEAT_2_60(m, d) BOOST_PP_REPEAT_2_59(m, d) m(3, 59, d)
+# define BOOST_PP_REPEAT_2_61(m, d) BOOST_PP_REPEAT_2_60(m, d) m(3, 60, d)
+# define BOOST_PP_REPEAT_2_62(m, d) BOOST_PP_REPEAT_2_61(m, d) m(3, 61, d)
+# define BOOST_PP_REPEAT_2_63(m, d) BOOST_PP_REPEAT_2_62(m, d) m(3, 62, d)
+# define BOOST_PP_REPEAT_2_64(m, d) BOOST_PP_REPEAT_2_63(m, d) m(3, 63, d)
+# define BOOST_PP_REPEAT_2_65(m, d) BOOST_PP_REPEAT_2_64(m, d) m(3, 64, d)
+# define BOOST_PP_REPEAT_2_66(m, d) BOOST_PP_REPEAT_2_65(m, d) m(3, 65, d)
+# define BOOST_PP_REPEAT_2_67(m, d) BOOST_PP_REPEAT_2_66(m, d) m(3, 66, d)
+# define BOOST_PP_REPEAT_2_68(m, d) BOOST_PP_REPEAT_2_67(m, d) m(3, 67, d)
+# define BOOST_PP_REPEAT_2_69(m, d) BOOST_PP_REPEAT_2_68(m, d) m(3, 68, d)
+# define BOOST_PP_REPEAT_2_70(m, d) BOOST_PP_REPEAT_2_69(m, d) m(3, 69, d)
+# define BOOST_PP_REPEAT_2_71(m, d) BOOST_PP_REPEAT_2_70(m, d) m(3, 70, d)
+# define BOOST_PP_REPEAT_2_72(m, d) BOOST_PP_REPEAT_2_71(m, d) m(3, 71, d)
+# define BOOST_PP_REPEAT_2_73(m, d) BOOST_PP_REPEAT_2_72(m, d) m(3, 72, d)
+# define BOOST_PP_REPEAT_2_74(m, d) BOOST_PP_REPEAT_2_73(m, d) m(3, 73, d)
+# define BOOST_PP_REPEAT_2_75(m, d) BOOST_PP_REPEAT_2_74(m, d) m(3, 74, d)
+# define BOOST_PP_REPEAT_2_76(m, d) BOOST_PP_REPEAT_2_75(m, d) m(3, 75, d)
+# define BOOST_PP_REPEAT_2_77(m, d) BOOST_PP_REPEAT_2_76(m, d) m(3, 76, d)
+# define BOOST_PP_REPEAT_2_78(m, d) BOOST_PP_REPEAT_2_77(m, d) m(3, 77, d)
+# define BOOST_PP_REPEAT_2_79(m, d) BOOST_PP_REPEAT_2_78(m, d) m(3, 78, d)
+# define BOOST_PP_REPEAT_2_80(m, d) BOOST_PP_REPEAT_2_79(m, d) m(3, 79, d)
+# define BOOST_PP_REPEAT_2_81(m, d) BOOST_PP_REPEAT_2_80(m, d) m(3, 80, d)
+# define BOOST_PP_REPEAT_2_82(m, d) BOOST_PP_REPEAT_2_81(m, d) m(3, 81, d)
+# define BOOST_PP_REPEAT_2_83(m, d) BOOST_PP_REPEAT_2_82(m, d) m(3, 82, d)
+# define BOOST_PP_REPEAT_2_84(m, d) BOOST_PP_REPEAT_2_83(m, d) m(3, 83, d)
+# define BOOST_PP_REPEAT_2_85(m, d) BOOST_PP_REPEAT_2_84(m, d) m(3, 84, d)
+# define BOOST_PP_REPEAT_2_86(m, d) BOOST_PP_REPEAT_2_85(m, d) m(3, 85, d)
+# define BOOST_PP_REPEAT_2_87(m, d) BOOST_PP_REPEAT_2_86(m, d) m(3, 86, d)
+# define BOOST_PP_REPEAT_2_88(m, d) BOOST_PP_REPEAT_2_87(m, d) m(3, 87, d)
+# define BOOST_PP_REPEAT_2_89(m, d) BOOST_PP_REPEAT_2_88(m, d) m(3, 88, d)
+# define BOOST_PP_REPEAT_2_90(m, d) BOOST_PP_REPEAT_2_89(m, d) m(3, 89, d)
+# define BOOST_PP_REPEAT_2_91(m, d) BOOST_PP_REPEAT_2_90(m, d) m(3, 90, d)
+# define BOOST_PP_REPEAT_2_92(m, d) BOOST_PP_REPEAT_2_91(m, d) m(3, 91, d)
+# define BOOST_PP_REPEAT_2_93(m, d) BOOST_PP_REPEAT_2_92(m, d) m(3, 92, d)
+# define BOOST_PP_REPEAT_2_94(m, d) BOOST_PP_REPEAT_2_93(m, d) m(3, 93, d)
+# define BOOST_PP_REPEAT_2_95(m, d) BOOST_PP_REPEAT_2_94(m, d) m(3, 94, d)
+# define BOOST_PP_REPEAT_2_96(m, d) BOOST_PP_REPEAT_2_95(m, d) m(3, 95, d)
+# define BOOST_PP_REPEAT_2_97(m, d) BOOST_PP_REPEAT_2_96(m, d) m(3, 96, d)
+# define BOOST_PP_REPEAT_2_98(m, d) BOOST_PP_REPEAT_2_97(m, d) m(3, 97, d)
+# define BOOST_PP_REPEAT_2_99(m, d) BOOST_PP_REPEAT_2_98(m, d) m(3, 98, d)
+# define BOOST_PP_REPEAT_2_100(m, d) BOOST_PP_REPEAT_2_99(m, d) m(3, 99, d)
+# define BOOST_PP_REPEAT_2_101(m, d) BOOST_PP_REPEAT_2_100(m, d) m(3, 100, d)
+# define BOOST_PP_REPEAT_2_102(m, d) BOOST_PP_REPEAT_2_101(m, d) m(3, 101, d)
+# define BOOST_PP_REPEAT_2_103(m, d) BOOST_PP_REPEAT_2_102(m, d) m(3, 102, d)
+# define BOOST_PP_REPEAT_2_104(m, d) BOOST_PP_REPEAT_2_103(m, d) m(3, 103, d)
+# define BOOST_PP_REPEAT_2_105(m, d) BOOST_PP_REPEAT_2_104(m, d) m(3, 104, d)
+# define BOOST_PP_REPEAT_2_106(m, d) BOOST_PP_REPEAT_2_105(m, d) m(3, 105, d)
+# define BOOST_PP_REPEAT_2_107(m, d) BOOST_PP_REPEAT_2_106(m, d) m(3, 106, d)
+# define BOOST_PP_REPEAT_2_108(m, d) BOOST_PP_REPEAT_2_107(m, d) m(3, 107, d)
+# define BOOST_PP_REPEAT_2_109(m, d) BOOST_PP_REPEAT_2_108(m, d) m(3, 108, d)
+# define BOOST_PP_REPEAT_2_110(m, d) BOOST_PP_REPEAT_2_109(m, d) m(3, 109, d)
+# define BOOST_PP_REPEAT_2_111(m, d) BOOST_PP_REPEAT_2_110(m, d) m(3, 110, d)
+# define BOOST_PP_REPEAT_2_112(m, d) BOOST_PP_REPEAT_2_111(m, d) m(3, 111, d)
+# define BOOST_PP_REPEAT_2_113(m, d) BOOST_PP_REPEAT_2_112(m, d) m(3, 112, d)
+# define BOOST_PP_REPEAT_2_114(m, d) BOOST_PP_REPEAT_2_113(m, d) m(3, 113, d)
+# define BOOST_PP_REPEAT_2_115(m, d) BOOST_PP_REPEAT_2_114(m, d) m(3, 114, d)
+# define BOOST_PP_REPEAT_2_116(m, d) BOOST_PP_REPEAT_2_115(m, d) m(3, 115, d)
+# define BOOST_PP_REPEAT_2_117(m, d) BOOST_PP_REPEAT_2_116(m, d) m(3, 116, d)
+# define BOOST_PP_REPEAT_2_118(m, d) BOOST_PP_REPEAT_2_117(m, d) m(3, 117, d)
+# define BOOST_PP_REPEAT_2_119(m, d) BOOST_PP_REPEAT_2_118(m, d) m(3, 118, d)
+# define BOOST_PP_REPEAT_2_120(m, d) BOOST_PP_REPEAT_2_119(m, d) m(3, 119, d)
+# define BOOST_PP_REPEAT_2_121(m, d) BOOST_PP_REPEAT_2_120(m, d) m(3, 120, d)
+# define BOOST_PP_REPEAT_2_122(m, d) BOOST_PP_REPEAT_2_121(m, d) m(3, 121, d)
+# define BOOST_PP_REPEAT_2_123(m, d) BOOST_PP_REPEAT_2_122(m, d) m(3, 122, d)
+# define BOOST_PP_REPEAT_2_124(m, d) BOOST_PP_REPEAT_2_123(m, d) m(3, 123, d)
+# define BOOST_PP_REPEAT_2_125(m, d) BOOST_PP_REPEAT_2_124(m, d) m(3, 124, d)
+# define BOOST_PP_REPEAT_2_126(m, d) BOOST_PP_REPEAT_2_125(m, d) m(3, 125, d)
+# define BOOST_PP_REPEAT_2_127(m, d) BOOST_PP_REPEAT_2_126(m, d) m(3, 126, d)
+# define BOOST_PP_REPEAT_2_128(m, d) BOOST_PP_REPEAT_2_127(m, d) m(3, 127, d)
+# define BOOST_PP_REPEAT_2_129(m, d) BOOST_PP_REPEAT_2_128(m, d) m(3, 128, d)
+# define BOOST_PP_REPEAT_2_130(m, d) BOOST_PP_REPEAT_2_129(m, d) m(3, 129, d)
+# define BOOST_PP_REPEAT_2_131(m, d) BOOST_PP_REPEAT_2_130(m, d) m(3, 130, d)
+# define BOOST_PP_REPEAT_2_132(m, d) BOOST_PP_REPEAT_2_131(m, d) m(3, 131, d)
+# define BOOST_PP_REPEAT_2_133(m, d) BOOST_PP_REPEAT_2_132(m, d) m(3, 132, d)
+# define BOOST_PP_REPEAT_2_134(m, d) BOOST_PP_REPEAT_2_133(m, d) m(3, 133, d)
+# define BOOST_PP_REPEAT_2_135(m, d) BOOST_PP_REPEAT_2_134(m, d) m(3, 134, d)
+# define BOOST_PP_REPEAT_2_136(m, d) BOOST_PP_REPEAT_2_135(m, d) m(3, 135, d)
+# define BOOST_PP_REPEAT_2_137(m, d) BOOST_PP_REPEAT_2_136(m, d) m(3, 136, d)
+# define BOOST_PP_REPEAT_2_138(m, d) BOOST_PP_REPEAT_2_137(m, d) m(3, 137, d)
+# define BOOST_PP_REPEAT_2_139(m, d) BOOST_PP_REPEAT_2_138(m, d) m(3, 138, d)
+# define BOOST_PP_REPEAT_2_140(m, d) BOOST_PP_REPEAT_2_139(m, d) m(3, 139, d)
+# define BOOST_PP_REPEAT_2_141(m, d) BOOST_PP_REPEAT_2_140(m, d) m(3, 140, d)
+# define BOOST_PP_REPEAT_2_142(m, d) BOOST_PP_REPEAT_2_141(m, d) m(3, 141, d)
+# define BOOST_PP_REPEAT_2_143(m, d) BOOST_PP_REPEAT_2_142(m, d) m(3, 142, d)
+# define BOOST_PP_REPEAT_2_144(m, d) BOOST_PP_REPEAT_2_143(m, d) m(3, 143, d)
+# define BOOST_PP_REPEAT_2_145(m, d) BOOST_PP_REPEAT_2_144(m, d) m(3, 144, d)
+# define BOOST_PP_REPEAT_2_146(m, d) BOOST_PP_REPEAT_2_145(m, d) m(3, 145, d)
+# define BOOST_PP_REPEAT_2_147(m, d) BOOST_PP_REPEAT_2_146(m, d) m(3, 146, d)
+# define BOOST_PP_REPEAT_2_148(m, d) BOOST_PP_REPEAT_2_147(m, d) m(3, 147, d)
+# define BOOST_PP_REPEAT_2_149(m, d) BOOST_PP_REPEAT_2_148(m, d) m(3, 148, d)
+# define BOOST_PP_REPEAT_2_150(m, d) BOOST_PP_REPEAT_2_149(m, d) m(3, 149, d)
+# define BOOST_PP_REPEAT_2_151(m, d) BOOST_PP_REPEAT_2_150(m, d) m(3, 150, d)
+# define BOOST_PP_REPEAT_2_152(m, d) BOOST_PP_REPEAT_2_151(m, d) m(3, 151, d)
+# define BOOST_PP_REPEAT_2_153(m, d) BOOST_PP_REPEAT_2_152(m, d) m(3, 152, d)
+# define BOOST_PP_REPEAT_2_154(m, d) BOOST_PP_REPEAT_2_153(m, d) m(3, 153, d)
+# define BOOST_PP_REPEAT_2_155(m, d) BOOST_PP_REPEAT_2_154(m, d) m(3, 154, d)
+# define BOOST_PP_REPEAT_2_156(m, d) BOOST_PP_REPEAT_2_155(m, d) m(3, 155, d)
+# define BOOST_PP_REPEAT_2_157(m, d) BOOST_PP_REPEAT_2_156(m, d) m(3, 156, d)
+# define BOOST_PP_REPEAT_2_158(m, d) BOOST_PP_REPEAT_2_157(m, d) m(3, 157, d)
+# define BOOST_PP_REPEAT_2_159(m, d) BOOST_PP_REPEAT_2_158(m, d) m(3, 158, d)
+# define BOOST_PP_REPEAT_2_160(m, d) BOOST_PP_REPEAT_2_159(m, d) m(3, 159, d)
+# define BOOST_PP_REPEAT_2_161(m, d) BOOST_PP_REPEAT_2_160(m, d) m(3, 160, d)
+# define BOOST_PP_REPEAT_2_162(m, d) BOOST_PP_REPEAT_2_161(m, d) m(3, 161, d)
+# define BOOST_PP_REPEAT_2_163(m, d) BOOST_PP_REPEAT_2_162(m, d) m(3, 162, d)
+# define BOOST_PP_REPEAT_2_164(m, d) BOOST_PP_REPEAT_2_163(m, d) m(3, 163, d)
+# define BOOST_PP_REPEAT_2_165(m, d) BOOST_PP_REPEAT_2_164(m, d) m(3, 164, d)
+# define BOOST_PP_REPEAT_2_166(m, d) BOOST_PP_REPEAT_2_165(m, d) m(3, 165, d)
+# define BOOST_PP_REPEAT_2_167(m, d) BOOST_PP_REPEAT_2_166(m, d) m(3, 166, d)
+# define BOOST_PP_REPEAT_2_168(m, d) BOOST_PP_REPEAT_2_167(m, d) m(3, 167, d)
+# define BOOST_PP_REPEAT_2_169(m, d) BOOST_PP_REPEAT_2_168(m, d) m(3, 168, d)
+# define BOOST_PP_REPEAT_2_170(m, d) BOOST_PP_REPEAT_2_169(m, d) m(3, 169, d)
+# define BOOST_PP_REPEAT_2_171(m, d) BOOST_PP_REPEAT_2_170(m, d) m(3, 170, d)
+# define BOOST_PP_REPEAT_2_172(m, d) BOOST_PP_REPEAT_2_171(m, d) m(3, 171, d)
+# define BOOST_PP_REPEAT_2_173(m, d) BOOST_PP_REPEAT_2_172(m, d) m(3, 172, d)
+# define BOOST_PP_REPEAT_2_174(m, d) BOOST_PP_REPEAT_2_173(m, d) m(3, 173, d)
+# define BOOST_PP_REPEAT_2_175(m, d) BOOST_PP_REPEAT_2_174(m, d) m(3, 174, d)
+# define BOOST_PP_REPEAT_2_176(m, d) BOOST_PP_REPEAT_2_175(m, d) m(3, 175, d)
+# define BOOST_PP_REPEAT_2_177(m, d) BOOST_PP_REPEAT_2_176(m, d) m(3, 176, d)
+# define BOOST_PP_REPEAT_2_178(m, d) BOOST_PP_REPEAT_2_177(m, d) m(3, 177, d)
+# define BOOST_PP_REPEAT_2_179(m, d) BOOST_PP_REPEAT_2_178(m, d) m(3, 178, d)
+# define BOOST_PP_REPEAT_2_180(m, d) BOOST_PP_REPEAT_2_179(m, d) m(3, 179, d)
+# define BOOST_PP_REPEAT_2_181(m, d) BOOST_PP_REPEAT_2_180(m, d) m(3, 180, d)
+# define BOOST_PP_REPEAT_2_182(m, d) BOOST_PP_REPEAT_2_181(m, d) m(3, 181, d)
+# define BOOST_PP_REPEAT_2_183(m, d) BOOST_PP_REPEAT_2_182(m, d) m(3, 182, d)
+# define BOOST_PP_REPEAT_2_184(m, d) BOOST_PP_REPEAT_2_183(m, d) m(3, 183, d)
+# define BOOST_PP_REPEAT_2_185(m, d) BOOST_PP_REPEAT_2_184(m, d) m(3, 184, d)
+# define BOOST_PP_REPEAT_2_186(m, d) BOOST_PP_REPEAT_2_185(m, d) m(3, 185, d)
+# define BOOST_PP_REPEAT_2_187(m, d) BOOST_PP_REPEAT_2_186(m, d) m(3, 186, d)
+# define BOOST_PP_REPEAT_2_188(m, d) BOOST_PP_REPEAT_2_187(m, d) m(3, 187, d)
+# define BOOST_PP_REPEAT_2_189(m, d) BOOST_PP_REPEAT_2_188(m, d) m(3, 188, d)
+# define BOOST_PP_REPEAT_2_190(m, d) BOOST_PP_REPEAT_2_189(m, d) m(3, 189, d)
+# define BOOST_PP_REPEAT_2_191(m, d) BOOST_PP_REPEAT_2_190(m, d) m(3, 190, d)
+# define BOOST_PP_REPEAT_2_192(m, d) BOOST_PP_REPEAT_2_191(m, d) m(3, 191, d)
+# define BOOST_PP_REPEAT_2_193(m, d) BOOST_PP_REPEAT_2_192(m, d) m(3, 192, d)
+# define BOOST_PP_REPEAT_2_194(m, d) BOOST_PP_REPEAT_2_193(m, d) m(3, 193, d)
+# define BOOST_PP_REPEAT_2_195(m, d) BOOST_PP_REPEAT_2_194(m, d) m(3, 194, d)
+# define BOOST_PP_REPEAT_2_196(m, d) BOOST_PP_REPEAT_2_195(m, d) m(3, 195, d)
+# define BOOST_PP_REPEAT_2_197(m, d) BOOST_PP_REPEAT_2_196(m, d) m(3, 196, d)
+# define BOOST_PP_REPEAT_2_198(m, d) BOOST_PP_REPEAT_2_197(m, d) m(3, 197, d)
+# define BOOST_PP_REPEAT_2_199(m, d) BOOST_PP_REPEAT_2_198(m, d) m(3, 198, d)
+# define BOOST_PP_REPEAT_2_200(m, d) BOOST_PP_REPEAT_2_199(m, d) m(3, 199, d)
+# define BOOST_PP_REPEAT_2_201(m, d) BOOST_PP_REPEAT_2_200(m, d) m(3, 200, d)
+# define BOOST_PP_REPEAT_2_202(m, d) BOOST_PP_REPEAT_2_201(m, d) m(3, 201, d)
+# define BOOST_PP_REPEAT_2_203(m, d) BOOST_PP_REPEAT_2_202(m, d) m(3, 202, d)
+# define BOOST_PP_REPEAT_2_204(m, d) BOOST_PP_REPEAT_2_203(m, d) m(3, 203, d)
+# define BOOST_PP_REPEAT_2_205(m, d) BOOST_PP_REPEAT_2_204(m, d) m(3, 204, d)
+# define BOOST_PP_REPEAT_2_206(m, d) BOOST_PP_REPEAT_2_205(m, d) m(3, 205, d)
+# define BOOST_PP_REPEAT_2_207(m, d) BOOST_PP_REPEAT_2_206(m, d) m(3, 206, d)
+# define BOOST_PP_REPEAT_2_208(m, d) BOOST_PP_REPEAT_2_207(m, d) m(3, 207, d)
+# define BOOST_PP_REPEAT_2_209(m, d) BOOST_PP_REPEAT_2_208(m, d) m(3, 208, d)
+# define BOOST_PP_REPEAT_2_210(m, d) BOOST_PP_REPEAT_2_209(m, d) m(3, 209, d)
+# define BOOST_PP_REPEAT_2_211(m, d) BOOST_PP_REPEAT_2_210(m, d) m(3, 210, d)
+# define BOOST_PP_REPEAT_2_212(m, d) BOOST_PP_REPEAT_2_211(m, d) m(3, 211, d)
+# define BOOST_PP_REPEAT_2_213(m, d) BOOST_PP_REPEAT_2_212(m, d) m(3, 212, d)
+# define BOOST_PP_REPEAT_2_214(m, d) BOOST_PP_REPEAT_2_213(m, d) m(3, 213, d)
+# define BOOST_PP_REPEAT_2_215(m, d) BOOST_PP_REPEAT_2_214(m, d) m(3, 214, d)
+# define BOOST_PP_REPEAT_2_216(m, d) BOOST_PP_REPEAT_2_215(m, d) m(3, 215, d)
+# define BOOST_PP_REPEAT_2_217(m, d) BOOST_PP_REPEAT_2_216(m, d) m(3, 216, d)
+# define BOOST_PP_REPEAT_2_218(m, d) BOOST_PP_REPEAT_2_217(m, d) m(3, 217, d)
+# define BOOST_PP_REPEAT_2_219(m, d) BOOST_PP_REPEAT_2_218(m, d) m(3, 218, d)
+# define BOOST_PP_REPEAT_2_220(m, d) BOOST_PP_REPEAT_2_219(m, d) m(3, 219, d)
+# define BOOST_PP_REPEAT_2_221(m, d) BOOST_PP_REPEAT_2_220(m, d) m(3, 220, d)
+# define BOOST_PP_REPEAT_2_222(m, d) BOOST_PP_REPEAT_2_221(m, d) m(3, 221, d)
+# define BOOST_PP_REPEAT_2_223(m, d) BOOST_PP_REPEAT_2_222(m, d) m(3, 222, d)
+# define BOOST_PP_REPEAT_2_224(m, d) BOOST_PP_REPEAT_2_223(m, d) m(3, 223, d)
+# define BOOST_PP_REPEAT_2_225(m, d) BOOST_PP_REPEAT_2_224(m, d) m(3, 224, d)
+# define BOOST_PP_REPEAT_2_226(m, d) BOOST_PP_REPEAT_2_225(m, d) m(3, 225, d)
+# define BOOST_PP_REPEAT_2_227(m, d) BOOST_PP_REPEAT_2_226(m, d) m(3, 226, d)
+# define BOOST_PP_REPEAT_2_228(m, d) BOOST_PP_REPEAT_2_227(m, d) m(3, 227, d)
+# define BOOST_PP_REPEAT_2_229(m, d) BOOST_PP_REPEAT_2_228(m, d) m(3, 228, d)
+# define BOOST_PP_REPEAT_2_230(m, d) BOOST_PP_REPEAT_2_229(m, d) m(3, 229, d)
+# define BOOST_PP_REPEAT_2_231(m, d) BOOST_PP_REPEAT_2_230(m, d) m(3, 230, d)
+# define BOOST_PP_REPEAT_2_232(m, d) BOOST_PP_REPEAT_2_231(m, d) m(3, 231, d)
+# define BOOST_PP_REPEAT_2_233(m, d) BOOST_PP_REPEAT_2_232(m, d) m(3, 232, d)
+# define BOOST_PP_REPEAT_2_234(m, d) BOOST_PP_REPEAT_2_233(m, d) m(3, 233, d)
+# define BOOST_PP_REPEAT_2_235(m, d) BOOST_PP_REPEAT_2_234(m, d) m(3, 234, d)
+# define BOOST_PP_REPEAT_2_236(m, d) BOOST_PP_REPEAT_2_235(m, d) m(3, 235, d)
+# define BOOST_PP_REPEAT_2_237(m, d) BOOST_PP_REPEAT_2_236(m, d) m(3, 236, d)
+# define BOOST_PP_REPEAT_2_238(m, d) BOOST_PP_REPEAT_2_237(m, d) m(3, 237, d)
+# define BOOST_PP_REPEAT_2_239(m, d) BOOST_PP_REPEAT_2_238(m, d) m(3, 238, d)
+# define BOOST_PP_REPEAT_2_240(m, d) BOOST_PP_REPEAT_2_239(m, d) m(3, 239, d)
+# define BOOST_PP_REPEAT_2_241(m, d) BOOST_PP_REPEAT_2_240(m, d) m(3, 240, d)
+# define BOOST_PP_REPEAT_2_242(m, d) BOOST_PP_REPEAT_2_241(m, d) m(3, 241, d)
+# define BOOST_PP_REPEAT_2_243(m, d) BOOST_PP_REPEAT_2_242(m, d) m(3, 242, d)
+# define BOOST_PP_REPEAT_2_244(m, d) BOOST_PP_REPEAT_2_243(m, d) m(3, 243, d)
+# define BOOST_PP_REPEAT_2_245(m, d) BOOST_PP_REPEAT_2_244(m, d) m(3, 244, d)
+# define BOOST_PP_REPEAT_2_246(m, d) BOOST_PP_REPEAT_2_245(m, d) m(3, 245, d)
+# define BOOST_PP_REPEAT_2_247(m, d) BOOST_PP_REPEAT_2_246(m, d) m(3, 246, d)
+# define BOOST_PP_REPEAT_2_248(m, d) BOOST_PP_REPEAT_2_247(m, d) m(3, 247, d)
+# define BOOST_PP_REPEAT_2_249(m, d) BOOST_PP_REPEAT_2_248(m, d) m(3, 248, d)
+# define BOOST_PP_REPEAT_2_250(m, d) BOOST_PP_REPEAT_2_249(m, d) m(3, 249, d)
+# define BOOST_PP_REPEAT_2_251(m, d) BOOST_PP_REPEAT_2_250(m, d) m(3, 250, d)
+# define BOOST_PP_REPEAT_2_252(m, d) BOOST_PP_REPEAT_2_251(m, d) m(3, 251, d)
+# define BOOST_PP_REPEAT_2_253(m, d) BOOST_PP_REPEAT_2_252(m, d) m(3, 252, d)
+# define BOOST_PP_REPEAT_2_254(m, d) BOOST_PP_REPEAT_2_253(m, d) m(3, 253, d)
+# define BOOST_PP_REPEAT_2_255(m, d) BOOST_PP_REPEAT_2_254(m, d) m(3, 254, d)
+# define BOOST_PP_REPEAT_2_256(m, d) BOOST_PP_REPEAT_2_255(m, d) m(3, 255, d)
+#
+# define BOOST_PP_REPEAT_3_0(m, d)
+# define BOOST_PP_REPEAT_3_1(m, d) m(4, 0, d)
+# define BOOST_PP_REPEAT_3_2(m, d) BOOST_PP_REPEAT_3_1(m, d) m(4, 1, d)
+# define BOOST_PP_REPEAT_3_3(m, d) BOOST_PP_REPEAT_3_2(m, d) m(4, 2, d)
+# define BOOST_PP_REPEAT_3_4(m, d) BOOST_PP_REPEAT_3_3(m, d) m(4, 3, d)
+# define BOOST_PP_REPEAT_3_5(m, d) BOOST_PP_REPEAT_3_4(m, d) m(4, 4, d)
+# define BOOST_PP_REPEAT_3_6(m, d) BOOST_PP_REPEAT_3_5(m, d) m(4, 5, d)
+# define BOOST_PP_REPEAT_3_7(m, d) BOOST_PP_REPEAT_3_6(m, d) m(4, 6, d)
+# define BOOST_PP_REPEAT_3_8(m, d) BOOST_PP_REPEAT_3_7(m, d) m(4, 7, d)
+# define BOOST_PP_REPEAT_3_9(m, d) BOOST_PP_REPEAT_3_8(m, d) m(4, 8, d)
+# define BOOST_PP_REPEAT_3_10(m, d) BOOST_PP_REPEAT_3_9(m, d) m(4, 9, d)
+# define BOOST_PP_REPEAT_3_11(m, d) BOOST_PP_REPEAT_3_10(m, d) m(4, 10, d)
+# define BOOST_PP_REPEAT_3_12(m, d) BOOST_PP_REPEAT_3_11(m, d) m(4, 11, d)
+# define BOOST_PP_REPEAT_3_13(m, d) BOOST_PP_REPEAT_3_12(m, d) m(4, 12, d)
+# define BOOST_PP_REPEAT_3_14(m, d) BOOST_PP_REPEAT_3_13(m, d) m(4, 13, d)
+# define BOOST_PP_REPEAT_3_15(m, d) BOOST_PP_REPEAT_3_14(m, d) m(4, 14, d)
+# define BOOST_PP_REPEAT_3_16(m, d) BOOST_PP_REPEAT_3_15(m, d) m(4, 15, d)
+# define BOOST_PP_REPEAT_3_17(m, d) BOOST_PP_REPEAT_3_16(m, d) m(4, 16, d)
+# define BOOST_PP_REPEAT_3_18(m, d) BOOST_PP_REPEAT_3_17(m, d) m(4, 17, d)
+# define BOOST_PP_REPEAT_3_19(m, d) BOOST_PP_REPEAT_3_18(m, d) m(4, 18, d)
+# define BOOST_PP_REPEAT_3_20(m, d) BOOST_PP_REPEAT_3_19(m, d) m(4, 19, d)
+# define BOOST_PP_REPEAT_3_21(m, d) BOOST_PP_REPEAT_3_20(m, d) m(4, 20, d)
+# define BOOST_PP_REPEAT_3_22(m, d) BOOST_PP_REPEAT_3_21(m, d) m(4, 21, d)
+# define BOOST_PP_REPEAT_3_23(m, d) BOOST_PP_REPEAT_3_22(m, d) m(4, 22, d)
+# define BOOST_PP_REPEAT_3_24(m, d) BOOST_PP_REPEAT_3_23(m, d) m(4, 23, d)
+# define BOOST_PP_REPEAT_3_25(m, d) BOOST_PP_REPEAT_3_24(m, d) m(4, 24, d)
+# define BOOST_PP_REPEAT_3_26(m, d) BOOST_PP_REPEAT_3_25(m, d) m(4, 25, d)
+# define BOOST_PP_REPEAT_3_27(m, d) BOOST_PP_REPEAT_3_26(m, d) m(4, 26, d)
+# define BOOST_PP_REPEAT_3_28(m, d) BOOST_PP_REPEAT_3_27(m, d) m(4, 27, d)
+# define BOOST_PP_REPEAT_3_29(m, d) BOOST_PP_REPEAT_3_28(m, d) m(4, 28, d)
+# define BOOST_PP_REPEAT_3_30(m, d) BOOST_PP_REPEAT_3_29(m, d) m(4, 29, d)
+# define BOOST_PP_REPEAT_3_31(m, d) BOOST_PP_REPEAT_3_30(m, d) m(4, 30, d)
+# define BOOST_PP_REPEAT_3_32(m, d) BOOST_PP_REPEAT_3_31(m, d) m(4, 31, d)
+# define BOOST_PP_REPEAT_3_33(m, d) BOOST_PP_REPEAT_3_32(m, d) m(4, 32, d)
+# define BOOST_PP_REPEAT_3_34(m, d) BOOST_PP_REPEAT_3_33(m, d) m(4, 33, d)
+# define BOOST_PP_REPEAT_3_35(m, d) BOOST_PP_REPEAT_3_34(m, d) m(4, 34, d)
+# define BOOST_PP_REPEAT_3_36(m, d) BOOST_PP_REPEAT_3_35(m, d) m(4, 35, d)
+# define BOOST_PP_REPEAT_3_37(m, d) BOOST_PP_REPEAT_3_36(m, d) m(4, 36, d)
+# define BOOST_PP_REPEAT_3_38(m, d) BOOST_PP_REPEAT_3_37(m, d) m(4, 37, d)
+# define BOOST_PP_REPEAT_3_39(m, d) BOOST_PP_REPEAT_3_38(m, d) m(4, 38, d)
+# define BOOST_PP_REPEAT_3_40(m, d) BOOST_PP_REPEAT_3_39(m, d) m(4, 39, d)
+# define BOOST_PP_REPEAT_3_41(m, d) BOOST_PP_REPEAT_3_40(m, d) m(4, 40, d)
+# define BOOST_PP_REPEAT_3_42(m, d) BOOST_PP_REPEAT_3_41(m, d) m(4, 41, d)
+# define BOOST_PP_REPEAT_3_43(m, d) BOOST_PP_REPEAT_3_42(m, d) m(4, 42, d)
+# define BOOST_PP_REPEAT_3_44(m, d) BOOST_PP_REPEAT_3_43(m, d) m(4, 43, d)
+# define BOOST_PP_REPEAT_3_45(m, d) BOOST_PP_REPEAT_3_44(m, d) m(4, 44, d)
+# define BOOST_PP_REPEAT_3_46(m, d) BOOST_PP_REPEAT_3_45(m, d) m(4, 45, d)
+# define BOOST_PP_REPEAT_3_47(m, d) BOOST_PP_REPEAT_3_46(m, d) m(4, 46, d)
+# define BOOST_PP_REPEAT_3_48(m, d) BOOST_PP_REPEAT_3_47(m, d) m(4, 47, d)
+# define BOOST_PP_REPEAT_3_49(m, d) BOOST_PP_REPEAT_3_48(m, d) m(4, 48, d)
+# define BOOST_PP_REPEAT_3_50(m, d) BOOST_PP_REPEAT_3_49(m, d) m(4, 49, d)
+# define BOOST_PP_REPEAT_3_51(m, d) BOOST_PP_REPEAT_3_50(m, d) m(4, 50, d)
+# define BOOST_PP_REPEAT_3_52(m, d) BOOST_PP_REPEAT_3_51(m, d) m(4, 51, d)
+# define BOOST_PP_REPEAT_3_53(m, d) BOOST_PP_REPEAT_3_52(m, d) m(4, 52, d)
+# define BOOST_PP_REPEAT_3_54(m, d) BOOST_PP_REPEAT_3_53(m, d) m(4, 53, d)
+# define BOOST_PP_REPEAT_3_55(m, d) BOOST_PP_REPEAT_3_54(m, d) m(4, 54, d)
+# define BOOST_PP_REPEAT_3_56(m, d) BOOST_PP_REPEAT_3_55(m, d) m(4, 55, d)
+# define BOOST_PP_REPEAT_3_57(m, d) BOOST_PP_REPEAT_3_56(m, d) m(4, 56, d)
+# define BOOST_PP_REPEAT_3_58(m, d) BOOST_PP_REPEAT_3_57(m, d) m(4, 57, d)
+# define BOOST_PP_REPEAT_3_59(m, d) BOOST_PP_REPEAT_3_58(m, d) m(4, 58, d)
+# define BOOST_PP_REPEAT_3_60(m, d) BOOST_PP_REPEAT_3_59(m, d) m(4, 59, d)
+# define BOOST_PP_REPEAT_3_61(m, d) BOOST_PP_REPEAT_3_60(m, d) m(4, 60, d)
+# define BOOST_PP_REPEAT_3_62(m, d) BOOST_PP_REPEAT_3_61(m, d) m(4, 61, d)
+# define BOOST_PP_REPEAT_3_63(m, d) BOOST_PP_REPEAT_3_62(m, d) m(4, 62, d)
+# define BOOST_PP_REPEAT_3_64(m, d) BOOST_PP_REPEAT_3_63(m, d) m(4, 63, d)
+# define BOOST_PP_REPEAT_3_65(m, d) BOOST_PP_REPEAT_3_64(m, d) m(4, 64, d)
+# define BOOST_PP_REPEAT_3_66(m, d) BOOST_PP_REPEAT_3_65(m, d) m(4, 65, d)
+# define BOOST_PP_REPEAT_3_67(m, d) BOOST_PP_REPEAT_3_66(m, d) m(4, 66, d)
+# define BOOST_PP_REPEAT_3_68(m, d) BOOST_PP_REPEAT_3_67(m, d) m(4, 67, d)
+# define BOOST_PP_REPEAT_3_69(m, d) BOOST_PP_REPEAT_3_68(m, d) m(4, 68, d)
+# define BOOST_PP_REPEAT_3_70(m, d) BOOST_PP_REPEAT_3_69(m, d) m(4, 69, d)
+# define BOOST_PP_REPEAT_3_71(m, d) BOOST_PP_REPEAT_3_70(m, d) m(4, 70, d)
+# define BOOST_PP_REPEAT_3_72(m, d) BOOST_PP_REPEAT_3_71(m, d) m(4, 71, d)
+# define BOOST_PP_REPEAT_3_73(m, d) BOOST_PP_REPEAT_3_72(m, d) m(4, 72, d)
+# define BOOST_PP_REPEAT_3_74(m, d) BOOST_PP_REPEAT_3_73(m, d) m(4, 73, d)
+# define BOOST_PP_REPEAT_3_75(m, d) BOOST_PP_REPEAT_3_74(m, d) m(4, 74, d)
+# define BOOST_PP_REPEAT_3_76(m, d) BOOST_PP_REPEAT_3_75(m, d) m(4, 75, d)
+# define BOOST_PP_REPEAT_3_77(m, d) BOOST_PP_REPEAT_3_76(m, d) m(4, 76, d)
+# define BOOST_PP_REPEAT_3_78(m, d) BOOST_PP_REPEAT_3_77(m, d) m(4, 77, d)
+# define BOOST_PP_REPEAT_3_79(m, d) BOOST_PP_REPEAT_3_78(m, d) m(4, 78, d)
+# define BOOST_PP_REPEAT_3_80(m, d) BOOST_PP_REPEAT_3_79(m, d) m(4, 79, d)
+# define BOOST_PP_REPEAT_3_81(m, d) BOOST_PP_REPEAT_3_80(m, d) m(4, 80, d)
+# define BOOST_PP_REPEAT_3_82(m, d) BOOST_PP_REPEAT_3_81(m, d) m(4, 81, d)
+# define BOOST_PP_REPEAT_3_83(m, d) BOOST_PP_REPEAT_3_82(m, d) m(4, 82, d)
+# define BOOST_PP_REPEAT_3_84(m, d) BOOST_PP_REPEAT_3_83(m, d) m(4, 83, d)
+# define BOOST_PP_REPEAT_3_85(m, d) BOOST_PP_REPEAT_3_84(m, d) m(4, 84, d)
+# define BOOST_PP_REPEAT_3_86(m, d) BOOST_PP_REPEAT_3_85(m, d) m(4, 85, d)
+# define BOOST_PP_REPEAT_3_87(m, d) BOOST_PP_REPEAT_3_86(m, d) m(4, 86, d)
+# define BOOST_PP_REPEAT_3_88(m, d) BOOST_PP_REPEAT_3_87(m, d) m(4, 87, d)
+# define BOOST_PP_REPEAT_3_89(m, d) BOOST_PP_REPEAT_3_88(m, d) m(4, 88, d)
+# define BOOST_PP_REPEAT_3_90(m, d) BOOST_PP_REPEAT_3_89(m, d) m(4, 89, d)
+# define BOOST_PP_REPEAT_3_91(m, d) BOOST_PP_REPEAT_3_90(m, d) m(4, 90, d)
+# define BOOST_PP_REPEAT_3_92(m, d) BOOST_PP_REPEAT_3_91(m, d) m(4, 91, d)
+# define BOOST_PP_REPEAT_3_93(m, d) BOOST_PP_REPEAT_3_92(m, d) m(4, 92, d)
+# define BOOST_PP_REPEAT_3_94(m, d) BOOST_PP_REPEAT_3_93(m, d) m(4, 93, d)
+# define BOOST_PP_REPEAT_3_95(m, d) BOOST_PP_REPEAT_3_94(m, d) m(4, 94, d)
+# define BOOST_PP_REPEAT_3_96(m, d) BOOST_PP_REPEAT_3_95(m, d) m(4, 95, d)
+# define BOOST_PP_REPEAT_3_97(m, d) BOOST_PP_REPEAT_3_96(m, d) m(4, 96, d)
+# define BOOST_PP_REPEAT_3_98(m, d) BOOST_PP_REPEAT_3_97(m, d) m(4, 97, d)
+# define BOOST_PP_REPEAT_3_99(m, d) BOOST_PP_REPEAT_3_98(m, d) m(4, 98, d)
+# define BOOST_PP_REPEAT_3_100(m, d) BOOST_PP_REPEAT_3_99(m, d) m(4, 99, d)
+# define BOOST_PP_REPEAT_3_101(m, d) BOOST_PP_REPEAT_3_100(m, d) m(4, 100, d)
+# define BOOST_PP_REPEAT_3_102(m, d) BOOST_PP_REPEAT_3_101(m, d) m(4, 101, d)
+# define BOOST_PP_REPEAT_3_103(m, d) BOOST_PP_REPEAT_3_102(m, d) m(4, 102, d)
+# define BOOST_PP_REPEAT_3_104(m, d) BOOST_PP_REPEAT_3_103(m, d) m(4, 103, d)
+# define BOOST_PP_REPEAT_3_105(m, d) BOOST_PP_REPEAT_3_104(m, d) m(4, 104, d)
+# define BOOST_PP_REPEAT_3_106(m, d) BOOST_PP_REPEAT_3_105(m, d) m(4, 105, d)
+# define BOOST_PP_REPEAT_3_107(m, d) BOOST_PP_REPEAT_3_106(m, d) m(4, 106, d)
+# define BOOST_PP_REPEAT_3_108(m, d) BOOST_PP_REPEAT_3_107(m, d) m(4, 107, d)
+# define BOOST_PP_REPEAT_3_109(m, d) BOOST_PP_REPEAT_3_108(m, d) m(4, 108, d)
+# define BOOST_PP_REPEAT_3_110(m, d) BOOST_PP_REPEAT_3_109(m, d) m(4, 109, d)
+# define BOOST_PP_REPEAT_3_111(m, d) BOOST_PP_REPEAT_3_110(m, d) m(4, 110, d)
+# define BOOST_PP_REPEAT_3_112(m, d) BOOST_PP_REPEAT_3_111(m, d) m(4, 111, d)
+# define BOOST_PP_REPEAT_3_113(m, d) BOOST_PP_REPEAT_3_112(m, d) m(4, 112, d)
+# define BOOST_PP_REPEAT_3_114(m, d) BOOST_PP_REPEAT_3_113(m, d) m(4, 113, d)
+# define BOOST_PP_REPEAT_3_115(m, d) BOOST_PP_REPEAT_3_114(m, d) m(4, 114, d)
+# define BOOST_PP_REPEAT_3_116(m, d) BOOST_PP_REPEAT_3_115(m, d) m(4, 115, d)
+# define BOOST_PP_REPEAT_3_117(m, d) BOOST_PP_REPEAT_3_116(m, d) m(4, 116, d)
+# define BOOST_PP_REPEAT_3_118(m, d) BOOST_PP_REPEAT_3_117(m, d) m(4, 117, d)
+# define BOOST_PP_REPEAT_3_119(m, d) BOOST_PP_REPEAT_3_118(m, d) m(4, 118, d)
+# define BOOST_PP_REPEAT_3_120(m, d) BOOST_PP_REPEAT_3_119(m, d) m(4, 119, d)
+# define BOOST_PP_REPEAT_3_121(m, d) BOOST_PP_REPEAT_3_120(m, d) m(4, 120, d)
+# define BOOST_PP_REPEAT_3_122(m, d) BOOST_PP_REPEAT_3_121(m, d) m(4, 121, d)
+# define BOOST_PP_REPEAT_3_123(m, d) BOOST_PP_REPEAT_3_122(m, d) m(4, 122, d)
+# define BOOST_PP_REPEAT_3_124(m, d) BOOST_PP_REPEAT_3_123(m, d) m(4, 123, d)
+# define BOOST_PP_REPEAT_3_125(m, d) BOOST_PP_REPEAT_3_124(m, d) m(4, 124, d)
+# define BOOST_PP_REPEAT_3_126(m, d) BOOST_PP_REPEAT_3_125(m, d) m(4, 125, d)
+# define BOOST_PP_REPEAT_3_127(m, d) BOOST_PP_REPEAT_3_126(m, d) m(4, 126, d)
+# define BOOST_PP_REPEAT_3_128(m, d) BOOST_PP_REPEAT_3_127(m, d) m(4, 127, d)
+# define BOOST_PP_REPEAT_3_129(m, d) BOOST_PP_REPEAT_3_128(m, d) m(4, 128, d)
+# define BOOST_PP_REPEAT_3_130(m, d) BOOST_PP_REPEAT_3_129(m, d) m(4, 129, d)
+# define BOOST_PP_REPEAT_3_131(m, d) BOOST_PP_REPEAT_3_130(m, d) m(4, 130, d)
+# define BOOST_PP_REPEAT_3_132(m, d) BOOST_PP_REPEAT_3_131(m, d) m(4, 131, d)
+# define BOOST_PP_REPEAT_3_133(m, d) BOOST_PP_REPEAT_3_132(m, d) m(4, 132, d)
+# define BOOST_PP_REPEAT_3_134(m, d) BOOST_PP_REPEAT_3_133(m, d) m(4, 133, d)
+# define BOOST_PP_REPEAT_3_135(m, d) BOOST_PP_REPEAT_3_134(m, d) m(4, 134, d)
+# define BOOST_PP_REPEAT_3_136(m, d) BOOST_PP_REPEAT_3_135(m, d) m(4, 135, d)
+# define BOOST_PP_REPEAT_3_137(m, d) BOOST_PP_REPEAT_3_136(m, d) m(4, 136, d)
+# define BOOST_PP_REPEAT_3_138(m, d) BOOST_PP_REPEAT_3_137(m, d) m(4, 137, d)
+# define BOOST_PP_REPEAT_3_139(m, d) BOOST_PP_REPEAT_3_138(m, d) m(4, 138, d)
+# define BOOST_PP_REPEAT_3_140(m, d) BOOST_PP_REPEAT_3_139(m, d) m(4, 139, d)
+# define BOOST_PP_REPEAT_3_141(m, d) BOOST_PP_REPEAT_3_140(m, d) m(4, 140, d)
+# define BOOST_PP_REPEAT_3_142(m, d) BOOST_PP_REPEAT_3_141(m, d) m(4, 141, d)
+# define BOOST_PP_REPEAT_3_143(m, d) BOOST_PP_REPEAT_3_142(m, d) m(4, 142, d)
+# define BOOST_PP_REPEAT_3_144(m, d) BOOST_PP_REPEAT_3_143(m, d) m(4, 143, d)
+# define BOOST_PP_REPEAT_3_145(m, d) BOOST_PP_REPEAT_3_144(m, d) m(4, 144, d)
+# define BOOST_PP_REPEAT_3_146(m, d) BOOST_PP_REPEAT_3_145(m, d) m(4, 145, d)
+# define BOOST_PP_REPEAT_3_147(m, d) BOOST_PP_REPEAT_3_146(m, d) m(4, 146, d)
+# define BOOST_PP_REPEAT_3_148(m, d) BOOST_PP_REPEAT_3_147(m, d) m(4, 147, d)
+# define BOOST_PP_REPEAT_3_149(m, d) BOOST_PP_REPEAT_3_148(m, d) m(4, 148, d)
+# define BOOST_PP_REPEAT_3_150(m, d) BOOST_PP_REPEAT_3_149(m, d) m(4, 149, d)
+# define BOOST_PP_REPEAT_3_151(m, d) BOOST_PP_REPEAT_3_150(m, d) m(4, 150, d)
+# define BOOST_PP_REPEAT_3_152(m, d) BOOST_PP_REPEAT_3_151(m, d) m(4, 151, d)
+# define BOOST_PP_REPEAT_3_153(m, d) BOOST_PP_REPEAT_3_152(m, d) m(4, 152, d)
+# define BOOST_PP_REPEAT_3_154(m, d) BOOST_PP_REPEAT_3_153(m, d) m(4, 153, d)
+# define BOOST_PP_REPEAT_3_155(m, d) BOOST_PP_REPEAT_3_154(m, d) m(4, 154, d)
+# define BOOST_PP_REPEAT_3_156(m, d) BOOST_PP_REPEAT_3_155(m, d) m(4, 155, d)
+# define BOOST_PP_REPEAT_3_157(m, d) BOOST_PP_REPEAT_3_156(m, d) m(4, 156, d)
+# define BOOST_PP_REPEAT_3_158(m, d) BOOST_PP_REPEAT_3_157(m, d) m(4, 157, d)
+# define BOOST_PP_REPEAT_3_159(m, d) BOOST_PP_REPEAT_3_158(m, d) m(4, 158, d)
+# define BOOST_PP_REPEAT_3_160(m, d) BOOST_PP_REPEAT_3_159(m, d) m(4, 159, d)
+# define BOOST_PP_REPEAT_3_161(m, d) BOOST_PP_REPEAT_3_160(m, d) m(4, 160, d)
+# define BOOST_PP_REPEAT_3_162(m, d) BOOST_PP_REPEAT_3_161(m, d) m(4, 161, d)
+# define BOOST_PP_REPEAT_3_163(m, d) BOOST_PP_REPEAT_3_162(m, d) m(4, 162, d)
+# define BOOST_PP_REPEAT_3_164(m, d) BOOST_PP_REPEAT_3_163(m, d) m(4, 163, d)
+# define BOOST_PP_REPEAT_3_165(m, d) BOOST_PP_REPEAT_3_164(m, d) m(4, 164, d)
+# define BOOST_PP_REPEAT_3_166(m, d) BOOST_PP_REPEAT_3_165(m, d) m(4, 165, d)
+# define BOOST_PP_REPEAT_3_167(m, d) BOOST_PP_REPEAT_3_166(m, d) m(4, 166, d)
+# define BOOST_PP_REPEAT_3_168(m, d) BOOST_PP_REPEAT_3_167(m, d) m(4, 167, d)
+# define BOOST_PP_REPEAT_3_169(m, d) BOOST_PP_REPEAT_3_168(m, d) m(4, 168, d)
+# define BOOST_PP_REPEAT_3_170(m, d) BOOST_PP_REPEAT_3_169(m, d) m(4, 169, d)
+# define BOOST_PP_REPEAT_3_171(m, d) BOOST_PP_REPEAT_3_170(m, d) m(4, 170, d)
+# define BOOST_PP_REPEAT_3_172(m, d) BOOST_PP_REPEAT_3_171(m, d) m(4, 171, d)
+# define BOOST_PP_REPEAT_3_173(m, d) BOOST_PP_REPEAT_3_172(m, d) m(4, 172, d)
+# define BOOST_PP_REPEAT_3_174(m, d) BOOST_PP_REPEAT_3_173(m, d) m(4, 173, d)
+# define BOOST_PP_REPEAT_3_175(m, d) BOOST_PP_REPEAT_3_174(m, d) m(4, 174, d)
+# define BOOST_PP_REPEAT_3_176(m, d) BOOST_PP_REPEAT_3_175(m, d) m(4, 175, d)
+# define BOOST_PP_REPEAT_3_177(m, d) BOOST_PP_REPEAT_3_176(m, d) m(4, 176, d)
+# define BOOST_PP_REPEAT_3_178(m, d) BOOST_PP_REPEAT_3_177(m, d) m(4, 177, d)
+# define BOOST_PP_REPEAT_3_179(m, d) BOOST_PP_REPEAT_3_178(m, d) m(4, 178, d)
+# define BOOST_PP_REPEAT_3_180(m, d) BOOST_PP_REPEAT_3_179(m, d) m(4, 179, d)
+# define BOOST_PP_REPEAT_3_181(m, d) BOOST_PP_REPEAT_3_180(m, d) m(4, 180, d)
+# define BOOST_PP_REPEAT_3_182(m, d) BOOST_PP_REPEAT_3_181(m, d) m(4, 181, d)
+# define BOOST_PP_REPEAT_3_183(m, d) BOOST_PP_REPEAT_3_182(m, d) m(4, 182, d)
+# define BOOST_PP_REPEAT_3_184(m, d) BOOST_PP_REPEAT_3_183(m, d) m(4, 183, d)
+# define BOOST_PP_REPEAT_3_185(m, d) BOOST_PP_REPEAT_3_184(m, d) m(4, 184, d)
+# define BOOST_PP_REPEAT_3_186(m, d) BOOST_PP_REPEAT_3_185(m, d) m(4, 185, d)
+# define BOOST_PP_REPEAT_3_187(m, d) BOOST_PP_REPEAT_3_186(m, d) m(4, 186, d)
+# define BOOST_PP_REPEAT_3_188(m, d) BOOST_PP_REPEAT_3_187(m, d) m(4, 187, d)
+# define BOOST_PP_REPEAT_3_189(m, d) BOOST_PP_REPEAT_3_188(m, d) m(4, 188, d)
+# define BOOST_PP_REPEAT_3_190(m, d) BOOST_PP_REPEAT_3_189(m, d) m(4, 189, d)
+# define BOOST_PP_REPEAT_3_191(m, d) BOOST_PP_REPEAT_3_190(m, d) m(4, 190, d)
+# define BOOST_PP_REPEAT_3_192(m, d) BOOST_PP_REPEAT_3_191(m, d) m(4, 191, d)
+# define BOOST_PP_REPEAT_3_193(m, d) BOOST_PP_REPEAT_3_192(m, d) m(4, 192, d)
+# define BOOST_PP_REPEAT_3_194(m, d) BOOST_PP_REPEAT_3_193(m, d) m(4, 193, d)
+# define BOOST_PP_REPEAT_3_195(m, d) BOOST_PP_REPEAT_3_194(m, d) m(4, 194, d)
+# define BOOST_PP_REPEAT_3_196(m, d) BOOST_PP_REPEAT_3_195(m, d) m(4, 195, d)
+# define BOOST_PP_REPEAT_3_197(m, d) BOOST_PP_REPEAT_3_196(m, d) m(4, 196, d)
+# define BOOST_PP_REPEAT_3_198(m, d) BOOST_PP_REPEAT_3_197(m, d) m(4, 197, d)
+# define BOOST_PP_REPEAT_3_199(m, d) BOOST_PP_REPEAT_3_198(m, d) m(4, 198, d)
+# define BOOST_PP_REPEAT_3_200(m, d) BOOST_PP_REPEAT_3_199(m, d) m(4, 199, d)
+# define BOOST_PP_REPEAT_3_201(m, d) BOOST_PP_REPEAT_3_200(m, d) m(4, 200, d)
+# define BOOST_PP_REPEAT_3_202(m, d) BOOST_PP_REPEAT_3_201(m, d) m(4, 201, d)
+# define BOOST_PP_REPEAT_3_203(m, d) BOOST_PP_REPEAT_3_202(m, d) m(4, 202, d)
+# define BOOST_PP_REPEAT_3_204(m, d) BOOST_PP_REPEAT_3_203(m, d) m(4, 203, d)
+# define BOOST_PP_REPEAT_3_205(m, d) BOOST_PP_REPEAT_3_204(m, d) m(4, 204, d)
+# define BOOST_PP_REPEAT_3_206(m, d) BOOST_PP_REPEAT_3_205(m, d) m(4, 205, d)
+# define BOOST_PP_REPEAT_3_207(m, d) BOOST_PP_REPEAT_3_206(m, d) m(4, 206, d)
+# define BOOST_PP_REPEAT_3_208(m, d) BOOST_PP_REPEAT_3_207(m, d) m(4, 207, d)
+# define BOOST_PP_REPEAT_3_209(m, d) BOOST_PP_REPEAT_3_208(m, d) m(4, 208, d)
+# define BOOST_PP_REPEAT_3_210(m, d) BOOST_PP_REPEAT_3_209(m, d) m(4, 209, d)
+# define BOOST_PP_REPEAT_3_211(m, d) BOOST_PP_REPEAT_3_210(m, d) m(4, 210, d)
+# define BOOST_PP_REPEAT_3_212(m, d) BOOST_PP_REPEAT_3_211(m, d) m(4, 211, d)
+# define BOOST_PP_REPEAT_3_213(m, d) BOOST_PP_REPEAT_3_212(m, d) m(4, 212, d)
+# define BOOST_PP_REPEAT_3_214(m, d) BOOST_PP_REPEAT_3_213(m, d) m(4, 213, d)
+# define BOOST_PP_REPEAT_3_215(m, d) BOOST_PP_REPEAT_3_214(m, d) m(4, 214, d)
+# define BOOST_PP_REPEAT_3_216(m, d) BOOST_PP_REPEAT_3_215(m, d) m(4, 215, d)
+# define BOOST_PP_REPEAT_3_217(m, d) BOOST_PP_REPEAT_3_216(m, d) m(4, 216, d)
+# define BOOST_PP_REPEAT_3_218(m, d) BOOST_PP_REPEAT_3_217(m, d) m(4, 217, d)
+# define BOOST_PP_REPEAT_3_219(m, d) BOOST_PP_REPEAT_3_218(m, d) m(4, 218, d)
+# define BOOST_PP_REPEAT_3_220(m, d) BOOST_PP_REPEAT_3_219(m, d) m(4, 219, d)
+# define BOOST_PP_REPEAT_3_221(m, d) BOOST_PP_REPEAT_3_220(m, d) m(4, 220, d)
+# define BOOST_PP_REPEAT_3_222(m, d) BOOST_PP_REPEAT_3_221(m, d) m(4, 221, d)
+# define BOOST_PP_REPEAT_3_223(m, d) BOOST_PP_REPEAT_3_222(m, d) m(4, 222, d)
+# define BOOST_PP_REPEAT_3_224(m, d) BOOST_PP_REPEAT_3_223(m, d) m(4, 223, d)
+# define BOOST_PP_REPEAT_3_225(m, d) BOOST_PP_REPEAT_3_224(m, d) m(4, 224, d)
+# define BOOST_PP_REPEAT_3_226(m, d) BOOST_PP_REPEAT_3_225(m, d) m(4, 225, d)
+# define BOOST_PP_REPEAT_3_227(m, d) BOOST_PP_REPEAT_3_226(m, d) m(4, 226, d)
+# define BOOST_PP_REPEAT_3_228(m, d) BOOST_PP_REPEAT_3_227(m, d) m(4, 227, d)
+# define BOOST_PP_REPEAT_3_229(m, d) BOOST_PP_REPEAT_3_228(m, d) m(4, 228, d)
+# define BOOST_PP_REPEAT_3_230(m, d) BOOST_PP_REPEAT_3_229(m, d) m(4, 229, d)
+# define BOOST_PP_REPEAT_3_231(m, d) BOOST_PP_REPEAT_3_230(m, d) m(4, 230, d)
+# define BOOST_PP_REPEAT_3_232(m, d) BOOST_PP_REPEAT_3_231(m, d) m(4, 231, d)
+# define BOOST_PP_REPEAT_3_233(m, d) BOOST_PP_REPEAT_3_232(m, d) m(4, 232, d)
+# define BOOST_PP_REPEAT_3_234(m, d) BOOST_PP_REPEAT_3_233(m, d) m(4, 233, d)
+# define BOOST_PP_REPEAT_3_235(m, d) BOOST_PP_REPEAT_3_234(m, d) m(4, 234, d)
+# define BOOST_PP_REPEAT_3_236(m, d) BOOST_PP_REPEAT_3_235(m, d) m(4, 235, d)
+# define BOOST_PP_REPEAT_3_237(m, d) BOOST_PP_REPEAT_3_236(m, d) m(4, 236, d)
+# define BOOST_PP_REPEAT_3_238(m, d) BOOST_PP_REPEAT_3_237(m, d) m(4, 237, d)
+# define BOOST_PP_REPEAT_3_239(m, d) BOOST_PP_REPEAT_3_238(m, d) m(4, 238, d)
+# define BOOST_PP_REPEAT_3_240(m, d) BOOST_PP_REPEAT_3_239(m, d) m(4, 239, d)
+# define BOOST_PP_REPEAT_3_241(m, d) BOOST_PP_REPEAT_3_240(m, d) m(4, 240, d)
+# define BOOST_PP_REPEAT_3_242(m, d) BOOST_PP_REPEAT_3_241(m, d) m(4, 241, d)
+# define BOOST_PP_REPEAT_3_243(m, d) BOOST_PP_REPEAT_3_242(m, d) m(4, 242, d)
+# define BOOST_PP_REPEAT_3_244(m, d) BOOST_PP_REPEAT_3_243(m, d) m(4, 243, d)
+# define BOOST_PP_REPEAT_3_245(m, d) BOOST_PP_REPEAT_3_244(m, d) m(4, 244, d)
+# define BOOST_PP_REPEAT_3_246(m, d) BOOST_PP_REPEAT_3_245(m, d) m(4, 245, d)
+# define BOOST_PP_REPEAT_3_247(m, d) BOOST_PP_REPEAT_3_246(m, d) m(4, 246, d)
+# define BOOST_PP_REPEAT_3_248(m, d) BOOST_PP_REPEAT_3_247(m, d) m(4, 247, d)
+# define BOOST_PP_REPEAT_3_249(m, d) BOOST_PP_REPEAT_3_248(m, d) m(4, 248, d)
+# define BOOST_PP_REPEAT_3_250(m, d) BOOST_PP_REPEAT_3_249(m, d) m(4, 249, d)
+# define BOOST_PP_REPEAT_3_251(m, d) BOOST_PP_REPEAT_3_250(m, d) m(4, 250, d)
+# define BOOST_PP_REPEAT_3_252(m, d) BOOST_PP_REPEAT_3_251(m, d) m(4, 251, d)
+# define BOOST_PP_REPEAT_3_253(m, d) BOOST_PP_REPEAT_3_252(m, d) m(4, 252, d)
+# define BOOST_PP_REPEAT_3_254(m, d) BOOST_PP_REPEAT_3_253(m, d) m(4, 253, d)
+# define BOOST_PP_REPEAT_3_255(m, d) BOOST_PP_REPEAT_3_254(m, d) m(4, 254, d)
+# define BOOST_PP_REPEAT_3_256(m, d) BOOST_PP_REPEAT_3_255(m, d) m(4, 255, d)
+#
+# endif
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_SLOT_DETAIL_DEF_HPP
+# define BOOST_PREPROCESSOR_SLOT_DETAIL_DEF_HPP
+#
+# /* BOOST_PP_SLOT_OFFSET_x */
+#
+# define BOOST_PP_SLOT_OFFSET_10(x) (x) % 1000000000UL
+# define BOOST_PP_SLOT_OFFSET_9(x) BOOST_PP_SLOT_OFFSET_10(x) % 100000000UL
+# define BOOST_PP_SLOT_OFFSET_8(x) BOOST_PP_SLOT_OFFSET_9(x) % 10000000UL
+# define BOOST_PP_SLOT_OFFSET_7(x) BOOST_PP_SLOT_OFFSET_8(x) % 1000000UL
+# define BOOST_PP_SLOT_OFFSET_6(x) BOOST_PP_SLOT_OFFSET_7(x) % 100000UL
+# define BOOST_PP_SLOT_OFFSET_5(x) BOOST_PP_SLOT_OFFSET_6(x) % 10000UL
+# define BOOST_PP_SLOT_OFFSET_4(x) BOOST_PP_SLOT_OFFSET_5(x) % 1000UL
+# define BOOST_PP_SLOT_OFFSET_3(x) BOOST_PP_SLOT_OFFSET_4(x) % 100UL
+# define BOOST_PP_SLOT_OFFSET_2(x) BOOST_PP_SLOT_OFFSET_3(x) % 10UL
+#
+# /* BOOST_PP_SLOT_CC_x */
+#
+# define BOOST_PP_SLOT_CC_2(a, b) BOOST_PP_SLOT_CC_2_D(a, b)
+# define BOOST_PP_SLOT_CC_3(a, b, c) BOOST_PP_SLOT_CC_3_D(a, b, c)
+# define BOOST_PP_SLOT_CC_4(a, b, c, d) BOOST_PP_SLOT_CC_4_D(a, b, c, d)
+# define BOOST_PP_SLOT_CC_5(a, b, c, d, e) BOOST_PP_SLOT_CC_5_D(a, b, c, d, e)
+# define BOOST_PP_SLOT_CC_6(a, b, c, d, e, f) BOOST_PP_SLOT_CC_6_D(a, b, c, d, e, f)
+# define BOOST_PP_SLOT_CC_7(a, b, c, d, e, f, g) BOOST_PP_SLOT_CC_7_D(a, b, c, d, e, f, g)
+# define BOOST_PP_SLOT_CC_8(a, b, c, d, e, f, g, h) BOOST_PP_SLOT_CC_8_D(a, b, c, d, e, f, g, h)
+# define BOOST_PP_SLOT_CC_9(a, b, c, d, e, f, g, h, i) BOOST_PP_SLOT_CC_9_D(a, b, c, d, e, f, g, h, i)
+# define BOOST_PP_SLOT_CC_10(a, b, c, d, e, f, g, h, i, j) BOOST_PP_SLOT_CC_10_D(a, b, c, d, e, f, g, h, i, j)
+#
+# define BOOST_PP_SLOT_CC_2_D(a, b) a ## b
+# define BOOST_PP_SLOT_CC_3_D(a, b, c) a ## b ## c
+# define BOOST_PP_SLOT_CC_4_D(a, b, c, d) a ## b ## c ## d
+# define BOOST_PP_SLOT_CC_5_D(a, b, c, d, e) a ## b ## c ## d ## e
+# define BOOST_PP_SLOT_CC_6_D(a, b, c, d, e, f) a ## b ## c ## d ## e ## f
+# define BOOST_PP_SLOT_CC_7_D(a, b, c, d, e, f, g) a ## b ## c ## d ## e ## f ## g
+# define BOOST_PP_SLOT_CC_8_D(a, b, c, d, e, f, g, h) a ## b ## c ## d ## e ## f ## g ## h
+# define BOOST_PP_SLOT_CC_9_D(a, b, c, d, e, f, g, h, i) a ## b ## c ## d ## e ## f ## g ## h ## i
+# define BOOST_PP_SLOT_CC_10_D(a, b, c, d, e, f, g, h, i, j) a ## b ## c ## d ## e ## f ## g ## h ## i ## j
+#
+# endif
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PP_VALUE
+# error BOOST_PP_ERROR: BOOST_PP_VALUE is not defined
+# endif
+#
+# undef BOOST_PP_SLOT_TEMP_1
+# undef BOOST_PP_SLOT_TEMP_2
+# undef BOOST_PP_SLOT_TEMP_3
+# undef BOOST_PP_SLOT_TEMP_4
+# undef BOOST_PP_SLOT_TEMP_5
+# undef BOOST_PP_SLOT_TEMP_6
+# undef BOOST_PP_SLOT_TEMP_7
+# undef BOOST_PP_SLOT_TEMP_8
+# undef BOOST_PP_SLOT_TEMP_9
+# undef BOOST_PP_SLOT_TEMP_10
+#
+# if (BOOST_PP_VALUE) / 1000000000UL == 0
+# define BOOST_PP_SLOT_TEMP_10 0
+# elif (BOOST_PP_VALUE) / 1000000000UL == 1
+# define BOOST_PP_SLOT_TEMP_10 1
+# elif (BOOST_PP_VALUE) / 1000000000UL == 2
+# define BOOST_PP_SLOT_TEMP_10 2
+# elif (BOOST_PP_VALUE) / 1000000000UL == 3
+# define BOOST_PP_SLOT_TEMP_10 3
+# elif (BOOST_PP_VALUE) / 1000000000UL == 4
+# define BOOST_PP_SLOT_TEMP_10 4
+# elif (BOOST_PP_VALUE) / 1000000000UL == 5
+# define BOOST_PP_SLOT_TEMP_10 5
+# elif (BOOST_PP_VALUE) / 1000000000UL == 6
+# define BOOST_PP_SLOT_TEMP_10 6
+# elif (BOOST_PP_VALUE) / 1000000000UL == 7
+# define BOOST_PP_SLOT_TEMP_10 7
+# elif (BOOST_PP_VALUE) / 1000000000UL == 8
+# define BOOST_PP_SLOT_TEMP_10 8
+# elif (BOOST_PP_VALUE) / 1000000000UL == 9
+# define BOOST_PP_SLOT_TEMP_10 9
+# endif
+#
+# if BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 0
+# define BOOST_PP_SLOT_TEMP_9 0
+# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 1
+# define BOOST_PP_SLOT_TEMP_9 1
+# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 2
+# define BOOST_PP_SLOT_TEMP_9 2
+# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 3
+# define BOOST_PP_SLOT_TEMP_9 3
+# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 4
+# define BOOST_PP_SLOT_TEMP_9 4
+# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 5
+# define BOOST_PP_SLOT_TEMP_9 5
+# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 6
+# define BOOST_PP_SLOT_TEMP_9 6
+# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 7
+# define BOOST_PP_SLOT_TEMP_9 7
+# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 8
+# define BOOST_PP_SLOT_TEMP_9 8
+# elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 9
+# define BOOST_PP_SLOT_TEMP_9 9
+# endif
+#
+# if BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 0
+# define BOOST_PP_SLOT_TEMP_8 0
+# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 1
+# define BOOST_PP_SLOT_TEMP_8 1
+# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 2
+# define BOOST_PP_SLOT_TEMP_8 2
+# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 3
+# define BOOST_PP_SLOT_TEMP_8 3
+# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 4
+# define BOOST_PP_SLOT_TEMP_8 4
+# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 5
+# define BOOST_PP_SLOT_TEMP_8 5
+# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 6
+# define BOOST_PP_SLOT_TEMP_8 6
+# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 7
+# define BOOST_PP_SLOT_TEMP_8 7
+# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 8
+# define BOOST_PP_SLOT_TEMP_8 8
+# elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 9
+# define BOOST_PP_SLOT_TEMP_8 9
+# endif
+#
+# if BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 0
+# define BOOST_PP_SLOT_TEMP_7 0
+# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 1
+# define BOOST_PP_SLOT_TEMP_7 1
+# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 2
+# define BOOST_PP_SLOT_TEMP_7 2
+# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 3
+# define BOOST_PP_SLOT_TEMP_7 3
+# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 4
+# define BOOST_PP_SLOT_TEMP_7 4
+# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 5
+# define BOOST_PP_SLOT_TEMP_7 5
+# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 6
+# define BOOST_PP_SLOT_TEMP_7 6
+# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 7
+# define BOOST_PP_SLOT_TEMP_7 7
+# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 8
+# define BOOST_PP_SLOT_TEMP_7 8
+# elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 9
+# define BOOST_PP_SLOT_TEMP_7 9
+# endif
+#
+# if BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 0
+# define BOOST_PP_SLOT_TEMP_6 0
+# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 1
+# define BOOST_PP_SLOT_TEMP_6 1
+# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 2
+# define BOOST_PP_SLOT_TEMP_6 2
+# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 3
+# define BOOST_PP_SLOT_TEMP_6 3
+# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 4
+# define BOOST_PP_SLOT_TEMP_6 4
+# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 5
+# define BOOST_PP_SLOT_TEMP_6 5
+# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 6
+# define BOOST_PP_SLOT_TEMP_6 6
+# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 7
+# define BOOST_PP_SLOT_TEMP_6 7
+# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 8
+# define BOOST_PP_SLOT_TEMP_6 8
+# elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 9
+# define BOOST_PP_SLOT_TEMP_6 9
+# endif
+#
+# if BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 0
+# define BOOST_PP_SLOT_TEMP_5 0
+# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 1
+# define BOOST_PP_SLOT_TEMP_5 1
+# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 2
+# define BOOST_PP_SLOT_TEMP_5 2
+# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 3
+# define BOOST_PP_SLOT_TEMP_5 3
+# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 4
+# define BOOST_PP_SLOT_TEMP_5 4
+# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 5
+# define BOOST_PP_SLOT_TEMP_5 5
+# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 6
+# define BOOST_PP_SLOT_TEMP_5 6
+# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 7
+# define BOOST_PP_SLOT_TEMP_5 7
+# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 8
+# define BOOST_PP_SLOT_TEMP_5 8
+# elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 9
+# define BOOST_PP_SLOT_TEMP_5 9
+# endif
+#
+# if BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 0
+# define BOOST_PP_SLOT_TEMP_4 0
+# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 1
+# define BOOST_PP_SLOT_TEMP_4 1
+# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 2
+# define BOOST_PP_SLOT_TEMP_4 2
+# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 3
+# define BOOST_PP_SLOT_TEMP_4 3
+# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 4
+# define BOOST_PP_SLOT_TEMP_4 4
+# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 5
+# define BOOST_PP_SLOT_TEMP_4 5
+# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 6
+# define BOOST_PP_SLOT_TEMP_4 6
+# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 7
+# define BOOST_PP_SLOT_TEMP_4 7
+# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 8
+# define BOOST_PP_SLOT_TEMP_4 8
+# elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 9
+# define BOOST_PP_SLOT_TEMP_4 9
+# endif
+#
+# if BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 0
+# define BOOST_PP_SLOT_TEMP_3 0
+# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 1
+# define BOOST_PP_SLOT_TEMP_3 1
+# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 2
+# define BOOST_PP_SLOT_TEMP_3 2
+# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 3
+# define BOOST_PP_SLOT_TEMP_3 3
+# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 4
+# define BOOST_PP_SLOT_TEMP_3 4
+# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 5
+# define BOOST_PP_SLOT_TEMP_3 5
+# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 6
+# define BOOST_PP_SLOT_TEMP_3 6
+# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 7
+# define BOOST_PP_SLOT_TEMP_3 7
+# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 8
+# define BOOST_PP_SLOT_TEMP_3 8
+# elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 9
+# define BOOST_PP_SLOT_TEMP_3 9
+# endif
+#
+# if BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 0
+# define BOOST_PP_SLOT_TEMP_2 0
+# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 1
+# define BOOST_PP_SLOT_TEMP_2 1
+# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 2
+# define BOOST_PP_SLOT_TEMP_2 2
+# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 3
+# define BOOST_PP_SLOT_TEMP_2 3
+# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 4
+# define BOOST_PP_SLOT_TEMP_2 4
+# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 5
+# define BOOST_PP_SLOT_TEMP_2 5
+# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 6
+# define BOOST_PP_SLOT_TEMP_2 6
+# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 7
+# define BOOST_PP_SLOT_TEMP_2 7
+# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 8
+# define BOOST_PP_SLOT_TEMP_2 8
+# elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 9
+# define BOOST_PP_SLOT_TEMP_2 9
+# endif
+#
+# if BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 0
+# define BOOST_PP_SLOT_TEMP_1 0
+# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 1
+# define BOOST_PP_SLOT_TEMP_1 1
+# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 2
+# define BOOST_PP_SLOT_TEMP_1 2
+# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 3
+# define BOOST_PP_SLOT_TEMP_1 3
+# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 4
+# define BOOST_PP_SLOT_TEMP_1 4
+# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 5
+# define BOOST_PP_SLOT_TEMP_1 5
+# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 6
+# define BOOST_PP_SLOT_TEMP_1 6
+# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 7
+# define BOOST_PP_SLOT_TEMP_1 7
+# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 8
+# define BOOST_PP_SLOT_TEMP_1 8
+# elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 9
+# define BOOST_PP_SLOT_TEMP_1 9
+# endif
+#
+# undef BOOST_PP_VALUE
--- /dev/null
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002. Permission to copy, use, *
+# * modify, sell, and distribute this software is granted provided *
+# * this copyright notice appears in all copies. This software is *
+# * provided "as is" without express or implied warranty, and with *
+# * no claim at to its suitability for any purpose. *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_SLOT_SLOT_HPP
+# define BOOST_PREPROCESSOR_SLOT_SLOT_HPP
+#
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/slot/detail/def.hpp>
+#
+# /* BOOST_PP_ASSIGN_SLOT */
+#
+# define BOOST_PP_ASSIGN_SLOT(i) BOOST_PP_CAT(BOOST_PP_ASSIGN_SLOT_, i)
+#
+# define BOOST_PP_ASSIGN_SLOT_1 <boost/preprocessor/slot/detail/slot1.hpp>
+# define BOOST_PP_ASSIGN_SLOT_2 <boost/preprocessor/slot/detail/slot2.hpp>
+# define BOOST_PP_ASSIGN_SLOT_3 <boost/preprocessor/slot/detail/slot3.hpp>
+# define BOOST_PP_ASSIGN_SLOT_4 <boost/preprocessor/slot/detail/slot4.hpp>
+# define BOOST_PP_ASSIGN_SLOT_5 <boost/preprocessor/slot/detail/slot5.hpp>
+#
+# /* BOOST_PP_SLOT */
+#
+# define BOOST_PP_SLOT(i) BOOST_PP_CAT(BOOST_PP_SLOT_, i)()
+#
+# endif
# include <boost/preprocessor/tuple/rem.hpp>
# include <boost/preprocessor/tuple/reverse.hpp>
# include <boost/preprocessor/tuple/to_list.hpp>
+# include <boost/preprocessor/tuple/to_seq.hpp>
#
# endif
#
# include <boost/preprocessor/config/config.hpp>
#
+# /* BOOST_PP_TUPLE_REM */
+#
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
# define BOOST_PP_TUPLE_REM(size) BOOST_PP_TUPLE_REM_I(size)
# else
# define BOOST_PP_TUPLE_REM_24(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x
# define BOOST_PP_TUPLE_REM_25(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y
#
+# /* BOOST_PP_TUPLE_REM_CTOR */
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
+# define BOOST_PP_TUPLE_REM_CTOR(size, tuple) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_TUPLE_REM(size), tuple)
+# else
+# define BOOST_PP_TUPLE_REM_CTOR(size, tuple) BOOST_PP_TUPLE_REM_CTOR_D(size, tuple)
+# define BOOST_PP_TUPLE_REM_CTOR_D(size, tuple) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_TUPLE_REM(size), tuple)
+# endif
+#
+# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
+# define BOOST_PP_TUPLE_REM_CTOR_I(ext, tuple) ext tuple
+# else
+# define BOOST_PP_TUPLE_REM_CTOR_I(ext, tuple) BOOST_PP_TUPLE_REM_CTOR_OO((ext, tuple))
+# define BOOST_PP_TUPLE_REM_CTOR_OO(par) BOOST_PP_TUPLE_REM_CTOR_II ## par
+# define BOOST_PP_TUPLE_REM_CTOR_II(ext, tuple) ext ## tuple
+# endif
+#
# endif
#
# include <boost/preprocessor/config/config.hpp>
#
-# /* BOOST_PP_TUPLE_REVERSE */
+# /* BOOST_PP_TUPLE_TO_LIST */
#
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
# define BOOST_PP_TUPLE_TO_LIST(size, tuple) BOOST_PP_TUPLE_TO_LIST_I(size, tuple)
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
-// See http://www.boost.org for most recent version including documentation.
+// See http://www.boost.org/libs/timer for documentation.
// Revision History
// 1 Dec 01 Add leading progress display strings (suggested by Toon Knapen)
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
+// See http://www.boost.org/libs/property_map for documentation.
+
#ifndef BOOST_PROPERTY_MAP_HPP
#define BOOST_PROPERTY_MAP_HPP
#include <cassert>
-#include <iterator>
#include <boost/config.hpp>
#include <boost/pending/cstddef.hpp>
+#include <boost/detail/iterator.hpp>
#include <boost/concept_check.hpp>
#include <boost/concept_archetype.hpp>
template <class RAIter, class ID>
inline safe_iterator_property_map<
RAIter, ID,
- typename std::iterator_traits<RAIter>::value_type,
- typename std::iterator_traits<RAIter>::reference>
+ typename boost::detail::iterator_traits<RAIter>::value_type,
+ typename boost::detail::iterator_traits<RAIter>::reference>
make_safe_iterator_property_map(RAIter iter, std::size_t n, ID id) {
function_requires< RandomAccessIteratorConcept<RAIter> >();
typedef safe_iterator_property_map<
RAIter, ID,
- typename std::iterator_traits<RAIter>::value_type,
- typename std::iterator_traits<RAIter>::reference> PA;
+ typename boost::detail::iterator_traits<RAIter>::value_type,
+ typename boost::detail::iterator_traits<RAIter>::reference> PA;
return PA(iter, n, id);
}
#endif
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
+// See http://www.boost.org/libs/property_map for documentation.
+
#ifndef BOOST_PROPERTY_MAP_ITERATOR_HPP
#define BOOST_PROPERTY_MAP_ITERATOR_HPP
// in all copies. This software is provided "as is" without express or
// implied warranty, and with no claim as to its suitability for any purpose.
-// See http://www.boost.org for most recent version including documentation.
+// See http://www.boost.org/libs/rational for documentation.
// Credits:
// Thanks to the boost mailing list in general for useful comments.
// Nickolay Mladenov, for the implementation of operator+=
// Revision History
+// 28 Sep 02 Use _left versions of operators from operators.hpp
// 05 Jul 01 Recode gcd(), avoiding std::swap (Helmut Zeisel)
// 03 Mar 01 Workarounds for Intel C++ 5.0 (David Abrahams)
// 05 Feb 01 Update operator>> to tighten up input syntax
dividable < rational<IntType>,
addable2 < rational<IntType>, IntType,
subtractable2 < rational<IntType>, IntType,
+ subtractable2_left < rational<IntType>, IntType,
multipliable2 < rational<IntType>, IntType,
dividable2 < rational<IntType>, IntType,
+ dividable2_left < rational<IntType>, IntType,
incrementable < rational<IntType>,
decrementable < rational<IntType>
- > > > > > > > > > > > > > >
+ > > > > > > > > > > > > > > > >
{
typedef IntType int_type;
typedef typename boost::call_traits<IntType>::param_type param_type;
return operator/= (rational<IntType>(i));
}
-// Intel C++ seems to choke on this unless i is a reference parameter, matching
-// the reference parameter in the operator-() generated by subtractable
-template <typename IntType, typename T>
-inline rational<IntType>
-operator- (const T& i, const rational<IntType>& r)
-{
- IntType ii = i; // Must be able to implicitly convert T -> IntType
- return rational<IntType>(ii) -= r;
-}
-
-// Intel C++ seems to choke on this unless i is a reference parameter, matching
-// the reference parameter in the operator-() generated by subtractable
-template <typename IntType, typename T>
-inline rational<IntType>
-operator/ (const T& i, const rational<IntType>& r)
-{
- IntType ii = i; // Must be able to implicitly convert T -> IntType
- return rational<IntType>(ii) /= r;
-}
-
// Increment and decrement
template <typename IntType>
inline const rational<IntType>& rational<IntType>::operator++()
# include <boost/config.hpp>
# include <boost/utility/addressof.hpp>
+# include <boost/mpl/bool.hpp>
//
// ref.hpp - ref/cref, useful helper functions
# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template<typename T>
class is_reference_wrapper
+ : public mpl::false_
{
- public:
- BOOST_STATIC_CONSTANT(bool, value = false);
};
template<typename T>
class is_reference_wrapper<reference_wrapper<T> >
+ : public mpl::true_
{
- public:
- BOOST_STATIC_CONSTANT(bool, value = true);
};
template<typename T>
public:
BOOST_STATIC_CONSTANT(
bool, value = (
- sizeof(detail::is_reference_wrapper_test(type<T>()))
+ sizeof(detail::is_reference_wrapper_test(type<T>()))
== sizeof(detail::yes_reference_wrapper_t)));
+
+ typedef ::boost::mpl::bool_<value> type;
};
template <typename T>
*/
/*
- * LOCATION: see http://www.boost.org for most recent version.
+ * LOCATION: see http://www.boost.org/libs/regex for documentation.
* FILE regex.h
* VERSION 3.12
* DESCRIPTION: Declares POSIX API functions
*/
/*
- * LOCATION: see http://www.boost.org for most recent version.
+ * LOCATION: see http://www.boost.org/libs/regex for documentation.
* FILE regex.cpp
* VERSION see <boost/version.hpp>
* DESCRIPTION: Declares boost::reg_expression<> and associated
#ifndef BOOST_RE_REGEX_HPP
#define BOOST_RE_REGEX_HPP
-#include <boost/cregex.hpp>
-
-#ifdef __cplusplus
-
-// what follows is all C++ don't include in C builds!!
-
-#ifdef BOOST_REGEX_DEBUG
-# include <iosfwd>
-#endif
-
-#include <new>
-#include <boost/regex/config.hpp>
-#include <cstring>
-#include <boost/regex_fwd.hpp>
-#include <boost/regex/detail/regex_stack.hpp>
-#include <boost/regex/detail/regex_raw_buffer.hpp>
-#include <boost/regex/detail/regex_kmp.hpp>
-#include <boost/regex/pattern_except.hpp>
-#include <boost/regex/regex_traits.hpp>
-#include <boost/type_traits/cv_traits.hpp>
-#include <boost/scoped_array.hpp>
-
-
-namespace boost{
-
-#ifdef __BORLANDC__
- #pragma option push -a8 -b -Vx -Ve -pc -w-8027
-#endif
-
-namespace re_detail{
-
-struct re_set_long;
-struct re_syntax_base;
-
-} // namespace re_detail
-
-namespace deprecated{
-//
-// class char_regex_traits_i
-// provides case insensitive traits classes (deprecated):
-template <class charT>
-class char_regex_traits_i : public regex_traits<charT> {};
-
-template<>
-class char_regex_traits_i<char> : public regex_traits<char>
-{
-public:
- typedef char char_type;
- typedef unsigned char uchar_type;
- typedef unsigned int size_type;
- typedef regex_traits<char> base_type;
-
- char BOOST_REGEX_CALL translate(char c, bool)const
- {
- return static_cast<const regex_traits<char>*>(this)->translate(c, true);
- }
-};
-
-#ifndef BOOST_NO_WREGEX
-template<>
-class char_regex_traits_i<wchar_t> : public regex_traits<wchar_t>
-{
-public:
- typedef wchar_t char_type;
- typedef unsigned short uchar_type;
- typedef unsigned int size_type;
- typedef regex_traits<wchar_t> base_type;
-
- wchar_t BOOST_REGEX_CALL translate(wchar_t c, bool)const
- {
- return static_cast<const regex_traits<wchar_t>*>(this)->translate(c, true);
- }
- boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const wchar_t* first, const wchar_t* last)const
- {
- boost::uint_fast32_t result = static_cast<const regex_traits<wchar_t>*>(this)->lookup_classname(first, last);
- if((result & base_type::char_class_upper) == base_type::char_class_upper)
- result |= base_type::char_class_alpha;
- return result;
- }
-};
-#endif
-} // namespace deprecated
-
-
-namespace re_detail{
-
-enum mask_type
-{
- mask_take = 1,
- mask_skip = 2,
- mask_any = mask_skip | mask_take,
- mask_all = mask_any
-};
-
-struct _narrow_type{};
-struct _wide_type{};
-
-template <class charT>
-class is_byte;
-
-template<>
-class is_byte<char>
-{
-public:
- typedef _narrow_type width_type;
-};
-
-template<>
-class is_byte<unsigned char>
-{
-public:
- typedef _narrow_type width_type;
-};
-
-template<>
-class is_byte<signed char>
-{
-public:
- typedef _narrow_type width_type;
-};
-
-template <class charT>
-class is_byte
-{
-public:
- typedef _wide_type width_type;
-};
-
-
-//
-// compiled structures
-//
-// the following defs describe the format of the compiled string
-//
-
-//
-// enum syntax_element_type
-// describes the type of a record
-enum syntax_element_type
-{
- syntax_element_startmark = 0,
- syntax_element_endmark = syntax_element_startmark + 1,
- syntax_element_literal = syntax_element_endmark + 1,
- syntax_element_start_line = syntax_element_literal + 1,
- syntax_element_end_line = syntax_element_start_line + 1,
- syntax_element_wild = syntax_element_end_line + 1,
- syntax_element_match = syntax_element_wild + 1,
- syntax_element_word_boundary = syntax_element_match + 1,
- syntax_element_within_word = syntax_element_word_boundary + 1,
- syntax_element_word_start = syntax_element_within_word + 1,
- syntax_element_word_end = syntax_element_word_start + 1,
- syntax_element_buffer_start = syntax_element_word_end + 1,
- syntax_element_buffer_end = syntax_element_buffer_start + 1,
- syntax_element_backref = syntax_element_buffer_end + 1,
- syntax_element_long_set = syntax_element_backref + 1,
- syntax_element_set = syntax_element_long_set + 1,
- syntax_element_jump = syntax_element_set + 1,
- syntax_element_alt = syntax_element_jump + 1,
- syntax_element_rep = syntax_element_alt + 1,
- syntax_element_combining = syntax_element_rep + 1,
- syntax_element_soft_buffer_end = syntax_element_combining + 1,
- syntax_element_restart_continue = syntax_element_soft_buffer_end + 1
-};
-
-#ifdef BOOST_REGEX_DEBUG
-// dwa 09/26/00 - This is needed to suppress warnings about an ambiguous conversion
-std::ostream& operator<<(std::ostream&, syntax_element_type);
-#endif
-
-union offset_type
-{
- re_syntax_base* p;
- std::size_t i;
-};
-
-//
-// struct re_syntax_base
-// base class for all syntax types:
-struct re_syntax_base
-{
- syntax_element_type type;
- offset_type next;
- unsigned int can_be_null;
-};
-
-//
-// struct re_brace
-// marks start or end of (...)
-struct re_brace : public re_syntax_base
-{
- int index;
-};
-
-//
-// struct re_literal
-// marks a literal string and
-// is followed by an array of charT[length]:
-struct re_literal : public re_syntax_base
-{
- unsigned int length;
-};
-
-//
-// struct re_long_set
-// provides data for sets [...] containing
-// wide characters
-struct re_set_long : public re_syntax_base
-{
- unsigned int csingles, cranges, cequivalents;
- boost::uint_fast32_t cclasses;
- bool isnot;
-};
-
-//
-// struct re_set
-// provides a map of bools for sets containing
-// narrow, single byte characters.
-struct re_set : public re_syntax_base
-{
- unsigned char _map[256];
-};
-
-//
-// struct re_jump
-// provides alternative next destination
-struct re_jump : public re_syntax_base
-{
- offset_type alt;
- unsigned char _map[256];
-};
-
-//
-// struct re_repeat
-// provides repeat expressions
-struct re_repeat : public re_jump
-{
- unsigned min, max;
- int id;
- bool leading;
- bool greedy;
- bool singleton;
-};
-
-
-//
-// enum re_jump_size_type
-// provides compiled size of re_jump
-// allowing for trailing alignment
-// provide this so we know how many
-// bytes to insert
-enum re_jump_size_type
-{
- re_jump_size = (sizeof(re_jump) + padding_mask) & ~(padding_mask),
- re_repeater_size = (sizeof(re_repeat) + padding_mask) & ~(padding_mask)
-};
-
-} // namespace re_detail
-
-//
-// class basic_regex
-// handles error codes and flags
-
-class BOOST_REGEX_DECL regbase
-{
-public:
- enum flag_type_
- {
- escape_in_lists = 1, // '\' special inside [...]
- char_classes = escape_in_lists << 1, // [[:CLASS:]] allowed
- intervals = char_classes << 1, // {x,y} allowed
- limited_ops = intervals << 1, // all of + ? and | are normal characters
- newline_alt = limited_ops << 1, // \n is the same as |
- bk_plus_qm = newline_alt << 1, // uses \+ and \?
- bk_braces = bk_plus_qm << 1, // uses \{ and \}
- bk_parens = bk_braces << 1, // uses \( and \)
- bk_refs = bk_parens << 1, // \d allowed
- bk_vbar = bk_refs << 1, // uses \|
-
- use_except = bk_vbar << 1, // exception on error
- failbit = use_except << 1, // error flag
- literal = failbit << 1, // all characters are literals
- icase = literal << 1, // characters are matched regardless of case
- nocollate = icase << 1, // don't use locale specific collation
-
- basic = char_classes | intervals | limited_ops | bk_braces | bk_parens | bk_refs,
- extended = char_classes | intervals | bk_refs,
- normal = escape_in_lists | char_classes | intervals | bk_refs | nocollate,
- emacs = bk_braces | bk_parens | bk_refs | bk_vbar,
- awk = extended | escape_in_lists,
- grep = basic | newline_alt,
- egrep = extended | newline_alt,
- sed = basic,
- perl = normal
- };
- typedef unsigned int flag_type;
-
- enum restart_info
- {
- restart_any = 0,
- restart_word = 1,
- restart_line = 2,
- restart_buf = 3,
- restart_continue = 4,
- restart_lit = 5,
- restart_fixed_lit = 6
- };
-
- flag_type BOOST_REGEX_CALL flags()const
- {
- return _flags;
- }
-
- regbase();
- regbase(const regbase& b);
-protected:
- flag_type _flags;
-};
-
-//
-// some forward declarations:
-namespace re_detail{
-template <class iterator, class Allocator>
-class _priv_match_data;
-
-#if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-
-template <class T>
-struct regex_iterator_traits
-{
- typedef typename T::iterator_category iterator_category;
- typedef typename T::value_type value_type;
-#if !defined(BOOST_NO_STD_ITERATOR)
- typedef typename T::difference_type difference_type;
- typedef typename T::pointer pointer;
- typedef typename T::reference reference;
-#else
- typedef std::ptrdiff_t difference_type;
- typedef value_type* pointer;
- typedef value_type& reference;
-#endif
-};
-
-template <class T>
-struct pointer_iterator_traits
-{
- typedef std::ptrdiff_t difference_type;
- typedef T value_type;
- typedef T* pointer;
- typedef T& reference;
- typedef std::random_access_iterator_tag iterator_category;
-};
-template <class T>
-struct const_pointer_iterator_traits
-{
- typedef std::ptrdiff_t difference_type;
- typedef T value_type;
- typedef const T* pointer;
- typedef const T& reference;
- typedef std::random_access_iterator_tag iterator_category;
-};
-
-template<>
-struct regex_iterator_traits<char*> : pointer_iterator_traits<char>{};
-template<>
-struct regex_iterator_traits<const char*> : const_pointer_iterator_traits<char>{};
-template<>
-struct regex_iterator_traits<wchar_t*> : pointer_iterator_traits<wchar_t>{};
-template<>
-struct regex_iterator_traits<const wchar_t*> : const_pointer_iterator_traits<wchar_t>{};
-
-#if defined(__SGI_STL_PORT) && defined(__STL_DEBUG)
-template<>
-struct regex_iterator_traits<std::string::iterator> : pointer_iterator_traits<char>{};
-template<>
-struct regex_iterator_traits<std::string::const_iterator> : const_pointer_iterator_traits<char>{};
-#ifndef BOOST_NO_STD_WSTRING
-template<>
-struct regex_iterator_traits<std::wstring::iterator> : pointer_iterator_traits<wchar_t>{};
-template<>
-struct regex_iterator_traits<std::wstring::const_iterator> : const_pointer_iterator_traits<wchar_t>{};
-#endif // BOOST_NO_WSTRING
-#endif // stport
-
-#else
-
-template <class T>
-struct regex_iterator_traits : public std::iterator_traits<T> {};
-
-#endif
-
-template <class I>
-struct def_alloc_param_traits
-{
- typedef typename regex_iterator_traits<I>::value_type const_value_type;
- typedef typename remove_cv<const_value_type>::type type;
-};
-template <>
-struct def_alloc_param_traits<const char*>
-{
- typedef char type;
-};
-template <>
-struct def_alloc_param_traits<const wchar_t*>
-{
- typedef wchar_t type;
-};
-
-}
-
-template <class iterator, class Allocator =
-#if !(defined(BOOST_MSVC) && (BOOST_MSVC <= 1300))
-BOOST_DEFAULT_ALLOCATOR(typename re_detail::def_alloc_param_traits<iterator>::type) >
-#else
-BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<iterator>::type) >
-#endif
-class match_results;
-
-//
-// class reg_expression
-// represents the compiled
-// regular expression:
-//
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable : 4251 4231 4660)
-#endif
-
-#ifdef BOOST_REGEX_NO_FWD
-template <class charT, class traits = regex_traits<charT>, class Allocator = BOOST_DEFAULT_ALLOCATOR(charT) >
-#else
-template <class charT, class traits, class Allocator >
-#endif
-class reg_expression : public regbase
-{
-public:
- typedef typename traits::size_type traits_size_type;
- typedef typename traits::uchar_type traits_uchar_type;
- typedef typename traits::string_type traits_string_type;
- // typedefs:
- typedef charT char_type;
- typedef traits traits_type;
-
- // locale_type
- // placeholder for actual locale type used by the
- // traits class to localise *this.
- typedef typename traits::locale_type locale_type;
- // value_type
- typedef charT value_type;
- // reference, const_reference
- typedef charT& reference;
- typedef const charT& const_reference;
- // iterator, const_iterator
- typedef const charT* const_iterator;
- typedef const_iterator iterator;
- // difference_type
- typedef typename Allocator::difference_type difference_type;
- // size_type
- typedef typename Allocator::size_type size_type;
- // allocator_type
- typedef Allocator allocator_type;
- typedef Allocator alloc_type;
- // flag_type
- typedef regbase::flag_type flag_type;
-
-public:
- explicit reg_expression(const Allocator& a = Allocator());
- explicit reg_expression(const charT* p, flag_type f = regbase::normal, const Allocator& a = Allocator());
- reg_expression(const charT* p1, const charT* p2, flag_type f = regbase::normal, const Allocator& a = Allocator());
- reg_expression(const charT* p, size_type len, flag_type f, const Allocator& a = Allocator());
- reg_expression(const reg_expression&);
- ~reg_expression();
- reg_expression& BOOST_REGEX_CALL operator=(const reg_expression&);
- reg_expression& BOOST_REGEX_CALL operator=(const charT* ptr)
- {
- set_expression(ptr, regbase::normal | regbase::use_except);
- return *this;
- }
-
- //
- // assign:
- reg_expression& assign(const reg_expression& that)
- { return *this = that; }
- reg_expression& assign(const charT* ptr, flag_type f = regbase::normal)
- {
- set_expression(ptr, f | regbase::use_except);
- return *this;
- }
-
- reg_expression& assign(const charT* first,
- const charT* last,
- flag_type f = regbase::normal)
- {
- set_expression(first, last, f | regbase::use_except);
- return *this;
- }
-#if !defined(BOOST_NO_MEMBER_TEMPLATES) && !(defined(__IBMCPP__) && (__IBMCPP__ <= 502))
-
- template <class ST, class SA>
- unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regbase::normal)
- { return set_expression(p.data(), p.data() + p.size(), f); }
-
- template <class ST, class SA>
- explicit reg_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regbase::normal, const Allocator& a = Allocator())
- : data(a), pkmp(0), error_code_(REG_EMPTY), _expression(0) { set_expression(p, f | regbase::use_except); }
-
- template <class I>
- reg_expression(I first, I last, flag_type f = regbase::normal, const Allocator& al = Allocator())
- : data(al), pkmp(0), error_code_(REG_EMPTY), _expression(0)
- {
- size_type len = last-first;
- scoped_array<charT> a(new charT[len]);
- std::copy(first, last, a.get());
- set_expression(a.get(), a.get() + len, f | regbase::use_except);
- }
-
- template <class ST, class SA>
- reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT, ST, SA>& p)
- {
- set_expression(p.c_str(), p.c_str() + p.size(), regbase::normal | regbase::use_except);
- return *this;
- }
-
- template <class string_traits, class A>
- reg_expression& BOOST_REGEX_CALL assign(
- const std::basic_string<charT, string_traits, A>& s,
- flag_type f = regbase::normal)
- {
- set_expression(s.c_str(), s.c_str() + s.size(), f | regbase::use_except);
- return *this;
- }
-
- template <class fwd_iterator>
- reg_expression& BOOST_REGEX_CALL assign(fwd_iterator first,
- fwd_iterator last,
- flag_type f = regbase::normal)
- {
- size_type len = last-first;
- scoped_array<charT> a(new charT[len]);
- std::copy(first, last, a.get());
- set_expression(a.get(), a.get() + len, f | regbase::use_except);
- return *this;
- }
-#else
- unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT>& p, flag_type f = regbase::normal)
- { return set_expression(p.data(), p.data() + p.size(), f | regbase::use_except); }
-
- reg_expression(const std::basic_string<charT>& p, flag_type f = regbase::normal, const Allocator& a = Allocator())
- : data(a), pkmp(0) { set_expression(p, f | regbase::use_except); }
-
- reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p)
- {
- set_expression(p.c_str(), p.c_str() + p.size(), regbase::normal | regbase::use_except);
- return *this;
- }
-
- reg_expression& BOOST_REGEX_CALL assign(
- const std::basic_string<charT>& s,
- flag_type f = regbase::normal)
- {
- set_expression(s.c_str(), s.c_str() + s.size(), f | regbase::use_except);
- return *this;
- }
-
-#endif
-
-
- //
- // allocator access:
- Allocator BOOST_REGEX_CALL get_allocator()const;
- //
- // locale:
- locale_type BOOST_REGEX_CALL imbue(locale_type l){ return traits_inst.imbue(l); }
- locale_type BOOST_REGEX_CALL getloc()const{ return traits_inst.getloc(); }
- //
- // flags:
- flag_type BOOST_REGEX_CALL getflags()const
- { return flags(); }
- //
- // str:
- std::basic_string<charT> BOOST_REGEX_CALL str()const
- {
- std::basic_string<charT> result;
- if(this->error_code() == 0)
- result = std::basic_string<charT>(_expression, _expression_len);
- return result;
- }
- //
- // begin, end:
- const_iterator BOOST_REGEX_CALL begin()const
- { return (this->error_code() ? 0 : _expression); }
- const_iterator BOOST_REGEX_CALL end()const
- { return (this->error_code() ? 0 : _expression + _expression_len); }
- //
- // swap:
- void BOOST_REGEX_CALL swap(reg_expression&)throw();
- //
- // size:
- size_type BOOST_REGEX_CALL size()const
- { return (this->error_code() ? 0 : _expression_len); }
- //
- // max_size:
- size_type BOOST_REGEX_CALL max_size()const
- { return UINT_MAX; }
- //
- // empty:
- bool BOOST_REGEX_CALL empty()const
- { return 0 != this->error_code(); }
-
- unsigned BOOST_REGEX_CALL mark_count()const { return (this->error_code() ? 0 : marks); }
- bool BOOST_REGEX_CALL operator==(const reg_expression&)const;
- bool BOOST_REGEX_CALL operator<(const reg_expression&)const;
- //
- // The following are deprecated as public interfaces
- // but are available for compatibility with earlier versions.
- allocator_type BOOST_REGEX_CALL allocator()const;
- const charT* BOOST_REGEX_CALL expression()const { return (this->error_code() ? 0 : _expression); }
- unsigned int BOOST_REGEX_CALL set_expression(const charT* p, const charT* end, flag_type f = regbase::normal);
- unsigned int BOOST_REGEX_CALL set_expression(const charT* p, flag_type f = regbase::normal) { return set_expression(p, p + traits_type::length(p), f); }
- //
- // this should be private but template friends don't work:
- const traits_type& get_traits()const { return traits_inst; }
- unsigned int BOOST_REGEX_CALL error_code()const
- {
- return error_code_;
- }
-
-private:
- traits_type traits_inst;
- re_detail::raw_storage<Allocator> data;
- unsigned _restart_type;
- unsigned marks;
- int repeats;
- unsigned char* startmap;
- std::size_t _expression_len;
- std::size_t _leading_len;
- const charT* _leading_string;
- std::size_t _leading_string_len;
- re_detail::kmp_info<charT>* pkmp;
- unsigned error_code_;
- charT* _expression;
-
- void BOOST_REGEX_CALL compile_maps();
- void BOOST_REGEX_CALL compile_map(re_detail::re_syntax_base* node, unsigned char* _map, unsigned int* pnull, unsigned char mask, re_detail::re_syntax_base* terminal = 0)const;
- bool BOOST_REGEX_CALL probe_start(re_detail::re_syntax_base* node, charT c, re_detail::re_syntax_base* terminal)const;
- bool BOOST_REGEX_CALL probe_start_null(re_detail::re_syntax_base* node, re_detail::re_syntax_base* terminal)const;
- void BOOST_REGEX_CALL fixup_apply(re_detail::re_syntax_base* b, unsigned cbraces);
- void BOOST_REGEX_CALL move_offsets(re_detail::re_syntax_base* j, unsigned size);
- re_detail::re_syntax_base* BOOST_REGEX_CALL compile_set(const charT*& first, const charT* last);
- re_detail::re_syntax_base* BOOST_REGEX_CALL compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_narrow_type&);
- re_detail::re_syntax_base* BOOST_REGEX_CALL compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_wide_type&);
- re_detail::re_syntax_base* BOOST_REGEX_CALL compile_set_simple(re_detail::re_syntax_base* dat, unsigned long cls, bool isnot = false);
- unsigned int BOOST_REGEX_CALL parse_inner_set(const charT*& first, const charT* last);
-
- re_detail::re_syntax_base* BOOST_REGEX_CALL add_simple(re_detail::re_syntax_base* dat, re_detail::syntax_element_type type, unsigned int size = sizeof(re_detail::re_syntax_base));
- re_detail::re_syntax_base* BOOST_REGEX_CALL add_literal(re_detail::re_syntax_base* dat, charT c);
- charT BOOST_REGEX_CALL parse_escape(const charT*& first, const charT* last);
- void BOOST_REGEX_CALL parse_range(const charT*& first, const charT* last, unsigned& min, unsigned& max);
- bool BOOST_REGEX_CALL skip_space(const charT*& first, const charT* last);
- unsigned int BOOST_REGEX_CALL probe_restart(re_detail::re_syntax_base* dat);
- unsigned int BOOST_REGEX_CALL fixup_leading_rep(re_detail::re_syntax_base* dat, re_detail::re_syntax_base* end);
- void BOOST_REGEX_CALL fail(unsigned int err);
-
-protected:
- static int BOOST_REGEX_CALL repeat_count(const reg_expression& e)
- { return e.repeats; }
- static unsigned int BOOST_REGEX_CALL restart_type(const reg_expression& e)
- { return e._restart_type; }
- static const re_detail::re_syntax_base* BOOST_REGEX_CALL first(const reg_expression& e)
- { return (const re_detail::re_syntax_base*)e.data.data(); }
- static const unsigned char* BOOST_REGEX_CALL get_map(const reg_expression& e)
- { return e.startmap; }
- static std::size_t BOOST_REGEX_CALL leading_length(const reg_expression& e)
- { return e._leading_len; }
- static const re_detail::kmp_info<charT>* get_kmp(const reg_expression& e)
- { return e.pkmp; }
- static bool BOOST_REGEX_CALL can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_wide_type&);
- static bool BOOST_REGEX_CALL can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_narrow_type&);
-};
-
-#ifdef BOOST_MSVC
-#pragma warning (pop)
-#endif
-
-template <class charT, class traits, class Allocator>
-inline void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::swap(reg_expression& that)throw()
-{
- // this is not as efficient as it should be,
- // however swapping traits classes is problematic
- // so just use 'brute force' method for now:
- reg_expression<charT, traits, Allocator> e(that);
- that = *this;
- *this = e;
-}
-
-
-//
-// class match_results and match_results_base
-// handles what matched where
-
-template <class iterator>
-struct sub_match
-{
- typedef typename re_detail::regex_iterator_traits<iterator>::value_type value_type;
-#if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
- typedef std::ptrdiff_t difference_type;
-#else
- typedef typename re_detail::regex_iterator_traits<iterator>::difference_type difference_type;
-#endif
- typedef iterator iterator_type;
-
- iterator first;
- iterator second;
- bool matched;
-
- operator std::basic_string<value_type> ()const
- {
- std::basic_string<value_type> result;
- std::size_t len = boost::re_detail::distance((iterator)first, (iterator)second);
- result.reserve(len);
- iterator i = first;
- while(i != second)
- {
- result.append(1, *i);
- ++i;
- }
- return result;
- }
- #ifdef BOOST_OLD_REGEX_H
- //
- // the following are deprecated, do not use!!
- //
- operator int()const;
- operator unsigned int()const;
- operator short()const
- {
- return (short)(int)(*this);
- }
- operator unsigned short()const
- {
- return (unsigned short)(unsigned int)(*this);
- }
- #endif
- sub_match() { matched = false; }
- sub_match(iterator i) : first(i), second(i), matched(false) {}
-
- bool operator==(const sub_match& that)const
- {
- return (first == that.first) && (second == that.second) && (matched == that.matched);
- }
- bool BOOST_REGEX_CALL operator !=(const sub_match& that)const
- { return !(*this == that); }
-
- difference_type BOOST_REGEX_CALL length()const
- {
- difference_type n = boost::re_detail::distance((iterator)first, (iterator)second);
- return n;
- }
-};
-
-#ifdef BOOST_OLD_REGEX_H
-namespace re_detail{
-template <class iterator, class charT>
-int do_toi(iterator i, iterator j, char c, int radix)
-{
- std::string s(i, j);
- char* p;
- int result = std::strtol(s.c_str(), &p, radix);
-#ifndef BOOST_NO_EXCEPTIONS
- if(*p)throw bad_pattern("Bad sub-expression");
-#endif
- BOOST_REGEX_NOEH_ASSERT(0 == *p)
- return result;
-}
-
-//
-// helper:
-template <class I, class charT>
-int do_toi(I& i, I j, charT c)
-{
- int result = 0;
- while((i != j) && (isdigit(*i)))
- {
- result = result*10 + (*i - '0');
- ++i;
- }
- return result;
-}
-}
-
-
-template <class iterator>
-sub_match<iterator>::operator int()const
-{
- iterator i = first;
- iterator j = second;
-#ifndef BOOST_NO_EXCEPTIONS
- if(i == j)throw bad_pattern("Bad sub-expression");
-#endif
- BOOST_REGEX_NOEH_ASSERT(i != j)
- int neg = 1;
- if((i != j) && (*i == '-'))
- {
- neg = -1;
- ++i;
- }
- neg *= re_detail::do_toi(i, j, *i);
-#ifndef BOOST_NO_EXCEPTIONS
- if(i != j)throw bad_pattern("Bad sub-expression");
-#endif
- BOOST_REGEX_NOEH_ASSERT(i == j)
- return neg;
-}
-template <class iterator>
-sub_match<iterator>::operator unsigned int()const
-{
- iterator i = first;
- iterator j = second;
-#ifndef BOOST_NO_EXCEPTIONS
- if(i == j)
- throw bad_pattern("Bad sub-expression");
-#endif
- BOOST_REGEX_NOEH_ASSERT(i != j)
- return re_detail::do_toi(i, j, *first);
-}
-#endif
-
-namespace re_detail{
-
-template <class iterator, class Allocator = BOOST_DEFAULT_ALLOCATOR(typename def_alloc_param_traits<iterator>::type) >
-class match_results_base
-{
-public:
- typedef Allocator alloc_type;
- typedef typename boost::detail::rebind_allocator<iterator, Allocator>::type iterator_alloc;
- typedef typename iterator_alloc::size_type size_type;
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
- typedef typename std::iterator_traits<iterator>::difference_type difference_type;
- typedef typename std::iterator_traits<iterator>::value_type char_type;
-#else
- typedef std::ptrdiff_t difference_type;
- typedef typename re_detail::regex_iterator_traits<iterator>::value_type char_type;
-#endif
- typedef sub_match<iterator> value_type;
- typedef iterator iterator_type;
-
-protected:
- typedef typename boost::detail::rebind_allocator<char, Allocator>::type c_alloc;
-
- struct c_reference : public c_alloc
- {
- std::size_t cmatches;
- unsigned count;
- sub_match<iterator> head, tail, null;
- unsigned int lines;
- iterator line_pos, base;
- c_reference(const Allocator& a)
- : c_alloc(a), cmatches(0), count(0), lines(0) { }
-
- bool operator==(const c_reference& that)const
- {
- return (cmatches == that.cmatches) &&
- (count == that.count) &&
- (head == that.head) &&
- (tail == that.tail) &&
- (lines == that.lines) &&
- (base == that.base);
- }
- bool operator!=(const c_reference& that)const
- { return !(*this == that); }
- };
-
- c_reference* ref;
-
- void BOOST_REGEX_CALL cow();
-
- // protected contructor for derived class...
- match_results_base(bool){}
- void BOOST_REGEX_CALL m_free();
-
-public:
-
- match_results_base(const Allocator& a = Allocator());
-
- match_results_base(const match_results_base& m)
- {
- ref = m.ref;
- ++(ref->count);
- }
-
- match_results_base& BOOST_REGEX_CALL operator=(const match_results_base& m);
-
- ~match_results_base()
- {
- m_free();
- }
-
- size_type BOOST_REGEX_CALL size()const
- {
- //return (*this)[0].matched ? ref->cmatches : 0;
- return ref->cmatches;
- }
-
- const sub_match<iterator>& BOOST_REGEX_CALL operator[](int n) const
- {
- if((n >= 0) && ((unsigned int)n < ref->cmatches))
- return *(sub_match<iterator>*)((char*)ref + sizeof(c_reference) + sizeof(sub_match<iterator>)*n);
- return (n == -1) ? ref->head : (n == -2) ? ref->tail : ref->null;
- }
-
- Allocator BOOST_REGEX_CALL allocator()const;
-
- difference_type BOOST_REGEX_CALL length(unsigned int sub = 0)const
- {
- jm_assert(ref->cmatches);
- const sub_match<iterator>& m = (*this)[sub];
- if(m.matched == false)
- return 0;
- difference_type n = boost::re_detail::distance((iterator)m.first, (iterator)m.second);
- return n;
- }
-
- std::basic_string<char_type> str(int i)const
- {
- return static_cast<std::basic_string<char_type> >((*this)[i]);
- }
-
- unsigned int BOOST_REGEX_CALL line()const
- {
- return ref->lines;
- }
-
- difference_type BOOST_REGEX_CALL position(unsigned int sub = 0)const
- {
- jm_assert(ref->cmatches);
- const sub_match<iterator>& s = (*this)[sub];
- if(s.matched == false)
- return -1;
- difference_type n = boost::re_detail::distance((iterator)(ref->base), (iterator)(s.first));
- return n;
- }
-
- iterator BOOST_REGEX_CALL line_start()const
- {
- return ref->line_pos;
- }
-
- void swap(match_results_base& that)
- {
- c_reference* t = that.ref;
- that.ref = ref;
- ref = t;
- }
-
- bool operator==(const match_results_base& that)const;
- bool operator<(const match_results_base& that)const
- { return position() < that.position(); }
-
- friend class match_results<iterator, Allocator>;
-
- void BOOST_REGEX_CALL set_size(size_type n);
- void BOOST_REGEX_CALL set_size(size_type n, iterator i, iterator j);
- void BOOST_REGEX_CALL maybe_assign(const match_results_base& m);
- void BOOST_REGEX_CALL init_fail(iterator i, iterator j);
-
- void BOOST_REGEX_CALL set_first(iterator i);
- void BOOST_REGEX_CALL set_first(iterator i, std::size_t pos);
-
- void BOOST_REGEX_CALL set_second(iterator i)
- {
- cow();
- ((sub_match<iterator>*)(ref+1))->second = i;
- ((sub_match<iterator>*)(ref+1))->matched = true;
- ref->tail.first = i;
- ref->tail.matched = (ref->tail.first == ref->tail.second) ? false : true;
- }
-
- void BOOST_REGEX_CALL set_second(iterator i, std::size_t pos, bool m = true)
- {
- cow();
- ((sub_match<iterator>*)((char*)ref + sizeof(c_reference) + sizeof(sub_match<iterator>) * pos))->second = i;
- ((sub_match<iterator>*)((char*)ref + sizeof(c_reference) + sizeof(sub_match<iterator>) * pos))->matched = m;
- if(pos == 0)
- {
- ref->tail.first = i;
- ref->tail.matched = (ref->tail.first == ref->tail.second) ? false : true;
- }
- }
-
- void BOOST_REGEX_CALL set_line(unsigned int i, iterator pos)
- {
- ref->lines = i;
- ref->line_pos = pos;
- }
-
- void BOOST_REGEX_CALL set_base(iterator pos)
- {
- ref->base = pos;
- }
-};
-
-template <class iterator, class Allocator>
-void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_first(iterator i)
-{
- cow();
- ref->head.second = i;
- ref->head.matched = (ref->head.first == ref->head.second) ? false : true;
- sub_match<iterator>* p1 = (sub_match<iterator>*)(ref+1);
- sub_match<iterator>* p2 = p1 + ref->cmatches;
- p1->first = i;
- p1->matched = false;
- ++p1;
- while(p1 != p2)
- {
- p1->matched = false;
- p1->first = ref->tail.second;
- p1->second = ref->tail.second;
- ++p1;
- }
-}
-
-template <class iterator, class Allocator>
-void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_first(iterator i, std::size_t pos)
-{
- cow();
- ((sub_match<iterator>*)((char*)ref + sizeof(c_reference) + sizeof(sub_match<iterator>) * pos))->first = i;
- if(pos == 0)
- {
- ref->head.second = i;
- ref->head.matched = (ref->head.first == ref->head.second) ? false : true;
- sub_match<iterator>* p1 = (sub_match<iterator>*)(ref+1);
- sub_match<iterator>* p2 = p1 + ref->cmatches;
- p1->first = i;
- p1->matched = false;
- ++p1;
- while(p1 != p2)
- {
- p1->matched = false;
- p1->first = ref->tail.second;
- p1->second = ref->tail.second;
- ++p1;
- }
- }
-}
-
-
-template <class iterator, class Allocator>
-match_results_base<iterator, Allocator>::match_results_base(const Allocator& a)
-{
- ref = (c_reference*)c_alloc(a).allocate(sizeof(sub_match<iterator>) + sizeof(c_reference));
- BOOST_REGEX_NOEH_ASSERT(ref)
-#ifndef BOOST_NO_EXCEPTIONS
- try
- {
-#endif
- new (ref) c_reference(a);
- ref->cmatches = 1;
- ref->count = 1;
- // construct the sub_match<iterator>:
-#ifndef BOOST_NO_EXCEPTIONS
- try
- {
-#endif
- new ((sub_match<iterator>*)(ref+1)) sub_match<iterator>();
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(...)
- {
- ::boost::re_detail::pointer_destroy(ref);
- throw;
- }
- }
- catch(...)
- {
- c_alloc(a).deallocate((char*)(void*)ref, sizeof(sub_match<iterator>) + sizeof(c_reference));
- throw;
- }
-#endif
-}
-
-template <class iterator, class Allocator>
-Allocator BOOST_REGEX_CALL match_results_base<iterator, Allocator>::allocator()const
-{
- return *((c_alloc*)ref);
-}
-
-template <class iterator, class Allocator>
-inline match_results_base<iterator, Allocator>& BOOST_REGEX_CALL match_results_base<iterator, Allocator>::operator=(const match_results_base<iterator, Allocator>& m)
-{
- if(ref != m.ref)
- {
- m_free();
- ref = m.ref;
- ++(ref->count);
- }
- return *this;
-}
-
-
-template <class iterator, class Allocator>
-void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::m_free()
-{
- if(--(ref->count) == 0)
- {
- c_alloc a(*ref);
- sub_match<iterator>* p1, *p2;
- p1 = (sub_match<iterator>*)(ref+1);
- p2 = p1 + ref->cmatches;
- while(p1 != p2)
- {
- ::boost::re_detail::pointer_destroy(p1);
- ++p1;
- }
- ::boost::re_detail::pointer_destroy(ref);
- a.deallocate((char*)(void*)ref, sizeof(sub_match<iterator>) * ref->cmatches + sizeof(c_reference));
- }
-}
-
-template <class iterator, class Allocator>
-bool match_results_base<iterator, Allocator>::operator==(const match_results_base<iterator, Allocator>& that)const
-{
- if(*ref != *(that.ref))
- return false;
- const sub_match<iterator>* p1 = (sub_match<iterator>*)(ref+1);
- const sub_match<iterator>* p2 = p1 + ref->cmatches;
- const sub_match<iterator>* p3 = (sub_match<iterator>*)(that.ref+1);
- while(p1 != p2)
- {
- if(*p1 != *p3)
- return false;
- ++p1;
- ++p3;
- }
- return true;
-}
-
-template <class iterator, class Allocator>
-void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_type n)
-{
- if(ref->cmatches != n)
- {
- c_reference* newref = (c_reference*)ref->allocate(sizeof(sub_match<iterator>) * n + sizeof(c_reference));
- BOOST_REGEX_NOEH_ASSERT(newref)
-#ifndef BOOST_NO_EXCEPTIONS
- try
- {
-#endif
- new (newref) c_reference(*ref);
- newref->count = 1;
- newref->cmatches = n;
- sub_match<iterator>* p1, *p2;
- p1 = (sub_match<iterator>*)(newref+1);
- p2 = p1 + newref->cmatches;
-#ifndef BOOST_NO_EXCEPTIONS
- try
- {
-#endif
- while(p1 != p2)
- {
- new (p1) sub_match<iterator>();
- ++p1;
- }
- m_free();
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(...)
- {
- p2 = (sub_match<iterator>*)(newref+1);
- while(p2 != p1)
- {
- ::boost::re_detail::pointer_destroy(p2);
- ++p2;
- }
- ::boost::re_detail::pointer_destroy(ref);
- throw;
- }
-#endif
- ref = newref;
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(...)
- {
- ref->deallocate((char*)(void*)newref, sizeof(sub_match<iterator>) * n + sizeof(c_reference));
- throw;
- }
-#endif
- }
-}
-
-template <class iterator, class Allocator>
-void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_type n, iterator i, iterator j)
-{
- if(ref->cmatches != n)
- {
- c_reference* newref = (c_reference*)ref->allocate(sizeof(sub_match<iterator>) * n + sizeof(c_reference));
- BOOST_REGEX_NOEH_ASSERT(newref)
-#ifndef BOOST_NO_EXCEPTIONS
- try{
-#endif
- new (newref) c_reference(*ref);
- newref->count = 1;
- newref->cmatches = n;
- sub_match<iterator>* p1 = (sub_match<iterator>*)(newref+1);
- sub_match<iterator>* p2 = p1 + newref->cmatches;
-#ifndef BOOST_NO_EXCEPTIONS
- try
- {
-#endif
- while(p1 != p2)
- {
- new (p1) sub_match<iterator>(j);
- ++p1;
- }
- m_free();
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(...)
- {
- p2 = (sub_match<iterator>*)(newref+1);
- while(p2 != p1)
- {
- ::boost::re_detail::pointer_destroy(p2);
- ++p2;
- }
- ::boost::re_detail::pointer_destroy(ref);
- throw;
- }
-#endif
- ref = newref;
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(...)
- {
- ref->deallocate((char*)(void*)newref, sizeof(sub_match<iterator>) * n + sizeof(c_reference));
- throw;
- }
-#endif
- }
- else
- {
- cow();
- // set iterators to be i, matched to false:
- sub_match<iterator>* p1, *p2;
- p1 = (sub_match<iterator>*)(ref+1);
- p2 = p1 + ref->cmatches;
- while(p1 != p2)
- {
- p1->first = j;
- p1->second = j;
- p1->matched = false;
- ++p1;
- }
- }
- ref->head.first = i;
- ref->tail.second = j;
- ref->head.matched = ref->tail.matched = true;
- ref->null.first = ref->null.second = j;
- ref->null.matched = false;
-}
-
-template <class iterator, class Allocator>
-inline void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::init_fail(iterator i, iterator j)
-{
- set_size(ref->cmatches, i, j);
-}
-
-template <class iterator, class Allocator>
-void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::maybe_assign(const match_results_base<iterator, Allocator>& m)
-{
- sub_match<iterator>* p1, *p2;
- p1 = (sub_match<iterator>*)(ref+1);
- p2 = (sub_match<iterator>*)(m.ref+1);
- iterator base = (*this)[-1].first;
- std::size_t len1 = 0;
- std::size_t len2 = 0;
- std::size_t base1 = 0;
- std::size_t base2 = 0;
- std::size_t i;
- for(i = 0; i < ref->cmatches; ++i)
- {
- //
- // leftmost takes priority over longest:
- base1 = boost::re_detail::distance(base, p1->first);
- base2 = boost::re_detail::distance(base, p2->first);
- if(base1 < base2) return;
- if(base2 < base1) break;
-
- len1 = boost::re_detail::distance(p1->first, p1->second);
- len2 = boost::re_detail::distance(p2->first, p2->second);
- if((len1 != len2) || ((p1->matched == false) && (p2->matched == true)))
- break;
- if((p1->matched == true) && (p2->matched == false))
- return;
- ++p1;
- ++p2;
- }
- if(i == ref->cmatches)
- return;
- if(base2 < base1)
- *this = m;
- else if((len2 > len1) || ((p1->matched == false) && (p2->matched == true)) )
- *this = m;
-}
-
-template <class iterator, class Allocator>
-void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::cow()
-{
- if(ref->count > 1)
- {
- c_reference* newref = (c_reference*)ref->allocate(sizeof(sub_match<iterator>) * ref->cmatches + sizeof(c_reference));
- BOOST_REGEX_NOEH_ASSERT(newref)
-#ifndef BOOST_NO_EXCEPTIONS
- try{
-#endif
- new (newref) c_reference(*ref);
- newref->count = 1;
- sub_match<iterator>* p1 = (sub_match<iterator>*)(newref+1);
- sub_match<iterator>* p2 = p1 + newref->cmatches;
- sub_match<iterator>* p3 = (sub_match<iterator>*)(ref+1);
-#ifndef BOOST_NO_EXCEPTIONS
- try{
-#endif
- while(p1 != p2)
- {
- new (p1) sub_match<iterator>(*p3);
- ++p1;
- ++p3;
- }
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(...)
- {
- p2 = (sub_match<iterator>*)(newref+1);
- while(p2 != p1)
- {
- ::boost::re_detail::pointer_destroy(p2);
- ++p2;
- }
- ::boost::re_detail::pointer_destroy(ref);
- throw;
- }
-#endif
- --(ref->count);
- ref = newref;
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(...)
- {
- ref->deallocate((char*)(void*)newref, sizeof(sub_match<iterator>) * ref->cmatches + sizeof(c_reference));
- throw;
- }
-#endif
- }
-}
-
-} // namespace re_detail
-
-//
-// class match_results
-// encapsulates match_results_base, does a deep copy rather than
-// reference counting to ensure thread safety when copying
-// other match_results instances
-
-template <class iterator, class Allocator>
-class match_results : public re_detail::match_results_base<iterator, Allocator>
-{
- typedef re_detail::match_results_base<iterator, Allocator> base_type;
-public:
-
- typedef typename base_type::alloc_type alloc_type;
- typedef typename base_type::size_type size_type;
- typedef typename base_type::char_type char_type;
- typedef typename base_type::value_type value_type;
- typedef typename base_type::difference_type difference_type;
- typedef typename base_type::iterator_type iterator_type;
-
- explicit match_results(const Allocator& a = Allocator())
- : re_detail::match_results_base<iterator, Allocator>(a){}
-
- match_results(const re_detail::match_results_base<iterator, Allocator>& m)
- : re_detail::match_results_base<iterator, Allocator>(m){}
-
- match_results& operator=(const re_detail::match_results_base<iterator, Allocator>& m)
- {
- // shallow copy
- base_type::operator=(m);
- return *this;
- }
-
- match_results(const match_results& m);
- match_results& operator=(const match_results& m);
- //
- // the following function definitions should *not* be required, except
- // when this class is used as a template inside another template definition,
- // in which members of the base class are not visible to the calling code.
- // As a workaround we define simple forwarding functions:
- //
- size_type size()const
- { return static_cast<const base_type*>(this)->size(); }
-
- const sub_match<iterator>& operator[](int n) const
- { return (*static_cast<const base_type*>(this))[n]; }
-
- Allocator allocator()const
- { return static_cast<const base_type*>(this)->allocator(); }
-
- difference_type length(int sub = 0)const
- { return static_cast<const base_type*>(this)->length(sub); }
-
- difference_type position(unsigned int sub = 0)const
- { return static_cast<const base_type*>(this)->position(sub); }
-
- unsigned int line()const
- { return static_cast<const base_type*>(this)->line(); }
-
- iterator line_start()const
- { return static_cast<const base_type*>(this)->line_start(); }
-
- std::basic_string<char_type> str(int sub = 0)const
- { return static_cast<const base_type*>(this)->str(sub); }
-
- void swap(match_results& that)
- { static_cast<base_type*>(this)->swap(that); }
-
- bool operator==(const match_results& that)const
- { return static_cast<const base_type&>(*this) == static_cast<const base_type&>(that); }
-
- bool operator<(const match_results& that) const
- { return position() < that.position(); }
-};
-
-template <class iterator, class Allocator>
-match_results<iterator, Allocator>::match_results(const match_results<iterator, Allocator>& m)
- : re_detail::match_results_base<iterator, Allocator>(false)
-{
- this->ref =
- reinterpret_cast<typename re_detail::match_results_base<iterator, Allocator>::c_reference *>
- (m.ref->allocate(sizeof(sub_match<iterator>) * m.ref->cmatches +
- sizeof(typename re_detail::match_results_base<iterator, Allocator>::c_reference)));
- BOOST_REGEX_NOEH_ASSERT(this->ref)
-#ifndef BOOST_NO_EXCEPTIONS
- try{
-#endif
- new (this->ref) typename re_detail::match_results_base<iterator, Allocator>::c_reference(*m.ref);
- this->ref->count = 1;
- sub_match<iterator>* p1 = (sub_match<iterator>*)(this->ref+1);
- sub_match<iterator>* p2 = p1 + this->ref->cmatches;
- sub_match<iterator>* p3 = (sub_match<iterator>*)(m.ref+1);
-#ifndef BOOST_NO_EXCEPTIONS
- try{
-#endif
- while(p1 != p2)
- {
- new (p1) sub_match<iterator>(*p3);
- ++p1;
- ++p3;
- }
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(...)
- {
- p2 = (sub_match<iterator>*)(this->ref+1);
- while(p2 != p1)
- {
- re_detail::pointer_destroy(p2);
- ++p2;
- }
- re_detail::pointer_destroy(this->ref);
- throw;
- }
- }
- catch(...)
- {
- m.ref->deallocate((char*)(void*)this->ref, sizeof(sub_match<iterator>) * m.ref->cmatches + sizeof(typename re_detail::match_results_base<iterator, Allocator>::c_reference));
- throw;
- }
-#endif
-}
-
-template <class iterator, class Allocator>
-match_results<iterator, Allocator>& match_results<iterator, Allocator>::operator=(const match_results<iterator, Allocator>& m)
-{
- match_results<iterator, Allocator> t(m);
- this->swap(t);
- return *this;
-}
-
-namespace re_detail{
-template <class iterator, class charT, class traits_type, class Allocator>
-iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
- iterator last,
- const re_set_long* set_,
- const reg_expression<charT, traits_type, Allocator>& e);
-} // namepsace re_detail
-
-#ifdef __BORLANDC__
- #pragma option pop
-#endif
-
-} // namespace boost
-
-#include <boost/regex/detail/regex_compile.hpp>
-
-//
-// template instances:
-//
-#define BOOST_REGEX_CHAR_T char
-#ifdef BOOST_REGEX_NARROW_INSTANTIATE
-# define BOOST_REGEX_INSTANTIATE
-#endif
-#include <boost/regex/detail/instances.hpp>
-#undef BOOST_REGEX_CHAR_T
-#ifdef BOOST_REGEX_INSTANTIATE
-# undef BOOST_REGEX_INSTANTIATE
-#endif
-
-#ifndef BOOST_NO_WREGEX
-#define BOOST_REGEX_CHAR_T wchar_t
-#ifdef BOOST_REGEX_WIDE_INSTANTIATE
-# define BOOST_REGEX_INSTANTIATE
-#endif
-#include <boost/regex/detail/instances.hpp>
-#undef BOOST_REGEX_CHAR_T
-#ifdef BOOST_REGEX_INSTANTIATE
-# undef BOOST_REGEX_INSTANTIATE
-#endif
-#endif
-
-
-namespace boost{
-#ifdef BOOST_REGEX_NO_FWD
-typedef reg_expression<char, regex_traits<char>, BOOST_DEFAULT_ALLOCATOR(char)> regex;
-#ifndef BOOST_NO_WREGEX
-typedef reg_expression<wchar_t, regex_traits<wchar_t>, BOOST_DEFAULT_ALLOCATOR(wchar_t)> wregex;
-#endif
-#endif
-
-typedef match_results<const char*> cmatch;
-typedef match_results<std::string::const_iterator> smatch;
-#ifndef BOOST_NO_WREGEX
-typedef match_results<const wchar_t*> wcmatch;
-typedef match_results<std::wstring::const_iterator> wsmatch;
-#endif
-
-} // namespace boost
-#include <boost/regex/detail/regex_match.hpp>
-#include <boost/regex/detail/regex_format.hpp>
-#include <boost/regex/detail/regex_split.hpp>
-
-
-#endif // __cplusplus
+#include <boost/regex/v3/regex.hpp>
#endif // include
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
// We don't make our templates external if the compiler
// can't handle it:
-#if (defined(BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS) || defined(__MWERKS__) || defined(__COMO__) || defined(__ICL) || defined(__ICC))\
+#if (defined(BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS) || defined(__HP_aCC) || defined(__MWERKS__) || defined(__COMO__) || defined(__ICL) || defined(__ICC))\
&& !defined(BOOST_MSVC) && !defined(__BORLANDC__)
# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
#endif
#endif
#if (defined(BOOST_MSVC) || defined(__BORLANDC__)) && !defined(BOOST_REGEX_NO_LIB) && !defined(BOOST_REGEX_SOURCE)
-# include <boost/regex/detail/regex_library_include.hpp>
+# include <boost/regex/v3/regex_library_include.hpp>
#endif
/*****************************************************************************
+
+
+++ /dev/null
-/*
- *
- * Copyright (c) 1998-2002
- * Dr John Maddock
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Dr John Maddock makes no representations
- * about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE fileiter.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Declares various platform independent file and
- * directory iterators, plus binary file input in
- * the form of class map_file.
- */
-
-#ifndef BOOST_RE_FILEITER_HPP
-#define BOOST_RE_FILEITER_HPP
-
-#include <boost/regex/config.hpp>
-
-#ifndef BOOST_REGEX_NO_FILEITER
-
-#if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && !defined(BOOST_REGEX_NO_W32)
-#error "Sorry, can't mix <windows.h> with STL code and gcc compiler: if you ran configure, try again with configure --disable-ms-windows"
-#define BOOST_REGEX_FI_WIN32_MAP
-#define BOOST_REGEX_FI_POSIX_DIR
-#elif (defined(__WIN32__) || defined(_WIN32) || defined(WIN32)) && !defined(BOOST_REGEX_NO_W32)
-#define BOOST_REGEX_FI_WIN32_MAP
-#define BOOST_REGEX_FI_WIN32_DIR
-#else
-#define BOOST_REGEX_FI_POSIX_MAP
-#define BOOST_REGEX_FI_POSIX_DIR
-#endif
-
-#if defined(BOOST_REGEX_FI_WIN32_MAP)||defined(BOOST_REGEX_FI_WIN32_DIR)
-#include <windows.h>
-#endif
-
-#if defined(BOOST_REGEX_FI_WIN32_DIR)
-
-namespace boost{
- namespace re_detail{
-
-typedef WIN32_FIND_DATAA _fi_find_data;
-typedef HANDLE _fi_find_handle;
-
- } // namespace re_detail
-
-} // namespace boost
-
-#define _fi_invalid_handle INVALID_HANDLE_VALUE
-#define _fi_dir FILE_ATTRIBUTE_DIRECTORY
-
-#elif defined(BOOST_REGEX_FI_POSIX_DIR)
-
-#include <cstdio>
-#include <cctype>
-#include <iterator>
-#include <list>
-#include <cassert>
-#include <dirent.h>
-
-#if defined(__SUNPRO_CC)
-using std::list;
-#endif
-
-#ifndef MAX_PATH
-#define MAX_PATH 256
-#endif
-
-namespace boost{
- namespace re_detail{
-
-#ifdef __BORLANDC__
- #pragma option push -a8 -b -Vx -Ve -pc
-#endif
-
-struct _fi_find_data
-{
- unsigned dwFileAttributes;
- char cFileName[MAX_PATH];
-};
-
-struct _fi_priv_data;
-
-typedef _fi_priv_data* _fi_find_handle;
-#define _fi_invalid_handle 0
-#define _fi_dir 1
-
-_fi_find_handle _fi_FindFirstFile(const char* lpFileName, _fi_find_data* lpFindFileData);
-bool _fi_FindNextFile(_fi_find_handle hFindFile, _fi_find_data* lpFindFileData);
-bool _fi_FindClose(_fi_find_handle hFindFile);
-
-#ifdef __BORLANDC__
- #if __BORLANDC__ > 0x520
- #pragma option pop
- #endif
-#endif
-
- } // namespace re_detail
-} // namespace boost
-
-#ifdef FindFirstFile
- #undef FindFirstFile
-#endif
-#ifdef FindNextFile
- #undef FindNextFile
-#endif
-#ifdef FindClose
- #undef FindClose
-#endif
-
-#define FindFirstFileA _fi_FindFirstFile
-#define FindNextFileA _fi_FindNextFile
-#define FindClose _fi_FindClose
-
-#endif
-
-namespace boost{
- namespace re_detail{
-
-#ifdef __BORLANDC__
- #if __BORLANDC__ == 0x530
- #pragma option push -a4 -b
- #elif __BORLANDC__ > 0x530
- #pragma option push -a8 -b
- #endif
-#endif
-
-#ifdef BOOST_REGEX_FI_WIN32_MAP // win32 mapfile
-
-class BOOST_REGEX_DECL mapfile
-{
- HANDLE hfile;
- HANDLE hmap;
- const char* _first;
- const char* _last;
-public:
-
- typedef const char* iterator;
-
- mapfile(){ hfile = hmap = 0; _first = _last = 0; }
- mapfile(const char* file){ hfile = hmap = 0; _first = _last = 0; open(file); }
- ~mapfile(){ close(); }
- void open(const char* file);
- void close();
- const char* begin(){ return _first; }
- const char* end(){ return _last; }
- size_t size(){ return _last - _first; }
- bool valid(){ return (hfile != 0) && (hfile != INVALID_HANDLE_VALUE); }
-};
-
-
-#else
-
-class BOOST_REGEX_DECL mapfile_iterator;
-
-class BOOST_REGEX_DECL mapfile
-{
- typedef char* pointer;
- std::FILE* hfile;
- long int _size;
- pointer* _first;
- pointer* _last;
- mutable std::list<pointer*> condemed;
- enum sizes
- {
- buf_size = 4096
- };
- void lock(pointer* node)const;
- void unlock(pointer* node)const;
-public:
-
- typedef mapfile_iterator iterator;
-
- mapfile(){ hfile = 0; _size = 0; _first = _last = 0; }
- mapfile(const char* file){ hfile = 0; _size = 0; _first = _last = 0; open(file); }
- ~mapfile(){ close(); }
- void open(const char* file);
- void close();
- iterator begin()const;
- iterator end()const;
- unsigned long size()const{ return _size; }
- bool valid()const{ return hfile != 0; }
- friend class mapfile_iterator;
-};
-
-class BOOST_REGEX_DECL mapfile_iterator
-#if !defined(BOOST_NO_STD_ITERATOR) || defined(BOOST_MSVC_STD_ITERATOR)
-: public std::iterator<std::random_access_iterator_tag, char>
-#endif
-{
- typedef mapfile::pointer internal_pointer;
- internal_pointer* node;
- const mapfile* file;
- unsigned long offset;
- long position()const
- {
- return file ? ((node - file->_first) * mapfile::buf_size + offset) : 0;
- }
- void position(long pos)
- {
- if(file)
- {
- node = file->_first + (pos / mapfile::buf_size);
- offset = pos % mapfile::buf_size;
- }
- }
-public:
- typedef std::ptrdiff_t difference_type;
- typedef char value_type;
- typedef const char* pointer;
- typedef const char& reference;
- typedef std::random_access_iterator_tag iterator_category;
-
- mapfile_iterator() { node = 0; file = 0; offset = 0; }
- mapfile_iterator(const mapfile* f, long position)
- {
- file = f;
- node = f->_first + position / mapfile::buf_size;
- offset = position % mapfile::buf_size;
- if(file)
- file->lock(node);
- }
- mapfile_iterator(const mapfile_iterator& i)
- {
- file = i.file;
- node = i.node;
- offset = i.offset;
- if(file)
- file->lock(node);
- }
- ~mapfile_iterator()
- {
- if(file && node)
- file->unlock(node);
- }
- mapfile_iterator& operator = (const mapfile_iterator& i);
- char operator* ()const
- {
- assert(node >= file->_first);
- assert(node < file->_last);
- return file ? *(*node + sizeof(int) + offset) : char(0);
- }
- char operator[] (long off)const
- {
- mapfile_iterator tmp(*this);
- tmp += off;
- return *tmp;
- }
- mapfile_iterator& operator++ ();
- mapfile_iterator operator++ (int);
- mapfile_iterator& operator-- ();
- mapfile_iterator operator-- (int);
-
- mapfile_iterator& operator += (long off)
- {
- position(position() + off);
- return *this;
- }
- mapfile_iterator& operator -= (long off)
- {
- position(position() - off);
- return *this;
- }
-
- friend inline bool operator==(const mapfile_iterator& i, const mapfile_iterator& j)
- {
- return (i.file == j.file) && (i.node == j.node) && (i.offset == j.offset);
- }
-
- friend inline bool operator!=(const mapfile_iterator& i, const mapfile_iterator& j)
- {
- return !(i == j);
- }
-
- friend inline bool operator<(const mapfile_iterator& i, const mapfile_iterator& j)
- {
- return i.position() < j.position();
- }
- friend inline bool operator>(const mapfile_iterator& i, const mapfile_iterator& j)
- {
- return i.position() > j.position();
- }
- friend inline bool operator<=(const mapfile_iterator& i, const mapfile_iterator& j)
- {
- return i.position() <= j.position();
- }
- friend inline bool operator>=(const mapfile_iterator& i, const mapfile_iterator& j)
- {
- return i.position() >= j.position();
- }
-
- friend mapfile_iterator operator + (const mapfile_iterator& i, long off);
- friend mapfile_iterator operator + (long off, const mapfile_iterator& i)
- {
- mapfile_iterator tmp(i);
- return tmp += off;
- }
- friend mapfile_iterator operator - (const mapfile_iterator& i, long off);
- friend inline long operator - (const mapfile_iterator& i, const mapfile_iterator& j)
- {
- return i.position() - j.position();
- }
-};
-
-#endif
-
-// _fi_sep determines the directory separator, either '\\' or '/'
-BOOST_REGEX_DECL extern const char* _fi_sep;
-
-struct file_iterator_ref
-{
- _fi_find_handle hf;
- _fi_find_data _data;
- long count;
-};
-
-
-class BOOST_REGEX_DECL file_iterator
-{
- char* _root;
- char* _path;
- char* ptr;
- file_iterator_ref* ref;
-
-public:
- typedef std::ptrdiff_t difference_type;
- typedef const char* value_type;
- typedef const char** pointer;
- typedef const char*& reference;
- typedef std::input_iterator_tag iterator_category;
-
- file_iterator();
- file_iterator(const char* wild);
- ~file_iterator();
- file_iterator(const file_iterator&);
- file_iterator& operator=(const file_iterator&);
- const char* root()const { return _root; }
- const char* path()const { return _path; }
- const char* name()const { return ptr; }
- _fi_find_data* data() { return &(ref->_data); }
- void next();
- file_iterator& operator++() { next(); return *this; }
- file_iterator operator++(int);
- const char* operator*() { return path(); }
-
- friend inline bool operator == (const file_iterator& f1, const file_iterator& f2)
- {
- return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
- }
-
- friend inline bool operator != (const file_iterator& f1, const file_iterator& f2)
- {
- return !(f1 == f2);
- }
-
-};
-
-// dwa 9/13/00 - suppress unused parameter warning
-inline bool operator < (const file_iterator&, const file_iterator&)
-{
- return false;
-}
-
-
-class BOOST_REGEX_DECL directory_iterator
-{
- char* _root;
- char* _path;
- char* ptr;
- file_iterator_ref* ref;
-
-public:
- typedef std::ptrdiff_t difference_type;
- typedef const char* value_type;
- typedef const char** pointer;
- typedef const char*& reference;
- typedef std::input_iterator_tag iterator_category;
-
- directory_iterator();
- directory_iterator(const char* wild);
- ~directory_iterator();
- directory_iterator(const directory_iterator& other);
- directory_iterator& operator=(const directory_iterator& other);
-
- const char* root()const { return _root; }
- const char* path()const { return _path; }
- const char* name()const { return ptr; }
- _fi_find_data* data() { return &(ref->_data); }
- void next();
- directory_iterator& operator++() { next(); return *this; }
- directory_iterator operator++(int);
- const char* operator*() { return path(); }
-
- static const char* separator() { return _fi_sep; }
-
- friend inline bool operator == (const directory_iterator& f1, const directory_iterator& f2)
- {
- return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
- }
-
-
- friend inline bool operator != (const directory_iterator& f1, const directory_iterator& f2)
- {
- return !(f1 == f2);
- }
-
- };
-
-inline bool operator < (const directory_iterator&, const directory_iterator&)
-{
- return false;
-}
-
-#ifdef __BORLANDC__
- #pragma option pop
-#endif
-
-
-} // namespace re_detail
-using boost::re_detail::directory_iterator;
-using boost::re_detail::file_iterator;
-using boost::re_detail::mapfile;
-} // namespace boost
-
-#endif // BOOST_REGEX_NO_FILEITER
-#endif // BOOST_RE_FILEITER_HPP
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-/*
- *
- * Copyright (c) 1998-2002
- * Dr John Maddock
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Dr John Maddock makes no representations
- * about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE instances.cpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Defines those template instances that are placed in the
- * library rather than in the users object files.
- */
-
-#ifndef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
-
-namespace boost{
-
-//
-// this header can be included multiple times, each time with
-// a different character type, BOOST_REGEX_CHAR_T must be defined
-// first:
-//
-#ifndef BOOST_REGEX_CHAR_T
-# error "BOOST_REGEX_CHAR_T not defined"
-#endif
-
-//
-// what follows is compiler specific:
-//
-
-#ifdef __BORLANDC__
-
-#pragma option push -a8 -b -Vx -Ve -pc
-
-# ifndef BOOST_REGEX_INSTANTIATE
-# pragma option push -Jgx
-# endif
-
-template class BOOST_REGEX_DECL reg_expression< BOOST_REGEX_CHAR_T >;
-template class BOOST_REGEX_DECL re_detail::match_results_base<BOOST_REGEX_CHAR_T const*>;
-template class BOOST_REGEX_DECL re_detail::match_results_base<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>;
-template class BOOST_REGEX_DECL match_results<BOOST_REGEX_CHAR_T const*>;
-template class BOOST_REGEX_DECL match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>;
-
-
-# ifndef BOOST_REGEX_INSTANTIATE
-# pragma option pop
-# endif
-
-#pragma option pop
-
-#elif defined(BOOST_MSVC)
-
-# ifndef BOOST_REGEX_INSTANTIATE
-# define template extern template
-# endif
-
-#pragma warning(push)
-#pragma warning(disable : 4251 4231 4660)
-
-//template class BOOST_REGEX_DECL regex_traits< BOOST_REGEX_CHAR_T >;
-template class BOOST_REGEX_DECL reg_expression< BOOST_REGEX_CHAR_T >;
-template class BOOST_REGEX_DECL re_detail::match_results_base<BOOST_REGEX_CHAR_T const*, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<BOOST_REGEX_CHAR_T const*>::type)>;
-template class BOOST_REGEX_DECL re_detail::match_results_base<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>::type)>;
-template class BOOST_REGEX_DECL match_results<BOOST_REGEX_CHAR_T const*, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<BOOST_REGEX_CHAR_T const*>::type)>;
-template class BOOST_REGEX_DECL match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>::type)>;
-
-
-#pragma warning(pop)
-
-# ifdef template
-# undef template
-# endif
-
-#elif !defined(BOOST_REGEX_HAS_DLL_RUNTIME)
-
-//
-// for each [member] function declare a full specialisation of that
-// [member] function, then instantiate it in one translation unit.
-// This is not guarenteed to work according to the standard, but in
-// practice it should work for all compilers (unless they use a realy
-// perverse name mangling convention). Unfortunately this approach
-// does *not* work for Win32 style import/export, because that can
-// alter the class layout.
-//
-
-# ifndef BOOST_REGEX_INSTANTIATE
-# define template template<>
-# endif
-
-template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)&);
-template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const BOOST_REGEX_CHAR_T* p, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f, const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)& a);
-template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const BOOST_REGEX_CHAR_T* p, size_type len, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f, const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)&);
-template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const reg_expression<BOOST_REGEX_CHAR_T>&);
-template reg_expression<BOOST_REGEX_CHAR_T>::~reg_expression();
-template reg_expression<BOOST_REGEX_CHAR_T>& BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator=(const reg_expression&);
-template BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::get_allocator()const;
-template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator==(const reg_expression<BOOST_REGEX_CHAR_T>&)const;
-template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator<(const reg_expression<BOOST_REGEX_CHAR_T>&)const;
-template BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::allocator()const;
-template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::set_expression(const BOOST_REGEX_CHAR_T* p, const BOOST_REGEX_CHAR_T* end, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f);
-template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_maps();
-template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_map(re_detail::re_syntax_base* node, unsigned char* _map, unsigned int* pnull, unsigned char mask, re_detail::re_syntax_base* terminal)const;
-template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::probe_start(re_detail::re_syntax_base* node, BOOST_REGEX_CHAR_T c, re_detail::re_syntax_base* terminal)const;
-template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::probe_start_null(re_detail::re_syntax_base* node, re_detail::re_syntax_base* terminal)const;
-template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::fixup_apply(re_detail::re_syntax_base* b, unsigned cbraces);
-template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::move_offsets(re_detail::re_syntax_base* j, unsigned size);
-template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
-template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set_aux(re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& singles, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& ranges, re_detail::jstack<boost::uint_fast32_t, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& classes, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& equivalents, bool isnot, const re_detail::_narrow_type&);
-template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set_aux(re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& singles, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& ranges, re_detail::jstack<boost::uint_fast32_t, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& classes, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& equivalents, bool isnot, const re_detail::_wide_type&);
-template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set_simple(re_detail::re_syntax_base* dat, unsigned long cls, bool isnot);
-template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::parse_inner_set(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
-template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::add_simple(re_detail::re_syntax_base* dat, re_detail::syntax_element_type type, unsigned int size);
-template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::add_literal(re_detail::re_syntax_base* dat, BOOST_REGEX_CHAR_T c);
-template BOOST_REGEX_CHAR_T BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::parse_escape(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
-template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::parse_range(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, unsigned& min, unsigned& max);
-template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::skip_space(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
-template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::probe_restart(re_detail::re_syntax_base* dat);
-template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::fixup_leading_rep(re_detail::re_syntax_base* dat, re_detail::re_syntax_base* end);
-template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::fail(unsigned int err);
-
-namespace re_detail{
-
-#define iterator const BOOST_REGEX_CHAR_T*
-#define Allocator match_results_base<iterator>::alloc_type
-#define size_type match_results_base<iterator>::size_type
-
-template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_first(iterator i);
-template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_first(iterator i, std::size_t pos);
-template match_results_base<iterator, Allocator>::match_results_base(const Allocator& a);
-template Allocator BOOST_REGEX_CALL match_results_base<iterator, Allocator>::allocator()const;
-template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::m_free();
-template bool match_results_base<iterator, Allocator>::operator==(const match_results_base<iterator, Allocator>& that)const;
-template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_type n);
-template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_type n, iterator i, iterator j);
-template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::cow();
-
-#undef iterator
-#undef Allocator
-#undef size_type
-
-} // namespace re_detail
-
-# ifdef template
-# undef template
-# endif
-
-#endif
-
-} // namespace boost
-
-#endif // BOOST_REGEX_NO_EXTERNAL_TEMPLATES
-
-
+++ /dev/null
-/*
- *
- * Copyright (c) 1998-2002
- * Dr John Maddock
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Dr John Maddock makes no representations
- * about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_compile.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Declares reg_expression<> member functions. This is
- * an internal header file, do not include directly.
- */
-
-#ifndef BOOST_REGEX_COMPILE_HPP
-#define BOOST_REGEX_COMPILE_HPP
-
-namespace boost{
-#ifdef __BORLANDC__
- #pragma option push -a8 -b -Vx -Ve -pc -w-8004
-#endif
- namespace re_detail{
-
-
-template <class traits>
-struct kmp_translator
-{
- typedef typename traits::char_type char_type;
- bool icase;
- const traits* pt;
- kmp_translator(bool c, traits* p) : icase(c), pt(p) {}
- char_type operator()(char_type c)
- {
- return pt->translate(c, icase);
- }
-};
-
-
-template <class charT, class traits_type, class Allocator>
-bool BOOST_REGEX_CALL re_maybe_set_member(charT c,
- const re_set_long* set_,
- const reg_expression<charT, traits_type, Allocator>& e)
-{
- const charT* p = reinterpret_cast<const charT*>(set_+1);
- bool icase = e.flags() & regbase::icase;
- charT col = e.get_traits().translate(c, icase);
- for(unsigned int i = 0; i < set_->csingles; ++i)
- {
- if(col == *p)
- return set_->isnot ? false : true;
-
- while(*p)++p;
- ++p; // skip null
- }
- return set_->isnot ? true : false;
-}
-
-} // namespace re_detail
-
-
-template <class charT, class traits, class Allocator>
-inline bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_wide_type&)
-{
- if((traits_size_type)(traits_uchar_type)c >= 256)
- return true;
- return BOOST_REGEX_MAKE_BOOL(_map[(traits_uchar_type)c] & mask);
-}
-
-template <class charT, class traits, class Allocator>
-inline bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_narrow_type&)
-{
- return BOOST_REGEX_MAKE_BOOL(_map[(traits_uchar_type)c] & mask);
-}
-
-template <class charT, class traits, class Allocator>
-reg_expression<charT, traits, Allocator>::reg_expression(const Allocator& a)
- : regbase(), data(a), pkmp(0), error_code_(REG_EMPTY), _expression(0)
-{
-}
-
-template <class charT, class traits, class Allocator>
-reg_expression<charT, traits, Allocator>::reg_expression(const charT* p, flag_type f, const Allocator& a)
- : data(a), pkmp(0), error_code_(REG_EMPTY), _expression(0)
-{
- set_expression(p, f | regbase::use_except);
-}
-
-template <class charT, class traits, class Allocator>
-reg_expression<charT, traits, Allocator>::reg_expression(const charT* p1, const charT* p2, flag_type f, const Allocator& a)
- : data(a), pkmp(0), error_code_(REG_EMPTY), _expression(0)
-{
- set_expression(p1, p2, f | regbase::use_except);
-}
-
-template <class charT, class traits, class Allocator>
-reg_expression<charT, traits, Allocator>::reg_expression(const charT* p, size_type len, flag_type f, const Allocator& a)
- : data(a), pkmp(0), error_code_(REG_EMPTY), _expression(0)
-{
- set_expression(p, p + len, f | regbase::use_except);
-}
-
-template <class charT, class traits, class Allocator>
-reg_expression<charT, traits, Allocator>::reg_expression(const reg_expression<charT, traits, Allocator>& e)
- : regbase(e), data(e.allocator()), pkmp(0), error_code_(REG_EMPTY), _expression(0)
-{
- //
- // we do a deep copy only if e is a valid expression, otherwise fail.
- //
- if(e.error_code() == 0)
- {
- const charT* pe = e.expression();
- set_expression(pe, pe + e._expression_len, e.flags() | regbase::use_except);
- }
- else
- {
- _flags = e.flags() & ~(regbase::use_except);
- fail(e.error_code());
- }
-}
-
-template <class charT, class traits, class Allocator>
-reg_expression<charT, traits, Allocator>::~reg_expression()
-{
- if(pkmp)
- re_detail::kmp_free(pkmp, data.allocator());
-}
-
-template <class charT, class traits, class Allocator>
-reg_expression<charT, traits, Allocator>& BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::operator=(const reg_expression<charT, traits, Allocator>& e)
-{
- //
- // we do a deep copy only if e is a valid expression, otherwise fail.
- //
- if(this == &e) return *this;
- _flags = use_except;
- fail(e.error_code());
- if(error_code() == 0)
- set_expression(e._expression, e._expression + e._expression_len, e.flags() | regbase::use_except);
- return *this;
-}
-
-template <class charT, class traits, class Allocator>
-inline bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::operator==(const reg_expression<charT, traits, Allocator>& e)const
-{
- return (_flags == e.flags())
- && (_expression_len == e._expression_len)
- && (std::memcmp(_expression, e._expression, _expression_len * sizeof(charT)) == 0);
-}
-
-template <class charT, class traits, class Allocator>
-bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::operator<(const reg_expression<charT, traits, Allocator>& e)const
-{
- //
- // we can't offer a diffinitive ordering, but we can be consistant:
- if(_flags != e.flags()) return _flags < e.flags();
- if(_expression_len != e._expression_len) return _expression_len < e._expression_len;
- return std::memcmp(expression(), e.expression(), _expression_len);
-}
-
-template <class charT, class traits, class Allocator>
-Allocator BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::allocator()const
-{
- return data.allocator();
-}
-
-template <class charT, class traits, class Allocator>
-Allocator BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::get_allocator()const
-{
- return data.allocator();
-}
-
-template <class charT, class traits, class Allocator>
-unsigned int BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::parse_inner_set(const charT*& first, const charT* last)
-{
- //
- // we have an inner [...] construct
- //
- jm_assert(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*first) == traits_type::syntax_open_set);
- const charT* base = first;
- while( (first != last)
- && (traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*first) != traits_type::syntax_close_set) )
- ++first;
- if(first == last)
- return 0;
- ++first;
- if((first-base) < 5)
- return 0;
- if(*(base+1) != *(first-2))
- return 0;
- unsigned int result = traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*(base+1));
- if((result == traits_type::syntax_colon) && ((first-base) == 5))
- {
- return traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*(base+2));
- }
- return ((result == traits_type::syntax_colon) || (result == traits_type::syntax_dot) || (result == traits_type::syntax_equal)) ? result : 0;
-}
-
-
-template <class charT, class traits, class Allocator>
-bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::skip_space(const charT*& first, const charT* last)
-{
- //
- // returns true if we get to last:
- //
- while((first != last) && (traits_inst.is_class(*first, traits_type::char_class_space) == true))
- {
- ++first;
- }
- return first == last;
-}
-
-template <class charT, class traits, class Allocator>
-void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::parse_range(const charT*& ptr, const charT* end, unsigned& min, unsigned& max)
-{
- //
- // we have {x} or {x,} or {x,y} NB no spaces inside braces
- // anything else is illegal
- // On input ptr points to "{"
- //
- ++ptr;
- if(skip_space(ptr, end))
- {
- fail(REG_EBRACE);
- return;
- }
- if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*ptr) != traits_type::syntax_digit)
- {
- fail(REG_BADBR);
- return;
- }
- min = traits_inst.toi(ptr, end, 10);
- if(skip_space(ptr, end))
- {
- fail(REG_EBRACE);
- return;
- }
- if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*ptr) == traits_type::syntax_comma)
- {
- //we have a second interval:
- ++ptr;
- if(skip_space(ptr, end))
- {
- fail(REG_EBRACE);
- return;
- }
- if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*ptr) == traits_type::syntax_digit)
- max = traits_inst.toi(ptr, end, 10);
- else
- max = (unsigned)-1;
- }
- else
- max = min;
-
- // validate input:
- if(skip_space(ptr, end))
- {
- fail(REG_EBRACE);
- return;
- }
- if(max < min)
- {
- fail(REG_ERANGE);
- return;
- }
- if(_flags & bk_braces)
- {
- if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*ptr) != traits_type::syntax_slash)
- {
- fail(REG_BADBR);
- return;
- }
- else
- {
- // back\ is OK now check the }
- ++ptr;
- if((ptr == end) || (traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*ptr) != traits_type::syntax_close_brace))
- {
- fail(REG_BADBR);
- return;
- }
- }
- }
- else if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*ptr) != traits_type::syntax_close_brace)
- {
- fail(REG_BADBR);
- return;
- }
-}
-
-template <class charT, class traits, class Allocator>
-charT BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::parse_escape(const charT*& first, const charT* last)
-{
- charT c(*first);
- traits_size_type c_unsigned = (traits_size_type)(traits_uchar_type)*first;
- // this is only used for the switch(), but cannot be folded in
- // due to a bug in Comeau 4.2.44beta3
- traits_size_type syntax = traits_inst.syntax_type(c_unsigned);
- switch(syntax)
- {
- case traits_type::syntax_a:
- c = '\a';
- ++first;
- break;
- case traits_type::syntax_f:
- c = '\f';
- ++first;
- break;
- case traits_type::syntax_n:
- c = '\n';
- ++first;
- break;
- case traits_type::syntax_r:
- c = '\r';
- ++first;
- break;
- case traits_type::syntax_t:
- c = '\t';
- ++first;
- break;
- case traits_type::syntax_v:
- c = '\v';
- ++first;
- break;
- case traits_type::syntax_x:
- ++first;
- if(first == last)
- {
- fail(REG_EESCAPE);
- break;
- }
- // maybe have \x{ddd}
- if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*first)) == traits_type::syntax_open_brace)
- {
- ++first;
- if(first == last)
- {
- fail(REG_EESCAPE);
- break;
- }
- if(traits_inst.is_class(*first, traits_type::char_class_xdigit) == false)
- {
- fail(REG_BADBR);
- break;
- }
- c = (charT)traits_inst.toi(first, last, -16);
- if((first == last) || (traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*first)) != traits_type::syntax_close_brace))
- {
- fail(REG_BADBR);
- }
- ++first;
- break;
- }
- else
- {
- if(traits_inst.is_class(*first, traits_type::char_class_xdigit) == false)
- {
- fail(REG_BADBR);
- break;
- }
- c = (charT)traits_inst.toi(first, last, -16);
- }
- break;
- case traits_type::syntax_c:
- ++first;
- if(first == last)
- {
- fail(REG_EESCAPE);
- break;
- }
- if(((traits_uchar_type)(*first) < (traits_uchar_type)'@')
- || ((traits_uchar_type)(*first) > (traits_uchar_type)127) )
- {
- fail(REG_EESCAPE);
- return (charT)0;
- }
- c = (charT)((traits_uchar_type)(*first) - (traits_uchar_type)'@');
- ++first;
- break;
- case traits_type::syntax_e:
- c = (charT)27;
- ++first;
- break;
- case traits_type::syntax_digit:
- c = (charT)traits_inst.toi(first, last, -8);
- break;
- default:
- //c = *first;
- ++first;
- }
- return c;
-}
-
-template <class charT, class traits, class Allocator>
-void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_maps()
-{
- re_detail::re_syntax_base* record = static_cast<re_detail::re_syntax_base*>(data.data());
- // always compile the first _map:
- std::memset(startmap, 0, 256);
- record->can_be_null = 0;
- compile_map(record, startmap, 0, re_detail::mask_all);
-
- while(record->type != re_detail::syntax_element_match)
- {
- if((record->type == re_detail::syntax_element_alt) || (record->type == re_detail::syntax_element_rep))
- {
- std::memset(&(static_cast<re_detail::re_jump*>(record)->_map), 0, 256);
- record->can_be_null = 0;
- compile_map(record->next.p, static_cast<re_detail::re_jump*>(record)->_map, &(record->can_be_null), re_detail::mask_take, static_cast<re_detail::re_jump*>(record)->alt.p);
- compile_map(static_cast<re_detail::re_jump*>(record)->alt.p, static_cast<re_detail::re_jump*>(record)->_map, &(record->can_be_null), re_detail::mask_skip);
- if(record->type == re_detail::syntax_element_rep)
- {
- re_detail::re_repeat* rep = static_cast<re_detail::re_repeat*>(record);
- // set whether this is a singleton repeat or not:
- if(rep->next.p->next.p->next.p == rep->alt.p)
- {
- rep->singleton = true;
- }
- else
- rep->singleton = false;
- }
- }
- else
- {
- record->can_be_null = 0;
- compile_map(record, 0, &(record->can_be_null), re_detail::mask_all);
- }
- record = record->next.p;
- }
- record->can_be_null = re_detail::mask_all;
-}
-
-template <class charT, class traits, class Allocator>
-bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::probe_start(
- re_detail::re_syntax_base* node, charT cc, re_detail::re_syntax_base* terminal) const
-{
- unsigned int c;
-
- switch(node->type)
- {
- case re_detail::syntax_element_startmark:
- if(static_cast<const re_detail::re_brace*>(node)->index == -1)
- {
- return probe_start(node->next.p->next.p, cc, terminal)
- && probe_start(static_cast<const re_detail::re_jump*>(node->next.p)->alt.p, cc, terminal);
- }
- // fall through:
- case re_detail::syntax_element_endmark:
- case re_detail::syntax_element_start_line:
- case re_detail::syntax_element_word_boundary:
- case re_detail::syntax_element_buffer_start:
- case re_detail::syntax_element_restart_continue:
- // doesn't tell us anything about the next character, so:
- return probe_start(node->next.p, cc, terminal);
- case re_detail::syntax_element_literal:
- // only the first character of the literal can match:
- // note these have already been translated:
- if(*reinterpret_cast<charT*>(static_cast<re_detail::re_literal*>(node)+1) == traits_inst.translate(cc, (_flags & regbase::icase)))
- return true;
- return false;
- case re_detail::syntax_element_end_line:
- // next character (if there is one!) must be a newline:
- if(traits_inst.is_separator(traits_inst.translate(cc, (_flags & regbase::icase))))
- return true;
- return false;
- case re_detail::syntax_element_wild:
- return true;
- case re_detail::syntax_element_match:
- return true;
- case re_detail::syntax_element_within_word:
- case re_detail::syntax_element_word_start:
- return traits_inst.is_class(traits_inst.translate(cc, (_flags & regbase::icase)), traits_type::char_class_word);
- case re_detail::syntax_element_word_end:
- // what follows must not be a word character,
- return traits_inst.is_class(traits_inst.translate(cc, (_flags & regbase::icase)), traits_type::char_class_word) ? false : true;
- case re_detail::syntax_element_buffer_end:
- // we can be null, nothing must follow,
- // NB we assume that this is followed by
- // re_detail::syntax_element_match, if its not then we can
- // never match anything anyway!!
- return false;
- case re_detail::syntax_element_soft_buffer_end:
- // we can be null, only newlines must follow,
- // NB we assume that this is followed by
- // re_detail::syntax_element_match, if its not then we can
- // never match anything anyway!!
- return traits_inst.is_separator(traits_inst.translate(cc, (_flags & regbase::icase)));
- case re_detail::syntax_element_backref:
- // there's no easy way to determine this
- // which is not to say it can't be done!
- // for now:
- return true;
- case re_detail::syntax_element_long_set:
- // we can not be null,
- // we need to add already translated values in the set
- // to values in the _map
- return re_detail::re_maybe_set_member(cc, static_cast<const re_detail::re_set_long*>(node), *this) || (re_detail::re_is_set_member(static_cast<const charT*>(&cc), static_cast<const charT*>(&cc+1), static_cast<re_detail::re_set_long*>(node), *this) != &cc);
- case re_detail::syntax_element_set:
- // set all the elements that are set in corresponding set:
- c = (traits_size_type)(traits_uchar_type)traits_inst.translate(cc, (_flags & regbase::icase));
- return static_cast<re_detail::re_set*>(node)->_map[c] != 0;
- case re_detail::syntax_element_jump:
- if(static_cast<re_detail::re_jump*>(node)->alt.p < node)
- {
- // backwards jump,
- // caused only by end of repeat section, we'll treat this
- // the same as a match, because the sub-expression has matched.
- if(node->next.p == terminal)
- return true; // null repeat - we can always take this
- else
- {
- //
- // take the jump, add in fix for the fact that if the
- // repeat that we're jumping to has non-zero minimum count
- // then we need to add in the possiblity that we could still
- // skip that repeat.
- re_detail::re_syntax_base* next = static_cast<re_detail::re_jump*>(node)->alt.p;
- bool b = probe_start(next, cc, terminal);
- if((next->type == re_detail::syntax_element_rep) && (static_cast<re_detail::re_repeat*>(next)->min != 0))
- {
- b = b || probe_start(static_cast<re_detail::re_jump*>(next)->alt.p, cc, terminal);
- }
- return b;
- }
- }
- else
- // take the jump and compile:
- return probe_start(static_cast<re_detail::re_jump*>(node)->alt.p, cc, terminal);
- case re_detail::syntax_element_alt:
- // we need to take the OR of the two alternatives:
- return probe_start(static_cast<re_detail::re_jump*>(node)->alt.p, cc, terminal) || probe_start(node->next.p, cc, terminal);
- case re_detail::syntax_element_rep:
- // we need to take the OR of the two alternatives
- if(static_cast<re_detail::re_repeat*>(node)->min == 0)
- return probe_start(node->next.p, cc, static_cast<re_detail::re_jump*>(node)->alt.p) || probe_start(static_cast<re_detail::re_jump*>(node)->alt.p, cc, terminal);
- else
- return probe_start(node->next.p, cc, static_cast<re_detail::re_jump*>(node)->alt.p);
- case re_detail::syntax_element_combining:
- return !traits_inst.is_combining(traits_inst.translate(cc, (_flags & regbase::icase)));
- }
- return false;
-}
-
-template <class charT, class traits, class Allocator>
-bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::probe_start_null(re_detail::re_syntax_base* node, re_detail::re_syntax_base* terminal)const
-{
- switch(node->type)
- {
- case re_detail::syntax_element_startmark:
- case re_detail::syntax_element_endmark:
- case re_detail::syntax_element_start_line:
- case re_detail::syntax_element_word_boundary:
- case re_detail::syntax_element_buffer_start:
- case re_detail::syntax_element_restart_continue:
- case re_detail::syntax_element_end_line:
- case re_detail::syntax_element_word_end:
- // doesn't tell us anything about the next character, so:
- return probe_start_null(node->next.p, terminal);
- case re_detail::syntax_element_match:
- case re_detail::syntax_element_buffer_end:
- case re_detail::syntax_element_soft_buffer_end:
- case re_detail::syntax_element_backref:
- return true;
- case re_detail::syntax_element_jump:
- if(static_cast<re_detail::re_jump*>(node)->alt.p < node)
- {
- // backwards jump,
- // caused only by end of repeat section, we'll treat this
- // the same as a match, because the sub-expression has matched.
- // this is only caused by NULL repeats as in "(a*)*" or "(\<)*"
- // these are really nonsensence and make the matching code much
- // harder, it would be nice to get rid of them altogether.
- if(node->next.p == terminal)
- return true;
- else
- return probe_start_null(static_cast<re_detail::re_jump*>(node)->alt.p, terminal);
- }
- else
- // take the jump and compile:
- return probe_start_null(static_cast<re_detail::re_jump*>(node)->alt.p, terminal);
- case re_detail::syntax_element_alt:
- // we need to take the OR of the two alternatives:
- return probe_start_null(static_cast<re_detail::re_jump*>(node)->alt.p, terminal) || probe_start_null(node->next.p, terminal);
- case re_detail::syntax_element_rep:
- // only need to consider skipping the repeat:
- return probe_start_null(static_cast<re_detail::re_jump*>(node)->alt.p, terminal);
- default:
- break;
- }
- return false;
-}
-
-template <class charT, class traits, class Allocator>
-void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_map(
- re_detail::re_syntax_base* node, unsigned char* _map,
- unsigned int* pnull, unsigned char mask, re_detail::re_syntax_base* terminal)const
-{
- if(_map)
- {
- for(unsigned int i = 0; i < 256; ++i)
- {
- if(probe_start(node, (charT)i, terminal))
- _map[i] |= mask;
- }
- }
- if(pnull && probe_start_null(node, terminal))
- *pnull |= mask;
-}
-
-template <class charT, class traits, class Allocator>
-void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::move_offsets(re_detail::re_syntax_base* j, unsigned size)
-{
-# ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable: 4127)
-#endif
- // move all offsets starting with j->link forward by size
- // called after an insert:
- j = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<char*>(data.data()) + j->next.i);
- while(true)
- {
- switch(j->type)
- {
- case re_detail::syntax_element_rep:
- static_cast<re_detail::re_jump*>(j)->alt.i += size;
- j->next.i += size;
- break;
- case re_detail::syntax_element_jump:
- case re_detail::syntax_element_alt:
- static_cast<re_detail::re_jump*>(j)->alt.i += size;
- j->next.i += size;
- break;
- default:
- j->next.i += size;
- break;
- }
- if(j->next.i == size)
- break;
- j = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<char*>(data.data()) + j->next.i);
- }
-# ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-}
-
-template <class charT, class traits, class Allocator>
-re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_set_simple(re_detail::re_syntax_base* dat, unsigned long cls, bool isnot)
-{
- typedef typename re_detail::is_byte<charT>::width_type width_type;
- re_detail::jstack<traits_string_type, Allocator> singles(64, data.allocator());
- re_detail::jstack<traits_string_type, Allocator> ranges(64, data.allocator());
- re_detail::jstack<boost::uint_fast32_t, Allocator> classes(64, data.allocator());
- re_detail::jstack<traits_string_type, Allocator> equivalents(64, data.allocator());
- classes.push(cls);
- if(dat)
- {
- data.align();
- dat->next.i = data.size();
- }
- return compile_set_aux(singles, ranges, classes, equivalents, isnot, width_type());
-}
-
-template <class charT, class traits, class Allocator>
-re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_set(const charT*& first, const charT* last)
-{
- re_detail::jstack<traits_string_type, Allocator> singles(64, data.allocator());
- re_detail::jstack<traits_string_type, Allocator> ranges(64, data.allocator());
- re_detail::jstack<boost::uint_fast32_t, Allocator> classes(64, data.allocator());
- re_detail::jstack<traits_string_type, Allocator> equivalents(64, data.allocator());
- bool has_digraphs = false;
- jm_assert(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*first) == traits_type::syntax_open_set);
- ++first;
- bool started = false;
- bool done = false;
- bool isnot = false;
-
- enum last_type
- {
- last_single,
- last_none,
- last_dash
- };
-
- unsigned l = last_none;
- traits_string_type s;
-
- while((first != last) && !done)
- {
- traits_size_type c = (traits_size_type)(traits_uchar_type)*first;
- // this is only used for the switch(), but cannot be folded in
- // due to a bug in Comeau 4.2.44beta3
- traits_size_type syntax = traits_inst.syntax_type(c);
- switch(syntax)
- {
- case traits_type::syntax_caret:
- if(!started && !isnot)
- {
- isnot = true;
- }
- else
- {
- s = (charT)c;
- goto char_set_literal;
- }
- break;
- case traits_type::syntax_open_set:
- {
- if((_flags & char_classes) == 0)
- {
- s = (charT)c;
- goto char_set_literal;
- }
- // check to see if we really have a class:
- const charT* base = first;
- // this is only used for the switch(), but cannot be folded in
- // due to a bug in Comeau 4.2.44beta3
- unsigned int inner_set = parse_inner_set(first, last);
- switch(inner_set)
- {
- case traits_type::syntax_colon:
- {
- if(l == last_dash)
- {
- fail(REG_ERANGE);
- return 0;
- }
- boost::uint_fast32_t id = traits_inst.lookup_classname(base+2, first-2);
- if(_flags & regbase::icase)
- {
- if((id == traits_type::char_class_upper) || (id == traits_type::char_class_lower))
- {
- id = traits_type::char_class_alpha;
- }
- }
- if(id == 0)
- {
- fail(REG_ECTYPE);
- return 0;
- }
- classes.push(id);
- started = true;
- l = last_none;
- }
- break;
- case traits_type::syntax_dot:
- //
- // we have a collating element [.collating-name.]
- //
- if(traits_inst.lookup_collatename(s, base+2, first-2))
- {
- --first;
- if(s.size() > 1)
- has_digraphs = true;
- if(s.size())goto char_set_literal;
- }
- fail(REG_ECOLLATE);
- return 0;
- case traits_type::syntax_equal:
- //
- // we have an equivalence class [=collating-name=]
- //
- if(traits_inst.lookup_collatename(s, base+2, first-2))
- {
- std::size_t len = s.size();
- if(len)
- {
- unsigned i = 0;
- while(i < len)
- {
- s[i] = traits_inst.translate(s[i], (_flags & regbase::icase));
- ++i;
- }
- traits_string_type s2;
- traits_inst.transform_primary(s2, s);
- equivalents.push(s2);
- started = true;
- l = last_none;
- break;
- }
- }
- fail(REG_ECOLLATE);
- return 0;
- case traits_type::syntax_left_word:
- if((started == false) && (traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*first) == traits_type::syntax_close_set))
- {
- ++first;
- return add_simple(0, re_detail::syntax_element_word_start);
- }
- fail(REG_EBRACK);
- return 0;
- case traits_type::syntax_right_word:
- if((started == false) && (traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*first) == traits_type::syntax_close_set))
- {
- ++first;
- return add_simple(0, re_detail::syntax_element_word_end);
- }
- fail(REG_EBRACK);
- return 0;
- default:
- if(started == false)
- {
- unsigned int t = traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*(base+1));
- if((t != traits_type::syntax_colon) && (t != traits_type::syntax_dot) && (t != traits_type::syntax_equal))
- {
- first = base;
- s = (charT)c;
- goto char_set_literal;
- }
- }
- fail(REG_EBRACK);
- return 0;
- }
- if(first == last)
- {
- fail(REG_EBRACK);
- return 0;
- }
- continue;
- }
- case traits_type::syntax_close_set:
- if(started == false)
- {
- s = (charT)c;
- goto char_set_literal;
- }
- done = true;
- break;
- case traits_type::syntax_dash:
- if(!started)
- {
- s = (charT)c;
- goto char_set_literal;
- }
- ++first;
- if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*first) == traits_type::syntax_close_set)
- {
- --first;
- s = (charT)c;
- goto char_set_literal;
- }
- if((singles.empty() == true) || (l != last_single))
- {
- fail(REG_ERANGE);
- return 0;
- }
- ranges.push(singles.peek());
- if(singles.peek().size() <= 1) // leave digraphs and ligatures in place
- singles.pop();
- l = last_dash;
- continue;
- case traits_type::syntax_slash:
- if(_flags & regbase::escape_in_lists)
- {
- ++first;
- if(first == last)
- continue;
- traits_size_type c = (traits_size_type)(traits_uchar_type)*first;
- // this is only used for the switch(), but cannot be folded in
- // due to a bug in Comeau 4.2.44beta3
- traits_size_type syntax = traits_inst.syntax_type(c);
- switch(syntax)
- {
- case traits_type::syntax_w:
- if(l == last_dash)
- {
- fail(REG_ERANGE);
- return 0;
- }
- classes.push(traits_type::char_class_word);
- started = true;
- l = last_none;
- ++first;
- continue;
- case traits_type::syntax_d:
- if(l == last_dash)
- {
- fail(REG_ERANGE);
- return 0;
- }
- classes.push(traits_type::char_class_digit);
- started = true;
- l = last_none;
- ++first;
- continue;
- case traits_type::syntax_s:
- if(l == last_dash)
- {
- fail(REG_ERANGE);
- return 0;
- }
- classes.push(traits_type::char_class_space);
- started = true;
- l = last_none;
- ++first;
- continue;
- case traits_type::syntax_l:
- if(l == last_dash)
- {
- fail(REG_ERANGE);
- return 0;
- }
- classes.push(traits_type::char_class_lower);
- started = true;
- l = last_none;
- ++first;
- continue;
- case traits_type::syntax_u:
- if(l == last_dash)
- {
- fail(REG_ERANGE);
- return 0;
- }
- classes.push(traits_type::char_class_upper);
- started = true;
- l = last_none;
- ++first;
- continue;
- case traits_type::syntax_W:
- case traits_type::syntax_D:
- case traits_type::syntax_S:
- case traits_type::syntax_U:
- case traits_type::syntax_L:
- fail(REG_EESCAPE);
- return 0;
- default:
- c = parse_escape(first, last);
- --first;
- s = (charT)c;
- goto char_set_literal;
- }
- }
- else
- {
- s = (charT)c;
- goto char_set_literal;
- }
- default:
- s = (charT)c;
- char_set_literal:
- unsigned i = 0;
- // get string length to stop us going past the end of string (DWA)
- std::size_t len = s.size();
- while(i < len)
- {
- s[i] = traits_inst.translate(s[i], (_flags & regbase::icase));
- ++i;
- }
- started = true;
- if(l == last_dash)
- {
- ranges.push(s);
- l = last_none;
- if(s.size() > 1) // add ligatures to singles list as well
- singles.push(s);
- }
- else
- {
- singles.push(s);
- l = last_single;
- }
- }
- ++first;
- }
- if(!done)
- return 0;
-
- typedef typename re_detail::is_byte<charT>::width_type width_type;
-
- re_detail::re_syntax_base* result;
- if(has_digraphs)
- result = compile_set_aux(singles, ranges, classes, equivalents, isnot, re_detail::_wide_type());
- else
- result = compile_set_aux(singles, ranges, classes, equivalents, isnot, width_type());
- #ifdef __BORLANDC__
- // delayed throw:
- if((result == 0) && (_flags & regbase::use_except))
- fail(error_code());
- #endif
- return result;
-}
-
-template <class charT, class traits, class Allocator>
-re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_wide_type&)
-{
- size_type base = data.size();
- data.extend(sizeof(re_detail::re_set_long));
- unsigned int csingles = 0;
- unsigned int cranges = 0;
- boost::uint_fast32_t cclasses = 0;
- unsigned int cequivalents = 0;
- bool nocollate_state = flags() & regbase::nocollate;
-
- while(singles.empty() == false)
- {
- ++csingles;
- const traits_string_type& s = singles.peek();
- std::size_t len = (s.size() + 1) * sizeof(charT);
- std::memcpy(reinterpret_cast<charT*>(data.extend(len)), s.c_str(), len);
- singles.pop();
- }
- while(ranges.empty() == false)
- {
- traits_string_type c1, c2;
- if(nocollate_state)
- c1 = ranges.peek();
- else
- traits_inst.transform(c1, ranges.peek());
- ranges.pop();
- if(nocollate_state)
- c2 = ranges.peek();
- else
- traits_inst.transform(c2, ranges.peek());
- ranges.pop();
- if(c1 < c2)
- {
- // for some reason bc5 crashes when throwing exceptions
- // from here - probably an EH-compiler bug, but hard to
- // be sure...
- // delay throw to later:
- #ifdef __BORLANDC__
- boost::uint_fast32_t f = _flags;
- _flags &= ~regbase::use_except;
- #endif
- fail(REG_ERANGE);
- #ifdef __BORLANDC__
- _flags = f;
- #endif
- return 0;
- }
- ++cranges;
- std::size_t len = (re_detail::re_strlen(c1.c_str()) + 1) * sizeof(charT);
- std::memcpy(data.extend(len), c1.c_str(), len);
- len = (re_detail::re_strlen(c2.c_str()) + 1) * sizeof(charT);
- std::memcpy(data.extend(len), c2.c_str(), len);
- }
- while(classes.empty() == false)
- {
- cclasses |= classes.peek();
- classes.pop();
- }
- while(equivalents.empty() == false)
- {
- ++cequivalents;
- const traits_string_type& s = equivalents.peek();
- std::size_t len = (re_detail::re_strlen(s.c_str()) + 1) * sizeof(charT);
- std::memcpy(reinterpret_cast<charT*>(data.extend(len)), s.c_str(), len);
- equivalents.pop();
- }
-
- re_detail::re_set_long* dat = reinterpret_cast<re_detail::re_set_long*>(reinterpret_cast<unsigned char*>(data.data()) + base);
- dat->type = re_detail::syntax_element_long_set;
- dat->csingles = csingles;
- dat->cranges = cranges;
- dat->cclasses = cclasses;
- dat->cequivalents = cequivalents;
- dat->isnot = isnot;
- dat->next.i = 0;
- return dat;
-}
-
-template <class charT, class traits, class Allocator>
-re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_narrow_type&)
-{
- re_detail::re_set* dat = reinterpret_cast<re_detail::re_set*>(data.extend(sizeof(re_detail::re_set)));
- std::memset(dat, 0, sizeof(re_detail::re_set));
-
- while(singles.empty() == false)
- {
- dat->_map[(traits_size_type)(traits_uchar_type)*(singles.peek().c_str())] = re_detail::mask_all;
- singles.pop();
- }
- while(ranges.empty() == false)
- {
- traits_string_type c1, c2, c3, c4;
-
- if(flags() & regbase::nocollate)
- c1 = ranges.peek();
- else
- traits_inst.transform(c1, ranges.peek());
- ranges.pop();
- if(flags() & regbase::nocollate)
- c2 = ranges.peek();
- else
- traits_inst.transform(c2, ranges.peek());
- ranges.pop();
-
- if(c1 < c2)
- {
- // for some reason bc5 crashes when throwing exceptions
- // from here - probably an EH-compiler bug, but hard to
- // be sure...
- // delay throw to later:
- #ifdef __BORLANDC__
- boost::uint_fast32_t f = _flags;
- _flags &= ~regbase::use_except;
- #endif
- fail(REG_ERANGE);
- #ifdef __BORLANDC__
- _flags = f;
- #endif
- return 0;
- }
- for(unsigned int i = 0; i < 256; ++i)
- {
- c4 = (charT)i;
- if(flags() & regbase::nocollate)
- c3 = c4;
- else
- traits_inst.transform(c3, c4);
- if((c3 <= c1) && (c3 >= c2))
- dat->_map[i] = re_detail::mask_all;
- }
- }
- while(equivalents.empty() == false)
- {
- traits_string_type c1, c2;
- for(unsigned int i = 0; i < 256; ++i)
- {
- c2 = (charT)i;
- traits_inst.transform_primary(c1, c2);
- if(c1 == equivalents.peek())
- dat->_map[i] = re_detail::mask_all;
- }
- equivalents.pop();
- }
-
- boost::uint_fast32_t flags = 0;
- while(classes.empty() == false)
- {
- flags |= classes.peek();
- classes.pop();
- }
- if(flags)
- {
- for(unsigned int i = 0; i < 256; ++i)
- {
- if(traits_inst.is_class(charT(i), flags))
- dat->_map[(traits_uchar_type)traits_inst.translate((charT)i, (_flags & regbase::icase))] = re_detail::mask_all;
- }
- }
-
- if(isnot)
- {
- for(unsigned int i = 0; i < 256; ++i)
- {
- dat->_map[i] = !dat->_map[i];
- }
- }
-
- dat->type = re_detail::syntax_element_set;
- dat->next.i = 0;
- return dat;
-}
-
-#ifndef __CODEGUARD__
-// this must not be inline when Borland's codeguard support is turned
-// on, otherwise we _will_ get surious codeguard errors...
-inline
-#endif
- re_detail::re_syntax_base* add_offset(void* base, std::ptrdiff_t off)
-{
- return reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<char*>(base) + off);
-}
-
-
-template <class charT, class traits, class Allocator>
-void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::fixup_apply(re_detail::re_syntax_base* b, unsigned cbraces)
-{
- typedef typename boost::detail::rebind_allocator<bool, Allocator>::type b_alloc;
-
- register unsigned char* base = reinterpret_cast<unsigned char*>(b);
- register re_detail::re_syntax_base* ptr = b;
- bool* pb = 0;
- b_alloc a(data.allocator());
-#ifndef BOOST_NO_EXCEPTIONS
- try
- {
-#endif
- pb = a.allocate(cbraces);
- BOOST_REGEX_NOEH_ASSERT(pb)
- for(unsigned i = 0; i < cbraces; ++i)
- pb[i] = false;
-
- repeats = 0;
-
- while(ptr->next.i)
- {
- switch(ptr->type)
- {
- case re_detail::syntax_element_rep:
- jm_assert(data.size() > static_cast<re_detail::re_jump*>(ptr)->alt.i);
- static_cast<re_detail::re_jump*>(ptr)->alt.p = add_offset(base, static_cast<re_detail::re_jump*>(ptr)->alt.i);
-#ifdef BOOST_REGEX_DEBUG
- if((re_detail::padding_mask & reinterpret_cast<int>(static_cast<re_detail::re_jump*>(ptr)->alt.p)) && (static_cast<re_detail::re_jump*>(ptr)->alt.p != b))
- {
- jm_trace("padding mis-aligment in repeat jump to object type: " << static_cast<re_detail::re_jump*>(ptr)->alt.p->type)
- //jm_assert(0 == (padding_mask & (int)((re_detail::re_jump*)ptr)->alt.p));
- }
-#endif
- static_cast<re_detail::re_repeat*>(ptr)->id = repeats;
- ++repeats;
- goto rebase;
- case re_detail::syntax_element_jump:
- case re_detail::syntax_element_alt:
- jm_assert(data.size() > static_cast<re_detail::re_jump*>(ptr)->alt.i);
- static_cast<re_detail::re_jump*>(ptr)->alt.p = add_offset(base, static_cast<re_detail::re_jump*>(ptr)->alt.i);
-#ifdef BOOST_REGEX_DEBUG
- if((re_detail::padding_mask & reinterpret_cast<int>(static_cast<re_detail::re_jump*>(ptr)->alt.p) && (static_cast<re_detail::re_jump*>(ptr)->alt.p != b)))
- {
- jm_trace("padding mis-aligment in alternation jump to object type: " << static_cast<re_detail::re_jump*>(ptr)->alt.p->type)
- //jm_assert(0 == (padding_mask & (int)((re_detail::re_jump*)ptr)->alt.p));
- }
-#endif
- goto rebase;
- case re_detail::syntax_element_backref:
- if((static_cast<re_detail::re_brace*>(ptr)->index >= (int)cbraces) || (pb[static_cast<re_detail::re_brace*>(ptr)->index] == false) )
- {
- fail(REG_ESUBREG);
- a.deallocate(pb, cbraces);
- return;
- }
- goto rebase;
- case re_detail::syntax_element_endmark:
- if(static_cast<re_detail::re_brace*>(ptr)->index > 0)
- pb[static_cast<re_detail::re_brace*>(ptr)->index] = true;
- goto rebase;
- default:
- rebase:
- jm_assert(data.size() > ptr->next.i);
- ptr->next.p = add_offset(base, ptr->next.i);
-#ifdef BOOST_REGEX_DEBUG
- if((re_detail::padding_mask & (int)(ptr->next.p)) && (static_cast<re_detail::re_jump*>(ptr)->alt.p != b))
- {
- jm_trace("padding mis-alignment in next record of type " << ptr->next.p->type)
- jm_assert(0 == (re_detail::padding_mask & (int)(ptr->next.p)));
- }
-#endif
- ptr = ptr->next.p;
- }
- }
- a.deallocate(pb, cbraces);
- pb = 0;
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(...)
- {
- if(pb)
- a.deallocate(pb, cbraces);
- throw;
- }
-#endif
-}
-
-
-template <class charT, class traits, class Allocator>
-unsigned int BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::set_expression(const charT* p, const charT* end, flag_type f)
-{
-# ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable: 4127)
-#endif
-
- if(p == expression())
- {
- traits_string_type s(p, end);
- return set_expression(s.c_str(), s.c_str() + s.size(), f);
- }
- typedef typename traits_type::sentry sentry_t;
- sentry_t sent(traits_inst);
- if(sent){
-
- const charT* base = p;
- data.clear();
- _flags = f;
- fail(REG_NOERROR); // clear any error
-
- if(p >= end)
- {
- fail(REG_EMPTY);
- return error_code();
- }
-
- const charT* ptr = p;
- marks = 0;
- re_detail::jstack<std::size_t, Allocator> mark(64, data.allocator());
- re_detail::jstack<int, Allocator> markid(64, data.allocator());
- std::size_t last_mark_popped = 0;
- register traits_size_type c;
- register re_detail::re_syntax_base* dat;
-
- unsigned rep_min = 0;
- unsigned rep_max = 0;
-
- //
- // set up header:
- //
- ++marks;
- dat = 0;
-
- if(_flags & regbase::literal)
- {
- while(ptr != end)
- {
- dat = add_literal(dat, traits_inst.translate(*ptr, (_flags & regbase::icase)));
- ++ptr;
- }
- }
-
- while (ptr < end)
- {
- c = (traits_size_type)(traits_uchar_type)*ptr;
- // this is only used for the switch(), but cannot be folded in
- // due to a bug in Comeau 4.2.44beta3
- traits_size_type syntax = traits_inst.syntax_type(c);
- switch(syntax)
- {
- case traits_type::syntax_open_bracket:
- if(_flags & bk_parens)
- {
- dat = add_literal(dat, (charT)c);
- ++ptr;
- continue;
- }
- open_bracked_jump:
- // extend:
- dat = add_simple(dat, re_detail::syntax_element_startmark, sizeof(re_detail::re_brace));
- markid.push(marks);
- static_cast<re_detail::re_brace*>(dat)->index = marks++;
- mark.push(data.index(dat));
- ++ptr;
- //
- // check for perl like (?...) extention syntax
- c = (traits_size_type)(traits_uchar_type)*ptr;
- if(((_flags & bk_parens) == 0) && (traits_type::syntax_question == traits_inst.syntax_type(c)))
- {
- ++ptr;
- c = (traits_size_type)(traits_uchar_type)*ptr;
- // this is only used for the switch(), but cannot be folded in
- // due to a bug in Comeau 4.2.44beta3
- traits_size_type syntax = traits_inst.syntax_type(c);
- switch(syntax)
- {
- case traits_type::syntax_colon:
- static_cast<re_detail::re_brace*>(dat)->index = 0;
- --marks;
- markid.pop();
- markid.push(0);
- ++ptr;
- continue;
- case traits_type::syntax_equal:
- static_cast<re_detail::re_brace*>(dat)->index = -1;
- markid.pop();
- markid.push(-1);
- common_forward_assert:
- --marks;
- ++ptr;
- // extend:
- dat = add_simple(dat, re_detail::syntax_element_jump, re_detail::re_jump_size);
- data.align();
- //
- // we don't know what value to put here yet,
- // use an arbitrarily large value for now
- // and check it later:
- static_cast<re_detail::re_jump*>(dat)->alt.i = INT_MAX/2;
- mark.push(data.size() - re_detail::re_jump_size);
- continue;
- case traits_type::syntax_not:
- static_cast<re_detail::re_brace*>(dat)->index = -2;
- markid.pop();
- markid.push(-2);
- goto common_forward_assert;
- case traits_type::syntax_hash:
- // comment just skip it:
- static_cast<re_detail::re_brace*>(dat)->index = 0;
- --marks;
- markid.pop();
- mark.pop();
- do{
- ++ptr;
- c = (traits_size_type)(traits_uchar_type)*ptr;
- }while(traits_type::syntax_close_bracket != traits_inst.syntax_type(c));
- ++ptr;
- continue;
- default:
- //
- // error, return to standard parsing and let that handle the error:
- --ptr;
- continue;
- }
- }
- break;
- case traits_type::syntax_close_bracket:
- if(_flags & bk_parens)
- {
- dat = add_literal(dat, (charT)c);
- ++ptr;
- continue;
- }
-
- close_bracked_jump:
- if(dat)
- {
- data.align();
- dat->next.i = data.size();
- }
-
- if(mark.empty())
- {
- fail(REG_EPAREN);
- return error_code();
- }
- // see if we have an empty alternative:
- if(mark.peek() == data.index(dat) )
- {
- re_detail::re_syntax_base* para = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<char*>(data.data()) + mark.peek());
- if(para->type == re_detail::syntax_element_jump)
- {
- fail(REG_EMPTY);
- return error_code();
- }
- }
-
- // pop any pushed alternatives and set the target end destination:
- dat = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<unsigned char*>(data.data()) + mark.peek());
- while(dat->type == re_detail::syntax_element_jump)
- {
- static_cast<re_detail::re_jump*>(dat)->alt.i = data.size();
- mark.pop();
- if(mark.empty())
- {
- fail(REG_EPAREN);
- return error_code();
- }
- dat = reinterpret_cast<re_detail::re_jump*>(reinterpret_cast<unsigned char*>(data.data()) + mark.peek());
- }
-
- dat = add_simple(0, re_detail::syntax_element_endmark, sizeof(re_detail::re_brace));
- static_cast<re_detail::re_brace*>(dat)->index = markid.peek();
- markid.pop();
- last_mark_popped = mark.peek();
- mark.pop();
- ++ptr;
- break;
- case traits_type::syntax_char:
- dat = add_literal(dat, (charT)c);
- ++ptr;
- break;
- case traits_type::syntax_slash:
- {
- if(++ptr == end)
- {
- fail(REG_EESCAPE);
- return error_code();
- }
- c = (traits_size_type)(traits_uchar_type)*ptr;
- // this is only used for the switch(), but cannot be folded in
- // due to a bug in Comeau 4.2.44beta3
- traits_size_type syntax = traits_inst.syntax_type(c);
- switch(syntax)
- {
- case traits_type::syntax_open_bracket:
- if(_flags & bk_parens)
- goto open_bracked_jump;
- break;
- case traits_type::syntax_close_bracket:
- if(_flags & bk_parens)
- goto close_bracked_jump;
- break;
- case traits_type::syntax_plus:
- if((_flags & bk_plus_qm) && ((_flags & limited_ops) == 0))
- {
- rep_min = 1;
- rep_max = (unsigned)-1;
- goto repeat_jump;
- }
- break;
- case traits_type::syntax_question:
- if((_flags & bk_plus_qm) && ((_flags & limited_ops) == 0))
- {
- rep_min = 0;
- rep_max = 1;
- goto repeat_jump;
- }
- break;
- case traits_type::syntax_or:
- if(((_flags & bk_vbar) == 0) || (_flags & limited_ops))
- break;
- goto alt_string_jump;
- case traits_type::syntax_open_brace:
- if( ((_flags & bk_braces) == 0) || ((_flags & intervals) == 0))
- break;
-
- // we have {x} or {x,} or {x,y}:
- parse_range(ptr, end, rep_min, rep_max);
- goto repeat_jump;
-
- case traits_type::syntax_digit:
- if(_flags & bk_refs)
- {
- // update previous:
- int i = traits_inst.toi((charT)c);
- if(i == 0)
- {
- // we can have \025 which means take char whose
- // code is 25 (octal), so parse string:
- c = traits_inst.toi(ptr, end, -8);
- --ptr;
- break;
- }
- dat = add_simple(dat, re_detail::syntax_element_backref, sizeof(re_detail::re_brace));
- static_cast<re_detail::re_brace*>(dat)->index = i;
- ++ptr;
- continue;
- }
- break;
- case traits_type::syntax_b: // re_detail::syntax_element_word_boundary
- dat = add_simple(dat, re_detail::syntax_element_word_boundary);
- ++ptr;
- continue;
- case traits_type::syntax_B:
- dat = add_simple(dat, re_detail::syntax_element_within_word);
- ++ptr;
- continue;
- case traits_type::syntax_left_word:
- dat = add_simple(dat, re_detail::syntax_element_word_start);
- ++ptr;
- continue;
- case traits_type::syntax_right_word:
- dat = add_simple(dat, re_detail::syntax_element_word_end);
- ++ptr;
- continue;
- case traits_type::syntax_w: //re_detail::syntax_element_word_char
- dat = compile_set_simple(dat, traits_type::char_class_word);
- ++ptr;
- continue;
- case traits_type::syntax_W:
- dat = compile_set_simple(dat, traits_type::char_class_word, true);
- ++ptr;
- continue;
- case traits_type::syntax_d: //re_detail::syntax_element_word_char
- dat = compile_set_simple(dat, traits_type::char_class_digit);
- ++ptr;
- continue;
- case traits_type::syntax_D:
- dat = compile_set_simple(dat, traits_type::char_class_digit, true);
- ++ptr;
- continue;
- case traits_type::syntax_s: //re_detail::syntax_element_word_char
- dat = compile_set_simple(dat, traits_type::char_class_space);
- ++ptr;
- continue;
- case traits_type::syntax_S:
- dat = compile_set_simple(dat, traits_type::char_class_space, true);
- ++ptr;
- continue;
- case traits_type::syntax_l: //re_detail::syntax_element_word_char
- dat = compile_set_simple(dat, traits_type::char_class_lower);
- ++ptr;
- continue;
- case traits_type::syntax_L:
- dat = compile_set_simple(dat, traits_type::char_class_lower, true);
- ++ptr;
- continue;
- case traits_type::syntax_u: //re_detail::syntax_element_word_char
- dat = compile_set_simple(dat, traits_type::char_class_upper);
- ++ptr;
- continue;
- case traits_type::syntax_U:
- dat = compile_set_simple(dat, traits_type::char_class_upper, true);
- ++ptr;
- continue;
- case traits_type::syntax_Q:
- ++ptr;
- while(true)
- {
- if(ptr == end)
- {
- fail(REG_EESCAPE);
- return error_code();
- }
- if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*ptr) == traits_type::syntax_slash)
- {
- ++ptr;
- if((ptr != end) && (traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*ptr) == traits_type::syntax_E))
- break;
- else
- {
- dat = add_literal(dat, *(ptr-1));
- continue;
- }
- }
- dat = add_literal(dat, *ptr);
- ++ptr;
- }
- ++ptr;
- continue;
- case traits_type::syntax_C:
- dat = add_simple(dat, re_detail::syntax_element_wild);
- ++ptr;
- continue;
- case traits_type::syntax_X:
- dat = add_simple(dat, re_detail::syntax_element_combining);
- ++ptr;
- continue;
- case traits_type::syntax_Z:
- dat = add_simple(dat, re_detail::syntax_element_soft_buffer_end);
- ++ptr;
- continue;
- case traits_type::syntax_G:
- dat = add_simple(dat, re_detail::syntax_element_restart_continue);
- ++ptr;
- continue;
- case traits_type::syntax_start_buffer:
- dat = add_simple(dat, re_detail::syntax_element_buffer_start);
- ++ptr;
- continue;
- case traits_type::syntax_end_buffer:
- dat = add_simple(dat, re_detail::syntax_element_buffer_end);
- ++ptr;
- continue;
- default:
- c = (traits_size_type)(traits_uchar_type)parse_escape(ptr, end);
- dat = add_literal(dat, (charT)c);
- continue;
- }
- dat = add_literal(dat, (charT)c);
- ++ptr;
- break;
- }
- case traits_type::syntax_dollar:
- dat = add_simple(dat, re_detail::syntax_element_end_line, sizeof(re_detail::re_syntax_base));
- ++ptr;
- continue;
- case traits_type::syntax_caret:
- dat = add_simple(dat, re_detail::syntax_element_start_line, sizeof(re_detail::re_syntax_base));
- ++ptr;
- continue;
- case traits_type::syntax_dot:
- dat = add_simple(dat, re_detail::syntax_element_wild, sizeof(re_detail::re_syntax_base));
- ++ptr;
- continue;
- case traits_type::syntax_star:
- rep_min = 0;
- rep_max = (unsigned)-1;
-
- repeat_jump:
- {
- std::ptrdiff_t offset;
- if(dat == 0)
- {
- fail(REG_BADRPT);
- return error_code();
- }
- switch(dat->type)
- {
- case re_detail::syntax_element_endmark:
- offset = last_mark_popped;
- break;
- case re_detail::syntax_element_literal:
- if(static_cast<re_detail::re_literal*>(dat)->length > 1)
- {
- // update previous:
- charT lit = *reinterpret_cast<charT*>(reinterpret_cast<char*>(dat) + sizeof(re_detail::re_literal) + ((static_cast<re_detail::re_literal*>(dat)->length-1)*sizeof(charT)));
- --static_cast<re_detail::re_literal*>(dat)->length;
- dat = add_simple(dat, re_detail::syntax_element_literal, sizeof(re_detail::re_literal) + sizeof(charT));
- static_cast<re_detail::re_literal*>(dat)->length = 1;
- *reinterpret_cast<charT*>(static_cast<re_detail::re_literal*>(dat)+1) = lit;
- }
- offset = reinterpret_cast<char*>(dat) - reinterpret_cast<char*>(data.data());
- break;
- case re_detail::syntax_element_backref:
- case re_detail::syntax_element_long_set:
- case re_detail::syntax_element_set:
- case re_detail::syntax_element_wild:
- case re_detail::syntax_element_combining:
- // we're repeating a single item:
- offset = reinterpret_cast<char*>(dat) - reinterpret_cast<char*>(data.data());
- break;
- default:
- fail(REG_BADRPT);
- return error_code();
- }
- data.align();
- dat->next.i = data.size();
- //unsigned pos = (char*)dat - (char*)data.data();
-
- // add the trailing jump:
- dat = add_simple(dat, re_detail::syntax_element_jump, re_detail::re_jump_size);
- static_cast<re_detail::re_jump*>(dat)->alt.i = 0;
-
- // now insert the leading repeater:
- dat = static_cast<re_detail::re_syntax_base*>(data.insert(offset, re_detail::re_repeater_size));
- dat->next.i = (reinterpret_cast<char*>(dat) - reinterpret_cast<char*>(data.data())) + re_detail::re_repeater_size;
- dat->type = re_detail::syntax_element_rep;
- static_cast<re_detail::re_repeat*>(dat)->alt.i = data.size();
- static_cast<re_detail::re_repeat*>(dat)->min = rep_min;
- static_cast<re_detail::re_repeat*>(dat)->max = rep_max;
- static_cast<re_detail::re_repeat*>(dat)->leading = false;
- static_cast<re_detail::re_repeat*>(dat)->greedy = true;
- move_offsets(dat, re_detail::re_repeater_size);
- ++ptr;
- //
- // now check to see if we have a non-greedy repeat:
- if((ptr != end) && (_flags & (limited_ops | bk_plus_qm | bk_braces)) == 0)
- {
- c = (traits_size_type)(traits_uchar_type)*ptr;
- if(traits_type::syntax_question == traits_inst.syntax_type(c))
- {
- // OK repeat is non-greedy:
- static_cast<re_detail::re_repeat*>(dat)->greedy = false;
- ++ptr;
- }
- }
- dat = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<char*>(data.data()) + data.size() - re_detail::re_jump_size);
- static_cast<re_detail::re_repeat*>(dat)->alt.i = offset;
- continue;
- }
- case traits_type::syntax_plus:
- if(_flags & (bk_plus_qm | limited_ops))
- {
- dat = add_literal(dat, (charT)c);
- ++ptr;
- continue;
- }
- rep_min = 1;
- rep_max = (unsigned)-1;
- goto repeat_jump;
- case traits_type::syntax_question:
- if(_flags & (bk_plus_qm | limited_ops))
- {
- dat = add_literal(dat, (charT)c);
- ++ptr;
- continue;
- }
- rep_min = 0;
- rep_max = 1;
- goto repeat_jump;
- case traits_type::syntax_open_set:
- // update previous:
- if(dat)
- {
- data.align();
- dat->next.i = data.size();
- }
- // extend:
- dat = compile_set(ptr, end);
- if(dat == 0)
- {
- if((_flags & regbase::failbit) == 0)
- fail(REG_EBRACK);
- return error_code();
- }
- break;
- case traits_type::syntax_or:
- {
- if(_flags & (bk_vbar | limited_ops))
- {
- dat = add_literal(dat, (charT)c);
- ++ptr;
- continue;
- }
-
- alt_string_jump:
-
- // update previous:
- if(dat == 0)
- {
- // start of pattern can't have empty "|"
- fail(REG_EMPTY);
- return error_code();
- }
- // see if we have an empty alternative:
- if(mark.empty() == false)
- if(mark.peek() == data.index(dat))
- {
- fail(REG_EMPTY);
- return error_code();
- }
- // extend:
- dat = add_simple(dat, re_detail::syntax_element_jump, re_detail::re_jump_size);
- data.align();
- //
- // we don't know what value to put here yet,
- // use an arbitrarily large value for now
- // and check it later (TODO!)
- static_cast<re_detail::re_jump*>(dat)->alt.i = INT_MAX/2;
-
- // now work out where to insert:
- std::size_t offset = 0;
- if(mark.empty() == false)
- {
- // we have a '(' or '|' to go back to:
- offset = mark.peek();
- re_detail::re_syntax_base* base = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<unsigned char*>(data.data()) + offset);
- offset = base->next.i;
- }
- re_detail::re_jump* j = static_cast<re_detail::re_jump*>(data.insert(offset, re_detail::re_jump_size));
- j->type = re_detail::syntax_element_alt;
- j->next.i = offset + re_detail::re_jump_size;
- j->alt.i = data.size();
- move_offsets(j, re_detail::re_jump_size);
- dat = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<unsigned char*>(data.data()) + data.size() - re_detail::re_jump_size);
- mark.push(data.size() - re_detail::re_jump_size);
- ++ptr;
- break;
- }
- case traits_type::syntax_open_brace:
- if((_flags & bk_braces) || ((_flags & intervals) == 0))
- {
- dat = add_literal(dat, (charT)c);
- ++ptr;
- continue;
- }
- // we have {x} or {x,} or {x,y}:
- parse_range(ptr, end, rep_min, rep_max);
- goto repeat_jump;
- case traits_type::syntax_newline:
- if(_flags & newline_alt)
- goto alt_string_jump;
- dat = add_literal(dat, (charT)c);
- ++ptr;
- continue;
- case traits_type::syntax_close_brace:
- if(_flags & bk_braces)
- {
- dat = add_literal(dat, (charT)c);
- ++ptr;
- continue;
- }
- fail(REG_BADPAT);
- return error_code();
- default:
- dat = add_literal(dat, (charT)c);
- ++ptr;
- break;
- } // switch
- } // while
-
- //
- // update previous:
- if(dat)
- {
- data.align();
- dat->next.i = data.size();
- }
-
- // see if we have an empty alternative:
- if(mark.empty() == false)
- if(mark.peek() == data.index(dat) )
- {
- re_detail::re_syntax_base* para = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<char*>(data.data()) + mark.peek());
- if(para->type == re_detail::syntax_element_jump)
- {
- fail(REG_EMPTY);
- return error_code();
- }
- }
- //
- // set up tail:
- //
- if(mark.empty() == false)
- {
- // pop any pushed alternatives and set the target end destination:
- dat = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<unsigned char*>(data.data()) + mark.peek());
- while(dat->type == re_detail::syntax_element_jump)
- {
- static_cast<re_detail::re_jump*>(dat)->alt.i = data.size();
- mark.pop();
- if(mark.empty() == true)
- break;
- dat = reinterpret_cast<re_detail::re_jump*>(reinterpret_cast<unsigned char*>(data.data()) + mark.peek());
- }
- }
-
- dat = static_cast<re_detail::re_brace*>(data.extend(sizeof(re_detail::re_syntax_base)));
- dat->type = re_detail::syntax_element_match;
- dat->next.i = 0;
-
- if(mark.empty() == false)
- {
- fail(REG_EPAREN);
- return error_code();
- }
-
- //
- // allocate space for start _map:
- startmap = reinterpret_cast<unsigned char*>(data.extend(256 + ((end - base + 1) * sizeof(charT))));
- //
- // and copy the expression we just compiled:
- _expression = reinterpret_cast<charT*>(reinterpret_cast<char*>(startmap) + 256);
- _expression_len = end - base;
- std::memcpy(_expression, base, _expression_len * sizeof(charT));
- *(_expression + _expression_len) = charT(0);
-
- //
- // now we need to apply fixups to the array
- // so that we can use pointers and not indexes
- fixup_apply(static_cast<re_detail::re_syntax_base*>(data.data()), marks);
-
- // check for error during fixup:
- if(_flags & regbase::failbit)
- return error_code();
-
- //
- // finally compile the maps so that we can make intelligent choices
- // whenever we encounter an alternative:
- compile_maps();
- if(pkmp)
- {
- re_detail::kmp_free(pkmp, data.allocator());
- pkmp = 0;
- }
- re_detail::re_syntax_base* sbase = static_cast<re_detail::re_syntax_base*>(data.data());
- _restart_type = probe_restart(sbase);
- _leading_len = fixup_leading_rep(sbase, 0);
- if((sbase->type == re_detail::syntax_element_literal) && (sbase->next.p->type == re_detail::syntax_element_match))
- {
- _restart_type = restart_fixed_lit;
- if(0 == pkmp)
- {
- charT* p1 = reinterpret_cast<charT*>(reinterpret_cast<char*>(sbase) + sizeof(re_detail::re_literal));
- charT* p2 = p1 + static_cast<re_detail::re_literal*>(sbase)->length;
- pkmp = re_detail::kmp_compile(p1, p2, charT(), re_detail::kmp_translator<traits>(_flags®base::icase, &traits_inst), data.allocator());
- }
- }
- return error_code();
-
- } // sentry
- return REG_EMPTY;
-
-# ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-}
-
-template <class charT, class traits, class Allocator>
-re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::add_simple(re_detail::re_syntax_base* dat, re_detail::syntax_element_type type, unsigned int size)
-{
- if(dat)
- {
- data.align();
- dat->next.i = data.size();
- }
- if(size < sizeof(re_detail::re_syntax_base))
- size = sizeof(re_detail::re_syntax_base);
- dat = static_cast<re_detail::re_syntax_base*>(data.extend(size));
- dat->type = type;
- dat->next.i = 0;
- return dat;
-}
-
-template <class charT, class traits, class Allocator>
-re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::add_literal(re_detail::re_syntax_base* dat, charT c)
-{
- if(dat && (dat->type == re_detail::syntax_element_literal))
- {
- // add another charT to the list:
- std::ptrdiff_t pos = reinterpret_cast<unsigned char*>(dat) - reinterpret_cast<unsigned char*>(data.data());
- *reinterpret_cast<charT*>(data.extend(sizeof(charT))) = traits_inst.translate(c, (_flags & regbase::icase));
- dat = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<unsigned char*>(data.data()) + pos);
- ++(static_cast<re_detail::re_literal*>(dat)->length);
- }
- else
- {
- // extend:
- dat = add_simple(dat, re_detail::syntax_element_literal, sizeof(re_detail::re_literal) + sizeof(charT));
- static_cast<re_detail::re_literal*>(dat)->length = 1;
- *reinterpret_cast<charT*>(reinterpret_cast<re_detail::re_literal*>(dat)+1) = traits_inst.translate(c, (_flags & regbase::icase));
- }
- return dat;
-}
-
-template <class charT, class traits, class Allocator>
-unsigned int BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::probe_restart(re_detail::re_syntax_base* dat)
-{
- switch(dat->type)
- {
- case re_detail::syntax_element_startmark:
- case re_detail::syntax_element_endmark:
- return probe_restart(dat->next.p);
- case re_detail::syntax_element_start_line:
- return regbase::restart_line;
- case re_detail::syntax_element_word_start:
- return regbase::restart_word;
- case re_detail::syntax_element_buffer_start:
- return regbase::restart_buf;
- case re_detail::syntax_element_restart_continue:
- return regbase::restart_continue;
- default:
- return regbase::restart_any;
- }
-}
-
-template <class charT, class traits, class Allocator>
-unsigned int BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::fixup_leading_rep(re_detail::re_syntax_base* dat, re_detail::re_syntax_base* end)
-{
- unsigned int len = 0;
- bool leading_lit = end ? false : true;
- while(dat != end)
- {
- switch(dat->type)
- {
- case re_detail::syntax_element_literal:
- len += static_cast<re_detail::re_literal*>(dat)->length;
- if((leading_lit) && (static_cast<re_detail::re_literal*>(dat)->length > 2))
- {
- // we can do a literal search for the leading literal string
- // using Knuth-Morris-Pratt (or whatever), and only then check for
- // matches. We need a decent length string though to make it
- // worth while.
- _leading_string = reinterpret_cast<charT*>(reinterpret_cast<char*>(dat) + sizeof(re_detail::re_literal));
- _leading_string_len = static_cast<re_detail::re_literal*>(dat)->length;
- _restart_type = restart_lit;
- leading_lit = false;
- const charT* p1 = _leading_string;
- const charT* p2 = _leading_string + _leading_string_len;
- pkmp = re_detail::kmp_compile(p1, p2, charT(), re_detail::kmp_translator<traits>(_flags®base::icase, &traits_inst), data.allocator());
- }
- leading_lit = false;
- break;
- case re_detail::syntax_element_wild:
- ++len;
- leading_lit = false;
- break;
- case re_detail::syntax_element_match:
- return len;
- case re_detail::syntax_element_backref:
- //case re_detail::syntax_element_jump:
- case re_detail::syntax_element_alt:
- case re_detail::syntax_element_combining:
- return 0;
- case re_detail::syntax_element_long_set:
- {
- // we need to verify that there are no multi-character
- // collating elements inside the repeat:
- const charT* p = reinterpret_cast<const charT*>(reinterpret_cast<const char*>(dat) + sizeof(re_detail::re_set_long));
- unsigned int csingles = static_cast<re_detail::re_set_long*>(dat)->csingles;
- for(unsigned int i = 0; i < csingles; ++i)
- {
- if(re_detail::re_strlen(p) > 1)
- return 0;
- while(*p)++p;
- ++p;
- }
- ++len;
- leading_lit = false;
- break;
- }
- case re_detail::syntax_element_set:
- ++len;
- leading_lit = false;
- break;
- case re_detail::syntax_element_rep:
- if((len == 0) && (1 == fixup_leading_rep(dat->next.p, static_cast<re_detail::re_repeat*>(dat)->alt.p) ))
- {
- static_cast<re_detail::re_repeat*>(dat)->leading = true;
- return len;
- }
- return len;
- default:
- break;
- }
- dat = dat->next.p;
- }
- return len;
-}
-
-template <class charT, class traits, class Allocator>
-void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::fail(unsigned int err)
-{
- error_code_ = err;
- if(err)
- {
- _flags |= regbase::failbit;
-#ifndef BOOST_NO_EXCEPTIONS
- if(_flags & regbase::use_except)
- {
- throw bad_expression(traits_inst.error_string(err));
- }
-#endif
- }
- else
- _flags &= ~regbase::failbit;
-}
-
-
-#ifdef __BORLANDC__
- #pragma option pop
-#endif
-
-} // namespace boost
-
-
-#endif // BOOST_REGEX_COMPILE_HPP
-
-
-
-
-
-
-
-
-
+++ /dev/null
-/*
- *
- * Copyright (c) 1998-2002
- * Dr John Maddock
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Dr John Maddock makes no representations
- * about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_cstring.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: This is an internal header file, do not include directly.
- * String support and helper functions, for regular
- * expression library.
- */
-
-#ifndef BOOST_REGEX_CSTRING_HPP
-#define BOOST_REGEX_CSTRING_HPP
-
-#ifndef BOOST_REGEX_CONFIG_HPP
-#include <boost/regex/config.hpp>
-#endif
-
-#include <cstring>
-
-namespace boost{
- namespace re_detail{
-
-#ifdef __BORLANDC__
- #pragma option push -a8 -b -Vx -Ve -pc
-#endif
-
-//
-// start by defining some template function aliases for C API functions:
-//
-
-template <class charT>
-std::size_t BOOST_REGEX_CALL re_strlen(const charT *s)
-{
- std::size_t len = 0;
- while(*s)
- {
- ++s;
- ++len;
- }
- return len;
-}
-
-inline std::size_t BOOST_REGEX_CALL re_strlen(const char *s)
-{
- return std::strlen(s);
-}
-
-#ifndef BOOST_NO_WREGEX
-
-inline std::size_t BOOST_REGEX_CALL re_strlen(const wchar_t *s)
-{
- return std::wcslen(s);
-}
-
-#endif
-
-#ifndef BOOST_NO_WREGEX
-BOOST_REGEX_DECL void BOOST_REGEX_CALL re_transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
-#endif
-BOOST_REGEX_DECL void BOOST_REGEX_CALL re_transform(std::string& out, const std::string& in);
-
-template <class charT>
-void BOOST_REGEX_CALL re_trunc_primary(std::basic_string<charT>& s)
-{
- for(unsigned int i = 0; i < s.size(); ++i)
- {
- if(s[i] <= 1)
- {
- s.erase(i);
- break;
- }
- }
-}
-
-inline char* BOOST_REGEX_CALL re_strcpy(char *s1, const char *s2)
-{
- #if defined(__BORLANDC__) && defined(strcpy)
- return ::strcpy(s1, s2);
- #else
- return std::strcpy(s1, s2);
- #endif
-}
-
-#ifndef BOOST_NO_WREGEX
-
-inline wchar_t* BOOST_REGEX_CALL re_strcpy(wchar_t *s1, const wchar_t *s2)
-{
- return std::wcscpy(s1, s2);
-}
-
-#endif
-
-
-template <class charT>
-charT* BOOST_REGEX_CALL re_strdup(const charT* p)
-{
- charT* buf = new charT[re_strlen(p) + 1];
- re_strcpy(buf, p);
- return buf;
-}
-
-template <class charT>
-inline void BOOST_REGEX_CALL re_strfree(charT* p)
-{
- delete[] p;
-}
-
-#ifdef __BORLANDC__
- #pragma option pop
-#endif
-
-} // namespace re_detail
-} // namespace boost
-
-#endif // BOOST_REGEX_CSTRING_HPP
-
-
-
-
-
+++ /dev/null
-/*
- *
- * Copyright (c) 1998-2002
- * Dr John Maddock
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Dr John Maddock makes no representations
- * about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_format.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Provides formatting output routines for search and replace
- * operations. Note this is an internal header file included
- * by regex.hpp, do not include on its own.
- */
-
-#ifndef BOOST_REGEX_FORMAT_HPP
-#define BOOST_REGEX_FORMAT_HPP
-
-
-namespace boost{
-
-enum format_flags_t{
- format_all = 0, // enable all extentions to sytax
- format_sed = match_max << 1, // sed style replacement.
- format_perl = format_sed << 1, // perl style replacement.
- format_no_copy = format_perl << 1, // don't copy non-matching segments.
- format_first_only = format_no_copy << 1, // Only replace first occurance.
- format_is_if = format_first_only << 1 // internal use only.
-};
-
-namespace re_detail{
-
-#ifdef __BORLANDC__
- #pragma option push -a8 -b -Vx -Ve -pc -w-8037
-#endif
-
-template <class O, class I>
-O BOOST_REGEX_CALL re_copy_out(O out, I first, I last)
-{
- while(first != last)
- {
- *out = *first;
- ++out;
- ++first;
- }
- return out;
-}
-
-template <class charT, class traits_type>
-void BOOST_REGEX_CALL re_skip_format(const charT*& fmt, const traits_type& traits_inst)
-{
- // dwa 9/13/00 - suppress incorrect unused parameter warning for MSVC
- (void)traits_inst;
-
- typedef typename traits_type::size_type traits_size_type;
- typedef typename traits_type::uchar_type traits_uchar_type;
- typedef typename traits_type::string_type traits_string_type;
-
- unsigned int parens = 0;
- unsigned int c;
- while(*fmt)
- {
- c = traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt));
- if((c == traits_type::syntax_colon) && (parens == 0))
- {
- ++fmt;
- return;
- }
- else if(c == traits_type::syntax_close_bracket)
- {
- if(parens == 0)
- {
- ++fmt;
- return;
- }
- --parens;
- }
- else if(c == traits_type::syntax_open_bracket)
- ++parens;
- else if(c == traits_type::syntax_slash)
- {
- ++fmt;
- if(*fmt == 0)
- return;
- }
- ++fmt;
- }
-}
-
-#ifdef BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN
-
-//
-// ugly hack for buggy output iterators
-
-template <class T>
-inline void oi_assign(T* p, T v)
-{
- ::boost::re_detail::pointer_destroy(p);
- pointer_construct(p, v);
-}
-
-#else
-
-template <class T>
-inline void oi_assign(T* p, T v)
-{
- //
- // if you get a compile time error in here then you either
- // need to rewrite your output iterator to make it assignable
- // (as is required by the standard), or define
- // BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN to use the ugly hack above
- *p = v;
-}
-
-#endif
-
-
-#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
-//
-// Ugly ugly hack,
-// template don't merge if they contain switch statements so declare these
-// templates in unnamed namespace (ie with internal linkage), each translation
-// unit then gets its own local copy, it works seemlessly but bloats the app.
-namespace{
-#endif
-
-//
-// algorithm reg_format:
-// takes the result of a match and a format string
-// and merges them to produce a new string which
-// is sent to an OutputIterator,
-// _reg_format_aux does the actual work:
-//
-template <class OutputIterator, class Iterator, class Allocator, class charT, class traits_type>
-OutputIterator BOOST_REGEX_CALL _reg_format_aux(OutputIterator out,
- const match_results<Iterator, Allocator>& m,
- const charT*& fmt,
- unsigned flags, const traits_type& traits_inst)
-{
- const charT* fmt_end = fmt;
- while(*fmt_end) ++ fmt_end;
-
- typedef typename traits_type::size_type traits_size_type;
- typedef typename traits_type::uchar_type traits_uchar_type;
- typedef typename traits_type::string_type traits_string_type;
-
- while(*fmt)
- {
- switch(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)))
- {
- case traits_type::syntax_dollar:
- if(flags & format_sed)
- {
- // no perl style replacement,
- // $ is an ordinary character:
- goto default_opt;
- }
- ++fmt;
- if(*fmt == 0) // oops trailing $
- {
- --fmt;
- *out = *fmt;
- ++out;
- return out;
- }
- switch(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)))
- {
- case traits_type::syntax_start_buffer:
- oi_assign(&out, re_copy_out(out, Iterator(m[-1].first), Iterator(m[-1].second)));
- ++fmt;
- continue;
- case traits_type::syntax_end_buffer:
- oi_assign(&out, re_copy_out(out, Iterator(m[-2].first), Iterator(m[-2].second)));
- ++fmt;
- continue;
- case traits_type::syntax_digit:
- {
-expand_sub:
- unsigned int index = traits_inst.toi(fmt, fmt_end, 10);
- oi_assign(&out, re_copy_out(out, Iterator(m[index].first), Iterator(m[index].second)));
- continue;
- }
- }
- // anything else:
- if(*fmt == '&')
- {
- oi_assign(&out, re_copy_out(out, Iterator(m[0].first), Iterator(m[0].second)));
- ++fmt;
- }
- else
- {
- // probably an error, treat as a literal '$'
- --fmt;
- *out = *fmt;
- ++out;
- ++fmt;
- }
- continue;
- case traits_type::syntax_slash:
- {
- // escape sequence:
- ++fmt;
- charT c(*fmt);
- if(*fmt == 0)
- {
- --fmt;
- *out = *fmt;
- ++out;
- ++fmt;
- return out;
- }
- switch(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)))
- {
- case traits_type::syntax_a:
- c = '\a';
- ++fmt;
- break;
- case traits_type::syntax_f:
- c = '\f';
- ++fmt;
- break;
- case traits_type::syntax_n:
- c = '\n';
- ++fmt;
- break;
- case traits_type::syntax_r:
- c = '\r';
- ++fmt;
- break;
- case traits_type::syntax_t:
- c = '\t';
- ++fmt;
- break;
- case traits_type::syntax_v:
- c = '\v';
- ++fmt;
- break;
- case traits_type::syntax_x:
- ++fmt;
- if(fmt == fmt_end)
- {
- *out = *--fmt;
- ++out;
- return out;
- }
- // maybe have \x{ddd}
- if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)) == traits_type::syntax_open_brace)
- {
- ++fmt;
- if(fmt == fmt_end)
- {
- fmt -= 2;
- *out = *fmt;
- ++out;
- ++fmt;
- continue;
- }
- if(traits_inst.is_class(*fmt, traits_type::char_class_xdigit) == false)
- {
- fmt -= 2;
- *out = *fmt;
- ++out;
- ++fmt;
- continue;
- }
- c = (charT)traits_inst.toi(fmt, fmt_end, -16);
- if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)) != traits_type::syntax_close_brace)
- {
- while(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)) != traits_type::syntax_slash)
- --fmt;
- ++fmt;
- *out = *fmt;
- ++out;
- ++fmt;
- continue;
- }
- ++fmt;
- break;
- }
- else
- {
- if(traits_inst.is_class(*fmt, traits_type::char_class_xdigit) == false)
- {
- --fmt;
- *out = *fmt;
- ++out;
- ++fmt;
- continue;
- }
- c = (charT)traits_inst.toi(fmt, fmt_end, -16);
- }
- break;
- case traits_type::syntax_c:
- ++fmt;
- if(fmt == fmt_end)
- {
- --fmt;
- *out = *fmt;
- ++out;
- return out;
- }
- if(((typename traits_type::uchar_type)(*fmt) < (typename traits_type::uchar_type)'@')
- || ((typename traits_type::uchar_type)(*fmt) > (typename traits_type::uchar_type)127) )
- {
- --fmt;
- *out = *fmt;
- ++out;
- ++fmt;
- break;
- }
- c = (charT)((typename traits_type::uchar_type)(*fmt) - (typename traits_type::uchar_type)'@');
- ++fmt;
- break;
- case traits_type::syntax_e:
- c = (charT)27;
- ++fmt;
- break;
- case traits_type::syntax_digit:
- if(flags & format_sed)
- goto expand_sub;
- else
- c = (charT)traits_inst.toi(fmt, fmt_end, -8);
- break;
- default:
- //c = *fmt;
- ++fmt;
- }
- *out = c;
- ++out;
- continue;
- }
- case traits_type::syntax_open_bracket:
- if(flags & (format_sed|format_perl))
- {
- *out = *fmt;
- ++out;
- ++fmt;
- continue;
- }
- else
- {
- ++fmt; // recurse
- oi_assign(&out, _reg_format_aux(out, m, fmt, flags, traits_inst));
- continue;
- }
- case traits_type::syntax_close_bracket:
- if(flags & (format_sed|format_perl))
- {
- *out = *fmt;
- ++out;
- ++fmt;
- continue;
- }
- else
- {
- ++fmt; // return from recursion
- return out;
- }
- case traits_type::syntax_colon:
- if(flags & format_is_if)
- {
- ++fmt;
- return out;
- }
- *out = *fmt;
- ++out;
- ++fmt;
- continue;
- case traits_type::syntax_question:
- {
- if(flags & (format_sed|format_perl))
- {
- *out = *fmt;
- ++out;
- ++fmt;
- continue;
- }
- else
- {
- ++fmt;
- if(*fmt == 0)
- {
- --fmt;
- *out = *fmt;
- ++out;
- ++fmt;
- return out;
- }
- unsigned int id = traits_inst.toi(fmt, fmt_end, 10);
- if(m[id].matched)
- {
- oi_assign(&out, _reg_format_aux(out, m, fmt, flags | format_is_if, traits_inst));
- if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*(fmt-1))) == traits_type::syntax_colon)
- re_skip_format(fmt, traits_inst);
- }
- else
- {
- re_skip_format(fmt, traits_inst);
- if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*(fmt-1))) == traits_type::syntax_colon)
- oi_assign(&out, _reg_format_aux(out, m, fmt, flags | format_is_if, traits_inst));
- }
- return out;
- }
- }
- default:
-default_opt:
- if((flags & format_sed) && (*fmt == '&'))
- {
- oi_assign(&out, re_copy_out(out, Iterator(m[0].first), Iterator(m[0].second)));
- ++fmt;
- continue;
- }
- *out = *fmt;
- ++out;
- ++fmt;
- }
- }
-
- return out;
-}
-
-#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
-} // namespace
-#endif
-
-template <class S>
-class string_out_iterator
-{
- S* out;
-public:
- string_out_iterator(S& s) : out(&s) {}
- string_out_iterator& operator++() { return *this; }
- string_out_iterator& operator++(int) { return *this; }
- string_out_iterator& operator*() { return *this; }
- string_out_iterator& operator=(typename S::value_type v)
- {
- out->append(1, v);
- return *this;
- }
-};
-
-template <class OutputIterator, class Iterator, class charT, class Allocator, class traits_type>
-class merge_out_predicate
-{
- OutputIterator* out;
- Iterator* last;
- const charT* fmt;
- unsigned flags;
- const traits_type* pt;
-
-public:
- merge_out_predicate(OutputIterator& o, Iterator& pi, const charT* f, unsigned format_flags, const traits_type& p)
- : out(&o), last(&pi), fmt(f), flags(format_flags), pt(&p){}
-
- ~merge_out_predicate() {}
- bool BOOST_REGEX_CALL operator()(const boost::match_results<Iterator, Allocator>& m)
- {
- const charT* f = fmt;
- if(0 == (flags & format_no_copy))
- oi_assign(out, re_copy_out(*out, Iterator(m[-1].first), Iterator(m[-1].second)));
- oi_assign(out, _reg_format_aux(*out, m, f, flags, *pt));
- *last = m[-2].first;
- return flags & format_first_only ? false : true;
- }
-};
-
-} // namespace re_detail
-
-template <class OutputIterator, class Iterator, class Allocator, class charT>
-OutputIterator regex_format(OutputIterator out,
- const match_results<Iterator, Allocator>& m,
- const charT* fmt,
- unsigned flags = 0
- )
-{
- regex_traits<charT> t;
- return re_detail::_reg_format_aux(out, m, fmt, flags, t);
-}
-
-template <class OutputIterator, class Iterator, class Allocator, class charT>
-OutputIterator regex_format(OutputIterator out,
- const match_results<Iterator, Allocator>& m,
- const std::basic_string<charT>& fmt,
- unsigned flags = 0
- )
-{
- regex_traits<charT> t;
- const charT* start = fmt.c_str();
- return re_detail::_reg_format_aux(out, m, start, flags, t);
-}
-
-template <class Iterator, class Allocator, class charT>
-std::basic_string<charT> regex_format(const match_results<Iterator, Allocator>& m, const charT* fmt, unsigned flags = 0)
-{
- std::basic_string<charT> result;
- re_detail::string_out_iterator<std::basic_string<charT> > i(result);
- regex_format(i, m, fmt, flags);
- return result;
-}
-
-template <class Iterator, class Allocator, class charT>
-std::basic_string<charT> regex_format(const match_results<Iterator, Allocator>& m, const std::basic_string<charT>& fmt, unsigned flags = 0)
-{
- std::basic_string<charT> result;
- re_detail::string_out_iterator<std::basic_string<charT> > i(result);
- regex_format(i, m, fmt.c_str(), flags);
- return result;
-}
-
-template <class OutputIterator, class Iterator, class traits, class Allocator, class charT>
-OutputIterator regex_merge(OutputIterator out,
- Iterator first,
- Iterator last,
- const reg_expression<charT, traits, Allocator>& e,
- const charT* fmt,
- unsigned int flags = match_default)
-{
- Iterator l = first;
- re_detail::merge_out_predicate<OutputIterator, Iterator, charT, Allocator, traits> oi(out, l, fmt, flags, e.get_traits());
- regex_grep(oi, first, last, e, flags);
- return (flags & format_no_copy) ? out : re_detail::re_copy_out(out, l, last);
-}
-
-template <class OutputIterator, class Iterator, class traits, class Allocator, class charT>
-inline OutputIterator regex_merge(OutputIterator out,
- Iterator first,
- Iterator last,
- const reg_expression<charT, traits, Allocator>& e,
- const std::basic_string<charT>& fmt,
- unsigned int flags = match_default)
-{
- return regex_merge(out, first, last, e, fmt.c_str(), flags);
-}
-
-template <class traits, class Allocator, class charT>
-std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
- const reg_expression<charT, traits, Allocator>& e,
- const charT* fmt,
- unsigned int flags = match_default)
-{
- std::basic_string<charT> result;
- re_detail::string_out_iterator<std::basic_string<charT> > i(result);
- regex_merge(i, s.begin(), s.end(), e, fmt, flags);
- return result;
-}
-
-template <class traits, class Allocator, class charT>
-std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
- const reg_expression<charT, traits, Allocator>& e,
- const std::basic_string<charT>& fmt,
- unsigned int flags = match_default)
-{
- std::basic_string<charT> result;
- re_detail::string_out_iterator<std::basic_string<charT> > i(result);
- regex_merge(i, s.begin(), s.end(), e, fmt.c_str(), flags);
- return result;
-}
-
-#ifdef __BORLANDC__
- #pragma option pop
-#endif
-
-} // namespace boost
-
-#endif // BOOST_REGEX_FORMAT_HPP
-
-
-
-
-
+++ /dev/null
-/*
- *
- * Copyright (c) 1998-2002
- * Dr John Maddock
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Dr John Maddock makes no representations
- * about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_kmp.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Provides Knuth Morris Pratt search operations.
- * Note this is an internal header file included
- * by regex.hpp, do not include on its own.
- */
-
-#ifndef BOOST_REGEX_KMP_HPP
-#define BOOST_REGEX_KMP_HPP
-
-#ifdef BOOST_REGEX_CONFIG_HPP
-#include <boost/regex/config.hpp>
-#endif
-
-
-namespace boost{
- namespace re_detail{
-
-#ifdef __BORLANDC__
- #pragma option push -a8 -b -Vx -Ve -pc
-#endif
-
-template <class charT>
-struct kmp_info
-{
- unsigned int size;
- unsigned int len;
- const charT* pstr;
- int kmp_next[1];
-};
-
-template <class charT, class Allocator>
-void kmp_free(kmp_info<charT>* pinfo, const Allocator& a)
-{
- typedef typename boost::detail::rebind_allocator<char, Allocator>::type atype;
- atype(a).deallocate(reinterpret_cast<char*>(pinfo), pinfo->size);
-}
-
-template <class iterator, class charT, class Trans, class Allocator>
-kmp_info<charT>* kmp_compile(iterator first, iterator last, charT, Trans translate, const Allocator& a)
-{
- typedef typename boost::detail::rebind_allocator<char, Allocator>::type atype;
- int i, j, m;
- i = 0;
- m = static_cast<int>(boost::re_detail::distance(first, last));
- ++m;
- unsigned int size = sizeof(kmp_info<charT>) + sizeof(int)*m + sizeof(charT)*m;
- --m;
- //
- // allocate struct and fill it in:
- //
- kmp_info<charT>* pinfo = reinterpret_cast<kmp_info<charT>*>(atype(a).allocate(size));
- BOOST_REGEX_NOEH_ASSERT(pinfo)
- pinfo->size = size;
- pinfo->len = m;
- charT* p = reinterpret_cast<charT*>(reinterpret_cast<char*>(pinfo) + sizeof(kmp_info<charT>) + sizeof(int)*(m+1));
- pinfo->pstr = p;
- while(first != last)
- {
- *p = translate(*first);
- ++first;
- ++p;
- }
- *p = 0;
- //
- // finally do regular kmp compile:
- //
- j = pinfo->kmp_next[0] = -1;
- while (i < m)
- {
- while ((j > -1) && (pinfo->pstr[i] != pinfo->pstr[j]))
- j = pinfo->kmp_next[j];
- ++i;
- ++j;
- if (pinfo->pstr[i] == pinfo->pstr[j])
- pinfo->kmp_next[i] = pinfo->kmp_next[j];
- else
- pinfo->kmp_next[i] = j;
- }
-
- return pinfo;
-}
-
-#ifdef __BORLANDC__
- #pragma option pop
-#endif
-
- } // namepsace re_detail
-} // namespace boost
-
-#endif // BOOST_REGEX_KMP_HPP
-
-
-
+++ /dev/null
-/*
- *
- * Copyright (c) 1998-2002
- * Dr John Maddock
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Dr John Maddock makes no representations
- * about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_libary_include.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
- * Note this is an internal header file included
- * by regex.hpp, do not include on its own.
- */
-
-/*************************************************************************
-
-Libraries for Borland and Microsoft compilers are automatically
-selected here, the name of the lib is selected according to the following
-formula:
-
-BOOST_LIB_NAME
- + "_"
- + BOOST_LIB_TOOLSET
- + "_"
- + BOOST_LIB_THREAD_OPT
- + BOOST_LIB_RT_OPT
- + BOOST_LIB_LINK_OPT
- + BOOST_LIB_DEBUG_OPT
-
-These are defined as:
-
-BOOST_LIB_NAME: The base name of the lib (boost_regex).
-
-BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).
-
-BOOST_LIB_THREAD_OPT: "s" for single thread builds,
- "m" for multithread builds.
-
-BOOST_LIB_RT_OPT: "s" for static runtime,
- "d" for dynamic runtime.
-
-BOOST_LIB_LINK_OPT: "s" for static link,
- "i" for dynamic link.
-
-BOOST_LIB_DEBUG_OPT: nothing for release builds,
- "d" for debug builds,
- "dd" for debug-diagnostic builds (_STLP_DEBUG).
-
-***************************************************************************/
-
-#if !defined(BOOST_REGEX_LIBRARY_INCLUDE_HPP) && !defined(BOOST_REGEX_NO_LIB)
-#define BOOST_REGEX_LIBRARY_INCLUDE_HPP
-
-#define BOOST_LIB_NAME "boost_regex"
-
-//
-// select toolset:
-//
-#if defined(BOOST_MSVC) && (BOOST_MSVC == 1200) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
-
- // vc6-stlport:
-# define BOOST_LIB_TOOLSET "vc6-stlport"
-
-#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1200)
-
- // vc6:
-# define BOOST_LIB_TOOLSET "vc6"
-
-#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1300)
-
- // vc7:
-# define BOOST_LIB_TOOLSET "vc7"
-
-#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x560)
-
- // CBuilder 6:
-# define BOOST_LIB_TOOLSET "bcb6"
-
-#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
-
- // CBuilder 6:
-# define BOOST_LIB_TOOLSET "bcb5"
-
-#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x540)
-
- // CBuilder 6:
-# define BOOST_LIB_TOOLSET "bcb4"
-
-#endif
-
-//
-// select thread opt:
-//
-#if defined(_MT) || defined(__MT__)
-# define BOOST_LIB_THREAD_OPT "m"
-#else
-# define BOOST_LIB_THREAD_OPT "s"
-#endif
-
-//
-// select runtime opt:
-//
-#if defined(_DLL) || defined(_RTLDLL)
-# define BOOST_LIB_RT_OPT "d"
-#else
-# define BOOST_LIB_RT_OPT "s"
-#endif
-
-//
-// select linkage opt:
-//
-#if (defined(_DLL) || defined(_RTLDLL)) && !defined(BOOST_REGEX_STATIC_LINK)
-# define BOOST_LIB_LINK_OPT "i"
-#else
-# define BOOST_LIB_LINK_OPT "s"
-#endif
-
-//
-// select debug opt:
-//
-#if defined(BOOST_MSVC) && defined(_DEBUG) && (defined(_STLP_DEBUG) || defined(__STL_DEBUG))
-# define BOOST_LIB_DEBUG_OPT "dd"
-#elif defined(BOOST_MSVC) && defined(_DEBUG)
-# define BOOST_LIB_DEBUG_OPT "d"
-#elif defined(__BORLANDC__) && (__BORLANDC__ == 0x560) && (defined(_STLP_DEBUG) || defined(__STL_DEBUG))
-# define BOOST_LIB_DEBUG_OPT "dd"
-#else
-# define BOOST_LIB_DEBUG_OPT
-#endif
-
-//
-// now include the lib:
-//
-#if defined(BOOST_LIB_NAME) \
- && defined(BOOST_LIB_TOOLSET) \
- && defined(BOOST_LIB_THREAD_OPT) \
- && defined(BOOST_LIB_RT_OPT) \
- && defined(BOOST_LIB_LINK_OPT) \
- && defined(BOOST_LIB_DEBUG_OPT)
-
-# pragma comment(lib, BOOST_LIB_NAME "_" BOOST_LIB_TOOLSET "_" BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_LINK_OPT BOOST_LIB_DEBUG_OPT ".lib")
-
-#endif
-
-//
-// finally undef any macros we may have set:
-//
-#if defined(BOOST_LIB_NAME)
-# undef BOOST_LIB_NAME
-#endif
-#if defined(BOOST_LIB_TOOLSET)
-# undef BOOST_LIB_TOOLSET
-#endif
-#if defined(BOOST_LIB_THREAD_OPT)
-# undef BOOST_LIB_THREAD_OPT
-#endif
-#if defined(BOOST_LIB_RT_OPT)
-# undef BOOST_LIB_RT_OPT
-#endif
-#if defined(BOOST_LIB_LINK_OPT)
-# undef BOOST_LIB_LINK_OPT
-#endif
-#if defined(BOOST_LIB_DEBUG_OPT)
-# undef BOOST_LIB_DEBUG_OPT
-#endif
-
-
-#endif // BOOST_REGEX_LIBRARY_INCLUDE_HPP
-
-
-
-
-
-
+++ /dev/null
-/*
- *
- * Copyright (c) 1998-2002
- * Dr John Maddock
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Dr John Maddock makes no representations
- * about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_match.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Regular expression matching algorithms.
- * Note this is an internal header file included
- * by regex.hpp, do not include on its own.
- */
-
-
-#ifndef BOOST_REGEX_MATCH_HPP
-#define BOOST_REGEX_MATCH_HPP
-
-#ifndef BOOST_REGEX_MAX_STATE_COUNT
-# define BOOST_REGEX_MAX_STATE_COUNT 100000000
-#endif
-
-#include <boost/limits.hpp>
-
-
-namespace boost{
- namespace re_detail{
-
-#ifdef __BORLANDC__
- #pragma option push -a8 -b -Vx -Ve -pc -w-8026 -w-8027
-#endif
-
-//
-// Unfortunately Rogue Waves standard library appears to have a bug
-// in std::basic_string::compare that results in eroneous answers
-// in some cases (tested with Borland C++ 5.1, Rogue Wave lib version
-// 0x020101) the test case was:
-// {39135,0} < {0xff,0}
-// which succeeds when it should not.
-//
-#ifndef _RWSTD_VER
-# define STR_COMP(s,p) s.compare(p)
-#else
-template <class C, class T, class A>
-inline int string_compare(const std::basic_string<C,T,A>& s, const C* p)
-{ return s.compare(p); }
-inline int string_compare(const std::string& s, const char* p)
-{ return std::strcmp(s.c_str(), p); }
-inline int string_compare(const std::wstring& s, const wchar_t* p)
-{ return std::wcscmp(s.c_str(), p); }
-# define STR_COMP(s,p) string_compare(s,p)
-#endif
-
-template<class charT>
-inline const charT* re_skip_past_null(const charT* p)
-{
- while (*p != 0) ++p;
- return ++p;
-}
-
-template <class iterator, class charT, class traits_type, class Allocator>
-iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
- iterator last,
- const re_set_long* set_,
- const reg_expression<charT, traits_type, Allocator>& e)
-{
- const charT* p = reinterpret_cast<const charT*>(set_+1);
- iterator ptr;
- unsigned int i;
- bool icase = e.flags() & regbase::icase;
-
- if(next == last) return next;
-
- typedef typename traits_type::string_type traits_string_type;
- const traits_type& traits_inst = e.get_traits();
-
- // dwa 9/13/00 suppress incorrect MSVC warning - it claims this is never
- // referenced
- (void)traits_inst;
-
- // try and match a single character, could be a multi-character
- // collating element...
- for(i = 0; i < set_->csingles; ++i)
- {
- ptr = next;
- if(*p == 0)
- {
- // treat null string as special case:
- if(traits_inst.translate(*ptr, icase) != *p)
- {
- while(*p == 0)++p;
- continue;
- }
- return set_->isnot ? next : (ptr == next) ? ++next : ptr;
- }
- else
- {
- while(*p && (ptr != last))
- {
- if(traits_inst.translate(*ptr, icase) != *p)
- break;
- ++p;
- ++ptr;
- }
-
- if(*p == 0) // if null we've matched
- return set_->isnot ? next : (ptr == next) ? ++next : ptr;
-
- p = re_skip_past_null(p); // skip null
- }
- }
-
- charT col = traits_inst.translate(*next, icase);
-
-
- if(set_->cranges || set_->cequivalents)
- {
- traits_string_type s2(1, col);
- traits_string_type s1;
- //
- // try and match a range, NB only a single character can match
- if(set_->cranges)
- {
- if(e.flags() & regbase::nocollate)
- s1 = s2;
- else
- traits_inst.transform(s1, s2);
- for(i = 0; i < set_->cranges; ++i)
- {
- if(STR_COMP(s1, p) <= 0)
- {
- while(*p)++p;
- ++p;
- if(STR_COMP(s1, p) >= 0)
- return set_->isnot ? next : ++next;
- }
- else
- {
- // skip first string
- while(*p)++p;
- ++p;
- }
- // skip second string
- while(*p)++p;
- ++p;
- }
- }
- //
- // try and match an equivalence class, NB only a single character can match
- if(set_->cequivalents)
- {
- traits_inst.transform_primary(s1, s2);
- for(i = 0; i < set_->cequivalents; ++i)
- {
- if(STR_COMP(s1, p) == 0)
- return set_->isnot ? next : ++next;
- // skip string
- while(*p)++p;
- ++p;
- }
- }
- }
- if(traits_inst.is_class(col, set_->cclasses) == true)
- return set_->isnot ? next : ++next;
- return set_->isnot ? ++next : next;
-}
-
-template <class iterator, class Allocator>
-class _priv_match_data
-{
-public:
- typedef typename boost::detail::rebind_allocator<int, Allocator>::type i_alloc;
- typedef typename boost::detail::rebind_allocator<iterator, Allocator>::type it_alloc;
- typedef typename regex_iterator_traits<iterator>::difference_type difference_type;
-
- match_results_base<iterator, Allocator> temp_match;
- // failure stacks:
- jstack<match_results_base<iterator, Allocator>, Allocator> matches;
- jstack<iterator, Allocator> prev_pos;
- jstack<const re_syntax_base*, Allocator> prev_record;
- jstack<int, Allocator> prev_acc;
- int* accumulators;
- unsigned int caccumulators;
- difference_type state_count;
- difference_type max_state_count;
- iterator* loop_starts;
-
- _priv_match_data(const match_results_base<iterator, Allocator>&, iterator, iterator, std::size_t);
-
- ~_priv_match_data()
- {
- m_free();
- }
- void m_free();
- void set_accumulator_size(unsigned int size);
- int* get_accumulators()
- {
- return accumulators;
- }
- iterator* get_loop_starts()
- {
- return loop_starts;
- }
- void estimate_max_state_count(iterator a, iterator b, std::size_t states, std::random_access_iterator_tag*)
- {
- difference_type dist = std::distance(a,b);
- states *= states;
- difference_type lim = std::numeric_limits<difference_type>::max() - 1000 - states;
- if(dist > (difference_type)(lim / states))
- max_state_count = lim;
- else
- max_state_count = 1000 + states * dist;
- }
- void estimate_max_state_count(iterator a, iterator b, std::size_t states, void*)
- {
- // we don't know how long the sequence is:
- max_state_count = BOOST_REGEX_MAX_STATE_COUNT;
- }
-};
-
-template <class iterator, class Allocator>
-_priv_match_data<iterator, Allocator>::_priv_match_data(const match_results_base<iterator, Allocator>& m, iterator a, iterator b, std::size_t states)
- : temp_match(m), matches(64, m.allocator()), prev_pos(64, m.allocator()), prev_record(64, m.allocator())
-{
- typedef typename regex_iterator_traits<iterator>::iterator_category category;
-
- accumulators = 0;
- caccumulators = 0;
- loop_starts = 0;
- state_count = 0;
- estimate_max_state_count(a, b, states, static_cast<category*>(0));
-}
-
-template <class iterator, class Allocator>
-void _priv_match_data<iterator, Allocator>::set_accumulator_size(unsigned int size)
-{
- if(size > caccumulators)
- {
- m_free();
- caccumulators = size;
- accumulators = i_alloc(temp_match.allocator()).allocate(caccumulators);
- BOOST_REGEX_NOEH_ASSERT(accumulators)
- loop_starts = it_alloc(temp_match.allocator()).allocate(caccumulators);
- BOOST_REGEX_NOEH_ASSERT(loop_starts)
- for(unsigned i = 0; i < caccumulators; ++i)
- new (loop_starts + i) iterator();
- }
-}
-
-template <class iterator, class Allocator>
-void _priv_match_data<iterator, Allocator>::m_free()
-{
- if(caccumulators)
- {
- i_alloc temp1(temp_match.allocator());
- temp1.deallocate(accumulators, caccumulators);
- for(unsigned i = 0; i < caccumulators; ++i)
- ::boost::re_detail::pointer_destroy(loop_starts + i);
- it_alloc temp2(temp_match.allocator());
- temp2.deallocate(loop_starts, caccumulators);
- }
-}
-
-template <class charT, class traits, class Allocator>
-struct access_t : public reg_expression<charT, traits, Allocator>
-{
- typedef typename is_byte<charT>::width_type width_type;
- typedef reg_expression<charT, traits, Allocator> base_type;
- typedef charT char_type;
- typedef traits traits_type;
- typedef Allocator alloc_type;
-
- static int repeat_count(const base_type& b)
- { return base_type::repeat_count(b); }
- static unsigned int restart_type(const base_type& b)
- { return base_type::restart_type(b); }
- static const re_syntax_base* first(const base_type& b)
- { return base_type::first(b); }
- static const unsigned char* get_map(const base_type& b)
- { return base_type::get_map(b); }
- static std::size_t leading_length(const base_type& b)
- { return base_type::leading_length(b); }
- static const kmp_info<charT>* get_kmp(const base_type& b)
- { return base_type::get_kmp(b); }
- static bool can_start(char_type c, const unsigned char* _map, unsigned char mask)
- {
- return reg_expression<char_type, traits_type, alloc_type>::can_start(c, _map, mask, width_type());
- }
-};
-
-
-#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
-//
-// Ugly ugly hack,
-// template don't merge if they contain switch statements so declare these
-// templates in unnamed namespace (ie with internal linkage), each translation
-// unit then gets its own local copy, it works seemlessly but bloats the app.
-namespace{
-#endif
-
-template <class iterator, class Allocator, class charT, class traits, class Allocator2>
-bool query_match_aux(iterator first,
- iterator last,
- match_results<iterator, Allocator>& m,
- const reg_expression<charT, traits, Allocator2>& e,
- unsigned flags,
- _priv_match_data<iterator, Allocator>& pd,
- iterator* restart)
-{
- typedef access_t<charT, traits, Allocator2> access;
-
- if(e.flags() & regbase::failbit)
- return false;
-
- typedef typename traits::size_type traits_size_type;
- typedef typename traits::uchar_type traits_uchar_type;
- typedef typename is_byte<charT>::width_type width_type;
- typedef typename re_detail::regex_iterator_traits<iterator>::difference_type difference_type;
-
- // declare some local aliases to reduce pointer loads
- // good optimising compilers should make this unnecessary!!
- jstack<match_results_base<iterator, Allocator>, Allocator>& matches = pd.matches;
- jstack<iterator, Allocator>& prev_pos = pd.prev_pos;
- jstack<const re_syntax_base*, Allocator>& prev_record = pd.prev_record;
- jstack<int, Allocator>& prev_acc = pd.prev_acc;
- match_results_base<iterator, Allocator>& temp_match = pd.temp_match;
- temp_match.set_first(first);
- difference_type& state_count = pd.state_count;
-
- const re_syntax_base* ptr = access::first(e);
- bool match_found = false;
- bool have_partial_match = false;
- bool unwind_stack = false;
- bool need_push_match = (e.mark_count() > 1);
- int cur_acc = -1; // no active accumulator
- pd.set_accumulator_size(access::repeat_count(e));
- int* accumulators = pd.get_accumulators();
- iterator* start_loop = pd.get_loop_starts();
- int k; // for loops
- bool icase = e.flags() & regbase::icase;
- *restart = first;
- iterator base = first;
- const traits& traits_inst = e.get_traits();
- // dwa 9/13/00 suppress incorrect MSVC warning - it claims this is never
- // referenced
- (void)traits_inst;
-
- // prepare m for failure:
- /*
- if((flags & match_init) == 0)
- {
- m.init_fail(first, last);
- } */
-
- retry:
-
- while(first != last)
- {
- jm_assert(ptr);
- ++state_count;
- switch(ptr->type)
- {
- case syntax_element_match:
- match_jump:
- {
- // match found, save then fallback in case we missed a
- // longer one.
- if((flags & match_not_null) && (first == temp_match[0].first))
- goto failure;
- if((flags & match_all) && (first != last))
- goto failure;
- temp_match.set_second(first);
- m.maybe_assign(temp_match);
- match_found = true;
- if(((flags & match_any) && ((first == last) || !(flags & match_all))) || ((first == last) && (need_push_match == false)))
- {
- // either we don't care what we match or we've matched
- // the whole string and can't match anything longer.
- while(matches.empty() == false)
- matches.pop();
- while(prev_pos.empty() == false)
- prev_pos.pop();
- while(prev_record.empty() == false)
- prev_record.pop();
- while(prev_acc.empty() == false)
- prev_acc.pop();
- return true;
- }
- }
- goto failure;
- case syntax_element_startmark:
- start_mark_jump:
- if(static_cast<const re_brace*>(ptr)->index > 0)
- {
- temp_match.set_first(first, static_cast<const re_brace*>(ptr)->index);
- }
- else if(
- (static_cast<const re_brace*>(ptr)->index == -1)
- || (static_cast<const re_brace*>(ptr)->index == -2)
- )
- {
- matches.push(temp_match);
- for(k = 0; k <= cur_acc; ++k)
- prev_pos.push(start_loop[k]);
- prev_pos.push(first);
- prev_record.push(ptr);
- for(k = 0; k <= cur_acc; ++k)
- prev_acc.push(accumulators[k]);
- prev_acc.push(cur_acc);
- prev_acc.push(match_found);
- match_found = false;
- // skip next jump and fall through:
- ptr = ptr->next.p;
- }
- ptr = ptr->next.p;
- break;
- case syntax_element_endmark:
- end_mark_jump:
- if(static_cast<const re_brace*>(ptr)->index > 0)
- {
- temp_match.set_second(first, static_cast<const re_brace*>(ptr)->index);
- }
- else if(
- (static_cast<const re_brace*>(ptr)->index == -1)
- || (static_cast<const re_brace*>(ptr)->index == -2)
- )
- {
- match_found = true;
- unwind_stack = true;
- goto failure;
- }
- ptr = ptr->next.p;
- break;
- case syntax_element_literal:
- {
- unsigned int len = static_cast<const re_literal*>(ptr)->length;
- const charT* what = reinterpret_cast<const charT*>(static_cast<const re_literal*>(ptr) + 1);
- //
- // compare string with what we stored in
- // our records:
- for(unsigned int i = 0; i < len; ++i, ++first)
- {
- if((first == last) || (traits_inst.translate(*first, icase) != what[i]))
- goto failure;
- }
- ptr = ptr->next.p;
- break;
- }
- case syntax_element_start_line:
- outer_line_check:
- if(first == temp_match[0].first)
- {
- // we're at the start of the buffer
- if(flags & match_prev_avail)
- {
- inner_line_check:
- // check the previous value even though its before
- // the start of our "buffer".
- iterator t(first);
- --t;
- if(traits::is_separator(*t) && !((*t == '\r') && (*first == '\n')) )
- {
- ptr = ptr->next.p;
- continue;
- }
- goto failure;
- }
- if((flags & match_not_bol) == 0)
- {
- ptr = ptr->next.p;
- continue;
- }
- goto failure;
- }
- // we're in the middle of the string
- goto inner_line_check;
- case syntax_element_end_line:
- // we're not yet at the end so *first is always valid:
- if(traits::is_separator(*first))
- {
- if((first != base) || (flags & match_prev_avail))
- {
- // check that we're not in the middle of \r\n sequence
- iterator t(first);
- --t;
- if((*t == '\r') && (*first == '\n'))
- {
- goto failure;
- }
- }
- ptr = ptr->next.p;
- continue;
- }
- goto failure;
- case syntax_element_wild:
- // anything except possibly NULL or \n:
- if(traits::is_separator(*first))
- {
- if(flags & match_not_dot_newline)
- goto failure;
- ptr = ptr->next.p;
- ++first;
- continue;
- }
- if(*first == charT(0))
- {
- if(flags & match_not_dot_null)
- goto failure;
- ptr = ptr->next.p;
- ++first;
- continue;
- }
- ptr = ptr->next.p;
- ++first;
- break;
- case syntax_element_word_boundary:
- {
- // prev and this character must be opposites:
-#if defined(BOOST_REGEX_USE_C_LOCALE) && defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ < 95)
- bool b = traits::is_class(*first, traits::char_class_word);
-#else
- bool b = traits_inst.is_class(*first, traits::char_class_word);
-#endif
- if((first == temp_match[0].first) && ((flags & match_prev_avail) == 0))
- {
- if(flags & match_not_bow)
- b ^= true;
- else
- b ^= false;
- }
- else
- {
- --first;
- b ^= traits_inst.is_class(*first, traits::char_class_word);
- ++first;
- }
- if(b)
- {
- ptr = ptr->next.p;
- continue;
- }
- goto failure;
- }
- case syntax_element_within_word:
- // both prev and this character must be traits::char_class_word:
- if(traits_inst.is_class(*first, traits::char_class_word))
- {
- bool b;
- if((first == temp_match[0].first) && ((flags & match_prev_avail) == 0))
- b = false;
- else
- {
- --first;
- b = traits_inst.is_class(*first, traits::char_class_word);
- ++first;
- }
- if(b)
- {
- ptr = ptr->next.p;
- continue;
- }
- }
- goto failure;
- case syntax_element_word_start:
- if((first == temp_match[0].first) && ((flags & match_prev_avail) == 0))
- {
- // start of buffer:
- if(flags & match_not_bow)
- goto failure;
- if(traits_inst.is_class(*first, traits::char_class_word))
- {
- ptr = ptr->next.p;
- continue;
- }
- goto failure;
- }
- // otherwise inside buffer:
- if(traits_inst.is_class(*first, traits::char_class_word))
- {
- iterator t(first);
- --t;
- if(traits_inst.is_class(*t, traits::char_class_word) == false)
- {
- ptr = ptr->next.p;
- continue;
- }
- }
- goto failure; // if we fall through to here then we've failed
- case syntax_element_word_end:
- if((first == temp_match[0].first) && ((flags & match_prev_avail) == 0))
- goto failure; // start of buffer can't be end of word
-
- // otherwise inside buffer:
- if(traits_inst.is_class(*first, traits::char_class_word) == false)
- {
- iterator t(first);
- --t;
- if(traits_inst.is_class(*t, traits::char_class_word))
- {
- ptr = ptr->next.p;
- continue;
- }
- }
- goto failure; // if we fall through to here then we've failed
- case syntax_element_buffer_start:
- if((first != temp_match[0].first) || (flags & match_not_bob))
- goto failure;
- // OK match:
- ptr = ptr->next.p;
- break;
- case syntax_element_buffer_end:
- if((first != last) || (flags & match_not_eob))
- goto failure;
- // OK match:
- ptr = ptr->next.p;
- break;
- case syntax_element_backref:
- {
- // compare with what we previously matched:
- iterator i = temp_match[static_cast<const re_brace*>(ptr)->index].first;
- iterator j = temp_match[static_cast<const re_brace*>(ptr)->index].second;
- while(i != j)
- {
- if((first == last) || (traits_inst.translate(*first, icase) != traits_inst.translate(*i, icase)))
- goto failure;
- ++i;
- ++first;
- }
- ptr = ptr->next.p;
- break;
- }
- case syntax_element_long_set:
- {
- // let the traits class do the work:
- iterator t = re_is_set_member(first, last, static_cast<const re_set_long*>(ptr), e);
- if(t != first)
- {
- ptr = ptr->next.p;
- first = t;
- continue;
- }
- goto failure;
- }
- case syntax_element_set:
- // lookup character in table:
- if(static_cast<const re_set*>(ptr)->_map[(traits_uchar_type)traits_inst.translate(*first, icase)])
- {
- ptr = ptr->next.p;
- ++first;
- continue;
- }
- goto failure;
- case syntax_element_jump:
- ptr = static_cast<const re_jump*>(ptr)->alt.p;
- continue;
- case syntax_element_alt:
- {
- // alt_jump:
- if(access::can_start(*first, static_cast<const re_jump*>(ptr)->_map, (unsigned char)mask_take))
- {
- // we can take the first alternative,
- // see if we need to push next alternative:
- if(access::can_start(*first, static_cast<const re_jump*>(ptr)->_map, mask_skip))
- {
- if(need_push_match)
- matches.push(temp_match);
- for(k = 0; k <= cur_acc; ++k)
- prev_pos.push(start_loop[k]);
- prev_pos.push(first);
- prev_record.push(ptr);
- for(k = 0; k <= cur_acc; ++k)
- prev_acc.push(accumulators[k]);
- prev_acc.push(cur_acc);
- }
- ptr = ptr->next.p;
- continue;
- }
- if(access::can_start(*first, static_cast<const re_jump*>(ptr)->_map, mask_skip))
- {
- ptr = static_cast<const re_jump*>(ptr)->alt.p;
- continue;
- }
- goto failure; // neither option is possible
- }
- case syntax_element_rep:
- {
- // repeater_jump:
- // if we're moving to a higher id (nested repeats etc)
- // zero out our accumualtors:
- if(cur_acc < static_cast<const re_repeat*>(ptr)->id)
- {
- cur_acc = static_cast<const re_repeat*>(ptr)->id;
- accumulators[cur_acc] = 0;
- start_loop[cur_acc] = first;
- }
-
- cur_acc = static_cast<const re_repeat*>(ptr)->id;
-
- if(static_cast<const re_repeat*>(ptr)->leading)
- *restart = first;
-
- //charT c = traits_inst.translate(*first);
-
- // first of all test for special case where this is last element,
- // if that is the case then repeat as many times as possible,
- // as long as the repeat is greedy:
-
- if((static_cast<const re_repeat*>(ptr)->alt.p->type == syntax_element_match)
- && (static_cast<const re_repeat*>(ptr)->greedy == true))
- {
- // see if we can take the repeat:
- if(((unsigned int)accumulators[cur_acc] < static_cast<const re_repeat*>(ptr)->max)
- && access::can_start(*first, static_cast<const re_repeat*>(ptr)->_map, mask_take))
- {
- // push terminating match as fallback:
- if((unsigned int)accumulators[cur_acc] >= static_cast<const re_repeat*>(ptr)->min)
- {
- if((prev_record.empty() == false) && (prev_record.peek() == static_cast<const re_repeat*>(ptr)->alt.p))
- {
- // we already have the required fallback
- // don't add any more, just update this one:
- if(need_push_match)
- matches.peek() = temp_match;
- prev_pos.peek() = first;
- }
- else
- {
- if(need_push_match)
- matches.push(temp_match);
- prev_pos.push(first);
- prev_record.push(static_cast<const re_repeat*>(ptr)->alt.p);
- }
- }
- // move to next item in list:
- if((first != start_loop[cur_acc]) || !accumulators[cur_acc])
- {
- ++accumulators[cur_acc];
- ptr = ptr->next.p;
- start_loop[cur_acc] = first;
- continue;
- }
- goto failure;
- }
- // see if we can skip the repeat:
- if(((unsigned int)accumulators[cur_acc] >= static_cast<const re_repeat*>(ptr)->min)
- && access::can_start(*first, static_cast<const re_repeat*>(ptr)->_map, mask_skip))
- {
- ptr = static_cast<const re_repeat*>(ptr)->alt.p;
- continue;
- }
- // otherwise fail:
- goto failure;
- }
-
- // OK if we get to here then the repeat is either non-terminal or non-greedy,
- // see if we can skip the repeat:
- if(((unsigned int)accumulators[cur_acc] >= static_cast<const re_repeat*>(ptr)->min)
- && access::can_start(*first, static_cast<const re_repeat*>(ptr)->_map, mask_skip))
- {
- // see if we can push failure info:
- if(((unsigned int)accumulators[cur_acc] < static_cast<const re_repeat*>(ptr)->max)
- && access::can_start(*first, static_cast<const re_repeat*>(ptr)->_map, mask_take))
- {
- // check to see if the last loop matched a NULL string
- // if so then we really don't want to loop again:
- if(((unsigned int)accumulators[cur_acc] == static_cast<const re_repeat*>(ptr)->min)
- || (first != start_loop[cur_acc]))
- {
- if(need_push_match)
- matches.push(temp_match);
- prev_pos.push(first);
- prev_record.push(ptr);
- for(k = 0; k <= cur_acc; ++k)
- prev_acc.push(accumulators[k]);
- // for non-greedy repeats save whether we have a match already:
- if(static_cast<const re_repeat*>(ptr)->greedy == false)
- {
- prev_acc.push(match_found);
- match_found = false;
- }
- }
- }
- ptr = static_cast<const re_repeat*>(ptr)->alt.p;
- continue;
- }
-
- // otherwise see if we can take the repeat:
- if(((unsigned int)accumulators[cur_acc] < static_cast<const re_repeat*>(ptr)->max)
- && access::can_start(*first, static_cast<const re_repeat*>(ptr)->_map, mask_take) &&
- ((first != start_loop[cur_acc]) || !accumulators[cur_acc]))
- {
- // move to next item in list:
- ++accumulators[cur_acc];
- ptr = ptr->next.p;
- start_loop[cur_acc] = first;
- continue;
- }
-
- // if we get here then neither option is allowed so fail:
- goto failure;
-
- }
- case syntax_element_combining:
- if(traits_inst.is_combining(traits_inst.translate(*first, icase)))
- goto failure;
- ++first;
- while((first != last) && traits_inst.is_combining(traits_inst.translate(*first, icase)))++first;
- ptr = ptr->next.p;
- continue;
- case syntax_element_soft_buffer_end:
- {
- if(flags & match_not_eob)
- goto failure;
- iterator p(first);
- while((p != last) && traits_inst.is_separator(traits_inst.translate(*first, icase)))++p;
- if(p != last)
- goto failure;
- ptr = ptr->next.p;
- continue;
- }
- case syntax_element_restart_continue:
- if(first != temp_match[-1].first)
- goto failure;
- ptr = ptr->next.p;
- continue;
- default:
- jm_assert(0); // should never get to here!!
- return false;
- }
- }
-
- //
- // if we get to here then we've run out of characters to match against,
- // we could however still have non-character regex items left
- if((ptr->can_be_null == 0) && ((flags & match_partial) == 0))
- goto failure;
- while(true)
- {
- jm_assert(ptr);
- ++state_count;
- switch(ptr->type)
- {
- case syntax_element_match:
- goto match_jump;
- case syntax_element_startmark:
- goto start_mark_jump;
- case syntax_element_endmark:
- goto end_mark_jump;
- case syntax_element_start_line:
- goto outer_line_check;
- case syntax_element_end_line:
- // we're at the end so *first is never valid:
- if((flags & match_not_eol) == 0)
- {
- ptr = ptr->next.p;
- continue;
- }
- goto failure;
- case syntax_element_word_boundary:
- case syntax_element_word_end:
- if(((flags & match_not_eow) == 0) && (first != temp_match[0].first))
- {
- iterator t(first);
- --t;
- if(traits_inst.is_class(*t, traits::char_class_word))
- {
- ptr = ptr->next.p;
- continue;
- }
- }
- goto failure;
- case syntax_element_buffer_end:
- case syntax_element_soft_buffer_end:
- if(flags & match_not_eob)
- goto failure;
- // OK match:
- ptr = ptr->next.p;
- break;
- case syntax_element_jump:
- ptr = static_cast<const re_jump*>(ptr)->alt.p;
- continue;
- case syntax_element_alt:
- if(ptr->can_be_null & mask_take)
- {
- // we can test the first alternative,
- // see if we need to push next alternative:
- if(ptr->can_be_null & mask_skip)
- {
- if(need_push_match)
- matches.push(temp_match);
- for(k = 0; k <= cur_acc; ++k)
- prev_pos.push(start_loop[k]);
- prev_pos.push(first);
- prev_record.push(ptr);
- for(k = 0; k <= cur_acc; ++k)
- prev_acc.push(accumulators[k]);
- prev_acc.push(cur_acc);
- }
- ptr = ptr->next.p;
- continue;
- }
- if(ptr->can_be_null & mask_skip)
- {
- ptr = static_cast<const re_jump*>(ptr)->alt.p;
- continue;
- }
- goto failure; // neither option is possible
- case syntax_element_rep:
- // if we're moving to a higher id (nested repeats etc)
- // zero out our accumualtors:
- if(cur_acc < static_cast<const re_repeat*>(ptr)->id)
- {
- cur_acc = static_cast<const re_repeat*>(ptr)->id;
- accumulators[cur_acc] = 0;
- start_loop[cur_acc] = first;
- }
-
- cur_acc = static_cast<const re_repeat*>(ptr)->id;
-
- // see if we can skip the repeat:
- if(((unsigned int)accumulators[cur_acc] >= static_cast<const re_repeat*>(ptr)->min)
- && ((ptr->can_be_null & mask_skip) || (flags & match_partial)))
- {
- // don't push failure info, there's no point:
- ptr = static_cast<const re_repeat*>(ptr)->alt.p;
- continue;
- }
-
- // otherwise see if we can take the repeat:
- if(((unsigned int)accumulators[cur_acc] < static_cast<const re_repeat*>(ptr)->max)
- && (((ptr->can_be_null & (mask_take | mask_skip)) == (mask_take | mask_skip))) || (flags & match_partial))
- {
- // move to next item in list:
- ++accumulators[cur_acc];
- ptr = ptr->next.p;
- start_loop[cur_acc] = first;
- continue;
- }
-
- // if we get here then neither option is allowed so fail:
- goto failure;
- case syntax_element_restart_continue:
- if(first != temp_match[-1].first)
- goto failure;
- ptr = ptr->next.p;
- continue;
- default:
- goto failure;
- }
- }
-
- failure:
-
- //
- // check to see if we've been searching too many states:
- //
- if(state_count >= pd.max_state_count)
- {
-#ifndef BOOST_NO_EXCEPTIONS
- throw std::runtime_error("Max regex search depth exceeded.");
-#else
- while(matches.empty() == false)
- matches.pop();
- while(prev_pos.empty() == false)
- prev_pos.pop();
- while(prev_record.empty() == false)
- prev_record.pop();
- while(prev_acc.empty() == false)
- prev_acc.pop();
- return false;
-#endif
- }
-
- //
- // check for possible partial match:
- //
- if((flags & match_partial)
- && !match_found // no full match already
- && (base != first) // some charcters have been consumed
- && (first == last)) // end of input has been reached
- {
- have_partial_match = true;
- temp_match.set_second(first, 0, false);
- m.maybe_assign(temp_match);
- }
-
- if(prev_record.empty() == false)
- {
- ptr = prev_record.peek();
- switch(ptr->type)
- {
- case syntax_element_alt:
- // get next alternative:
- ptr = static_cast<const re_jump*>(ptr)->alt.p;
- if(need_push_match)
- matches.pop(temp_match);
- prev_acc.pop(cur_acc);
- for(k = cur_acc; k >= 0; --k)
- prev_acc.pop(accumulators[k]);
- prev_pos.pop(first);
- for(k = cur_acc; k >= 0; --k)
- prev_pos.pop(start_loop[k]);
- prev_record.pop();
- if(unwind_stack) goto failure; // unwinding forward assert
- goto retry;
- case syntax_element_rep:
- {
- // we're doing least number of repeats first,
- // increment count and repeat again:
- bool saved_matched = match_found;
- if(need_push_match)
- matches.pop(temp_match);
- prev_pos.pop(first);
- cur_acc = static_cast<const re_repeat*>(ptr)->id;
- if(static_cast<const re_repeat*>(ptr)->greedy == false)
- {
- saved_matched = prev_acc.peek();
- prev_acc.pop();
- }
- for(k = cur_acc; k >= 0; --k)
- prev_acc.pop(accumulators[k]);
- prev_record.pop();
- if(unwind_stack) goto failure; // unwinding forward assert
- if((unsigned int)++accumulators[cur_acc] > static_cast<const re_repeat*>(ptr)->max)
- goto failure; // repetions exhausted.
- //
- // if the repeat is non-greedy, and we found a match then fail again:
- if((static_cast<const re_repeat*>(ptr)->greedy == false) && (match_found == true))
- {
- goto failure;
- }
- else if (match_found == false)
- match_found = saved_matched;
- ptr = ptr->next.p;
- start_loop[cur_acc] = first;
- goto retry;
- }
- case syntax_element_startmark:
- {
- bool saved_matched = match_found;
- matches.pop(temp_match);
- match_found = prev_acc.peek();
- prev_acc.pop();
- prev_acc.pop(cur_acc);
- for(k = cur_acc; k >= 0; --k)
- prev_acc.pop(accumulators[k]);
- prev_pos.pop(first);
- for(k = cur_acc; k >= 0; --k)
- prev_pos.pop(start_loop[k]);
- prev_record.pop();
- unwind_stack = false;
- if(static_cast<const re_brace*>(ptr)->index == -1)
- {
- if (saved_matched == false)
- goto failure;
- ptr = static_cast<const re_jump*>(ptr->next.p)->alt.p->next.p;
- goto retry;
- }
- if(static_cast<const re_brace*>(ptr)->index == -2)
- {
- if (saved_matched == true)
- goto failure;
- ptr = static_cast<const re_jump*>(ptr->next.p)->alt.p->next.p;
- goto retry;
- }
- else goto failure;
- }
- case syntax_element_match:
- if(need_push_match)
- matches.pop(temp_match);
- prev_pos.pop(first);
- prev_record.pop();
- if(unwind_stack) goto failure; // unwinding forward assert
- goto retry;
- default:
- jm_assert(0);
- // mustn't get here!!
- }
- }
-
- if(match_found || have_partial_match)
- {
- pd.state_count = 0;
- return true;
- }
-
- // if we get to here then everything has failed
- // and no match was found:
- return false;
-}
-#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
-} // namespace
-#endif
-
-
-template <class iterator>
-void _skip_and_inc(unsigned int& clines, iterator& last_line, iterator& first, const iterator last)
-{
- while(first != last)
- {
- if(*first == '\n')
- {
- last_line = ++first;
- ++clines;
- }
- else
- ++first;
- }
-}
-
-template <class iterator>
-void _skip_and_dec(unsigned int& clines, iterator& last_line, iterator& first, iterator base, std::size_t len)
-{
- bool need_line = false;
- for(std::size_t i = 0; i < len; ++i)
- {
- --first;
- if(*first == '\n')
- {
- need_line = true;
- --clines;
- }
- }
-
- if(need_line)
- {
- last_line = first;
-
- if(last_line != base)
- --last_line;
- else
- return;
-
- while((last_line != base) && (*last_line != '\n'))
- --last_line;
- if(*last_line == '\n')
- ++last_line;
- }
-}
-
-template <class iterator>
-inline void _inc_one(unsigned int& clines, iterator& last_line, iterator& first)
-{
- if(*first == '\n')
- {
- last_line = ++first;
- ++clines;
- }
- else
- ++first;
-}
-
-template <class iterator, class Allocator>
-struct grep_search_predicate
-{
- match_results<iterator, Allocator>* pm;
- grep_search_predicate(match_results<iterator, Allocator>* p) : pm(p) {}
- bool operator()(const match_results<iterator, Allocator>& m)
- {
- *pm = static_cast<const match_results_base<iterator, Allocator>&>(m);
- return false;
- }
-};
-
-#if !defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
-
-template <class iterator, class Allocator>
-inline const match_results_base<iterator, Allocator>& grep_out_type(const grep_search_predicate<iterator, Allocator>& o, const Allocator&)
-{
- return *(o.pm);
-}
-
-#endif
-
-template <class T, class Allocator>
-inline const Allocator& grep_out_type(const T&, const Allocator& a)
-{
- return a;
-}
-
-#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
-//
-// Ugly ugly hack,
-// template don't merge if they contain switch statements so declare these
-// templates in unnamed namespace (ie with internal linkage), each translation
-// unit then gets its own local copy, it works seemlessly but bloats the app.
-namespace{
-#endif
-
-//
-// reg_grep2:
-// find all non-overlapping matches within the sequence first last:
-//
-template <class Predicate, class I, class charT, class traits, class A, class A2>
-unsigned int reg_grep2(Predicate foo, I first, I last, const reg_expression<charT, traits, A>& e, unsigned flags, A2 a)
-{
- typedef access_t<charT, traits, A> access;
-
- if(e.flags() & regbase::failbit)
- return 0;
-
- typedef typename traits::size_type traits_size_type;
- typedef typename traits::uchar_type traits_uchar_type;
- typedef typename is_byte<charT>::width_type width_type;
-
- match_results<I, A2> m(grep_out_type(foo, a));
- I restart;
- m.set_size(e.mark_count(), first, last);
- m.set_line(1, first);
- m.set_base(first);
-
- unsigned int clines = 1;
- unsigned int cmatches = 0;
- I last_line = first;
- I next_base;
- I base = first;
- bool need_init;
- const traits& traits_inst = e.get_traits();
- // dwa 9/13/00 suppress incorrect MSVC warning - it claims this is never
- // referenced
- (void)traits_inst;
-
- flags |= match_init;
-
- _priv_match_data<I, A2> pd(m, first, last, e.size());
-
- const unsigned char* _map = access::get_map(e);
- unsigned int type;
-
- if(first == last)
- {
- // special case, only test if can_be_null,
- // don't dereference any pointers!!
- if(access::first(e)->can_be_null)
- {
- if(query_match_aux(first, last, m, e, flags, pd, &restart))
- {
- foo(m);
- ++cmatches;
- }
- }
- return cmatches;
- }
-
- // try one time whatever:
- if( access::can_start(*first, _map, (unsigned char)mask_any) )
- {
- if(query_match_aux(first, last, m, e, flags, pd, &restart))
- {
- ++cmatches;
- if(foo(m) == false)
- return cmatches;
- if(m[0].second == last)
- return cmatches;
- // update to end of what matched
- // trying to match again with match_not_null set if this
- // is a null match...
- need_init = true;
- if(first == m[0].second)
- {
- next_base = m[0].second;
- pd.temp_match.init_fail(next_base, last);
- m.init_fail(next_base, last);
- if(query_match_aux(first, last, m, e, flags | match_not_null, pd, &restart))
- {
- ++cmatches;
- if(foo(m) == false)
- return cmatches;
- }
- else
- {
- need_init = false;
- for(unsigned int i = 0; (restart != first) && (i < access::leading_length(e)); ++i, --restart)
- {} // dwa 10/20/2000 - warning suppression for MWCW
- if(restart != last)
- ++restart;
- _skip_and_inc(clines, last_line, first, restart);
- }
- }
- if(need_init)
- {
- _skip_and_inc(clines, last_line, first, m[0].second);
- next_base = m[0].second;
- pd.temp_match.init_fail(next_base, last);
- m.init_fail(next_base, last);
- }
- }
- else
- {
- for(unsigned int i = 0; (restart != first) && (i < access::leading_length(e)); ++i, --restart)
- {} // dwa 10/20/2000 - warning suppression for MWCW
- if(restart != last)
- ++restart;
- _skip_and_inc(clines, last_line, first, restart);
- }
- }
- else
- _inc_one(clines, last_line, first);
- flags |= match_prev_avail | match_not_bob;
-
-
- // depending on what the first record is we may be able to
- // optimise the search:
- type = (flags & match_continuous) ?
- static_cast<unsigned int>(regbase::restart_continue)
- : static_cast<unsigned int>(access::restart_type(e));
-
- if(type == regbase::restart_buf)
- return cmatches;
-
- switch(type)
- {
- case regbase::restart_lit:
- case regbase::restart_fixed_lit:
- {
- const kmp_info<charT>* info = access::get_kmp(e);
- int len = info->len;
- const charT* x = info->pstr;
- int j = 0;
- bool icase = e.flags() & regbase::icase;
- while (first != last)
- {
- while((j > -1) && (x[j] != traits_inst.translate(*first, icase)))
- j = info->kmp_next[j];
- _inc_one(clines, last_line, first);
- ++j;
- if(j >= len)
- {
- if(type == regbase::restart_fixed_lit)
- {
- _skip_and_dec(clines, last_line, first, base, j);
- restart = first;
- std::advance(restart, len);
- m.set_first(first);
- m.set_second(restart);
- m.set_line(clines, last_line);
- ++cmatches;
- if(foo(m) == false)
- return cmatches;
- if(m[0].second == last)
- return cmatches;
- _skip_and_inc(clines, last_line, first, restart);
- next_base = m[0].second;
- pd.temp_match.init_fail(next_base, last);
- m.init_fail(next_base, last);
- j = 0;
- }
- else
- {
- restart = first;
- _skip_and_dec(clines, last_line, first, base, j);
- if(query_match_aux(first, last, m, e, flags, pd, &restart))
- {
-
- m.set_line(clines, last_line);
- ++cmatches;
- if(foo(m) == false)
- return cmatches;
- if(m[0].second == last)
- return cmatches;
- // update to end of what matched
- _skip_and_inc(clines, last_line, first, m[0].second);
- next_base = m[0].second;
- pd.temp_match.init_fail(next_base, last);
- m.init_fail(next_base, last);
- j = 0;
- }
- else
- {
- for(int k = 0; (restart != first) && (k < j); ++k, --restart)
- {} // dwa 10/20/2000 - warning suppression for MWCW
- if(restart != last)
- ++restart;
- _skip_and_inc(clines, last_line, first, restart);
- j = 0; //we could do better than this...
- }
- }
- }
- }
- break;
- }
- case regbase::restart_any:
- {
- while(first != last)
- {
- if( access::can_start(*first, _map, (unsigned char)mask_any) )
- {
- if(query_match_aux(first, last, m, e, flags, pd, &restart))
- {
-
- m.set_line(clines, last_line);
- ++cmatches;
- if(foo(m) == false)
- return cmatches;
- if(m[0].second == last)
- return cmatches;
- // update to end of what matched
- // trying to match again with match_not_null set if this
- // is a null match...
- need_init = true;
- if(first == m[0].second)
- {
- next_base = m[0].second;
- pd.temp_match.init_fail(next_base, last);
- m.init_fail(next_base, last);
- if(query_match_aux(first, last, m, e, flags | match_not_null, pd, &restart))
- {
- m.set_line(clines, last_line);
- ++cmatches;
- if(foo(m) == false)
- return cmatches;
- }
- else
- {
- need_init = false;
- for(unsigned int i = 0; (restart != first) && (i < access::leading_length(e)); ++i, --restart)
- {} // dwa 10/20/2000 - warning suppression for MWCW
- if(restart != last)
- ++restart;
- _skip_and_inc(clines, last_line, first, restart);
- }
- }
- if(need_init)
- {
- _skip_and_inc(clines, last_line, first, m[0].second);
- next_base = m[0].second;
- pd.temp_match.init_fail(next_base, last);
- m.init_fail(next_base, last);
- }
- continue;
- }
- else
- {
- for(unsigned int i = 0; (restart != first) && (i < access::leading_length(e)); ++i, --restart)
- {} // dwa 10/20/2000 - warning suppression for MWCW
- if(restart != last)
- ++restart;
- _skip_and_inc(clines, last_line, first, restart);
- }
- }
- else
- _inc_one(clines, last_line, first);
- }
- }
- break;
- case regbase::restart_word:
- {
- // do search optimised for word starts:
- while(first != last)
- {
- --first;
- if(*first == '\n')
- --clines;
- // skip the word characters:
- while((first != last) && traits_inst.is_class(*first, traits::char_class_word))
- ++first;
- // now skip the white space:
- while((first != last) && (traits_inst.is_class(*first, traits::char_class_word) == false))
- {
- #ifdef __GNUC__
- //
- // hack to work around gcc optimisation bug
- // just expand the contents of _inc_one here:
- if(*first == '\n')
- {
- last_line = ++first;
- ++clines;
- }
- else
- ++first;
- #else
- _inc_one(clines, last_line, first);
- #endif
- }
- if(first == last)
- break;
-
- if( access::can_start(*first, _map, (unsigned char)mask_any) )
- {
- if(query_match_aux(first, last, m, e, flags, pd, &restart))
- {
- m.set_line(clines, last_line);
- ++cmatches;
- if(foo(m) == false)
- return cmatches;
- if(m[0].second == last)
- return cmatches;
- // update to end of what matched
- // trying to match again with match_not_null set if this
- // is a null match...
- need_init = true;
- if(first == m[0].second)
- {
- next_base = m[0].second;
- pd.temp_match.init_fail(next_base, last);
- m.init_fail(next_base, last);
- if(query_match_aux(first, last, m, e, flags | match_not_null, pd, &restart))
- {
- m.set_line(clines, last_line);
- ++cmatches;
- if(foo(m) == false)
- return cmatches;
- }
- else
- {
- need_init = false;
- for(unsigned int i = 0; (restart != first) && (i < access::leading_length(e)); ++i, --restart)
- {} // dwa 10/20/2000 - warning suppression for MWCW
- if(restart != last)
- ++restart;
- _skip_and_inc(clines, last_line, first, restart);
- }
- }
- if(need_init)
- {
- _skip_and_inc(clines, last_line, first, m[0].second);
- next_base = m[0].second;
- pd.temp_match.init_fail(next_base, last);
- m.init_fail(next_base, last);
- }
- }
- else
- {
- for(unsigned int i = 0; (restart != first) && (i < access::leading_length(e)); ++i, --restart)
- {} // dwa 10/20/2000 - warning suppression for MWCW
- if(restart != last)
- ++restart;
- _skip_and_inc(clines, last_line, first, restart);
- }
- }
- else
- _inc_one(clines, last_line, first);
- }
- }
- break;
- case regbase::restart_line:
- {
- // do search optimised for line starts:
- while(first != last)
- {
- // find first charcter after a line break:
- --first;
- if(*first == '\n')
- --clines;
- while((first != last) && (*first != '\n'))
- ++first;
- if(first == last)
- break;
- ++first;
- if(first == last)
- break;
-
- ++clines;
- last_line = first;
-
- if( access::can_start(*first, _map, (unsigned char)mask_any) )
- {
- if(query_match_aux(first, last, m, e, flags, pd, &restart))
- {
- m.set_line(clines, last_line);
- ++cmatches;
- if(foo(m) == false)
- return cmatches;
- if(m[0].second == last)
- return cmatches;
- // update to end of what matched
- // trying to match again with match_not_null set if this
- // is a null match...
- need_init = true;
- if(first == m[0].second)
- {
- next_base = m[0].second;
- pd.temp_match.init_fail(next_base, last);
- m.init_fail(next_base, last);
- if(query_match_aux(first, last, m, e, flags | match_not_null, pd, &restart))
- {
- m.set_line(clines, last_line);
- ++cmatches;
- if(foo(m) == false)
- return cmatches;
- }
- else
- {
- need_init = false;
- for(unsigned int i = 0; (restart != first) && (i < access::leading_length(e)); ++i, --restart)
- {} // dwa 10/20/2000 - warning suppression for MWCW
- if(restart != last)
- ++restart;
- _skip_and_inc(clines, last_line, first, restart);
- }
- }
- if(need_init)
- {
- _skip_and_inc(clines, last_line, first, m[0].second);
- next_base = m[0].second;
- pd.temp_match.init_fail(next_base, last);
- m.init_fail(next_base, last);
- }
- }
- else
- {
- for(unsigned int i = 0; (restart != first) && (i < access::leading_length(e)); ++i, --restart)
- {} // dwa 10/20/2000 - warning suppression for MWCW
- if(restart != last)
- ++restart;
- _skip_and_inc(clines, last_line, first, restart);
- }
- }
- else
- _inc_one(clines, last_line, first);
- }
- }
- break;
- case regbase::restart_continue:
- {
- while(first != last)
- {
- if( access::can_start(*first, _map, (unsigned char)mask_any) )
- {
- if(query_match_aux(first, last, m, e, flags, pd, &restart))
- {
- m.set_line(clines, last_line);
- ++cmatches;
- if(foo(m) == false)
- return cmatches;
- if(m[0].second == last)
- return cmatches;
- // update to end of what matched
- // trying to match again with match_not_null set if this
- // is a null match...
- if(first == m[0].second)
- {
- next_base = m[0].second;
- pd.temp_match.init_fail(next_base, last);
- m.init_fail(next_base, last);
- if(query_match_aux(first, last, m, e, flags | match_not_null, pd, &restart))
- {
- m.set_line(clines, last_line);
- ++cmatches;
- if(foo(m) == false)
- return cmatches;
- }
- else
- return cmatches; // can't continue from null match
- }
- _skip_and_inc(clines, last_line, first, m[0].second);
- next_base = m[0].second;
- pd.temp_match.init_fail(next_base, last);
- m.init_fail(next_base, last);
- continue;
- }
- }
- return cmatches;
- }
- }
- break;
- }
-
-
- // finally check trailing null string:
- if(access::first(e)->can_be_null)
- {
- if(query_match_aux(first, last, m, e, flags, pd, &restart))
- {
- m.set_line(clines, last_line);
- ++cmatches;
- if(foo(m) == false)
- return cmatches;
- }
- }
-
- return cmatches;
-}
-#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
-} // namespace {anon}
-#endif
-
-} // namespace re_detail
-
-//
-// proc regex_match
-// returns true if the specified regular expression matches
-// the whole of the input. Fills in what matched in m.
-//
-template <class iterator, class Allocator, class charT, class traits, class Allocator2>
-bool regex_match(iterator first, iterator last, match_results<iterator, Allocator>& m, const reg_expression<charT, traits, Allocator2>& e, unsigned flags = match_default)
-{
- // prepare m for failure:
- if((flags & match_init) == 0)
- {
- m.set_size(e.mark_count(), first, last);
- m.set_base(first);
- m.set_line(1, first);
- }
- flags |= match_all; // must match all of input.
- re_detail::_priv_match_data<iterator, Allocator> pd(m, first, last, e.size());
- iterator restart;
- bool result = re_detail::query_match_aux(first, last, m, e, flags, pd, &restart);
- return result;
-}
-template <class iterator, class charT, class traits, class Allocator2>
-bool regex_match(iterator first, iterator last, const reg_expression<charT, traits, Allocator2>& e, unsigned flags = match_default)
-{
- match_results<iterator> m;
- return regex_match(first, last, m, e, flags);
-}
-//
-// query_match convenience interfaces:
-#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-//
-// this isn't really a partial specialisation, but template function
-// overloading - if the compiler doesn't support partial specialisation
-// then it really won't support this either:
-template <class charT, class Allocator, class traits, class Allocator2>
-inline bool regex_match(const charT* str,
- match_results<const charT*, Allocator>& m,
- const reg_expression<charT, traits, Allocator2>& e,
- unsigned flags = match_default)
-{
- return regex_match(str, str + traits::length(str), m, e, flags);
-}
-
-template <class ST, class SA, class Allocator, class charT, class traits, class Allocator2>
-inline bool regex_match(const std::basic_string<charT, ST, SA>& s,
- match_results<typename std::basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
- const reg_expression<charT, traits, Allocator2>& e,
- unsigned flags = match_default)
-{
- return regex_match(s.begin(), s.end(), m, e, flags);
-}
-template <class charT, class traits, class Allocator2>
-inline bool regex_match(const charT* str,
- const reg_expression<charT, traits, Allocator2>& e,
- unsigned flags = match_default)
-{
- match_results<const charT*> m;
- return regex_match(str, str + traits::length(str), m, e, flags);
-}
-
-template <class ST, class SA, class charT, class traits, class Allocator2>
-inline bool regex_match(const std::basic_string<charT, ST, SA>& s,
- const reg_expression<charT, traits, Allocator2>& e,
- unsigned flags = match_default)
-{
- typedef typename std::basic_string<charT, ST, SA>::const_iterator iterator;
- match_results<iterator> m;
- return regex_match(s.begin(), s.end(), m, e, flags);
-}
-#else // partial ordering
-inline bool regex_match(const char* str,
- cmatch& m,
- const regex& e,
- unsigned flags = match_default)
-{
- return regex_match(str, str + regex::traits_type::length(str), m, e, flags);
-}
-inline bool regex_match(const char* str,
- const regex& e,
- unsigned flags = match_default)
-{
- match_results<const char*> m;
- return regex_match(str, str + regex::traits_type::length(str), m, e, flags);
-}
-#ifndef BOOST_NO_WREGEX
-inline bool regex_match(const wchar_t* str,
- wcmatch& m,
- const wregex& e,
- unsigned flags = match_default)
-{
- return regex_match(str, str + wregex::traits_type::length(str), m, e, flags);
-}
-inline bool regex_match(const wchar_t* str,
- const wregex& e,
- unsigned flags = match_default)
-{
- match_results<const wchar_t*> m;
- return regex_match(str, str + wregex::traits_type::length(str), m, e, flags);
-}
-#endif
-inline bool regex_match(const std::string& s,
- match_results<std::string::const_iterator, regex::allocator_type>& m,
- const regex& e,
- unsigned flags = match_default)
-{
- return regex_match(s.begin(), s.end(), m, e, flags);
-}
-inline bool regex_match(const std::string& s,
- const regex& e,
- unsigned flags = match_default)
-{
- match_results<std::string::const_iterator, regex::allocator_type> m;
- return regex_match(s.begin(), s.end(), m, e, flags);
-}
-#if !defined(BOOST_NO_WREGEX)
-inline bool regex_match(const std::basic_string<wchar_t>& s,
- match_results<std::basic_string<wchar_t>::const_iterator, wregex::allocator_type>& m,
- const wregex& e,
- unsigned flags = match_default)
-{
- return regex_match(s.begin(), s.end(), m, e, flags);
-}
-inline bool regex_match(const std::basic_string<wchar_t>& s,
- const wregex& e,
- unsigned flags = match_default)
-{
- match_results<std::basic_string<wchar_t>::const_iterator, wregex::allocator_type> m;
- return regex_match(s.begin(), s.end(), m, e, flags);
-}
-#endif
-
-#endif
-
-template <class iterator, class Allocator, class charT, class traits, class Allocator2>
-bool regex_search(iterator first, iterator last, match_results<iterator, Allocator>& m, const reg_expression<charT, traits, Allocator2>& e, unsigned flags = match_default)
-{
- if(e.flags() & regbase::failbit)
- return false;
-
- typedef typename traits::size_type traits_size_type;
- typedef typename traits::uchar_type traits_uchar_type;
-
- return re_detail::reg_grep2(re_detail::grep_search_predicate<iterator, Allocator>(&m), first, last, e, flags, m.allocator());
-}
-
-//
-// regex_search convenience interfaces:
-#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-//
-// this isn't really a partial specialisation, but template function
-// overloading - if the compiler doesn't support partial specialisation
-// then it really won't support this either:
-template <class charT, class Allocator, class traits, class Allocator2>
-inline bool regex_search(const charT* str,
- match_results<const charT*, Allocator>& m,
- const reg_expression<charT, traits, Allocator2>& e,
- unsigned flags = match_default)
-{
- return regex_search(str, str + traits::length(str), m, e, flags);
-}
-
-template <class ST, class SA, class Allocator, class charT, class traits, class Allocator2>
-inline bool regex_search(const std::basic_string<charT, ST, SA>& s,
- match_results<typename std::basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
- const reg_expression<charT, traits, Allocator2>& e,
- unsigned flags = match_default)
-{
- return regex_search(s.begin(), s.end(), m, e, flags);
-}
-#else // partial specialisation
-inline bool regex_search(const char* str,
- cmatch& m,
- const regex& e,
- unsigned flags = match_default)
-{
- return regex_search(str, str + regex::traits_type::length(str), m, e, flags);
-}
-#ifndef BOOST_NO_WREGEX
-inline bool regex_search(const wchar_t* str,
- wcmatch& m,
- const wregex& e,
- unsigned flags = match_default)
-{
- return regex_search(str, str + wregex::traits_type::length(str), m, e, flags);
-}
-#endif
-inline bool regex_search(const std::string& s,
- match_results<std::string::const_iterator, regex::allocator_type>& m,
- const regex& e,
- unsigned flags = match_default)
-{
- return regex_search(s.begin(), s.end(), m, e, flags);
-}
-#if !defined(BOOST_NO_WREGEX)
-inline bool regex_search(const std::basic_string<wchar_t>& s,
- match_results<std::basic_string<wchar_t>::const_iterator, wregex::allocator_type>& m,
- const wregex& e,
- unsigned flags = match_default)
-{
- return regex_search(s.begin(), s.end(), m, e, flags);
-}
-#endif
-
-#endif
-
-
-//
-// regex_grep:
-// find all non-overlapping matches within the sequence first last:
-//
-template <class Predicate, class iterator, class charT, class traits, class Allocator>
-inline unsigned int regex_grep(Predicate foo, iterator first, iterator last, const reg_expression<charT, traits, Allocator>& e, unsigned flags = match_default)
-{
- return re_detail::reg_grep2(foo, first, last, e, flags, e.allocator());
-}
-
-//
-// regex_grep convenience interfaces:
-#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-//
-// this isn't really a partial specialisation, but template function
-// overloading - if the compiler doesn't support partial specialisation
-// then it really won't support this either:
-template <class Predicate, class charT, class Allocator, class traits>
-inline unsigned int regex_grep(Predicate foo, const charT* str,
- const reg_expression<charT, traits, Allocator>& e,
- unsigned flags = match_default)
-{
- return regex_grep(foo, str, str + traits::length(str), e, flags);
-}
-
-template <class Predicate, class ST, class SA, class Allocator, class charT, class traits>
-inline unsigned int regex_grep(Predicate foo, const std::basic_string<charT, ST, SA>& s,
- const reg_expression<charT, traits, Allocator>& e,
- unsigned flags = match_default)
-{
- return regex_grep(foo, s.begin(), s.end(), e, flags);
-}
-#else // partial specialisation
-inline unsigned int regex_grep(bool (*foo)(const cmatch&), const char* str,
- const regex& e,
- unsigned flags = match_default)
-{
- return regex_grep(foo, str, str + regex::traits_type::length(str), e, flags);
-}
-#ifndef BOOST_NO_WREGEX
-inline unsigned int regex_grep(bool (*foo)(const wcmatch&), const wchar_t* str,
- const wregex& e,
- unsigned flags = match_default)
-{
- return regex_grep(foo, str, str + wregex::traits_type::length(str), e, flags);
-}
-#endif
-inline unsigned int regex_grep(bool (*foo)(const match_results<std::string::const_iterator, regex::allocator_type>&), const std::string& s,
- const regex& e,
- unsigned flags = match_default)
-{
- return regex_grep(foo, s.begin(), s.end(), e, flags);
-}
-#if !defined(BOOST_NO_WREGEX)
-inline unsigned int regex_grep(bool (*foo)(const match_results<std::basic_string<wchar_t>::const_iterator, wregex::allocator_type>&),
- const std::basic_string<wchar_t>& s,
- const wregex& e,
- unsigned flags = match_default)
-{
- return regex_grep(foo, s.begin(), s.end(), e, flags);
-}
-#endif
-
-#endif
-
-
-#ifdef __BORLANDC__
- #pragma option pop
-#endif
-
-} // namespace boost
-
-#endif // BOOST_REGEX_MATCH_HPP
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-/*
- *
- * Copyright (c) 1998-2002
- * Dr John Maddock
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Dr John Maddock makes no representations
- * about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_raw_buffer.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Raw character buffer for regex code.
- * Note this is an internal header file included
- * by regex.hpp, do not include on its own.
- */
-
-#ifndef BOOST_REGEX_RAW_BUFFER_HPP
-#define BOOST_REGEX_RAW_BUFFER_HPP
-
-#ifndef BOOST_REGEX_CONFIG_HPP
-#include <boost/regex/config.hpp>
-#endif
-
-namespace boost{
- namespace re_detail{
-
-#ifdef __BORLANDC__
- #pragma option push -a8 -b -Vx -Ve -pc
-#endif
-
-struct empty_padding{};
-
-union padding
-{
- void* p;
- unsigned int i;
-};
-
-template <int N>
-struct padding3
-{
- enum{
- padding_size = 8,
- padding_mask = 7
- };
-};
-
-template<>
-struct padding3<2>
-{
- enum{
- padding_size = 2,
- padding_mask = 1
- };
-};
-
-template<>
-struct padding3<4>
-{
- enum{
- padding_size = 4,
- padding_mask = 3
- };
-};
-
-template<>
-struct padding3<8>
-{
- enum{
- padding_size = 8,
- padding_mask = 7
- };
-};
-
-template<>
-struct padding3<16>
-{
- enum{
- padding_size = 16,
- padding_mask = 15
- };
-};
-
-enum{
- padding_size = padding3<sizeof(padding)>::padding_size,
- padding_mask = padding3<sizeof(padding)>::padding_mask
-};
-
-//
-// class raw_storage
-// basically this is a simplified vector<unsigned char>
-// this is used by reg_expression for expression storage
-//
-
-template <class Allocator>
-class raw_storage
-{
-public:
- typedef Allocator allocator_type;
- typedef typename boost::detail::rebind_allocator<unsigned char, allocator_type>::type alloc_inst_type;
- typedef typename alloc_inst_type::size_type size_type;
- typedef typename alloc_inst_type::pointer pointer;
-private:
- //
- // empty member optimisation:
- struct alloc_data : public alloc_inst_type
- {
- typename alloc_inst_type::pointer last;
- alloc_data(const Allocator& a) : alloc_inst_type(a){}
- } alloc_inst;
- pointer start, end;
-public:
-
- raw_storage(const Allocator& a = Allocator());
- raw_storage(size_type n, const Allocator& a = Allocator());
-
- ~raw_storage()
- {
- alloc_inst.deallocate(start, (alloc_inst.last - start));
- }
-
- void BOOST_REGEX_CALL resize(size_type n);
-
- void* BOOST_REGEX_CALL extend(size_type n)
- {
- if(size_type(alloc_inst.last - end) < n)
- resize(n + (end - start));
- register void* result = end;
- end += n;
- return result;
- }
-
- void* BOOST_REGEX_CALL insert(size_type pos, size_type n);
-
- size_type BOOST_REGEX_CALL size()
- {
- return end - start;
- }
-
- size_type BOOST_REGEX_CALL capacity()
- {
- return alloc_inst.last - start;
- }
-
- void* BOOST_REGEX_CALL data()const
- {
- return start;
- }
-
- size_type BOOST_REGEX_CALL index(void* ptr)
- {
- return reinterpret_cast<unsigned char*>(ptr) - reinterpret_cast<unsigned char*>(data());
- }
-
- void BOOST_REGEX_CALL clear()
- {
- end = start;
- }
-
- void BOOST_REGEX_CALL align()
- {
- // move end up to a boundary:
- end = reinterpret_cast<unsigned char*>(start) + (((reinterpret_cast<unsigned char*>(end) - reinterpret_cast<unsigned char*>(start)) + padding_mask) & ~padding_mask);
- }
-
- Allocator BOOST_REGEX_CALL allocator()const;
-};
-
-template <class Allocator>
-raw_storage<Allocator>::raw_storage(const Allocator& a)
- : alloc_inst(a)
-{
- start = end = alloc_inst.allocate(1024);
- BOOST_REGEX_NOEH_ASSERT(start)
- alloc_inst.last = start + 1024;
-}
-
-template <class Allocator>
-raw_storage<Allocator>::raw_storage(size_type n, const Allocator& a)
- : alloc_inst(a)
-{
- start = end = alloc_inst.allocate(n);
- BOOST_REGEX_NOEH_ASSERT(start)
- alloc_inst.last = start + n;
-}
-
-template <class Allocator>
-Allocator BOOST_REGEX_CALL raw_storage<Allocator>::allocator()const
-{
- return alloc_inst;
-}
-
-template <class Allocator>
-void BOOST_REGEX_CALL raw_storage<Allocator>::resize(size_type n)
-{
- register size_type newsize = (alloc_inst.last - start) * 2;
- register size_type datasize = end - start;
- if(newsize < n)
- newsize = n;
- // extend newsize to WORD/DWORD boundary:
- newsize = (newsize + padding_mask) & ~(padding_mask);
-
- // allocate and copy data:
- register unsigned char* ptr = alloc_inst.allocate(newsize);
- BOOST_REGEX_NOEH_ASSERT(ptr)
- std::memcpy(ptr, start, datasize);
-
- // get rid of old buffer:
- alloc_inst.deallocate(start, (alloc_inst.last - start));
-
- // and set up pointers:
- start = ptr;
- end = ptr + datasize;
- alloc_inst.last = ptr + newsize;
-}
-
-template <class Allocator>
-void* BOOST_REGEX_CALL raw_storage<Allocator>::insert(size_type pos, size_type n)
-{
- jm_assert(pos <= size_type(end - start));
- if(size_type(alloc_inst.last - end) < n)
- resize(n + (end - start));
- register void* result = start + pos;
- std::memmove(start + pos + n, start + pos, (end - start) - pos);
- end += n;
- return result;
-}
-
-#ifdef __BORLANDC__
- #pragma option pop
-#endif
-
-} // namespace re_detail
-} // namespace boost
-
-#endif
-
-
-
-
-
+++ /dev/null
-/*
- *
- * Copyright (c) 1998-2002
- * Dr John Maddock
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Dr John Maddock makes no representations
- * about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_split.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Implements regex_split and associated functions.
- * Note this is an internal header file included
- * by regex.hpp, do not include on its own.
- */
-
-#ifndef BOOST_REGEX_SPLIT_HPP
-#define BOOST_REGEX_SPLIT_HPP
-
-namespace boost{
-
-#ifdef __BORLANDC__
- #pragma option push -a8 -b -Vx -Ve -pc
-#endif
-
-namespace re_detail{
-
-template <class charT>
-const reg_expression<charT>& get_default_expression(charT)
-{
- static const charT expression_text[] = { '\\', 's', '+', '\00', };
- static const reg_expression<charT> e(expression_text);
- return e;
-}
-
-template <class OutputIterator, class charT, class Traits1, class Alloc1, class Alloc2>
-class split_pred
-{
- typedef std::basic_string<charT, Traits1, Alloc1> string_type;
- typedef typename string_type::const_iterator iterator_type;
- iterator_type* p_last;
- OutputIterator* p_out;
- std::size_t* p_max;
- std::size_t initial_max;
-public:
- split_pred(iterator_type* a, OutputIterator* b, std::size_t* c)
- : p_last(a), p_out(b), p_max(c), initial_max(*c) {}
-
- bool operator()(const match_results<iterator_type, Alloc2>& what);
-};
-
-template <class OutputIterator, class charT, class Traits1, class Alloc1, class Alloc2>
-bool split_pred<OutputIterator, charT, Traits1, Alloc1, Alloc2>::operator()
- (const match_results<iterator_type, Alloc2>& what)
-{
- *p_last = what[0].second;
- if(what.size() > 1)
- {
- // output sub-expressions only:
- for(unsigned i = 1; i < what.size(); ++i)
- {
- *(*p_out) = static_cast<string_type>(what[i]);
- ++(*p_out);
- if(0 == --*p_max) return false;
- }
- return *p_max != 0;
- }
- else
- {
- // output $` only if it's not-null or not at the start of the input:
- const sub_match<iterator_type>& sub = what[-1];
- if((sub.first != sub.second) || (*p_max != initial_max))
- {
- *(*p_out) = static_cast<string_type>(sub);
- ++(*p_out);
- return --*p_max;
- }
- }
- //
- // initial null, do nothing:
- return true;
-}
-
-} // namespace re_detail
-
-template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2, class Alloc2>
-std::size_t regex_split(OutputIterator out,
- std::basic_string<charT, Traits1, Alloc1>& s,
- const reg_expression<charT, Traits2, Alloc2>& e,
- unsigned flags,
- std::size_t max_split)
-{
- typedef typename std::basic_string<charT, Traits1, Alloc1>::const_iterator ci_t;
- ci_t last = s.begin();
- std::size_t init_size = max_split;
- re_detail::split_pred<OutputIterator, charT, Traits1, Alloc1, Alloc2> pred(&last, &out, &max_split);
- ci_t i, j;
- i = s.begin();
- j = s.end();
- regex_grep(pred, i, j, e, flags);
- //
- // if there is still input left, do a final push as long as max_split
- // is not exhausted, and we're not splitting sub-expressions rather
- // than whitespace:
- if(max_split && (last != s.end()) && (e.mark_count() == 1))
- {
- *out = std::basic_string<charT, Traits1, Alloc1>((ci_t)last, (ci_t)s.end());
- ++out;
- last = s.end();
- --max_split;
- }
- //
- // delete from the string everything that has been processed so far:
- s.erase(0, last - s.begin());
- //
- // return the number of new records pushed:
- return init_size - max_split;
-}
-
-template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2, class Alloc2>
-inline std::size_t regex_split(OutputIterator out,
- std::basic_string<charT, Traits1, Alloc1>& s,
- const reg_expression<charT, Traits2, Alloc2>& e,
- unsigned flags = match_default)
-{
- return regex_split(out, s, e, flags, UINT_MAX);
-}
-
-template <class OutputIterator, class charT, class Traits1, class Alloc1>
-inline std::size_t regex_split(OutputIterator out,
- std::basic_string<charT, Traits1, Alloc1>& s)
-{
- return regex_split(out, s, re_detail::get_default_expression(charT(0)), match_default, UINT_MAX);
-}
-
-#ifdef __BORLANDC__
- #pragma option pop
-#endif
-
-} // namespace boost
-
-#endif
-
+++ /dev/null
-/*
- *
- * Copyright (c) 1998-2002
- * Dr John Maddock
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Dr John Maddock makes no representations
- * about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_stack.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Implements customised internal regex stacks.
- * Note this is an internal header file included
- * by regex.hpp, do not include on its own.
- */
-
-#ifndef BOOST_REGEX_STACK_HPP
-#define BOOST_REGEX_STACK_HPP
-
-#ifndef BOOST_REGEX_CONFIG_HPP
-#include <boost/regex/config.hpp>
-#endif
-#ifndef BOOST_REGEX_RAW_BUFFER_HPP
-#include <boost/regex/detail/regex_raw_buffer.hpp>
-#endif
-
-namespace boost{
- namespace re_detail{
-
-#ifdef __BORLANDC__
- #pragma option push -a8 -b -Vx -Ve -pc
-#endif
-
-//
-// class jstack
-// simplified stack optimised for push/peek/pop
-// operations, we could use std::stack<std::vector<T>> instead...
-//
-template <class T, class Allocator = BOOST_DEFAULT_ALLOCATOR(T) >
-class jstack
-{
-private:
- typedef typename boost::detail::rebind_allocator<unsigned char, Allocator>::type allocator_type;
- typedef typename boost::detail::rebind_allocator<T, Allocator>::type T_alloc_type;
- typedef typename T_alloc_type::size_type size_type;
- typedef T value_type;
- struct node
- {
- node* next;
- T* start; // first item
- T* end; // last item
- T* last; // end of storage
- };
-
- //
- // empty base member optimisation:
- struct data : public allocator_type
- {
- padding buf[(sizeof(T) * 16 + sizeof(padding) - 1) / sizeof(padding)];
- data(const Allocator& a) : allocator_type(a){}
- };
-
- data alloc_inst;
- mutable node* m_stack;
- mutable node* unused;
- node base;
- size_type block_size;
-
- void BOOST_REGEX_CALL pop_aux()const;
- void BOOST_REGEX_CALL push_aux();
-
-public:
- jstack(size_type n = 64, const Allocator& a = Allocator());
-
- ~jstack();
-
- node* BOOST_REGEX_CALL get_node()
- {
- node* new_stack = reinterpret_cast<node*>(alloc_inst.allocate(sizeof(node) + sizeof(T) * block_size));
- BOOST_REGEX_NOEH_ASSERT(new_stack)
- new_stack->last = reinterpret_cast<T*>(new_stack+1);
- new_stack->start = new_stack->end = new_stack->last + block_size;
- new_stack->next = 0;
- return new_stack;
- }
-
- bool BOOST_REGEX_CALL empty()
- {
- return (m_stack->start == m_stack->end) && (m_stack->next == 0);
- }
-
- bool BOOST_REGEX_CALL good()
- {
- return (m_stack->start != m_stack->end) || (m_stack->next != 0);
- }
-
- T& BOOST_REGEX_CALL peek()
- {
- if(m_stack->start == m_stack->end)
- pop_aux();
- return *m_stack->end;
- }
-
- const T& BOOST_REGEX_CALL peek()const
- {
- if(m_stack->start == m_stack->end)
- pop_aux();
- return *m_stack->end;
- }
-
- void BOOST_REGEX_CALL pop()
- {
- if(m_stack->start == m_stack->end)
- pop_aux();
- ::boost::re_detail::pointer_destroy(m_stack->end);
- ++(m_stack->end);
- }
-
- void BOOST_REGEX_CALL pop(T& t)
- {
- if(m_stack->start == m_stack->end)
- pop_aux();
- t = *m_stack->end;
- ::boost::re_detail::pointer_destroy(m_stack->end);
- ++(m_stack->end);
- }
-
- void BOOST_REGEX_CALL push(const T& t)
- {
- if(m_stack->end == m_stack->last)
- push_aux();
- --(m_stack->end);
- pointer_construct(m_stack->end, t);
- }
-
-};
-
-template <class T, class Allocator>
-jstack<T, Allocator>::jstack(size_type n, const Allocator& a)
- : alloc_inst(a)
-{
- unused = 0;
- block_size = n;
- m_stack = &base;
- base.last = reinterpret_cast<T*>(alloc_inst.buf);
- base.end = base.start = base.last + 16;
- base.next = 0;
-}
-
-template <class T, class Allocator>
-void BOOST_REGEX_CALL jstack<T, Allocator>::push_aux()
-{
- // make sure we have spare space on TOS:
- register node* new_node;
- if(unused)
- {
- new_node = unused;
- unused = new_node->next;
- new_node->next = m_stack;
- m_stack = new_node;
- }
- else
- {
- new_node = get_node();
- new_node->next = m_stack;
- m_stack = new_node;
- }
-}
-
-template <class T, class Allocator>
-void BOOST_REGEX_CALL jstack<T, Allocator>::pop_aux()const
-{
- // make sure that we have a valid item
- // on TOS:
- jm_assert(m_stack->next);
- register node* p = m_stack;
- m_stack = p->next;
- p->next = unused;
- unused = p;
-}
-
-template <class T, class Allocator>
-jstack<T, Allocator>::~jstack()
-{
- node* condemned;
- while(good())
- pop();
- while(unused)
- {
- condemned = unused;
- unused = unused->next;
- alloc_inst.deallocate(reinterpret_cast<unsigned char*>(condemned), sizeof(node) + sizeof(T) * block_size);
- }
- while(m_stack != &base)
- {
- condemned = m_stack;
- m_stack = m_stack->next;
- alloc_inst.deallocate(reinterpret_cast<unsigned char*>(condemned), sizeof(node) + sizeof(T) * block_size);
- }
-}
-
-#ifdef __BORLANDC__
- #pragma option pop
-#endif
-
-} // namespace re_detail
-} // namespace boost
-
-#endif
-
-
-
-
-
-
-
-
-
+++ /dev/null
-/*
- *
- * Copyright (c) 1998-2002
- * Dr John Maddock
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation. Dr John Maddock makes no representations
- * about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_synch.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Thread synchronisation for regex code.
- * Note this is an internal header file included
- * by regex.hpp, do not include on its own.
- */
-
-#ifndef BOOST_REGEX_SYNCH_HPP
-#define BOOST_REGEX_SYNCH_HPP
-
-#ifndef BOOST_REGEX_CONFIG_HPP
-#include <boost/regex/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_THREADS)
-# if defined(BOOST_HAS_WINTHREADS)
-# include <windows.h>
-# elif defined(BOOST_HAS_BETHREADS)
-# include <OS.h>
-# include <cassert>
-# elif defined(BOOST_HAS_PTHREADS)
-# include <pthread.h>
-# else
-# error "Unknown threading API"
-# endif
-#endif
-
-
-namespace boost{
- namespace re_detail{
-
-#ifdef __BORLANDC__
- #pragma option push -a8 -b -Vx -Ve -pc
-#endif
-
-void BOOST_REGEX_CALL re_init_threads();
-void BOOST_REGEX_CALL re_free_threads();
-
-#ifdef BOOST_HAS_THREADS
-
-# ifdef BOOST_HAS_BETHREADS
-
-typedef sem_id CRITICAL_SECTION;
-
-inline void BOOST_REGEX_CALL InitializeCriticalSection(CRITICAL_SECTION* ps)
-{
- *ps = create_sem(1, "regex++");
- assert(*ps > 0);
-}
-
-inline void BOOST_REGEX_CALL DeleteCriticalSection(CRITICAL_SECTION* ps)
-{
- int t = delete_sem(*ps);
- assert(t == B_NO_ERROR);
-}
-
-inline void BOOST_REGEX_CALL EnterCriticalSection(CRITICAL_SECTION* ps)
-{
- status_t t = acquire_sem(*ps);
- assert(t == B_NO_ERROR);
-}
-
-inline void BOOST_REGEX_CALL LeaveCriticalSection(CRITICAL_SECTION* ps)
-{
- status_t t = release_sem(*ps);
- assert(t == B_NO_ERROR);
-}
-
-# elif defined(BOOST_HAS_PTHREADS)
-
-typedef pthread_mutex_t CRITICAL_SECTION;
-
-inline void BOOST_REGEX_CALL InitializeCriticalSection(CRITICAL_SECTION* ps)
-{
- pthread_mutex_init(ps, 0);
-}
-
-inline void BOOST_REGEX_CALL DeleteCriticalSection(CRITICAL_SECTION* ps)
-{
- pthread_mutex_destroy(ps);
-}
-
-inline void BOOST_REGEX_CALL EnterCriticalSection(CRITICAL_SECTION* ps)
-{
- pthread_mutex_lock(ps);
-}
-
-inline void BOOST_REGEX_CALL LeaveCriticalSection(CRITICAL_SECTION* ps)
-{
- pthread_mutex_unlock(ps);
-}
-
-# elif !defined(BOOST_HAS_WINTHREADS)
-# error "Unknown threading API"
-# endif
-
-template <class Lock>
-class lock_guard
-{
- typedef Lock lock_type;
-public:
- lock_guard(lock_type& m, bool aq = true)
- : mut(m), owned(false){ acquire(aq); }
-
- ~lock_guard()
- { acquire(false); }
-
- void BOOST_REGEX_CALL acquire(bool aq = true)
- {
- if(aq && !owned)
- {
- mut.acquire(true);
- owned = true;
- }
- else if(!aq && owned)
- {
- mut.acquire(false);
- owned = false;
- }
- }
-private:
- lock_type& mut;
- bool owned;
- // VC6 warning suppression:
- lock_guard& operator=(const lock_guard&);
-};
-
-
-class critical_section
-{
-public:
- critical_section()
- { InitializeCriticalSection(&hmutex);}
-
- critical_section(const critical_section&)
- { InitializeCriticalSection(&hmutex);}
-
- const critical_section& BOOST_REGEX_CALL operator=(const critical_section&)
- {return *this;}
-
- ~critical_section()
- {DeleteCriticalSection(&hmutex);}
-
-private:
-
- void BOOST_REGEX_CALL acquire(bool aq)
- { if(aq) EnterCriticalSection(&hmutex);
- else LeaveCriticalSection(&hmutex);
- }
-
- CRITICAL_SECTION hmutex;
-
-public:
- typedef lock_guard<critical_section> ro_guard;
- typedef lock_guard<critical_section> rw_guard;
-
- friend class lock_guard<critical_section>;
-};
-
-inline bool BOOST_REGEX_CALL operator==(const critical_section&, const critical_section&)
-{
- return false;
-}
-
-inline bool BOOST_REGEX_CALL operator<(const critical_section&, const critical_section&)
-{
- return true;
-}
-
-typedef lock_guard<critical_section> cs_guard;
-
-BOOST_REGEX_DECL extern critical_section* p_re_lock;
-BOOST_REGEX_DECL extern unsigned int re_lock_count;
-
-#define BOOST_REGEX_GUARD(inst) boost::re_detail::critical_section::rw_guard g(inst);
-
-#else // BOOST_HAS_THREADS
-
-#define BOOST_REGEX_GUARD(inst)
-
-#endif // BOOST_HAS_THREADS
-
-#ifdef __BORLANDC__
- #pragma option pop
-#endif
-
-} // namespace re_detail
-} // namespace boost
-
-#endif // sentry
-
-
-
-
-
-
#ifndef BOOST_REGEX_TRAITS_HPP
#define BOOST_REGEX_TRAITS_HPP
-#include <boost/cregex.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/regex/detail/regex_cstring.hpp>
-
-namespace boost{
-
-#ifdef __BORLANDC__
- #pragma option push -a8 -b -Vx -Ve -pc
-#endif
-
-template <class charT>
-class c_regex_traits;
-
-namespace re_detail{
-
-struct mss
-{
- unsigned int id;
- const char* what;
-};
-
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL re_lookup_def_collate_name(std::string& buf, const char* name);
-BOOST_REGEX_DECL std::size_t BOOST_REGEX_CALL re_get_default_message(char* buf, std::size_t len, std::size_t id);
-extern BOOST_REGEX_DECL const char *re_default_error_messages[];
-
-#ifndef BOOST_NO_WREGEX
-extern BOOST_REGEX_DECL wchar_t wide_lower_case_map[];
-extern BOOST_REGEX_DECL unsigned short wide_unicode_classes[];
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL is_combining(wchar_t c);
+#ifndef BOOST_REGEX_TRAITS_HPP_INCLUDED
+#include <boost/regex/v3/regex_traits.hpp>
#endif
-
-struct BOOST_REGEX_DECL regex_traits_base
-{
- enum char_syntax_type
- {
- syntax_char = 0,
- syntax_open_bracket = 1, // (
- syntax_close_bracket = 2, // )
- syntax_dollar = 3, // $
- syntax_caret = 4, // ^
- syntax_dot = 5, // .
- syntax_star = 6, // *
- syntax_plus = 7, // +
- syntax_question = 8, // ?
- syntax_open_set = 9, // [
- syntax_close_set = 10, // ]
- syntax_or = 11, // |
- syntax_slash = 12, //
- syntax_hash = 13, // #
- syntax_dash = 14, // -
- syntax_open_brace = 15, // {
- syntax_close_brace = 16, // }
- syntax_digit = 17, // 0-9
- syntax_b = 18, // for \b
- syntax_B = 19, // for \B
- syntax_left_word = 20, // for \<
- syntax_right_word = 21, // for \>
- syntax_w = 22, // for \w
- syntax_W = 23, // for \W
- syntax_start_buffer = 24, // for \`
- syntax_end_buffer = 25, // for \'
- syntax_newline = 26, // for newline alt
- syntax_comma = 27, // for {x,y}
-
- syntax_a = 28, // for \a
- syntax_f = 29, // for \f
- syntax_n = 30, // for \n
- syntax_r = 31, // for \r
- syntax_t = 32, // for \t
- syntax_v = 33, // for \v
- syntax_x = 34, // for \xdd
- syntax_c = 35, // for \cx
- syntax_colon = 36, // for [:...:]
- syntax_equal = 37, // for [=...=]
-
- // perl ops:
- syntax_e = 38, // for \e
- syntax_l = 39, // for \l
- syntax_L = 40, // for \L
- syntax_u = 41, // for \u
- syntax_U = 42, // for \U
- syntax_s = 43, // for \s
- syntax_S = 44, // for \S
- syntax_d = 45, // for \d
- syntax_D = 46, // for \D
- syntax_E = 47, // for \Q\E
- syntax_Q = 48, // for \Q\E
- syntax_X = 49, // for \X
- syntax_C = 50, // for \C
- syntax_Z = 51, // for \Z
- syntax_G = 52, // for \G
-
- // new extentions:
- syntax_not = 53, // for (?!...)
-
- syntax_max = 54
- };
-#ifdef __BORLANDC__
-private:
- char dummy_member;
-#endif
-};
-
-struct BOOST_REGEX_DECL c_traits_base : public regex_traits_base
-{
-public:
- enum{
- char_class_none = 0,
- char_class_alpha = 0x0001,
- char_class_cntrl = 0x0002,
- char_class_digit = 0x0004,
- char_class_lower = 0x0008,
- char_class_punct = 0x0010,
- char_class_space = 0x0020,
- char_class_upper = 0x0040,
- char_class_xdigit = 0x0080,
- char_class_blank = 0x0100,
- char_class_underscore = 0x4000,
- char_class_unicode = 0x8000,
-
- char_class_alnum = char_class_alpha | char_class_digit,
- char_class_graph = char_class_alpha | char_class_digit | char_class_punct | char_class_underscore,
- char_class_print = char_class_alpha | char_class_digit | char_class_punct | char_class_underscore | char_class_blank,
- char_class_word = char_class_alpha | char_class_digit | char_class_underscore
- };
- static std::string BOOST_REGEX_CALL set_message_catalogue(const std::string& s);
-protected:
-#if defined(__MWERKS__) && __MWERKS__ <= 0x6000
- friend class c_regex_traits<char>;
- friend class c_regex_traits<wchar_t>;
-#endif
-
- static char regex_message_catalogue[BOOST_REGEX_MAX_PATH];
- enum syntax_map_size
- {
- map_size = UCHAR_MAX + 1
- };
-
- static unsigned char syntax_map[map_size];
- static unsigned short class_map[map_size];
- static char lower_case_map[map_size];
-
- static boost::uint_fast32_t BOOST_REGEX_CALL do_lookup_class(const char* p);
- static bool BOOST_REGEX_CALL do_lookup_collate(std::string& buf, const char* p);
- static void BOOST_REGEX_CALL do_update_ctype();
- static void BOOST_REGEX_CALL do_update_collate();
-public:
- static std::string BOOST_REGEX_CALL error_string(unsigned id);
- static char* BOOST_REGEX_CALL get_catalogue() { return regex_message_catalogue; }
-};
-
-} // namespace re_detail
-
-
-template<>
-class BOOST_REGEX_DECL c_regex_traits<char> : public re_detail::c_traits_base
-{
- typedef re_detail::c_traits_base base_type;
-public:
- typedef char char_type;
- typedef unsigned char uchar_type;
- typedef unsigned int size_type;
- typedef std::string string_type;
- typedef int locale_type;
-
- static std::size_t BOOST_REGEX_CALL length(const char_type* p)
- {
- return std::strlen(p);
- }
- static unsigned int BOOST_REGEX_CALL syntax_type(size_type c)
- {
- return syntax_map[c];
- }
- static char BOOST_REGEX_CALL translate(char c, bool icase)
- {
- return icase ? lower_case_map[(size_type)(uchar_type)c] : c;
- }
- static void BOOST_REGEX_CALL transform(std::string& out, const std::string& in);
-
- static void BOOST_REGEX_CALL transform_primary(std::string& out, const std::string& in);
-
- static bool BOOST_REGEX_CALL is_separator(char c)
- {
- return BOOST_REGEX_MAKE_BOOL((c == '\n') || (c == '\r'));
- }
-
- static bool BOOST_REGEX_CALL is_combining(char)
- {
- return false;
- }
-
- static bool BOOST_REGEX_CALL is_class(char c, boost::uint_fast32_t f)
- {
- return BOOST_REGEX_MAKE_BOOL(class_map[(size_type)(uchar_type)c] & f);
- }
-
- static int BOOST_REGEX_CALL toi(char c);
- static int BOOST_REGEX_CALL toi(const char*& first, const char* last, int radix);
-
- static boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const char* first, const char* last)
- {
- std::string s(first, last);
- return do_lookup_class(s.c_str());
- }
-
- static bool BOOST_REGEX_CALL lookup_collatename(std::string& buf, const char* first, const char* last)
- {
- std::string s(first, last);
- return do_lookup_collate(buf, s.c_str());
- }
-
- static locale_type BOOST_REGEX_CALL imbue(locale_type l){ return l; }
- locale_type BOOST_REGEX_CALL getloc()const{ return locale_type(); }
-
- c_regex_traits()
- {
- init();
- }
- ~c_regex_traits()
- {
- m_free();
- }
- struct sentry
- {
- sentry(const c_regex_traits<char>&)
- { c_regex_traits<char>::update(); }
- operator void*() { return this; }
- };
- static void BOOST_REGEX_CALL update();
-private:
- static void BOOST_REGEX_CALL init();
- static void BOOST_REGEX_CALL m_free();
- static c_regex_traits<char> i;
-
- static unsigned sort_type;
- static char sort_delim;
-};
-
-#ifndef BOOST_NO_WREGEX
-template<>
-class BOOST_REGEX_DECL c_regex_traits<wchar_t> : public re_detail::c_traits_base
-{
- typedef re_detail::c_traits_base base_type;
-public:
- typedef wchar_t char_type;
- typedef unsigned short uchar_type;
- typedef unsigned int size_type;
- typedef std::basic_string<wchar_t> string_type;
- typedef int locale_type;
- static std::size_t BOOST_REGEX_CALL length(const char_type* p)
- {
- return std::wcslen(p);
- }
- static unsigned int BOOST_REGEX_CALL syntax_type(size_type c);
- static wchar_t BOOST_REGEX_CALL translate(wchar_t c, bool icase)
- {
- return icase ? ((c < 256) ? re_detail::wide_lower_case_map[(uchar_type)c] : std::towlower(c)) : c;
- }
-
- static void BOOST_REGEX_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
-
- static void BOOST_REGEX_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
-
- static bool BOOST_REGEX_CALL is_separator(wchar_t c)
- {
- return BOOST_REGEX_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
- }
-
- static bool BOOST_REGEX_CALL is_combining(wchar_t c)
- { return re_detail::is_combining(c); }
-
- static bool BOOST_REGEX_CALL is_class(wchar_t c, boost::uint_fast32_t f)
- {
- return BOOST_REGEX_MAKE_BOOL(((uchar_type)c < 256) ? (re_detail::wide_unicode_classes[(size_type)(uchar_type)c] & f) : do_iswclass(c, f));
- }
-
- static int BOOST_REGEX_CALL toi(wchar_t c);
- static int BOOST_REGEX_CALL toi(const wchar_t*& first, const wchar_t* last, int radix);
-
- static boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const wchar_t* first, const wchar_t* last);
-
- static bool BOOST_REGEX_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last);
-
- static locale_type BOOST_REGEX_CALL imbue(locale_type l){ return l; }
- locale_type BOOST_REGEX_CALL getloc()const{ return locale_type(); }
- c_regex_traits<wchar_t>()
- { init(); }
- ~c_regex_traits<wchar_t>()
- { m_free(); }
- struct sentry
- {
- sentry(const c_regex_traits<wchar_t>&)
- { c_regex_traits<wchar_t>::update(); }
- operator void*() { return this; }
- };
- static void BOOST_REGEX_CALL update();
- static std::size_t BOOST_REGEX_CALL strnarrow(char *s1, std::size_t len, const wchar_t *s2);
- static std::size_t BOOST_REGEX_CALL strwiden(wchar_t *s1, std::size_t len, const char *s2);
-private:
- static bool BOOST_REGEX_CALL do_iswclass(wchar_t c, boost::uint_fast32_t f);
- static void BOOST_REGEX_CALL m_free();
- static void BOOST_REGEX_CALL init();
- static bool BOOST_REGEX_CALL do_lookup_collate(std::basic_string<wchar_t>& out, const wchar_t* first, const wchar_t* last);
- static c_regex_traits<wchar_t> init_;
-
- static unsigned sort_type;
- static wchar_t sort_delim;
-};
-#endif
-
-#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32)
-
-namespace re_detail{
-
-struct BOOST_REGEX_DECL w32_traits_base : public regex_traits_base
-{
- enum{
- char_class_none = 0,
- char_class_alnum = C1_ALPHA | C1_DIGIT,
- char_class_alpha = C1_ALPHA,
- char_class_cntrl = C1_CNTRL,
- char_class_digit = C1_DIGIT,
- char_class_graph = C1_UPPER | C1_LOWER | C1_DIGIT | C1_PUNCT | C1_ALPHA,
- char_class_lower = C1_LOWER,
- char_class_print = C1_UPPER | C1_LOWER | C1_DIGIT | C1_PUNCT | C1_BLANK | C1_ALPHA,
- char_class_punct = C1_PUNCT,
- char_class_space = C1_SPACE,
- char_class_upper = C1_UPPER,
- char_class_xdigit = C1_XDIGIT,
- char_class_blank = C1_BLANK,
- char_class_underscore = 0x4000,
- char_class_word = C1_ALPHA | C1_DIGIT | char_class_underscore,
- char_class_unicode = 0x8000,
- char_class_win = 0x01FF
- };
-
-
-public:
- static std::string BOOST_REGEX_CALL set_message_catalogue(const std::string& s);
-protected:
- static char regex_message_catalogue[BOOST_REGEX_MAX_PATH];
- enum syntax_map_size
- {
- map_size = UCHAR_MAX + 1
- };
-
- static unsigned char syntax_map[map_size];
- static unsigned short class_map[map_size];
- static char lower_case_map[map_size];
-
- static boost::uint_fast32_t BOOST_REGEX_CALL do_lookup_class(const char* p);
- static bool BOOST_REGEX_CALL do_lookup_collate(std::string& buf, const char* p);
- static void BOOST_REGEX_CALL do_free();
- static void BOOST_REGEX_CALL do_init();
-public:
- static std::string BOOST_REGEX_CALL error_string(unsigned id);
- static char* BOOST_REGEX_CALL get_catalogue() { return regex_message_catalogue; }
-};
-
-
-} // namespace re_detail
-
-template<class charT>
-class w32_regex_traits;
-
-template<>
-class BOOST_REGEX_DECL w32_regex_traits<char> : public re_detail::w32_traits_base
-{
- typedef re_detail::w32_traits_base base_type;
-public:
- typedef char char_type;
- typedef unsigned char uchar_type;
- typedef unsigned int size_type;
- typedef std::string string_type;
- typedef int locale_type;
-
- static std::size_t BOOST_REGEX_CALL length(const char_type* p)
- {
- return std::strlen(p);
- }
- static unsigned int BOOST_REGEX_CALL syntax_type(size_type c)
- {
- return syntax_map[c];
- }
- static char BOOST_REGEX_CALL translate(char c, bool icase)
- {
- return icase ? lower_case_map[(size_type)(uchar_type)c] : c;
- }
- static void BOOST_REGEX_CALL transform(std::string& out, const std::string& in);
-
- static void BOOST_REGEX_CALL transform_primary(std::string& out, const std::string& in);
-
- static bool BOOST_REGEX_CALL is_separator(char c)
- {
- return BOOST_REGEX_MAKE_BOOL((c == '\n') || (c == '\r'));
- }
-
- static bool BOOST_REGEX_CALL is_combining(char)
- {
- return false;
- }
-
- static bool BOOST_REGEX_CALL is_class(char c, boost::uint_fast32_t f)
- {
- return BOOST_REGEX_MAKE_BOOL(class_map[(size_type)(uchar_type)c] & f);
- }
-
- static int BOOST_REGEX_CALL toi(char c);
- static int BOOST_REGEX_CALL toi(const char*& first, const char* last, int radix);
-
- static boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const char* first, const char* last)
- {
- std::string s(first, last);
- return do_lookup_class(s.c_str());
- }
-
- static bool BOOST_REGEX_CALL lookup_collatename(std::string& buf, const char* first, const char* last)
- {
- std::string s(first, last);
- return do_lookup_collate(buf, s.c_str());
- }
-
- static locale_type BOOST_REGEX_CALL imbue(locale_type l){ return l; }
- locale_type BOOST_REGEX_CALL getloc()const{ return locale_type(); }
-
- struct sentry
- {
- sentry(const w32_regex_traits<char>&)
- { w32_regex_traits<char>::update(); }
- ~sentry(){}
- operator void*() { return this; }
- };
- static void BOOST_REGEX_CALL update();
- w32_regex_traits();
- ~w32_regex_traits();
-private:
- static w32_regex_traits<char> i;
-};
-
-#ifndef BOOST_NO_WREGEX
-template<>
-class BOOST_REGEX_DECL w32_regex_traits<wchar_t> : public re_detail::w32_traits_base
-{
- typedef re_detail::w32_traits_base base_type;
-public:
- typedef wchar_t char_type;
- typedef unsigned short uchar_type;
- typedef unsigned int size_type;
- typedef std::basic_string<wchar_t> string_type;
- typedef int locale_type;
- static std::size_t BOOST_REGEX_CALL length(const char_type* p)
- {
- return std::wcslen(p);
- }
- static unsigned int BOOST_REGEX_CALL syntax_type(size_type c);
- static wchar_t BOOST_REGEX_CALL translate(wchar_t c, bool icase)
- {
- return icase ? ((c < 256) ? re_detail::wide_lower_case_map[(uchar_type)c] : wtolower(c)) : c;
- }
-
- static void BOOST_REGEX_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
-
- static void BOOST_REGEX_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
-
- static bool BOOST_REGEX_CALL is_separator(wchar_t c)
- {
- return BOOST_REGEX_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
- }
-
- static bool BOOST_REGEX_CALL is_combining(wchar_t c)
- { return re_detail::is_combining(c); }
-
- static bool BOOST_REGEX_CALL is_class(wchar_t c, boost::uint_fast32_t f)
- {
- return BOOST_REGEX_MAKE_BOOL(((uchar_type)c < 256) ? (wide_unicode_classes[(size_type)(uchar_type)c] & f) : do_iswclass(c, f));
- }
-
- static int BOOST_REGEX_CALL toi(wchar_t c);
- static int BOOST_REGEX_CALL toi(const wchar_t*& first, const wchar_t* last, int radix);
-
- static boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const wchar_t* first, const wchar_t* last);
-
- static bool BOOST_REGEX_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last);
-
- static locale_type BOOST_REGEX_CALL imbue(locale_type l){ return l; }
- locale_type BOOST_REGEX_CALL getloc()const{ return locale_type(); }
-
- struct sentry
- {
- sentry(const w32_regex_traits<wchar_t>&)
- { w32_regex_traits<wchar_t>::update(); }
- ~sentry(){}
- operator void*() { return this; }
- };
- static void BOOST_REGEX_CALL update();
- w32_regex_traits();
- ~w32_regex_traits();
- static std::size_t BOOST_REGEX_CALL strnarrow(char *s1, std::size_t len, const wchar_t *s2);
- static std::size_t BOOST_REGEX_CALL strwiden(wchar_t *s1, std::size_t len, const char *s2);
-
-private:
- static bool BOOST_REGEX_CALL do_iswclass(wchar_t c, boost::uint_fast32_t f);
- static bool BOOST_REGEX_CALL do_lookup_collate(std::basic_string<wchar_t>& out, const wchar_t* first, const wchar_t* last);
- static w32_regex_traits<wchar_t> init_;
- static wchar_t BOOST_REGEX_CALL wtolower(wchar_t c);
- static unsigned short wide_unicode_classes[];
-};
-#endif // Wide strings
-#endif // Win32
-
-#if !defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
-
-} // namspace boost
-
-#ifdef __BORLANDC__
- #pragma option pop
-#endif
-#include <locale>
-#ifdef __BORLANDC__
- #pragma option push -a4 -b -Ve -pc
-#endif
-
-namespace boost{
-
-namespace re_detail
-{
-
-template <class charT>
-struct message_data;
-
-template <>
-struct message_data<char>;
-
-template <>
-struct message_data<wchar_t>;
-
-struct BOOST_REGEX_DECL cpp_regex_traits_base : public regex_traits_base
-{
- enum char_class_type
- {
- char_class_none = 0,
- char_class_alnum = std::ctype_base::alnum,
- char_class_alpha = std::ctype_base::alpha,
- char_class_cntrl = std::ctype_base::cntrl,
- char_class_digit = std::ctype_base::digit,
- char_class_graph = std::ctype_base::graph,
- char_class_lower = std::ctype_base::lower,
- char_class_print = std::ctype_base::print,
- char_class_punct = std::ctype_base::punct,
- char_class_space = std::ctype_base::space,
- char_class_upper = std::ctype_base::upper,
- char_class_xdigit = std::ctype_base::xdigit,
- char_class_blank = 1<<12,
- char_class_underscore = 1<<13,
- char_class_word = std::ctype_base::alnum | char_class_underscore,
- char_class_unicode = 1<<14,
- char_class_all_base = char_class_alnum | char_class_alpha | char_class_cntrl
- | char_class_digit | char_class_graph | char_class_lower
- | char_class_print | char_class_punct | char_class_space
- | char_class_upper | char_class_xdigit
- };
-
- static std::string BOOST_REGEX_CALL set_message_catalogue(const std::string& s);
-protected:
- static char regex_message_cat[BOOST_REGEX_MAX_PATH];
-};
-
-} // namespace re_detail
-
-template <class charT>
-class cpp_regex_traits;
-
-template<>
-class BOOST_REGEX_DECL cpp_regex_traits<char> : public re_detail::cpp_regex_traits_base
-{
- typedef re_detail::cpp_regex_traits_base base_type;
-private:
- re_detail::message_data<char>* pmd;
- const unsigned char* psyntax;
- char* lower_map;
- const std::ctype<char>* pctype;
- const std::collate<char>* pcollate;
- std::locale locale_inst;
- unsigned sort_type;
- char sort_delim;
-
- cpp_regex_traits(const cpp_regex_traits&);
- cpp_regex_traits& operator=(const cpp_regex_traits&);
-
-public:
- typedef char char_type;
- typedef unsigned char uchar_type;
- typedef unsigned int size_type;
- typedef std::string string_type;
- typedef std::locale locale_type;
-
- cpp_regex_traits();
- ~cpp_regex_traits();
-
- static std::size_t BOOST_REGEX_CALL length(const char_type* p)
- {
- return std::strlen(p);
- }
- unsigned int BOOST_REGEX_CALL syntax_type(size_type c)const
- {
- return psyntax[c];
- }
- char BOOST_REGEX_CALL translate(char c, bool icase)const
- {
- return icase ? lower_map[(size_type)(uchar_type)c] : c;
- }
- void BOOST_REGEX_CALL transform(std::string& out, const std::string& in)const
- {
- out = pcollate->transform(in.c_str(), in.c_str() + in.size()).c_str();
- }
-
- void BOOST_REGEX_CALL transform_primary(std::string& out, const std::string& in)const;
-
- static bool BOOST_REGEX_CALL is_separator(char c)
- {
- return BOOST_REGEX_MAKE_BOOL((c == '\n') || (c == '\r'));
- }
-
- static bool BOOST_REGEX_CALL is_combining(char)
- {
- return false;
- }
-
- bool BOOST_REGEX_CALL is_class(char c, boost::uint_fast32_t f)const
- {
- if(pctype->is((std::ctype<char>::mask)(f & char_class_all_base), c))
- return true;
- if((f & char_class_underscore) && (c == '_'))
- return true;
- if((f & char_class_blank) && ((c == ' ') || (c == '\t')))
- return true;
- return false;
- }
-
- int BOOST_REGEX_CALL toi(char c)const;
- int BOOST_REGEX_CALL toi(const char*& first, const char* last, int radix)const;
-
- boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const char* first, const char* last)const;
- bool BOOST_REGEX_CALL lookup_collatename(std::string& s, const char* first, const char* last)const;
-
- std::string BOOST_REGEX_CALL error_string(unsigned id)const;
- locale_type BOOST_REGEX_CALL imbue(locale_type l);
- locale_type BOOST_REGEX_CALL getloc()const{ return locale_inst; }
-
- struct sentry
- {
- sentry(const cpp_regex_traits<char>&){}
- operator void*() { return this; }
- };
-};
-
-#ifndef BOOST_NO_WREGEX
-template<>
-class BOOST_REGEX_DECL cpp_regex_traits<wchar_t> : public re_detail::cpp_regex_traits_base
-{
- typedef re_detail::cpp_regex_traits_base base_type;
-public:
- typedef wchar_t char_type;
- typedef unsigned short uchar_type;
- typedef unsigned int size_type;
- typedef std::basic_string<wchar_t> string_type;
- typedef std::locale locale_type;
-
-private:
- re_detail::message_data<wchar_t>* pmd;
- const unsigned char* psyntax;
- wchar_t* lower_map;
- const std::ctype<wchar_t>* pctype;
- const std::collate<wchar_t>* pcollate;
- const std::codecvt<wchar_t, char, std::mbstate_t>* pcdv;
- std::locale locale_inst;
- unsigned int BOOST_REGEX_CALL do_syntax_type(size_type c)const;
- unsigned sort_type;
- wchar_t sort_delim;
-
- cpp_regex_traits(const cpp_regex_traits&);
- cpp_regex_traits& operator=(const cpp_regex_traits&);
-
-public:
-
- static std::size_t BOOST_REGEX_CALL length(const char_type* p)
- {
- return std::wcslen(p);
- }
- unsigned int BOOST_REGEX_CALL syntax_type(size_type c)const
- {
- return (c < UCHAR_MAX) ? psyntax[c] : do_syntax_type(c);
- }
- wchar_t BOOST_REGEX_CALL translate(wchar_t c, bool icase)const
- {
- return icase ? (((uchar_type)c) <= UCHAR_MAX) ? lower_map[c] : pctype->tolower(c) : c;
- }
- void BOOST_REGEX_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in)const
- {
- out = pcollate->transform(in.c_str(), in.c_str() + in.size());
- }
-
- void BOOST_REGEX_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in)const;
-
- static bool BOOST_REGEX_CALL is_separator(wchar_t c)
- {
- return BOOST_REGEX_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
- }
-
- static bool BOOST_REGEX_CALL is_combining(wchar_t c)
- { return re_detail::is_combining(c); }
-
- bool BOOST_REGEX_CALL is_class(wchar_t c, boost::uint_fast32_t f)const
- {
- if(pctype->is((std::ctype<wchar_t>::mask)(f & char_class_all_base), c))
- return true;
- if((f & char_class_underscore) && (c == '_'))
- return true;
- if((f & char_class_blank) && ((c == ' ') || (c == '\t')))
- return true;
- if((f & char_class_unicode) && ((uchar_type)c > (uchar_type)255))
- return true;
- return false;
- }
-
- int BOOST_REGEX_CALL toi(wchar_t c)const;
- int BOOST_REGEX_CALL toi(const wchar_t*& first, const wchar_t* last, int radix)const;
-
- boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const wchar_t* first, const wchar_t* last)const;
- bool BOOST_REGEX_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last)const;
-
- std::string BOOST_REGEX_CALL error_string(unsigned id)const;
- cpp_regex_traits();
- ~cpp_regex_traits();
- locale_type BOOST_REGEX_CALL imbue(locale_type l);
- locale_type BOOST_REGEX_CALL getloc()const{ return locale_inst; }
- std::size_t BOOST_REGEX_CALL strwiden(wchar_t *s1, std::size_t len, const char *s2)const;
-
- struct sentry
- {
- sentry(const cpp_regex_traits<wchar_t>&){}
- operator void*() { return this; }
- };
-};
-#endif // BOOST_NO_WREGEX
-
-#endif // BOOST_NO_STD_LOCALE
-
-#ifdef BOOST_REGEX_USE_WIN32_LOCALE
-
-template <class charT>
-class regex_traits : public w32_regex_traits<charT>
-{
-};
-
-#elif defined(BOOST_REGEX_USE_C_LOCALE)
-
-template <class charT>
-class regex_traits : public c_regex_traits<charT>
-{
-};
-
-#elif defined(BOOST_REGEX_USE_CPP_LOCALE)
-
-template <class charT>
-class regex_traits : public cpp_regex_traits<charT>
-{
-};
-
-#else
-#error No default localisation model defined
-#endif
-
-#ifdef __BORLANDC__
- #pragma option pop
-#endif
-
-} // namespace boost
-
#endif // include
+
* VERSION see <boost/version.hpp>
* DESCRIPTION: Includes all the regex source files, include this
* file only if you need to build the regex library
- * as a single file. Before including this file you
- * must define BOOST_REGEX_NO_LIB, or include this file
+ * as a single file. You must include this file
* before any other regex header.
+ *
+ * CAUTION: THIS FILE IS DEPRICATED AND WILL CAUSE
+ * UNNECESSARY CODE BLOAT.
*/
-#if !defined(BOOST_REGEX_NO_LIB) && defined(BOOST_REGEX_CONFIG_HPP)
-#error too late you have already included a regex header - try defining BOOST_REGEX_NO_LIB when you build
+#if (!defined(BOOST_REGEX_NO_LIB) || !defined(BOOST_REGEX_NO_EXTERNAL_TEMPLATES)) && defined(BOOST_REGEX_CONFIG_HPP)
+#error too late you have already included a regex header - make sure that you include this header before any other boost header
#endif
+#define BOOST_REGEX_NO_LIB
+#define BOOST_REGEX_STATIC_LINK
+#define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
+
+#include <boost/regex.hpp>
+
//
// include library source files:
//
#include "libs/regex/src/regex_debug.cpp"
#include "libs/regex/src/regex_synch.cpp"
+
--- /dev/null
+/*
+ *
+ * Copyright (c) 1998-2002
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE cregex.cpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Declares POSIX API functions
+ * + boost::RegEx high level wrapper.
+ */
+
+#ifndef BOOST_RE_CREGEX_HPP_INCLUDED
+#define BOOST_RE_CREGEX_HPP_INCLUDED
+
+#ifndef BOOST_REGEX_CONFIG_HPP
+#include <boost/regex/config.hpp>
+#endif
+
+#ifdef __BORLANDC__
+ #pragma option push -a8 -b -Vx -Ve -pc
+#endif
+
+/* include these defs only for POSIX compatablity */
+#ifdef __cplusplus
+namespace boost{
+extern "C" {
+#endif
+
+#if defined(__cplusplus) && !defined(BOOST_NO_STDC_NAMESPACE)
+typedef std::ptrdiff_t regoff_t;
+typedef std::size_t regsize_t;
+#else
+typedef ptrdiff_t regoff_t;
+typedef size_t regsize_t;
+#endif
+
+typedef struct
+{
+ unsigned int re_magic;
+ unsigned int re_nsub; /* number of parenthesized subexpressions */
+ const char* re_endp; /* end pointer for REG_PEND */
+ void* guts; /* none of your business :-) */
+ unsigned int eflags; /* none of your business :-) */
+} regex_tA;
+
+#ifndef BOOST_NO_WREGEX
+typedef struct
+{
+ unsigned int re_magic;
+ unsigned int re_nsub; /* number of parenthesized subexpressions */
+ const wchar_t* re_endp; /* end pointer for REG_PEND */
+ void* guts; /* none of your business :-) */
+ unsigned int eflags; /* none of your business :-) */
+} regex_tW;
+#endif
+
+typedef struct
+{
+ regoff_t rm_so; /* start of match */
+ regoff_t rm_eo; /* end of match */
+} regmatch_t;
+
+/* regcomp() flags */
+typedef enum{
+ REG_BASIC = 0000,
+ REG_EXTENDED = 0001,
+ REG_ICASE = 0002,
+ REG_NOSUB = 0004,
+ REG_NEWLINE = 0010,
+ REG_NOSPEC = 0020,
+ REG_PEND = 0040,
+ REG_DUMP = 0200,
+ REG_NOCOLLATE = 0400,
+ REG_ESCAPE_IN_LISTS = 01000,
+ REG_NEWLINE_ALT = 02000,
+
+ REG_PERL = REG_EXTENDED | REG_NOCOLLATE | REG_ESCAPE_IN_LISTS,
+ REG_AWK = REG_EXTENDED | REG_ESCAPE_IN_LISTS,
+ REG_GREP = REG_BASIC | REG_NEWLINE_ALT,
+ REG_EGREP = REG_EXTENDED | REG_NEWLINE_ALT,
+
+ REG_ASSERT = 15,
+ REG_INVARG = 16,
+ REG_ATOI = 255, /* convert name to number (!) */
+ REG_ITOA = 0400 /* convert number to name (!) */
+} reg_comp_flags;
+
+/* regexec() flags */
+typedef enum{
+ REG_NOTBOL = 00001,
+ REG_NOTEOL = 00002,
+ REG_STARTEND = 00004
+} reg_exec_flags;
+
+BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA*, const char*, int);
+BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int, const regex_tA*, char*, regsize_t);
+BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecA(const regex_tA*, const char*, regsize_t, regmatch_t*, int);
+BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeA(regex_tA*);
+
+#ifndef BOOST_NO_WREGEX
+BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW*, const wchar_t*, int);
+BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int, const regex_tW*, wchar_t*, regsize_t);
+BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecW(const regex_tW*, const wchar_t*, regsize_t, regmatch_t*, int);
+BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeW(regex_tW*);
+#endif
+
+#ifdef UNICODE
+#define regcomp regcompW
+#define regerror regerrorW
+#define regexec regexecW
+#define regfree regfreeW
+#define regex_t regex_tW
+#else
+#define regcomp regcompA
+#define regerror regerrorA
+#define regexec regexecA
+#define regfree regfreeA
+#define regex_t regex_tA
+#endif
+
+/* regerror() flags */
+typedef enum
+{
+ REG_NOERROR = 0, /* Success. */
+ REG_NOMATCH = 1, /* Didn't find a match (for regexec). */
+
+ /* POSIX regcomp return error codes. (In the order listed in the
+ standard.) */
+ REG_BADPAT = 2, /* Invalid pattern. */
+ REG_ECOLLATE = 3, /* Undefined collating element. */
+ REG_ECTYPE = 4, /* Invalid character class name. */
+ REG_EESCAPE = 5, /* Trailing backslash. */
+ REG_ESUBREG = 6, /* Invalid back reference. */
+ REG_EBRACK = 7, /* Unmatched left bracket. */
+ REG_EPAREN = 8, /* Parenthesis imbalance. */
+ REG_EBRACE = 9, /* Unmatched \{. */
+ REG_BADBR = 10, /* Invalid contents of \{\}. */
+ REG_ERANGE = 11, /* Invalid range end. */
+ REG_ESPACE = 12, /* Ran out of memory. */
+ REG_BADRPT = 13, /* No preceding re for repetition op. */
+ REG_EEND = 14, /* unexpected end of expression */
+ REG_ESIZE = 15, /* expression too big */
+ REG_ERPAREN = 16, /* unmatched right parenthesis */
+ REG_EMPTY = 17, /* empty expression */
+ REG_E_MEMORY = REG_ESIZE, /* out of memory */
+ REG_E_UNKNOWN = 18 /* unknown error */
+} reg_errcode_t;
+
+enum match_flags
+{
+ match_default = 0,
+ match_not_bol = 1, // first is not start of line
+ match_not_eol = match_not_bol << 1, // last is not end of line
+ match_not_bob = match_not_eol << 1, // first is not start of buffer
+ match_not_eob = match_not_bob << 1, // last is not end of buffer
+ match_not_bow = match_not_eob << 1, // first is not start of word
+ match_not_eow = match_not_bow << 1, // last is not end of word
+ match_not_dot_newline = match_not_eow << 1, // \n is not matched by '.'
+ match_not_dot_null = match_not_dot_newline << 1, // '\0' is not matched by '.'
+ match_prev_avail = match_not_dot_null << 1, // *--first is a valid expression
+ match_init = match_prev_avail << 1, // internal use
+ match_any = match_init << 1, // don't care what we match
+ match_not_null = match_any << 1, // string can't be null
+ match_continuous = match_not_null << 1, // each grep match must continue from
+ // uninterupted from the previous one
+ match_partial = match_continuous << 1, // find partial matches
+
+ match_stop = match_partial << 1, // stop after first match (grep)
+ match_all = match_stop << 1, // must find the whole of input even if match_any is set
+ match_max = match_all
+};
+
+
+#ifdef __cplusplus
+} // extern "C"
+} // namespace
+#endif
+
+
+#ifdef __BORLANDC__
+ #if __BORLANDC__ > 0x520
+ #pragma option pop
+ #endif
+#endif
+
+
+//
+// C++ high level wrapper goes here:
+//
+#if defined(__cplusplus)
+#include <string>
+#include <vector>
+namespace boost{
+
+#ifdef __BORLANDC__
+ #if __BORLANDC__ == 0x530
+ #pragma option push -a4 -b
+ #elif __BORLANDC__ > 0x530
+ #pragma option push -a8 -b
+ #endif
+#endif
+
+class RegEx;
+
+namespace re_detail{
+
+class RegExData;
+struct pred1;
+struct pred2;
+struct pred3;
+struct pred4;
+
+} // namespace re_detail
+
+#if defined(BOOST_MSVC) || defined(__BORLANDC__)
+typedef bool (__cdecl *GrepCallback)(const RegEx& expression);
+typedef bool (__cdecl *GrepFileCallback)(const char* file, const RegEx& expression);
+typedef bool (__cdecl *FindFilesCallback)(const char* file);
+#else
+typedef bool (*GrepCallback)(const RegEx& expression);
+typedef bool (*GrepFileCallback)(const char* file, const RegEx& expression);
+typedef bool (*FindFilesCallback)(const char* file);
+#endif
+
+class BOOST_REGEX_DECL RegEx
+{
+private:
+ re_detail::RegExData* pdata;
+public:
+ RegEx();
+ RegEx(const RegEx& o);
+ ~RegEx();
+ explicit RegEx(const char* c, bool icase = false);
+ explicit RegEx(const std::string& s, bool icase = false);
+ RegEx& operator=(const RegEx& o);
+ RegEx& operator=(const char* p);
+ RegEx& operator=(const std::string& s){ return this->operator=(s.c_str()); }
+ unsigned int SetExpression(const char* p, bool icase = false);
+ unsigned int SetExpression(const std::string& s, bool icase = false){ return SetExpression(s.c_str(), icase); }
+ std::string Expression()const;
+ unsigned int error_code()const;
+ //
+ // now matching operators:
+ //
+ bool Match(const char* p, unsigned int flags = match_default);
+ bool Match(const std::string& s, unsigned int flags = match_default) { return Match(s.c_str(), flags); }
+ bool Search(const char* p, unsigned int flags = match_default);
+ bool Search(const std::string& s, unsigned int flags = match_default) { return Search(s.c_str(), flags); }
+ unsigned int Grep(GrepCallback cb, const char* p, unsigned int flags = match_default);
+ unsigned int Grep(GrepCallback cb, const std::string& s, unsigned int flags = match_default) { return Grep(cb, s.c_str(), flags); }
+ unsigned int Grep(std::vector<std::string>& v, const char* p, unsigned int flags = match_default);
+ unsigned int Grep(std::vector<std::string>& v, const std::string& s, unsigned int flags = match_default) { return Grep(v, s.c_str(), flags); }
+ unsigned int Grep(std::vector<std::size_t>& v, const char* p, unsigned int flags = match_default);
+ unsigned int Grep(std::vector<std::size_t>& v, const std::string& s, unsigned int flags = match_default) { return Grep(v, s.c_str(), flags); }
+#ifndef BOOST_REGEX_NO_FILEITER
+ unsigned int GrepFiles(GrepFileCallback cb, const char* files, bool recurse = false, unsigned int flags = match_default);
+ unsigned int GrepFiles(GrepFileCallback cb, const std::string& files, bool recurse = false, unsigned int flags = match_default) { return GrepFiles(cb, files.c_str(), recurse, flags); }
+ unsigned int FindFiles(FindFilesCallback cb, const char* files, bool recurse = false, unsigned int flags = match_default);
+ unsigned int FindFiles(FindFilesCallback cb, const std::string& files, bool recurse = false, unsigned int flags = match_default) { return FindFiles(cb, files.c_str(), recurse, flags); }
+#endif
+
+ std::string Merge(const std::string& in, const std::string& fmt,
+ bool copy = true, unsigned int flags = match_default);
+ std::string Merge(const char* in, const char* fmt,
+ bool copy = true, unsigned int flags = match_default);
+
+ std::size_t Split(std::vector<std::string>& v, std::string& s, unsigned flags = match_default, unsigned max_count = ~0);
+ //
+ // now operators for returning what matched in more detail:
+ //
+ std::size_t Position(int i = 0)const;
+ std::size_t Length(int i = 0)const;
+ bool Matched(int i = 0)const;
+ unsigned int Line()const;
+ unsigned int Marks()const;
+ std::string What(int i = 0)const;
+ std::string operator[](int i)const { return What(i); }
+
+ static const unsigned int npos;
+
+ friend struct re_detail::pred1;
+ friend struct re_detail::pred2;
+ friend struct re_detail::pred3;
+ friend struct re_detail::pred4;
+};
+
+#ifdef __BORLANDC__
+ #pragma option pop
+#endif
+
+} // namespace boost
+
+#endif
+
+#endif // include guard
+
+
+
+
+
+
+
+
+
--- /dev/null
+/*
+ *
+ * Copyright (c) 1998-2002
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE fileiter.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Declares various platform independent file and
+ * directory iterators, plus binary file input in
+ * the form of class map_file.
+ */
+
+#ifndef BOOST_RE_FILEITER_HPP_INCLUDED
+#define BOOST_RE_FILEITER_HPP_INCLUDED
+
+#ifndef BOOST_REGEX_CONFIG_HPP
+#include <boost/regex/config.hpp>
+#endif
+
+#ifndef BOOST_REGEX_NO_FILEITER
+
+#if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && !defined(BOOST_REGEX_NO_W32)
+#error "Sorry, can't mix <windows.h> with STL code and gcc compiler: if you ran configure, try again with configure --disable-ms-windows"
+#define BOOST_REGEX_FI_WIN32_MAP
+#define BOOST_REGEX_FI_POSIX_DIR
+#elif (defined(__WIN32__) || defined(_WIN32) || defined(WIN32)) && !defined(BOOST_REGEX_NO_W32)
+#define BOOST_REGEX_FI_WIN32_MAP
+#define BOOST_REGEX_FI_WIN32_DIR
+#else
+#define BOOST_REGEX_FI_POSIX_MAP
+#define BOOST_REGEX_FI_POSIX_DIR
+#endif
+
+#if defined(BOOST_REGEX_FI_WIN32_MAP)||defined(BOOST_REGEX_FI_WIN32_DIR)
+#include <windows.h>
+#endif
+
+#if defined(BOOST_REGEX_FI_WIN32_DIR)
+
+namespace boost{
+ namespace re_detail{
+
+typedef WIN32_FIND_DATAA _fi_find_data;
+typedef HANDLE _fi_find_handle;
+
+ } // namespace re_detail
+
+} // namespace boost
+
+#define _fi_invalid_handle INVALID_HANDLE_VALUE
+#define _fi_dir FILE_ATTRIBUTE_DIRECTORY
+
+#elif defined(BOOST_REGEX_FI_POSIX_DIR)
+
+#include <cstdio>
+#include <cctype>
+#include <iterator>
+#include <list>
+#include <cassert>
+#include <dirent.h>
+
+#if defined(__SUNPRO_CC)
+using std::list;
+#endif
+
+#ifndef MAX_PATH
+#define MAX_PATH 256
+#endif
+
+namespace boost{
+ namespace re_detail{
+
+#ifdef __BORLANDC__
+ #pragma option push -a8 -b -Vx -Ve -pc
+#endif
+
+struct _fi_find_data
+{
+ unsigned dwFileAttributes;
+ char cFileName[MAX_PATH];
+};
+
+struct _fi_priv_data;
+
+typedef _fi_priv_data* _fi_find_handle;
+#define _fi_invalid_handle 0
+#define _fi_dir 1
+
+_fi_find_handle _fi_FindFirstFile(const char* lpFileName, _fi_find_data* lpFindFileData);
+bool _fi_FindNextFile(_fi_find_handle hFindFile, _fi_find_data* lpFindFileData);
+bool _fi_FindClose(_fi_find_handle hFindFile);
+
+#ifdef __BORLANDC__
+ #if __BORLANDC__ > 0x520
+ #pragma option pop
+ #endif
+#endif
+
+ } // namespace re_detail
+} // namespace boost
+
+#ifdef FindFirstFile
+ #undef FindFirstFile
+#endif
+#ifdef FindNextFile
+ #undef FindNextFile
+#endif
+#ifdef FindClose
+ #undef FindClose
+#endif
+
+#define FindFirstFileA _fi_FindFirstFile
+#define FindNextFileA _fi_FindNextFile
+#define FindClose _fi_FindClose
+
+#endif
+
+namespace boost{
+ namespace re_detail{
+
+#ifdef __BORLANDC__
+ #if __BORLANDC__ == 0x530
+ #pragma option push -a4 -b
+ #elif __BORLANDC__ > 0x530
+ #pragma option push -a8 -b
+ #endif
+#endif
+
+#ifdef BOOST_REGEX_FI_WIN32_MAP // win32 mapfile
+
+class BOOST_REGEX_DECL mapfile
+{
+ HANDLE hfile;
+ HANDLE hmap;
+ const char* _first;
+ const char* _last;
+public:
+
+ typedef const char* iterator;
+
+ mapfile(){ hfile = hmap = 0; _first = _last = 0; }
+ mapfile(const char* file){ hfile = hmap = 0; _first = _last = 0; open(file); }
+ ~mapfile(){ close(); }
+ void open(const char* file);
+ void close();
+ const char* begin(){ return _first; }
+ const char* end(){ return _last; }
+ size_t size(){ return _last - _first; }
+ bool valid(){ return (hfile != 0) && (hfile != INVALID_HANDLE_VALUE); }
+};
+
+
+#else
+
+class BOOST_REGEX_DECL mapfile_iterator;
+
+class BOOST_REGEX_DECL mapfile
+{
+ typedef char* pointer;
+ std::FILE* hfile;
+ long int _size;
+ pointer* _first;
+ pointer* _last;
+ mutable std::list<pointer*> condemed;
+ enum sizes
+ {
+ buf_size = 4096
+ };
+ void lock(pointer* node)const;
+ void unlock(pointer* node)const;
+public:
+
+ typedef mapfile_iterator iterator;
+
+ mapfile(){ hfile = 0; _size = 0; _first = _last = 0; }
+ mapfile(const char* file){ hfile = 0; _size = 0; _first = _last = 0; open(file); }
+ ~mapfile(){ close(); }
+ void open(const char* file);
+ void close();
+ iterator begin()const;
+ iterator end()const;
+ unsigned long size()const{ return _size; }
+ bool valid()const{ return hfile != 0; }
+ friend class mapfile_iterator;
+};
+
+class BOOST_REGEX_DECL mapfile_iterator
+#if !defined(BOOST_NO_STD_ITERATOR) || defined(BOOST_MSVC_STD_ITERATOR)
+: public std::iterator<std::random_access_iterator_tag, char>
+#endif
+{
+ typedef mapfile::pointer internal_pointer;
+ internal_pointer* node;
+ const mapfile* file;
+ unsigned long offset;
+ long position()const
+ {
+ return file ? ((node - file->_first) * mapfile::buf_size + offset) : 0;
+ }
+ void position(long pos)
+ {
+ if(file)
+ {
+ node = file->_first + (pos / mapfile::buf_size);
+ offset = pos % mapfile::buf_size;
+ }
+ }
+public:
+ typedef std::ptrdiff_t difference_type;
+ typedef char value_type;
+ typedef const char* pointer;
+ typedef const char& reference;
+ typedef std::random_access_iterator_tag iterator_category;
+
+ mapfile_iterator() { node = 0; file = 0; offset = 0; }
+ mapfile_iterator(const mapfile* f, long position)
+ {
+ file = f;
+ node = f->_first + position / mapfile::buf_size;
+ offset = position % mapfile::buf_size;
+ if(file)
+ file->lock(node);
+ }
+ mapfile_iterator(const mapfile_iterator& i)
+ {
+ file = i.file;
+ node = i.node;
+ offset = i.offset;
+ if(file)
+ file->lock(node);
+ }
+ ~mapfile_iterator()
+ {
+ if(file && node)
+ file->unlock(node);
+ }
+ mapfile_iterator& operator = (const mapfile_iterator& i);
+ char operator* ()const
+ {
+ assert(node >= file->_first);
+ assert(node < file->_last);
+ return file ? *(*node + sizeof(int) + offset) : char(0);
+ }
+ char operator[] (long off)const
+ {
+ mapfile_iterator tmp(*this);
+ tmp += off;
+ return *tmp;
+ }
+ mapfile_iterator& operator++ ();
+ mapfile_iterator operator++ (int);
+ mapfile_iterator& operator-- ();
+ mapfile_iterator operator-- (int);
+
+ mapfile_iterator& operator += (long off)
+ {
+ position(position() + off);
+ return *this;
+ }
+ mapfile_iterator& operator -= (long off)
+ {
+ position(position() - off);
+ return *this;
+ }
+
+ friend inline bool operator==(const mapfile_iterator& i, const mapfile_iterator& j)
+ {
+ return (i.file == j.file) && (i.node == j.node) && (i.offset == j.offset);
+ }
+
+ friend inline bool operator!=(const mapfile_iterator& i, const mapfile_iterator& j)
+ {
+ return !(i == j);
+ }
+
+ friend inline bool operator<(const mapfile_iterator& i, const mapfile_iterator& j)
+ {
+ return i.position() < j.position();
+ }
+ friend inline bool operator>(const mapfile_iterator& i, const mapfile_iterator& j)
+ {
+ return i.position() > j.position();
+ }
+ friend inline bool operator<=(const mapfile_iterator& i, const mapfile_iterator& j)
+ {
+ return i.position() <= j.position();
+ }
+ friend inline bool operator>=(const mapfile_iterator& i, const mapfile_iterator& j)
+ {
+ return i.position() >= j.position();
+ }
+
+ friend mapfile_iterator operator + (const mapfile_iterator& i, long off);
+ friend mapfile_iterator operator + (long off, const mapfile_iterator& i)
+ {
+ mapfile_iterator tmp(i);
+ return tmp += off;
+ }
+ friend mapfile_iterator operator - (const mapfile_iterator& i, long off);
+ friend inline long operator - (const mapfile_iterator& i, const mapfile_iterator& j)
+ {
+ return i.position() - j.position();
+ }
+};
+
+#endif
+
+// _fi_sep determines the directory separator, either '\\' or '/'
+BOOST_REGEX_DECL extern const char* _fi_sep;
+
+struct file_iterator_ref
+{
+ _fi_find_handle hf;
+ _fi_find_data _data;
+ long count;
+};
+
+
+class BOOST_REGEX_DECL file_iterator
+{
+ char* _root;
+ char* _path;
+ char* ptr;
+ file_iterator_ref* ref;
+
+public:
+ typedef std::ptrdiff_t difference_type;
+ typedef const char* value_type;
+ typedef const char** pointer;
+ typedef const char*& reference;
+ typedef std::input_iterator_tag iterator_category;
+
+ file_iterator();
+ file_iterator(const char* wild);
+ ~file_iterator();
+ file_iterator(const file_iterator&);
+ file_iterator& operator=(const file_iterator&);
+ const char* root()const { return _root; }
+ const char* path()const { return _path; }
+ const char* name()const { return ptr; }
+ _fi_find_data* data() { return &(ref->_data); }
+ void next();
+ file_iterator& operator++() { next(); return *this; }
+ file_iterator operator++(int);
+ const char* operator*() { return path(); }
+
+ friend inline bool operator == (const file_iterator& f1, const file_iterator& f2)
+ {
+ return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
+ }
+
+ friend inline bool operator != (const file_iterator& f1, const file_iterator& f2)
+ {
+ return !(f1 == f2);
+ }
+
+};
+
+// dwa 9/13/00 - suppress unused parameter warning
+inline bool operator < (const file_iterator&, const file_iterator&)
+{
+ return false;
+}
+
+
+class BOOST_REGEX_DECL directory_iterator
+{
+ char* _root;
+ char* _path;
+ char* ptr;
+ file_iterator_ref* ref;
+
+public:
+ typedef std::ptrdiff_t difference_type;
+ typedef const char* value_type;
+ typedef const char** pointer;
+ typedef const char*& reference;
+ typedef std::input_iterator_tag iterator_category;
+
+ directory_iterator();
+ directory_iterator(const char* wild);
+ ~directory_iterator();
+ directory_iterator(const directory_iterator& other);
+ directory_iterator& operator=(const directory_iterator& other);
+
+ const char* root()const { return _root; }
+ const char* path()const { return _path; }
+ const char* name()const { return ptr; }
+ _fi_find_data* data() { return &(ref->_data); }
+ void next();
+ directory_iterator& operator++() { next(); return *this; }
+ directory_iterator operator++(int);
+ const char* operator*() { return path(); }
+
+ static const char* separator() { return _fi_sep; }
+
+ friend inline bool operator == (const directory_iterator& f1, const directory_iterator& f2)
+ {
+ return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
+ }
+
+
+ friend inline bool operator != (const directory_iterator& f1, const directory_iterator& f2)
+ {
+ return !(f1 == f2);
+ }
+
+ };
+
+inline bool operator < (const directory_iterator&, const directory_iterator&)
+{
+ return false;
+}
+
+#ifdef __BORLANDC__
+ #pragma option pop
+#endif
+
+
+} // namespace re_detail
+using boost::re_detail::directory_iterator;
+using boost::re_detail::file_iterator;
+using boost::re_detail::mapfile;
+} // namespace boost
+
+#endif // BOOST_REGEX_NO_FILEITER
+#endif // BOOST_RE_FILEITER_HPP
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+/*
+ *
+ * Copyright (c) 1998-2002
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE instances.cpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Defines those template instances that are placed in the
+ * library rather than in the users object files.
+ */
+
+//
+// note no include guard, we may include this multiple times:
+//
+#ifndef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
+
+namespace boost{
+
+//
+// this header can be included multiple times, each time with
+// a different character type, BOOST_REGEX_CHAR_T must be defined
+// first:
+//
+#ifndef BOOST_REGEX_CHAR_T
+# error "BOOST_REGEX_CHAR_T not defined"
+#endif
+
+//
+// what follows is compiler specific:
+//
+
+#ifdef __BORLANDC__
+
+#pragma option push -a8 -b -Vx -Ve -pc
+
+# ifndef BOOST_REGEX_INSTANTIATE
+# pragma option push -Jgx
+# endif
+
+template class BOOST_REGEX_DECL reg_expression< BOOST_REGEX_CHAR_T >;
+template class BOOST_REGEX_DECL re_detail::match_results_base<BOOST_REGEX_CHAR_T const*>;
+template class BOOST_REGEX_DECL re_detail::match_results_base<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>;
+template class BOOST_REGEX_DECL match_results<BOOST_REGEX_CHAR_T const*>;
+template class BOOST_REGEX_DECL match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>;
+
+
+# ifndef BOOST_REGEX_INSTANTIATE
+# pragma option pop
+# endif
+
+#pragma option pop
+
+#elif defined(BOOST_MSVC)
+
+# ifndef BOOST_REGEX_INSTANTIATE
+# define template extern template
+# endif
+
+#pragma warning(push)
+#pragma warning(disable : 4251 4231 4660)
+
+//template class BOOST_REGEX_DECL regex_traits< BOOST_REGEX_CHAR_T >;
+template class BOOST_REGEX_DECL reg_expression< BOOST_REGEX_CHAR_T >;
+template class BOOST_REGEX_DECL re_detail::match_results_base<BOOST_REGEX_CHAR_T const*, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<BOOST_REGEX_CHAR_T const*>::type)>;
+template class BOOST_REGEX_DECL re_detail::match_results_base<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>::type)>;
+template class BOOST_REGEX_DECL match_results<BOOST_REGEX_CHAR_T const*, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<BOOST_REGEX_CHAR_T const*>::type)>;
+template class BOOST_REGEX_DECL match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>::type)>;
+
+
+#pragma warning(pop)
+
+# ifdef template
+# undef template
+# endif
+
+#elif !defined(BOOST_REGEX_HAS_DLL_RUNTIME)
+
+//
+// for each [member] function declare a full specialisation of that
+// [member] function, then instantiate it in one translation unit.
+// This is not guarenteed to work according to the standard, but in
+// practice it should work for all compilers (unless they use a realy
+// perverse name mangling convention). Unfortunately this approach
+// does *not* work for Win32 style import/export, because that can
+// alter the class layout.
+//
+
+# ifndef BOOST_REGEX_INSTANTIATE
+# define template template<>
+# endif
+
+template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)&);
+template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const BOOST_REGEX_CHAR_T* p, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f, const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)& a);
+template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const BOOST_REGEX_CHAR_T* p, size_type len, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f, const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)&);
+template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const reg_expression<BOOST_REGEX_CHAR_T>&);
+template reg_expression<BOOST_REGEX_CHAR_T>::~reg_expression();
+template reg_expression<BOOST_REGEX_CHAR_T>& BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator=(const reg_expression&);
+template BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::get_allocator()const;
+template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator==(const reg_expression<BOOST_REGEX_CHAR_T>&)const;
+template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator<(const reg_expression<BOOST_REGEX_CHAR_T>&)const;
+template BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::allocator()const;
+template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::set_expression(const BOOST_REGEX_CHAR_T* p, const BOOST_REGEX_CHAR_T* end, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f);
+template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_maps();
+template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_map(re_detail::re_syntax_base* node, unsigned char* _map, unsigned int* pnull, unsigned char mask, re_detail::re_syntax_base* terminal)const;
+template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::probe_start(re_detail::re_syntax_base* node, BOOST_REGEX_CHAR_T c, re_detail::re_syntax_base* terminal)const;
+template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::probe_start_null(re_detail::re_syntax_base* node, re_detail::re_syntax_base* terminal)const;
+template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::fixup_apply(re_detail::re_syntax_base* b, unsigned cbraces);
+template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::move_offsets(re_detail::re_syntax_base* j, unsigned size);
+template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
+template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set_aux(re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& singles, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& ranges, re_detail::jstack<boost::uint_fast32_t, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& classes, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& equivalents, bool isnot, const re_detail::_narrow_type&);
+template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set_aux(re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& singles, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& ranges, re_detail::jstack<boost::uint_fast32_t, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& classes, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& equivalents, bool isnot, const re_detail::_wide_type&);
+template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set_simple(re_detail::re_syntax_base* dat, unsigned long cls, bool isnot);
+template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::parse_inner_set(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
+template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::add_simple(re_detail::re_syntax_base* dat, re_detail::syntax_element_type type, unsigned int size);
+template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::add_literal(re_detail::re_syntax_base* dat, BOOST_REGEX_CHAR_T c);
+template BOOST_REGEX_CHAR_T BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::parse_escape(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
+template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::parse_range(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, unsigned& min, unsigned& max);
+template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::skip_space(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
+template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::probe_restart(re_detail::re_syntax_base* dat);
+template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::fixup_leading_rep(re_detail::re_syntax_base* dat, re_detail::re_syntax_base* end);
+template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::fail(unsigned int err);
+
+namespace re_detail{
+
+#define iterator const BOOST_REGEX_CHAR_T*
+#define Allocator match_results_base<iterator>::alloc_type
+#define size_type match_results_base<iterator>::size_type
+
+template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_first(iterator i);
+template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_first(iterator i, std::size_t pos);
+template match_results_base<iterator, Allocator>::match_results_base(const Allocator& a);
+template Allocator BOOST_REGEX_CALL match_results_base<iterator, Allocator>::allocator()const;
+template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::m_free();
+template bool match_results_base<iterator, Allocator>::operator==(const match_results_base<iterator, Allocator>& that)const;
+template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_type n);
+template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_type n, iterator i, iterator j);
+template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::cow();
+
+#undef iterator
+#undef Allocator
+#undef size_type
+
+} // namespace re_detail
+
+# ifdef template
+# undef template
+# endif
+
+#endif
+
+} // namespace boost
+
+#endif // BOOST_REGEX_NO_EXTERNAL_TEMPLATES
+
+
+
--- /dev/null
+/*
+ *
+ * Copyright (c) 1998-2002
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex.cpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Declares boost::reg_expression<> and associated
+ * functions and classes. This header is the main
+ * entry point for the template regex code.
+ */
+
+
+/* start with C compatibility API */
+
+#ifndef BOOST_RE_REGEX_HPP_INCLUDED
+#define BOOST_RE_REGEX_HPP_INCLUDED
+
+#ifndef BOOST_RE_CREGEX_HPP
+#include <boost/cregex.hpp>
+#endif
+
+#ifdef __cplusplus
+
+// what follows is all C++ don't include in C builds!!
+
+#ifdef BOOST_REGEX_DEBUG
+# include <iosfwd>
+#endif
+
+#include <new>
+#include <cstring>
+#ifndef BOOST_REGEX_CONFIG_HPP
+#include <boost/regex/config.hpp>
+#endif
+#ifndef BOOST_REGEX_FWD_HPP
+#include <boost/regex_fwd.hpp>
+#endif
+#ifndef BOOST_REGEX_STACK_HPP
+#include <boost/regex/v3/regex_stack.hpp>
+#endif
+#ifndef BOOST_REGEX_RAW_BUFFER_HPP
+#include <boost/regex/v3/regex_raw_buffer.hpp>
+#endif
+#ifndef BOOST_REGEX_KMP_HPP
+#include <boost/regex/v3/regex_kmp.hpp>
+#endif
+#ifndef BOOST_RE_PAT_EXCEPT_HPP
+#include <boost/regex/pattern_except.hpp>
+#endif
+#ifndef BOOST_REGEX_TRAITS_HPP
+#include <boost/regex/regex_traits.hpp>
+#endif
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/scoped_array.hpp>
+
+
+namespace boost{
+
+#ifdef __BORLANDC__
+ #pragma option push -a8 -b -Vx -Ve -pc -w-8027
+#endif
+
+namespace re_detail{
+
+struct re_set_long;
+struct re_syntax_base;
+
+} // namespace re_detail
+
+namespace deprecated{
+//
+// class char_regex_traits_i
+// provides case insensitive traits classes (deprecated):
+template <class charT>
+class char_regex_traits_i : public regex_traits<charT> {};
+
+template<>
+class char_regex_traits_i<char> : public regex_traits<char>
+{
+public:
+ typedef char char_type;
+ typedef unsigned char uchar_type;
+ typedef unsigned int size_type;
+ typedef regex_traits<char> base_type;
+
+ char BOOST_REGEX_CALL translate(char c, bool)const
+ {
+ return static_cast<const regex_traits<char>*>(this)->translate(c, true);
+ }
+};
+
+#ifndef BOOST_NO_WREGEX
+template<>
+class char_regex_traits_i<wchar_t> : public regex_traits<wchar_t>
+{
+public:
+ typedef wchar_t char_type;
+ typedef unsigned short uchar_type;
+ typedef unsigned int size_type;
+ typedef regex_traits<wchar_t> base_type;
+
+ wchar_t BOOST_REGEX_CALL translate(wchar_t c, bool)const
+ {
+ return static_cast<const regex_traits<wchar_t>*>(this)->translate(c, true);
+ }
+ boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const wchar_t* first, const wchar_t* last)const
+ {
+ boost::uint_fast32_t result = static_cast<const regex_traits<wchar_t>*>(this)->lookup_classname(first, last);
+ if((result & base_type::char_class_upper) == base_type::char_class_upper)
+ result |= base_type::char_class_alpha;
+ return result;
+ }
+};
+#endif
+} // namespace deprecated
+
+
+namespace re_detail{
+
+enum mask_type
+{
+ mask_take = 1,
+ mask_skip = 2,
+ mask_any = mask_skip | mask_take,
+ mask_all = mask_any
+};
+
+struct _narrow_type{};
+struct _wide_type{};
+
+template <class charT>
+class is_byte;
+
+template<>
+class is_byte<char>
+{
+public:
+ typedef _narrow_type width_type;
+};
+
+template<>
+class is_byte<unsigned char>
+{
+public:
+ typedef _narrow_type width_type;
+};
+
+template<>
+class is_byte<signed char>
+{
+public:
+ typedef _narrow_type width_type;
+};
+
+template <class charT>
+class is_byte
+{
+public:
+ typedef _wide_type width_type;
+};
+
+
+//
+// compiled structures
+//
+// the following defs describe the format of the compiled string
+//
+
+//
+// enum syntax_element_type
+// describes the type of a record
+enum syntax_element_type
+{
+ syntax_element_startmark = 0,
+ syntax_element_endmark = syntax_element_startmark + 1,
+ syntax_element_literal = syntax_element_endmark + 1,
+ syntax_element_start_line = syntax_element_literal + 1,
+ syntax_element_end_line = syntax_element_start_line + 1,
+ syntax_element_wild = syntax_element_end_line + 1,
+ syntax_element_match = syntax_element_wild + 1,
+ syntax_element_word_boundary = syntax_element_match + 1,
+ syntax_element_within_word = syntax_element_word_boundary + 1,
+ syntax_element_word_start = syntax_element_within_word + 1,
+ syntax_element_word_end = syntax_element_word_start + 1,
+ syntax_element_buffer_start = syntax_element_word_end + 1,
+ syntax_element_buffer_end = syntax_element_buffer_start + 1,
+ syntax_element_backref = syntax_element_buffer_end + 1,
+ syntax_element_long_set = syntax_element_backref + 1,
+ syntax_element_set = syntax_element_long_set + 1,
+ syntax_element_jump = syntax_element_set + 1,
+ syntax_element_alt = syntax_element_jump + 1,
+ syntax_element_rep = syntax_element_alt + 1,
+ syntax_element_combining = syntax_element_rep + 1,
+ syntax_element_soft_buffer_end = syntax_element_combining + 1,
+ syntax_element_restart_continue = syntax_element_soft_buffer_end + 1
+};
+
+#ifdef BOOST_REGEX_DEBUG
+// dwa 09/26/00 - This is needed to suppress warnings about an ambiguous conversion
+std::ostream& operator<<(std::ostream&, syntax_element_type);
+#endif
+
+union offset_type
+{
+ re_syntax_base* p;
+ std::size_t i;
+};
+
+//
+// struct re_syntax_base
+// base class for all syntax types:
+struct re_syntax_base
+{
+ syntax_element_type type;
+ offset_type next;
+ unsigned int can_be_null;
+};
+
+//
+// struct re_brace
+// marks start or end of (...)
+struct re_brace : public re_syntax_base
+{
+ int index;
+};
+
+//
+// struct re_literal
+// marks a literal string and
+// is followed by an array of charT[length]:
+struct re_literal : public re_syntax_base
+{
+ unsigned int length;
+};
+
+//
+// struct re_long_set
+// provides data for sets [...] containing
+// wide characters
+struct re_set_long : public re_syntax_base
+{
+ unsigned int csingles, cranges, cequivalents;
+ boost::uint_fast32_t cclasses;
+ bool isnot;
+};
+
+//
+// struct re_set
+// provides a map of bools for sets containing
+// narrow, single byte characters.
+struct re_set : public re_syntax_base
+{
+ unsigned char _map[256];
+};
+
+//
+// struct re_jump
+// provides alternative next destination
+struct re_jump : public re_syntax_base
+{
+ offset_type alt;
+ unsigned char _map[256];
+};
+
+//
+// struct re_repeat
+// provides repeat expressions
+struct re_repeat : public re_jump
+{
+ unsigned min, max;
+ int id;
+ bool leading;
+ bool greedy;
+ bool singleton;
+};
+
+
+//
+// enum re_jump_size_type
+// provides compiled size of re_jump
+// allowing for trailing alignment
+// provide this so we know how many
+// bytes to insert
+enum re_jump_size_type
+{
+ re_jump_size = (sizeof(re_jump) + padding_mask) & ~(padding_mask),
+ re_repeater_size = (sizeof(re_repeat) + padding_mask) & ~(padding_mask)
+};
+
+} // namespace re_detail
+
+//
+// class basic_regex
+// handles error codes and flags
+
+class BOOST_REGEX_DECL regbase
+{
+public:
+ enum flag_type_
+ {
+ escape_in_lists = 1, // '\' special inside [...]
+ char_classes = escape_in_lists << 1, // [[:CLASS:]] allowed
+ intervals = char_classes << 1, // {x,y} allowed
+ limited_ops = intervals << 1, // all of + ? and | are normal characters
+ newline_alt = limited_ops << 1, // \n is the same as |
+ bk_plus_qm = newline_alt << 1, // uses \+ and \?
+ bk_braces = bk_plus_qm << 1, // uses \{ and \}
+ bk_parens = bk_braces << 1, // uses \( and \)
+ bk_refs = bk_parens << 1, // \d allowed
+ bk_vbar = bk_refs << 1, // uses \|
+
+ use_except = bk_vbar << 1, // exception on error
+ failbit = use_except << 1, // error flag
+ literal = failbit << 1, // all characters are literals
+ icase = literal << 1, // characters are matched regardless of case
+ nocollate = icase << 1, // don't use locale specific collation
+
+ basic = char_classes | intervals | limited_ops | bk_braces | bk_parens | bk_refs,
+ extended = char_classes | intervals | bk_refs,
+ normal = escape_in_lists | char_classes | intervals | bk_refs | nocollate,
+ emacs = bk_braces | bk_parens | bk_refs | bk_vbar,
+ awk = extended | escape_in_lists,
+ grep = basic | newline_alt,
+ egrep = extended | newline_alt,
+ sed = basic,
+ perl = normal
+ };
+ typedef unsigned int flag_type;
+
+ enum restart_info
+ {
+ restart_any = 0,
+ restart_word = 1,
+ restart_line = 2,
+ restart_buf = 3,
+ restart_continue = 4,
+ restart_lit = 5,
+ restart_fixed_lit = 6
+ };
+
+ flag_type BOOST_REGEX_CALL flags()const
+ {
+ return _flags;
+ }
+
+ regbase();
+ regbase(const regbase& b);
+protected:
+ flag_type _flags;
+};
+
+//
+// some forward declarations:
+namespace re_detail{
+template <class iterator, class Allocator>
+class _priv_match_data;
+
+#if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template <class T>
+struct regex_iterator_traits
+{
+ typedef typename T::iterator_category iterator_category;
+ typedef typename T::value_type value_type;
+#if !defined(BOOST_NO_STD_ITERATOR)
+ typedef typename T::difference_type difference_type;
+ typedef typename T::pointer pointer;
+ typedef typename T::reference reference;
+#else
+ typedef std::ptrdiff_t difference_type;
+ typedef value_type* pointer;
+ typedef value_type& reference;
+#endif
+};
+
+template <class T>
+struct pointer_iterator_traits
+{
+ typedef std::ptrdiff_t difference_type;
+ typedef T value_type;
+ typedef T* pointer;
+ typedef T& reference;
+ typedef std::random_access_iterator_tag iterator_category;
+};
+template <class T>
+struct const_pointer_iterator_traits
+{
+ typedef std::ptrdiff_t difference_type;
+ typedef T value_type;
+ typedef const T* pointer;
+ typedef const T& reference;
+ typedef std::random_access_iterator_tag iterator_category;
+};
+
+template<>
+struct regex_iterator_traits<char*> : pointer_iterator_traits<char>{};
+template<>
+struct regex_iterator_traits<const char*> : const_pointer_iterator_traits<char>{};
+template<>
+struct regex_iterator_traits<wchar_t*> : pointer_iterator_traits<wchar_t>{};
+template<>
+struct regex_iterator_traits<const wchar_t*> : const_pointer_iterator_traits<wchar_t>{};
+
+#if defined(__SGI_STL_PORT) && defined(__STL_DEBUG)
+template<>
+struct regex_iterator_traits<std::string::iterator> : pointer_iterator_traits<char>{};
+template<>
+struct regex_iterator_traits<std::string::const_iterator> : const_pointer_iterator_traits<char>{};
+#ifndef BOOST_NO_STD_WSTRING
+template<>
+struct regex_iterator_traits<std::wstring::iterator> : pointer_iterator_traits<wchar_t>{};
+template<>
+struct regex_iterator_traits<std::wstring::const_iterator> : const_pointer_iterator_traits<wchar_t>{};
+#endif // BOOST_NO_WSTRING
+#endif // stport
+
+#else
+
+template <class T>
+struct regex_iterator_traits : public std::iterator_traits<T> {};
+
+#endif
+
+template <class I>
+struct def_alloc_param_traits
+{
+ typedef typename regex_iterator_traits<I>::value_type const_value_type;
+ typedef typename remove_cv<const_value_type>::type type;
+};
+template <>
+struct def_alloc_param_traits<const char*>
+{
+ typedef char type;
+};
+template <>
+struct def_alloc_param_traits<const wchar_t*>
+{
+ typedef wchar_t type;
+};
+
+}
+
+template <class iterator, class Allocator =
+#if !(defined(BOOST_MSVC) && (BOOST_MSVC <= 1300))
+BOOST_DEFAULT_ALLOCATOR(typename re_detail::def_alloc_param_traits<iterator>::type) >
+#else
+BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<iterator>::type) >
+#endif
+class match_results;
+
+//
+// class reg_expression
+// represents the compiled
+// regular expression:
+//
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable : 4251 4231 4660)
+#endif
+
+#ifdef BOOST_REGEX_NO_FWD
+template <class charT, class traits = regex_traits<charT>, class Allocator = BOOST_DEFAULT_ALLOCATOR(charT) >
+#else
+template <class charT, class traits, class Allocator >
+#endif
+class reg_expression : public regbase
+{
+public:
+ typedef typename traits::size_type traits_size_type;
+ typedef typename traits::uchar_type traits_uchar_type;
+ typedef typename traits::string_type traits_string_type;
+ // typedefs:
+ typedef charT char_type;
+ typedef traits traits_type;
+
+ // locale_type
+ // placeholder for actual locale type used by the
+ // traits class to localise *this.
+ typedef typename traits::locale_type locale_type;
+ // value_type
+ typedef charT value_type;
+ // reference, const_reference
+ typedef charT& reference;
+ typedef const charT& const_reference;
+ // iterator, const_iterator
+ typedef const charT* const_iterator;
+ typedef const_iterator iterator;
+ // difference_type
+ typedef typename Allocator::difference_type difference_type;
+ // size_type
+ typedef typename Allocator::size_type size_type;
+ // allocator_type
+ typedef Allocator allocator_type;
+ typedef Allocator alloc_type;
+ // flag_type
+ typedef regbase::flag_type flag_type;
+
+public:
+ explicit reg_expression(const Allocator& a = Allocator());
+ explicit reg_expression(const charT* p, flag_type f = regbase::normal, const Allocator& a = Allocator());
+ reg_expression(const charT* p1, const charT* p2, flag_type f = regbase::normal, const Allocator& a = Allocator());
+ reg_expression(const charT* p, size_type len, flag_type f, const Allocator& a = Allocator());
+ reg_expression(const reg_expression&);
+ ~reg_expression();
+ reg_expression& BOOST_REGEX_CALL operator=(const reg_expression&);
+ reg_expression& BOOST_REGEX_CALL operator=(const charT* ptr)
+ {
+ set_expression(ptr, regbase::normal | regbase::use_except);
+ return *this;
+ }
+
+ //
+ // assign:
+ reg_expression& assign(const reg_expression& that)
+ { return *this = that; }
+ reg_expression& assign(const charT* ptr, flag_type f = regbase::normal)
+ {
+ set_expression(ptr, f | regbase::use_except);
+ return *this;
+ }
+
+ reg_expression& assign(const charT* first,
+ const charT* last,
+ flag_type f = regbase::normal)
+ {
+ set_expression(first, last, f | regbase::use_except);
+ return *this;
+ }
+#if !defined(BOOST_NO_MEMBER_TEMPLATES) && !(defined(__IBMCPP__) && (__IBMCPP__ <= 502))
+
+ template <class ST, class SA>
+ unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regbase::normal)
+ { return set_expression(p.data(), p.data() + p.size(), f); }
+
+ template <class ST, class SA>
+ explicit reg_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regbase::normal, const Allocator& a = Allocator())
+ : data(a), pkmp(0), error_code_(REG_EMPTY), _expression(0) { set_expression(p, f | regbase::use_except); }
+
+ template <class I>
+ reg_expression(I first, I last, flag_type f = regbase::normal, const Allocator& al = Allocator())
+ : data(al), pkmp(0), error_code_(REG_EMPTY), _expression(0)
+ {
+ size_type len = last-first;
+ scoped_array<charT> a(new charT[len]);
+ std::copy(first, last, a.get());
+ set_expression(a.get(), a.get() + len, f | regbase::use_except);
+ }
+
+ template <class ST, class SA>
+ reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT, ST, SA>& p)
+ {
+ set_expression(p.c_str(), p.c_str() + p.size(), regbase::normal | regbase::use_except);
+ return *this;
+ }
+
+ template <class string_traits, class A>
+ reg_expression& BOOST_REGEX_CALL assign(
+ const std::basic_string<charT, string_traits, A>& s,
+ flag_type f = regbase::normal)
+ {
+ set_expression(s.c_str(), s.c_str() + s.size(), f | regbase::use_except);
+ return *this;
+ }
+
+ template <class fwd_iterator>
+ reg_expression& BOOST_REGEX_CALL assign(fwd_iterator first,
+ fwd_iterator last,
+ flag_type f = regbase::normal)
+ {
+ size_type len = last-first;
+ scoped_array<charT> a(new charT[len]);
+ std::copy(first, last, a.get());
+ set_expression(a.get(), a.get() + len, f | regbase::use_except);
+ return *this;
+ }
+#else
+ unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT>& p, flag_type f = regbase::normal)
+ { return set_expression(p.data(), p.data() + p.size(), f | regbase::use_except); }
+
+ reg_expression(const std::basic_string<charT>& p, flag_type f = regbase::normal, const Allocator& a = Allocator())
+ : data(a), pkmp(0) { set_expression(p, f | regbase::use_except); }
+
+ reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p)
+ {
+ set_expression(p.c_str(), p.c_str() + p.size(), regbase::normal | regbase::use_except);
+ return *this;
+ }
+
+ reg_expression& BOOST_REGEX_CALL assign(
+ const std::basic_string<charT>& s,
+ flag_type f = regbase::normal)
+ {
+ set_expression(s.c_str(), s.c_str() + s.size(), f | regbase::use_except);
+ return *this;
+ }
+
+#endif
+
+
+ //
+ // allocator access:
+ Allocator BOOST_REGEX_CALL get_allocator()const;
+ //
+ // locale:
+ locale_type BOOST_REGEX_CALL imbue(locale_type l){ return traits_inst.imbue(l); }
+ locale_type BOOST_REGEX_CALL getloc()const{ return traits_inst.getloc(); }
+ //
+ // flags:
+ flag_type BOOST_REGEX_CALL getflags()const
+ { return flags(); }
+ //
+ // str:
+ std::basic_string<charT> BOOST_REGEX_CALL str()const
+ {
+ std::basic_string<charT> result;
+ if(this->error_code() == 0)
+ result = std::basic_string<charT>(_expression, _expression_len);
+ return result;
+ }
+ //
+ // begin, end:
+ const_iterator BOOST_REGEX_CALL begin()const
+ { return (this->error_code() ? 0 : _expression); }
+ const_iterator BOOST_REGEX_CALL end()const
+ { return (this->error_code() ? 0 : _expression + _expression_len); }
+ //
+ // swap:
+ void BOOST_REGEX_CALL swap(reg_expression&)throw();
+ //
+ // size:
+ size_type BOOST_REGEX_CALL size()const
+ { return (this->error_code() ? 0 : _expression_len); }
+ //
+ // max_size:
+ size_type BOOST_REGEX_CALL max_size()const
+ { return UINT_MAX; }
+ //
+ // empty:
+ bool BOOST_REGEX_CALL empty()const
+ { return 0 != this->error_code(); }
+
+ unsigned BOOST_REGEX_CALL mark_count()const { return (this->error_code() ? 0 : marks); }
+ bool BOOST_REGEX_CALL operator==(const reg_expression&)const;
+ bool BOOST_REGEX_CALL operator<(const reg_expression&)const;
+ //
+ // The following are deprecated as public interfaces
+ // but are available for compatibility with earlier versions.
+ allocator_type BOOST_REGEX_CALL allocator()const;
+ const charT* BOOST_REGEX_CALL expression()const { return (this->error_code() ? 0 : _expression); }
+ unsigned int BOOST_REGEX_CALL set_expression(const charT* p, const charT* end, flag_type f = regbase::normal);
+ unsigned int BOOST_REGEX_CALL set_expression(const charT* p, flag_type f = regbase::normal) { return set_expression(p, p + traits_type::length(p), f); }
+ //
+ // this should be private but template friends don't work:
+ const traits_type& get_traits()const { return traits_inst; }
+ unsigned int BOOST_REGEX_CALL error_code()const
+ {
+ return error_code_;
+ }
+
+private:
+ traits_type traits_inst;
+ re_detail::raw_storage<Allocator> data;
+ unsigned _restart_type;
+ unsigned marks;
+ int repeats;
+ unsigned char* startmap;
+ std::size_t _expression_len;
+ std::size_t _leading_len;
+ const charT* _leading_string;
+ std::size_t _leading_string_len;
+ re_detail::kmp_info<charT>* pkmp;
+ unsigned error_code_;
+ charT* _expression;
+
+ void BOOST_REGEX_CALL compile_maps();
+ void BOOST_REGEX_CALL compile_map(re_detail::re_syntax_base* node, unsigned char* _map, unsigned int* pnull, unsigned char mask, re_detail::re_syntax_base* terminal = 0)const;
+ bool BOOST_REGEX_CALL probe_start(re_detail::re_syntax_base* node, charT c, re_detail::re_syntax_base* terminal)const;
+ bool BOOST_REGEX_CALL probe_start_null(re_detail::re_syntax_base* node, re_detail::re_syntax_base* terminal)const;
+ void BOOST_REGEX_CALL fixup_apply(re_detail::re_syntax_base* b, unsigned cbraces);
+ void BOOST_REGEX_CALL move_offsets(re_detail::re_syntax_base* j, unsigned size);
+ re_detail::re_syntax_base* BOOST_REGEX_CALL compile_set(const charT*& first, const charT* last);
+ re_detail::re_syntax_base* BOOST_REGEX_CALL compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_narrow_type&);
+ re_detail::re_syntax_base* BOOST_REGEX_CALL compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_wide_type&);
+ re_detail::re_syntax_base* BOOST_REGEX_CALL compile_set_simple(re_detail::re_syntax_base* dat, unsigned long cls, bool isnot = false);
+ unsigned int BOOST_REGEX_CALL parse_inner_set(const charT*& first, const charT* last);
+
+ re_detail::re_syntax_base* BOOST_REGEX_CALL add_simple(re_detail::re_syntax_base* dat, re_detail::syntax_element_type type, unsigned int size = sizeof(re_detail::re_syntax_base));
+ re_detail::re_syntax_base* BOOST_REGEX_CALL add_literal(re_detail::re_syntax_base* dat, charT c);
+ charT BOOST_REGEX_CALL parse_escape(const charT*& first, const charT* last);
+ void BOOST_REGEX_CALL parse_range(const charT*& first, const charT* last, unsigned& min, unsigned& max);
+ bool BOOST_REGEX_CALL skip_space(const charT*& first, const charT* last);
+ unsigned int BOOST_REGEX_CALL probe_restart(re_detail::re_syntax_base* dat);
+ unsigned int BOOST_REGEX_CALL fixup_leading_rep(re_detail::re_syntax_base* dat, re_detail::re_syntax_base* end);
+ void BOOST_REGEX_CALL fail(unsigned int err);
+
+protected:
+ static int BOOST_REGEX_CALL repeat_count(const reg_expression& e)
+ { return e.repeats; }
+ static unsigned int BOOST_REGEX_CALL restart_type(const reg_expression& e)
+ { return e._restart_type; }
+ static const re_detail::re_syntax_base* BOOST_REGEX_CALL first(const reg_expression& e)
+ { return (const re_detail::re_syntax_base*)e.data.data(); }
+ static const unsigned char* BOOST_REGEX_CALL get_map(const reg_expression& e)
+ { return e.startmap; }
+ static std::size_t BOOST_REGEX_CALL leading_length(const reg_expression& e)
+ { return e._leading_len; }
+ static const re_detail::kmp_info<charT>* get_kmp(const reg_expression& e)
+ { return e.pkmp; }
+ static bool BOOST_REGEX_CALL can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_wide_type&);
+ static bool BOOST_REGEX_CALL can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_narrow_type&);
+};
+
+#ifdef BOOST_MSVC
+#pragma warning (pop)
+#endif
+
+template <class charT, class traits, class Allocator>
+inline void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::swap(reg_expression& that)throw()
+{
+ // this is not as efficient as it should be,
+ // however swapping traits classes is problematic
+ // so just use 'brute force' method for now:
+ reg_expression<charT, traits, Allocator> e(that);
+ that = *this;
+ *this = e;
+}
+
+
+//
+// class match_results and match_results_base
+// handles what matched where
+
+template <class iterator>
+struct sub_match
+{
+ typedef typename re_detail::regex_iterator_traits<iterator>::value_type value_type;
+#if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+ typedef std::ptrdiff_t difference_type;
+#else
+ typedef typename re_detail::regex_iterator_traits<iterator>::difference_type difference_type;
+#endif
+ typedef iterator iterator_type;
+
+ iterator first;
+ iterator second;
+ bool matched;
+
+ operator std::basic_string<value_type> ()const
+ {
+ std::basic_string<value_type> result;
+ std::size_t len = boost::re_detail::distance((iterator)first, (iterator)second);
+ result.reserve(len);
+ iterator i = first;
+ while(i != second)
+ {
+ result.append(1, *i);
+ ++i;
+ }
+ return result;
+ }
+ #ifdef BOOST_OLD_REGEX_H
+ //
+ // the following are deprecated, do not use!!
+ //
+ operator int()const;
+ operator unsigned int()const;
+ operator short()const
+ {
+ return (short)(int)(*this);
+ }
+ operator unsigned short()const
+ {
+ return (unsigned short)(unsigned int)(*this);
+ }
+ #endif
+ sub_match() { matched = false; }
+ sub_match(iterator i) : first(i), second(i), matched(false) {}
+
+ bool operator==(const sub_match& that)const
+ {
+ return (first == that.first) && (second == that.second) && (matched == that.matched);
+ }
+ bool BOOST_REGEX_CALL operator !=(const sub_match& that)const
+ { return !(*this == that); }
+
+ difference_type BOOST_REGEX_CALL length()const
+ {
+ difference_type n = boost::re_detail::distance((iterator)first, (iterator)second);
+ return n;
+ }
+};
+
+#ifdef BOOST_OLD_REGEX_H
+namespace re_detail{
+template <class iterator, class charT>
+int do_toi(iterator i, iterator j, char c, int radix)
+{
+ std::string s(i, j);
+ char* p;
+ int result = std::strtol(s.c_str(), &p, radix);
+#ifndef BOOST_NO_EXCEPTIONS
+ if(*p)throw bad_pattern("Bad sub-expression");
+#endif
+ BOOST_REGEX_NOEH_ASSERT(0 == *p)
+ return result;
+}
+
+//
+// helper:
+template <class I, class charT>
+int do_toi(I& i, I j, charT c)
+{
+ int result = 0;
+ while((i != j) && (isdigit(*i)))
+ {
+ result = result*10 + (*i - '0');
+ ++i;
+ }
+ return result;
+}
+}
+
+
+template <class iterator>
+sub_match<iterator>::operator int()const
+{
+ iterator i = first;
+ iterator j = second;
+#ifndef BOOST_NO_EXCEPTIONS
+ if(i == j)throw bad_pattern("Bad sub-expression");
+#endif
+ BOOST_REGEX_NOEH_ASSERT(i != j)
+ int neg = 1;
+ if((i != j) && (*i == '-'))
+ {
+ neg = -1;
+ ++i;
+ }
+ neg *= re_detail::do_toi(i, j, *i);
+#ifndef BOOST_NO_EXCEPTIONS
+ if(i != j)throw bad_pattern("Bad sub-expression");
+#endif
+ BOOST_REGEX_NOEH_ASSERT(i == j)
+ return neg;
+}
+template <class iterator>
+sub_match<iterator>::operator unsigned int()const
+{
+ iterator i = first;
+ iterator j = second;
+#ifndef BOOST_NO_EXCEPTIONS
+ if(i == j)
+ throw bad_pattern("Bad sub-expression");
+#endif
+ BOOST_REGEX_NOEH_ASSERT(i != j)
+ return re_detail::do_toi(i, j, *first);
+}
+#endif
+
+namespace re_detail{
+
+template <class iterator, class Allocator = BOOST_DEFAULT_ALLOCATOR(typename def_alloc_param_traits<iterator>::type) >
+class match_results_base
+{
+public:
+ typedef Allocator alloc_type;
+ typedef typename boost::detail::rebind_allocator<iterator, Allocator>::type iterator_alloc;
+ typedef typename iterator_alloc::size_type size_type;
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
+ typedef typename std::iterator_traits<iterator>::difference_type difference_type;
+ typedef typename std::iterator_traits<iterator>::value_type char_type;
+#else
+ typedef std::ptrdiff_t difference_type;
+ typedef typename re_detail::regex_iterator_traits<iterator>::value_type char_type;
+#endif
+ typedef sub_match<iterator> value_type;
+ typedef iterator iterator_type;
+
+protected:
+ typedef typename boost::detail::rebind_allocator<char, Allocator>::type c_alloc;
+
+ struct c_reference : public c_alloc
+ {
+ std::size_t cmatches;
+ unsigned count;
+ sub_match<iterator> head, tail, null;
+ unsigned int lines;
+ iterator line_pos, base;
+ c_reference(const Allocator& a)
+ : c_alloc(a), cmatches(0), count(0), lines(0) { }
+
+ bool operator==(const c_reference& that)const
+ {
+ return (cmatches == that.cmatches) &&
+ (count == that.count) &&
+ (head == that.head) &&
+ (tail == that.tail) &&
+ (lines == that.lines) &&
+ (base == that.base);
+ }
+ bool operator!=(const c_reference& that)const
+ { return !(*this == that); }
+ };
+
+ c_reference* ref;
+
+ void BOOST_REGEX_CALL cow();
+
+ // protected contructor for derived class...
+ match_results_base(bool){}
+ void BOOST_REGEX_CALL m_free();
+
+public:
+
+ match_results_base(const Allocator& a = Allocator());
+
+ match_results_base(const match_results_base& m)
+ {
+ ref = m.ref;
+ ++(ref->count);
+ }
+
+ match_results_base& BOOST_REGEX_CALL operator=(const match_results_base& m);
+
+ ~match_results_base()
+ {
+ m_free();
+ }
+
+ size_type BOOST_REGEX_CALL size()const
+ {
+ //return (*this)[0].matched ? ref->cmatches : 0;
+ return ref->cmatches;
+ }
+
+ const sub_match<iterator>& BOOST_REGEX_CALL operator[](int n) const
+ {
+ if((n >= 0) && ((unsigned int)n < ref->cmatches))
+ return *(sub_match<iterator>*)((char*)ref + sizeof(c_reference) + sizeof(sub_match<iterator>)*n);
+ return (n == -1) ? ref->head : (n == -2) ? ref->tail : ref->null;
+ }
+
+ Allocator BOOST_REGEX_CALL allocator()const;
+
+ difference_type BOOST_REGEX_CALL length(unsigned int sub = 0)const
+ {
+ jm_assert(ref->cmatches);
+ const sub_match<iterator>& m = (*this)[sub];
+ if(m.matched == false)
+ return 0;
+ difference_type n = boost::re_detail::distance((iterator)m.first, (iterator)m.second);
+ return n;
+ }
+
+ std::basic_string<char_type> str(int i)const
+ {
+ return static_cast<std::basic_string<char_type> >((*this)[i]);
+ }
+
+ unsigned int BOOST_REGEX_CALL line()const
+ {
+ return ref->lines;
+ }
+
+ difference_type BOOST_REGEX_CALL position(unsigned int sub = 0)const
+ {
+ jm_assert(ref->cmatches);
+ const sub_match<iterator>& s = (*this)[sub];
+ if(s.matched == false)
+ return -1;
+ difference_type n = boost::re_detail::distance((iterator)(ref->base), (iterator)(s.first));
+ return n;
+ }
+
+ iterator BOOST_REGEX_CALL line_start()const
+ {
+ return ref->line_pos;
+ }
+
+ void swap(match_results_base& that)
+ {
+ c_reference* t = that.ref;
+ that.ref = ref;
+ ref = t;
+ }
+
+ bool operator==(const match_results_base& that)const;
+ bool operator<(const match_results_base& that)const
+ { return position() < that.position(); }
+
+ friend class match_results<iterator, Allocator>;
+
+ void BOOST_REGEX_CALL set_size(size_type n);
+ void BOOST_REGEX_CALL set_size(size_type n, iterator i, iterator j);
+ void BOOST_REGEX_CALL maybe_assign(const match_results_base& m);
+ void BOOST_REGEX_CALL init_fail(iterator i, iterator j);
+
+ void BOOST_REGEX_CALL set_first(iterator i);
+ void BOOST_REGEX_CALL set_first(iterator i, std::size_t pos);
+
+ void BOOST_REGEX_CALL set_second(iterator i)
+ {
+ cow();
+ ((sub_match<iterator>*)(ref+1))->second = i;
+ ((sub_match<iterator>*)(ref+1))->matched = true;
+ ref->tail.first = i;
+ ref->tail.matched = (ref->tail.first == ref->tail.second) ? false : true;
+ }
+
+ void BOOST_REGEX_CALL set_second(iterator i, std::size_t pos, bool m = true)
+ {
+ cow();
+ ((sub_match<iterator>*)((char*)ref + sizeof(c_reference) + sizeof(sub_match<iterator>) * pos))->second = i;
+ ((sub_match<iterator>*)((char*)ref + sizeof(c_reference) + sizeof(sub_match<iterator>) * pos))->matched = m;
+ if(pos == 0)
+ {
+ ref->tail.first = i;
+ ref->tail.matched = (ref->tail.first == ref->tail.second) ? false : true;
+ }
+ }
+
+ void BOOST_REGEX_CALL set_line(unsigned int i, iterator pos)
+ {
+ ref->lines = i;
+ ref->line_pos = pos;
+ }
+
+ void BOOST_REGEX_CALL set_base(iterator pos)
+ {
+ ref->base = pos;
+ }
+};
+
+template <class iterator, class Allocator>
+void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_first(iterator i)
+{
+ cow();
+ ref->head.second = i;
+ ref->head.matched = (ref->head.first == ref->head.second) ? false : true;
+ sub_match<iterator>* p1 = (sub_match<iterator>*)(ref+1);
+ sub_match<iterator>* p2 = p1 + ref->cmatches;
+ p1->first = i;
+ p1->matched = false;
+ ++p1;
+ while(p1 != p2)
+ {
+ p1->matched = false;
+ p1->first = ref->tail.second;
+ p1->second = ref->tail.second;
+ ++p1;
+ }
+}
+
+template <class iterator, class Allocator>
+void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_first(iterator i, std::size_t pos)
+{
+ cow();
+ ((sub_match<iterator>*)((char*)ref + sizeof(c_reference) + sizeof(sub_match<iterator>) * pos))->first = i;
+ if(pos == 0)
+ {
+ ref->head.second = i;
+ ref->head.matched = (ref->head.first == ref->head.second) ? false : true;
+ sub_match<iterator>* p1 = (sub_match<iterator>*)(ref+1);
+ sub_match<iterator>* p2 = p1 + ref->cmatches;
+ p1->first = i;
+ p1->matched = false;
+ ++p1;
+ while(p1 != p2)
+ {
+ p1->matched = false;
+ p1->first = ref->tail.second;
+ p1->second = ref->tail.second;
+ ++p1;
+ }
+ }
+}
+
+
+template <class iterator, class Allocator>
+match_results_base<iterator, Allocator>::match_results_base(const Allocator& a)
+{
+ ref = (c_reference*)c_alloc(a).allocate(sizeof(sub_match<iterator>) + sizeof(c_reference));
+ BOOST_REGEX_NOEH_ASSERT(ref)
+#ifndef BOOST_NO_EXCEPTIONS
+ try
+ {
+#endif
+ new (ref) c_reference(a);
+ ref->cmatches = 1;
+ ref->count = 1;
+ // construct the sub_match<iterator>:
+#ifndef BOOST_NO_EXCEPTIONS
+ try
+ {
+#endif
+ new ((sub_match<iterator>*)(ref+1)) sub_match<iterator>();
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(...)
+ {
+ ::boost::re_detail::pointer_destroy(ref);
+ throw;
+ }
+ }
+ catch(...)
+ {
+ c_alloc(a).deallocate((char*)(void*)ref, sizeof(sub_match<iterator>) + sizeof(c_reference));
+ throw;
+ }
+#endif
+}
+
+template <class iterator, class Allocator>
+Allocator BOOST_REGEX_CALL match_results_base<iterator, Allocator>::allocator()const
+{
+ return *((c_alloc*)ref);
+}
+
+template <class iterator, class Allocator>
+inline match_results_base<iterator, Allocator>& BOOST_REGEX_CALL match_results_base<iterator, Allocator>::operator=(const match_results_base<iterator, Allocator>& m)
+{
+ if(ref != m.ref)
+ {
+ m_free();
+ ref = m.ref;
+ ++(ref->count);
+ }
+ return *this;
+}
+
+
+template <class iterator, class Allocator>
+void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::m_free()
+{
+ if(--(ref->count) == 0)
+ {
+ c_alloc a(*ref);
+ sub_match<iterator>* p1, *p2;
+ p1 = (sub_match<iterator>*)(ref+1);
+ p2 = p1 + ref->cmatches;
+ while(p1 != p2)
+ {
+ ::boost::re_detail::pointer_destroy(p1);
+ ++p1;
+ }
+ ::boost::re_detail::pointer_destroy(ref);
+ a.deallocate((char*)(void*)ref, sizeof(sub_match<iterator>) * ref->cmatches + sizeof(c_reference));
+ }
+}
+
+template <class iterator, class Allocator>
+bool match_results_base<iterator, Allocator>::operator==(const match_results_base<iterator, Allocator>& that)const
+{
+ if(*ref != *(that.ref))
+ return false;
+ const sub_match<iterator>* p1 = (sub_match<iterator>*)(ref+1);
+ const sub_match<iterator>* p2 = p1 + ref->cmatches;
+ const sub_match<iterator>* p3 = (sub_match<iterator>*)(that.ref+1);
+ while(p1 != p2)
+ {
+ if(*p1 != *p3)
+ return false;
+ ++p1;
+ ++p3;
+ }
+ return true;
+}
+
+template <class iterator, class Allocator>
+void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_type n)
+{
+ if(ref->cmatches != n)
+ {
+ c_reference* newref = (c_reference*)ref->allocate(sizeof(sub_match<iterator>) * n + sizeof(c_reference));
+ BOOST_REGEX_NOEH_ASSERT(newref)
+#ifndef BOOST_NO_EXCEPTIONS
+ try
+ {
+#endif
+ new (newref) c_reference(*ref);
+ newref->count = 1;
+ newref->cmatches = n;
+ sub_match<iterator>* p1, *p2;
+ p1 = (sub_match<iterator>*)(newref+1);
+ p2 = p1 + newref->cmatches;
+#ifndef BOOST_NO_EXCEPTIONS
+ try
+ {
+#endif
+ while(p1 != p2)
+ {
+ new (p1) sub_match<iterator>();
+ ++p1;
+ }
+ m_free();
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(...)
+ {
+ p2 = (sub_match<iterator>*)(newref+1);
+ while(p2 != p1)
+ {
+ ::boost::re_detail::pointer_destroy(p2);
+ ++p2;
+ }
+ ::boost::re_detail::pointer_destroy(ref);
+ throw;
+ }
+#endif
+ ref = newref;
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(...)
+ {
+ ref->deallocate((char*)(void*)newref, sizeof(sub_match<iterator>) * n + sizeof(c_reference));
+ throw;
+ }
+#endif
+ }
+}
+
+template <class iterator, class Allocator>
+void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_type n, iterator i, iterator j)
+{
+ if(ref->cmatches != n)
+ {
+ c_reference* newref = (c_reference*)ref->allocate(sizeof(sub_match<iterator>) * n + sizeof(c_reference));
+ BOOST_REGEX_NOEH_ASSERT(newref)
+#ifndef BOOST_NO_EXCEPTIONS
+ try{
+#endif
+ new (newref) c_reference(*ref);
+ newref->count = 1;
+ newref->cmatches = n;
+ sub_match<iterator>* p1 = (sub_match<iterator>*)(newref+1);
+ sub_match<iterator>* p2 = p1 + newref->cmatches;
+#ifndef BOOST_NO_EXCEPTIONS
+ try
+ {
+#endif
+ while(p1 != p2)
+ {
+ new (p1) sub_match<iterator>(j);
+ ++p1;
+ }
+ m_free();
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(...)
+ {
+ p2 = (sub_match<iterator>*)(newref+1);
+ while(p2 != p1)
+ {
+ ::boost::re_detail::pointer_destroy(p2);
+ ++p2;
+ }
+ ::boost::re_detail::pointer_destroy(ref);
+ throw;
+ }
+#endif
+ ref = newref;
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(...)
+ {
+ ref->deallocate((char*)(void*)newref, sizeof(sub_match<iterator>) * n + sizeof(c_reference));
+ throw;
+ }
+#endif
+ }
+ else
+ {
+ cow();
+ // set iterators to be i, matched to false:
+ sub_match<iterator>* p1, *p2;
+ p1 = (sub_match<iterator>*)(ref+1);
+ p2 = p1 + ref->cmatches;
+ while(p1 != p2)
+ {
+ p1->first = j;
+ p1->second = j;
+ p1->matched = false;
+ ++p1;
+ }
+ }
+ ref->head.first = i;
+ ref->tail.second = j;
+ ref->head.matched = ref->tail.matched = true;
+ ref->null.first = ref->null.second = j;
+ ref->null.matched = false;
+}
+
+template <class iterator, class Allocator>
+inline void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::init_fail(iterator i, iterator j)
+{
+ set_size(ref->cmatches, i, j);
+}
+
+template <class iterator, class Allocator>
+void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::maybe_assign(const match_results_base<iterator, Allocator>& m)
+{
+ sub_match<iterator>* p1, *p2;
+ p1 = (sub_match<iterator>*)(ref+1);
+ p2 = (sub_match<iterator>*)(m.ref+1);
+ iterator base = (*this)[-1].first;
+ std::size_t len1 = 0;
+ std::size_t len2 = 0;
+ std::size_t base1 = 0;
+ std::size_t base2 = 0;
+ std::size_t i;
+ for(i = 0; i < ref->cmatches; ++i)
+ {
+ //
+ // leftmost takes priority over longest:
+ base1 = boost::re_detail::distance(base, p1->first);
+ base2 = boost::re_detail::distance(base, p2->first);
+ if(base1 < base2) return;
+ if(base2 < base1) break;
+
+ len1 = boost::re_detail::distance(p1->first, p1->second);
+ len2 = boost::re_detail::distance(p2->first, p2->second);
+ if((len1 != len2) || ((p1->matched == false) && (p2->matched == true)))
+ break;
+ if((p1->matched == true) && (p2->matched == false))
+ return;
+ ++p1;
+ ++p2;
+ }
+ if(i == ref->cmatches)
+ return;
+ if(base2 < base1)
+ *this = m;
+ else if((len2 > len1) || ((p1->matched == false) && (p2->matched == true)) )
+ *this = m;
+}
+
+template <class iterator, class Allocator>
+void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::cow()
+{
+ if(ref->count > 1)
+ {
+ c_reference* newref = (c_reference*)ref->allocate(sizeof(sub_match<iterator>) * ref->cmatches + sizeof(c_reference));
+ BOOST_REGEX_NOEH_ASSERT(newref)
+#ifndef BOOST_NO_EXCEPTIONS
+ try{
+#endif
+ new (newref) c_reference(*ref);
+ newref->count = 1;
+ sub_match<iterator>* p1 = (sub_match<iterator>*)(newref+1);
+ sub_match<iterator>* p2 = p1 + newref->cmatches;
+ sub_match<iterator>* p3 = (sub_match<iterator>*)(ref+1);
+#ifndef BOOST_NO_EXCEPTIONS
+ try{
+#endif
+ while(p1 != p2)
+ {
+ new (p1) sub_match<iterator>(*p3);
+ ++p1;
+ ++p3;
+ }
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(...)
+ {
+ p2 = (sub_match<iterator>*)(newref+1);
+ while(p2 != p1)
+ {
+ ::boost::re_detail::pointer_destroy(p2);
+ ++p2;
+ }
+ ::boost::re_detail::pointer_destroy(ref);
+ throw;
+ }
+#endif
+ --(ref->count);
+ ref = newref;
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(...)
+ {
+ ref->deallocate((char*)(void*)newref, sizeof(sub_match<iterator>) * ref->cmatches + sizeof(c_reference));
+ throw;
+ }
+#endif
+ }
+}
+
+} // namespace re_detail
+
+//
+// class match_results
+// encapsulates match_results_base, does a deep copy rather than
+// reference counting to ensure thread safety when copying
+// other match_results instances
+
+template <class iterator, class Allocator>
+class match_results : public re_detail::match_results_base<iterator, Allocator>
+{
+ typedef re_detail::match_results_base<iterator, Allocator> base_type;
+public:
+
+ typedef typename base_type::alloc_type alloc_type;
+ typedef typename base_type::size_type size_type;
+ typedef typename base_type::char_type char_type;
+ typedef typename base_type::value_type value_type;
+ typedef typename base_type::difference_type difference_type;
+ typedef typename base_type::iterator_type iterator_type;
+
+ explicit match_results(const Allocator& a = Allocator())
+ : re_detail::match_results_base<iterator, Allocator>(a){}
+
+ match_results(const re_detail::match_results_base<iterator, Allocator>& m)
+ : re_detail::match_results_base<iterator, Allocator>(m){}
+
+ match_results& operator=(const re_detail::match_results_base<iterator, Allocator>& m)
+ {
+ // shallow copy
+ base_type::operator=(m);
+ return *this;
+ }
+
+ match_results(const match_results& m);
+ match_results& operator=(const match_results& m);
+ //
+ // the following function definitions should *not* be required, except
+ // when this class is used as a template inside another template definition,
+ // in which members of the base class are not visible to the calling code.
+ // As a workaround we define simple forwarding functions:
+ //
+ size_type size()const
+ { return static_cast<const base_type*>(this)->size(); }
+
+ const sub_match<iterator>& operator[](int n) const
+ { return (*static_cast<const base_type*>(this))[n]; }
+
+ Allocator allocator()const
+ { return static_cast<const base_type*>(this)->allocator(); }
+
+ difference_type length(int sub = 0)const
+ { return static_cast<const base_type*>(this)->length(sub); }
+
+ difference_type position(unsigned int sub = 0)const
+ { return static_cast<const base_type*>(this)->position(sub); }
+
+ unsigned int line()const
+ { return static_cast<const base_type*>(this)->line(); }
+
+ iterator line_start()const
+ { return static_cast<const base_type*>(this)->line_start(); }
+
+ std::basic_string<char_type> str(int sub = 0)const
+ { return static_cast<const base_type*>(this)->str(sub); }
+
+ void swap(match_results& that)
+ { static_cast<base_type*>(this)->swap(that); }
+
+ bool operator==(const match_results& that)const
+ { return static_cast<const base_type&>(*this) == static_cast<const base_type&>(that); }
+
+ bool operator<(const match_results& that) const
+ { return position() < that.position(); }
+};
+
+template <class iterator, class Allocator>
+match_results<iterator, Allocator>::match_results(const match_results<iterator, Allocator>& m)
+ : re_detail::match_results_base<iterator, Allocator>(false)
+{
+ this->ref =
+ reinterpret_cast<typename re_detail::match_results_base<iterator, Allocator>::c_reference *>
+ (m.ref->allocate(sizeof(sub_match<iterator>) * m.ref->cmatches +
+ sizeof(typename re_detail::match_results_base<iterator, Allocator>::c_reference)));
+ BOOST_REGEX_NOEH_ASSERT(this->ref)
+#ifndef BOOST_NO_EXCEPTIONS
+ try{
+#endif
+ new (this->ref) typename re_detail::match_results_base<iterator, Allocator>::c_reference(*m.ref);
+ this->ref->count = 1;
+ sub_match<iterator>* p1 = (sub_match<iterator>*)(this->ref+1);
+ sub_match<iterator>* p2 = p1 + this->ref->cmatches;
+ sub_match<iterator>* p3 = (sub_match<iterator>*)(m.ref+1);
+#ifndef BOOST_NO_EXCEPTIONS
+ try{
+#endif
+ while(p1 != p2)
+ {
+ new (p1) sub_match<iterator>(*p3);
+ ++p1;
+ ++p3;
+ }
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(...)
+ {
+ p2 = (sub_match<iterator>*)(this->ref+1);
+ while(p2 != p1)
+ {
+ re_detail::pointer_destroy(p2);
+ ++p2;
+ }
+ re_detail::pointer_destroy(this->ref);
+ throw;
+ }
+ }
+ catch(...)
+ {
+ m.ref->deallocate((char*)(void*)this->ref, sizeof(sub_match<iterator>) * m.ref->cmatches + sizeof(typename re_detail::match_results_base<iterator, Allocator>::c_reference));
+ throw;
+ }
+#endif
+}
+
+template <class iterator, class Allocator>
+match_results<iterator, Allocator>& match_results<iterator, Allocator>::operator=(const match_results<iterator, Allocator>& m)
+{
+ match_results<iterator, Allocator> t(m);
+ this->swap(t);
+ return *this;
+}
+
+namespace re_detail{
+template <class iterator, class charT, class traits_type, class Allocator>
+iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
+ iterator last,
+ const re_set_long* set_,
+ const reg_expression<charT, traits_type, Allocator>& e);
+} // namepsace re_detail
+
+#ifdef __BORLANDC__
+ #pragma option pop
+#endif
+
+} // namespace boost
+
+#ifndef BOOST_REGEX_COMPILE_HPP
+#include <boost/regex/v3/regex_compile.hpp>
+#endif
+
+//
+// template instances:
+//
+#define BOOST_REGEX_CHAR_T char
+#ifdef BOOST_REGEX_NARROW_INSTANTIATE
+# define BOOST_REGEX_INSTANTIATE
+#endif
+#include <boost/regex/v3/instances.hpp>
+#undef BOOST_REGEX_CHAR_T
+#ifdef BOOST_REGEX_INSTANTIATE
+# undef BOOST_REGEX_INSTANTIATE
+#endif
+
+#ifndef BOOST_NO_WREGEX
+#define BOOST_REGEX_CHAR_T wchar_t
+#ifdef BOOST_REGEX_WIDE_INSTANTIATE
+# define BOOST_REGEX_INSTANTIATE
+#endif
+#include <boost/regex/v3/instances.hpp>
+#undef BOOST_REGEX_CHAR_T
+#ifdef BOOST_REGEX_INSTANTIATE
+# undef BOOST_REGEX_INSTANTIATE
+#endif
+#endif
+
+
+namespace boost{
+#ifdef BOOST_REGEX_NO_FWD
+typedef reg_expression<char, regex_traits<char>, BOOST_DEFAULT_ALLOCATOR(char)> regex;
+#ifndef BOOST_NO_WREGEX
+typedef reg_expression<wchar_t, regex_traits<wchar_t>, BOOST_DEFAULT_ALLOCATOR(wchar_t)> wregex;
+#endif
+#endif
+
+typedef match_results<const char*> cmatch;
+typedef match_results<std::string::const_iterator> smatch;
+#ifndef BOOST_NO_WREGEX
+typedef match_results<const wchar_t*> wcmatch;
+typedef match_results<std::wstring::const_iterator> wsmatch;
+#endif
+
+} // namespace boost
+#ifndef BOOST_REGEX_MATCH_HPP
+#include <boost/regex/v3/regex_match.hpp>
+#endif
+#ifndef BOOST_REGEX_FORMAT_HPP
+#include <boost/regex/v3/regex_format.hpp>
+#endif
+#ifndef BOOST_REGEX_SPLIT_HPP
+#include <boost/regex/v3/regex_split.hpp>
+#endif
+
+#endif // __cplusplus
+
+#endif // include
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+/*
+ *
+ * Copyright (c) 1998-2002
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_compile.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Declares reg_expression<> member functions. This is
+ * an internal header file, do not include directly.
+ */
+
+#ifndef BOOST_REGEX_COMPILE_HPP
+#define BOOST_REGEX_COMPILE_HPP
+
+namespace boost{
+#ifdef __BORLANDC__
+ #pragma option push -a8 -b -Vx -Ve -pc -w-8004
+#endif
+ namespace re_detail{
+
+
+template <class traits>
+struct kmp_translator
+{
+ typedef typename traits::char_type char_type;
+ bool icase;
+ const traits* pt;
+ kmp_translator(bool c, traits* p) : icase(c), pt(p) {}
+ char_type operator()(char_type c)
+ {
+ return pt->translate(c, icase);
+ }
+};
+
+
+template <class charT, class traits_type, class Allocator>
+bool BOOST_REGEX_CALL re_maybe_set_member(charT c,
+ const re_set_long* set_,
+ const reg_expression<charT, traits_type, Allocator>& e)
+{
+ const charT* p = reinterpret_cast<const charT*>(set_+1);
+ bool icase = e.flags() & regbase::icase;
+ charT col = e.get_traits().translate(c, icase);
+ for(unsigned int i = 0; i < set_->csingles; ++i)
+ {
+ if(col == *p)
+ return set_->isnot ? false : true;
+
+ while(*p)++p;
+ ++p; // skip null
+ }
+ return set_->isnot ? true : false;
+}
+
+} // namespace re_detail
+
+
+template <class charT, class traits, class Allocator>
+inline bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_wide_type&)
+{
+ if((traits_size_type)(traits_uchar_type)c >= 256)
+ return true;
+ return BOOST_REGEX_MAKE_BOOL(_map[(traits_uchar_type)c] & mask);
+}
+
+template <class charT, class traits, class Allocator>
+inline bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_narrow_type&)
+{
+ return BOOST_REGEX_MAKE_BOOL(_map[(traits_uchar_type)c] & mask);
+}
+
+template <class charT, class traits, class Allocator>
+reg_expression<charT, traits, Allocator>::reg_expression(const Allocator& a)
+ : regbase(), data(a), pkmp(0), error_code_(REG_EMPTY), _expression(0)
+{
+}
+
+template <class charT, class traits, class Allocator>
+reg_expression<charT, traits, Allocator>::reg_expression(const charT* p, flag_type f, const Allocator& a)
+ : data(a), pkmp(0), error_code_(REG_EMPTY), _expression(0)
+{
+ set_expression(p, f | regbase::use_except);
+}
+
+template <class charT, class traits, class Allocator>
+reg_expression<charT, traits, Allocator>::reg_expression(const charT* p1, const charT* p2, flag_type f, const Allocator& a)
+ : data(a), pkmp(0), error_code_(REG_EMPTY), _expression(0)
+{
+ set_expression(p1, p2, f | regbase::use_except);
+}
+
+template <class charT, class traits, class Allocator>
+reg_expression<charT, traits, Allocator>::reg_expression(const charT* p, size_type len, flag_type f, const Allocator& a)
+ : data(a), pkmp(0), error_code_(REG_EMPTY), _expression(0)
+{
+ set_expression(p, p + len, f | regbase::use_except);
+}
+
+template <class charT, class traits, class Allocator>
+reg_expression<charT, traits, Allocator>::reg_expression(const reg_expression<charT, traits, Allocator>& e)
+ : regbase(e), data(e.allocator()), pkmp(0), error_code_(REG_EMPTY), _expression(0)
+{
+ //
+ // we do a deep copy only if e is a valid expression, otherwise fail.
+ //
+ if(e.error_code() == 0)
+ {
+ const charT* pe = e.expression();
+ set_expression(pe, pe + e._expression_len, e.flags() | regbase::use_except);
+ }
+ else
+ {
+ _flags = e.flags() & ~(regbase::use_except);
+ fail(e.error_code());
+ }
+}
+
+template <class charT, class traits, class Allocator>
+reg_expression<charT, traits, Allocator>::~reg_expression()
+{
+ if(pkmp)
+ re_detail::kmp_free(pkmp, data.allocator());
+}
+
+template <class charT, class traits, class Allocator>
+reg_expression<charT, traits, Allocator>& BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::operator=(const reg_expression<charT, traits, Allocator>& e)
+{
+ //
+ // we do a deep copy only if e is a valid expression, otherwise fail.
+ //
+ if(this == &e) return *this;
+ _flags = use_except;
+ fail(e.error_code());
+ if(error_code() == 0)
+ set_expression(e._expression, e._expression + e._expression_len, e.flags() | regbase::use_except);
+ return *this;
+}
+
+template <class charT, class traits, class Allocator>
+inline bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::operator==(const reg_expression<charT, traits, Allocator>& e)const
+{
+ return (_flags == e.flags())
+ && (_expression_len == e._expression_len)
+ && (std::memcmp(_expression, e._expression, _expression_len * sizeof(charT)) == 0);
+}
+
+template <class charT, class traits, class Allocator>
+bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::operator<(const reg_expression<charT, traits, Allocator>& e)const
+{
+ //
+ // we can't offer a diffinitive ordering, but we can be consistant:
+ if(_flags != e.flags()) return _flags < e.flags();
+ if(_expression_len != e._expression_len) return _expression_len < e._expression_len;
+ return std::memcmp(expression(), e.expression(), _expression_len);
+}
+
+template <class charT, class traits, class Allocator>
+Allocator BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::allocator()const
+{
+ return data.allocator();
+}
+
+template <class charT, class traits, class Allocator>
+Allocator BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::get_allocator()const
+{
+ return data.allocator();
+}
+
+template <class charT, class traits, class Allocator>
+unsigned int BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::parse_inner_set(const charT*& first, const charT* last)
+{
+ //
+ // we have an inner [...] construct
+ //
+ jm_assert(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*first) == traits_type::syntax_open_set);
+ const charT* base = first;
+ while( (first != last)
+ && (traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*first) != traits_type::syntax_close_set) )
+ ++first;
+ if(first == last)
+ return 0;
+ ++first;
+ if((first-base) < 5)
+ return 0;
+ if(*(base+1) != *(first-2))
+ return 0;
+ unsigned int result = traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*(base+1));
+ if((result == traits_type::syntax_colon) && ((first-base) == 5))
+ {
+ return traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*(base+2));
+ }
+ return ((result == traits_type::syntax_colon) || (result == traits_type::syntax_dot) || (result == traits_type::syntax_equal)) ? result : 0;
+}
+
+
+template <class charT, class traits, class Allocator>
+bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::skip_space(const charT*& first, const charT* last)
+{
+ //
+ // returns true if we get to last:
+ //
+ while((first != last) && (traits_inst.is_class(*first, traits_type::char_class_space) == true))
+ {
+ ++first;
+ }
+ return first == last;
+}
+
+template <class charT, class traits, class Allocator>
+void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::parse_range(const charT*& ptr, const charT* end, unsigned& min, unsigned& max)
+{
+ //
+ // we have {x} or {x,} or {x,y} NB no spaces inside braces
+ // anything else is illegal
+ // On input ptr points to "{"
+ //
+ ++ptr;
+ if(skip_space(ptr, end))
+ {
+ fail(REG_EBRACE);
+ return;
+ }
+ if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*ptr) != traits_type::syntax_digit)
+ {
+ fail(REG_BADBR);
+ return;
+ }
+ min = traits_inst.toi(ptr, end, 10);
+ if(skip_space(ptr, end))
+ {
+ fail(REG_EBRACE);
+ return;
+ }
+ if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*ptr) == traits_type::syntax_comma)
+ {
+ //we have a second interval:
+ ++ptr;
+ if(skip_space(ptr, end))
+ {
+ fail(REG_EBRACE);
+ return;
+ }
+ if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*ptr) == traits_type::syntax_digit)
+ max = traits_inst.toi(ptr, end, 10);
+ else
+ max = (unsigned)-1;
+ }
+ else
+ max = min;
+
+ // validate input:
+ if(skip_space(ptr, end))
+ {
+ fail(REG_EBRACE);
+ return;
+ }
+ if(max < min)
+ {
+ fail(REG_ERANGE);
+ return;
+ }
+ if(_flags & bk_braces)
+ {
+ if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*ptr) != traits_type::syntax_slash)
+ {
+ fail(REG_BADBR);
+ return;
+ }
+ else
+ {
+ // back\ is OK now check the }
+ ++ptr;
+ if((ptr == end) || (traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*ptr) != traits_type::syntax_close_brace))
+ {
+ fail(REG_BADBR);
+ return;
+ }
+ }
+ }
+ else if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*ptr) != traits_type::syntax_close_brace)
+ {
+ fail(REG_BADBR);
+ return;
+ }
+}
+
+template <class charT, class traits, class Allocator>
+charT BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::parse_escape(const charT*& first, const charT* last)
+{
+ charT c(*first);
+ traits_size_type c_unsigned = (traits_size_type)(traits_uchar_type)*first;
+ // this is only used for the switch(), but cannot be folded in
+ // due to a bug in Comeau 4.2.44beta3
+ traits_size_type syntax = traits_inst.syntax_type(c_unsigned);
+ switch(syntax)
+ {
+ case traits_type::syntax_a:
+ c = '\a';
+ ++first;
+ break;
+ case traits_type::syntax_f:
+ c = '\f';
+ ++first;
+ break;
+ case traits_type::syntax_n:
+ c = '\n';
+ ++first;
+ break;
+ case traits_type::syntax_r:
+ c = '\r';
+ ++first;
+ break;
+ case traits_type::syntax_t:
+ c = '\t';
+ ++first;
+ break;
+ case traits_type::syntax_v:
+ c = '\v';
+ ++first;
+ break;
+ case traits_type::syntax_x:
+ ++first;
+ if(first == last)
+ {
+ fail(REG_EESCAPE);
+ break;
+ }
+ // maybe have \x{ddd}
+ if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*first)) == traits_type::syntax_open_brace)
+ {
+ ++first;
+ if(first == last)
+ {
+ fail(REG_EESCAPE);
+ break;
+ }
+ if(traits_inst.is_class(*first, traits_type::char_class_xdigit) == false)
+ {
+ fail(REG_BADBR);
+ break;
+ }
+ c = (charT)traits_inst.toi(first, last, -16);
+ if((first == last) || (traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*first)) != traits_type::syntax_close_brace))
+ {
+ fail(REG_BADBR);
+ }
+ ++first;
+ break;
+ }
+ else
+ {
+ if(traits_inst.is_class(*first, traits_type::char_class_xdigit) == false)
+ {
+ fail(REG_BADBR);
+ break;
+ }
+ c = (charT)traits_inst.toi(first, last, -16);
+ }
+ break;
+ case traits_type::syntax_c:
+ ++first;
+ if(first == last)
+ {
+ fail(REG_EESCAPE);
+ break;
+ }
+ if(((traits_uchar_type)(*first) < (traits_uchar_type)'@')
+ || ((traits_uchar_type)(*first) > (traits_uchar_type)127) )
+ {
+ fail(REG_EESCAPE);
+ return (charT)0;
+ }
+ c = (charT)((traits_uchar_type)(*first) - (traits_uchar_type)'@');
+ ++first;
+ break;
+ case traits_type::syntax_e:
+ c = (charT)27;
+ ++first;
+ break;
+ case traits_type::syntax_digit:
+ c = (charT)traits_inst.toi(first, last, -8);
+ break;
+ default:
+ //c = *first;
+ ++first;
+ }
+ return c;
+}
+
+template <class charT, class traits, class Allocator>
+void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_maps()
+{
+ re_detail::re_syntax_base* record = static_cast<re_detail::re_syntax_base*>(data.data());
+ // always compile the first _map:
+ std::memset(startmap, 0, 256);
+ record->can_be_null = 0;
+ compile_map(record, startmap, 0, re_detail::mask_all);
+
+ while(record->type != re_detail::syntax_element_match)
+ {
+ if((record->type == re_detail::syntax_element_alt) || (record->type == re_detail::syntax_element_rep))
+ {
+ std::memset(&(static_cast<re_detail::re_jump*>(record)->_map), 0, 256);
+ record->can_be_null = 0;
+ compile_map(record->next.p, static_cast<re_detail::re_jump*>(record)->_map, &(record->can_be_null), re_detail::mask_take, static_cast<re_detail::re_jump*>(record)->alt.p);
+ compile_map(static_cast<re_detail::re_jump*>(record)->alt.p, static_cast<re_detail::re_jump*>(record)->_map, &(record->can_be_null), re_detail::mask_skip);
+ if(record->type == re_detail::syntax_element_rep)
+ {
+ re_detail::re_repeat* rep = static_cast<re_detail::re_repeat*>(record);
+ // set whether this is a singleton repeat or not:
+ if(rep->next.p->next.p->next.p == rep->alt.p)
+ {
+ rep->singleton = true;
+ }
+ else
+ rep->singleton = false;
+ }
+ }
+ else
+ {
+ record->can_be_null = 0;
+ compile_map(record, 0, &(record->can_be_null), re_detail::mask_all);
+ }
+ record = record->next.p;
+ }
+ record->can_be_null = re_detail::mask_all;
+}
+
+template <class charT, class traits, class Allocator>
+bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::probe_start(
+ re_detail::re_syntax_base* node, charT cc, re_detail::re_syntax_base* terminal) const
+{
+ unsigned int c;
+
+ switch(node->type)
+ {
+ case re_detail::syntax_element_startmark:
+ if(static_cast<const re_detail::re_brace*>(node)->index == -1)
+ {
+ return probe_start(node->next.p->next.p, cc, terminal)
+ && probe_start(static_cast<const re_detail::re_jump*>(node->next.p)->alt.p, cc, terminal);
+ }
+ // fall through:
+ case re_detail::syntax_element_endmark:
+ case re_detail::syntax_element_start_line:
+ case re_detail::syntax_element_word_boundary:
+ case re_detail::syntax_element_buffer_start:
+ case re_detail::syntax_element_restart_continue:
+ // doesn't tell us anything about the next character, so:
+ return probe_start(node->next.p, cc, terminal);
+ case re_detail::syntax_element_literal:
+ // only the first character of the literal can match:
+ // note these have already been translated:
+ if(*reinterpret_cast<charT*>(static_cast<re_detail::re_literal*>(node)+1) == traits_inst.translate(cc, (_flags & regbase::icase)))
+ return true;
+ return false;
+ case re_detail::syntax_element_end_line:
+ // next character (if there is one!) must be a newline:
+ if(traits_inst.is_separator(traits_inst.translate(cc, (_flags & regbase::icase))))
+ return true;
+ return false;
+ case re_detail::syntax_element_wild:
+ return true;
+ case re_detail::syntax_element_match:
+ return true;
+ case re_detail::syntax_element_within_word:
+ case re_detail::syntax_element_word_start:
+ return traits_inst.is_class(traits_inst.translate(cc, (_flags & regbase::icase)), traits_type::char_class_word);
+ case re_detail::syntax_element_word_end:
+ // what follows must not be a word character,
+ return traits_inst.is_class(traits_inst.translate(cc, (_flags & regbase::icase)), traits_type::char_class_word) ? false : true;
+ case re_detail::syntax_element_buffer_end:
+ // we can be null, nothing must follow,
+ // NB we assume that this is followed by
+ // re_detail::syntax_element_match, if its not then we can
+ // never match anything anyway!!
+ return false;
+ case re_detail::syntax_element_soft_buffer_end:
+ // we can be null, only newlines must follow,
+ // NB we assume that this is followed by
+ // re_detail::syntax_element_match, if its not then we can
+ // never match anything anyway!!
+ return traits_inst.is_separator(traits_inst.translate(cc, (_flags & regbase::icase)));
+ case re_detail::syntax_element_backref:
+ // there's no easy way to determine this
+ // which is not to say it can't be done!
+ // for now:
+ return true;
+ case re_detail::syntax_element_long_set:
+ // we can not be null,
+ // we need to add already translated values in the set
+ // to values in the _map
+ return re_detail::re_maybe_set_member(cc, static_cast<const re_detail::re_set_long*>(node), *this) || (re_detail::re_is_set_member(static_cast<const charT*>(&cc), static_cast<const charT*>(&cc+1), static_cast<re_detail::re_set_long*>(node), *this) != &cc);
+ case re_detail::syntax_element_set:
+ // set all the elements that are set in corresponding set:
+ c = (traits_size_type)(traits_uchar_type)traits_inst.translate(cc, (_flags & regbase::icase));
+ return static_cast<re_detail::re_set*>(node)->_map[c] != 0;
+ case re_detail::syntax_element_jump:
+ if(static_cast<re_detail::re_jump*>(node)->alt.p < node)
+ {
+ // backwards jump,
+ // caused only by end of repeat section, we'll treat this
+ // the same as a match, because the sub-expression has matched.
+ if(node->next.p == terminal)
+ return true; // null repeat - we can always take this
+ else
+ {
+ //
+ // take the jump, add in fix for the fact that if the
+ // repeat that we're jumping to has non-zero minimum count
+ // then we need to add in the possiblity that we could still
+ // skip that repeat.
+ re_detail::re_syntax_base* next = static_cast<re_detail::re_jump*>(node)->alt.p;
+ bool b = probe_start(next, cc, terminal);
+ if((next->type == re_detail::syntax_element_rep) && (static_cast<re_detail::re_repeat*>(next)->min != 0))
+ {
+ b = b || probe_start(static_cast<re_detail::re_jump*>(next)->alt.p, cc, terminal);
+ }
+ return b;
+ }
+ }
+ else
+ // take the jump and compile:
+ return probe_start(static_cast<re_detail::re_jump*>(node)->alt.p, cc, terminal);
+ case re_detail::syntax_element_alt:
+ // we need to take the OR of the two alternatives:
+ return probe_start(static_cast<re_detail::re_jump*>(node)->alt.p, cc, terminal) || probe_start(node->next.p, cc, terminal);
+ case re_detail::syntax_element_rep:
+ // we need to take the OR of the two alternatives
+ if(static_cast<re_detail::re_repeat*>(node)->min == 0)
+ return probe_start(node->next.p, cc, static_cast<re_detail::re_jump*>(node)->alt.p) || probe_start(static_cast<re_detail::re_jump*>(node)->alt.p, cc, terminal);
+ else
+ return probe_start(node->next.p, cc, static_cast<re_detail::re_jump*>(node)->alt.p);
+ case re_detail::syntax_element_combining:
+ return !traits_inst.is_combining(traits_inst.translate(cc, (_flags & regbase::icase)));
+ }
+ return false;
+}
+
+template <class charT, class traits, class Allocator>
+bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::probe_start_null(re_detail::re_syntax_base* node, re_detail::re_syntax_base* terminal)const
+{
+ switch(node->type)
+ {
+ case re_detail::syntax_element_startmark:
+ case re_detail::syntax_element_endmark:
+ case re_detail::syntax_element_start_line:
+ case re_detail::syntax_element_word_boundary:
+ case re_detail::syntax_element_buffer_start:
+ case re_detail::syntax_element_restart_continue:
+ case re_detail::syntax_element_end_line:
+ case re_detail::syntax_element_word_end:
+ // doesn't tell us anything about the next character, so:
+ return probe_start_null(node->next.p, terminal);
+ case re_detail::syntax_element_match:
+ case re_detail::syntax_element_buffer_end:
+ case re_detail::syntax_element_soft_buffer_end:
+ case re_detail::syntax_element_backref:
+ return true;
+ case re_detail::syntax_element_jump:
+ if(static_cast<re_detail::re_jump*>(node)->alt.p < node)
+ {
+ // backwards jump,
+ // caused only by end of repeat section, we'll treat this
+ // the same as a match, because the sub-expression has matched.
+ // this is only caused by NULL repeats as in "(a*)*" or "(\<)*"
+ // these are really nonsensence and make the matching code much
+ // harder, it would be nice to get rid of them altogether.
+ if(node->next.p == terminal)
+ return true;
+ else
+ return probe_start_null(static_cast<re_detail::re_jump*>(node)->alt.p, terminal);
+ }
+ else
+ // take the jump and compile:
+ return probe_start_null(static_cast<re_detail::re_jump*>(node)->alt.p, terminal);
+ case re_detail::syntax_element_alt:
+ // we need to take the OR of the two alternatives:
+ return probe_start_null(static_cast<re_detail::re_jump*>(node)->alt.p, terminal) || probe_start_null(node->next.p, terminal);
+ case re_detail::syntax_element_rep:
+ // only need to consider skipping the repeat:
+ return probe_start_null(static_cast<re_detail::re_jump*>(node)->alt.p, terminal);
+ default:
+ break;
+ }
+ return false;
+}
+
+template <class charT, class traits, class Allocator>
+void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_map(
+ re_detail::re_syntax_base* node, unsigned char* _map,
+ unsigned int* pnull, unsigned char mask, re_detail::re_syntax_base* terminal)const
+{
+ if(_map)
+ {
+ for(unsigned int i = 0; i < 256; ++i)
+ {
+ if(probe_start(node, (charT)i, terminal))
+ _map[i] |= mask;
+ }
+ }
+ if(pnull && probe_start_null(node, terminal))
+ *pnull |= mask;
+}
+
+template <class charT, class traits, class Allocator>
+void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::move_offsets(re_detail::re_syntax_base* j, unsigned size)
+{
+# ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4127)
+#endif
+ // move all offsets starting with j->link forward by size
+ // called after an insert:
+ j = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<char*>(data.data()) + j->next.i);
+ while(true)
+ {
+ switch(j->type)
+ {
+ case re_detail::syntax_element_rep:
+ static_cast<re_detail::re_jump*>(j)->alt.i += size;
+ j->next.i += size;
+ break;
+ case re_detail::syntax_element_jump:
+ case re_detail::syntax_element_alt:
+ static_cast<re_detail::re_jump*>(j)->alt.i += size;
+ j->next.i += size;
+ break;
+ default:
+ j->next.i += size;
+ break;
+ }
+ if(j->next.i == size)
+ break;
+ j = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<char*>(data.data()) + j->next.i);
+ }
+# ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+}
+
+template <class charT, class traits, class Allocator>
+re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_set_simple(re_detail::re_syntax_base* dat, unsigned long cls, bool isnot)
+{
+ typedef typename re_detail::is_byte<charT>::width_type width_type;
+ re_detail::jstack<traits_string_type, Allocator> singles(64, data.allocator());
+ re_detail::jstack<traits_string_type, Allocator> ranges(64, data.allocator());
+ re_detail::jstack<boost::uint_fast32_t, Allocator> classes(64, data.allocator());
+ re_detail::jstack<traits_string_type, Allocator> equivalents(64, data.allocator());
+ classes.push(cls);
+ if(dat)
+ {
+ data.align();
+ dat->next.i = data.size();
+ }
+ return compile_set_aux(singles, ranges, classes, equivalents, isnot, width_type());
+}
+
+template <class charT, class traits, class Allocator>
+re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_set(const charT*& first, const charT* last)
+{
+ re_detail::jstack<traits_string_type, Allocator> singles(64, data.allocator());
+ re_detail::jstack<traits_string_type, Allocator> ranges(64, data.allocator());
+ re_detail::jstack<boost::uint_fast32_t, Allocator> classes(64, data.allocator());
+ re_detail::jstack<traits_string_type, Allocator> equivalents(64, data.allocator());
+ bool has_digraphs = false;
+ jm_assert(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*first) == traits_type::syntax_open_set);
+ ++first;
+ bool started = false;
+ bool done = false;
+ bool isnot = false;
+
+ enum last_type
+ {
+ last_single,
+ last_none,
+ last_dash
+ };
+
+ unsigned l = last_none;
+ traits_string_type s;
+
+ while((first != last) && !done)
+ {
+ traits_size_type c = (traits_size_type)(traits_uchar_type)*first;
+ // this is only used for the switch(), but cannot be folded in
+ // due to a bug in Comeau 4.2.44beta3
+ traits_size_type syntax = traits_inst.syntax_type(c);
+ switch(syntax)
+ {
+ case traits_type::syntax_caret:
+ if(!started && !isnot)
+ {
+ isnot = true;
+ }
+ else
+ {
+ s = (charT)c;
+ goto char_set_literal;
+ }
+ break;
+ case traits_type::syntax_open_set:
+ {
+ if((_flags & char_classes) == 0)
+ {
+ s = (charT)c;
+ goto char_set_literal;
+ }
+ // check to see if we really have a class:
+ const charT* base = first;
+ // this is only used for the switch(), but cannot be folded in
+ // due to a bug in Comeau 4.2.44beta3
+ unsigned int inner_set = parse_inner_set(first, last);
+ switch(inner_set)
+ {
+ case traits_type::syntax_colon:
+ {
+ if(l == last_dash)
+ {
+ fail(REG_ERANGE);
+ return 0;
+ }
+ boost::uint_fast32_t id = traits_inst.lookup_classname(base+2, first-2);
+ if(_flags & regbase::icase)
+ {
+ if((id == traits_type::char_class_upper) || (id == traits_type::char_class_lower))
+ {
+ id = traits_type::char_class_alpha;
+ }
+ }
+ if(id == 0)
+ {
+ fail(REG_ECTYPE);
+ return 0;
+ }
+ classes.push(id);
+ started = true;
+ l = last_none;
+ }
+ break;
+ case traits_type::syntax_dot:
+ //
+ // we have a collating element [.collating-name.]
+ //
+ if(traits_inst.lookup_collatename(s, base+2, first-2))
+ {
+ --first;
+ if(s.size() > 1)
+ has_digraphs = true;
+ if(s.size())goto char_set_literal;
+ }
+ fail(REG_ECOLLATE);
+ return 0;
+ case traits_type::syntax_equal:
+ //
+ // we have an equivalence class [=collating-name=]
+ //
+ if(traits_inst.lookup_collatename(s, base+2, first-2))
+ {
+ std::size_t len = s.size();
+ if(len)
+ {
+ unsigned i = 0;
+ while(i < len)
+ {
+ s[i] = traits_inst.translate(s[i], (_flags & regbase::icase));
+ ++i;
+ }
+ traits_string_type s2;
+ traits_inst.transform_primary(s2, s);
+ equivalents.push(s2);
+ started = true;
+ l = last_none;
+ break;
+ }
+ }
+ fail(REG_ECOLLATE);
+ return 0;
+ case traits_type::syntax_left_word:
+ if((started == false) && (traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*first) == traits_type::syntax_close_set))
+ {
+ ++first;
+ return add_simple(0, re_detail::syntax_element_word_start);
+ }
+ fail(REG_EBRACK);
+ return 0;
+ case traits_type::syntax_right_word:
+ if((started == false) && (traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*first) == traits_type::syntax_close_set))
+ {
+ ++first;
+ return add_simple(0, re_detail::syntax_element_word_end);
+ }
+ fail(REG_EBRACK);
+ return 0;
+ default:
+ if(started == false)
+ {
+ unsigned int t = traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*(base+1));
+ if((t != traits_type::syntax_colon) && (t != traits_type::syntax_dot) && (t != traits_type::syntax_equal))
+ {
+ first = base;
+ s = (charT)c;
+ goto char_set_literal;
+ }
+ }
+ fail(REG_EBRACK);
+ return 0;
+ }
+ if(first == last)
+ {
+ fail(REG_EBRACK);
+ return 0;
+ }
+ continue;
+ }
+ case traits_type::syntax_close_set:
+ if(started == false)
+ {
+ s = (charT)c;
+ goto char_set_literal;
+ }
+ done = true;
+ break;
+ case traits_type::syntax_dash:
+ if(!started)
+ {
+ s = (charT)c;
+ goto char_set_literal;
+ }
+ ++first;
+ if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*first) == traits_type::syntax_close_set)
+ {
+ --first;
+ s = (charT)c;
+ goto char_set_literal;
+ }
+ if((singles.empty() == true) || (l != last_single))
+ {
+ fail(REG_ERANGE);
+ return 0;
+ }
+ ranges.push(singles.peek());
+ if(singles.peek().size() <= 1) // leave digraphs and ligatures in place
+ singles.pop();
+ l = last_dash;
+ continue;
+ case traits_type::syntax_slash:
+ if(_flags & regbase::escape_in_lists)
+ {
+ ++first;
+ if(first == last)
+ continue;
+ traits_size_type c = (traits_size_type)(traits_uchar_type)*first;
+ // this is only used for the switch(), but cannot be folded in
+ // due to a bug in Comeau 4.2.44beta3
+ traits_size_type syntax = traits_inst.syntax_type(c);
+ switch(syntax)
+ {
+ case traits_type::syntax_w:
+ if(l == last_dash)
+ {
+ fail(REG_ERANGE);
+ return 0;
+ }
+ classes.push(traits_type::char_class_word);
+ started = true;
+ l = last_none;
+ ++first;
+ continue;
+ case traits_type::syntax_d:
+ if(l == last_dash)
+ {
+ fail(REG_ERANGE);
+ return 0;
+ }
+ classes.push(traits_type::char_class_digit);
+ started = true;
+ l = last_none;
+ ++first;
+ continue;
+ case traits_type::syntax_s:
+ if(l == last_dash)
+ {
+ fail(REG_ERANGE);
+ return 0;
+ }
+ classes.push(traits_type::char_class_space);
+ started = true;
+ l = last_none;
+ ++first;
+ continue;
+ case traits_type::syntax_l:
+ if(l == last_dash)
+ {
+ fail(REG_ERANGE);
+ return 0;
+ }
+ classes.push(traits_type::char_class_lower);
+ started = true;
+ l = last_none;
+ ++first;
+ continue;
+ case traits_type::syntax_u:
+ if(l == last_dash)
+ {
+ fail(REG_ERANGE);
+ return 0;
+ }
+ classes.push(traits_type::char_class_upper);
+ started = true;
+ l = last_none;
+ ++first;
+ continue;
+ case traits_type::syntax_W:
+ case traits_type::syntax_D:
+ case traits_type::syntax_S:
+ case traits_type::syntax_U:
+ case traits_type::syntax_L:
+ fail(REG_EESCAPE);
+ return 0;
+ default:
+ c = parse_escape(first, last);
+ --first;
+ s = (charT)c;
+ goto char_set_literal;
+ }
+ }
+ else
+ {
+ s = (charT)c;
+ goto char_set_literal;
+ }
+ default:
+ s = (charT)c;
+ char_set_literal:
+ unsigned i = 0;
+ // get string length to stop us going past the end of string (DWA)
+ std::size_t len = s.size();
+ while(i < len)
+ {
+ s[i] = traits_inst.translate(s[i], (_flags & regbase::icase));
+ ++i;
+ }
+ started = true;
+ if(l == last_dash)
+ {
+ ranges.push(s);
+ l = last_none;
+ if(s.size() > 1) // add ligatures to singles list as well
+ singles.push(s);
+ }
+ else
+ {
+ singles.push(s);
+ l = last_single;
+ }
+ }
+ ++first;
+ }
+ if(!done)
+ return 0;
+
+ typedef typename re_detail::is_byte<charT>::width_type width_type;
+
+ re_detail::re_syntax_base* result;
+ if(has_digraphs)
+ result = compile_set_aux(singles, ranges, classes, equivalents, isnot, re_detail::_wide_type());
+ else
+ result = compile_set_aux(singles, ranges, classes, equivalents, isnot, width_type());
+ #ifdef __BORLANDC__
+ // delayed throw:
+ if((result == 0) && (_flags & regbase::use_except))
+ fail(error_code());
+ #endif
+ return result;
+}
+
+template <class charT, class traits, class Allocator>
+re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_wide_type&)
+{
+ size_type base = data.size();
+ data.extend(sizeof(re_detail::re_set_long));
+ unsigned int csingles = 0;
+ unsigned int cranges = 0;
+ boost::uint_fast32_t cclasses = 0;
+ unsigned int cequivalents = 0;
+ bool nocollate_state = flags() & regbase::nocollate;
+
+ while(singles.empty() == false)
+ {
+ ++csingles;
+ const traits_string_type& s = singles.peek();
+ std::size_t len = (s.size() + 1) * sizeof(charT);
+ std::memcpy(reinterpret_cast<charT*>(data.extend(len)), s.c_str(), len);
+ singles.pop();
+ }
+ while(ranges.empty() == false)
+ {
+ traits_string_type c1, c2;
+ if(nocollate_state)
+ c1 = ranges.peek();
+ else
+ traits_inst.transform(c1, ranges.peek());
+ ranges.pop();
+ if(nocollate_state)
+ c2 = ranges.peek();
+ else
+ traits_inst.transform(c2, ranges.peek());
+ ranges.pop();
+ if(c1 < c2)
+ {
+ // for some reason bc5 crashes when throwing exceptions
+ // from here - probably an EH-compiler bug, but hard to
+ // be sure...
+ // delay throw to later:
+ #ifdef __BORLANDC__
+ boost::uint_fast32_t f = _flags;
+ _flags &= ~regbase::use_except;
+ #endif
+ fail(REG_ERANGE);
+ #ifdef __BORLANDC__
+ _flags = f;
+ #endif
+ return 0;
+ }
+ ++cranges;
+ std::size_t len = (re_detail::re_strlen(c1.c_str()) + 1) * sizeof(charT);
+ std::memcpy(data.extend(len), c1.c_str(), len);
+ len = (re_detail::re_strlen(c2.c_str()) + 1) * sizeof(charT);
+ std::memcpy(data.extend(len), c2.c_str(), len);
+ }
+ while(classes.empty() == false)
+ {
+ cclasses |= classes.peek();
+ classes.pop();
+ }
+ while(equivalents.empty() == false)
+ {
+ ++cequivalents;
+ const traits_string_type& s = equivalents.peek();
+ std::size_t len = (re_detail::re_strlen(s.c_str()) + 1) * sizeof(charT);
+ std::memcpy(reinterpret_cast<charT*>(data.extend(len)), s.c_str(), len);
+ equivalents.pop();
+ }
+
+ re_detail::re_set_long* dat = reinterpret_cast<re_detail::re_set_long*>(reinterpret_cast<unsigned char*>(data.data()) + base);
+ dat->type = re_detail::syntax_element_long_set;
+ dat->csingles = csingles;
+ dat->cranges = cranges;
+ dat->cclasses = cclasses;
+ dat->cequivalents = cequivalents;
+ dat->isnot = isnot;
+ dat->next.i = 0;
+ return dat;
+}
+
+template <class charT, class traits, class Allocator>
+re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_narrow_type&)
+{
+ re_detail::re_set* dat = reinterpret_cast<re_detail::re_set*>(data.extend(sizeof(re_detail::re_set)));
+ std::memset(dat, 0, sizeof(re_detail::re_set));
+
+ while(singles.empty() == false)
+ {
+ dat->_map[(traits_size_type)(traits_uchar_type)*(singles.peek().c_str())] = re_detail::mask_all;
+ singles.pop();
+ }
+ while(ranges.empty() == false)
+ {
+ traits_string_type c1, c2, c3, c4;
+
+ if(flags() & regbase::nocollate)
+ c1 = ranges.peek();
+ else
+ traits_inst.transform(c1, ranges.peek());
+ ranges.pop();
+ if(flags() & regbase::nocollate)
+ c2 = ranges.peek();
+ else
+ traits_inst.transform(c2, ranges.peek());
+ ranges.pop();
+
+ if(c1 < c2)
+ {
+ // for some reason bc5 crashes when throwing exceptions
+ // from here - probably an EH-compiler bug, but hard to
+ // be sure...
+ // delay throw to later:
+ #ifdef __BORLANDC__
+ boost::uint_fast32_t f = _flags;
+ _flags &= ~regbase::use_except;
+ #endif
+ fail(REG_ERANGE);
+ #ifdef __BORLANDC__
+ _flags = f;
+ #endif
+ return 0;
+ }
+ for(unsigned int i = 0; i < 256; ++i)
+ {
+ c4 = (charT)i;
+ if(flags() & regbase::nocollate)
+ c3 = c4;
+ else
+ traits_inst.transform(c3, c4);
+ if((c3 <= c1) && (c3 >= c2))
+ dat->_map[i] = re_detail::mask_all;
+ }
+ }
+ while(equivalents.empty() == false)
+ {
+ traits_string_type c1, c2;
+ for(unsigned int i = 0; i < 256; ++i)
+ {
+ c2 = (charT)i;
+ traits_inst.transform_primary(c1, c2);
+ if(c1 == equivalents.peek())
+ dat->_map[i] = re_detail::mask_all;
+ }
+ equivalents.pop();
+ }
+
+ boost::uint_fast32_t flags = 0;
+ while(classes.empty() == false)
+ {
+ flags |= classes.peek();
+ classes.pop();
+ }
+ if(flags)
+ {
+ for(unsigned int i = 0; i < 256; ++i)
+ {
+ if(traits_inst.is_class(charT(i), flags))
+ dat->_map[(traits_uchar_type)traits_inst.translate((charT)i, (_flags & regbase::icase))] = re_detail::mask_all;
+ }
+ }
+
+ if(isnot)
+ {
+ for(unsigned int i = 0; i < 256; ++i)
+ {
+ dat->_map[i] = !dat->_map[i];
+ }
+ }
+
+ dat->type = re_detail::syntax_element_set;
+ dat->next.i = 0;
+ return dat;
+}
+
+#ifndef __CODEGUARD__
+// this must not be inline when Borland's codeguard support is turned
+// on, otherwise we _will_ get surious codeguard errors...
+inline
+#endif
+ re_detail::re_syntax_base* add_offset(void* base, std::ptrdiff_t off)
+{
+ return reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<char*>(base) + off);
+}
+
+
+template <class charT, class traits, class Allocator>
+void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::fixup_apply(re_detail::re_syntax_base* b, unsigned cbraces)
+{
+ typedef typename boost::detail::rebind_allocator<bool, Allocator>::type b_alloc;
+
+ register unsigned char* base = reinterpret_cast<unsigned char*>(b);
+ register re_detail::re_syntax_base* ptr = b;
+ bool* pb = 0;
+ b_alloc a(data.allocator());
+#ifndef BOOST_NO_EXCEPTIONS
+ try
+ {
+#endif
+ pb = a.allocate(cbraces);
+ BOOST_REGEX_NOEH_ASSERT(pb)
+ for(unsigned i = 0; i < cbraces; ++i)
+ pb[i] = false;
+
+ repeats = 0;
+
+ while(ptr->next.i)
+ {
+ switch(ptr->type)
+ {
+ case re_detail::syntax_element_rep:
+ jm_assert(data.size() > static_cast<re_detail::re_jump*>(ptr)->alt.i);
+ static_cast<re_detail::re_jump*>(ptr)->alt.p = add_offset(base, static_cast<re_detail::re_jump*>(ptr)->alt.i);
+#ifdef BOOST_REGEX_DEBUG
+ if((re_detail::padding_mask & reinterpret_cast<int>(static_cast<re_detail::re_jump*>(ptr)->alt.p)) && (static_cast<re_detail::re_jump*>(ptr)->alt.p != b))
+ {
+ jm_trace("padding mis-aligment in repeat jump to object type: " << static_cast<re_detail::re_jump*>(ptr)->alt.p->type)
+ //jm_assert(0 == (padding_mask & (int)((re_detail::re_jump*)ptr)->alt.p));
+ }
+#endif
+ static_cast<re_detail::re_repeat*>(ptr)->id = repeats;
+ ++repeats;
+ goto rebase;
+ case re_detail::syntax_element_jump:
+ case re_detail::syntax_element_alt:
+ jm_assert(data.size() > static_cast<re_detail::re_jump*>(ptr)->alt.i);
+ static_cast<re_detail::re_jump*>(ptr)->alt.p = add_offset(base, static_cast<re_detail::re_jump*>(ptr)->alt.i);
+#ifdef BOOST_REGEX_DEBUG
+ if((re_detail::padding_mask & reinterpret_cast<int>(static_cast<re_detail::re_jump*>(ptr)->alt.p) && (static_cast<re_detail::re_jump*>(ptr)->alt.p != b)))
+ {
+ jm_trace("padding mis-aligment in alternation jump to object type: " << static_cast<re_detail::re_jump*>(ptr)->alt.p->type)
+ //jm_assert(0 == (padding_mask & (int)((re_detail::re_jump*)ptr)->alt.p));
+ }
+#endif
+ goto rebase;
+ case re_detail::syntax_element_backref:
+ if((static_cast<re_detail::re_brace*>(ptr)->index >= (int)cbraces) || (pb[static_cast<re_detail::re_brace*>(ptr)->index] == false) )
+ {
+ fail(REG_ESUBREG);
+ a.deallocate(pb, cbraces);
+ return;
+ }
+ goto rebase;
+ case re_detail::syntax_element_endmark:
+ if(static_cast<re_detail::re_brace*>(ptr)->index > 0)
+ pb[static_cast<re_detail::re_brace*>(ptr)->index] = true;
+ goto rebase;
+ default:
+ rebase:
+ jm_assert(data.size() > ptr->next.i);
+ ptr->next.p = add_offset(base, ptr->next.i);
+#ifdef BOOST_REGEX_DEBUG
+ if((re_detail::padding_mask & (int)(ptr->next.p)) && (static_cast<re_detail::re_jump*>(ptr)->alt.p != b))
+ {
+ jm_trace("padding mis-alignment in next record of type " << ptr->next.p->type)
+ jm_assert(0 == (re_detail::padding_mask & (int)(ptr->next.p)));
+ }
+#endif
+ ptr = ptr->next.p;
+ }
+ }
+ a.deallocate(pb, cbraces);
+ pb = 0;
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(...)
+ {
+ if(pb)
+ a.deallocate(pb, cbraces);
+ throw;
+ }
+#endif
+}
+
+
+template <class charT, class traits, class Allocator>
+unsigned int BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::set_expression(const charT* p, const charT* end, flag_type f)
+{
+# ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4127)
+#endif
+#ifdef __OpenBSD__
+ // strxfrm not working on OpenBSD??
+ f |= regbase::nocollate;
+#endif
+
+ if(p == expression())
+ {
+ traits_string_type s(p, end);
+ return set_expression(s.c_str(), s.c_str() + s.size(), f);
+ }
+ typedef typename traits_type::sentry sentry_t;
+ sentry_t sent(traits_inst);
+ if(sent){
+
+ const charT* base = p;
+ data.clear();
+ _flags = f;
+ fail(REG_NOERROR); // clear any error
+
+ if(p >= end)
+ {
+ fail(REG_EMPTY);
+ return error_code();
+ }
+
+ const charT* ptr = p;
+ marks = 0;
+ re_detail::jstack<std::size_t, Allocator> mark(64, data.allocator());
+ re_detail::jstack<int, Allocator> markid(64, data.allocator());
+ std::size_t last_mark_popped = 0;
+ register traits_size_type c;
+ register re_detail::re_syntax_base* dat;
+
+ unsigned rep_min = 0;
+ unsigned rep_max = 0;
+
+ //
+ // set up header:
+ //
+ ++marks;
+ dat = 0;
+
+ if(_flags & regbase::literal)
+ {
+ while(ptr != end)
+ {
+ dat = add_literal(dat, traits_inst.translate(*ptr, (_flags & regbase::icase)));
+ ++ptr;
+ }
+ }
+
+ while (ptr < end)
+ {
+ c = (traits_size_type)(traits_uchar_type)*ptr;
+ // this is only used for the switch(), but cannot be folded in
+ // due to a bug in Comeau 4.2.44beta3
+ traits_size_type syntax = traits_inst.syntax_type(c);
+ switch(syntax)
+ {
+ case traits_type::syntax_open_bracket:
+ if(_flags & bk_parens)
+ {
+ dat = add_literal(dat, (charT)c);
+ ++ptr;
+ continue;
+ }
+ open_bracked_jump:
+ // extend:
+ dat = add_simple(dat, re_detail::syntax_element_startmark, sizeof(re_detail::re_brace));
+ markid.push(marks);
+ static_cast<re_detail::re_brace*>(dat)->index = marks++;
+ mark.push(data.index(dat));
+ ++ptr;
+ //
+ // check for perl like (?...) extention syntax
+ c = (traits_size_type)(traits_uchar_type)*ptr;
+ if(((_flags & bk_parens) == 0) && (traits_type::syntax_question == traits_inst.syntax_type(c)))
+ {
+ ++ptr;
+ c = (traits_size_type)(traits_uchar_type)*ptr;
+ // this is only used for the switch(), but cannot be folded in
+ // due to a bug in Comeau 4.2.44beta3
+ traits_size_type syntax = traits_inst.syntax_type(c);
+ switch(syntax)
+ {
+ case traits_type::syntax_colon:
+ static_cast<re_detail::re_brace*>(dat)->index = 0;
+ --marks;
+ markid.pop();
+ markid.push(0);
+ ++ptr;
+ continue;
+ case traits_type::syntax_equal:
+ static_cast<re_detail::re_brace*>(dat)->index = -1;
+ markid.pop();
+ markid.push(-1);
+ common_forward_assert:
+ --marks;
+ ++ptr;
+ // extend:
+ dat = add_simple(dat, re_detail::syntax_element_jump, re_detail::re_jump_size);
+ data.align();
+ //
+ // we don't know what value to put here yet,
+ // use an arbitrarily large value for now
+ // and check it later:
+ static_cast<re_detail::re_jump*>(dat)->alt.i = INT_MAX/2;
+ mark.push(data.size() - re_detail::re_jump_size);
+ continue;
+ case traits_type::syntax_not:
+ static_cast<re_detail::re_brace*>(dat)->index = -2;
+ markid.pop();
+ markid.push(-2);
+ goto common_forward_assert;
+ case traits_type::syntax_hash:
+ // comment just skip it:
+ static_cast<re_detail::re_brace*>(dat)->index = 0;
+ --marks;
+ markid.pop();
+ mark.pop();
+ do{
+ ++ptr;
+ c = (traits_size_type)(traits_uchar_type)*ptr;
+ }while(traits_type::syntax_close_bracket != traits_inst.syntax_type(c));
+ ++ptr;
+ continue;
+ default:
+ //
+ // error, return to standard parsing and let that handle the error:
+ --ptr;
+ continue;
+ }
+ }
+ break;
+ case traits_type::syntax_close_bracket:
+ if(_flags & bk_parens)
+ {
+ dat = add_literal(dat, (charT)c);
+ ++ptr;
+ continue;
+ }
+
+ close_bracked_jump:
+ if(dat)
+ {
+ data.align();
+ dat->next.i = data.size();
+ }
+
+ if(mark.empty())
+ {
+ fail(REG_EPAREN);
+ return error_code();
+ }
+ // see if we have an empty alternative:
+ if(mark.peek() == data.index(dat) )
+ {
+ re_detail::re_syntax_base* para = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<char*>(data.data()) + mark.peek());
+ if(para->type == re_detail::syntax_element_jump)
+ {
+ fail(REG_EMPTY);
+ return error_code();
+ }
+ }
+
+ // pop any pushed alternatives and set the target end destination:
+ dat = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<unsigned char*>(data.data()) + mark.peek());
+ while(dat->type == re_detail::syntax_element_jump)
+ {
+ static_cast<re_detail::re_jump*>(dat)->alt.i = data.size();
+ mark.pop();
+ if(mark.empty())
+ {
+ fail(REG_EPAREN);
+ return error_code();
+ }
+ dat = reinterpret_cast<re_detail::re_jump*>(reinterpret_cast<unsigned char*>(data.data()) + mark.peek());
+ }
+
+ dat = add_simple(0, re_detail::syntax_element_endmark, sizeof(re_detail::re_brace));
+ static_cast<re_detail::re_brace*>(dat)->index = markid.peek();
+ markid.pop();
+ last_mark_popped = mark.peek();
+ mark.pop();
+ ++ptr;
+ break;
+ case traits_type::syntax_char:
+ dat = add_literal(dat, (charT)c);
+ ++ptr;
+ break;
+ case traits_type::syntax_slash:
+ {
+ if(++ptr == end)
+ {
+ fail(REG_EESCAPE);
+ return error_code();
+ }
+ c = (traits_size_type)(traits_uchar_type)*ptr;
+ // this is only used for the switch(), but cannot be folded in
+ // due to a bug in Comeau 4.2.44beta3
+ traits_size_type syntax = traits_inst.syntax_type(c);
+ switch(syntax)
+ {
+ case traits_type::syntax_open_bracket:
+ if(_flags & bk_parens)
+ goto open_bracked_jump;
+ break;
+ case traits_type::syntax_close_bracket:
+ if(_flags & bk_parens)
+ goto close_bracked_jump;
+ break;
+ case traits_type::syntax_plus:
+ if((_flags & bk_plus_qm) && ((_flags & limited_ops) == 0))
+ {
+ rep_min = 1;
+ rep_max = (unsigned)-1;
+ goto repeat_jump;
+ }
+ break;
+ case traits_type::syntax_question:
+ if((_flags & bk_plus_qm) && ((_flags & limited_ops) == 0))
+ {
+ rep_min = 0;
+ rep_max = 1;
+ goto repeat_jump;
+ }
+ break;
+ case traits_type::syntax_or:
+ if(((_flags & bk_vbar) == 0) || (_flags & limited_ops))
+ break;
+ goto alt_string_jump;
+ case traits_type::syntax_open_brace:
+ if( ((_flags & bk_braces) == 0) || ((_flags & intervals) == 0))
+ break;
+
+ // we have {x} or {x,} or {x,y}:
+ parse_range(ptr, end, rep_min, rep_max);
+ goto repeat_jump;
+
+ case traits_type::syntax_digit:
+ if(_flags & bk_refs)
+ {
+ // update previous:
+ int i = traits_inst.toi((charT)c);
+ if(i == 0)
+ {
+ // we can have \025 which means take char whose
+ // code is 25 (octal), so parse string:
+ c = traits_inst.toi(ptr, end, -8);
+ --ptr;
+ break;
+ }
+ dat = add_simple(dat, re_detail::syntax_element_backref, sizeof(re_detail::re_brace));
+ static_cast<re_detail::re_brace*>(dat)->index = i;
+ ++ptr;
+ continue;
+ }
+ break;
+ case traits_type::syntax_b: // re_detail::syntax_element_word_boundary
+ dat = add_simple(dat, re_detail::syntax_element_word_boundary);
+ ++ptr;
+ continue;
+ case traits_type::syntax_B:
+ dat = add_simple(dat, re_detail::syntax_element_within_word);
+ ++ptr;
+ continue;
+ case traits_type::syntax_left_word:
+ dat = add_simple(dat, re_detail::syntax_element_word_start);
+ ++ptr;
+ continue;
+ case traits_type::syntax_right_word:
+ dat = add_simple(dat, re_detail::syntax_element_word_end);
+ ++ptr;
+ continue;
+ case traits_type::syntax_w: //re_detail::syntax_element_word_char
+ dat = compile_set_simple(dat, traits_type::char_class_word);
+ ++ptr;
+ continue;
+ case traits_type::syntax_W:
+ dat = compile_set_simple(dat, traits_type::char_class_word, true);
+ ++ptr;
+ continue;
+ case traits_type::syntax_d: //re_detail::syntax_element_word_char
+ dat = compile_set_simple(dat, traits_type::char_class_digit);
+ ++ptr;
+ continue;
+ case traits_type::syntax_D:
+ dat = compile_set_simple(dat, traits_type::char_class_digit, true);
+ ++ptr;
+ continue;
+ case traits_type::syntax_s: //re_detail::syntax_element_word_char
+ dat = compile_set_simple(dat, traits_type::char_class_space);
+ ++ptr;
+ continue;
+ case traits_type::syntax_S:
+ dat = compile_set_simple(dat, traits_type::char_class_space, true);
+ ++ptr;
+ continue;
+ case traits_type::syntax_l: //re_detail::syntax_element_word_char
+ dat = compile_set_simple(dat, traits_type::char_class_lower);
+ ++ptr;
+ continue;
+ case traits_type::syntax_L:
+ dat = compile_set_simple(dat, traits_type::char_class_lower, true);
+ ++ptr;
+ continue;
+ case traits_type::syntax_u: //re_detail::syntax_element_word_char
+ dat = compile_set_simple(dat, traits_type::char_class_upper);
+ ++ptr;
+ continue;
+ case traits_type::syntax_U:
+ dat = compile_set_simple(dat, traits_type::char_class_upper, true);
+ ++ptr;
+ continue;
+ case traits_type::syntax_Q:
+ ++ptr;
+ while(true)
+ {
+ if(ptr == end)
+ {
+ fail(REG_EESCAPE);
+ return error_code();
+ }
+ if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*ptr) == traits_type::syntax_slash)
+ {
+ ++ptr;
+ if((ptr != end) && (traits_inst.syntax_type((traits_size_type)(traits_uchar_type)*ptr) == traits_type::syntax_E))
+ break;
+ else
+ {
+ dat = add_literal(dat, *(ptr-1));
+ continue;
+ }
+ }
+ dat = add_literal(dat, *ptr);
+ ++ptr;
+ }
+ ++ptr;
+ continue;
+ case traits_type::syntax_C:
+ dat = add_simple(dat, re_detail::syntax_element_wild);
+ ++ptr;
+ continue;
+ case traits_type::syntax_X:
+ dat = add_simple(dat, re_detail::syntax_element_combining);
+ ++ptr;
+ continue;
+ case traits_type::syntax_Z:
+ dat = add_simple(dat, re_detail::syntax_element_soft_buffer_end);
+ ++ptr;
+ continue;
+ case traits_type::syntax_G:
+ dat = add_simple(dat, re_detail::syntax_element_restart_continue);
+ ++ptr;
+ continue;
+ case traits_type::syntax_start_buffer:
+ dat = add_simple(dat, re_detail::syntax_element_buffer_start);
+ ++ptr;
+ continue;
+ case traits_type::syntax_end_buffer:
+ dat = add_simple(dat, re_detail::syntax_element_buffer_end);
+ ++ptr;
+ continue;
+ default:
+ c = (traits_size_type)(traits_uchar_type)parse_escape(ptr, end);
+ dat = add_literal(dat, (charT)c);
+ continue;
+ }
+ dat = add_literal(dat, (charT)c);
+ ++ptr;
+ break;
+ }
+ case traits_type::syntax_dollar:
+ dat = add_simple(dat, re_detail::syntax_element_end_line, sizeof(re_detail::re_syntax_base));
+ ++ptr;
+ continue;
+ case traits_type::syntax_caret:
+ dat = add_simple(dat, re_detail::syntax_element_start_line, sizeof(re_detail::re_syntax_base));
+ ++ptr;
+ continue;
+ case traits_type::syntax_dot:
+ dat = add_simple(dat, re_detail::syntax_element_wild, sizeof(re_detail::re_syntax_base));
+ ++ptr;
+ continue;
+ case traits_type::syntax_star:
+ rep_min = 0;
+ rep_max = (unsigned)-1;
+
+ repeat_jump:
+ {
+ std::ptrdiff_t offset;
+ if(dat == 0)
+ {
+ fail(REG_BADRPT);
+ return error_code();
+ }
+ switch(dat->type)
+ {
+ case re_detail::syntax_element_endmark:
+ offset = last_mark_popped;
+ break;
+ case re_detail::syntax_element_literal:
+ if(static_cast<re_detail::re_literal*>(dat)->length > 1)
+ {
+ // update previous:
+ charT lit = *reinterpret_cast<charT*>(reinterpret_cast<char*>(dat) + sizeof(re_detail::re_literal) + ((static_cast<re_detail::re_literal*>(dat)->length-1)*sizeof(charT)));
+ --static_cast<re_detail::re_literal*>(dat)->length;
+ dat = add_simple(dat, re_detail::syntax_element_literal, sizeof(re_detail::re_literal) + sizeof(charT));
+ static_cast<re_detail::re_literal*>(dat)->length = 1;
+ *reinterpret_cast<charT*>(static_cast<re_detail::re_literal*>(dat)+1) = lit;
+ }
+ offset = reinterpret_cast<char*>(dat) - reinterpret_cast<char*>(data.data());
+ break;
+ case re_detail::syntax_element_backref:
+ case re_detail::syntax_element_long_set:
+ case re_detail::syntax_element_set:
+ case re_detail::syntax_element_wild:
+ case re_detail::syntax_element_combining:
+ // we're repeating a single item:
+ offset = reinterpret_cast<char*>(dat) - reinterpret_cast<char*>(data.data());
+ break;
+ default:
+ fail(REG_BADRPT);
+ return error_code();
+ }
+ data.align();
+ dat->next.i = data.size();
+ //unsigned pos = (char*)dat - (char*)data.data();
+
+ // add the trailing jump:
+ dat = add_simple(dat, re_detail::syntax_element_jump, re_detail::re_jump_size);
+ static_cast<re_detail::re_jump*>(dat)->alt.i = 0;
+
+ // now insert the leading repeater:
+ dat = static_cast<re_detail::re_syntax_base*>(data.insert(offset, re_detail::re_repeater_size));
+ dat->next.i = (reinterpret_cast<char*>(dat) - reinterpret_cast<char*>(data.data())) + re_detail::re_repeater_size;
+ dat->type = re_detail::syntax_element_rep;
+ static_cast<re_detail::re_repeat*>(dat)->alt.i = data.size();
+ static_cast<re_detail::re_repeat*>(dat)->min = rep_min;
+ static_cast<re_detail::re_repeat*>(dat)->max = rep_max;
+ static_cast<re_detail::re_repeat*>(dat)->leading = false;
+ static_cast<re_detail::re_repeat*>(dat)->greedy = true;
+ move_offsets(dat, re_detail::re_repeater_size);
+ ++ptr;
+ //
+ // now check to see if we have a non-greedy repeat:
+ if((ptr != end) && (_flags & (limited_ops | bk_plus_qm | bk_braces)) == 0)
+ {
+ c = (traits_size_type)(traits_uchar_type)*ptr;
+ if(traits_type::syntax_question == traits_inst.syntax_type(c))
+ {
+ // OK repeat is non-greedy:
+ static_cast<re_detail::re_repeat*>(dat)->greedy = false;
+ ++ptr;
+ }
+ }
+ dat = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<char*>(data.data()) + data.size() - re_detail::re_jump_size);
+ static_cast<re_detail::re_repeat*>(dat)->alt.i = offset;
+ continue;
+ }
+ case traits_type::syntax_plus:
+ if(_flags & (bk_plus_qm | limited_ops))
+ {
+ dat = add_literal(dat, (charT)c);
+ ++ptr;
+ continue;
+ }
+ rep_min = 1;
+ rep_max = (unsigned)-1;
+ goto repeat_jump;
+ case traits_type::syntax_question:
+ if(_flags & (bk_plus_qm | limited_ops))
+ {
+ dat = add_literal(dat, (charT)c);
+ ++ptr;
+ continue;
+ }
+ rep_min = 0;
+ rep_max = 1;
+ goto repeat_jump;
+ case traits_type::syntax_open_set:
+ // update previous:
+ if(dat)
+ {
+ data.align();
+ dat->next.i = data.size();
+ }
+ // extend:
+ dat = compile_set(ptr, end);
+ if(dat == 0)
+ {
+ if((_flags & regbase::failbit) == 0)
+ fail(REG_EBRACK);
+ return error_code();
+ }
+ break;
+ case traits_type::syntax_or:
+ {
+ if(_flags & (bk_vbar | limited_ops))
+ {
+ dat = add_literal(dat, (charT)c);
+ ++ptr;
+ continue;
+ }
+
+ alt_string_jump:
+
+ // update previous:
+ if(dat == 0)
+ {
+ // start of pattern can't have empty "|"
+ fail(REG_EMPTY);
+ return error_code();
+ }
+ // see if we have an empty alternative:
+ if(mark.empty() == false)
+ if(mark.peek() == data.index(dat))
+ {
+ fail(REG_EMPTY);
+ return error_code();
+ }
+ // extend:
+ dat = add_simple(dat, re_detail::syntax_element_jump, re_detail::re_jump_size);
+ data.align();
+ //
+ // we don't know what value to put here yet,
+ // use an arbitrarily large value for now
+ // and check it later (TODO!)
+ static_cast<re_detail::re_jump*>(dat)->alt.i = INT_MAX/2;
+
+ // now work out where to insert:
+ std::size_t offset = 0;
+ if(mark.empty() == false)
+ {
+ // we have a '(' or '|' to go back to:
+ offset = mark.peek();
+ re_detail::re_syntax_base* base = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<unsigned char*>(data.data()) + offset);
+ offset = base->next.i;
+ }
+ re_detail::re_jump* j = static_cast<re_detail::re_jump*>(data.insert(offset, re_detail::re_jump_size));
+ j->type = re_detail::syntax_element_alt;
+ j->next.i = offset + re_detail::re_jump_size;
+ j->alt.i = data.size();
+ move_offsets(j, re_detail::re_jump_size);
+ dat = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<unsigned char*>(data.data()) + data.size() - re_detail::re_jump_size);
+ mark.push(data.size() - re_detail::re_jump_size);
+ ++ptr;
+ break;
+ }
+ case traits_type::syntax_open_brace:
+ if((_flags & bk_braces) || ((_flags & intervals) == 0))
+ {
+ dat = add_literal(dat, (charT)c);
+ ++ptr;
+ continue;
+ }
+ // we have {x} or {x,} or {x,y}:
+ parse_range(ptr, end, rep_min, rep_max);
+ goto repeat_jump;
+ case traits_type::syntax_newline:
+ if(_flags & newline_alt)
+ goto alt_string_jump;
+ dat = add_literal(dat, (charT)c);
+ ++ptr;
+ continue;
+ case traits_type::syntax_close_brace:
+ if(_flags & bk_braces)
+ {
+ dat = add_literal(dat, (charT)c);
+ ++ptr;
+ continue;
+ }
+ fail(REG_BADPAT);
+ return error_code();
+ default:
+ dat = add_literal(dat, (charT)c);
+ ++ptr;
+ break;
+ } // switch
+ } // while
+
+ //
+ // update previous:
+ if(dat)
+ {
+ data.align();
+ dat->next.i = data.size();
+ }
+
+ // see if we have an empty alternative:
+ if(mark.empty() == false)
+ if(mark.peek() == data.index(dat) )
+ {
+ re_detail::re_syntax_base* para = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<char*>(data.data()) + mark.peek());
+ if(para->type == re_detail::syntax_element_jump)
+ {
+ fail(REG_EMPTY);
+ return error_code();
+ }
+ }
+ //
+ // set up tail:
+ //
+ if(mark.empty() == false)
+ {
+ // pop any pushed alternatives and set the target end destination:
+ dat = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<unsigned char*>(data.data()) + mark.peek());
+ while(dat->type == re_detail::syntax_element_jump)
+ {
+ static_cast<re_detail::re_jump*>(dat)->alt.i = data.size();
+ mark.pop();
+ if(mark.empty() == true)
+ break;
+ dat = reinterpret_cast<re_detail::re_jump*>(reinterpret_cast<unsigned char*>(data.data()) + mark.peek());
+ }
+ }
+
+ dat = static_cast<re_detail::re_brace*>(data.extend(sizeof(re_detail::re_syntax_base)));
+ dat->type = re_detail::syntax_element_match;
+ dat->next.i = 0;
+
+ if(mark.empty() == false)
+ {
+ fail(REG_EPAREN);
+ return error_code();
+ }
+
+ //
+ // allocate space for start _map:
+ startmap = reinterpret_cast<unsigned char*>(data.extend(256 + ((end - base + 1) * sizeof(charT))));
+ //
+ // and copy the expression we just compiled:
+ _expression = reinterpret_cast<charT*>(reinterpret_cast<char*>(startmap) + 256);
+ _expression_len = end - base;
+ std::memcpy(_expression, base, _expression_len * sizeof(charT));
+ *(_expression + _expression_len) = charT(0);
+
+ //
+ // now we need to apply fixups to the array
+ // so that we can use pointers and not indexes
+ fixup_apply(static_cast<re_detail::re_syntax_base*>(data.data()), marks);
+
+ // check for error during fixup:
+ if(_flags & regbase::failbit)
+ return error_code();
+
+ //
+ // finally compile the maps so that we can make intelligent choices
+ // whenever we encounter an alternative:
+ compile_maps();
+ if(pkmp)
+ {
+ re_detail::kmp_free(pkmp, data.allocator());
+ pkmp = 0;
+ }
+ re_detail::re_syntax_base* sbase = static_cast<re_detail::re_syntax_base*>(data.data());
+ _restart_type = probe_restart(sbase);
+ _leading_len = fixup_leading_rep(sbase, 0);
+ if((sbase->type == re_detail::syntax_element_literal) && (sbase->next.p->type == re_detail::syntax_element_match))
+ {
+ _restart_type = restart_fixed_lit;
+ if(0 == pkmp)
+ {
+ charT* p1 = reinterpret_cast<charT*>(reinterpret_cast<char*>(sbase) + sizeof(re_detail::re_literal));
+ charT* p2 = p1 + static_cast<re_detail::re_literal*>(sbase)->length;
+ pkmp = re_detail::kmp_compile(p1, p2, charT(), re_detail::kmp_translator<traits>(_flags®base::icase, &traits_inst), data.allocator());
+ }
+ }
+ return error_code();
+
+ } // sentry
+ return REG_EMPTY;
+
+# ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+}
+
+template <class charT, class traits, class Allocator>
+re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::add_simple(re_detail::re_syntax_base* dat, re_detail::syntax_element_type type, unsigned int size)
+{
+ if(dat)
+ {
+ data.align();
+ dat->next.i = data.size();
+ }
+ if(size < sizeof(re_detail::re_syntax_base))
+ size = sizeof(re_detail::re_syntax_base);
+ dat = static_cast<re_detail::re_syntax_base*>(data.extend(size));
+ dat->type = type;
+ dat->next.i = 0;
+ return dat;
+}
+
+template <class charT, class traits, class Allocator>
+re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::add_literal(re_detail::re_syntax_base* dat, charT c)
+{
+ if(dat && (dat->type == re_detail::syntax_element_literal))
+ {
+ // add another charT to the list:
+ std::ptrdiff_t pos = reinterpret_cast<unsigned char*>(dat) - reinterpret_cast<unsigned char*>(data.data());
+ *reinterpret_cast<charT*>(data.extend(sizeof(charT))) = traits_inst.translate(c, (_flags & regbase::icase));
+ dat = reinterpret_cast<re_detail::re_syntax_base*>(reinterpret_cast<unsigned char*>(data.data()) + pos);
+ ++(static_cast<re_detail::re_literal*>(dat)->length);
+ }
+ else
+ {
+ // extend:
+ dat = add_simple(dat, re_detail::syntax_element_literal, sizeof(re_detail::re_literal) + sizeof(charT));
+ static_cast<re_detail::re_literal*>(dat)->length = 1;
+ *reinterpret_cast<charT*>(reinterpret_cast<re_detail::re_literal*>(dat)+1) = traits_inst.translate(c, (_flags & regbase::icase));
+ }
+ return dat;
+}
+
+template <class charT, class traits, class Allocator>
+unsigned int BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::probe_restart(re_detail::re_syntax_base* dat)
+{
+ switch(dat->type)
+ {
+ case re_detail::syntax_element_startmark:
+ case re_detail::syntax_element_endmark:
+ return probe_restart(dat->next.p);
+ case re_detail::syntax_element_start_line:
+ return regbase::restart_line;
+ case re_detail::syntax_element_word_start:
+ return regbase::restart_word;
+ case re_detail::syntax_element_buffer_start:
+ return regbase::restart_buf;
+ case re_detail::syntax_element_restart_continue:
+ return regbase::restart_continue;
+ default:
+ return regbase::restart_any;
+ }
+}
+
+template <class charT, class traits, class Allocator>
+unsigned int BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::fixup_leading_rep(re_detail::re_syntax_base* dat, re_detail::re_syntax_base* end)
+{
+ unsigned int len = 0;
+ bool leading_lit = end ? false : true;
+ while(dat != end)
+ {
+ switch(dat->type)
+ {
+ case re_detail::syntax_element_literal:
+ len += static_cast<re_detail::re_literal*>(dat)->length;
+ if((leading_lit) && (static_cast<re_detail::re_literal*>(dat)->length > 2))
+ {
+ // we can do a literal search for the leading literal string
+ // using Knuth-Morris-Pratt (or whatever), and only then check for
+ // matches. We need a decent length string though to make it
+ // worth while.
+ _leading_string = reinterpret_cast<charT*>(reinterpret_cast<char*>(dat) + sizeof(re_detail::re_literal));
+ _leading_string_len = static_cast<re_detail::re_literal*>(dat)->length;
+ _restart_type = restart_lit;
+ leading_lit = false;
+ const charT* p1 = _leading_string;
+ const charT* p2 = _leading_string + _leading_string_len;
+ pkmp = re_detail::kmp_compile(p1, p2, charT(), re_detail::kmp_translator<traits>(_flags®base::icase, &traits_inst), data.allocator());
+ }
+ leading_lit = false;
+ break;
+ case re_detail::syntax_element_wild:
+ ++len;
+ leading_lit = false;
+ break;
+ case re_detail::syntax_element_match:
+ return len;
+ case re_detail::syntax_element_backref:
+ //case re_detail::syntax_element_jump:
+ case re_detail::syntax_element_alt:
+ case re_detail::syntax_element_combining:
+ return 0;
+ case re_detail::syntax_element_long_set:
+ {
+ // we need to verify that there are no multi-character
+ // collating elements inside the repeat:
+ const charT* p = reinterpret_cast<const charT*>(reinterpret_cast<const char*>(dat) + sizeof(re_detail::re_set_long));
+ unsigned int csingles = static_cast<re_detail::re_set_long*>(dat)->csingles;
+ for(unsigned int i = 0; i < csingles; ++i)
+ {
+ if(re_detail::re_strlen(p) > 1)
+ return 0;
+ while(*p)++p;
+ ++p;
+ }
+ ++len;
+ leading_lit = false;
+ break;
+ }
+ case re_detail::syntax_element_set:
+ ++len;
+ leading_lit = false;
+ break;
+ case re_detail::syntax_element_rep:
+ if((len == 0) && (1 == fixup_leading_rep(dat->next.p, static_cast<re_detail::re_repeat*>(dat)->alt.p) ))
+ {
+ static_cast<re_detail::re_repeat*>(dat)->leading = true;
+ return len;
+ }
+ return len;
+ default:
+ break;
+ }
+ dat = dat->next.p;
+ }
+ return len;
+}
+
+template <class charT, class traits, class Allocator>
+void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::fail(unsigned int err)
+{
+ error_code_ = err;
+ if(err)
+ {
+ _flags |= regbase::failbit;
+#ifndef BOOST_NO_EXCEPTIONS
+ if(_flags & regbase::use_except)
+ {
+ throw bad_expression(traits_inst.error_string(err));
+ }
+#endif
+ }
+ else
+ _flags &= ~regbase::failbit;
+}
+
+
+#ifdef __BORLANDC__
+ #pragma option pop
+#endif
+
+} // namespace boost
+
+
+#endif // BOOST_REGEX_COMPILE_HPP
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+/*
+ *
+ * Copyright (c) 1998-2002
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_cstring.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: This is an internal header file, do not include directly.
+ * String support and helper functions, for regular
+ * expression library.
+ */
+
+#ifndef BOOST_REGEX_CSTRING_HPP
+#define BOOST_REGEX_CSTRING_HPP
+
+#ifndef BOOST_REGEX_CONFIG_HPP
+#include <boost/regex/config.hpp>
+#endif
+
+#include <cstring>
+
+namespace boost{
+ namespace re_detail{
+
+#ifdef __BORLANDC__
+ #pragma option push -a8 -b -Vx -Ve -pc
+#endif
+
+//
+// start by defining some template function aliases for C API functions:
+//
+
+template <class charT>
+std::size_t BOOST_REGEX_CALL re_strlen(const charT *s)
+{
+ std::size_t len = 0;
+ while(*s)
+ {
+ ++s;
+ ++len;
+ }
+ return len;
+}
+
+inline std::size_t BOOST_REGEX_CALL re_strlen(const char *s)
+{
+ return std::strlen(s);
+}
+
+#ifndef BOOST_NO_WREGEX
+
+inline std::size_t BOOST_REGEX_CALL re_strlen(const wchar_t *s)
+{
+ return std::wcslen(s);
+}
+
+#endif
+
+#ifndef BOOST_NO_WREGEX
+BOOST_REGEX_DECL void BOOST_REGEX_CALL re_transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
+#endif
+BOOST_REGEX_DECL void BOOST_REGEX_CALL re_transform(std::string& out, const std::string& in);
+
+template <class charT>
+void BOOST_REGEX_CALL re_trunc_primary(std::basic_string<charT>& s)
+{
+ for(unsigned int i = 0; i < s.size(); ++i)
+ {
+ if(s[i] <= 1)
+ {
+ s.erase(i);
+ break;
+ }
+ }
+}
+
+inline char* BOOST_REGEX_CALL re_strcpy(char *s1, const char *s2)
+{
+ #if defined(__BORLANDC__) && defined(strcpy)
+ return ::strcpy(s1, s2);
+ #else
+ return std::strcpy(s1, s2);
+ #endif
+}
+
+#ifndef BOOST_NO_WREGEX
+
+inline wchar_t* BOOST_REGEX_CALL re_strcpy(wchar_t *s1, const wchar_t *s2)
+{
+ return std::wcscpy(s1, s2);
+}
+
+#endif
+
+
+template <class charT>
+charT* BOOST_REGEX_CALL re_strdup(const charT* p)
+{
+ charT* buf = new charT[re_strlen(p) + 1];
+ re_strcpy(buf, p);
+ return buf;
+}
+
+template <class charT>
+inline void BOOST_REGEX_CALL re_strfree(charT* p)
+{
+ delete[] p;
+}
+
+#ifdef __BORLANDC__
+ #pragma option pop
+#endif
+
+} // namespace re_detail
+} // namespace boost
+
+#endif // BOOST_REGEX_CSTRING_HPP
+
+
+
+
+
--- /dev/null
+/*
+ *
+ * Copyright (c) 1998-2002
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_format.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Provides formatting output routines for search and replace
+ * operations. Note this is an internal header file included
+ * by regex.hpp, do not include on its own.
+ */
+
+#ifndef BOOST_REGEX_FORMAT_HPP
+#define BOOST_REGEX_FORMAT_HPP
+
+
+namespace boost{
+
+enum format_flags_t{
+ format_all = 0, // enable all extentions to sytax
+ format_sed = match_max << 1, // sed style replacement.
+ format_perl = format_sed << 1, // perl style replacement.
+ format_no_copy = format_perl << 1, // don't copy non-matching segments.
+ format_first_only = format_no_copy << 1, // Only replace first occurance.
+ format_is_if = format_first_only << 1 // internal use only.
+};
+
+namespace re_detail{
+
+#ifdef __BORLANDC__
+ #pragma option push -a8 -b -Vx -Ve -pc -w-8037
+#endif
+
+template <class O, class I>
+O BOOST_REGEX_CALL re_copy_out(O out, I first, I last)
+{
+ while(first != last)
+ {
+ *out = *first;
+ ++out;
+ ++first;
+ }
+ return out;
+}
+
+template <class charT, class traits_type>
+void BOOST_REGEX_CALL re_skip_format(const charT*& fmt, const traits_type& traits_inst)
+{
+ // dwa 9/13/00 - suppress incorrect unused parameter warning for MSVC
+ (void)traits_inst;
+
+ typedef typename traits_type::size_type traits_size_type;
+ typedef typename traits_type::uchar_type traits_uchar_type;
+ typedef typename traits_type::string_type traits_string_type;
+
+ unsigned int parens = 0;
+ unsigned int c;
+ while(*fmt)
+ {
+ c = traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt));
+ if((c == traits_type::syntax_colon) && (parens == 0))
+ {
+ ++fmt;
+ return;
+ }
+ else if(c == traits_type::syntax_close_bracket)
+ {
+ if(parens == 0)
+ {
+ ++fmt;
+ return;
+ }
+ --parens;
+ }
+ else if(c == traits_type::syntax_open_bracket)
+ ++parens;
+ else if(c == traits_type::syntax_slash)
+ {
+ ++fmt;
+ if(*fmt == 0)
+ return;
+ }
+ ++fmt;
+ }
+}
+
+#ifdef BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN
+
+//
+// ugly hack for buggy output iterators
+
+template <class T>
+inline void oi_assign(T* p, T v)
+{
+ ::boost::re_detail::pointer_destroy(p);
+ pointer_construct(p, v);
+}
+
+#else
+
+template <class T>
+inline void oi_assign(T* p, T v)
+{
+ //
+ // if you get a compile time error in here then you either
+ // need to rewrite your output iterator to make it assignable
+ // (as is required by the standard), or define
+ // BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN to use the ugly hack above
+ *p = v;
+}
+
+#endif
+
+
+#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
+//
+// Ugly ugly hack,
+// template don't merge if they contain switch statements so declare these
+// templates in unnamed namespace (ie with internal linkage), each translation
+// unit then gets its own local copy, it works seemlessly but bloats the app.
+namespace{
+#endif
+
+//
+// algorithm reg_format:
+// takes the result of a match and a format string
+// and merges them to produce a new string which
+// is sent to an OutputIterator,
+// _reg_format_aux does the actual work:
+//
+template <class OutputIterator, class Iterator, class Allocator, class charT, class traits_type>
+OutputIterator BOOST_REGEX_CALL _reg_format_aux(OutputIterator out,
+ const match_results<Iterator, Allocator>& m,
+ const charT*& fmt,
+ unsigned flags, const traits_type& traits_inst)
+{
+ const charT* fmt_end = fmt;
+ while(*fmt_end) ++ fmt_end;
+
+ typedef typename traits_type::size_type traits_size_type;
+ typedef typename traits_type::uchar_type traits_uchar_type;
+ typedef typename traits_type::string_type traits_string_type;
+
+ while(*fmt)
+ {
+ switch(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)))
+ {
+ case traits_type::syntax_dollar:
+ if(flags & format_sed)
+ {
+ // no perl style replacement,
+ // $ is an ordinary character:
+ goto default_opt;
+ }
+ ++fmt;
+ if(*fmt == 0) // oops trailing $
+ {
+ --fmt;
+ *out = *fmt;
+ ++out;
+ return out;
+ }
+ switch(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)))
+ {
+ case traits_type::syntax_start_buffer:
+ oi_assign(&out, re_copy_out(out, Iterator(m[-1].first), Iterator(m[-1].second)));
+ ++fmt;
+ continue;
+ case traits_type::syntax_end_buffer:
+ oi_assign(&out, re_copy_out(out, Iterator(m[-2].first), Iterator(m[-2].second)));
+ ++fmt;
+ continue;
+ case traits_type::syntax_digit:
+ {
+expand_sub:
+ unsigned int index = traits_inst.toi(fmt, fmt_end, 10);
+ oi_assign(&out, re_copy_out(out, Iterator(m[index].first), Iterator(m[index].second)));
+ continue;
+ }
+ }
+ // anything else:
+ if(*fmt == '&')
+ {
+ oi_assign(&out, re_copy_out(out, Iterator(m[0].first), Iterator(m[0].second)));
+ ++fmt;
+ }
+ else
+ {
+ // probably an error, treat as a literal '$'
+ --fmt;
+ *out = *fmt;
+ ++out;
+ ++fmt;
+ }
+ continue;
+ case traits_type::syntax_slash:
+ {
+ // escape sequence:
+ ++fmt;
+ charT c(*fmt);
+ if(*fmt == 0)
+ {
+ --fmt;
+ *out = *fmt;
+ ++out;
+ ++fmt;
+ return out;
+ }
+ switch(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)))
+ {
+ case traits_type::syntax_a:
+ c = '\a';
+ ++fmt;
+ break;
+ case traits_type::syntax_f:
+ c = '\f';
+ ++fmt;
+ break;
+ case traits_type::syntax_n:
+ c = '\n';
+ ++fmt;
+ break;
+ case traits_type::syntax_r:
+ c = '\r';
+ ++fmt;
+ break;
+ case traits_type::syntax_t:
+ c = '\t';
+ ++fmt;
+ break;
+ case traits_type::syntax_v:
+ c = '\v';
+ ++fmt;
+ break;
+ case traits_type::syntax_x:
+ ++fmt;
+ if(fmt == fmt_end)
+ {
+ *out = *--fmt;
+ ++out;
+ return out;
+ }
+ // maybe have \x{ddd}
+ if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)) == traits_type::syntax_open_brace)
+ {
+ ++fmt;
+ if(fmt == fmt_end)
+ {
+ fmt -= 2;
+ *out = *fmt;
+ ++out;
+ ++fmt;
+ continue;
+ }
+ if(traits_inst.is_class(*fmt, traits_type::char_class_xdigit) == false)
+ {
+ fmt -= 2;
+ *out = *fmt;
+ ++out;
+ ++fmt;
+ continue;
+ }
+ c = (charT)traits_inst.toi(fmt, fmt_end, -16);
+ if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)) != traits_type::syntax_close_brace)
+ {
+ while(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)) != traits_type::syntax_slash)
+ --fmt;
+ ++fmt;
+ *out = *fmt;
+ ++out;
+ ++fmt;
+ continue;
+ }
+ ++fmt;
+ break;
+ }
+ else
+ {
+ if(traits_inst.is_class(*fmt, traits_type::char_class_xdigit) == false)
+ {
+ --fmt;
+ *out = *fmt;
+ ++out;
+ ++fmt;
+ continue;
+ }
+ c = (charT)traits_inst.toi(fmt, fmt_end, -16);
+ }
+ break;
+ case traits_type::syntax_c:
+ ++fmt;
+ if(fmt == fmt_end)
+ {
+ --fmt;
+ *out = *fmt;
+ ++out;
+ return out;
+ }
+ if(((typename traits_type::uchar_type)(*fmt) < (typename traits_type::uchar_type)'@')
+ || ((typename traits_type::uchar_type)(*fmt) > (typename traits_type::uchar_type)127) )
+ {
+ --fmt;
+ *out = *fmt;
+ ++out;
+ ++fmt;
+ break;
+ }
+ c = (charT)((typename traits_type::uchar_type)(*fmt) - (typename traits_type::uchar_type)'@');
+ ++fmt;
+ break;
+ case traits_type::syntax_e:
+ c = (charT)27;
+ ++fmt;
+ break;
+ case traits_type::syntax_digit:
+ if(flags & format_sed)
+ goto expand_sub;
+ else
+ c = (charT)traits_inst.toi(fmt, fmt_end, -8);
+ break;
+ default:
+ //c = *fmt;
+ ++fmt;
+ }
+ *out = c;
+ ++out;
+ continue;
+ }
+ case traits_type::syntax_open_bracket:
+ if(flags & (format_sed|format_perl))
+ {
+ *out = *fmt;
+ ++out;
+ ++fmt;
+ continue;
+ }
+ else
+ {
+ ++fmt; // recurse
+ oi_assign(&out, _reg_format_aux(out, m, fmt, flags, traits_inst));
+ continue;
+ }
+ case traits_type::syntax_close_bracket:
+ if(flags & (format_sed|format_perl))
+ {
+ *out = *fmt;
+ ++out;
+ ++fmt;
+ continue;
+ }
+ else
+ {
+ ++fmt; // return from recursion
+ return out;
+ }
+ case traits_type::syntax_colon:
+ if(flags & format_is_if)
+ {
+ ++fmt;
+ return out;
+ }
+ *out = *fmt;
+ ++out;
+ ++fmt;
+ continue;
+ case traits_type::syntax_question:
+ {
+ if(flags & (format_sed|format_perl))
+ {
+ *out = *fmt;
+ ++out;
+ ++fmt;
+ continue;
+ }
+ else
+ {
+ ++fmt;
+ if(*fmt == 0)
+ {
+ --fmt;
+ *out = *fmt;
+ ++out;
+ ++fmt;
+ return out;
+ }
+ unsigned int id = traits_inst.toi(fmt, fmt_end, 10);
+ if(m[id].matched)
+ {
+ oi_assign(&out, _reg_format_aux(out, m, fmt, flags | format_is_if, traits_inst));
+ if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*(fmt-1))) == traits_type::syntax_colon)
+ re_skip_format(fmt, traits_inst);
+ }
+ else
+ {
+ re_skip_format(fmt, traits_inst);
+ if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*(fmt-1))) == traits_type::syntax_colon)
+ oi_assign(&out, _reg_format_aux(out, m, fmt, flags | format_is_if, traits_inst));
+ }
+ return out;
+ }
+ }
+ default:
+default_opt:
+ if((flags & format_sed) && (*fmt == '&'))
+ {
+ oi_assign(&out, re_copy_out(out, Iterator(m[0].first), Iterator(m[0].second)));
+ ++fmt;
+ continue;
+ }
+ *out = *fmt;
+ ++out;
+ ++fmt;
+ }
+ }
+
+ return out;
+}
+
+#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
+} // namespace
+#endif
+
+template <class S>
+class string_out_iterator
+{
+ S* out;
+public:
+ string_out_iterator(S& s) : out(&s) {}
+ string_out_iterator& operator++() { return *this; }
+ string_out_iterator& operator++(int) { return *this; }
+ string_out_iterator& operator*() { return *this; }
+ string_out_iterator& operator=(typename S::value_type v)
+ {
+ out->append(1, v);
+ return *this;
+ }
+};
+
+template <class OutputIterator, class Iterator, class charT, class Allocator, class traits_type>
+class merge_out_predicate
+{
+ OutputIterator* out;
+ Iterator* last;
+ const charT* fmt;
+ unsigned flags;
+ const traits_type* pt;
+
+public:
+ merge_out_predicate(OutputIterator& o, Iterator& pi, const charT* f, unsigned format_flags, const traits_type& p)
+ : out(&o), last(&pi), fmt(f), flags(format_flags), pt(&p){}
+
+ ~merge_out_predicate() {}
+ bool BOOST_REGEX_CALL operator()(const boost::match_results<Iterator, Allocator>& m)
+ {
+ const charT* f = fmt;
+ if(0 == (flags & format_no_copy))
+ oi_assign(out, re_copy_out(*out, Iterator(m[-1].first), Iterator(m[-1].second)));
+ oi_assign(out, _reg_format_aux(*out, m, f, flags, *pt));
+ *last = m[-2].first;
+ return flags & format_first_only ? false : true;
+ }
+};
+
+} // namespace re_detail
+
+template <class OutputIterator, class Iterator, class Allocator, class charT>
+OutputIterator regex_format(OutputIterator out,
+ const match_results<Iterator, Allocator>& m,
+ const charT* fmt,
+ unsigned flags = 0
+ )
+{
+ regex_traits<charT> t;
+ return re_detail::_reg_format_aux(out, m, fmt, flags, t);
+}
+
+template <class OutputIterator, class Iterator, class Allocator, class charT>
+OutputIterator regex_format(OutputIterator out,
+ const match_results<Iterator, Allocator>& m,
+ const std::basic_string<charT>& fmt,
+ unsigned flags = 0
+ )
+{
+ regex_traits<charT> t;
+ const charT* start = fmt.c_str();
+ return re_detail::_reg_format_aux(out, m, start, flags, t);
+}
+
+template <class Iterator, class Allocator, class charT>
+std::basic_string<charT> regex_format(const match_results<Iterator, Allocator>& m, const charT* fmt, unsigned flags = 0)
+{
+ std::basic_string<charT> result;
+ re_detail::string_out_iterator<std::basic_string<charT> > i(result);
+ regex_format(i, m, fmt, flags);
+ return result;
+}
+
+template <class Iterator, class Allocator, class charT>
+std::basic_string<charT> regex_format(const match_results<Iterator, Allocator>& m, const std::basic_string<charT>& fmt, unsigned flags = 0)
+{
+ std::basic_string<charT> result;
+ re_detail::string_out_iterator<std::basic_string<charT> > i(result);
+ regex_format(i, m, fmt.c_str(), flags);
+ return result;
+}
+
+template <class OutputIterator, class Iterator, class traits, class Allocator, class charT>
+OutputIterator regex_merge(OutputIterator out,
+ Iterator first,
+ Iterator last,
+ const reg_expression<charT, traits, Allocator>& e,
+ const charT* fmt,
+ unsigned int flags = match_default)
+{
+ Iterator l = first;
+ re_detail::merge_out_predicate<OutputIterator, Iterator, charT, Allocator, traits> oi(out, l, fmt, flags, e.get_traits());
+ regex_grep(oi, first, last, e, flags);
+ return (flags & format_no_copy) ? out : re_detail::re_copy_out(out, l, last);
+}
+
+template <class OutputIterator, class Iterator, class traits, class Allocator, class charT>
+inline OutputIterator regex_merge(OutputIterator out,
+ Iterator first,
+ Iterator last,
+ const reg_expression<charT, traits, Allocator>& e,
+ const std::basic_string<charT>& fmt,
+ unsigned int flags = match_default)
+{
+ return regex_merge(out, first, last, e, fmt.c_str(), flags);
+}
+
+template <class traits, class Allocator, class charT>
+std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
+ const reg_expression<charT, traits, Allocator>& e,
+ const charT* fmt,
+ unsigned int flags = match_default)
+{
+ std::basic_string<charT> result;
+ re_detail::string_out_iterator<std::basic_string<charT> > i(result);
+ regex_merge(i, s.begin(), s.end(), e, fmt, flags);
+ return result;
+}
+
+template <class traits, class Allocator, class charT>
+std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
+ const reg_expression<charT, traits, Allocator>& e,
+ const std::basic_string<charT>& fmt,
+ unsigned int flags = match_default)
+{
+ std::basic_string<charT> result;
+ re_detail::string_out_iterator<std::basic_string<charT> > i(result);
+ regex_merge(i, s.begin(), s.end(), e, fmt.c_str(), flags);
+ return result;
+}
+
+#ifdef __BORLANDC__
+ #pragma option pop
+#endif
+
+} // namespace boost
+
+#endif // BOOST_REGEX_FORMAT_HPP
+
+
+
+
+
--- /dev/null
+/*
+ *
+ * Copyright (c) 1998-2002
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_fwd.cpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Forward declares boost::reg_expression<> and
+ * associated typedefs.
+ */
+
+#ifndef BOOST_REGEX_FWD_HPP_INCLUDED
+#define BOOST_REGEX_FWD_HPP_INCLUDED
+
+#ifndef BOOST_REGEX_CONFIG_HPP
+#include <boost/config.hpp>
+#endif
+#include <boost/detail/allocator.hpp>
+
+//
+// define BOOST_REGEX_NO_FWD if this
+// header doesn't work!
+//
+#ifdef BOOST_REGEX_NO_FWD
+# ifndef BOOST_RE_REGEX_HPP
+# include <boost/regex.hpp>
+# endif
+#else
+
+//
+// If there isn't good enough wide character support then there will
+// be no wide character regular expressions:
+//
+#if (defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING)) && !defined(BOOST_NO_WREGEX)
+# define BOOST_NO_WREGEX
+#endif
+
+namespace boost{
+
+template <class charT>
+class regex_traits;
+
+template <class charT, class traits = regex_traits<charT>, class Allocator = BOOST_DEFAULT_ALLOCATOR(charT) >
+class reg_expression;
+
+typedef reg_expression<char, regex_traits<char>, BOOST_DEFAULT_ALLOCATOR(char) > regex;
+#ifndef BOOST_NO_WREGEX
+typedef reg_expression<wchar_t, regex_traits<wchar_t>, BOOST_DEFAULT_ALLOCATOR(wchar_t) > wregex;
+#endif
+
+} // namespace boost
+
+#endif // BOOST_REGEX_NO_FWD
+
+#endif
+
+
+
--- /dev/null
+/*
+ *
+ * Copyright (c) 1998-2002
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_kmp.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Provides Knuth Morris Pratt search operations.
+ * Note this is an internal header file included
+ * by regex.hpp, do not include on its own.
+ */
+
+#ifndef BOOST_REGEX_KMP_HPP
+#define BOOST_REGEX_KMP_HPP
+
+#ifdef BOOST_REGEX_CONFIG_HPP
+#include <boost/regex/config.hpp>
+#endif
+
+
+namespace boost{
+ namespace re_detail{
+
+#ifdef __BORLANDC__
+ #pragma option push -a8 -b -Vx -Ve -pc
+#endif
+
+template <class charT>
+struct kmp_info
+{
+ unsigned int size;
+ unsigned int len;
+ const charT* pstr;
+ int kmp_next[1];
+};
+
+template <class charT, class Allocator>
+void kmp_free(kmp_info<charT>* pinfo, const Allocator& a)
+{
+ typedef typename boost::detail::rebind_allocator<char, Allocator>::type atype;
+ atype(a).deallocate(reinterpret_cast<char*>(pinfo), pinfo->size);
+}
+
+template <class iterator, class charT, class Trans, class Allocator>
+kmp_info<charT>* kmp_compile(iterator first, iterator last, charT, Trans translate, const Allocator& a)
+{
+ typedef typename boost::detail::rebind_allocator<char, Allocator>::type atype;
+ int i, j, m;
+ i = 0;
+ m = static_cast<int>(boost::re_detail::distance(first, last));
+ ++m;
+ unsigned int size = sizeof(kmp_info<charT>) + sizeof(int)*m + sizeof(charT)*m;
+ --m;
+ //
+ // allocate struct and fill it in:
+ //
+ kmp_info<charT>* pinfo = reinterpret_cast<kmp_info<charT>*>(atype(a).allocate(size));
+ BOOST_REGEX_NOEH_ASSERT(pinfo)
+ pinfo->size = size;
+ pinfo->len = m;
+ charT* p = reinterpret_cast<charT*>(reinterpret_cast<char*>(pinfo) + sizeof(kmp_info<charT>) + sizeof(int)*(m+1));
+ pinfo->pstr = p;
+ while(first != last)
+ {
+ *p = translate(*first);
+ ++first;
+ ++p;
+ }
+ *p = 0;
+ //
+ // finally do regular kmp compile:
+ //
+ j = pinfo->kmp_next[0] = -1;
+ while (i < m)
+ {
+ while ((j > -1) && (pinfo->pstr[i] != pinfo->pstr[j]))
+ j = pinfo->kmp_next[j];
+ ++i;
+ ++j;
+ if (pinfo->pstr[i] == pinfo->pstr[j])
+ pinfo->kmp_next[i] = pinfo->kmp_next[j];
+ else
+ pinfo->kmp_next[i] = j;
+ }
+
+ return pinfo;
+}
+
+#ifdef __BORLANDC__
+ #pragma option pop
+#endif
+
+ } // namepsace re_detail
+} // namespace boost
+
+#endif // BOOST_REGEX_KMP_HPP
+
+
+
--- /dev/null
+/*
+ *
+ * Copyright (c) 1998-2002
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_libary_include.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
+ * Note this is an internal header file included
+ * by regex.hpp, do not include on its own.
+ */
+
+/*************************************************************************
+
+Libraries for Borland and Microsoft compilers are automatically
+selected here, the name of the lib is selected according to the following
+formula:
+
+BOOST_LIB_NAME
+ + "_"
+ + BOOST_LIB_TOOLSET
+ + "_"
+ + BOOST_LIB_THREAD_OPT
+ + BOOST_LIB_RT_OPT
+ + BOOST_LIB_LINK_OPT
+ + BOOST_LIB_DEBUG_OPT
+
+These are defined as:
+
+BOOST_LIB_NAME: The base name of the lib (boost_regex).
+
+BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).
+
+BOOST_LIB_THREAD_OPT: "s" for single thread builds,
+ "m" for multithread builds.
+
+BOOST_LIB_RT_OPT: "s" for static runtime,
+ "d" for dynamic runtime.
+
+BOOST_LIB_LINK_OPT: "s" for static link,
+ "i" for dynamic link.
+
+BOOST_LIB_DEBUG_OPT: nothing for release builds,
+ "d" for debug builds,
+ "dd" for debug-diagnostic builds (_STLP_DEBUG).
+
+***************************************************************************/
+
+#if !defined(BOOST_REGEX_LIBRARY_INCLUDE_HPP) && !defined(BOOST_REGEX_NO_LIB)
+#define BOOST_REGEX_LIBRARY_INCLUDE_HPP
+
+#define BOOST_LIB_NAME "boost_regex"
+
+//
+// select toolset:
+//
+#if defined(BOOST_MSVC) && (BOOST_MSVC == 1200) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
+
+ // vc6-stlport:
+# define BOOST_LIB_TOOLSET "vc6-stlport"
+
+#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1200)
+
+ // vc6:
+# define BOOST_LIB_TOOLSET "vc6"
+
+#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1300)
+
+ // vc7:
+# define BOOST_LIB_TOOLSET "vc7"
+
+#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x560)
+
+ // CBuilder 6:
+# define BOOST_LIB_TOOLSET "bcb6"
+
+#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
+
+ // CBuilder 6:
+# define BOOST_LIB_TOOLSET "bcb5"
+
+#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x540)
+
+ // CBuilder 6:
+# define BOOST_LIB_TOOLSET "bcb4"
+
+#endif
+
+//
+// select thread opt:
+//
+#if defined(_MT) || defined(__MT__)
+# define BOOST_LIB_THREAD_OPT "m"
+#else
+# define BOOST_LIB_THREAD_OPT "s"
+#endif
+
+//
+// select runtime opt:
+//
+#if defined(_DLL) || defined(_RTLDLL)
+# define BOOST_LIB_RT_OPT "d"
+#else
+# define BOOST_LIB_RT_OPT "s"
+#endif
+
+//
+// select linkage opt:
+//
+#if (defined(_DLL) || defined(_RTLDLL)) && !defined(BOOST_REGEX_STATIC_LINK)
+# define BOOST_LIB_LINK_OPT "i"
+#else
+# define BOOST_LIB_LINK_OPT "s"
+#endif
+
+//
+// select debug opt:
+//
+#if defined(BOOST_MSVC) && defined(_DEBUG) && (defined(_STLP_DEBUG) || defined(__STL_DEBUG))
+# define BOOST_LIB_DEBUG_OPT "dd"
+#elif defined(BOOST_MSVC) && defined(_DEBUG)
+# define BOOST_LIB_DEBUG_OPT "d"
+#elif defined(__BORLANDC__) && (__BORLANDC__ == 0x560) && (defined(_STLP_DEBUG) || defined(__STL_DEBUG))
+# define BOOST_LIB_DEBUG_OPT "dd"
+#else
+# define BOOST_LIB_DEBUG_OPT
+#endif
+
+//
+// now include the lib:
+//
+#if defined(BOOST_LIB_NAME) \
+ && defined(BOOST_LIB_TOOLSET) \
+ && defined(BOOST_LIB_THREAD_OPT) \
+ && defined(BOOST_LIB_RT_OPT) \
+ && defined(BOOST_LIB_LINK_OPT) \
+ && defined(BOOST_LIB_DEBUG_OPT)
+
+# pragma comment(lib, BOOST_LIB_NAME "_" BOOST_LIB_TOOLSET "_" BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_LINK_OPT BOOST_LIB_DEBUG_OPT ".lib")
+
+#endif
+
+//
+// finally undef any macros we may have set:
+//
+#if defined(BOOST_LIB_NAME)
+# undef BOOST_LIB_NAME
+#endif
+#if defined(BOOST_LIB_TOOLSET)
+# undef BOOST_LIB_TOOLSET
+#endif
+#if defined(BOOST_LIB_THREAD_OPT)
+# undef BOOST_LIB_THREAD_OPT
+#endif
+#if defined(BOOST_LIB_RT_OPT)
+# undef BOOST_LIB_RT_OPT
+#endif
+#if defined(BOOST_LIB_LINK_OPT)
+# undef BOOST_LIB_LINK_OPT
+#endif
+#if defined(BOOST_LIB_DEBUG_OPT)
+# undef BOOST_LIB_DEBUG_OPT
+#endif
+
+
+#endif // BOOST_REGEX_LIBRARY_INCLUDE_HPP
+
+
+
+
+
+
--- /dev/null
+/*
+ *
+ * Copyright (c) 1998-2002
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_match.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Regular expression matching algorithms.
+ * Note this is an internal header file included
+ * by regex.hpp, do not include on its own.
+ */
+
+
+#ifndef BOOST_REGEX_MATCH_HPP
+#define BOOST_REGEX_MATCH_HPP
+
+#ifndef BOOST_REGEX_MAX_STATE_COUNT
+# define BOOST_REGEX_MAX_STATE_COUNT 100000000
+#endif
+
+#include <boost/limits.hpp>
+
+
+namespace boost{
+ namespace re_detail{
+
+#ifdef __BORLANDC__
+ #pragma option push -a8 -b -Vx -Ve -pc -w-8026 -w-8027
+#endif
+
+//
+// Unfortunately Rogue Waves standard library appears to have a bug
+// in std::basic_string::compare that results in eroneous answers
+// in some cases (tested with Borland C++ 5.1, Rogue Wave lib version
+// 0x020101) the test case was:
+// {39135,0} < {0xff,0}
+// which succeeds when it should not.
+//
+#ifndef _RWSTD_VER
+# define STR_COMP(s,p) s.compare(p)
+#else
+template <class C, class T, class A>
+inline int string_compare(const std::basic_string<C,T,A>& s, const C* p)
+{ return s.compare(p); }
+inline int string_compare(const std::string& s, const char* p)
+{ return std::strcmp(s.c_str(), p); }
+inline int string_compare(const std::wstring& s, const wchar_t* p)
+{ return std::wcscmp(s.c_str(), p); }
+# define STR_COMP(s,p) string_compare(s,p)
+#endif
+
+template<class charT>
+inline const charT* re_skip_past_null(const charT* p)
+{
+ while (*p != 0) ++p;
+ return ++p;
+}
+
+template <class iterator, class charT, class traits_type, class Allocator>
+iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
+ iterator last,
+ const re_set_long* set_,
+ const reg_expression<charT, traits_type, Allocator>& e)
+{
+ const charT* p = reinterpret_cast<const charT*>(set_+1);
+ iterator ptr;
+ unsigned int i;
+ bool icase = e.flags() & regbase::icase;
+
+ if(next == last) return next;
+
+ typedef typename traits_type::string_type traits_string_type;
+ const traits_type& traits_inst = e.get_traits();
+
+ // dwa 9/13/00 suppress incorrect MSVC warning - it claims this is never
+ // referenced
+ (void)traits_inst;
+
+ // try and match a single character, could be a multi-character
+ // collating element...
+ for(i = 0; i < set_->csingles; ++i)
+ {
+ ptr = next;
+ if(*p == 0)
+ {
+ // treat null string as special case:
+ if(traits_inst.translate(*ptr, icase) != *p)
+ {
+ while(*p == 0)++p;
+ continue;
+ }
+ return set_->isnot ? next : (ptr == next) ? ++next : ptr;
+ }
+ else
+ {
+ while(*p && (ptr != last))
+ {
+ if(traits_inst.translate(*ptr, icase) != *p)
+ break;
+ ++p;
+ ++ptr;
+ }
+
+ if(*p == 0) // if null we've matched
+ return set_->isnot ? next : (ptr == next) ? ++next : ptr;
+
+ p = re_skip_past_null(p); // skip null
+ }
+ }
+
+ charT col = traits_inst.translate(*next, icase);
+
+
+ if(set_->cranges || set_->cequivalents)
+ {
+ traits_string_type s2(1, col);
+ traits_string_type s1;
+ //
+ // try and match a range, NB only a single character can match
+ if(set_->cranges)
+ {
+ if(e.flags() & regbase::nocollate)
+ s1 = s2;
+ else
+ traits_inst.transform(s1, s2);
+ for(i = 0; i < set_->cranges; ++i)
+ {
+ if(STR_COMP(s1, p) <= 0)
+ {
+ while(*p)++p;
+ ++p;
+ if(STR_COMP(s1, p) >= 0)
+ return set_->isnot ? next : ++next;
+ }
+ else
+ {
+ // skip first string
+ while(*p)++p;
+ ++p;
+ }
+ // skip second string
+ while(*p)++p;
+ ++p;
+ }
+ }
+ //
+ // try and match an equivalence class, NB only a single character can match
+ if(set_->cequivalents)
+ {
+ traits_inst.transform_primary(s1, s2);
+ for(i = 0; i < set_->cequivalents; ++i)
+ {
+ if(STR_COMP(s1, p) == 0)
+ return set_->isnot ? next : ++next;
+ // skip string
+ while(*p)++p;
+ ++p;
+ }
+ }
+ }
+ if(traits_inst.is_class(col, set_->cclasses) == true)
+ return set_->isnot ? next : ++next;
+ return set_->isnot ? ++next : next;
+}
+
+template <class iterator, class Allocator>
+class _priv_match_data
+{
+public:
+ typedef typename boost::detail::rebind_allocator<int, Allocator>::type i_alloc;
+ typedef typename boost::detail::rebind_allocator<iterator, Allocator>::type it_alloc;
+ typedef typename regex_iterator_traits<iterator>::difference_type difference_type;
+
+ match_results_base<iterator, Allocator> temp_match;
+ // failure stacks:
+ jstack<match_results_base<iterator, Allocator>, Allocator> matches;
+ jstack<iterator, Allocator> prev_pos;
+ jstack<const re_syntax_base*, Allocator> prev_record;
+ jstack<int, Allocator> prev_acc;
+ int* accumulators;
+ unsigned int caccumulators;
+ difference_type state_count;
+ difference_type max_state_count;
+ iterator* loop_starts;
+
+ _priv_match_data(const match_results_base<iterator, Allocator>&, iterator, iterator, std::size_t);
+
+ ~_priv_match_data()
+ {
+ m_free();
+ }
+ void m_free();
+ void set_accumulator_size(unsigned int size);
+ int* get_accumulators()
+ {
+ return accumulators;
+ }
+ iterator* get_loop_starts()
+ {
+ return loop_starts;
+ }
+ void estimate_max_state_count(iterator a, iterator b, std::size_t states, std::random_access_iterator_tag*)
+ {
+#ifndef BOOST_NO_STD_DISTANCE
+ difference_type dist = std::distance(a,b);
+#else
+ difference_type dist = b - a;
+#endif
+ states *= states;
+ difference_type lim = std::numeric_limits<difference_type>::max() - 1000 - states;
+ if(dist > (difference_type)(lim / states))
+ max_state_count = lim;
+ else
+ max_state_count = 1000 + states * dist;
+ }
+ void estimate_max_state_count(iterator a, iterator b, std::size_t states, void*)
+ {
+ // we don't know how long the sequence is:
+ max_state_count = BOOST_REGEX_MAX_STATE_COUNT;
+ }
+};
+
+template <class iterator, class Allocator>
+_priv_match_data<iterator, Allocator>::_priv_match_data(const match_results_base<iterator, Allocator>& m, iterator a, iterator b, std::size_t states)
+ : temp_match(m), matches(64, m.allocator()), prev_pos(64, m.allocator()), prev_record(64, m.allocator())
+{
+ typedef typename regex_iterator_traits<iterator>::iterator_category category;
+
+ accumulators = 0;
+ caccumulators = 0;
+ loop_starts = 0;
+ state_count = 0;
+ estimate_max_state_count(a, b, states, static_cast<category*>(0));
+}
+
+template <class iterator, class Allocator>
+void _priv_match_data<iterator, Allocator>::set_accumulator_size(unsigned int size)
+{
+ if(size > caccumulators)
+ {
+ m_free();
+ caccumulators = size;
+ accumulators = i_alloc(temp_match.allocator()).allocate(caccumulators);
+ BOOST_REGEX_NOEH_ASSERT(accumulators)
+ loop_starts = it_alloc(temp_match.allocator()).allocate(caccumulators);
+ BOOST_REGEX_NOEH_ASSERT(loop_starts)
+ for(unsigned i = 0; i < caccumulators; ++i)
+ new (loop_starts + i) iterator();
+ }
+}
+
+template <class iterator, class Allocator>
+void _priv_match_data<iterator, Allocator>::m_free()
+{
+ if(caccumulators)
+ {
+ i_alloc temp1(temp_match.allocator());
+ temp1.deallocate(accumulators, caccumulators);
+ for(unsigned i = 0; i < caccumulators; ++i)
+ ::boost::re_detail::pointer_destroy(loop_starts + i);
+ it_alloc temp2(temp_match.allocator());
+ temp2.deallocate(loop_starts, caccumulators);
+ }
+}
+
+template <class charT, class traits, class Allocator>
+struct access_t : public reg_expression<charT, traits, Allocator>
+{
+ typedef typename is_byte<charT>::width_type width_type;
+ typedef reg_expression<charT, traits, Allocator> base_type;
+ typedef charT char_type;
+ typedef traits traits_type;
+ typedef Allocator alloc_type;
+
+ static int repeat_count(const base_type& b)
+ { return base_type::repeat_count(b); }
+ static unsigned int restart_type(const base_type& b)
+ { return base_type::restart_type(b); }
+ static const re_syntax_base* first(const base_type& b)
+ { return base_type::first(b); }
+ static const unsigned char* get_map(const base_type& b)
+ { return base_type::get_map(b); }
+ static std::size_t leading_length(const base_type& b)
+ { return base_type::leading_length(b); }
+ static const kmp_info<charT>* get_kmp(const base_type& b)
+ { return base_type::get_kmp(b); }
+ static bool can_start(char_type c, const unsigned char* _map, unsigned char mask)
+ {
+ return reg_expression<char_type, traits_type, alloc_type>::can_start(c, _map, mask, width_type());
+ }
+};
+
+
+#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
+//
+// Ugly ugly hack,
+// template don't merge if they contain switch statements so declare these
+// templates in unnamed namespace (ie with internal linkage), each translation
+// unit then gets its own local copy, it works seemlessly but bloats the app.
+namespace{
+#endif
+
+template <class iterator, class Allocator, class charT, class traits, class Allocator2>
+bool query_match_aux(iterator first,
+ iterator last,
+ match_results<iterator, Allocator>& m,
+ const reg_expression<charT, traits, Allocator2>& e,
+ unsigned flags,
+ _priv_match_data<iterator, Allocator>& pd,
+ iterator* restart)
+{
+ typedef access_t<charT, traits, Allocator2> access;
+
+ if(e.flags() & regbase::failbit)
+ return false;
+
+ typedef typename traits::size_type traits_size_type;
+ typedef typename traits::uchar_type traits_uchar_type;
+ typedef typename is_byte<charT>::width_type width_type;
+ typedef typename re_detail::regex_iterator_traits<iterator>::difference_type difference_type;
+
+ // declare some local aliases to reduce pointer loads
+ // good optimising compilers should make this unnecessary!!
+ jstack<match_results_base<iterator, Allocator>, Allocator>& matches = pd.matches;
+ jstack<iterator, Allocator>& prev_pos = pd.prev_pos;
+ jstack<const re_syntax_base*, Allocator>& prev_record = pd.prev_record;
+ jstack<int, Allocator>& prev_acc = pd.prev_acc;
+ match_results_base<iterator, Allocator>& temp_match = pd.temp_match;
+ temp_match.set_first(first);
+ difference_type& state_count = pd.state_count;
+
+ const re_syntax_base* ptr = access::first(e);
+ bool match_found = false;
+ bool have_partial_match = false;
+ bool unwind_stack = false;
+ bool need_push_match = (e.mark_count() > 1);
+ int cur_acc = -1; // no active accumulator
+ pd.set_accumulator_size(access::repeat_count(e));
+ int* accumulators = pd.get_accumulators();
+ iterator* start_loop = pd.get_loop_starts();
+ int k; // for loops
+ bool icase = e.flags() & regbase::icase;
+ *restart = first;
+ iterator base = first;
+ const traits& traits_inst = e.get_traits();
+ // dwa 9/13/00 suppress incorrect MSVC warning - it claims this is never
+ // referenced
+ (void)traits_inst;
+
+ // prepare m for failure:
+ /*
+ if((flags & match_init) == 0)
+ {
+ m.init_fail(first, last);
+ } */
+
+ retry:
+
+ while(first != last)
+ {
+ jm_assert(ptr);
+ ++state_count;
+ switch(ptr->type)
+ {
+ case syntax_element_match:
+ match_jump:
+ {
+ // match found, save then fallback in case we missed a
+ // longer one.
+ if((flags & match_not_null) && (first == temp_match[0].first))
+ goto failure;
+ if((flags & match_all) && (first != last))
+ goto failure;
+ temp_match.set_second(first);
+ m.maybe_assign(temp_match);
+ match_found = true;
+ if(((flags & match_any) && ((first == last) || !(flags & match_all))) || ((first == last) && (need_push_match == false)))
+ {
+ // either we don't care what we match or we've matched
+ // the whole string and can't match anything longer.
+ while(matches.empty() == false)
+ matches.pop();
+ while(prev_pos.empty() == false)
+ prev_pos.pop();
+ while(prev_record.empty() == false)
+ prev_record.pop();
+ while(prev_acc.empty() == false)
+ prev_acc.pop();
+ return true;
+ }
+ }
+ goto failure;
+ case syntax_element_startmark:
+ start_mark_jump:
+ if(static_cast<const re_brace*>(ptr)->index > 0)
+ {
+ temp_match.set_first(first, static_cast<const re_brace*>(ptr)->index);
+ }
+ else if(
+ (static_cast<const re_brace*>(ptr)->index == -1)
+ || (static_cast<const re_brace*>(ptr)->index == -2)
+ )
+ {
+ matches.push(temp_match);
+ for(k = 0; k <= cur_acc; ++k)
+ prev_pos.push(start_loop[k]);
+ prev_pos.push(first);
+ prev_record.push(ptr);
+ for(k = 0; k <= cur_acc; ++k)
+ prev_acc.push(accumulators[k]);
+ prev_acc.push(cur_acc);
+ prev_acc.push(match_found);
+ match_found = false;
+ // skip next jump and fall through:
+ ptr = ptr->next.p;
+ }
+ ptr = ptr->next.p;
+ break;
+ case syntax_element_endmark:
+ end_mark_jump:
+ if(static_cast<const re_brace*>(ptr)->index > 0)
+ {
+ temp_match.set_second(first, static_cast<const re_brace*>(ptr)->index);
+ }
+ else if(
+ (static_cast<const re_brace*>(ptr)->index == -1)
+ || (static_cast<const re_brace*>(ptr)->index == -2)
+ )
+ {
+ match_found = true;
+ unwind_stack = true;
+ goto failure;
+ }
+ ptr = ptr->next.p;
+ break;
+ case syntax_element_literal:
+ {
+ unsigned int len = static_cast<const re_literal*>(ptr)->length;
+ const charT* what = reinterpret_cast<const charT*>(static_cast<const re_literal*>(ptr) + 1);
+ //
+ // compare string with what we stored in
+ // our records:
+ for(unsigned int i = 0; i < len; ++i, ++first)
+ {
+ if((first == last) || (traits_inst.translate(*first, icase) != what[i]))
+ goto failure;
+ }
+ ptr = ptr->next.p;
+ break;
+ }
+ case syntax_element_start_line:
+ outer_line_check:
+ if(first == temp_match[0].first)
+ {
+ // we're at the start of the buffer
+ if(flags & match_prev_avail)
+ {
+ inner_line_check:
+ // check the previous value even though its before
+ // the start of our "buffer".
+ iterator t(first);
+ --t;
+ if(traits::is_separator(*t) && !((*t == '\r') && (*first == '\n')) )
+ {
+ ptr = ptr->next.p;
+ continue;
+ }
+ goto failure;
+ }
+ if((flags & match_not_bol) == 0)
+ {
+ ptr = ptr->next.p;
+ continue;
+ }
+ goto failure;
+ }
+ // we're in the middle of the string
+ goto inner_line_check;
+ case syntax_element_end_line:
+ // we're not yet at the end so *first is always valid:
+ if(traits::is_separator(*first))
+ {
+ if((first != base) || (flags & match_prev_avail))
+ {
+ // check that we're not in the middle of \r\n sequence
+ iterator t(first);
+ --t;
+ if((*t == '\r') && (*first == '\n'))
+ {
+ goto failure;
+ }
+ }
+ ptr = ptr->next.p;
+ continue;
+ }
+ goto failure;
+ case syntax_element_wild:
+ // anything except possibly NULL or \n:
+ if(traits::is_separator(*first))
+ {
+ if(flags & match_not_dot_newline)
+ goto failure;
+ ptr = ptr->next.p;
+ ++first;
+ continue;
+ }
+ if(*first == charT(0))
+ {
+ if(flags & match_not_dot_null)
+ goto failure;
+ ptr = ptr->next.p;
+ ++first;
+ continue;
+ }
+ ptr = ptr->next.p;
+ ++first;
+ break;
+ case syntax_element_word_boundary:
+ {
+ // prev and this character must be opposites:
+#if defined(BOOST_REGEX_USE_C_LOCALE) && defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ < 95)
+ bool b = traits::is_class(*first, traits::char_class_word);
+#else
+ bool b = traits_inst.is_class(*first, traits::char_class_word);
+#endif
+ if((first == temp_match[0].first) && ((flags & match_prev_avail) == 0))
+ {
+ if(flags & match_not_bow)
+ b ^= true;
+ else
+ b ^= false;
+ }
+ else
+ {
+ --first;
+ b ^= traits_inst.is_class(*first, traits::char_class_word);
+ ++first;
+ }
+ if(b)
+ {
+ ptr = ptr->next.p;
+ continue;
+ }
+ goto failure;
+ }
+ case syntax_element_within_word:
+ // both prev and this character must be traits::char_class_word:
+ if(traits_inst.is_class(*first, traits::char_class_word))
+ {
+ bool b;
+ if((first == temp_match[0].first) && ((flags & match_prev_avail) == 0))
+ b = false;
+ else
+ {
+ --first;
+ b = traits_inst.is_class(*first, traits::char_class_word);
+ ++first;
+ }
+ if(b)
+ {
+ ptr = ptr->next.p;
+ continue;
+ }
+ }
+ goto failure;
+ case syntax_element_word_start:
+ if((first == temp_match[0].first) && ((flags & match_prev_avail) == 0))
+ {
+ // start of buffer:
+ if(flags & match_not_bow)
+ goto failure;
+ if(traits_inst.is_class(*first, traits::char_class_word))
+ {
+ ptr = ptr->next.p;
+ continue;
+ }
+ goto failure;
+ }
+ // otherwise inside buffer:
+ if(traits_inst.is_class(*first, traits::char_class_word))
+ {
+ iterator t(first);
+ --t;
+ if(traits_inst.is_class(*t, traits::char_class_word) == false)
+ {
+ ptr = ptr->next.p;
+ continue;
+ }
+ }
+ goto failure; // if we fall through to here then we've failed
+ case syntax_element_word_end:
+ if((first == temp_match[0].first) && ((flags & match_prev_avail) == 0))
+ goto failure; // start of buffer can't be end of word
+
+ // otherwise inside buffer:
+ if(traits_inst.is_class(*first, traits::char_class_word) == false)
+ {
+ iterator t(first);
+ --t;
+ if(traits_inst.is_class(*t, traits::char_class_word))
+ {
+ ptr = ptr->next.p;
+ continue;
+ }
+ }
+ goto failure; // if we fall through to here then we've failed
+ case syntax_element_buffer_start:
+ if((first != temp_match[0].first) || (flags & match_not_bob))
+ goto failure;
+ // OK match:
+ ptr = ptr->next.p;
+ break;
+ case syntax_element_buffer_end:
+ if((first != last) || (flags & match_not_eob))
+ goto failure;
+ // OK match:
+ ptr = ptr->next.p;
+ break;
+ case syntax_element_backref:
+ {
+ // compare with what we previously matched:
+ iterator i = temp_match[static_cast<const re_brace*>(ptr)->index].first;
+ iterator j = temp_match[static_cast<const re_brace*>(ptr)->index].second;
+ while(i != j)
+ {
+ if((first == last) || (traits_inst.translate(*first, icase) != traits_inst.translate(*i, icase)))
+ goto failure;
+ ++i;
+ ++first;
+ }
+ ptr = ptr->next.p;
+ break;
+ }
+ case syntax_element_long_set:
+ {
+ // let the traits class do the work:
+ iterator t = re_is_set_member(first, last, static_cast<const re_set_long*>(ptr), e);
+ if(t != first)
+ {
+ ptr = ptr->next.p;
+ first = t;
+ continue;
+ }
+ goto failure;
+ }
+ case syntax_element_set:
+ // lookup character in table:
+ if(static_cast<const re_set*>(ptr)->_map[(traits_uchar_type)traits_inst.translate(*first, icase)])
+ {
+ ptr = ptr->next.p;
+ ++first;
+ continue;
+ }
+ goto failure;
+ case syntax_element_jump:
+ ptr = static_cast<const re_jump*>(ptr)->alt.p;
+ continue;
+ case syntax_element_alt:
+ {
+ // alt_jump:
+ if(access::can_start(*first, static_cast<const re_jump*>(ptr)->_map, (unsigned char)mask_take))
+ {
+ // we can take the first alternative,
+ // see if we need to push next alternative:
+ if(access::can_start(*first, static_cast<const re_jump*>(ptr)->_map, mask_skip))
+ {
+ if(need_push_match)
+ matches.push(temp_match);
+ for(k = 0; k <= cur_acc; ++k)
+ prev_pos.push(start_loop[k]);
+ prev_pos.push(first);
+ prev_record.push(ptr);
+ for(k = 0; k <= cur_acc; ++k)
+ prev_acc.push(accumulators[k]);
+ prev_acc.push(cur_acc);
+ }
+ ptr = ptr->next.p;
+ continue;
+ }
+ if(access::can_start(*first, static_cast<const re_jump*>(ptr)->_map, mask_skip))
+ {
+ ptr = static_cast<const re_jump*>(ptr)->alt.p;
+ continue;
+ }
+ goto failure; // neither option is possible
+ }
+ case syntax_element_rep:
+ {
+ // repeater_jump:
+ // if we're moving to a higher id (nested repeats etc)
+ // zero out our accumualtors:
+ if(cur_acc < static_cast<const re_repeat*>(ptr)->id)
+ {
+ cur_acc = static_cast<const re_repeat*>(ptr)->id;
+ accumulators[cur_acc] = 0;
+ start_loop[cur_acc] = first;
+ }
+
+ cur_acc = static_cast<const re_repeat*>(ptr)->id;
+
+ if(static_cast<const re_repeat*>(ptr)->leading)
+ *restart = first;
+
+ //charT c = traits_inst.translate(*first);
+
+ // first of all test for special case where this is last element,
+ // if that is the case then repeat as many times as possible,
+ // as long as the repeat is greedy:
+
+ if((static_cast<const re_repeat*>(ptr)->alt.p->type == syntax_element_match)
+ && (static_cast<const re_repeat*>(ptr)->greedy == true))
+ {
+ // see if we can take the repeat:
+ if(((unsigned int)accumulators[cur_acc] < static_cast<const re_repeat*>(ptr)->max)
+ && access::can_start(*first, static_cast<const re_repeat*>(ptr)->_map, mask_take))
+ {
+ // push terminating match as fallback:
+ if((unsigned int)accumulators[cur_acc] >= static_cast<const re_repeat*>(ptr)->min)
+ {
+ if((prev_record.empty() == false) && (prev_record.peek() == static_cast<const re_repeat*>(ptr)->alt.p))
+ {
+ // we already have the required fallback
+ // don't add any more, just update this one:
+ if(need_push_match)
+ matches.peek() = temp_match;
+ prev_pos.peek() = first;
+ }
+ else
+ {
+ if(need_push_match)
+ matches.push(temp_match);
+ prev_pos.push(first);
+ prev_record.push(static_cast<const re_repeat*>(ptr)->alt.p);
+ }
+ }
+ // move to next item in list:
+ if((first != start_loop[cur_acc]) || !accumulators[cur_acc])
+ {
+ ++accumulators[cur_acc];
+ ptr = ptr->next.p;
+ start_loop[cur_acc] = first;
+ continue;
+ }
+ goto failure;
+ }
+ // see if we can skip the repeat:
+ if(((unsigned int)accumulators[cur_acc] >= static_cast<const re_repeat*>(ptr)->min)
+ && access::can_start(*first, static_cast<const re_repeat*>(ptr)->_map, mask_skip))
+ {
+ ptr = static_cast<const re_repeat*>(ptr)->alt.p;
+ continue;
+ }
+ // otherwise fail:
+ goto failure;
+ }
+
+ // OK if we get to here then the repeat is either non-terminal or non-greedy,
+ // see if we can skip the repeat:
+ if(((unsigned int)accumulators[cur_acc] >= static_cast<const re_repeat*>(ptr)->min)
+ && access::can_start(*first, static_cast<const re_repeat*>(ptr)->_map, mask_skip))
+ {
+ // see if we can push failure info:
+ if(((unsigned int)accumulators[cur_acc] < static_cast<const re_repeat*>(ptr)->max)
+ && access::can_start(*first, static_cast<const re_repeat*>(ptr)->_map, mask_take))
+ {
+ // check to see if the last loop matched a NULL string
+ // if so then we really don't want to loop again:
+ if(((unsigned int)accumulators[cur_acc] == static_cast<const re_repeat*>(ptr)->min)
+ || (first != start_loop[cur_acc]))
+ {
+ if(need_push_match)
+ matches.push(temp_match);
+ prev_pos.push(first);
+ prev_record.push(ptr);
+ for(k = 0; k <= cur_acc; ++k)
+ prev_acc.push(accumulators[k]);
+ // for non-greedy repeats save whether we have a match already:
+ if(static_cast<const re_repeat*>(ptr)->greedy == false)
+ {
+ prev_acc.push(match_found);
+ match_found = false;
+ }
+ }
+ }
+ ptr = static_cast<const re_repeat*>(ptr)->alt.p;
+ continue;
+ }
+
+ // otherwise see if we can take the repeat:
+ if(((unsigned int)accumulators[cur_acc] < static_cast<const re_repeat*>(ptr)->max)
+ && access::can_start(*first, static_cast<const re_repeat*>(ptr)->_map, mask_take) &&
+ ((first != start_loop[cur_acc]) || !accumulators[cur_acc]))
+ {
+ // move to next item in list:
+ ++accumulators[cur_acc];
+ ptr = ptr->next.p;
+ start_loop[cur_acc] = first;
+ continue;
+ }
+
+ // if we get here then neither option is allowed so fail:
+ goto failure;
+
+ }
+ case syntax_element_combining:
+ if(traits_inst.is_combining(traits_inst.translate(*first, icase)))
+ goto failure;
+ ++first;
+ while((first != last) && traits_inst.is_combining(traits_inst.translate(*first, icase)))++first;
+ ptr = ptr->next.p;
+ continue;
+ case syntax_element_soft_buffer_end:
+ {
+ if(flags & match_not_eob)
+ goto failure;
+ iterator p(first);
+ while((p != last) && traits_inst.is_separator(traits_inst.translate(*first, icase)))++p;
+ if(p != last)
+ goto failure;
+ ptr = ptr->next.p;
+ continue;
+ }
+ case syntax_element_restart_continue:
+ if(first != temp_match[-1].first)
+ goto failure;
+ ptr = ptr->next.p;
+ continue;
+ default:
+ jm_assert(0); // should never get to here!!
+ return false;
+ }
+ }
+
+ //
+ // if we get to here then we've run out of characters to match against,
+ // we could however still have non-character regex items left
+ if((ptr->can_be_null == 0) && ((flags & match_partial) == 0))
+ goto failure;
+ while(true)
+ {
+ jm_assert(ptr);
+ ++state_count;
+ switch(ptr->type)
+ {
+ case syntax_element_match:
+ goto match_jump;
+ case syntax_element_startmark:
+ goto start_mark_jump;
+ case syntax_element_endmark:
+ goto end_mark_jump;
+ case syntax_element_start_line:
+ goto outer_line_check;
+ case syntax_element_end_line:
+ // we're at the end so *first is never valid:
+ if((flags & match_not_eol) == 0)
+ {
+ ptr = ptr->next.p;
+ continue;
+ }
+ goto failure;
+ case syntax_element_word_boundary:
+ case syntax_element_word_end:
+ if(((flags & match_not_eow) == 0) && (first != temp_match[0].first))
+ {
+ iterator t(first);
+ --t;
+ if(traits_inst.is_class(*t, traits::char_class_word))
+ {
+ ptr = ptr->next.p;
+ continue;
+ }
+ }
+ goto failure;
+ case syntax_element_buffer_end:
+ case syntax_element_soft_buffer_end:
+ if(flags & match_not_eob)
+ goto failure;
+ // OK match:
+ ptr = ptr->next.p;
+ break;
+ case syntax_element_jump:
+ ptr = static_cast<const re_jump*>(ptr)->alt.p;
+ continue;
+ case syntax_element_alt:
+ if(ptr->can_be_null & mask_take)
+ {
+ // we can test the first alternative,
+ // see if we need to push next alternative:
+ if(ptr->can_be_null & mask_skip)
+ {
+ if(need_push_match)
+ matches.push(temp_match);
+ for(k = 0; k <= cur_acc; ++k)
+ prev_pos.push(start_loop[k]);
+ prev_pos.push(first);
+ prev_record.push(ptr);
+ for(k = 0; k <= cur_acc; ++k)
+ prev_acc.push(accumulators[k]);
+ prev_acc.push(cur_acc);
+ }
+ ptr = ptr->next.p;
+ continue;
+ }
+ if(ptr->can_be_null & mask_skip)
+ {
+ ptr = static_cast<const re_jump*>(ptr)->alt.p;
+ continue;
+ }
+ goto failure; // neither option is possible
+ case syntax_element_rep:
+ // if we're moving to a higher id (nested repeats etc)
+ // zero out our accumualtors:
+ if(cur_acc < static_cast<const re_repeat*>(ptr)->id)
+ {
+ cur_acc = static_cast<const re_repeat*>(ptr)->id;
+ accumulators[cur_acc] = 0;
+ start_loop[cur_acc] = first;
+ }
+
+ cur_acc = static_cast<const re_repeat*>(ptr)->id;
+
+ // see if we can skip the repeat:
+ if(((unsigned int)accumulators[cur_acc] >= static_cast<const re_repeat*>(ptr)->min)
+ && ((ptr->can_be_null & mask_skip) || (flags & match_partial)))
+ {
+ // don't push failure info, there's no point:
+ ptr = static_cast<const re_repeat*>(ptr)->alt.p;
+ continue;
+ }
+
+ // otherwise see if we can take the repeat:
+ if(((unsigned int)accumulators[cur_acc] < static_cast<const re_repeat*>(ptr)->max)
+ && (((ptr->can_be_null & (mask_take | mask_skip)) == (mask_take | mask_skip))) || (flags & match_partial))
+ {
+ // move to next item in list:
+ ++accumulators[cur_acc];
+ ptr = ptr->next.p;
+ start_loop[cur_acc] = first;
+ continue;
+ }
+
+ // if we get here then neither option is allowed so fail:
+ goto failure;
+ case syntax_element_restart_continue:
+ if(first != temp_match[-1].first)
+ goto failure;
+ ptr = ptr->next.p;
+ continue;
+ default:
+ goto failure;
+ }
+ }
+
+ failure:
+
+ //
+ // check to see if we've been searching too many states:
+ //
+ if(state_count >= pd.max_state_count)
+ {
+#ifndef BOOST_NO_EXCEPTIONS
+ throw std::runtime_error("Max regex search depth exceeded.");
+#else
+ while(matches.empty() == false)
+ matches.pop();
+ while(prev_pos.empty() == false)
+ prev_pos.pop();
+ while(prev_record.empty() == false)
+ prev_record.pop();
+ while(prev_acc.empty() == false)
+ prev_acc.pop();
+ return false;
+#endif
+ }
+
+ //
+ // check for possible partial match:
+ //
+ if((flags & match_partial)
+ && !match_found // no full match already
+ && (base != first) // some charcters have been consumed
+ && (first == last)) // end of input has been reached
+ {
+ have_partial_match = true;
+ temp_match.set_second(first, 0, false);
+ m.maybe_assign(temp_match);
+ }
+
+ if(prev_record.empty() == false)
+ {
+ ptr = prev_record.peek();
+ switch(ptr->type)
+ {
+ case syntax_element_alt:
+ // get next alternative:
+ ptr = static_cast<const re_jump*>(ptr)->alt.p;
+ if(need_push_match)
+ matches.pop(temp_match);
+ prev_acc.pop(cur_acc);
+ for(k = cur_acc; k >= 0; --k)
+ prev_acc.pop(accumulators[k]);
+ prev_pos.pop(first);
+ for(k = cur_acc; k >= 0; --k)
+ prev_pos.pop(start_loop[k]);
+ prev_record.pop();
+ if(unwind_stack) goto failure; // unwinding forward assert
+ goto retry;
+ case syntax_element_rep:
+ {
+ // we're doing least number of repeats first,
+ // increment count and repeat again:
+ bool saved_matched = match_found;
+ if(need_push_match)
+ matches.pop(temp_match);
+ prev_pos.pop(first);
+ cur_acc = static_cast<const re_repeat*>(ptr)->id;
+ if(static_cast<const re_repeat*>(ptr)->greedy == false)
+ {
+ saved_matched = prev_acc.peek();
+ prev_acc.pop();
+ }
+ for(k = cur_acc; k >= 0; --k)
+ prev_acc.pop(accumulators[k]);
+ prev_record.pop();
+ if(unwind_stack) goto failure; // unwinding forward assert
+ if((unsigned int)++accumulators[cur_acc] > static_cast<const re_repeat*>(ptr)->max)
+ goto failure; // repetions exhausted.
+ //
+ // if the repeat is non-greedy, and we found a match then fail again:
+ if((static_cast<const re_repeat*>(ptr)->greedy == false) && (match_found == true))
+ {
+ goto failure;
+ }
+ else if (match_found == false)
+ match_found = saved_matched;
+ ptr = ptr->next.p;
+ start_loop[cur_acc] = first;
+ goto retry;
+ }
+ case syntax_element_startmark:
+ {
+ bool saved_matched = match_found;
+ matches.pop(temp_match);
+ match_found = prev_acc.peek();
+ prev_acc.pop();
+ prev_acc.pop(cur_acc);
+ for(k = cur_acc; k >= 0; --k)
+ prev_acc.pop(accumulators[k]);
+ prev_pos.pop(first);
+ for(k = cur_acc; k >= 0; --k)
+ prev_pos.pop(start_loop[k]);
+ prev_record.pop();
+ unwind_stack = false;
+ if(static_cast<const re_brace*>(ptr)->index == -1)
+ {
+ if (saved_matched == false)
+ goto failure;
+ ptr = static_cast<const re_jump*>(ptr->next.p)->alt.p->next.p;
+ goto retry;
+ }
+ if(static_cast<const re_brace*>(ptr)->index == -2)
+ {
+ if (saved_matched == true)
+ goto failure;
+ ptr = static_cast<const re_jump*>(ptr->next.p)->alt.p->next.p;
+ goto retry;
+ }
+ else goto failure;
+ }
+ case syntax_element_match:
+ if(need_push_match)
+ matches.pop(temp_match);
+ prev_pos.pop(first);
+ prev_record.pop();
+ if(unwind_stack) goto failure; // unwinding forward assert
+ goto retry;
+ default:
+ jm_assert(0);
+ // mustn't get here!!
+ }
+ }
+
+ if(match_found || have_partial_match)
+ {
+ pd.state_count = 0;
+ return true;
+ }
+
+ // if we get to here then everything has failed
+ // and no match was found:
+ return false;
+}
+#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
+} // namespace
+#endif
+
+
+template <class iterator>
+void _skip_and_inc(unsigned int& clines, iterator& last_line, iterator& first, const iterator last)
+{
+ while(first != last)
+ {
+ if(*first == '\n')
+ {
+ last_line = ++first;
+ ++clines;
+ }
+ else
+ ++first;
+ }
+}
+
+template <class iterator>
+void _skip_and_dec(unsigned int& clines, iterator& last_line, iterator& first, iterator base, std::size_t len)
+{
+ bool need_line = false;
+ for(std::size_t i = 0; i < len; ++i)
+ {
+ --first;
+ if(*first == '\n')
+ {
+ need_line = true;
+ --clines;
+ }
+ }
+
+ if(need_line)
+ {
+ last_line = first;
+
+ if(last_line != base)
+ --last_line;
+ else
+ return;
+
+ while((last_line != base) && (*last_line != '\n'))
+ --last_line;
+ if(*last_line == '\n')
+ ++last_line;
+ }
+}
+
+template <class iterator>
+inline void _inc_one(unsigned int& clines, iterator& last_line, iterator& first)
+{
+ if(*first == '\n')
+ {
+ last_line = ++first;
+ ++clines;
+ }
+ else
+ ++first;
+}
+
+template <class iterator, class Allocator>
+struct grep_search_predicate
+{
+ match_results<iterator, Allocator>* pm;
+ grep_search_predicate(match_results<iterator, Allocator>* p) : pm(p) {}
+ bool operator()(const match_results<iterator, Allocator>& m)
+ {
+ *pm = static_cast<const match_results_base<iterator, Allocator>&>(m);
+ return false;
+ }
+};
+
+#if !defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
+
+template <class iterator, class Allocator>
+inline const match_results_base<iterator, Allocator>& grep_out_type(const grep_search_predicate<iterator, Allocator>& o, const Allocator&)
+{
+ return *(o.pm);
+}
+
+#endif
+
+template <class T, class Allocator>
+inline const Allocator& grep_out_type(const T&, const Allocator& a)
+{
+ return a;
+}
+
+#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
+//
+// Ugly ugly hack,
+// template don't merge if they contain switch statements so declare these
+// templates in unnamed namespace (ie with internal linkage), each translation
+// unit then gets its own local copy, it works seemlessly but bloats the app.
+namespace{
+#endif
+
+//
+// reg_grep2:
+// find all non-overlapping matches within the sequence first last:
+//
+template <class Predicate, class I, class charT, class traits, class A, class A2>
+unsigned int reg_grep2(Predicate foo, I first, I last, const reg_expression<charT, traits, A>& e, unsigned flags, A2 a)
+{
+ typedef access_t<charT, traits, A> access;
+
+ if(e.flags() & regbase::failbit)
+ return 0;
+
+ typedef typename traits::size_type traits_size_type;
+ typedef typename traits::uchar_type traits_uchar_type;
+ typedef typename is_byte<charT>::width_type width_type;
+
+ match_results<I, A2> m(grep_out_type(foo, a));
+ I restart;
+ m.set_size(e.mark_count(), first, last);
+ m.set_line(1, first);
+ m.set_base(first);
+
+ unsigned int clines = 1;
+ unsigned int cmatches = 0;
+ I last_line = first;
+ I next_base;
+ I base = first;
+ bool need_init;
+ bool leading_match = false;
+ const traits& traits_inst = e.get_traits();
+ // dwa 9/13/00 suppress incorrect MSVC warning - it claims this is never
+ // referenced
+ (void)traits_inst;
+
+ flags |= match_init;
+
+ _priv_match_data<I, A2> pd(m, first, last, e.size());
+
+ const unsigned char* _map = access::get_map(e);
+ unsigned int type;
+
+ if(first == last)
+ {
+ // special case, only test if can_be_null,
+ // don't dereference any pointers!!
+ if(access::first(e)->can_be_null)
+ {
+ if(query_match_aux(first, last, m, e, flags, pd, &restart))
+ {
+ foo(m);
+ ++cmatches;
+ }
+ }
+ return cmatches;
+ }
+
+ // try one time whatever:
+ if( access::can_start(*first, _map, (unsigned char)mask_any) )
+ {
+ if(query_match_aux(first, last, m, e, flags, pd, &restart))
+ {
+ ++cmatches;
+ leading_match = true;
+ if(foo(m) == false)
+ return cmatches;
+ if(m[0].second == last)
+ return cmatches;
+ // update to end of what matched
+ // trying to match again with match_not_null set if this
+ // is a null match...
+ need_init = true;
+ if(first == m[0].second)
+ {
+ next_base = m[0].second;
+ pd.temp_match.init_fail(next_base, last);
+ m.init_fail(next_base, last);
+ if(query_match_aux(first, last, m, e, flags | match_not_null, pd, &restart))
+ {
+ ++cmatches;
+ if(foo(m) == false)
+ return cmatches;
+ }
+ else
+ {
+ need_init = false;
+ leading_match = false;
+ for(unsigned int i = 0; (restart != first) && (i < access::leading_length(e)); ++i, --restart)
+ {} // dwa 10/20/2000 - warning suppression for MWCW
+ if(restart != last)
+ ++restart;
+ _skip_and_inc(clines, last_line, first, restart);
+ }
+ }
+ if(need_init)
+ {
+ _skip_and_inc(clines, last_line, first, m[0].second);
+ next_base = m[0].second;
+ pd.temp_match.init_fail(next_base, last);
+ m.init_fail(next_base, last);
+ }
+ }
+ else
+ {
+ for(unsigned int i = 0; (restart != first) && (i < access::leading_length(e)); ++i, --restart)
+ {} // dwa 10/20/2000 - warning suppression for MWCW
+ if(restart != last)
+ ++restart;
+ _skip_and_inc(clines, last_line, first, restart);
+ }
+ }
+ else
+ _inc_one(clines, last_line, first);
+ flags |= match_prev_avail | match_not_bob;
+
+
+ // depending on what the first record is we may be able to
+ // optimise the search:
+ type = (flags & match_continuous) ?
+ static_cast<unsigned int>(regbase::restart_continue)
+ : static_cast<unsigned int>(access::restart_type(e));
+
+ if(type == regbase::restart_buf)
+ return cmatches;
+
+ switch(type)
+ {
+ case regbase::restart_lit:
+ case regbase::restart_fixed_lit:
+ {
+ const kmp_info<charT>* info = access::get_kmp(e);
+ int len = info->len;
+ const charT* x = info->pstr;
+ int j = 0;
+ bool icase = e.flags() & regbase::icase;
+ while (first != last)
+ {
+ while((j > -1) && (x[j] != traits_inst.translate(*first, icase)))
+ j = info->kmp_next[j];
+ _inc_one(clines, last_line, first);
+ ++j;
+ if(j >= len)
+ {
+ if(type == regbase::restart_fixed_lit)
+ {
+ _skip_and_dec(clines, last_line, first, base, j);
+ restart = first;
+ std::advance(restart, len);
+ m.set_first(first);
+ m.set_second(restart);
+ m.set_line(clines, last_line);
+ ++cmatches;
+ if(foo(m) == false)
+ return cmatches;
+ if(m[0].second == last)
+ return cmatches;
+ _skip_and_inc(clines, last_line, first, restart);
+ next_base = m[0].second;
+ pd.temp_match.init_fail(next_base, last);
+ m.init_fail(next_base, last);
+ j = 0;
+ }
+ else
+ {
+ restart = first;
+ _skip_and_dec(clines, last_line, first, base, j);
+ if(query_match_aux(first, last, m, e, flags, pd, &restart))
+ {
+
+ m.set_line(clines, last_line);
+ ++cmatches;
+ if(foo(m) == false)
+ return cmatches;
+ if(m[0].second == last)
+ return cmatches;
+ // update to end of what matched
+ _skip_and_inc(clines, last_line, first, m[0].second);
+ next_base = m[0].second;
+ pd.temp_match.init_fail(next_base, last);
+ m.init_fail(next_base, last);
+ j = 0;
+ }
+ else
+ {
+ for(int k = 0; (restart != first) && (k < j); ++k, --restart)
+ {} // dwa 10/20/2000 - warning suppression for MWCW
+ if(restart != last)
+ ++restart;
+ _skip_and_inc(clines, last_line, first, restart);
+ j = 0; //we could do better than this...
+ }
+ }
+ }
+ }
+ break;
+ }
+ case regbase::restart_any:
+ {
+ while(first != last)
+ {
+ if( access::can_start(*first, _map, (unsigned char)mask_any) )
+ {
+ if(query_match_aux(first, last, m, e, flags, pd, &restart))
+ {
+
+ m.set_line(clines, last_line);
+ ++cmatches;
+ if(foo(m) == false)
+ return cmatches;
+ if(m[0].second == last)
+ return cmatches;
+ // update to end of what matched
+ // trying to match again with match_not_null set if this
+ // is a null match...
+ need_init = true;
+ if(first == m[0].second)
+ {
+ next_base = m[0].second;
+ pd.temp_match.init_fail(next_base, last);
+ m.init_fail(next_base, last);
+ if(query_match_aux(first, last, m, e, flags | match_not_null, pd, &restart))
+ {
+ m.set_line(clines, last_line);
+ ++cmatches;
+ if(foo(m) == false)
+ return cmatches;
+ }
+ else
+ {
+ need_init = false;
+ for(unsigned int i = 0; (restart != first) && (i < access::leading_length(e)); ++i, --restart)
+ {} // dwa 10/20/2000 - warning suppression for MWCW
+ if(restart != last)
+ ++restart;
+ _skip_and_inc(clines, last_line, first, restart);
+ }
+ }
+ if(need_init)
+ {
+ _skip_and_inc(clines, last_line, first, m[0].second);
+ next_base = m[0].second;
+ pd.temp_match.init_fail(next_base, last);
+ m.init_fail(next_base, last);
+ }
+ continue;
+ }
+ else
+ {
+ for(unsigned int i = 0; (restart != first) && (i < access::leading_length(e)); ++i, --restart)
+ {} // dwa 10/20/2000 - warning suppression for MWCW
+ if(restart != last)
+ ++restart;
+ _skip_and_inc(clines, last_line, first, restart);
+ }
+ }
+ else
+ _inc_one(clines, last_line, first);
+ }
+ }
+ break;
+ case regbase::restart_word:
+ {
+ // do search optimised for word starts:
+ while(first != last)
+ {
+ --first;
+ if(*first == '\n')
+ --clines;
+ // skip the word characters:
+ while((first != last) && traits_inst.is_class(*first, traits::char_class_word))
+ ++first;
+ // now skip the white space:
+ while((first != last) && (traits_inst.is_class(*first, traits::char_class_word) == false))
+ {
+ #ifdef __GNUC__
+ //
+ // hack to work around gcc optimisation bug
+ // just expand the contents of _inc_one here:
+ if(*first == '\n')
+ {
+ last_line = ++first;
+ ++clines;
+ }
+ else
+ ++first;
+ #else
+ _inc_one(clines, last_line, first);
+ #endif
+ }
+ if(first == last)
+ break;
+
+ if( access::can_start(*first, _map, (unsigned char)mask_any) )
+ {
+ if(query_match_aux(first, last, m, e, flags, pd, &restart))
+ {
+ m.set_line(clines, last_line);
+ ++cmatches;
+ if(foo(m) == false)
+ return cmatches;
+ if(m[0].second == last)
+ return cmatches;
+ // update to end of what matched
+ // trying to match again with match_not_null set if this
+ // is a null match...
+ need_init = true;
+ if(first == m[0].second)
+ {
+ next_base = m[0].second;
+ pd.temp_match.init_fail(next_base, last);
+ m.init_fail(next_base, last);
+ if(query_match_aux(first, last, m, e, flags | match_not_null, pd, &restart))
+ {
+ m.set_line(clines, last_line);
+ ++cmatches;
+ if(foo(m) == false)
+ return cmatches;
+ }
+ else
+ {
+ need_init = false;
+ for(unsigned int i = 0; (restart != first) && (i < access::leading_length(e)); ++i, --restart)
+ {} // dwa 10/20/2000 - warning suppression for MWCW
+ if(restart != last)
+ ++restart;
+ _skip_and_inc(clines, last_line, first, restart);
+ }
+ }
+ if(need_init)
+ {
+ _skip_and_inc(clines, last_line, first, m[0].second);
+ next_base = m[0].second;
+ pd.temp_match.init_fail(next_base, last);
+ m.init_fail(next_base, last);
+ }
+ }
+ else
+ {
+ for(unsigned int i = 0; (restart != first) && (i < access::leading_length(e)); ++i, --restart)
+ {} // dwa 10/20/2000 - warning suppression for MWCW
+ if(restart != last)
+ ++restart;
+ _skip_and_inc(clines, last_line, first, restart);
+ }
+ }
+ else
+ _inc_one(clines, last_line, first);
+ }
+ }
+ break;
+ case regbase::restart_line:
+ {
+ // do search optimised for line starts:
+ while(first != last)
+ {
+ // find first charcter after a line break:
+ --first;
+ if(*first == '\n')
+ --clines;
+ while((first != last) && (*first != '\n'))
+ ++first;
+ if(first == last)
+ break;
+ ++first;
+ if(first == last)
+ break;
+
+ ++clines;
+ last_line = first;
+
+ if( access::can_start(*first, _map, (unsigned char)mask_any) )
+ {
+ if(query_match_aux(first, last, m, e, flags, pd, &restart))
+ {
+ m.set_line(clines, last_line);
+ ++cmatches;
+ if(foo(m) == false)
+ return cmatches;
+ if(m[0].second == last)
+ return cmatches;
+ // update to end of what matched
+ // trying to match again with match_not_null set if this
+ // is a null match...
+ need_init = true;
+ if(first == m[0].second)
+ {
+ next_base = m[0].second;
+ pd.temp_match.init_fail(next_base, last);
+ m.init_fail(next_base, last);
+ if(query_match_aux(first, last, m, e, flags | match_not_null, pd, &restart))
+ {
+ m.set_line(clines, last_line);
+ ++cmatches;
+ if(foo(m) == false)
+ return cmatches;
+ }
+ else
+ {
+ need_init = false;
+ for(unsigned int i = 0; (restart != first) && (i < access::leading_length(e)); ++i, --restart)
+ {} // dwa 10/20/2000 - warning suppression for MWCW
+ if(restart != last)
+ ++restart;
+ _skip_and_inc(clines, last_line, first, restart);
+ }
+ }
+ if(need_init)
+ {
+ _skip_and_inc(clines, last_line, first, m[0].second);
+ next_base = m[0].second;
+ pd.temp_match.init_fail(next_base, last);
+ m.init_fail(next_base, last);
+ }
+ }
+ else
+ {
+ for(unsigned int i = 0; (restart != first) && (i < access::leading_length(e)); ++i, --restart)
+ {} // dwa 10/20/2000 - warning suppression for MWCW
+ if(restart != last)
+ ++restart;
+ _skip_and_inc(clines, last_line, first, restart);
+ }
+ }
+ else
+ _inc_one(clines, last_line, first);
+ }
+ }
+ break;
+ case regbase::restart_continue:
+ {
+ if(!leading_match)
+ return cmatches;
+ while(first != last)
+ {
+ if( access::can_start(*first, _map, (unsigned char)mask_any) )
+ {
+ if(query_match_aux(first, last, m, e, flags, pd, &restart))
+ {
+ m.set_line(clines, last_line);
+ ++cmatches;
+ if(foo(m) == false)
+ return cmatches;
+ if(m[0].second == last)
+ return cmatches;
+ // update to end of what matched
+ // trying to match again with match_not_null set if this
+ // is a null match...
+ if(first == m[0].second)
+ {
+ next_base = m[0].second;
+ pd.temp_match.init_fail(next_base, last);
+ m.init_fail(next_base, last);
+ if(query_match_aux(first, last, m, e, flags | match_not_null, pd, &restart))
+ {
+ m.set_line(clines, last_line);
+ ++cmatches;
+ if(foo(m) == false)
+ return cmatches;
+ }
+ else
+ return cmatches; // can't continue from null match
+ }
+ _skip_and_inc(clines, last_line, first, m[0].second);
+ next_base = m[0].second;
+ pd.temp_match.init_fail(next_base, last);
+ m.init_fail(next_base, last);
+ continue;
+ }
+ }
+ return cmatches;
+ }
+ }
+ break;
+ }
+
+
+ // finally check trailing null string:
+ if(access::first(e)->can_be_null)
+ {
+ if(query_match_aux(first, last, m, e, flags, pd, &restart))
+ {
+ m.set_line(clines, last_line);
+ ++cmatches;
+ if(foo(m) == false)
+ return cmatches;
+ }
+ }
+
+ return cmatches;
+}
+#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
+} // namespace {anon}
+#endif
+
+} // namespace re_detail
+
+//
+// proc regex_match
+// returns true if the specified regular expression matches
+// the whole of the input. Fills in what matched in m.
+//
+template <class iterator, class Allocator, class charT, class traits, class Allocator2>
+bool regex_match(iterator first, iterator last, match_results<iterator, Allocator>& m, const reg_expression<charT, traits, Allocator2>& e, unsigned flags = match_default)
+{
+ // prepare m for failure:
+ if((flags & match_init) == 0)
+ {
+ m.set_size(e.mark_count(), first, last);
+ m.set_base(first);
+ m.set_line(1, first);
+ }
+ flags |= match_all; // must match all of input.
+ re_detail::_priv_match_data<iterator, Allocator> pd(m, first, last, e.size());
+ iterator restart;
+ bool result = re_detail::query_match_aux(first, last, m, e, flags, pd, &restart);
+ return result;
+}
+template <class iterator, class charT, class traits, class Allocator2>
+bool regex_match(iterator first, iterator last, const reg_expression<charT, traits, Allocator2>& e, unsigned flags = match_default)
+{
+ match_results<iterator> m;
+ return regex_match(first, last, m, e, flags);
+}
+//
+// query_match convenience interfaces:
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+//
+// this isn't really a partial specialisation, but template function
+// overloading - if the compiler doesn't support partial specialisation
+// then it really won't support this either:
+template <class charT, class Allocator, class traits, class Allocator2>
+inline bool regex_match(const charT* str,
+ match_results<const charT*, Allocator>& m,
+ const reg_expression<charT, traits, Allocator2>& e,
+ unsigned flags = match_default)
+{
+ return regex_match(str, str + traits::length(str), m, e, flags);
+}
+
+template <class ST, class SA, class Allocator, class charT, class traits, class Allocator2>
+inline bool regex_match(const std::basic_string<charT, ST, SA>& s,
+ match_results<typename std::basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
+ const reg_expression<charT, traits, Allocator2>& e,
+ unsigned flags = match_default)
+{
+ return regex_match(s.begin(), s.end(), m, e, flags);
+}
+template <class charT, class traits, class Allocator2>
+inline bool regex_match(const charT* str,
+ const reg_expression<charT, traits, Allocator2>& e,
+ unsigned flags = match_default)
+{
+ match_results<const charT*> m;
+ return regex_match(str, str + traits::length(str), m, e, flags);
+}
+
+template <class ST, class SA, class charT, class traits, class Allocator2>
+inline bool regex_match(const std::basic_string<charT, ST, SA>& s,
+ const reg_expression<charT, traits, Allocator2>& e,
+ unsigned flags = match_default)
+{
+ typedef typename std::basic_string<charT, ST, SA>::const_iterator iterator;
+ match_results<iterator> m;
+ return regex_match(s.begin(), s.end(), m, e, flags);
+}
+#else // partial ordering
+inline bool regex_match(const char* str,
+ cmatch& m,
+ const regex& e,
+ unsigned flags = match_default)
+{
+ return regex_match(str, str + regex::traits_type::length(str), m, e, flags);
+}
+inline bool regex_match(const char* str,
+ const regex& e,
+ unsigned flags = match_default)
+{
+ match_results<const char*> m;
+ return regex_match(str, str + regex::traits_type::length(str), m, e, flags);
+}
+#ifndef BOOST_NO_WREGEX
+inline bool regex_match(const wchar_t* str,
+ wcmatch& m,
+ const wregex& e,
+ unsigned flags = match_default)
+{
+ return regex_match(str, str + wregex::traits_type::length(str), m, e, flags);
+}
+inline bool regex_match(const wchar_t* str,
+ const wregex& e,
+ unsigned flags = match_default)
+{
+ match_results<const wchar_t*> m;
+ return regex_match(str, str + wregex::traits_type::length(str), m, e, flags);
+}
+#endif
+inline bool regex_match(const std::string& s,
+ match_results<std::string::const_iterator, regex::allocator_type>& m,
+ const regex& e,
+ unsigned flags = match_default)
+{
+ return regex_match(s.begin(), s.end(), m, e, flags);
+}
+inline bool regex_match(const std::string& s,
+ const regex& e,
+ unsigned flags = match_default)
+{
+ match_results<std::string::const_iterator, regex::allocator_type> m;
+ return regex_match(s.begin(), s.end(), m, e, flags);
+}
+#if !defined(BOOST_NO_WREGEX)
+inline bool regex_match(const std::basic_string<wchar_t>& s,
+ match_results<std::basic_string<wchar_t>::const_iterator, wregex::allocator_type>& m,
+ const wregex& e,
+ unsigned flags = match_default)
+{
+ return regex_match(s.begin(), s.end(), m, e, flags);
+}
+inline bool regex_match(const std::basic_string<wchar_t>& s,
+ const wregex& e,
+ unsigned flags = match_default)
+{
+ match_results<std::basic_string<wchar_t>::const_iterator, wregex::allocator_type> m;
+ return regex_match(s.begin(), s.end(), m, e, flags);
+}
+#endif
+
+#endif
+
+template <class iterator, class Allocator, class charT, class traits, class Allocator2>
+bool regex_search(iterator first, iterator last, match_results<iterator, Allocator>& m, const reg_expression<charT, traits, Allocator2>& e, unsigned flags = match_default)
+{
+ if(e.flags() & regbase::failbit)
+ return false;
+
+ typedef typename traits::size_type traits_size_type;
+ typedef typename traits::uchar_type traits_uchar_type;
+
+ return re_detail::reg_grep2(re_detail::grep_search_predicate<iterator, Allocator>(&m), first, last, e, flags, m.allocator());
+}
+
+//
+// regex_search convenience interfaces:
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+//
+// this isn't really a partial specialisation, but template function
+// overloading - if the compiler doesn't support partial specialisation
+// then it really won't support this either:
+template <class charT, class Allocator, class traits, class Allocator2>
+inline bool regex_search(const charT* str,
+ match_results<const charT*, Allocator>& m,
+ const reg_expression<charT, traits, Allocator2>& e,
+ unsigned flags = match_default)
+{
+ return regex_search(str, str + traits::length(str), m, e, flags);
+}
+
+template <class ST, class SA, class Allocator, class charT, class traits, class Allocator2>
+inline bool regex_search(const std::basic_string<charT, ST, SA>& s,
+ match_results<typename std::basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
+ const reg_expression<charT, traits, Allocator2>& e,
+ unsigned flags = match_default)
+{
+ return regex_search(s.begin(), s.end(), m, e, flags);
+}
+#else // partial specialisation
+inline bool regex_search(const char* str,
+ cmatch& m,
+ const regex& e,
+ unsigned flags = match_default)
+{
+ return regex_search(str, str + regex::traits_type::length(str), m, e, flags);
+}
+#ifndef BOOST_NO_WREGEX
+inline bool regex_search(const wchar_t* str,
+ wcmatch& m,
+ const wregex& e,
+ unsigned flags = match_default)
+{
+ return regex_search(str, str + wregex::traits_type::length(str), m, e, flags);
+}
+#endif
+inline bool regex_search(const std::string& s,
+ match_results<std::string::const_iterator, regex::allocator_type>& m,
+ const regex& e,
+ unsigned flags = match_default)
+{
+ return regex_search(s.begin(), s.end(), m, e, flags);
+}
+#if !defined(BOOST_NO_WREGEX)
+inline bool regex_search(const std::basic_string<wchar_t>& s,
+ match_results<std::basic_string<wchar_t>::const_iterator, wregex::allocator_type>& m,
+ const wregex& e,
+ unsigned flags = match_default)
+{
+ return regex_search(s.begin(), s.end(), m, e, flags);
+}
+#endif
+
+#endif
+
+
+//
+// regex_grep:
+// find all non-overlapping matches within the sequence first last:
+//
+template <class Predicate, class iterator, class charT, class traits, class Allocator>
+inline unsigned int regex_grep(Predicate foo, iterator first, iterator last, const reg_expression<charT, traits, Allocator>& e, unsigned flags = match_default)
+{
+ return re_detail::reg_grep2(foo, first, last, e, flags, e.allocator());
+}
+
+//
+// regex_grep convenience interfaces:
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+//
+// this isn't really a partial specialisation, but template function
+// overloading - if the compiler doesn't support partial specialisation
+// then it really won't support this either:
+template <class Predicate, class charT, class Allocator, class traits>
+inline unsigned int regex_grep(Predicate foo, const charT* str,
+ const reg_expression<charT, traits, Allocator>& e,
+ unsigned flags = match_default)
+{
+ return regex_grep(foo, str, str + traits::length(str), e, flags);
+}
+
+template <class Predicate, class ST, class SA, class Allocator, class charT, class traits>
+inline unsigned int regex_grep(Predicate foo, const std::basic_string<charT, ST, SA>& s,
+ const reg_expression<charT, traits, Allocator>& e,
+ unsigned flags = match_default)
+{
+ return regex_grep(foo, s.begin(), s.end(), e, flags);
+}
+#else // partial specialisation
+inline unsigned int regex_grep(bool (*foo)(const cmatch&), const char* str,
+ const regex& e,
+ unsigned flags = match_default)
+{
+ return regex_grep(foo, str, str + regex::traits_type::length(str), e, flags);
+}
+#ifndef BOOST_NO_WREGEX
+inline unsigned int regex_grep(bool (*foo)(const wcmatch&), const wchar_t* str,
+ const wregex& e,
+ unsigned flags = match_default)
+{
+ return regex_grep(foo, str, str + wregex::traits_type::length(str), e, flags);
+}
+#endif
+inline unsigned int regex_grep(bool (*foo)(const match_results<std::string::const_iterator, regex::allocator_type>&), const std::string& s,
+ const regex& e,
+ unsigned flags = match_default)
+{
+ return regex_grep(foo, s.begin(), s.end(), e, flags);
+}
+#if !defined(BOOST_NO_WREGEX)
+inline unsigned int regex_grep(bool (*foo)(const match_results<std::basic_string<wchar_t>::const_iterator, wregex::allocator_type>&),
+ const std::basic_string<wchar_t>& s,
+ const wregex& e,
+ unsigned flags = match_default)
+{
+ return regex_grep(foo, s.begin(), s.end(), e, flags);
+}
+#endif
+
+#endif
+
+
+#ifdef __BORLANDC__
+ #pragma option pop
+#endif
+
+} // namespace boost
+
+#endif // BOOST_REGEX_MATCH_HPP
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+/*
+ *
+ * Copyright (c) 1998-2002
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_raw_buffer.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Raw character buffer for regex code.
+ * Note this is an internal header file included
+ * by regex.hpp, do not include on its own.
+ */
+
+#ifndef BOOST_REGEX_RAW_BUFFER_HPP
+#define BOOST_REGEX_RAW_BUFFER_HPP
+
+#ifndef BOOST_REGEX_CONFIG_HPP
+#include <boost/regex/config.hpp>
+#endif
+
+namespace boost{
+ namespace re_detail{
+
+#ifdef __BORLANDC__
+ #pragma option push -a8 -b -Vx -Ve -pc
+#endif
+
+struct empty_padding{};
+
+union padding
+{
+ void* p;
+ unsigned int i;
+};
+
+template <int N>
+struct padding3
+{
+ enum{
+ padding_size = 8,
+ padding_mask = 7
+ };
+};
+
+template<>
+struct padding3<2>
+{
+ enum{
+ padding_size = 2,
+ padding_mask = 1
+ };
+};
+
+template<>
+struct padding3<4>
+{
+ enum{
+ padding_size = 4,
+ padding_mask = 3
+ };
+};
+
+template<>
+struct padding3<8>
+{
+ enum{
+ padding_size = 8,
+ padding_mask = 7
+ };
+};
+
+template<>
+struct padding3<16>
+{
+ enum{
+ padding_size = 16,
+ padding_mask = 15
+ };
+};
+
+enum{
+ padding_size = padding3<sizeof(padding)>::padding_size,
+ padding_mask = padding3<sizeof(padding)>::padding_mask
+};
+
+//
+// class raw_storage
+// basically this is a simplified vector<unsigned char>
+// this is used by reg_expression for expression storage
+//
+
+template <class Allocator>
+class raw_storage
+{
+public:
+ typedef Allocator allocator_type;
+ typedef typename boost::detail::rebind_allocator<unsigned char, allocator_type>::type alloc_inst_type;
+ typedef typename alloc_inst_type::size_type size_type;
+ typedef typename alloc_inst_type::pointer pointer;
+private:
+ //
+ // empty member optimisation:
+ struct alloc_data : public alloc_inst_type
+ {
+ typename alloc_inst_type::pointer last;
+ alloc_data(const Allocator& a) : alloc_inst_type(a){}
+ } alloc_inst;
+ pointer start, end;
+public:
+
+ raw_storage(const Allocator& a = Allocator());
+ raw_storage(size_type n, const Allocator& a = Allocator());
+
+ ~raw_storage()
+ {
+ alloc_inst.deallocate(start, (alloc_inst.last - start));
+ }
+
+ void BOOST_REGEX_CALL resize(size_type n);
+
+ void* BOOST_REGEX_CALL extend(size_type n)
+ {
+ if(size_type(alloc_inst.last - end) < n)
+ resize(n + (end - start));
+ register void* result = end;
+ end += n;
+ return result;
+ }
+
+ void* BOOST_REGEX_CALL insert(size_type pos, size_type n);
+
+ size_type BOOST_REGEX_CALL size()
+ {
+ return end - start;
+ }
+
+ size_type BOOST_REGEX_CALL capacity()
+ {
+ return alloc_inst.last - start;
+ }
+
+ void* BOOST_REGEX_CALL data()const
+ {
+ return start;
+ }
+
+ size_type BOOST_REGEX_CALL index(void* ptr)
+ {
+ return reinterpret_cast<unsigned char*>(ptr) - reinterpret_cast<unsigned char*>(data());
+ }
+
+ void BOOST_REGEX_CALL clear()
+ {
+ end = start;
+ }
+
+ void BOOST_REGEX_CALL align()
+ {
+ // move end up to a boundary:
+ end = reinterpret_cast<unsigned char*>(start) + (((reinterpret_cast<unsigned char*>(end) - reinterpret_cast<unsigned char*>(start)) + padding_mask) & ~padding_mask);
+ }
+
+ Allocator BOOST_REGEX_CALL allocator()const;
+};
+
+template <class Allocator>
+raw_storage<Allocator>::raw_storage(const Allocator& a)
+ : alloc_inst(a)
+{
+ start = end = alloc_inst.allocate(1024);
+ BOOST_REGEX_NOEH_ASSERT(start)
+ alloc_inst.last = start + 1024;
+}
+
+template <class Allocator>
+raw_storage<Allocator>::raw_storage(size_type n, const Allocator& a)
+ : alloc_inst(a)
+{
+ start = end = alloc_inst.allocate(n);
+ BOOST_REGEX_NOEH_ASSERT(start)
+ alloc_inst.last = start + n;
+}
+
+template <class Allocator>
+Allocator BOOST_REGEX_CALL raw_storage<Allocator>::allocator()const
+{
+ return alloc_inst;
+}
+
+template <class Allocator>
+void BOOST_REGEX_CALL raw_storage<Allocator>::resize(size_type n)
+{
+ register size_type newsize = (alloc_inst.last - start) * 2;
+ register size_type datasize = end - start;
+ if(newsize < n)
+ newsize = n;
+ // extend newsize to WORD/DWORD boundary:
+ newsize = (newsize + padding_mask) & ~(padding_mask);
+
+ // allocate and copy data:
+ register unsigned char* ptr = alloc_inst.allocate(newsize);
+ BOOST_REGEX_NOEH_ASSERT(ptr)
+ std::memcpy(ptr, start, datasize);
+
+ // get rid of old buffer:
+ alloc_inst.deallocate(start, (alloc_inst.last - start));
+
+ // and set up pointers:
+ start = ptr;
+ end = ptr + datasize;
+ alloc_inst.last = ptr + newsize;
+}
+
+template <class Allocator>
+void* BOOST_REGEX_CALL raw_storage<Allocator>::insert(size_type pos, size_type n)
+{
+ jm_assert(pos <= size_type(end - start));
+ if(size_type(alloc_inst.last - end) < n)
+ resize(n + (end - start));
+ register void* result = start + pos;
+ std::memmove(start + pos + n, start + pos, (end - start) - pos);
+ end += n;
+ return result;
+}
+
+#ifdef __BORLANDC__
+ #pragma option pop
+#endif
+
+} // namespace re_detail
+} // namespace boost
+
+#endif
+
+
+
+
+
--- /dev/null
+/*
+ *
+ * Copyright (c) 1998-2002
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_split.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Implements regex_split and associated functions.
+ * Note this is an internal header file included
+ * by regex.hpp, do not include on its own.
+ */
+
+#ifndef BOOST_REGEX_SPLIT_HPP
+#define BOOST_REGEX_SPLIT_HPP
+
+namespace boost{
+
+#ifdef __BORLANDC__
+ #pragma option push -a8 -b -Vx -Ve -pc
+#endif
+
+namespace re_detail{
+
+template <class charT>
+const reg_expression<charT>& get_default_expression(charT)
+{
+ static const charT expression_text[4] = { '\\', 's', '+', '\00', };
+ static const reg_expression<charT> e(expression_text);
+ return e;
+}
+
+template <class OutputIterator, class charT, class Traits1, class Alloc1, class Alloc2>
+class split_pred
+{
+ typedef std::basic_string<charT, Traits1, Alloc1> string_type;
+ typedef typename string_type::const_iterator iterator_type;
+ iterator_type* p_last;
+ OutputIterator* p_out;
+ std::size_t* p_max;
+ std::size_t initial_max;
+public:
+ split_pred(iterator_type* a, OutputIterator* b, std::size_t* c)
+ : p_last(a), p_out(b), p_max(c), initial_max(*c) {}
+
+ bool operator()(const match_results<iterator_type, Alloc2>& what);
+};
+
+template <class OutputIterator, class charT, class Traits1, class Alloc1, class Alloc2>
+bool split_pred<OutputIterator, charT, Traits1, Alloc1, Alloc2>::operator()
+ (const match_results<iterator_type, Alloc2>& what)
+{
+ *p_last = what[0].second;
+ if(what.size() > 1)
+ {
+ // output sub-expressions only:
+ for(unsigned i = 1; i < what.size(); ++i)
+ {
+ *(*p_out) = static_cast<string_type>(what[i]);
+ ++(*p_out);
+ if(0 == --*p_max) return false;
+ }
+ return *p_max != 0;
+ }
+ else
+ {
+ // output $` only if it's not-null or not at the start of the input:
+ const sub_match<iterator_type>& sub = what[-1];
+ if((sub.first != sub.second) || (*p_max != initial_max))
+ {
+ *(*p_out) = static_cast<string_type>(sub);
+ ++(*p_out);
+ return --*p_max;
+ }
+ }
+ //
+ // initial null, do nothing:
+ return true;
+}
+
+} // namespace re_detail
+
+template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2, class Alloc2>
+std::size_t regex_split(OutputIterator out,
+ std::basic_string<charT, Traits1, Alloc1>& s,
+ const reg_expression<charT, Traits2, Alloc2>& e,
+ unsigned flags,
+ std::size_t max_split)
+{
+ typedef typename std::basic_string<charT, Traits1, Alloc1>::const_iterator ci_t;
+ ci_t last = s.begin();
+ std::size_t init_size = max_split;
+ re_detail::split_pred<OutputIterator, charT, Traits1, Alloc1, Alloc2> pred(&last, &out, &max_split);
+ ci_t i, j;
+ i = s.begin();
+ j = s.end();
+ regex_grep(pred, i, j, e, flags);
+ //
+ // if there is still input left, do a final push as long as max_split
+ // is not exhausted, and we're not splitting sub-expressions rather
+ // than whitespace:
+ if(max_split && (last != s.end()) && (e.mark_count() == 1))
+ {
+ *out = std::basic_string<charT, Traits1, Alloc1>((ci_t)last, (ci_t)s.end());
+ ++out;
+ last = s.end();
+ --max_split;
+ }
+ //
+ // delete from the string everything that has been processed so far:
+ s.erase(0, last - s.begin());
+ //
+ // return the number of new records pushed:
+ return init_size - max_split;
+}
+
+template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2, class Alloc2>
+inline std::size_t regex_split(OutputIterator out,
+ std::basic_string<charT, Traits1, Alloc1>& s,
+ const reg_expression<charT, Traits2, Alloc2>& e,
+ unsigned flags = match_default)
+{
+ return regex_split(out, s, e, flags, UINT_MAX);
+}
+
+template <class OutputIterator, class charT, class Traits1, class Alloc1>
+inline std::size_t regex_split(OutputIterator out,
+ std::basic_string<charT, Traits1, Alloc1>& s)
+{
+ return regex_split(out, s, re_detail::get_default_expression(charT(0)), match_default, UINT_MAX);
+}
+
+#ifdef __BORLANDC__
+ #pragma option pop
+#endif
+
+} // namespace boost
+
+#endif
+
+
--- /dev/null
+/*
+ *
+ * Copyright (c) 1998-2002
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_stack.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Implements customised internal regex stacks.
+ * Note this is an internal header file included
+ * by regex.hpp, do not include on its own.
+ */
+
+#ifndef BOOST_REGEX_STACK_HPP
+#define BOOST_REGEX_STACK_HPP
+
+#ifndef BOOST_REGEX_CONFIG_HPP
+#include <boost/regex/config.hpp>
+#endif
+#ifndef BOOST_REGEX_RAW_BUFFER_HPP
+#include <boost/regex/v3/regex_raw_buffer.hpp>
+#endif
+
+namespace boost{
+ namespace re_detail{
+
+#ifdef __BORLANDC__
+ #pragma option push -a8 -b -Vx -Ve -pc
+#endif
+
+//
+// class jstack
+// simplified stack optimised for push/peek/pop
+// operations, we could use std::stack<std::vector<T>> instead...
+//
+template <class T, class Allocator = BOOST_DEFAULT_ALLOCATOR(T) >
+class jstack
+{
+private:
+ typedef typename boost::detail::rebind_allocator<unsigned char, Allocator>::type allocator_type;
+ typedef typename boost::detail::rebind_allocator<T, Allocator>::type T_alloc_type;
+ typedef typename T_alloc_type::size_type size_type;
+ typedef T value_type;
+ struct node
+ {
+ node* next;
+ T* start; // first item
+ T* end; // last item
+ T* last; // end of storage
+ };
+
+ //
+ // empty base member optimisation:
+ struct data : public allocator_type
+ {
+ padding buf[(sizeof(T) * 16 + sizeof(padding) - 1) / sizeof(padding)];
+ data(const Allocator& a) : allocator_type(a){}
+ };
+
+ data alloc_inst;
+ mutable node* m_stack;
+ mutable node* unused;
+ node base;
+ size_type block_size;
+
+ void BOOST_REGEX_CALL pop_aux()const;
+ void BOOST_REGEX_CALL push_aux();
+
+public:
+ jstack(size_type n = 64, const Allocator& a = Allocator());
+
+ ~jstack();
+
+ node* BOOST_REGEX_CALL get_node()
+ {
+ node* new_stack = reinterpret_cast<node*>(alloc_inst.allocate(sizeof(node) + sizeof(T) * block_size));
+ BOOST_REGEX_NOEH_ASSERT(new_stack)
+ new_stack->last = reinterpret_cast<T*>(new_stack+1);
+ new_stack->start = new_stack->end = new_stack->last + block_size;
+ new_stack->next = 0;
+ return new_stack;
+ }
+
+ bool BOOST_REGEX_CALL empty()
+ {
+ return (m_stack->start == m_stack->end) && (m_stack->next == 0);
+ }
+
+ bool BOOST_REGEX_CALL good()
+ {
+ return (m_stack->start != m_stack->end) || (m_stack->next != 0);
+ }
+
+ T& BOOST_REGEX_CALL peek()
+ {
+ if(m_stack->start == m_stack->end)
+ pop_aux();
+ return *m_stack->end;
+ }
+
+ const T& BOOST_REGEX_CALL peek()const
+ {
+ if(m_stack->start == m_stack->end)
+ pop_aux();
+ return *m_stack->end;
+ }
+
+ void BOOST_REGEX_CALL pop()
+ {
+ if(m_stack->start == m_stack->end)
+ pop_aux();
+ ::boost::re_detail::pointer_destroy(m_stack->end);
+ ++(m_stack->end);
+ }
+
+ void BOOST_REGEX_CALL pop(T& t)
+ {
+ if(m_stack->start == m_stack->end)
+ pop_aux();
+ t = *m_stack->end;
+ ::boost::re_detail::pointer_destroy(m_stack->end);
+ ++(m_stack->end);
+ }
+
+ void BOOST_REGEX_CALL push(const T& t)
+ {
+ if(m_stack->end == m_stack->last)
+ push_aux();
+ --(m_stack->end);
+ pointer_construct(m_stack->end, t);
+ }
+
+};
+
+template <class T, class Allocator>
+jstack<T, Allocator>::jstack(size_type n, const Allocator& a)
+ : alloc_inst(a)
+{
+ unused = 0;
+ block_size = n;
+ m_stack = &base;
+ base.last = reinterpret_cast<T*>(alloc_inst.buf);
+ base.end = base.start = base.last + 16;
+ base.next = 0;
+}
+
+template <class T, class Allocator>
+void BOOST_REGEX_CALL jstack<T, Allocator>::push_aux()
+{
+ // make sure we have spare space on TOS:
+ register node* new_node;
+ if(unused)
+ {
+ new_node = unused;
+ unused = new_node->next;
+ new_node->next = m_stack;
+ m_stack = new_node;
+ }
+ else
+ {
+ new_node = get_node();
+ new_node->next = m_stack;
+ m_stack = new_node;
+ }
+}
+
+template <class T, class Allocator>
+void BOOST_REGEX_CALL jstack<T, Allocator>::pop_aux()const
+{
+ // make sure that we have a valid item
+ // on TOS:
+ jm_assert(m_stack->next);
+ register node* p = m_stack;
+ m_stack = p->next;
+ p->next = unused;
+ unused = p;
+}
+
+template <class T, class Allocator>
+jstack<T, Allocator>::~jstack()
+{
+ node* condemned;
+ while(good())
+ pop();
+ while(unused)
+ {
+ condemned = unused;
+ unused = unused->next;
+ alloc_inst.deallocate(reinterpret_cast<unsigned char*>(condemned), sizeof(node) + sizeof(T) * block_size);
+ }
+ while(m_stack != &base)
+ {
+ condemned = m_stack;
+ m_stack = m_stack->next;
+ alloc_inst.deallocate(reinterpret_cast<unsigned char*>(condemned), sizeof(node) + sizeof(T) * block_size);
+ }
+}
+
+#ifdef __BORLANDC__
+ #pragma option pop
+#endif
+
+} // namespace re_detail
+} // namespace boost
+
+#endif
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+/*
+ *
+ * Copyright (c) 1998-2002
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_synch.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Thread synchronisation for regex code.
+ * Note this is an internal header file included
+ * by regex.hpp, do not include on its own.
+ */
+
+#ifndef BOOST_REGEX_SYNCH_HPP
+#define BOOST_REGEX_SYNCH_HPP
+
+#ifndef BOOST_REGEX_CONFIG_HPP
+#include <boost/regex/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_THREADS)
+# if defined(BOOST_HAS_WINTHREADS)
+# include <windows.h>
+# elif defined(BOOST_HAS_BETHREADS)
+# include <OS.h>
+# include <cassert>
+# elif defined(BOOST_HAS_PTHREADS)
+# include <pthread.h>
+# else
+# error "Unknown threading API"
+# endif
+#endif
+
+
+namespace boost{
+ namespace re_detail{
+
+#ifdef __BORLANDC__
+ #pragma option push -a8 -b -Vx -Ve -pc
+#endif
+
+void BOOST_REGEX_CALL re_init_threads();
+void BOOST_REGEX_CALL re_free_threads();
+
+#ifdef BOOST_HAS_THREADS
+
+# ifdef BOOST_HAS_BETHREADS
+
+typedef sem_id CRITICAL_SECTION;
+
+inline void BOOST_REGEX_CALL InitializeCriticalSection(CRITICAL_SECTION* ps)
+{
+ *ps = create_sem(1, "regex++");
+ assert(*ps > 0);
+}
+
+inline void BOOST_REGEX_CALL DeleteCriticalSection(CRITICAL_SECTION* ps)
+{
+ int t = delete_sem(*ps);
+ assert(t == B_NO_ERROR);
+}
+
+inline void BOOST_REGEX_CALL EnterCriticalSection(CRITICAL_SECTION* ps)
+{
+ status_t t = acquire_sem(*ps);
+ assert(t == B_NO_ERROR);
+}
+
+inline void BOOST_REGEX_CALL LeaveCriticalSection(CRITICAL_SECTION* ps)
+{
+ status_t t = release_sem(*ps);
+ assert(t == B_NO_ERROR);
+}
+
+# elif defined(BOOST_HAS_PTHREADS)
+
+typedef pthread_mutex_t CRITICAL_SECTION;
+
+inline void BOOST_REGEX_CALL InitializeCriticalSection(CRITICAL_SECTION* ps)
+{
+ pthread_mutex_init(ps, 0);
+}
+
+inline void BOOST_REGEX_CALL DeleteCriticalSection(CRITICAL_SECTION* ps)
+{
+ pthread_mutex_destroy(ps);
+}
+
+inline void BOOST_REGEX_CALL EnterCriticalSection(CRITICAL_SECTION* ps)
+{
+ pthread_mutex_lock(ps);
+}
+
+inline void BOOST_REGEX_CALL LeaveCriticalSection(CRITICAL_SECTION* ps)
+{
+ pthread_mutex_unlock(ps);
+}
+
+# elif !defined(BOOST_HAS_WINTHREADS)
+# error "Unknown threading API"
+# endif
+
+template <class Lock>
+class lock_guard
+{
+ typedef Lock lock_type;
+public:
+ lock_guard(lock_type& m, bool aq = true)
+ : mut(m), owned(false){ acquire(aq); }
+
+ ~lock_guard()
+ { acquire(false); }
+
+ void BOOST_REGEX_CALL acquire(bool aq = true)
+ {
+ if(aq && !owned)
+ {
+ mut.acquire(true);
+ owned = true;
+ }
+ else if(!aq && owned)
+ {
+ mut.acquire(false);
+ owned = false;
+ }
+ }
+private:
+ lock_type& mut;
+ bool owned;
+ // VC6 warning suppression:
+ lock_guard& operator=(const lock_guard&);
+};
+
+
+class critical_section
+{
+public:
+ critical_section()
+ { InitializeCriticalSection(&hmutex);}
+
+ critical_section(const critical_section&)
+ { InitializeCriticalSection(&hmutex);}
+
+ const critical_section& BOOST_REGEX_CALL operator=(const critical_section&)
+ {return *this;}
+
+ ~critical_section()
+ {DeleteCriticalSection(&hmutex);}
+
+private:
+
+ void BOOST_REGEX_CALL acquire(bool aq)
+ { if(aq) EnterCriticalSection(&hmutex);
+ else LeaveCriticalSection(&hmutex);
+ }
+
+ CRITICAL_SECTION hmutex;
+
+public:
+ typedef lock_guard<critical_section> ro_guard;
+ typedef lock_guard<critical_section> rw_guard;
+
+ friend class lock_guard<critical_section>;
+};
+
+inline bool BOOST_REGEX_CALL operator==(const critical_section&, const critical_section&)
+{
+ return false;
+}
+
+inline bool BOOST_REGEX_CALL operator<(const critical_section&, const critical_section&)
+{
+ return true;
+}
+
+typedef lock_guard<critical_section> cs_guard;
+
+BOOST_REGEX_DECL extern critical_section* p_re_lock;
+BOOST_REGEX_DECL extern unsigned int re_lock_count;
+
+#define BOOST_REGEX_GUARD(inst) boost::re_detail::critical_section::rw_guard g(inst);
+
+#else // BOOST_HAS_THREADS
+
+#define BOOST_REGEX_GUARD(inst)
+
+#endif // BOOST_HAS_THREADS
+
+#ifdef __BORLANDC__
+ #pragma option pop
+#endif
+
+} // namespace re_detail
+} // namespace boost
+
+#endif // sentry
+
+
+
+
+
+
--- /dev/null
+/*
+ *
+ * Copyright (c) 1998-2002
+ * Dr John Maddock
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Dr John Maddock makes no representations
+ * about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_traits.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Declares regular expression traits classes.
+ */
+
+#ifndef BOOST_REGEX_TRAITS_HPP_INCLUDED
+#define BOOST_REGEX_TRAITS_HPP_INCLUDED
+
+#ifndef BOOST_RE_CREGEX_HPP
+#include <boost/cregex.hpp>
+#endif
+#ifndef BOOST_REGEX_CSTRING_HPP
+#include <boost/regex/v3/regex_cstring.hpp>
+#endif
+
+namespace boost{
+
+#ifdef __BORLANDC__
+ #pragma option push -a8 -b -Vx -Ve -pc
+#endif
+
+template <class charT>
+class c_regex_traits;
+
+namespace re_detail{
+
+struct mss
+{
+ unsigned int id;
+ const char* what;
+};
+
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL re_lookup_def_collate_name(std::string& buf, const char* name);
+BOOST_REGEX_DECL std::size_t BOOST_REGEX_CALL re_get_default_message(char* buf, std::size_t len, std::size_t id);
+extern BOOST_REGEX_DECL const char *re_default_error_messages[];
+
+#ifndef BOOST_NO_WREGEX
+extern BOOST_REGEX_DECL wchar_t wide_lower_case_map[];
+extern BOOST_REGEX_DECL unsigned short wide_unicode_classes[];
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL is_combining(wchar_t c);
+#endif
+
+
+struct BOOST_REGEX_DECL regex_traits_base
+{
+ enum char_syntax_type
+ {
+ syntax_char = 0,
+ syntax_open_bracket = 1, // (
+ syntax_close_bracket = 2, // )
+ syntax_dollar = 3, // $
+ syntax_caret = 4, // ^
+ syntax_dot = 5, // .
+ syntax_star = 6, // *
+ syntax_plus = 7, // +
+ syntax_question = 8, // ?
+ syntax_open_set = 9, // [
+ syntax_close_set = 10, // ]
+ syntax_or = 11, // |
+ syntax_slash = 12, //
+ syntax_hash = 13, // #
+ syntax_dash = 14, // -
+ syntax_open_brace = 15, // {
+ syntax_close_brace = 16, // }
+ syntax_digit = 17, // 0-9
+ syntax_b = 18, // for \b
+ syntax_B = 19, // for \B
+ syntax_left_word = 20, // for \<
+ syntax_right_word = 21, // for \>
+ syntax_w = 22, // for \w
+ syntax_W = 23, // for \W
+ syntax_start_buffer = 24, // for \`
+ syntax_end_buffer = 25, // for \'
+ syntax_newline = 26, // for newline alt
+ syntax_comma = 27, // for {x,y}
+
+ syntax_a = 28, // for \a
+ syntax_f = 29, // for \f
+ syntax_n = 30, // for \n
+ syntax_r = 31, // for \r
+ syntax_t = 32, // for \t
+ syntax_v = 33, // for \v
+ syntax_x = 34, // for \xdd
+ syntax_c = 35, // for \cx
+ syntax_colon = 36, // for [:...:]
+ syntax_equal = 37, // for [=...=]
+
+ // perl ops:
+ syntax_e = 38, // for \e
+ syntax_l = 39, // for \l
+ syntax_L = 40, // for \L
+ syntax_u = 41, // for \u
+ syntax_U = 42, // for \U
+ syntax_s = 43, // for \s
+ syntax_S = 44, // for \S
+ syntax_d = 45, // for \d
+ syntax_D = 46, // for \D
+ syntax_E = 47, // for \Q\E
+ syntax_Q = 48, // for \Q\E
+ syntax_X = 49, // for \X
+ syntax_C = 50, // for \C
+ syntax_Z = 51, // for \Z
+ syntax_G = 52, // for \G
+
+ // new extentions:
+ syntax_not = 53, // for (?!...)
+
+ syntax_max = 54
+ };
+#ifdef __BORLANDC__
+private:
+ char dummy_member;
+#endif
+};
+
+struct BOOST_REGEX_DECL c_traits_base : public regex_traits_base
+{
+public:
+ enum{
+ char_class_none = 0,
+ char_class_alpha = 0x0001,
+ char_class_cntrl = 0x0002,
+ char_class_digit = 0x0004,
+ char_class_lower = 0x0008,
+ char_class_punct = 0x0010,
+ char_class_space = 0x0020,
+ char_class_upper = 0x0040,
+ char_class_xdigit = 0x0080,
+ char_class_blank = 0x0100,
+ char_class_underscore = 0x4000,
+ char_class_unicode = 0x8000,
+
+ char_class_alnum = char_class_alpha | char_class_digit,
+ char_class_graph = char_class_alpha | char_class_digit | char_class_punct | char_class_underscore,
+ char_class_print = char_class_alpha | char_class_digit | char_class_punct | char_class_underscore | char_class_blank,
+ char_class_word = char_class_alpha | char_class_digit | char_class_underscore
+ };
+ static std::string BOOST_REGEX_CALL set_message_catalogue(const std::string& s);
+protected:
+#if defined(__MWERKS__) && __MWERKS__ <= 0x6000
+ friend class c_regex_traits<char>;
+ friend class c_regex_traits<wchar_t>;
+#endif
+
+ static char regex_message_catalogue[BOOST_REGEX_MAX_PATH];
+ enum syntax_map_size
+ {
+ map_size = UCHAR_MAX + 1
+ };
+
+ static unsigned char syntax_map[map_size];
+ static unsigned short class_map[map_size];
+ static char lower_case_map[map_size];
+
+ static boost::uint_fast32_t BOOST_REGEX_CALL do_lookup_class(const char* p);
+ static bool BOOST_REGEX_CALL do_lookup_collate(std::string& buf, const char* p);
+ static void BOOST_REGEX_CALL do_update_ctype();
+ static void BOOST_REGEX_CALL do_update_collate();
+public:
+ static std::string BOOST_REGEX_CALL error_string(unsigned id);
+ static char* BOOST_REGEX_CALL get_catalogue() { return regex_message_catalogue; }
+};
+
+} // namespace re_detail
+
+
+template<>
+class BOOST_REGEX_DECL c_regex_traits<char> : public re_detail::c_traits_base
+{
+ typedef re_detail::c_traits_base base_type;
+public:
+ typedef char char_type;
+ typedef unsigned char uchar_type;
+ typedef unsigned int size_type;
+ typedef std::string string_type;
+ typedef int locale_type;
+
+ static std::size_t BOOST_REGEX_CALL length(const char_type* p)
+ {
+ return std::strlen(p);
+ }
+ static unsigned int BOOST_REGEX_CALL syntax_type(size_type c)
+ {
+ return syntax_map[c];
+ }
+ static char BOOST_REGEX_CALL translate(char c, bool icase)
+ {
+ return icase ? lower_case_map[(size_type)(uchar_type)c] : c;
+ }
+ static void BOOST_REGEX_CALL transform(std::string& out, const std::string& in);
+
+ static void BOOST_REGEX_CALL transform_primary(std::string& out, const std::string& in);
+
+ static bool BOOST_REGEX_CALL is_separator(char c)
+ {
+ return BOOST_REGEX_MAKE_BOOL((c == '\n') || (c == '\r'));
+ }
+
+ static bool BOOST_REGEX_CALL is_combining(char)
+ {
+ return false;
+ }
+
+ static bool BOOST_REGEX_CALL is_class(char c, boost::uint_fast32_t f)
+ {
+ return BOOST_REGEX_MAKE_BOOL(class_map[(size_type)(uchar_type)c] & f);
+ }
+
+ static int BOOST_REGEX_CALL toi(char c);
+ static int BOOST_REGEX_CALL toi(const char*& first, const char* last, int radix);
+
+ static boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const char* first, const char* last)
+ {
+ std::string s(first, last);
+ return do_lookup_class(s.c_str());
+ }
+
+ static bool BOOST_REGEX_CALL lookup_collatename(std::string& buf, const char* first, const char* last)
+ {
+ std::string s(first, last);
+ return do_lookup_collate(buf, s.c_str());
+ }
+
+ static locale_type BOOST_REGEX_CALL imbue(locale_type l){ return l; }
+ locale_type BOOST_REGEX_CALL getloc()const{ return locale_type(); }
+
+ c_regex_traits()
+ {
+ init();
+ }
+ ~c_regex_traits()
+ {
+ m_free();
+ }
+ struct sentry
+ {
+ sentry(const c_regex_traits<char>&)
+ { c_regex_traits<char>::update(); }
+ operator void*() { return this; }
+ };
+ static void BOOST_REGEX_CALL update();
+private:
+ static void BOOST_REGEX_CALL init();
+ static void BOOST_REGEX_CALL m_free();
+ static c_regex_traits<char> i;
+
+ static unsigned sort_type;
+ static char sort_delim;
+};
+
+#ifndef BOOST_NO_WREGEX
+template<>
+class BOOST_REGEX_DECL c_regex_traits<wchar_t> : public re_detail::c_traits_base
+{
+ typedef re_detail::c_traits_base base_type;
+public:
+ typedef wchar_t char_type;
+ typedef unsigned short uchar_type;
+ typedef unsigned int size_type;
+ typedef std::basic_string<wchar_t> string_type;
+ typedef int locale_type;
+ static std::size_t BOOST_REGEX_CALL length(const char_type* p)
+ {
+ return std::wcslen(p);
+ }
+ static unsigned int BOOST_REGEX_CALL syntax_type(size_type c);
+ static wchar_t BOOST_REGEX_CALL translate(wchar_t c, bool icase)
+ {
+ return icase ? ((c < 256) ? re_detail::wide_lower_case_map[(uchar_type)c] : std::towlower(c)) : c;
+ }
+
+ static void BOOST_REGEX_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
+
+ static void BOOST_REGEX_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
+
+ static bool BOOST_REGEX_CALL is_separator(wchar_t c)
+ {
+ return BOOST_REGEX_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
+ }
+
+ static bool BOOST_REGEX_CALL is_combining(wchar_t c)
+ { return re_detail::is_combining(c); }
+
+ static bool BOOST_REGEX_CALL is_class(wchar_t c, boost::uint_fast32_t f)
+ {
+ return BOOST_REGEX_MAKE_BOOL(((uchar_type)c < 256) ? (re_detail::wide_unicode_classes[(size_type)(uchar_type)c] & f) : do_iswclass(c, f));
+ }
+
+ static int BOOST_REGEX_CALL toi(wchar_t c);
+ static int BOOST_REGEX_CALL toi(const wchar_t*& first, const wchar_t* last, int radix);
+
+ static boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const wchar_t* first, const wchar_t* last);
+
+ static bool BOOST_REGEX_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last);
+
+ static locale_type BOOST_REGEX_CALL imbue(locale_type l){ return l; }
+ locale_type BOOST_REGEX_CALL getloc()const{ return locale_type(); }
+ c_regex_traits<wchar_t>()
+ { init(); }
+ ~c_regex_traits<wchar_t>()
+ { m_free(); }
+ struct sentry
+ {
+ sentry(const c_regex_traits<wchar_t>&)
+ { c_regex_traits<wchar_t>::update(); }
+ operator void*() { return this; }
+ };
+ static void BOOST_REGEX_CALL update();
+ static std::size_t BOOST_REGEX_CALL strnarrow(char *s1, std::size_t len, const wchar_t *s2);
+ static std::size_t BOOST_REGEX_CALL strwiden(wchar_t *s1, std::size_t len, const char *s2);
+private:
+ static bool BOOST_REGEX_CALL do_iswclass(wchar_t c, boost::uint_fast32_t f);
+ static void BOOST_REGEX_CALL m_free();
+ static void BOOST_REGEX_CALL init();
+ static bool BOOST_REGEX_CALL do_lookup_collate(std::basic_string<wchar_t>& out, const wchar_t* first, const wchar_t* last);
+ static c_regex_traits<wchar_t> init_;
+
+ static unsigned sort_type;
+ static wchar_t sort_delim;
+};
+#endif
+
+#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32)
+
+namespace re_detail{
+
+struct BOOST_REGEX_DECL w32_traits_base : public regex_traits_base
+{
+ enum{
+ char_class_none = 0,
+ char_class_alnum = C1_ALPHA | C1_DIGIT,
+ char_class_alpha = C1_ALPHA,
+ char_class_cntrl = C1_CNTRL,
+ char_class_digit = C1_DIGIT,
+ char_class_graph = C1_UPPER | C1_LOWER | C1_DIGIT | C1_PUNCT | C1_ALPHA,
+ char_class_lower = C1_LOWER,
+ char_class_print = C1_UPPER | C1_LOWER | C1_DIGIT | C1_PUNCT | C1_BLANK | C1_ALPHA,
+ char_class_punct = C1_PUNCT,
+ char_class_space = C1_SPACE,
+ char_class_upper = C1_UPPER,
+ char_class_xdigit = C1_XDIGIT,
+ char_class_blank = C1_BLANK,
+ char_class_underscore = 0x4000,
+ char_class_word = C1_ALPHA | C1_DIGIT | char_class_underscore,
+ char_class_unicode = 0x8000,
+ char_class_win = 0x01FF
+ };
+
+
+public:
+ static std::string BOOST_REGEX_CALL set_message_catalogue(const std::string& s);
+protected:
+ static char regex_message_catalogue[BOOST_REGEX_MAX_PATH];
+ enum syntax_map_size
+ {
+ map_size = UCHAR_MAX + 1
+ };
+
+ static unsigned char syntax_map[map_size];
+ static unsigned short class_map[map_size];
+ static char lower_case_map[map_size];
+
+ static boost::uint_fast32_t BOOST_REGEX_CALL do_lookup_class(const char* p);
+ static bool BOOST_REGEX_CALL do_lookup_collate(std::string& buf, const char* p);
+ static void BOOST_REGEX_CALL do_free();
+ static void BOOST_REGEX_CALL do_init();
+public:
+ static std::string BOOST_REGEX_CALL error_string(unsigned id);
+ static char* BOOST_REGEX_CALL get_catalogue() { return regex_message_catalogue; }
+};
+
+
+} // namespace re_detail
+
+template<class charT>
+class w32_regex_traits;
+
+template<>
+class BOOST_REGEX_DECL w32_regex_traits<char> : public re_detail::w32_traits_base
+{
+ typedef re_detail::w32_traits_base base_type;
+public:
+ typedef char char_type;
+ typedef unsigned char uchar_type;
+ typedef unsigned int size_type;
+ typedef std::string string_type;
+ typedef int locale_type;
+
+ static std::size_t BOOST_REGEX_CALL length(const char_type* p)
+ {
+ return std::strlen(p);
+ }
+ static unsigned int BOOST_REGEX_CALL syntax_type(size_type c)
+ {
+ return syntax_map[c];
+ }
+ static char BOOST_REGEX_CALL translate(char c, bool icase)
+ {
+ return icase ? lower_case_map[(size_type)(uchar_type)c] : c;
+ }
+ static void BOOST_REGEX_CALL transform(std::string& out, const std::string& in);
+
+ static void BOOST_REGEX_CALL transform_primary(std::string& out, const std::string& in);
+
+ static bool BOOST_REGEX_CALL is_separator(char c)
+ {
+ return BOOST_REGEX_MAKE_BOOL((c == '\n') || (c == '\r'));
+ }
+
+ static bool BOOST_REGEX_CALL is_combining(char)
+ {
+ return false;
+ }
+
+ static bool BOOST_REGEX_CALL is_class(char c, boost::uint_fast32_t f)
+ {
+ return BOOST_REGEX_MAKE_BOOL(class_map[(size_type)(uchar_type)c] & f);
+ }
+
+ static int BOOST_REGEX_CALL toi(char c);
+ static int BOOST_REGEX_CALL toi(const char*& first, const char* last, int radix);
+
+ static boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const char* first, const char* last)
+ {
+ std::string s(first, last);
+ return do_lookup_class(s.c_str());
+ }
+
+ static bool BOOST_REGEX_CALL lookup_collatename(std::string& buf, const char* first, const char* last)
+ {
+ std::string s(first, last);
+ return do_lookup_collate(buf, s.c_str());
+ }
+
+ static locale_type BOOST_REGEX_CALL imbue(locale_type l){ return l; }
+ locale_type BOOST_REGEX_CALL getloc()const{ return locale_type(); }
+
+ struct sentry
+ {
+ sentry(const w32_regex_traits<char>&)
+ { w32_regex_traits<char>::update(); }
+ ~sentry(){}
+ operator void*() { return this; }
+ };
+ static void BOOST_REGEX_CALL update();
+ w32_regex_traits();
+ ~w32_regex_traits();
+private:
+ static w32_regex_traits<char> i;
+};
+
+#ifndef BOOST_NO_WREGEX
+template<>
+class BOOST_REGEX_DECL w32_regex_traits<wchar_t> : public re_detail::w32_traits_base
+{
+ typedef re_detail::w32_traits_base base_type;
+public:
+ typedef wchar_t char_type;
+ typedef unsigned short uchar_type;
+ typedef unsigned int size_type;
+ typedef std::basic_string<wchar_t> string_type;
+ typedef int locale_type;
+ static std::size_t BOOST_REGEX_CALL length(const char_type* p)
+ {
+ return std::wcslen(p);
+ }
+ static unsigned int BOOST_REGEX_CALL syntax_type(size_type c);
+ static wchar_t BOOST_REGEX_CALL translate(wchar_t c, bool icase)
+ {
+ return icase ? ((c < 256) ? re_detail::wide_lower_case_map[(uchar_type)c] : wtolower(c)) : c;
+ }
+
+ static void BOOST_REGEX_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
+
+ static void BOOST_REGEX_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
+
+ static bool BOOST_REGEX_CALL is_separator(wchar_t c)
+ {
+ return BOOST_REGEX_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
+ }
+
+ static bool BOOST_REGEX_CALL is_combining(wchar_t c)
+ { return re_detail::is_combining(c); }
+
+ static bool BOOST_REGEX_CALL is_class(wchar_t c, boost::uint_fast32_t f)
+ {
+ return BOOST_REGEX_MAKE_BOOL(((uchar_type)c < 256) ? (wide_unicode_classes[(size_type)(uchar_type)c] & f) : do_iswclass(c, f));
+ }
+
+ static int BOOST_REGEX_CALL toi(wchar_t c);
+ static int BOOST_REGEX_CALL toi(const wchar_t*& first, const wchar_t* last, int radix);
+
+ static boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const wchar_t* first, const wchar_t* last);
+
+ static bool BOOST_REGEX_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last);
+
+ static locale_type BOOST_REGEX_CALL imbue(locale_type l){ return l; }
+ locale_type BOOST_REGEX_CALL getloc()const{ return locale_type(); }
+
+ struct sentry
+ {
+ sentry(const w32_regex_traits<wchar_t>&)
+ { w32_regex_traits<wchar_t>::update(); }
+ ~sentry(){}
+ operator void*() { return this; }
+ };
+ static void BOOST_REGEX_CALL update();
+ w32_regex_traits();
+ ~w32_regex_traits();
+ static std::size_t BOOST_REGEX_CALL strnarrow(char *s1, std::size_t len, const wchar_t *s2);
+ static std::size_t BOOST_REGEX_CALL strwiden(wchar_t *s1, std::size_t len, const char *s2);
+
+private:
+ static bool BOOST_REGEX_CALL do_iswclass(wchar_t c, boost::uint_fast32_t f);
+ static bool BOOST_REGEX_CALL do_lookup_collate(std::basic_string<wchar_t>& out, const wchar_t* first, const wchar_t* last);
+ static w32_regex_traits<wchar_t> init_;
+ static wchar_t BOOST_REGEX_CALL wtolower(wchar_t c);
+ static unsigned short wide_unicode_classes[];
+};
+#endif // Wide strings
+#endif // Win32
+
+#if !defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
+
+} // namspace boost
+
+#ifdef __BORLANDC__
+ #pragma option pop
+#endif
+#include <locale>
+#ifdef __BORLANDC__
+ #pragma option push -a4 -b -Ve -pc
+#endif
+
+namespace boost{
+
+namespace re_detail
+{
+
+template <class charT>
+struct message_data;
+
+template <>
+struct message_data<char>;
+
+template <>
+struct message_data<wchar_t>;
+
+struct BOOST_REGEX_DECL cpp_regex_traits_base : public regex_traits_base
+{
+ enum char_class_type
+ {
+ char_class_none = 0,
+ char_class_alnum = std::ctype_base::alnum,
+ char_class_alpha = std::ctype_base::alpha,
+ char_class_cntrl = std::ctype_base::cntrl,
+ char_class_digit = std::ctype_base::digit,
+ char_class_graph = std::ctype_base::graph,
+ char_class_lower = std::ctype_base::lower,
+ char_class_print = std::ctype_base::print,
+ char_class_punct = std::ctype_base::punct,
+ char_class_space = std::ctype_base::space,
+ char_class_upper = std::ctype_base::upper,
+ char_class_xdigit = std::ctype_base::xdigit,
+ char_class_blank = 1<<12,
+ char_class_underscore = 1<<13,
+ char_class_word = std::ctype_base::alnum | char_class_underscore,
+ char_class_unicode = 1<<14,
+ char_class_all_base = char_class_alnum | char_class_alpha | char_class_cntrl
+ | char_class_digit | char_class_graph | char_class_lower
+ | char_class_print | char_class_punct | char_class_space
+ | char_class_upper | char_class_xdigit
+ };
+
+ static std::string BOOST_REGEX_CALL set_message_catalogue(const std::string& s);
+protected:
+ static char regex_message_cat[BOOST_REGEX_MAX_PATH];
+};
+
+} // namespace re_detail
+
+template <class charT>
+class cpp_regex_traits;
+
+template<>
+class BOOST_REGEX_DECL cpp_regex_traits<char> : public re_detail::cpp_regex_traits_base
+{
+ typedef re_detail::cpp_regex_traits_base base_type;
+private:
+ re_detail::message_data<char>* pmd;
+ const unsigned char* psyntax;
+ char* lower_map;
+ const std::ctype<char>* pctype;
+ const std::collate<char>* pcollate;
+ std::locale locale_inst;
+ unsigned sort_type;
+ char sort_delim;
+
+ cpp_regex_traits(const cpp_regex_traits&);
+ cpp_regex_traits& operator=(const cpp_regex_traits&);
+
+public:
+ typedef char char_type;
+ typedef unsigned char uchar_type;
+ typedef unsigned int size_type;
+ typedef std::string string_type;
+ typedef std::locale locale_type;
+
+ cpp_regex_traits();
+ ~cpp_regex_traits();
+
+ static std::size_t BOOST_REGEX_CALL length(const char_type* p)
+ {
+ return std::strlen(p);
+ }
+ unsigned int BOOST_REGEX_CALL syntax_type(size_type c)const
+ {
+ return psyntax[c];
+ }
+ char BOOST_REGEX_CALL translate(char c, bool icase)const
+ {
+ return icase ? lower_map[(size_type)(uchar_type)c] : c;
+ }
+ void BOOST_REGEX_CALL transform(std::string& out, const std::string& in)const
+ {
+ out = pcollate->transform(in.c_str(), in.c_str() + in.size()).c_str();
+ }
+
+ void BOOST_REGEX_CALL transform_primary(std::string& out, const std::string& in)const;
+
+ static bool BOOST_REGEX_CALL is_separator(char c)
+ {
+ return BOOST_REGEX_MAKE_BOOL((c == '\n') || (c == '\r'));
+ }
+
+ static bool BOOST_REGEX_CALL is_combining(char)
+ {
+ return false;
+ }
+
+ bool BOOST_REGEX_CALL is_class(char c, boost::uint_fast32_t f)const
+ {
+ if(pctype->is((std::ctype<char>::mask)(f & char_class_all_base), c))
+ return true;
+ if((f & char_class_underscore) && (c == '_'))
+ return true;
+ if((f & char_class_blank) && ((c == ' ') || (c == '\t')))
+ return true;
+ return false;
+ }
+
+ int BOOST_REGEX_CALL toi(char c)const;
+ int BOOST_REGEX_CALL toi(const char*& first, const char* last, int radix)const;
+
+ boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const char* first, const char* last)const;
+ bool BOOST_REGEX_CALL lookup_collatename(std::string& s, const char* first, const char* last)const;
+
+ std::string BOOST_REGEX_CALL error_string(unsigned id)const;
+ locale_type BOOST_REGEX_CALL imbue(locale_type l);
+ locale_type BOOST_REGEX_CALL getloc()const{ return locale_inst; }
+
+ struct sentry
+ {
+ sentry(const cpp_regex_traits<char>&){}
+ operator void*() { return this; }
+ };
+};
+
+#ifndef BOOST_NO_WREGEX
+template<>
+class BOOST_REGEX_DECL cpp_regex_traits<wchar_t> : public re_detail::cpp_regex_traits_base
+{
+ typedef re_detail::cpp_regex_traits_base base_type;
+public:
+ typedef wchar_t char_type;
+ typedef unsigned short uchar_type;
+ typedef unsigned int size_type;
+ typedef std::basic_string<wchar_t> string_type;
+ typedef std::locale locale_type;
+
+private:
+ re_detail::message_data<wchar_t>* pmd;
+ const unsigned char* psyntax;
+ wchar_t* lower_map;
+ const std::ctype<wchar_t>* pctype;
+ const std::collate<wchar_t>* pcollate;
+ const std::codecvt<wchar_t, char, std::mbstate_t>* pcdv;
+ std::locale locale_inst;
+ unsigned int BOOST_REGEX_CALL do_syntax_type(size_type c)const;
+ unsigned sort_type;
+ wchar_t sort_delim;
+
+ cpp_regex_traits(const cpp_regex_traits&);
+ cpp_regex_traits& operator=(const cpp_regex_traits&);
+
+public:
+
+ static std::size_t BOOST_REGEX_CALL length(const char_type* p)
+ {
+ return std::wcslen(p);
+ }
+ unsigned int BOOST_REGEX_CALL syntax_type(size_type c)const
+ {
+ return (c < UCHAR_MAX) ? psyntax[c] : do_syntax_type(c);
+ }
+ wchar_t BOOST_REGEX_CALL translate(wchar_t c, bool icase)const
+ {
+ return icase ? (((uchar_type)c) <= UCHAR_MAX) ? lower_map[c] : pctype->tolower(c) : c;
+ }
+ void BOOST_REGEX_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in)const
+ {
+ out = pcollate->transform(in.c_str(), in.c_str() + in.size());
+ }
+
+ void BOOST_REGEX_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in)const;
+
+ static bool BOOST_REGEX_CALL is_separator(wchar_t c)
+ {
+ return BOOST_REGEX_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
+ }
+
+ static bool BOOST_REGEX_CALL is_combining(wchar_t c)
+ { return re_detail::is_combining(c); }
+
+ bool BOOST_REGEX_CALL is_class(wchar_t c, boost::uint_fast32_t f)const
+ {
+ if(pctype->is((std::ctype<wchar_t>::mask)(f & char_class_all_base), c))
+ return true;
+ if((f & char_class_underscore) && (c == '_'))
+ return true;
+ if((f & char_class_blank) && ((c == ' ') || (c == '\t')))
+ return true;
+ if((f & char_class_unicode) && ((uchar_type)c > (uchar_type)255))
+ return true;
+ return false;
+ }
+
+ int BOOST_REGEX_CALL toi(wchar_t c)const;
+ int BOOST_REGEX_CALL toi(const wchar_t*& first, const wchar_t* last, int radix)const;
+
+ boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const wchar_t* first, const wchar_t* last)const;
+ bool BOOST_REGEX_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last)const;
+
+ std::string BOOST_REGEX_CALL error_string(unsigned id)const;
+ cpp_regex_traits();
+ ~cpp_regex_traits();
+ locale_type BOOST_REGEX_CALL imbue(locale_type l);
+ locale_type BOOST_REGEX_CALL getloc()const{ return locale_inst; }
+ std::size_t BOOST_REGEX_CALL strwiden(wchar_t *s1, std::size_t len, const char *s2)const;
+
+ struct sentry
+ {
+ sentry(const cpp_regex_traits<wchar_t>&){}
+ operator void*() { return this; }
+ };
+};
+#endif // BOOST_NO_WREGEX
+
+#endif // BOOST_NO_STD_LOCALE
+
+#ifdef BOOST_REGEX_USE_WIN32_LOCALE
+
+template <class charT>
+class regex_traits : public w32_regex_traits<charT>
+{
+};
+
+#elif defined(BOOST_REGEX_USE_C_LOCALE)
+
+template <class charT>
+class regex_traits : public c_regex_traits<charT>
+{
+};
+
+#elif defined(BOOST_REGEX_USE_CPP_LOCALE)
+
+template <class charT>
+class regex_traits : public cpp_regex_traits<charT>
+{
+};
+
+#else
+#error No default localisation model defined
+#endif
+
+#ifdef __BORLANDC__
+ #pragma option pop
+#endif
+
+} // namespace boost
+
+#endif // include
+
+
+
+
+
+
*/
/*
- * LOCATION: see http://www.boost.org for most recent version.
+ * LOCATION: see http://www.boost.org/libs/regex for documentation.
* FILE regex_fwd.cpp
* VERSION see <boost/version.hpp>
* DESCRIPTION: Forward declares boost::reg_expression<> and
#ifndef BOOST_REGEX_FWD_HPP
#define BOOST_REGEX_FWD_HPP
-#include <boost/config.hpp>
-#include <boost/detail/allocator.hpp>
+#include <boost/regex/v3/regex_fwd.hpp>
-//
-// define BOOST_REGEX_NO_FWD if this
-// header doesn't work!
-//
-#ifdef BOOST_REGEX_NO_FWD
-# ifndef BOOST_RE_REGEX_HPP
-# include <boost/regex.hpp>
-# endif
-#else
-
-//
-// If there isn't good enough wide character support then there will
-// be no wide character regular expressions:
-//
-#if (defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING)) && !defined(BOOST_NO_WREGEX)
-# define BOOST_NO_WREGEX
#endif
-namespace boost{
-
-template <class charT>
-class regex_traits;
-
-template <class charT, class traits = regex_traits<charT>, class Allocator = BOOST_DEFAULT_ALLOCATOR(charT) >
-class reg_expression;
-
-typedef reg_expression<char, regex_traits<char>, BOOST_DEFAULT_ALLOCATOR(char) > regex;
-#ifndef BOOST_NO_WREGEX
-typedef reg_expression<wchar_t, regex_traits<wchar_t>, BOOST_DEFAULT_ALLOCATOR(wchar_t) > wregex;
-#endif
-
-} // namespace boost
-
-#endif // BOOST_REGEX_NO_FWD
-
-#endif
// This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
//
-// See http://www.boost.org/libs/smart_ptr/scoped_array.htm for documentation.
+// http://www.boost.org/libs/smart_ptr/scoped_array.htm
//
#include <boost/assert.hpp>
namespace boost
{
+// Debug hooks
+
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+
+void sp_array_constructor_hook(void * p);
+void sp_array_destructor_hook(void * p);
+
+#endif
+
// scoped_array extends scoped_ptr to arrays. Deletion of the array pointed to
// is guaranteed, either on destruction of the scoped_array or via an explicit
// reset(). Use shared_array or std::vector if your needs are more complex.
-template<typename T> class scoped_array // noncopyable
+template<class T> class scoped_array // noncopyable
{
private:
explicit scoped_array(T * p = 0) : ptr(p) // never throws
{
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ boost::sp_array_constructor_hook(ptr);
+#endif
}
~scoped_array() // never throws
{
- checked_array_delete(ptr);
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ boost::sp_array_destructor_hook(ptr);
+#endif
+ boost::checked_array_delete(ptr);
}
void reset(T * p = 0) // never throws
{
- if (ptr != p)
- {
- checked_array_delete(ptr);
- ptr = p;
- }
+ BOOST_ASSERT(p == 0 || p != ptr); // catch self-reset errors
+ this_type(p).swap(*this);
}
T & operator[](std::ptrdiff_t i) const // never throws
// This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
//
-// See http://www.boost.org/libs/smart_ptr/scoped_ptr.htm for documentation.
+// http://www.boost.org/libs/smart_ptr/scoped_ptr.htm
//
#include <boost/assert.hpp>
namespace boost
{
+// Debug hooks
+
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+
+void sp_scalar_constructor_hook(void * p);
+void sp_scalar_destructor_hook(void * p);
+
+#endif
+
// scoped_ptr mimics a built-in pointer except that it guarantees deletion
// of the object pointed to, either on destruction of the scoped_ptr or via
// an explicit reset(). scoped_ptr is a simple solution for simple needs;
// use shared_ptr or std::auto_ptr if your needs are more complex.
-template<typename T> class scoped_ptr // noncopyable
+template<class T> class scoped_ptr // noncopyable
{
private:
explicit scoped_ptr(T * p = 0): ptr(p) // never throws
{
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ boost::sp_scalar_constructor_hook(ptr);
+#endif
}
#ifndef BOOST_NO_AUTO_PTR
explicit scoped_ptr(std::auto_ptr<T> p): ptr(p.release()) // never throws
{
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ boost::sp_scalar_constructor_hook(ptr);
+#endif
}
#endif
~scoped_ptr() // never throws
{
- checked_delete(ptr);
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ boost::sp_scalar_destructor_hook(ptr);
+#endif
+ boost::checked_delete(ptr);
}
void reset(T * p = 0) // never throws
{
- if(ptr != p)
- {
- this_type(p).swap(*this);
- }
+ BOOST_ASSERT(p == 0 || p != ptr); // catch self-reset errors
+ this_type(p).swap(*this);
}
T & operator*() const // never throws
}
};
-template<typename T> inline void swap(scoped_ptr<T> & a, scoped_ptr<T> & b) // never throws
+template<class T> inline void swap(scoped_ptr<T> & a, scoped_ptr<T> & b) // never throws
{
a.swap(b);
}
// get_pointer(p) is a generic way to say p.get()
-template<typename T> inline T * get_pointer(scoped_ptr<T> const & p)
+template<class T> inline T * get_pointer(scoped_ptr<T> const & p)
{
return p.get();
}
// is destroyed or reset.
//
-template<typename T> class shared_array
+template<class T> class shared_array
{
private:
// shared_array will release p by calling d(p)
//
- template<typename D> shared_array(T * p, D d): px(p), pn(p, d)
+ template<class D> shared_array(T * p, D d): px(p), pn(p, d)
{
}
this_type(p).swap(*this);
}
- template <typename D> void reset(T * p, D d)
+ template <class D> void reset(T * p, D d)
{
this_type(p, d).swap(*this);
}
}; // shared_array
-template<typename T> inline bool operator==(shared_array<T> const & a, shared_array<T> const & b) // never throws
+template<class T> inline bool operator==(shared_array<T> const & a, shared_array<T> const & b) // never throws
{
return a.get() == b.get();
}
-template<typename T> inline bool operator!=(shared_array<T> const & a, shared_array<T> const & b) // never throws
+template<class T> inline bool operator!=(shared_array<T> const & a, shared_array<T> const & b) // never throws
{
return a.get() != b.get();
}
-template<typename T> inline bool operator<(shared_array<T> const & a, shared_array<T> const & b) // never throws
+template<class T> inline bool operator<(shared_array<T> const & a, shared_array<T> const & b) // never throws
{
return std::less<T*>()(a.get(), b.get());
}
-template<typename T> void swap(shared_array<T> & a, shared_array<T> & b) // never throws
+template<class T> void swap(shared_array<T> & a, shared_array<T> & b) // never throws
{
a.swap(b);
}
// shared_ptr.hpp
//
// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
-// Copyright (c) 2001, 2002 Peter Dimov
+// Copyright (c) 2001, 2002, 2003 Peter Dimov
//
// Permission to copy, use, modify, sell and distribute this software
// is granted provided this copyright notice appears in all copies.
#include <boost/checked_delete.hpp>
#include <boost/throw_exception.hpp>
#include <boost/detail/shared_count.hpp>
+#include <boost/detail/workaround.hpp>
-#include <memory> // for std::auto_ptr
-#include <algorithm> // for std::swap
-#include <functional> // for std::less
-#include <typeinfo> // for std::bad_cast
+#include <memory> // for std::auto_ptr
+#include <algorithm> // for std::swap
+#include <functional> // for std::less
+#include <typeinfo> // for std::bad_cast
+#include <iosfwd> // for std::basic_ostream
#ifdef BOOST_MSVC // moved here to work around VC++ compiler crash
# pragma warning(push)
namespace boost
{
+template<class T> class weak_ptr;
+template<class T> class enable_shared_from_this;
+
namespace detail
{
struct dynamic_cast_tag {};
struct polymorphic_cast_tag {};
-template<typename T> struct shared_ptr_traits
+template<class T> struct shared_ptr_traits
{
typedef T & reference;
};
#endif
+// enable_shared_from_this support
+
+template<class T, class Y> void sp_enable_shared_from_this(boost::enable_shared_from_this<T> * pe, Y * px, shared_count const & pn)
+{
+ if(pe != 0) pe->_internal_weak_this._internal_assign(px, pn);
+}
+
+inline void sp_enable_shared_from_this(void const *, void const *, shared_count const &)
+{
+}
+
} // namespace detail
// is destroyed or reset.
//
-template<typename T> class weak_ptr;
-template<typename T> class intrusive_ptr;
-
-template<typename T> class shared_ptr
+template<class T> class shared_ptr
{
private:
- // Borland 5.5.1 specific workarounds
-// typedef checked_deleter<T> deleter;
+ // Borland 5.5.1 specific workaround
typedef shared_ptr<T> this_type;
public:
typedef T element_type;
typedef T value_type;
+ typedef T * pointer;
+ typedef typename detail::shared_ptr_traits<T>::reference reference;
- shared_ptr(): px(0), pn()
+ shared_ptr(): px(0), pn() // never throws in 1.30+
{
}
- template<typename Y>
- explicit shared_ptr(Y * p): px(p), pn(p, checked_deleter<Y>(), p) // Y must be complete
+ template<class Y>
+ explicit shared_ptr(Y * p): px(p), pn(p, checked_deleter<Y>()) // Y must be complete
{
+ detail::sp_enable_shared_from_this(p, p, pn);
}
//
// shared_ptr will release p by calling d(p)
//
- template<typename Y, typename D> shared_ptr(Y * p, D d): px(p), pn(p, d)
+ template<class Y, class D> shared_ptr(Y * p, D d): px(p), pn(p, d)
{
+ detail::sp_enable_shared_from_this(p, p, pn);
}
-// generated copy constructor, assignment, destructor are fine
+// generated copy constructor, assignment, destructor are fine...
- template<typename Y>
- explicit shared_ptr(weak_ptr<Y> const & r): px(r.px), pn(r.pn) // may throw
+// except that Borland C++ has a bug, and g++ with -Wsynth warns
+#if defined(__BORLANDC__) || defined(__GNUC__)
+
+ shared_ptr & operator=(shared_ptr const & r) // never throws
{
+ px = r.px;
+ pn = r.pn; // shared_count::op= doesn't throw
+ return *this;
}
- template<typename Y>
- shared_ptr(shared_ptr<Y> const & r): px(r.px), pn(r.pn) // never throws
+#endif
+
+ template<class Y>
+ explicit shared_ptr(weak_ptr<Y> const & r): pn(r.pn) // may throw
{
+ // it is now safe to copy r.px, as pn(r.pn) did not throw
+ px = r.px;
}
- template<typename Y>
- shared_ptr(intrusive_ptr<Y> const & r): px(r.get()), pn(r.get()) // never throws
+ template<class Y>
+ shared_ptr(shared_ptr<Y> const & r): px(r.px), pn(r.pn) // never throws
{
}
- template<typename Y>
+ template<class Y>
shared_ptr(shared_ptr<Y> const & r, detail::static_cast_tag): px(static_cast<element_type *>(r.px)), pn(r.pn)
{
}
- template<typename Y>
+ template<class Y>
shared_ptr(shared_ptr<Y> const & r, detail::dynamic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn)
{
- if (px == 0) // need to allocate new counter -- the cast failed
+ if(px == 0) // need to allocate new counter -- the cast failed
{
pn = detail::shared_count();
}
}
- template<typename Y>
+ template<class Y>
shared_ptr(shared_ptr<Y> const & r, detail::polymorphic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn)
{
- if (px == 0)
+ if(px == 0)
{
boost::throw_exception(std::bad_cast());
}
#ifndef BOOST_NO_AUTO_PTR
- template<typename Y>
- explicit shared_ptr(std::auto_ptr<Y> & r): px(r.get()), pn(r)
+ template<class Y>
+ explicit shared_ptr(std::auto_ptr<Y> & r): px(r.get()), pn()
{
+ Y * tmp = r.get();
+ pn = detail::shared_count(r);
+ detail::sp_enable_shared_from_this(tmp, tmp, pn);
}
#endif
#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1200)
- template<typename Y>
+ template<class Y>
shared_ptr & operator=(shared_ptr<Y> const & r) // never throws
{
px = r.px;
#ifndef BOOST_NO_AUTO_PTR
- template<typename Y>
+ template<class Y>
shared_ptr & operator=(std::auto_ptr<Y> & r)
{
this_type(r).swap(*this);
#endif
- void reset()
+ void reset() // never throws in 1.30+
{
this_type().swap(*this);
}
- template<typename Y> void reset(Y * p) // Y must be complete
+ template<class Y> void reset(Y * p) // Y must be complete
{
BOOST_ASSERT(p == 0 || p != px); // catch self-reset errors
this_type(p).swap(*this);
}
- template<typename Y, typename D> void reset(Y * p, D d)
+ template<class Y, class D> void reset(Y * p, D d)
{
this_type(p, d).swap(*this);
}
- typename detail::shared_ptr_traits<T>::reference operator* () const // never throws
+ reference operator* () const // never throws
{
BOOST_ASSERT(px != 0);
return *px;
return px == 0? 0: &this_type::get;
}
+ // operator! is redundant, but some compilers need it
+
bool operator! () const // never throws
{
return px == 0;
pn.swap(other.pn);
}
+ template<class Y> bool _internal_less(shared_ptr<Y> const & rhs) const
+ {
+ return pn < rhs.pn;
+ }
+
+ void * _internal_get_deleter(std::type_info const & ti) const
+ {
+ return pn.get_deleter(ti);
+ }
+
// Tasteless as this may seem, making all members public allows member templates
// to work in the absence of member template friends. (Matthew Langston)
private:
- template<typename Y> friend class shared_ptr;
- template<typename Y> friend class weak_ptr;
+ template<class Y> friend class shared_ptr;
+ template<class Y> friend class weak_ptr;
#endif
}; // shared_ptr
-template<typename T, typename U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b)
+template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b)
{
return a.get() == b.get();
}
-template<typename T, typename U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b)
+template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b)
{
return a.get() != b.get();
}
// Resolve the ambiguity between our op!= and the one in rel_ops
-template<typename T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T> const & b)
+template<class T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T> const & b)
{
return a.get() != b.get();
}
#endif
-template<typename T> inline bool operator<(shared_ptr<T> const & a, shared_ptr<T> const & b)
+template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b)
{
- return std::less<T*>()(a.get(), b.get());
+ return a._internal_less(b);
}
-template<typename T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b)
+template<class T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b)
{
a.swap(b);
}
-template<typename T, typename U> shared_ptr<T> shared_static_cast(shared_ptr<U> const & r)
+template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r)
+{
+ return shared_ptr<T>(r, detail::static_cast_tag());
+}
+
+template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r)
+{
+ return shared_ptr<T>(r, detail::dynamic_cast_tag());
+}
+
+// shared_*_cast names are deprecated. Use *_pointer_cast instead.
+
+template<class T, class U> shared_ptr<T> shared_static_cast(shared_ptr<U> const & r)
{
return shared_ptr<T>(r, detail::static_cast_tag());
}
-template<typename T, typename U> shared_ptr<T> shared_dynamic_cast(shared_ptr<U> const & r)
+template<class T, class U> shared_ptr<T> shared_dynamic_cast(shared_ptr<U> const & r)
{
return shared_ptr<T>(r, detail::dynamic_cast_tag());
}
-template<typename T, typename U> shared_ptr<T> shared_polymorphic_cast(shared_ptr<U> const & r)
+template<class T, class U> shared_ptr<T> shared_polymorphic_cast(shared_ptr<U> const & r)
{
return shared_ptr<T>(r, detail::polymorphic_cast_tag());
}
-template<typename T, typename U> shared_ptr<T> shared_polymorphic_downcast(shared_ptr<U> const & r)
+template<class T, class U> shared_ptr<T> shared_polymorphic_downcast(shared_ptr<U> const & r)
{
BOOST_ASSERT(dynamic_cast<T *>(r.get()) == r.get());
return shared_static_cast<T>(r);
// get_pointer() enables boost::mem_fn to recognize shared_ptr
-template<typename T> inline T * get_pointer(shared_ptr<T> const & p)
+template<class T> inline T * get_pointer(shared_ptr<T> const & p)
{
return p.get();
}
-// shared_from_this() creates a shared_ptr from a raw pointer (usually 'this')
+// operator<<
-namespace detail
+#if defined(__GNUC__) && (__GNUC__ < 3)
+
+template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> const & p)
{
+ os << p.get();
+ return os;
+}
+
+#else
-inline void sp_assert_counted_base(boost::counted_base const *)
+# if BOOST_WORKAROUND(BOOST_MSVC, <= 1200 && __SGI_STL_PORT)
+// MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL
+using std::basic_ostream;
+template<class E, class T, class Y> basic_ostream<E, T> & operator<< (basic_ostream<E, T> & os, shared_ptr<Y> const & p)
+# else
+template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p)
+# endif
{
+ os << p.get();
+ return os;
}
-template<class T> inline T * sp_remove_const(T const * p)
+#endif
+
+// get_deleter (experimental)
+
+#if defined(__GNUC__) && (__GNUC__ < 3)
+
+// g++ 2.9x doesn't allow static_cast<X const *>(void *)
+
+template<class D, class T> D * get_deleter(shared_ptr<T> const & p)
{
- return const_cast<T *>(p);
+ void const * q = p._internal_get_deleter(typeid(D));
+ return const_cast<D *>(static_cast<D const *>(q));
}
-} // namespace detail
+#else
-template<class T> shared_ptr<T> shared_from_this(T * p)
+template<class D, class T> D * get_deleter(shared_ptr<T> const & p)
{
- detail::sp_assert_counted_base(p);
- return shared_ptr<T>(detail::sp_remove_const(p));
+ return static_cast<D *>(p._internal_get_deleter(typeid(D)));
}
+#endif
+
} // namespace boost
#ifdef BOOST_MSVC
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-// For more information, see http://www.boost.org
+// For more information, see http://www.boost.org/libs/signals
#ifndef BOOST_SIGNAL_HPP
#define BOOST_SIGNAL_HPP
typename Signature, // function type R (T1, T2, ..., TN)
typename Combiner = last_value<typename function_traits<Signature>::result_type>,
typename Group = int,
- typename GroupCompare = std::less<int>,
+ typename GroupCompare = std::less<Group>,
typename SlotFunction = function<Signature>
>
class signal :
// The user may freely pass around the "connection" object and terminate
// the connection at any time using disconnect().
- class connection :
+ class BOOST_SIGNALS_DECL connection :
private less_than_comparable1<connection>,
private equality_comparable1<connection>
{
// Similar to connection, but will disconnect the connection when it is
// destroyed unless release() has been called.
- class scoped_connection : public connection {
+ class BOOST_SIGNALS_DECL scoped_connection : public connection {
public:
scoped_connection() : connection(), released(false) {}
scoped_connection(const connection&);
// Must be constructed before calling the slots, because it safely
// manages call depth
- class call_notification {
+ class BOOST_SIGNALS_DECL call_notification {
public:
call_notification(const shared_ptr<signal_base_impl>&);
~call_notification();
// Implementation of base class for all signals. It handles the
// management of the underlying slot lists.
- class signal_base_impl {
+ class BOOST_SIGNALS_DECL signal_base_impl {
public:
friend class call_notification;
mutable slot_container_type slots_;
};
- class signal_base : public noncopyable {
+ class BOOST_SIGNALS_DECL signal_base : public noncopyable {
public:
typedef signal_base_impl::compare_type compare_type;
# define BOOST_SIGNALS_NAMESPACE signals
#endif
+/*****************************************************************************
+ *
+ * Set up dll import/export options:
+ *
+ ****************************************************************************/
+#if defined(_MSC_VER) && defined(_DLL)
+# define BOOST_SIGNALS_HAS_DLL_RUNTIME
+#endif
+
+#if defined(BOOST_SIGNALS_HAS_DLL_RUNTIME) && !defined(BOOST_SIGNALS_STATIC_LINK)
+# if defined(BOOST_SIGNALS_IN_LIBRARY_SOURCE)
+# define BOOST_SIGNALS_DECL __declspec(dllexport)
+# define BOOST_SIGNALS_BUILD_DLL
+# else
+# define BOOST_SIGNALS_DECL __declspec(dllimport)
+# endif
+#endif
+
+#ifndef BOOST_SIGNALS_DECL
+# define BOOST_SIGNALS_DECL
+#endif
+
+/*****************************************************************************
+ ****************************************************************************/
+
#include <boost/type_traits/conversion_traits.hpp>
#include <boost/ref.hpp>
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-
+
// For more information, see http://www.boost.org
#ifndef BOOST_SIGNALS_SLOT_HEADER
namespace boost {
namespace BOOST_SIGNALS_NAMESPACE {
namespace detail {
- class slot_base {
- // We would have to enumerate all of the signalN classes here as
+ class BOOST_SIGNALS_DECL slot_base {
+ // We would have to enumerate all of the signalN classes here as
// friends to make this private (as it otherwise should be). We can't
// name all of them because we don't know how many there are.
public:
// Get the set of bound objects
- std::vector<const trackable*>& get_bound_objects() const
+ std::vector<const trackable*>& get_bound_objects() const
{ return bound_objects; }
-
+
// Determine if this slot is still "active", i.e., all of the bound
// objects still exist
bool is_active() const { return watch_bound_objects.connected(); }
// Create a connection for this slot
void create_connection();
- // Get the slot so that it can be copied
- template<typename F>
- reference_wrapper<const F>
- get_invocable_slot(const F& f, BOOST_SIGNALS_NAMESPACE::detail::signal_tag)
- { return reference_wrapper<const F>(f); }
-
- template<typename F>
- const F& get_invocable_slot(const F& f, BOOST_SIGNALS_NAMESPACE::detail::reference_tag)
- { return f; }
-
- template<typename F>
- const F& get_invocable_slot(const F& f, BOOST_SIGNALS_NAMESPACE::detail::value_tag)
- { return f; }
-
- // Get the slot so that it can be inspected for trackable objects
- template<typename F>
- const F& get_inspectable_slot(const F& f,
- BOOST_SIGNALS_NAMESPACE::detail::signal_tag)
- { return f; }
-
- template<typename F>
- const F& get_inspectable_slot(const F& f,
- BOOST_SIGNALS_NAMESPACE::detail::reference_tag)
- { return f.get(); }
-
- template<typename F>
- const F& get_inspectable_slot(const F& f, BOOST_SIGNALS_NAMESPACE::detail::value_tag)
- { return f; }
-
- // Determines the type of the slot - is it a signal, a reference to a
- // slot or just a normal slot.
- template<typename F>
- typename BOOST_SIGNALS_NAMESPACE::detail::get_slot_tag<F>::type
- tag_type(const F&)
- {
- typename BOOST_SIGNALS_NAMESPACE::detail::get_slot_tag<F>::type tag;
- return tag;
- }
-
mutable std::vector<const trackable*> bound_objects;
connection watch_bound_objects;
static void bound_object_destructed(void*, void*) {}
};
} // end namespace detail
+
+ // Get the slot so that it can be copied
+ template<typename F>
+ reference_wrapper<const F>
+ get_invocable_slot(const F& f, BOOST_SIGNALS_NAMESPACE::detail::signal_tag)
+ { return reference_wrapper<const F>(f); }
+
+ template<typename F>
+ const F&
+ get_invocable_slot(const F& f, BOOST_SIGNALS_NAMESPACE::detail::reference_tag)
+ { return f; }
+
+ template<typename F>
+ const F&
+ get_invocable_slot(const F& f, BOOST_SIGNALS_NAMESPACE::detail::value_tag)
+ { return f; }
+
+ // Get the slot so that it can be inspected for trackable objects
+ template<typename F>
+ const F&
+ get_inspectable_slot(const F& f, BOOST_SIGNALS_NAMESPACE::detail::signal_tag)
+ { return f; }
+
+ template<typename F>
+ const F&
+ get_inspectable_slot(const reference_wrapper<F>& f, BOOST_SIGNALS_NAMESPACE::detail::reference_tag)
+ { return f.get(); }
+
+ template<typename F>
+ const F&
+ get_inspectable_slot(const F& f, BOOST_SIGNALS_NAMESPACE::detail::value_tag)
+ { return f; }
+
+ // Determines the type of the slot - is it a signal, a reference to a
+ // slot or just a normal slot.
+ template<typename F>
+ typename BOOST_SIGNALS_NAMESPACE::detail::get_slot_tag<F>::type
+ tag_type(const F&)
+ {
+ typename BOOST_SIGNALS_NAMESPACE::detail::get_slot_tag<F>::type tag;
+ return tag;
+ }
+
} // end namespace BOOST_SIGNALS_NAMESPACE
template<typename SlotFunction>
class slot : public BOOST_SIGNALS_NAMESPACE::detail::slot_base {
public:
- template<typename F>
- slot(const F& f) : slot_function(get_invocable_slot(f, tag_type(f)))
+ template<typename F>
+ slot(const F& f) : slot_function(BOOST_SIGNALS_NAMESPACE::get_invocable_slot(f, BOOST_SIGNALS_NAMESPACE::tag_type(f)))
{
// Visit each of the bound objects and store them for later use
// An exception thrown here will allow the basic_connection to be
// destroyed when this goes out of scope, and no other connections
// have been made.
BOOST_SIGNALS_NAMESPACE::detail::bound_objects_visitor do_bind(bound_objects);
- visit_each(do_bind, get_inspectable_slot(f, tag_type(f)));
+ visit_each(do_bind, BOOST_SIGNALS_NAMESPACE::get_inspectable_slot(f, BOOST_SIGNALS_NAMESPACE::tag_type(f)));
create_connection();
}
// We would have to enumerate all of the signalN classes here as friends
// to make this private (as it otherwise should be). We can't name all of
// them because we don't know how many there are.
- public:
+ public:
// Get the slot function to call the actual slot
const SlotFunction& get_slot_function() const { return slot_function; }
// Boost.Signals library
//
-// Copyright (C) 2001-2002 Doug Gregor (gregod@cs.rpi.edu)
+// Copyright (C) 2001-2003 Doug Gregor (gregod@cs.rpi.edu)
//
// Permission to copy, use, sell and distribute this software is granted
// provided this copyright notice appears in all copies.
//
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-
+
// For more information, see http://www.boost.org
#ifndef BOOST_SIGNALS_TRACKABLE_HPP
// Base class for "trackable" objects that can be tracked when they are
// bound in slot target functions. When a trackable object is destroyed,
// the signal/slot connections are disconnected automatically.
- class trackable {
+ class BOOST_SIGNALS_DECL trackable {
private:
static void signal_disconnected(void* obj, void* data);
friend class detail::signal_base_impl;
friend class detail::slot_base;
void signal_connected(connection, BOOST_SIGNALS_NAMESPACE::detail::bound_object&) const;
-
+
protected:
trackable() : connected_signals(), dying(false) {}
trackable(const trackable&) : connected_signals(), dying(false) {}
~trackable();
-
+
trackable& operator=(const trackable&)
{
connected_signals.clear();
return *this;
}
-
+
private:
typedef std::list<connection> connection_list;
typedef connection_list::iterator connection_iterator;
-
+
// List of connections that this object is part of
mutable connection_list connected_signals;
-
+
// True when the object is being destroyed
mutable bool dying;
};
// A visitor that adds each trackable object to a vector
class bound_objects_visitor {
public:
- bound_objects_visitor(std::vector<const trackable*>& v) :
- bound_objects(v)
+ bound_objects_visitor(std::vector<const trackable*>& v) :
+ bound_objects(v)
{
}
}
template<typename R, typename T1, typename T2, typename T3, typename T4,
- typename T5>
+ typename T5>
inline void add_if_trackable(R (*)(T1, T2, T3, T4, T5)) const
{
}
template<typename R, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6>
+ typename T5, typename T6>
inline void add_if_trackable(R (*)(T1, T2, T3, T4, T5, T6)) const
{
}
template<typename R, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7>
+ typename T5, typename T6, typename T7>
inline void add_if_trackable(R (*)(T1, T2, T3, T4, T5, T6, T7)) const
{
}
template<typename R, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7, typename T8>
+ typename T5, typename T6, typename T7, typename T8>
inline void add_if_trackable(R (*)(T1, T2, T3, T4, T5, T6, T7, T8)) const
{
}
template<typename R, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7, typename T8, typename T9>
- inline void
+ typename T5, typename T6, typename T7, typename T8, typename T9>
+ inline void
add_if_trackable(R (*)(T1, T2, T3, T4, T5, T6, T7, T8, T9)) const
{
}
template<typename R, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7, typename T8, typename T9,
- typename T10>
- inline void
+ typename T5, typename T6, typename T7, typename T8, typename T9,
+ typename T10>
+ inline void
add_if_trackable(R (*)(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)) const
{
}
- mutable std::vector<const trackable*>& bound_objects;
+ std::vector<const trackable*>& bound_objects;
};
} // end namespace detail
} // end namespace BOOST_SIGNALS_NAMESPACE
-// Boost smart_ptr.hpp header file -----------------------------------------//
-
-// For compatibility, this header includes the header for the four "classic"
-// smart pointer class templates.
+//
+// smart_ptr.hpp
+//
+// For compatibility, this header includes the headers for the four "classic"
+// smart pointer class templates.
+//
+// Copyright (c) 1998-2002 boost.org
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+// http://www.boost.org/libs/smart_ptr/smart_ptr.htm
+//
#include <boost/scoped_ptr.hpp>
#include <boost/scoped_array.hpp>
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
-// See http://www.boost.org for most recent version including documentation.
+// See http://www.boost.org/libs/static_assert for documentation.
/*
Revision history:
// This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
//
+// http://www.boost.org/libs/utility/throw_exception.html
+//
#include <boost/config.hpp>
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
-// See http://www.boost.org for most recent version including documentation.
+// See http://www.boost.org/libs/timer for documentation.
// Revision History
// 01 Apr 01 Modified to use new <boost/limits.hpp> header. (JMaddock)
// implied warranty, and with no claim as to its suitability for any
// purpose.
-// See http://www.boost.org for updates, documentation, and revision history.
+// See http://www.boost.org/libs/tokenizer for documentation.
// Revision History:
{
// Borland workaround
if (kept_delims)
- m_kept_delims = kept_delims;
+ m_kept_delims = kept_delims;
}
- // use ispunct() for kept delimiters and isspace for dropped.
+ // use ispunct() for kept delimiters and isspace for dropped.
explicit
char_separator()
: m_use_ispunct(true),
// implied warranty, and with no claim as to its suitability for any
// purpose.
-// See http://www.boost.org for updates, documentation, and revision history.
+// See http://www.boost.org/libs/tokenizer for documentation.
#ifndef BOOST_TOKENIZER_POLICY_JRB051801_HPP_
#define BOOST_TOKENIZER_POLICY_JRB051801_HPP_
// implied warranty, and with no claim as to its suitability for any
// purpose.
-// See http://www.boost.org for updates, documentation, and revision history.
+// See http://www.boost.org/libs/tokenizer for documenation
// Revision History:
typedef typename T::head_type type;
};
+template<int N, class T>
+struct element<N, const T>
+{
+private:
+ typedef typename T::tail_type Next;
+ typedef typename element<N-1, Next>::type unqualified_type;
+public:
+ typedef typename boost::add_const<unqualified_type>::type type;
+};
+template<class T>
+struct element<0,const T>
+{
+ typedef typename boost::add_const<typename T::head_type>::type type;
+};
+
// -get function templates -----------------------------------------------
// Usage: get<N>(aTuple)
}
// "ignore" allows tuple positions to be ignored when using "tie".
namespace {
+#if (defined(BOOST_MSVC) && BOOST_MSVC <= 1300) || (defined(__DECCXX_VER) && __DECCXX_VER <= 60590031)
+ static
+#endif
detail::swallow_assign ignore;
}
// parentheses and space are the default manipulators
if (!c) {
switch(m) {
- case open : c = '('; break;
- case close : c = ')'; break;
- case delimiter : c = ' '; break;
+ case detail::format_info::open : c = '('; break;
+ case detail::format_info::close : c = ')'; break;
+ case detail::format_info::delimiter : c = ' '; break;
}
}
return c;
// parentheses and space are the default manipulators
if (!c) {
switch(m) {
- case open : c = i.widen('('); break;
- case close : c = i.widen(')'); break;
- case delimiter : c = i.widen(' '); break;
+ case detail::format_info::open : c = i.widen('('); break;
+ case detail::format_info::close : c = i.widen(')'); break;
+ case detail::format_info::delimiter : c = i.widen(' '); break;
}
}
return c;
#if defined (BOOST_NO_STD_LOCALE)
const bool is_delimiter = !isspace(d);
+#elif defined ( __BORLANDC__ )
+ const bool !is_delimiter = std::use_facet< std::ctype< CharType > >
+ (is.getloc() ).is( std::ctype_base::space, d);
#else
const bool is_delimiter = (!std::isspace(d, is.getloc()) );
#endif
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
-// See http://www.boost.org for most recent version including documentation.
+// See http://www.boost.org/libs/type_traits for documentation.
// See boost/type_traits/*.hpp for full copyright notices.
#ifndef BOOST_TYPE_TRAITS_HPP
#include "boost/type_traits/is_member_function_pointer.hpp"
#include "boost/type_traits/is_member_pointer.hpp"
#include "boost/type_traits/is_object.hpp"
-#include "boost/type_traits/is_POD.hpp"
+#include "boost/type_traits/is_pod.hpp"
+#include "boost/type_traits/is_polymorphic.hpp"
#include "boost/type_traits/is_pointer.hpp"
#include "boost/type_traits/is_reference.hpp"
#include "boost/type_traits/is_same.hpp"
#include "boost/type_traits/remove_volatile.hpp"
#include "boost/type_traits/type_with_alignment.hpp"
+#include "boost/type_traits/ice.hpp"
+
#endif // BOOST_TYPE_TRAITS_HPP
+
namespace detail {
+#ifdef __BORLANDC__
+//
+// For some reason this implementation stops Borlands compiler
+// from dropping cv-qualifiers, it still fails with references
+// to arrays for some reason though (shrug...) (JM 20021104)
+//
+template <typename T>
+struct add_pointer_impl
+{
+ typedef T* type;
+};
+template <typename T>
+struct add_pointer_impl<T&>
+{
+ typedef T* type;
+};
+template <typename T>
+struct add_pointer_impl<T&const>
+{
+ typedef T* type;
+};
+template <typename T>
+struct add_pointer_impl<T&volatile>
+{
+ typedef T* type;
+};
+template <typename T>
+struct add_pointer_impl<T&const volatile>
+{
+ typedef T* type;
+};
+
+#else
+
template <typename T>
struct add_pointer_impl
{
typedef no_ref_type* type;
};
+#endif
+
} // namespace detail
BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_pointer,T,typename detail::add_pointer_impl<T>::type)
namespace boost {
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
-BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_reference,T,T&)
-BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_reference,T&,T&)
-
-#elif defined(BOOST_MSVC6_MEMBER_TEMPLATES)
-
namespace detail {
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && defined(BOOST_MSVC6_MEMBER_TEMPLATES)
+
template <bool x>
struct reference_adder
{
typedef typename result::type type;
};
-} // namespace detail
-
-BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_reference,T,typename detail::add_reference_impl<T>::type)
-
#else
-BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_reference,T,T&)
+template <typename T>
+struct add_reference_impl
+{
+ typedef T& type;
+};
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(typename T,add_reference,T&,T&)
+#endif
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#endif
-//
// these full specialisations are always required:
-BOOST_TT_AUX_TYPE_TRAIT_SPEC1(add_reference,void,void)
+BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void,void)
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-BOOST_TT_AUX_TYPE_TRAIT_SPEC1(add_reference,void const,void const)
-BOOST_TT_AUX_TYPE_TRAIT_SPEC1(add_reference,void volatile,void volatile)
-BOOST_TT_AUX_TYPE_TRAIT_SPEC1(add_reference,void const volatile,void const volatile)
+BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void const,void const)
+BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void volatile,void volatile)
+BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void const volatile,void const volatile)
#endif
+} // namespace detail
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_reference,T,typename detail::add_reference_impl<T>::type)
+
} // namespace boost
#include "boost/type_traits/detail/type_trait_undef.hpp"
# pragma warning(push)
# pragma warning(disable: 4121) // alignment is sensitive to packing
#endif
+#ifdef __BORLANDC__
+#pragma option push -Vx- -Ve-
+#endif
namespace boost {
{
};
#endif
+#ifdef __BORLANDC__
+// long double gives an incorrect value of 10 (!)
+// unless we do this...
+struct long_double_wrapper{ long double ld; };
+template<> struct alignment_of<long double>
+ : public alignment_of<long_double_wrapper>{};
+#endif
// void has to be treated specially:
BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void,0)
} // namespace boost
+#ifdef __BORLANDC__
+#pragma option pop
+#endif
#ifdef BOOST_MSVC
# pragma warning(pop)
#endif
#include "boost/type_traits/detail/size_t_trait_undef.hpp"
#endif // BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED
+
#ifndef BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED
#define BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED
+#include "boost/mpl/aux_/lambda_support.hpp"
#include "boost/config.hpp"
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#else
-namespace boost {
-// forward declarations
-template< typename T > struct remove_const;
-template< typename T > struct remove_volatile;
-template< typename T > struct remove_cv;
-template< typename T > struct remove_pointer;
-template< typename T > struct remove_reference;
-}
+namespace boost { namespace detail {
+template< typename T > struct remove_const_impl { typedef T type; };
+template< typename T > struct remove_volatile_impl { typedef T type; };
+template< typename T > struct remove_pointer_impl { typedef T type; };
+template< typename T > struct remove_reference_impl { typedef T type; };
+}}
-// same as BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1 macro, except that it
+// same as BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1 macro, except that it
// never gets #undef-ined
# define BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(trait,spec,result) \
-template<> struct trait<spec> \
+template<> struct trait##_impl<spec> \
{ \
typedef result type; \
}; \
BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_const,T const volatile,T volatile) \
BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_volatile,T volatile,T) \
BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_volatile,T const volatile,T const) \
- BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_cv,T const,T) \
- BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_cv,T volatile,T) \
- BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_cv,T const volatile,T) \
/**/
# define BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T) \
/**/
# define BOOST_TT_BROKEN_COMPILER_SPEC(T) \
- namespace boost { \
+ namespace boost { namespace detail { \
BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T) \
BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T) \
BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T*) \
BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T const*) \
BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T volatile*) \
BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T const volatile*) \
- } \
+ }} \
/**/
# include "boost/type_traits/detail/type_trait_undef.hpp"
BOOST_TT_BROKEN_COMPILER_SPEC(unsigned long)
BOOST_TT_BROKEN_COMPILER_SPEC(float)
BOOST_TT_BROKEN_COMPILER_SPEC(double)
-BOOST_TT_BROKEN_COMPILER_SPEC(long double)
+//BOOST_TT_BROKEN_COMPILER_SPEC(long double)
// for backward compatibility
#define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(T) \
#include "boost/config.hpp"
#endif
-//
-// Helper macros for builtin compiler support.
-// If your compiler has builtin support for any of the following
-// traits concepts, then redefine the appropriate macros to pick
-// up on the compiler support:
-//
-// (these should largely ignore cv-qualifiers)
-// BOOST_IS_CLASS(T) should evaluate to true if T is a class or struct type
-// BOOST_IS_ENUM(T) should evaluate to true if T is an enumerator type
-// BOOST_IS_UNION(T) should evaluate to true if T is a union type
-// BOOST_IS_POD(T) should evaluate to true if T is a POD type
-// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty struct or union
-// BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
-// BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
-// BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
-// BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect
-
-#ifdef BOOST_HAS_SGI_TYPE_TRAITS
-# include "boost/type_traits/is_same.hpp"
-# include <type_traits.h>
-# define BOOST_IS_POD(T) ::boost::is_same< typename ::__type_traits<T>::is_POD_type, ::__true_type>::value
-# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_default_constructor, ::__true_type>::value
-# define BOOST_HAS_TRIVIAL_COPY(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_copy_constructor, ::__true_type>::value
-# define BOOST_HAS_TRIVIAL_ASSIGN(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_assignment_operator, ::__true_type>::value
-# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_destructor, ::__true_type>::value
-#endif
-
-#ifndef BOOST_IS_CLASS
-# define BOOST_IS_CLASS(T) false
-#endif
-
-#ifndef BOOST_IS_ENUM
-# define BOOST_IS_ENUM(T) false
-#endif
-
-#ifndef BOOST_IS_UNION
-# define BOOST_IS_UNION(T) false
-#endif
-
-#ifndef BOOST_IS_POD
-# define BOOST_IS_POD(T) false
-#endif
-
-#ifndef BOOST_IS_EMPTY
-# define BOOST_IS_EMPTY(T) false
-#endif
-
-#ifndef BOOST_HAS_TRIVIAL_CONSTRUCTOR
-# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) false
-#endif
-
-#ifndef BOOST_HAS_TRIVIAL_COPY
-# define BOOST_HAS_TRIVIAL_COPY(T) false
-#endif
-
-#ifndef BOOST_HAS_TRIVIAL_ASSIGN
-# define BOOST_HAS_TRIVIAL_ASSIGN(T) false
-#endif
-
-#ifndef BOOST_HAS_TRIVIAL_DESTRUCTOR
-# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) false
-#endif
-
//
// whenever we have a conversion function with elipses
// it needs to be declared __cdecl to suppress compiler
-// warnings from MS and Borland compilers:
+// warnings from MS and Borland compilers (this *must*
+// appear before we include is_same.hpp below):
#if defined(BOOST_MSVC) || defined(__BORLANDC__)
# define BOOST_TT_DECL __cdecl
#else
# define BOOST_TT_DECL /**/
#endif
-# if (defined(__MWERKS__) && __MWERKS__ >= 0x3000) || BOOST_MSVC > 1301 || defined(BOOST_NO_COMPILER_CONFIG)
+# if (defined(__MWERKS__) && __MWERKS__ >= 0x3000) || (defined(BOOST_MSVC) && (BOOST_MSVC > 1301)) || defined(BOOST_NO_COMPILER_CONFIG)
# define BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
#endif
#endif // BOOST_TT_CONFIG_HPP_INCLUDED
+
+
// no include guards, the header is intended for multiple inclusion!
#include "boost/type_traits/detail/template_arity_spec.hpp"
-#include "boost/mpl/bool_c.hpp"
+#include "boost/mpl/bool.hpp"
#include "boost/mpl/aux_/lambda_support.hpp"
#include "boost/config.hpp"
-#if !defined(BOOST_MSVC) || BOOST_MSVC > 1200
-# define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) /**/
-#else
+#if defined(__SUNPRO_CC)
# define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
- typedef mpl::bool_c< C > base_; \
+ typedef mpl::bool_< C > type; \
+ enum { value = type::value }; \
+ /**/
+# define BOOST_TT_AUX_BOOL_C_BASE(C)
+
+#elif defined(BOOST_MSVC) && BOOST_MSVC <= 1200
+
+# define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
+ typedef mpl::bool_< C > base_; \
using base_::value; \
/**/
+
#endif
+#ifndef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL
+# define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) /**/
+#endif
+
+#ifndef BOOST_TT_AUX_BOOL_C_BASE
+# define BOOST_TT_AUX_BOOL_C_BASE(C) : mpl::bool_< C >
+#endif
+
+
#define BOOST_TT_AUX_BOOL_TRAIT_DEF1(trait,T,C) \
template< typename T > struct trait \
- : mpl::bool_c< C > \
+ BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \
/**/
+
#define BOOST_TT_AUX_BOOL_TRAIT_DEF2(trait,T1,T2,C) \
template< typename T1, typename T2 > struct trait \
- : mpl::bool_c< C > \
+ BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,trait,(T1,T2)) \
/**/
#define BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,C) \
-template<> struct trait<sp> \
- : mpl::bool_c< C > \
+template<> struct trait< sp > \
+ BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
- BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(sp)) \
+ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(sp)) \
}; \
/**/
#define BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,sp1,sp2,C) \
-template<> struct trait<sp1,sp2> \
- : mpl::bool_c< C > \
+template<> struct trait< sp1,sp2 > \
+ BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
- BOOST_MPL_AUX_LAMBDA_SUPPORT(2,trait,(sp1,sp2)) \
+ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,trait,(sp1,sp2)) \
+}; \
+/**/
+
+#define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(trait,sp,C) \
+template<> struct trait##_impl< sp > \
+{ \
+ BOOST_STATIC_CONSTANT(bool, value = (C)); \
+}; \
+/**/
+
+#define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,sp1,sp2,C) \
+template<> struct trait##_impl< sp1,sp2 > \
+{ \
+ BOOST_STATIC_CONSTANT(bool, value = (C)); \
}; \
/**/
#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(param,trait,sp,C) \
-template< param > struct trait<sp> \
- : mpl::bool_c< C > \
+template< param > struct trait< sp > \
+ BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
}; \
/**/
#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,sp,C) \
-template< param1, param2 > struct trait<sp> \
- : mpl::bool_c< C > \
+template< param1, param2 > struct trait< sp > \
+ BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
}; \
/**/
#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(param,trait,sp1,sp2,C) \
-template< param > struct trait<sp1,sp2> \
- : mpl::bool_c< C > \
+template< param > struct trait< sp1,sp2 > \
+ BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
- BOOST_MPL_AUX_LAMBDA_SUPPORT(2,trait,(sp1,sp2)) \
+ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,trait,(sp1,sp2)) \
}; \
/**/
#define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(param1,param2,trait,sp1,sp2,C) \
-template< param1, param2 > struct trait<sp1,sp2> \
- : mpl::bool_c< C > \
+template< param1, param2 > struct trait< sp1,sp2 > \
+ BOOST_TT_AUX_BOOL_C_BASE(C) \
{ \
BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
}; \
/**/
+#define BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(param,trait,sp1,sp2,C) \
+template< param > struct trait##_impl< sp1,sp2 > \
+{ \
+ BOOST_STATIC_CONSTANT(bool, value = (C)); \
+}; \
+/**/
+
#ifndef BOOST_NO_CV_SPECIALIZATIONS
# define BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(trait,sp,value) \
BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,value) \
// no include guards, the header is intended for multiple inclusion!
+#undef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL
+#undef BOOST_TT_AUX_BOOL_C_BASE
#undef BOOST_TT_AUX_BOOL_TRAIT_DEF1
#undef BOOST_TT_AUX_BOOL_TRAIT_DEF2
#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC1
#undef BOOST_TT_AUX_BOOL_TRAIT_SPEC2
+#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1
+#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2
#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1
#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2
#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1
#undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2
+#undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1
#undef BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1
#undef BOOST_STATIC_CONSTANT
#define BOOST_PP_ITERATION_PARAMS_1 \
- (0, 25, "boost/type_traits/detail/is_function_ptr_helper.hpp")
+ (3, (0, 25, "boost/type_traits/detail/is_function_ptr_helper.hpp"))
#include BOOST_PP_ITERATE()
#endif // BOOST_TT_PREPROCESSING_MODE
#undef BOOST_STATIC_CONSTANT
#define BOOST_PP_ITERATION_PARAMS_1 \
- (0, 25, "boost/type_traits/detail/is_mem_fun_pointer_impl.hpp")
+ (3, (0, 25, "boost/type_traits/detail/is_mem_fun_pointer_impl.hpp"))
#include BOOST_PP_ITERATE()
#endif // BOOST_TT_PREPROCESSING_MODE
: mpl::size_t_c< C > \
{ \
BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \
- BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(spec)) \
+ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \
}; \
/**/
template<> struct trait<spec> \
{ \
typedef result type; \
- BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(spec)) \
+ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \
+}; \
+/**/
+
+#define BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(trait,spec,result) \
+template<> struct trait##_impl<spec> \
+{ \
+ typedef result type; \
}; \
/**/
typedef result; \
}; \
/**/
+
+#define BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(param,trait,spec,result) \
+template< param > struct trait##_impl<spec> \
+{ \
+ typedef result type; \
+}; \
+/**/
#undef BOOST_TT_AUX_TYPE_TRAIT_DEF1
#undef BOOST_TT_AUX_TYPE_TRAIT_SPEC1
+#undef BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1
#undef BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1
#undef BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2
+#undef BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1
namespace type_traits {
typedef char yes_type;
-typedef double no_type;
+struct no_type
+{
+ char padding[8];
+};
} // namespace type_traits
} // namespace boost
+++ /dev/null
-// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
-// Permission to copy, use, modify, sell and
-// distribute this software is granted provided this copyright notice appears
-// in all copies. This software is provided "as is" without express or implied
-// warranty, and with no claim as to its suitability for any purpose.
-//
-// See http://www.boost.org for most recent version including documentation.
-//
-// forward declarations of type_traits classes
-//
-#ifndef BOOST_FWD_TYPE_TRAITS_HPP
-#define BOOST_FWD_TYPE_TRAITS_HPP
-
-#include <cstdlib>
-#include <cstddef>
-
-#ifndef BOOST_CONFIG_HPP
-#include <boost/config.hpp>
-#endif
-
-//
-// Helper macros for builtin compiler support.
-// If your compiler has builtin support for any of the following
-// traits concepts, then redefine the appropriate macros to pick
-// up on the compiler support:
-//
-// (these should largely ignore cv-qualifiers)
-// BOOST_IS_CLASS(T) should evaluate to true if T is a class or struct type
-// BOOST_IS_ENUM(T) should evaluate to true if T is an enumerator type
-// BOOST_IS_UNION(T) should evaluate to true if T is a union type
-// BOOST_IS_POD(T) should evaluate to true if T is a POD type
-// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty struct or union
-// BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
-// BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
-// BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
-// BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect
-
-#ifdef BOOST_HAS_SGI_TYPE_TRAITS
-# define BOOST_IS_POD(T) ::boost::is_same< typename ::__type_traits<T>::is_POD_type, ::__true_type>::value
-# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_default_constructor, ::__true_type>::value
-# define BOOST_HAS_TRIVIAL_COPY(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_copy_constructor, ::__true_type>::value
-# define BOOST_HAS_TRIVIAL_ASSIGN(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_assignment_operator, ::__true_type>::value
-# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_destructor, ::__true_type>::value
-#endif
-
-#ifndef BOOST_IS_CLASS
-# define BOOST_IS_CLASS(T) false
-#endif
-
-#ifndef BOOST_IS_ENUM
-# define BOOST_IS_ENUM(T) false
-#endif
-
-#ifndef BOOST_IS_UNION
-# define BOOST_IS_UNION(T) false
-#endif
-
-#ifndef BOOST_IS_POD
-# define BOOST_IS_POD(T) false
-#endif
-
-#ifndef BOOST_IS_EMPTY
-# define BOOST_IS_EMPTY(T) false
-#endif
-
-#ifndef BOOST_HAS_TRIVIAL_CONSTRUCTOR
-# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) false
-#endif
-
-#ifndef BOOST_HAS_TRIVIAL_COPY
-# define BOOST_HAS_TRIVIAL_COPY(T) false
-#endif
-
-#ifndef BOOST_HAS_TRIVIAL_ASSIGN
-# define BOOST_HAS_TRIVIAL_ASSIGN(T) false
-#endif
-
-#ifndef BOOST_HAS_TRIVIAL_DESTRUCTOR
-# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) false
-#endif
-
-//
-// whenever we have a conversion function with elipses
-// it needs to be declared __cdecl to suppress compiler
-// warnings from MS and Borland compilers:
-#if defined(BOOST_MSVC) || defined(__BORLANDC__)
-#define BOOST_TT_DECL __cdecl
-#else
-#define BOOST_TT_DECL
-#endif
-
-
-namespace boost{
-//
-// forward declare all type traits templates here
-//
-// conversion_traits.hpp:
-template <class From, class To>
-struct is_convertible;
-// alignment_traits.hpp:
-template <class T>
-struct alignment_of;
-// arithmetic_traits.hpp:
-template <class T>
-struct is_void;
-template <class T>
-struct is_integral;
-template <class T>
-struct is_float;
-template <class T>
-struct is_arithmetic;
-template <class T>
-struct is_fundamental;
-
-// cv_traits.hpp:
-template <class T>
-struct is_const;
-template <class T>
-struct is_volatile;
-template <class T>
-struct remove_const;
-template <class T>
-struct remove_volatile;
-template <class T>
-struct remove_cv;
-template <class T>
-struct add_const;
-template <class T>
-struct add_volatile;
-template <class T>
-struct add_cv;
-
-// composite_traits.hpp:
-template <class T>
-struct is_array;
-template <class T>
-struct is_pointer;
-template <class T>
-struct is_reference;
-template <class T>
-struct is_member_pointer;
-template <class T>
-struct is_member_function_pointer;
-template <class T>
-struct is_enum;
-template <class T>
-struct is_union;
-
-// object_traits.hpp:
-template <class T>
-struct is_object;
-template <class T>
-struct is_scalar;
-template <class T>
-struct is_class;
-template <class T>
-struct is_compound;
-template <class T>
-struct is_POD;
-template <class T>
-struct has_trivial_constructor;
-template <class T>
-struct has_trivial_copy;
-template <class T>
-struct has_trivial_assign;
-template <class T>
-struct has_trivial_destructor;
-template <class T>
-struct has_nothrow_constructor;
-template <class T>
-struct has_nothrow_copy;
-template <class T>
-struct has_nothrow_assign;
-template <class T>
-struct is_empty;
-template <class Base, class Derived>
-struct is_base_and_derived;
-
-// transform_traits.hpp:
-template <class T>
-struct remove_reference;
-template <class T>
-struct add_reference;
-template <class T>
-struct remove_bounds;
-template <class T>
-struct remove_pointer;
-template <class T>
-struct add_pointer;
-
-// same_traits.hpp:
-template <class T, class U>
-struct is_same;
-
-} // namespace boost
-
-#endif // BOOST_FWD_TYPE_TRAITS_HPP
-
-
-
-
#ifndef BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED
#define BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED
-#include "boost/type_traits/is_POD.hpp"
+#include "boost/type_traits/config.hpp"
+#include "boost/type_traits/intrinsics.hpp"
+#include "boost/type_traits/is_pod.hpp"
#include "boost/type_traits/is_const.hpp"
#include "boost/type_traits/is_volatile.hpp"
#include "boost/type_traits/detail/ice_and.hpp"
#include "boost/type_traits/detail/ice_or.hpp"
#include "boost/type_traits/detail/ice_not.hpp"
-#include "boost/type_traits/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_or<
- ::boost::is_POD<T>::value,
+ ::boost::is_pod<T>::value,
BOOST_HAS_TRIVIAL_ASSIGN(T)
>::value,
::boost::type_traits::ice_not< ::boost::is_const<T>::value >::value,
#ifndef BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED
#define BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED
-#include "boost/type_traits/is_POD.hpp"
-#include "boost/type_traits/detail/ice_or.hpp"
#include "boost/type_traits/config.hpp"
+#include "boost/type_traits/intrinsics.hpp"
+#include "boost/type_traits/is_pod.hpp"
+#include "boost/type_traits/detail/ice_or.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_or<
- ::boost::is_POD<T>::value,
+ ::boost::is_pod<T>::value,
BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
>::value));
};
#ifndef BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED
#define BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED
+#include "boost/type_traits/config.hpp"
+#include "boost/type_traits/intrinsics.hpp"
#include "boost/type_traits/is_volatile.hpp"
-#include "boost/type_traits/is_POD.hpp"
+#include "boost/type_traits/is_pod.hpp"
#include "boost/type_traits/detail/ice_and.hpp"
#include "boost/type_traits/detail/ice_or.hpp"
#include "boost/type_traits/detail/ice_not.hpp"
-#include "boost/type_traits/config.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_or<
- ::boost::is_POD<T>::value,
+ ::boost::is_pod<T>::value,
BOOST_HAS_TRIVIAL_COPY(T)
>::value,
::boost::type_traits::ice_not< ::boost::is_volatile<T>::value >::value
#ifndef BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED
#define BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED
-#include "boost/type_traits/is_POD.hpp"
-#include "boost/type_traits/detail/ice_or.hpp"
#include "boost/type_traits/config.hpp"
+#include "boost/type_traits/intrinsics.hpp"
+#include "boost/type_traits/is_pod.hpp"
+#include "boost/type_traits/detail/ice_or.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_or<
- ::boost::is_POD<T>::value,
+ ::boost::is_pod<T>::value,
BOOST_HAS_TRIVIAL_DESTRUCTOR(T)
>::value));
};
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_INTRINSICS_HPP_INCLUDED
+#define BOOST_TT_INTRINSICS_HPP_INCLUDED
+
+#ifndef BOOST_TT_CONFIG_HPP_INCLUDED
+#include "boost/type_traits/config.hpp"
+#endif
+
+//
+// Helper macros for builtin compiler support.
+// If your compiler has builtin support for any of the following
+// traits concepts, then redefine the appropriate macros to pick
+// up on the compiler support:
+//
+// (these should largely ignore cv-qualifiers)
+// BOOST_IS_UNION(T) should evaluate to true if T is a union type
+// BOOST_IS_POD(T) should evaluate to true if T is a POD type
+// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty struct or union
+// BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
+// BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
+// BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
+// BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect
+
+#ifdef BOOST_HAS_SGI_TYPE_TRAITS
+ // Hook into SGI's __type_traits class, this will pick up user supplied
+ // specializations as well as SGI - compiler supplied specializations.
+# include "boost/type_traits/is_same.hpp"
+# include <type_traits.h>
+# define BOOST_IS_POD(T) ::boost::is_same< typename ::__type_traits<T>::is_POD_type, ::__true_type>::value
+# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_default_constructor, ::__true_type>::value
+# define BOOST_HAS_TRIVIAL_COPY(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_copy_constructor, ::__true_type>::value
+# define BOOST_HAS_TRIVIAL_ASSIGN(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_assignment_operator, ::__true_type>::value
+# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) ::boost::is_same< typename ::__type_traits<T>::has_trivial_destructor, ::__true_type>::value
+#endif
+
+#if defined(__MSL_CPP__) && (__MSL_CPP__ >= 0x8000)
+ // Metrowerks compiler is acquiring intrinsic type traits support
+ // post version 8. We hook into the published interface to pick up
+ // user defined specializations as well as compiler intrinsics as
+ // and when they become available:
+# include <msl_utility>
+# define BOOST_IS_UNION(T) BOOST_STD_EXTENSION_NAMESPACE::is_union<T>::value
+# define BOOST_IS_POD(T) BOOST_STD_EXTENSION_NAMESPACE::is_POD<T>::value
+# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_default_ctor<T>::value
+# define BOOST_HAS_TRIVIAL_COPY(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_copy_ctor<T>::value
+# define BOOST_HAS_TRIVIAL_ASSIGN(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_assignment<T>::value
+# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_dtor<T>::value
+#endif
+
+#ifndef BOOST_IS_UNION
+# define BOOST_IS_UNION(T) false
+#endif
+
+#ifndef BOOST_IS_POD
+# define BOOST_IS_POD(T) false
+#endif
+
+#ifndef BOOST_IS_EMPTY
+# define BOOST_IS_EMPTY(T) false
+#endif
+
+#ifndef BOOST_HAS_TRIVIAL_CONSTRUCTOR
+# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) false
+#endif
+
+#ifndef BOOST_HAS_TRIVIAL_COPY
+# define BOOST_HAS_TRIVIAL_COPY(T) false
+#endif
+
+#ifndef BOOST_HAS_TRIVIAL_ASSIGN
+# define BOOST_HAS_TRIVIAL_ASSIGN(T) false
+#endif
+
+#ifndef BOOST_HAS_TRIVIAL_DESTRUCTOR
+# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) false
+#endif
+
+#endif // BOOST_TT_INTRINSICS_HPP_INCLUDED
+
+
+
+
+++ /dev/null
-
-// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
-// Permission to copy, use, modify, sell and distribute this software is
-// granted provided this copyright notice appears in all copies. This software
-// is provided "as is" without express or implied warranty, and with no claim
-// as to its suitability for any purpose.
-//
-// See http://www.boost.org for most recent version including documentation.
-
-#ifndef BOOST_TT_IS_POD_HPP_INCLUDED
-#define BOOST_TT_IS_POD_HPP_INCLUDED
-
-#include "boost/type_traits/is_void.hpp"
-#include "boost/type_traits/is_scalar.hpp"
-#include "boost/type_traits/detail/ice_or.hpp"
-#include "boost/type_traits/config.hpp"
-
-#include <cstddef>
-
-// should be the last #include
-#include "boost/type_traits/detail/bool_trait_def.hpp"
-
-namespace boost {
-
-// forward declaration, needed by 'is_POD_array_helper' template below
-template< typename T > struct is_POD;
-
-namespace detail {
-
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
-template <typename T> struct is_POD_impl
-{
- BOOST_STATIC_CONSTANT(
- bool, value =
- (::boost::type_traits::ice_or<
- ::boost::is_scalar<T>::value,
- ::boost::is_void<T>::value,
- BOOST_IS_POD(T)
- >::value));
-};
-
-template <typename T, std::size_t sz>
-struct is_POD_impl<T[sz]>
- : is_POD_impl<T>
-{
-};
-
-#else
-
-template <bool is_array = false>
-struct is_POD_helper
-{
- template <typename T> struct result_
- {
- BOOST_STATIC_CONSTANT(
- bool, value =
- (::boost::type_traits::ice_or<
- ::boost::is_scalar<T>::value,
- ::boost::is_void<T>::value,
- BOOST_IS_POD(T)
- >::value));
- };
-};
-
-template <bool b>
-struct bool_to_yes_no_type
-{
- typedef ::boost::type_traits::no_type type;
-};
-
-template <>
-struct bool_to_yes_no_type<true>
-{
- typedef ::boost::type_traits::yes_type type;
-};
-
-template <typename ArrayType>
-struct is_POD_array_helper
-{
- enum { is_pod = ::boost::is_POD<ArrayType>::value }; // MSVC workaround
- typedef typename bool_to_yes_no_type<is_pod>::type type;
- type instance() const;
-};
-
-template <typename T>
-is_POD_array_helper<T> is_POD_array(T*);
-
-template <>
-struct is_POD_helper<true>
-{
- template <typename T> struct result_
- {
- static T& help();
- BOOST_STATIC_CONSTANT(bool, value =
- sizeof(is_POD_array(help()).instance()) == sizeof(::boost::type_traits::yes_type)
- );
- };
-};
-
-
-template <typename T> struct is_POD_impl
-{
- BOOST_STATIC_CONSTANT(
- bool, value = (
- ::boost::detail::is_POD_helper<
- ::boost::is_array<T>::value
- >::template result_<T>::value
- )
- );
-};
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
-} // namespace detail
-
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::detail::is_POD_impl<T>::value)
-
-} // namespace boost
-
-#include "boost/type_traits/detail/bool_trait_undef.hpp"
-
-#endif // BOOST_TT_IS_POD_HPP_INCLUDED
);
};
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void const volatile,false)
+#endif
+
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,::boost::detail::is_array_impl<T>::value)
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_array,void,false)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_array,void const,false)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_array,void volatile,false)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_array,void const volatile,false)
-#endif
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// (C) Copyright Rani Sharoni 2002.
// Permission to copy, use, modify, sell and distribute this software is
// granted provided this copyright notice appears in all copies. This software
// is provided "as is" without express or implied warranty, and with no claim
#define BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED
#include "boost/type_traits/is_class.hpp"
+#include "boost/type_traits/is_same.hpp"
#include "boost/type_traits/is_convertible.hpp"
#include "boost/type_traits/detail/ice_and.hpp"
+#include "boost/type_traits/remove_cv.hpp"
#include "boost/config.hpp"
// should be the last #include
namespace detail {
-template <typename Base, typename Derived>
+#if !defined(__BORLANDC__)
+
+/*************************************************************************
+
+This version detects ambiguous base classes and private base classes
+correctly, and was devised by Rani Sharoni.
+
+The following explanation is by Terje Slettebo:
+
+Let's take the multiple base class below as an example, and the
+following will also show why there's not a problem with ambiguous base
+class:
+
+struct B {};
+struct B1 : B {};
+struct B2 : B {};
+struct D : B1, private B2 {};
+
+typedef char Test[is_base_and_derived<B, D>::result]; // improvement 1 -
+multiple base
+
+
+We have several possible conversion sequences:
+
+For "static no check(B const volatile *, int)" we have the conversion
+sequences:
+ C -> C const -> B*
+and
+ C -> D* -> B1*|B2* -> B*
+
+For "static yes check(D const volatile *, T)" we have the conversion
+sequence:
+ C -> D*
+
+Since, for the purpose of selecting the appropriate user-defined conversion
+for a given function, it only considers up to the user-defined conversion,
+for the first function this means choosing between C -> C const and C -> C,
+and it chooses the latter. Therefore, we have:
+
+C -> D* -> B1*|B2* -> B*
+C -> D*
+
+Here, the principle of the "shortest subsequence" applies, and it chooses
+C -> D*. This shows that it doesn't even need to consider the multiple paths
+to B, as that possibility is eliminated before it could possibly cause
+ambiguity. Nifty. :)
+
+As Daveed notes in the posting Rani gives a link to in the clc++m posting,
+if D is not derived from B, it has to choose between C -> C const -> B* for
+the first function, and C -> D* for the second function, which are just as
+good, _had it not been for the fact that "static no check(B const volatile
+&, int)" is not templated (as Rani points out in the posting)_, which makes
+C -> C const -> B* the best choice, resulting in "no".
+
+Also, if C::operator B* hadn't been const, the two conversion sequences for
+"static no check(B const volatile *, int)" would have been ambiguous.
+
+See also http://groups.google.com/groups?selm=df893da6.0301280859.522081f7%40posting.google.com
+and links therein.
+
+*************************************************************************/
+
+template <typename B, typename D>
+struct bd_helper
+{
+ template <typename T>
+ static type_traits::yes_type check(D const volatile *, T);
+ static type_traits::no_type check(B const volatile *, int);
+};
+
+template<typename B, typename D>
+struct is_base_and_derived_impl2
+{
+ struct Host
+ {
+ operator B const volatile *() const;
+ operator D const volatile *();
+ };
+
+ BOOST_STATIC_CONSTANT(bool, value =
+ sizeof(bd_helper<B,D>::check(Host(), 0)) == sizeof(type_traits::yes_type));
+};
+
+#else
+
+//
+// broken version:
+//
+template<typename B, typename D>
+struct is_base_and_derived_impl2
+{
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::is_convertible<D*,B*>::value));
+};
+
+#define BOOST_BROKEN_IS_BASE_AND_DERIVED
+
+#endif
+
+template <typename B, typename D>
+struct is_base_and_derived_impl3
+{
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template <bool ic1, bool ic2, bool iss>
+struct is_base_and_derived_select
+{
+ template <class T, class U>
+ struct rebind
+ {
+ typedef is_base_and_derived_impl3<T,U> type;
+ };
+};
+
+template <>
+struct is_base_and_derived_select<true,true,false>
+{
+ template <class T, class U>
+ struct rebind
+ {
+ typedef is_base_and_derived_impl2<T,U> type;
+ };
+};
+
+template <typename B, typename D>
struct is_base_and_derived_impl
{
- BOOST_STATIC_CONSTANT(bool, value =
- (::boost::type_traits::ice_and<
- ::boost::is_convertible<Derived*,Base*>::value,
- ::boost::is_class<Derived>::value,
- ::boost::is_class<Base>::value
- >::value)
- );
+ typedef typename remove_cv<B>::type ncvB;
+ typedef typename remove_cv<D>::type ncvD;
+
+ typedef is_base_and_derived_select<
+ ::boost::is_class<B>::value,
+ ::boost::is_class<D>::value,
+ ::boost::is_same<B,D>::value> selector;
+ typedef typename selector::template rebind<ncvB,ncvD> binder;
+ typedef typename binder::type bound_type;
+
+ BOOST_STATIC_CONSTANT(bool, value = bound_type::value);
};
} // namespace detail
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED
+
+
#define BOOST_TT_IS_CLASS_HPP_INCLUDED
#include "boost/type_traits/config.hpp"
+# include "boost/type_traits/is_union.hpp"
+# include "boost/type_traits/detail/ice_and.hpp"
+# include "boost/type_traits/detail/ice_not.hpp"
#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
# include "boost/type_traits/detail/yes_no_type.hpp"
#else
-# include "boost/type_traits/is_union.hpp"
# include "boost/type_traits/is_scalar.hpp"
# include "boost/type_traits/is_array.hpp"
# include "boost/type_traits/is_reference.hpp"
# include "boost/type_traits/is_void.hpp"
# include "boost/type_traits/is_function.hpp"
-# include "boost/type_traits/detail/ice_and.hpp"
-# include "boost/type_traits/detail/ice_not.hpp"
#endif
// should be the last #include
template <class U> static ::boost::type_traits::no_type is_class_tester(...);
BOOST_STATIC_CONSTANT(bool, value =
- sizeof(is_class_tester<T>(0)) == sizeof(::boost::type_traits::yes_type)
+ (::boost::type_traits::ice_and<
+ sizeof(is_class_tester<T>(0)) == sizeof(::boost::type_traits::yes_type),
+ ::boost::type_traits::ice_not< ::boost::is_union<T>::value >::value
+ >::value)
);
};
#ifndef BOOST_TT_IS_COMPOUND_HPP_INCLUDED
#define BOOST_TT_IS_COMPOUND_HPP_INCLUDED
-#include "boost/type_traits/is_array.hpp"
-#include "boost/type_traits/is_pointer.hpp"
-#include "boost/type_traits/is_reference.hpp"
-#include "boost/type_traits/is_class.hpp"
-#include "boost/type_traits/is_union.hpp"
-#include "boost/type_traits/is_enum.hpp"
-#include "boost/type_traits/is_member_pointer.hpp"
-#include "boost/type_traits/detail/ice_or.hpp"
#include "boost/config.hpp"
+#include "boost/type_traits/is_fundamental.hpp"
+#include "boost/type_traits/detail/ice_not.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
struct is_compound_impl
{
BOOST_STATIC_CONSTANT(bool, value =
- (::boost::type_traits::ice_or<
- ::boost::is_array<T>::value,
- ::boost::is_pointer<T>::value,
- ::boost::is_reference<T>::value,
- ::boost::is_class<T>::value,
- ::boost::is_union<T>::value,
- ::boost::is_enum<T>::value,
- ::boost::is_member_pointer<T>::value
- >::value));
+ (::boost::type_traits::ice_not<
+ ::boost::is_fundamental<T>::value
+ >::value));
};
} // namespace detail
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# include "boost/type_traits/detail/cv_traits_impl.hpp"
+# ifdef __GNUC__
+# include <boost/type_traits/is_reference.hpp>
+# endif
#else
# include "boost/type_traits/is_reference.hpp"
# include "boost/type_traits/is_array.hpp"
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& const volatile,false)
#endif
+#if defined(__GNUC__) && (__GNUC__ < 3)
+// special case for gcc where illegally cv-qualified reference types can be
+// generated in some corner cases:
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T const,!(::boost::is_reference<T>::value))
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T volatile const,!(::boost::is_reference<T>::value))
+#endif
+
#else
namespace detail {
{
};
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void const,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void const volatile,true)
+#endif
+
} // namespace detail
//* is a type T declared const - is_const<T>
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::is_const_impl<T>::value)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_const,void,false)
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_const,void const,true)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_const,void volatile,false)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_const,void const volatile,true)
-#endif
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_CONST_HPP_INCLUDED
+
#include "boost/type_traits/detail/yes_no_type.hpp"
#include "boost/type_traits/config.hpp"
+#include "boost/type_traits/is_array.hpp"
+#include "boost/type_traits/add_reference.hpp"
+#include "boost/type_traits/ice.hpp"
#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
# include "boost/type_traits/is_void.hpp"
};
template <typename From, typename To>
-struct is_convertible_impl
+struct is_convertible_basic_impl
: does_conversion_exist<From>::template result_<To>
{
};
-#elif defined(__BORLANDC__)
+#elif defined(__BORLANDC__) && (__BORLANDC__ < 0x560)
//
// special version for Borland compilers
// this version breaks when used for some
#pragma option pop
};
-#elif defined(__GNUC__)
-// special version for gcc compiler
+#elif defined(__GNUC__) || defined(__BORLANDC__)
+// special version for gcc compiler + recent Borland versions
+// note that this does not pass UDT's through (...)
struct any_conversion
{
- template <typename T> any_conversion(const T&);
- template <typename T> any_conversion(T&);
+ template <typename T> any_conversion(const volatile T&);
+ //template <typename T> any_conversion(T&);
};
template <typename T> struct checker
};
template <typename From, typename To>
-struct is_convertible_impl
+struct is_convertible_basic_impl
{
static From _m_from;
static bool const value = sizeof( detail::checker<To>::_m_check(_m_from, 0) )
== sizeof(::boost::type_traits::yes_type);
};
+#elif (defined(BOOST_MSVC) && (BOOST_MSVC >= 1310) && _MSC_FULL_VER > 13102292) \
+ || (defined(__EDG_VERSION__) && (__EDG_VERSION__ >= 245) && !defined(__ICL))
+//
+// This is *almost* an ideal world implementation as it doesn't rely
+// on undefined behaviour by passing UDT's through (...).
+// Unfortunately it doesn't quite pass all the tests for most compilers (sigh...)
+// Enable this for your compiler if is_convertible_test.cpp will compile it...
+//
+struct any_conversion
+{
+ template <typename T> any_conversion(const volatile T&);
+ // we need this constructor to catch references to functions
+ // (which can not be cv-qualified):
+ template <typename T> any_conversion(T&);
+};
+
+template <typename From, typename To>
+struct is_convertible_basic_impl
+{
+ static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...);
+ static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int);
+ static From _m_from;
+
+ BOOST_STATIC_CONSTANT(bool, value =
+ sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type)
+ );
+};
+
#else
+//
+// This version seems to work pretty well for a wide spectrum of compilers,
+// however it does rely on undefined behaviour by passing UDT's through (...).
+//
template <typename From, typename To>
-struct is_convertible_impl
+struct is_convertible_basic_impl
{
static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...);
static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To);
static From _m_from;
- BOOST_STATIC_CONSTANT(bool, value =
+ BOOST_STATIC_CONSTANT(bool, value =
sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type)
);
};
#endif // is_convertible_impl
-} // namespace detail
-
-BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convertible_impl<From,To>::value))
+#if !defined(__BORLANDC__) || __BORLANDC__ > 0x551
+template <typename From, typename To>
+struct is_convertible_impl
+{
+ typedef typename add_reference<From>::type ref_type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (::boost::type_traits::ice_and<
+ ::boost::detail::is_convertible_basic_impl<ref_type,To>::value,
+ ::boost::type_traits::ice_not<
+ ::boost::is_array<To>::value
+ >::value
+ >::value)
+ );
+};
+#endif
//
// Now add the full and partial specialisations
// for void types, these are common to all the
// implementation above:
//
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename To,is_convertible,void,To,false)
-BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename From,is_convertible,From,void,false)
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename To,is_convertible,void const,To,false)
-BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename To,is_convertible,void volatile,To,false)
-BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename To,is_convertible,void const volatile,To,false)
-BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const,false)
-BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename From,is_convertible,From,void volatile,false)
-BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const volatile,false)
-#endif
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
# define TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1,spec2,value) \
- BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,spec1,spec2,value) \
- BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,spec1,spec2 const,value) \
- BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,spec1,spec2 volatile,value) \
- BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,spec1,spec2 const volatile,value) \
+ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2,value) \
+ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 const,value) \
+ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 volatile,value) \
+ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 const volatile,value) \
/**/
# define TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2(trait,spec1,spec2,value) \
# undef TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1
#else
- BOOST_TT_AUX_BOOL_TRAIT_SPEC2(is_convertible,void,void,true)
+ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(is_convertible,void,void,true)
#endif // BOOST_NO_CV_VOID_SPECIALIZATIONS
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void,To,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const,To,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void volatile,To,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const volatile,To,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const volatile,false)
+#endif
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convertible_impl<From,To>::value))
+
#if defined(__GNUC__)
#include "boost/type_traits/is_convertible.hpp"
#include "boost/type_traits/detail/ice_or.hpp"
#include "boost/type_traits/config.hpp"
+#include "boost/type_traits/intrinsics.hpp"
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# include "boost/type_traits/remove_cv.hpp"
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+// these help when the compiler has no partial specialization support:
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void const volatile,false)
+#endif
+
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_empty,T,::boost::detail::is_empty_impl<T>::value)
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_EMPTY_HPP_INCLUDED
+
BOOST_STATIC_CONSTANT(bool, value = helper::value);
};
+// Specializations suppress some nasty warnings with GCC
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,float,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,double,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,long double,false)
+// these help on compilers with no partial specialization support:
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,void const volatile,false)
+#endif
+
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_enum,T,::boost::detail::is_enum_impl<T>::value)
-// Specializations suppress some nasty warnings with GCC
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_enum,float,false)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_enum,double,false)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_enum,long double,false)
-
#else // __BORLANDC__
//
// buggy is_convertible prevents working
// implementation of is_enum:
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_enum,T,BOOST_IS_ENUM(T))
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_enum,T,false)
#endif
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,wchar_t,true)
#endif
+#if (defined(BOOST_MSVC) && (BOOST_MSVC == 1200)) || (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600))
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int8,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int8,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int16,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int16,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int32,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int32,true)
+#endif
+
# if defined(BOOST_HAS_LONG_LONG)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned long long,true)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,long long,true)
#else
-#ifndef __BORLANDC__
-
namespace detail {
+#ifndef __BORLANDC__
+
template <bool>
-struct is_member_function_pointer_select
+struct is_mem_fun_pointer_select
: ::boost::type_traits::false_result
{
};
template <>
-struct is_member_function_pointer_select<false>
+struct is_mem_fun_pointer_select<false>
{
template <typename T> struct result_
{
};
template <typename T>
-struct is_mem_fun_pointer_impl
- : is_member_function_pointer_select<
+struct is_member_function_pointer_impl
+ : is_mem_fun_pointer_select<
::boost::type_traits::ice_or<
::boost::is_reference<T>::value
, ::boost::is_array<T>::value
{
};
-} // namespace detail
-
#else // Borland C++
-namespace detail {
-
template <typename T>
-struct is_mem_fun_pointer_impl
+struct is_member_function_pointer_impl
{
static T& m_t;
BOOST_STATIC_CONSTANT(
};
template <typename T>
-struct is_mem_fun_pointer_impl<T&>
+struct is_member_function_pointer_impl<T&>
{
BOOST_STATIC_CONSTANT(bool, value = false);
};
-} // namespace detail
-
#endif
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_function_pointer,T,::boost::detail::is_mem_fun_pointer_impl<T>::value)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_function_pointer,void,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void,false)
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_function_pointer,void const,false)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_function_pointer,void volatile,false)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_function_pointer,void const volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void const volatile,false)
#endif
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_function_pointer,T,::boost::detail::is_member_function_pointer_impl<T>::value)
+
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace boost
{
};
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void const volatile,false)
+#endif
+
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,::boost::detail::is_member_pointer_impl<T>::value)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_pointer,void,false)
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_pointer,void const,false)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_pointer,void volatile,false)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_member_pointer,void const volatile,false)
-#endif
#endif // __BORLANDC__
--- /dev/null
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Permission to copy, use, modify, sell and distribute this software is
+// granted provided this copyright notice appears in all copies. This software
+// is provided "as is" without express or implied warranty, and with no claim
+// as to its suitability for any purpose.
+//
+// See http://www.boost.org for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_POD_HPP_INCLUDED
+#define BOOST_TT_IS_POD_HPP_INCLUDED
+
+#include "boost/type_traits/config.hpp"
+#include "boost/type_traits/is_void.hpp"
+#include "boost/type_traits/is_scalar.hpp"
+#include "boost/type_traits/detail/ice_or.hpp"
+#include "boost/type_traits/intrinsics.hpp"
+
+#include <cstddef>
+
+// should be the last #include
+#include "boost/type_traits/detail/bool_trait_def.hpp"
+
+namespace boost {
+
+// forward declaration, needed by 'is_pod_array_helper' template below
+template< typename T > struct is_POD;
+
+namespace detail {
+
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+template <typename T> struct is_pod_impl
+{
+ BOOST_STATIC_CONSTANT(
+ bool, value =
+ (::boost::type_traits::ice_or<
+ ::boost::is_scalar<T>::value,
+ ::boost::is_void<T>::value,
+ BOOST_IS_POD(T)
+ >::value));
+};
+
+template <typename T, std::size_t sz>
+struct is_pod_impl<T[sz]>
+ : is_pod_impl<T>
+{
+};
+
+#else
+
+template <bool is_array = false>
+struct is_pod_helper
+{
+ template <typename T> struct result_
+ {
+ BOOST_STATIC_CONSTANT(
+ bool, value =
+ (::boost::type_traits::ice_or<
+ ::boost::is_scalar<T>::value,
+ ::boost::is_void<T>::value,
+ BOOST_IS_POD(T)
+ >::value));
+ };
+};
+
+template <bool b>
+struct bool_to_yes_no_type
+{
+ typedef ::boost::type_traits::no_type type;
+};
+
+template <>
+struct bool_to_yes_no_type<true>
+{
+ typedef ::boost::type_traits::yes_type type;
+};
+
+template <typename ArrayType>
+struct is_pod_array_helper
+{
+ enum { is_pod = ::boost::is_POD<ArrayType>::value }; // MSVC workaround
+ typedef typename bool_to_yes_no_type<is_pod>::type type;
+ type instance() const;
+};
+
+template <typename T>
+is_pod_array_helper<T> is_POD_array(T*);
+
+template <>
+struct is_pod_helper<true>
+{
+ template <typename T> struct result_
+ {
+ static T& help();
+ BOOST_STATIC_CONSTANT(bool, value =
+ sizeof(is_POD_array(help()).instance()) == sizeof(::boost::type_traits::yes_type)
+ );
+ };
+};
+
+
+template <typename T> struct is_pod_impl
+{
+ BOOST_STATIC_CONSTANT(
+ bool, value = (
+ ::boost::detail::is_pod_helper<
+ ::boost::is_array<T>::value
+ >::template result_<T>::value
+ )
+ );
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+// the following help compilers without partial specialization support:
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void,true)
+
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void const,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void volatile,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void const volatile,true)
+#endif
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::detail::is_pod_impl<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pod,T,::boost::is_POD<T>::value)
+
+} // namespace boost
+
+#include "boost/type_traits/detail/bool_trait_undef.hpp"
+
+#endif // BOOST_TT_IS_POD_HPP_INCLUDED
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,::boost::detail::is_pointer_impl<T>::value)
+#if defined(__BORLANDC__) && !defined(__COMO__)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T&,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T& const,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T& volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T& const volatile,false)
+#endif
+
#else // no partial template specialization
namespace detail {
{
};
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void const volatile,false)
+#endif
+
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,::boost::detail::is_pointer_impl<T>::value)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pointer,void,false)
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pointer,void const,false)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pointer,void volatile,false)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_pointer,void const volatile,false)
-#endif
-
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace boost
--- /dev/null
+// (C) Copyright John Maddock 2000. Permission to copy, use, modify, sell and
+// distribute this software is granted provided this copyright notice appears
+// in all copies. This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+
+#ifndef BOOST_TT_IS_POLYMORPHIC_HPP
+#define BOOST_TT_IS_POLYMORPHIC_HPP
+
+#include <boost/type_traits/is_class.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+// should be the last #include
+#include "boost/type_traits/detail/bool_trait_def.hpp"
+
+namespace boost{
+namespace detail{
+
+template <class T>
+struct is_polymorphic_imp1
+{
+ typedef typename remove_cv<T>::type ncvT;
+ struct d1 : public ncvT
+ {
+ d1();
+# if !defined(__GNUC__) // this raises warnings with some classes, and buys nothing with GCC
+ ~d1()throw();
+# endif
+ char padding[256];
+ };
+ struct d2 : public ncvT
+ {
+ d2();
+ virtual ~d2()throw();
+#ifndef BOOST_MSVC
+ // for some reason this messes up VC++ when T has virtual bases:
+ virtual void foo();
+#endif
+ char padding[256];
+ };
+ BOOST_STATIC_CONSTANT(bool, value = (sizeof(d2) == sizeof(d1)));
+};
+
+template <class T>
+struct is_polymorphic_imp2
+{
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template <bool is_class>
+struct is_polymorphic_selector
+{
+ template <class T>
+ struct rebind
+ {
+ typedef is_polymorphic_imp2<T> type;
+ };
+};
+
+template <>
+struct is_polymorphic_selector<true>
+{
+ template <class T>
+ struct rebind
+ {
+ typedef is_polymorphic_imp1<T> type;
+ };
+};
+
+template <class T>
+struct is_polymorphic_imp
+{
+ typedef is_polymorphic_selector< ::boost::is_class<T>::value> selector;
+ typedef typename selector::template rebind<T> binder;
+ typedef typename binder::type imp_type;
+ BOOST_STATIC_CONSTANT(bool, value = imp_type::value);
+};
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_polymorphic,T,::boost::detail::is_polymorphic_imp<T>::value)
+
+} // namespace boost
+
+#include "boost/type_traits/detail/bool_trait_undef.hpp"
+
+#endif
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,false)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T&,true)
-#if defined(__BORLANDC__)
+#if defined(__BORLANDC__) && !defined(__COMO__)
// these are illegal specialisations; cv-qualifies applied to
// references have no effect according to [8.3.2p1],
// C++ Builder requires them though as it treats cv-qualified
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T& const volatile,true)
#endif
+#if defined(__GNUC__) && (__GNUC__ < 3)
+// these allow us to work around illegally cv-qualified reference
+// types.
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T const ,::boost::is_reference<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T volatile ,::boost::is_reference<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T const volatile ,::boost::is_reference<T>::value)
+// However, the above specializations confuse gcc 2.96 unless we also
+// supply these specializations for array types
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_reference,T[N],false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_reference,const T[N],false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_reference,volatile T[N],false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_reference,const volatile T[N],false)
+#endif
+
#else
#ifdef BOOST_MSVC
);
};
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_reference,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_reference,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_reference,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_reference,void const volatile,false)
+#endif
+
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,::boost::detail::is_reference_impl<T>::value)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_reference,void,false)
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_reference,void const,false)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_reference,void volatile,false)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_reference,void const volatile,false)
-#endif
#ifdef BOOST_MSVC
# pragma warning(pop)
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED
+
#ifndef BOOST_TT_IS_SAME_HPP_INCLUDED
#define BOOST_TT_IS_SAME_HPP_INCLUDED
+#include "boost/type_traits/config.hpp"
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#include "boost/type_traits/detail/yes_no_type.hpp"
+#include "boost/type_traits/detail/ice_and.hpp"
+#include "boost/type_traits/is_reference.hpp"
+#endif
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_same,T,U,false)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename T,is_same,T,T,true)
+#ifdef __BORLANDC__
+// without this, Borland's compiler gives the wrong answer for
+// references to arrays:
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename T,is_same,T&,T&,true)
+#endif
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#include "boost/type_traits/detail/bool_trait_undef.hpp"
#endif // BOOST_TT_IS_SAME_HPP_INCLUDED
+
>::value));
};
+// these specializations are only really needed for compilers
+// without partial specialization support:
+template <> struct is_scalar_impl<void>{ BOOST_STATIC_CONSTANT(bool, value = false ); };
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+template <> struct is_scalar_impl<void const>{ BOOST_STATIC_CONSTANT(bool, value = false ); };
+template <> struct is_scalar_impl<void volatile>{ BOOST_STATIC_CONSTANT(bool, value = false ); };
+template <> struct is_scalar_impl<void const volatile>{ BOOST_STATIC_CONSTANT(bool, value = false ); };
+#endif
+
} // namespace detail
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_scalar,T,::boost::detail::is_scalar_impl<T>::value)
#include "boost/type_traits/remove_cv.hpp"
#include "boost/type_traits/config.hpp"
+#include "boost/type_traits/intrinsics.hpp"
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
{
};
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void volatile,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void const volatile,true)
+#endif
+
} // namespace detail
//* is a type T declared volatile - is_volatile<T>
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::is_volatile_impl<T>::value)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_volatile,void,false)
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_volatile,void const,false)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_volatile,void volatile,true)
-BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_volatile,void const volatile,true)
-#endif
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// See http://www.boost.org for most recent version including documentation.
//
// defines object traits classes:
-// is_object, is_scalar, is_class, is_compound, is_POD,
+// is_object, is_scalar, is_class, is_compound, is_pod,
// has_trivial_constructor, has_trivial_copy, has_trivial_assign,
// has_trivial_destructor, is_empty.
//
#include "boost/type_traits/is_compound.hpp"
#include "boost/type_traits/is_empty.hpp"
#include "boost/type_traits/is_object.hpp"
-#include "boost/type_traits/is_POD.hpp"
+#include "boost/type_traits/is_pod.hpp"
#include "boost/type_traits/is_scalar.hpp"
#include "boost/type_traits/is_stateless.hpp"
#else
-BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_const,T,T)
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_const,T,typename detail::remove_const_impl<T>::type)
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#else
-// doesn't work
-BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,T)
+namespace detail {
+template <typename T>
+struct remove_cv_impl
+{
+ typedef typename remove_volatile_impl<
+ typename remove_const_impl<T>::type
+ >::type type;
+};
+}
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename detail::remove_cv_impl<T>::type)
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
namespace boost {
-BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,T)
-
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,T)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T*,T)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const,T)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* volatile,T)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const volatile,T)
+
+#else
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename detail::remove_pointer_impl<T>::type)
+
#endif
} // namespace boost
namespace boost {
-BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,T)
-
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,T)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T&,T)
#if defined(__BORLANDC__)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& const volatile,T)
#endif
+#else
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,typename detail::remove_reference_impl<T>::type)
+
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
} // namespace boost
#else
-// doesn't work
-BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,T)
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,typename detail::remove_volatile_impl<T>::type)
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#include "boost/preprocessor/tuple/to_list.hpp"
#include "boost/preprocessor/cat.hpp"
#include "boost/type_traits/alignment_of.hpp"
+#include "boost/type_traits/is_pod.hpp"
#include "boost/static_assert.hpp"
#include "boost/config.hpp"
+// should be the last #include
+#include "boost/type_traits/detail/bool_trait_def.hpp"
+
#include <cstddef>
#ifdef BOOST_MSVC
namespace boost {
+#ifndef __BORLANDC__
+
namespace detail {
class alignment_dummy;
);
};
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::max_align,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<1> ,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<2> ,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<4> ,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<8> ,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<10> ,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<16> ,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<32> ,true)
+
} // namespace detail
// This alignment method originally due to Brian Parker, implemented by David
BOOST_STATIC_CONSTANT(std::size_t, found = alignment_of<align_t>::value);
+#ifndef __BORLANDC__
BOOST_STATIC_ASSERT(found >= Align);
BOOST_STATIC_ASSERT(found % Align == 0);
+#else
+ BOOST_STATIC_ASSERT(::boost::type_with_alignment<Align>::found >= Align);
+ BOOST_STATIC_ASSERT(::boost::type_with_alignment<Align>::found % Align == 0);
+#endif
public:
typedef align_t type;
};
+#else
+
+//
+// Borland specific version, we have this for two reasons:
+// 1) The version above doesn't always compile (with the new test cases for example)
+// 2) Because of Borlands #pragma option we can create types with alignments that are
+// greater that the largest aligned builtin type.
+
+namespace align{
+#pragma option push -a16
+struct a2{ short s; };
+struct a4{ int s; };
+struct a8{ double s; };
+struct a16{ long double s; };
+#pragma option pop
+}
+
+namespace detail {
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a2,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a4,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a8,true)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a16,true)
+}
+
+template <std::size_t N> struct type_with_alignment
+{
+ // We should never get to here, but if we do use the maximally
+ // aligned type:
+ // BOOST_STATIC_ASSERT(0);
+ typedef align::a16 type;
+};
+template <> struct type_with_alignment<1>{ typedef char type; };
+template <> struct type_with_alignment<2>{ typedef align::a2 type; };
+template <> struct type_with_alignment<4>{ typedef align::a4 type; };
+template <> struct type_with_alignment<8>{ typedef align::a8 type; };
+template <> struct type_with_alignment<16>{ typedef align::a16 type; };
+
+#endif
+
} // namespace boost
#ifdef BOOST_MSVC
# pragma warning(pop)
#endif
+#include "boost/type_traits/detail/bool_trait_undef.hpp"
+
#endif // BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED
+
+
+++ /dev/null
-// Copyright David Abrahams 2002. Permission to copy, use,
-// modify, sell and distribute this software is granted provided this
-// copyright notice appears in all copies. This software is provided
-// "as is" without express or implied warranty, and with no claim as
-// to its suitability for any purpose.
-#ifndef BOOST_TT_UTILITY_HPP
-# define BOOST_TT_UTILITY_HPP
-
-namespace boost { namespace type_traits
-{
- // Utility metafunction class which always returns false
- struct false_unary_metafunction
- {
- template <class T>
- struct apply
- {
- BOOST_STATIC_CONSTANT(bool, value = false);
- };
- };
-
- template <class T> struct wrap {};
-}} // namespace boost::type_traits
-
-#endif // BOOST_TT_UTILITY_HPP
-// boost utility.hpp header file -------------------------------------------//
+// Boost utility.hpp header file -------------------------------------------//
-// (C) Copyright boost.org 1999. Permission to copy, use, modify, sell
+// (C) Copyright Boost.org 1999-2003. Permission to copy, use, modify, sell
// and distribute this software is granted provided this copyright
// notice appears in all copies. This software is provided "as is" without
// express or implied warranty, and with no claim as to its suitability for
// any purpose.
-// See http://www.boost.org for most recent version including documentation.
-
-// Classes appear in alphabetical order
+// See http://www.boost.org/libs/utility for documentation.
#ifndef BOOST_UTILITY_HPP
#define BOOST_UTILITY_HPP
-// certain headers are part of the <utility.hpp> interface
-
-#include <boost/checked_delete.hpp>
-#include <boost/utility/base_from_member.hpp>
#include <boost/utility/addressof.hpp>
-
-namespace boost
-{
-// next() and prior() template functions -----------------------------------//
-
- // Helper functions for classes like bidirectional iterators not supporting
- // operator+ and operator-.
- //
- // Usage:
- // const std::list<T>::iterator p = get_some_iterator();
- // const std::list<T>::iterator prev = boost::prior(p);
-
- // Contributed by Dave Abrahams
-
- template <class T>
- inline T next(T x) { return ++x; }
-
- template <class T>
- inline T prior(T x) { return --x; }
-
-
-// class noncopyable -------------------------------------------------------//
-
- // Private copy constructor and copy assignment ensure classes derived from
- // class noncopyable cannot be copied.
-
- // Contributed by Dave Abrahams
-
- class noncopyable
- {
- protected:
- noncopyable(){}
- ~noncopyable(){}
- private: // emphasize the following members are private
- noncopyable( const noncopyable& );
- const noncopyable& operator=( const noncopyable& );
- }; // noncopyable
-
-
-} // namespace boost
+#include <boost/utility/base_from_member.hpp>
+#include <boost/checked_delete.hpp>
+#include <boost/next_prior.hpp>
+#include <boost/noncopyable.hpp>
#endif // BOOST_UTILITY_HPP
// For more information, see http://www.boost.org
#ifndef BOOST_UTILITY_ADDRESSOF_HPP
-#define BOOST_UTILITY_ADDRESSOF_HPP
+# define BOOST_UTILITY_ADDRESSOF_HPP
+
+# include <boost/config.hpp>
+# include <boost/detail/workaround.hpp>
+# if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
+# include <boost/type_traits/add_pointer.hpp>
+# endif
namespace boost {
// Do not make addressof() inline. Breaks MSVC 7. (Peter Dimov)
-template <typename T> T* addressof(T& v)
+// VC7 strips const from nested classes unless we add indirection here
+# if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
+template <typename T> typename add_pointer<T>::type
+# else
+template <typename T> T*
+# endif
+addressof(T& v)
{
return reinterpret_cast<T*>(
&const_cast<char&>(reinterpret_cast<const volatile char &>(v)));
// express or implied warranty, and with no claim as to its suitability for
// any purpose.
-// See http://www.boost.org for most recent version including documentation.
+// See http://www.boost.org/libs/utility for documentation.
#ifndef BOOST_UTILITY_FWD_HPP
#define BOOST_UTILITY_FWD_HPP
-// Boost config.hpp configuration header file ------------------------------//
+// Boost version.hpp configuration header file ------------------------------//
// (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
// distribute this software is granted provided this copyright notice appears
// in all copies. This software is provided "as is" without express or implied
// warranty, and with no claim as to its suitability for any purpose.
-// See http://www.boost.org for most recent version.
+// See http://www.boost.org/libs/config for documentation
#ifndef BOOST_VERSION_HPP
#define BOOST_VERSION_HPP
// BOOST_VERSION / 100 % 1000 is the minor version
// BOOST_VERSION / 100000 is the major version
-#define BOOST_VERSION 102900
+#define BOOST_VERSION 103000
#endif
// This software is provided "as is" without express or implied warranty,
// and with no claim as to its suitability for any purpose.
-// For more information, see http://www.boost.org
+// For more information, see http://www.boost.org/libs/signals
#ifndef BOOST_VISIT_EACH_HPP
#define BOOST_VISIT_EACH_HPP
//
// weak_ptr.hpp
//
-// Copyright (c) 2001, 2002 Peter Dimov
+// Copyright (c) 2001, 2002, 2003 Peter Dimov
//
// Permission to copy, use, modify, sell and distribute this software
// is granted provided this copyright notice appears in all copies.
namespace boost
{
-template<typename T> class weak_ptr
+template<class T> class weak_ptr
{
private:
typedef T element_type;
- weak_ptr(): px(0), pn()
+ weak_ptr(): px(0), pn() // never throws in 1.30+
{
}
// generated copy constructor, assignment, destructor are fine
- template<typename Y>
- weak_ptr(weak_ptr<Y> const & r): px(r.px), pn(r.pn) // never throws
+
+//
+// The "obvious" converting constructor implementation:
+//
+// template<class Y>
+// weak_ptr(weak_ptr<Y> const & r): px(r.px), pn(r.pn) // never throws
+// {
+// }
+//
+// has a serious problem.
+//
+// r.px may already have been invalidated. The px(r.px)
+// conversion may require access to *r.px (virtual inheritance).
+//
+// It is not possible to avoid spurious access violations since
+// in multithreaded programs r.px may be invalidated at any point.
+//
+
+ template<class Y>
+ weak_ptr(weak_ptr<Y> const & r): pn(r.pn) // never throws
{
+ px = r.lock().get();
}
- template<typename Y>
+ template<class Y>
weak_ptr(shared_ptr<Y> const & r): px(r.px), pn(r.pn) // never throws
{
}
#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1200)
- template<typename Y>
+ template<class Y>
weak_ptr & operator=(weak_ptr<Y> const & r) // never throws
{
- px = r.px;
+ px = r.lock().get();
pn = r.pn;
return *this;
}
- template<typename Y>
+ template<class Y>
weak_ptr & operator=(shared_ptr<Y> const & r) // never throws
{
px = r.px;
#endif
- void reset()
+ shared_ptr<T> lock() const // never throws
{
- this_type().swap(*this);
- }
+#if defined(BOOST_HAS_THREADS)
+
+ // optimization: avoid throw overhead
+ if(expired())
+ {
+ return shared_ptr<element_type>();
+ }
+
+ try
+ {
+ return shared_ptr<element_type>(*this);
+ }
+ catch(bad_weak_ptr const &)
+ {
+ // Q: how can we get here?
+ // A: another thread may have invalidated r after the use_count test above.
+ return shared_ptr<element_type>();
+ }
+
+#else
+
+ // optimization: avoid try/catch overhead when single threaded
+ return expired()? shared_ptr<element_type>(): shared_ptr<element_type>(*this);
- T * get() const // never throws; deprecated, removal pending, don't use
- {
- return pn.use_count() == 0? 0: px;
+#endif
}
long use_count() const // never throws
return pn.use_count() == 0;
}
+ void reset() // never throws in 1.30+
+ {
+ this_type().swap(*this);
+ }
+
void swap(this_type & other) // never throws
{
std::swap(px, other.px);
pn.swap(other.pn);
}
- bool less(this_type const & rhs) const // implementation detail, never throws
+ void _internal_assign(T * px2, detail::shared_count const & pn2)
+ {
+ px = px2;
+ pn = pn2;
+ }
+
+ template<class Y> bool _internal_less(weak_ptr<Y> const & rhs) const
{
return pn < rhs.pn;
}
private:
- template<typename Y> friend class weak_ptr;
- template<typename Y> friend class shared_ptr;
+ template<class Y> friend class weak_ptr;
+ template<class Y> friend class shared_ptr;
#endif
}; // weak_ptr
-template<class T, class U> inline bool operator==(weak_ptr<T> const & a, weak_ptr<U> const & b)
+template<class T, class U> inline bool operator<(weak_ptr<T> const & a, weak_ptr<U> const & b)
{
- return a.get() == b.get();
-}
-
-template<class T, class U> inline bool operator!=(weak_ptr<T> const & a, weak_ptr<U> const & b)
-{
- return a.get() != b.get();
-}
-
-#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96
-
-// Resolve the ambiguity between our op!= and the one in rel_ops
-
-template<typename T> inline bool operator!=(weak_ptr<T> const & a, weak_ptr<T> const & b)
-{
- return a.get() != b.get();
-}
-
-#endif
-
-template<class T> inline bool operator<(weak_ptr<T> const & a, weak_ptr<T> const & b)
-{
- return a.less(b);
+ return a._internal_less(b);
}
template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b)
a.swap(b);
}
-template<class T> shared_ptr<T> make_shared(weak_ptr<T> const & r) // never throws
+// deprecated, provided for backward compatibility
+template<class T> shared_ptr<T> make_shared(weak_ptr<T> const & r)
{
- // optimization: avoid throw overhead
- if(r.use_count() == 0)
- {
- return shared_ptr<T>();
- }
-
- try
- {
- return shared_ptr<T>(r);
- }
- catch(use_count_is_zero const &)
- {
- return shared_ptr<T>();
- }
+ return r.lock();
}
-// Note: there is no get_pointer overload for weak_ptr.
-// This is intentional. Even get() will disappear in a
-// future release; these accessors are too error-prone.
-
} // namespace boost
#ifdef BOOST_MSVC
#include <cstdio>
#include <boost/cregex.hpp>
#include <boost/regex/regex_traits.hpp>
-#include <boost/regex/detail/regex_synch.hpp>
-#include <boost/regex/detail/regex_cstring.hpp>
+#include <boost/regex/v3/regex_synch.hpp>
+#include <boost/regex/v3/regex_cstring.hpp>
#include <boost/scoped_array.hpp>
#include "primary_transform.hpp"
namespace{
+//
+// helper function to get the locale name,
+// works around possibly broken setlocale implementations:
+//
+const char* getlocale(int id)
+{
+ static const char* def = "Unknown";
+ const char* pl = std::setlocale(id, 0);
+ return pl ? pl : def;
+}
+
//
// character classes:
//
void BOOST_REGEX_CALL re_update_classes()
{
BOOST_RE_GUARD_STACK
- if(*re_cls_name != std::setlocale(LC_CTYPE, 0))
+ if(*re_cls_name != getlocale(LC_CTYPE))
{
- *re_cls_name = std::setlocale(LC_CTYPE, 0);
+ *re_cls_name = getlocale(LC_CTYPE);
char buf[256];
unsigned int i;
for(i = 0; i < re_classes_max; ++i)
void BOOST_REGEX_CALL re_update_collate()
{
BOOST_RE_GUARD_STACK
- if(*re_coll_name != std::setlocale(LC_COLLATE, 0))
+ if(*re_coll_name != getlocale(LC_COLLATE))
{
- *re_coll_name = std::setlocale(LC_COLLATE, 0);
+ *re_coll_name = getlocale(LC_COLLATE);
char buf[256];
unsigned int i = 400;
re_get_message(buf, 256, i);
//
// called whenever the global locale changes:
//
- std::string l(std::setlocale(LC_MESSAGES, 0));
+ std::string l(getlocale(LC_MESSAGES));
if(*mess_locale != l)
{
*mess_locale = l;
re_detail::cs_guard g(*re_detail::p_re_lock);
#endif
re_message_update();
- if(*collate_name != std::setlocale(LC_COLLATE, 0))
+ if(*collate_name != getlocale(LC_COLLATE))
{
do_update_collate();
- *collate_name = std::setlocale(LC_COLLATE, 0);
+ *collate_name = getlocale(LC_COLLATE);
}
- if(*ctype_name != std::setlocale(LC_CTYPE, 0))
+ if(*ctype_name != getlocale(LC_CTYPE))
{
do_update_ctype();
- *ctype_name = std::setlocale(LC_CTYPE, 0);
+ *ctype_name = getlocale(LC_CTYPE);
}
sort_type = re_detail::find_sort_syntax(&i, &sort_delim);
}
re_message_update();
re_update_classes();
re_update_collate();
- std::string l(std::setlocale(LC_CTYPE, 0));
+ std::string l(getlocale(LC_CTYPE));
if(*wlocale_name != l)
{
*wlocale_name = l;
} // namespace boost
+
#include <list>
#include <cctype>
#include <boost/regex/regex_traits.hpp>
-#include <boost/regex/detail/regex_synch.hpp>
+#include <boost/regex/v3/regex_synch.hpp>
namespace boost{
} // namespace re_detail
} // namespace boost
+
#if !defined(BOOST_NO_STD_STRING)
#include <map>
#include <list>
-#include <boost/regex/detail/fileiter.hpp>
+#include <boost/regex/v3/fileiter.hpp>
#include <cstdio>
namespace boost{
+
#include <climits>
#include <stdexcept>
-#include <boost/regex/detail/fileiter.hpp>
+#include <boost/regex/v3/fileiter.hpp>
#ifndef BOOST_REGEX_NO_FILEITER
+
#include <crtdbg.h>
#endif
-#include <boost/regex/detail/regex_raw_buffer.hpp>
+#include <boost/regex/v3/regex_raw_buffer.hpp>
#include <boost/regex.hpp>
#ifndef BOOST_RE_OLD_IOSTREAM
+
#define BOOST_REGEX_SOURCE
-#include <boost/regex/detail/regex_synch.hpp>
+#include <boost/regex/v3/regex_synch.hpp>
namespace boost{
namespace re_detail{
} // namespace boost
+
#include <list>
#include <cctype>
#include <cstdio>
-#include <boost/cregex.hpp>
#include <boost/regex/regex_traits.hpp>
-#include <boost/regex/detail/regex_synch.hpp>
-#include <boost/regex/detail/regex_cstring.hpp>
+#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32)
+#include <boost/cregex.hpp>
+#include <boost/regex/v3/regex_synch.hpp>
+#include <boost/regex/v3/regex_cstring.hpp>
#include <boost/scoped_array.hpp>
-#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32)
//
// VC6 needs to link to user32.lib, as do all compilers that
+