]> git.lyx.org Git - features.git/commitdiff
update boost to 1.44
authorPeter Kümmel <syntheticpp@gmx.net>
Mon, 25 Oct 2010 19:11:25 +0000 (19:11 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Mon, 25 Oct 2010 19:11:25 +0000 (19:11 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35837 a592a061-630c-0410-9148-cb99ea01b6c8

126 files changed:
boost/boost/array.hpp
boost/boost/bind/placeholders.hpp
boost/boost/concept_check.hpp
boost/boost/config/abi/borland_prefix.hpp
boost/boost/config/auto_link.hpp
boost/boost/config/compiler/borland.hpp
boost/boost/config/compiler/codegear.hpp
boost/boost/config/compiler/common_edg.hpp
boost/boost/config/compiler/digitalmars.hpp
boost/boost/config/compiler/gcc.hpp
boost/boost/config/compiler/gcc_xml.hpp
boost/boost/config/compiler/intel.hpp
boost/boost/config/compiler/kai.hpp
boost/boost/config/compiler/metrowerks.hpp
boost/boost/config/compiler/pgi.hpp
boost/boost/config/compiler/sunpro_cc.hpp
boost/boost/config/compiler/vacpp.hpp
boost/boost/config/compiler/visualc.hpp
boost/boost/config/platform/cygwin.hpp
boost/boost/config/platform/win32.hpp
boost/boost/config/select_compiler_config.hpp
boost/boost/config/select_platform_config.hpp
boost/boost/config/stdlib/dinkumware.hpp
boost/boost/config/stdlib/libcomo.hpp
boost/boost/config/stdlib/libstdcpp3.hpp
boost/boost/config/stdlib/modena.hpp
boost/boost/config/stdlib/msl.hpp
boost/boost/config/stdlib/roguewave.hpp
boost/boost/config/stdlib/sgi.hpp
boost/boost/config/stdlib/stlport.hpp
boost/boost/config/stdlib/vacpp.hpp
boost/boost/config/suffix.hpp
boost/boost/cstdint.hpp
boost/boost/detail/algorithm.hpp
boost/boost/detail/container_fwd.hpp
boost/boost/detail/endian.hpp
boost/boost/detail/lcast_precision.hpp
boost/boost/detail/none_t.hpp
boost/boost/detail/scoped_enum_emulation.hpp
boost/boost/detail/sp_typeinfo.hpp
boost/boost/detail/workaround.hpp
boost/boost/exception/detail/error_info_impl.hpp
boost/boost/exception/detail/exception_ptr.hpp
boost/boost/exception/detail/is_output_streamable.hpp
boost/boost/exception/detail/type_info.hpp
boost/boost/exception/diagnostic_information.hpp
boost/boost/exception/errinfo_nested_exception.hpp
boost/boost/exception/exception.hpp
boost/boost/exception/info.hpp
boost/boost/format/alt_sstream_impl.hpp
boost/boost/format/format_class.hpp
boost/boost/format/format_implementation.hpp
boost/boost/format/internals.hpp
boost/boost/function/function_base.hpp
boost/boost/functional/hash/detail/hash_float_generic.hpp
boost/boost/functional/hash/hash.hpp
boost/boost/integer.hpp
boost/boost/integer_fwd.hpp
boost/boost/iterator/transform_iterator.hpp
boost/boost/mpl/aux_/config/has_xxx.hpp
boost/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp
boost/boost/mpl/aux_/template_arity.hpp
boost/boost/mpl/bitand.hpp
boost/boost/mpl/bitor.hpp
boost/boost/mpl/eval_if.hpp
boost/boost/mpl/has_xxx.hpp
boost/boost/mpl/string.hpp
boost/boost/mpl/zip_view.hpp
boost/boost/optional/optional.hpp
boost/boost/optional/optional_fwd.hpp
boost/boost/optional/optional_io.hpp
boost/boost/regex/concepts.hpp
boost/boost/regex/config.hpp
boost/boost/regex/icu.hpp
boost/boost/regex/v4/basic_regex_creator.hpp
boost/boost/regex/v4/basic_regex_parser.hpp
boost/boost/regex/v4/cpp_regex_traits.hpp
boost/boost/regex/v4/instances.hpp
boost/boost/regex/v4/match_results.hpp
boost/boost/regex/v4/perl_matcher.hpp
boost/boost/regex/v4/perl_matcher_common.hpp
boost/boost/regex/v4/perl_matcher_non_recursive.hpp
boost/boost/regex/v4/perl_matcher_recursive.hpp
boost/boost/regex/v4/regex_format.hpp
boost/boost/regex/v4/regex_workaround.hpp
boost/boost/regex/v4/u32regex_token_iterator.hpp
boost/boost/smart_ptr/detail/sp_convertible.hpp
boost/boost/smart_ptr/detail/yield_k.hpp
boost/boost/smart_ptr/make_shared.hpp
boost/boost/throw_exception.hpp
boost/boost/token_functions.hpp
boost/boost/type_traits.hpp
boost/boost/type_traits/add_reference.hpp
boost/boost/type_traits/function_traits.hpp
boost/boost/type_traits/is_complex.hpp
boost/boost/type_traits/is_const.hpp
boost/boost/type_traits/is_convertible.hpp
boost/boost/type_traits/is_empty.hpp
boost/boost/type_traits/is_function.hpp
boost/boost/type_traits/is_lvalue_reference.hpp [new file with mode: 0644]
boost/boost/type_traits/is_reference.hpp
boost/boost/type_traits/is_rvalue_reference.hpp [new file with mode: 0644]
boost/boost/type_traits/is_same.hpp
boost/boost/type_traits/is_volatile.hpp
boost/boost/type_traits/msvc/remove_all_extents.hpp
boost/boost/type_traits/msvc/remove_bounds.hpp
boost/boost/type_traits/msvc/remove_const.hpp
boost/boost/type_traits/msvc/remove_cv.hpp
boost/boost/type_traits/msvc/remove_extent.hpp
boost/boost/type_traits/msvc/remove_pointer.hpp
boost/boost/type_traits/msvc/remove_reference.hpp
boost/boost/type_traits/msvc/remove_volatile.hpp
boost/boost/type_traits/remove_const.hpp
boost/boost/type_traits/remove_cv.hpp
boost/boost/type_traits/remove_reference.hpp
boost/boost/type_traits/remove_volatile.hpp
boost/boost/type_traits/type_with_alignment.hpp
boost/boost/utility/compare_pointees.hpp
boost/boost/utility/detail/in_place_factory_prefix.hpp
boost/boost/utility/detail/in_place_factory_suffix.hpp
boost/boost/utility/detail/result_of_iterate.hpp
boost/boost/utility/in_place_factory.hpp
boost/boost/utility/result_of.hpp
boost/boost/utility/typed_in_place_factory.hpp
boost/boost/utility/value_init.hpp
boost/boost/version.hpp

index d58b93ad54b22197afcc231b297db4982ccbdf5d..7df27714755d404e8aa08ed28ca4dacf68a6d1d6 100644 (file)
  * accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
+ * 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group.
+ *      See <http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#776> or Trac issue #3168
+ *      Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow)
+ * 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow)
  * 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis)
  * 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries.
  * 05 Aug 2001 - minor update (Nico Josuttis)
@@ -29,6 +33,8 @@
 #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)  
 # pragma warning(push)  
 # pragma warning(disable:4996) // 'std::equal': Function call with parameters that may be unsafe
+# pragma warning(disable:4510) // boost::array<T,N>' : default constructor could not be generated 
+# pragma warning(disable:4610) // warning C4610: class 'boost::array<T,N>' can never be instantiated - user defined constructor required 
 #endif
 
 #include <cstddef>
@@ -78,6 +84,11 @@ namespace boost {
                                       reference, iterator, reference> > reverse_iterator;
         typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
                                       const_reference, iterator, reference> > const_reverse_iterator;
+#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) 
+        typedef std::reverse_iterator<iterator, std::random_access_iterator_tag, 
+              value_type, reference, iterator, difference_type> reverse_iterator; 
+        typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
+              value_type, const_reference, const_iterator, difference_type> const_reverse_iterator;
 #else
         // workaround for broken reverse_iterator implementations
         typedef std::reverse_iterator<iterator,T> reverse_iterator;
@@ -158,7 +169,8 @@ namespace boost {
         }
 
         // assign one value to all elements
-        void assign (const T& value)
+        void assign (const T& value) { fill ( value ); }    // A synonym for fill
+        void fill   (const T& value)
         {
             std::fill_n(begin(),size(),value);
         }
@@ -166,7 +178,8 @@ namespace boost {
         // check range (may be private because it is static)
         static void rangecheck (size_type i) {
             if (i >= size()) {
-                throw std::out_of_range("array<>: index out of range");
+                std::out_of_range e("array<>: index out of range");
+                boost::throw_exception(e);
             }
         }
 
@@ -202,6 +215,11 @@ namespace boost {
                                       reference, iterator, reference> > reverse_iterator;
         typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
                                       const_reference, iterator, reference> > const_reverse_iterator;
+#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) 
+        typedef std::reverse_iterator<iterator, std::random_access_iterator_tag, 
+              value_type, reference, iterator, difference_type> reverse_iterator; 
+        typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
+              value_type, const_reference, const_iterator, difference_type> const_reverse_iterator;
 #else
         // workaround for broken reverse_iterator implementations
         typedef std::reverse_iterator<iterator,T> reverse_iterator;
@@ -276,12 +294,14 @@ namespace boost {
         }
 
         // assign one value to all elements
-        void assign (const T& ) {   }
-
+        void assign (const T& value) { fill ( value ); }
+        void fill   (const T& ) {}
+        
         // check range (may be private because it is static)
         static reference failed_rangecheck () {
                 std::out_of_range e("attempt to access element of an empty array");
                 boost::throw_exception(e);
+#if defined(BOOST_NO_EXCEPTIONS) || !defined(BOOST_MSVC)
                 //
                 // We need to return something here to keep
                 // some compilers happy: however we will never
@@ -289,6 +309,7 @@ namespace boost {
                 //
                 static T placeholder;
                 return placeholder;
+#endif
             }
     };
 #endif
@@ -325,6 +346,38 @@ namespace boost {
         x.swap(y);
     }
 
+    // Specific for boost::array: simply returns its elems data member.
+    template <typename T, std::size_t N>
+    T(&get_c_array(boost::array<T,N>& arg))[N]
+    {
+        return arg.elems;
+    }
+    
+    // Const version.
+    template <typename T, std::size_t N>
+    const T(&get_c_array(const boost::array<T,N>& arg))[N]
+    {
+        return arg.elems;
+    }
+
+#if 0
+    // Overload for std::array, assuming that std::array will have
+    // explicit conversion functions as discussed at the WG21 meeting
+    // in Summit, March 2009.
+    template <typename T, std::size_t N>
+    T(&get_c_array(std::array<T,N>& arg))[N]
+    {
+        return static_cast<T(&)[N]>(arg);
+    }
+    
+    // Const version.
+    template <typename T, std::size_t N>
+    const T(&get_c_array(const std::array<T,N>& arg))[N]
+    {
+        return static_cast<T(&)[N]>(arg);
+    }
+#endif
+
 } /* namespace boost */
 
 
index 37d01db133ae35712c41eeb748a7112c4bc0fd73..3b098b14f8a71f2cd0dd753f3ba29a092e1d4a0b 100644 (file)
@@ -25,7 +25,7 @@
 namespace
 {
 
-#if defined(__BORLANDC__) || defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 400)
+#if defined(__BORLANDC__) || defined(__GNUC__) && (__GNUC__ < 4)
 
 static inline boost::arg<1> _1() { return boost::arg<1>(); }
 static inline boost::arg<2> _2() { return boost::arg<2>(); }
@@ -38,7 +38,7 @@ static inline boost::arg<8> _8() { return boost::arg<8>(); }
 static inline boost::arg<9> _9() { return boost::arg<9>(); }
 
 #elif defined(BOOST_MSVC) || (defined(__DECCXX_VER) && __DECCXX_VER <= 60590031) || defined(__MWERKS__) || \
-    defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ == 400)  
+    defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ < 2)  
 
 static boost::arg<1> _1;
 static boost::arg<2> _2;
index 12ec2ad77525e1fbe0884d7ce12a275f0fafd16e..7ee3036855c6b5742ee8a63525114f4f28984a9a 100644 (file)
@@ -330,7 +330,16 @@ namespace boost
       {
           f(arg);
       }
-      
+
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+                      && BOOST_WORKAROUND(__GNUC__, > 3)))
+      // Declare a dummy construktor to make gcc happy.
+      // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
+      // (warning: non-static reference "const double& boost::UnaryFunction<YourClassHere>::arg"
+      // in class without a constructor [-Wuninitialized])
+      UnaryFunction();
+#endif
+
       Func f;
       Arg arg;
   };
index 49f424949998caee37c4217f6c3ae50c5b945e9e..3a0e5ae2d7790966b09cc05d0766fea95104ac1d 100644 (file)
@@ -21,7 +21,7 @@
 //  8026 - functions taking class by value arguments are not expanded inline
 
 #pragma nopushoptwarn
-#  pragma option push -Vx -Ve -a8 -b -pc -Vmv -VC- -Vl- -w-8027 -w-8026
+#  pragma option push -a8 -Vx- -Ve- -b- -pc -Vmv -VC- -Vl- -w-8027 -w-8026
 
 
 
index f2eb583f0435111a2ede8d47119448ee63311c27..0d17eb8fea8be7b3120f4b1b27c2b4fc0972f939 100644 (file)
@@ -25,6 +25,9 @@ BOOST_LIB_DIAGNOSTIC:     Optional: when set the header will print out the name
                           of the library selected (useful for debugging).
 BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib,
                           rather than a mangled-name version.
+BOOST_AUTO_LINK_TAGGED:   Specifies that we link to libraries built with the --layout=tagged option.
+                          This is essentially the same as the default name-mangled version, but without
+                          the compiler name and version, or the Boost version.  Just the build options.
 
 These macros will be undef'ed at the end of the header, further this header
 has no include guards - so be sure to include it only once from your library!
@@ -60,6 +63,8 @@ BOOST_LIB_RT_OPT:     A suffix that indicates the runtime library used,
                       a hiphen:
 
                       s      static runtime (dynamic if not present).
+                      g      debug/diagnostic runtime (release if not present).
+                      y      Python debug/diagnostic runtime (release if not present).
                       d      debug build (release if not present).
                       g      debug/diagnostic runtime (release if not present).
                       p      STLPort Build.
@@ -183,8 +188,16 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 
 #     if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
 
-#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
+#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#            define BOOST_LIB_RT_OPT "-gydp"
+#        elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
 #            define BOOST_LIB_RT_OPT "-gdp"
+#        elif defined(_DEBUG)\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#            define BOOST_LIB_RT_OPT "-gydp"
+#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
+#            error "Build options aren't compatible with pre-built libraries"
 #        elif defined(_DEBUG)
 #            define BOOST_LIB_RT_OPT "-gdp"
 #            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
@@ -195,8 +208,16 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 
 #     elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
 
-#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
+#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#            define BOOST_LIB_RT_OPT "-gydpn"
+#        elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
 #            define BOOST_LIB_RT_OPT "-gdpn"
+#        elif defined(_DEBUG)\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#            define BOOST_LIB_RT_OPT "-gydpn"
+#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
+#            error "Build options aren't compatible with pre-built libraries"
 #        elif defined(_DEBUG)
 #            define BOOST_LIB_RT_OPT "-gdpn"
 #            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
@@ -207,7 +228,9 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 
 #     else
 
-#        if defined(_DEBUG)
+#        if defined(_DEBUG) && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#            define BOOST_LIB_RT_OPT "-gyd"
+#        elif defined(_DEBUG)
 #            define BOOST_LIB_RT_OPT "-gd"
 #        else
 #            define BOOST_LIB_RT_OPT
@@ -219,8 +242,16 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 
 #     if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
 
-#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
+#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#            define BOOST_LIB_RT_OPT "-sgydp"
+#        elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
 #            define BOOST_LIB_RT_OPT "-sgdp"
+#        elif defined(_DEBUG)\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#             define BOOST_LIB_RT_OPT "-sgydp"
+#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
+#            error "Build options aren't compatible with pre-built libraries"
 #        elif defined(_DEBUG)
 #             define BOOST_LIB_RT_OPT "-sgdp"
 #            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
@@ -231,8 +262,16 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 
 #     elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
 
-#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
+#        if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#            define BOOST_LIB_RT_OPT "-sgydpn"
+#        elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
 #            define BOOST_LIB_RT_OPT "-sgdpn"
+#        elif defined(_DEBUG)\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#             define BOOST_LIB_RT_OPT "-sgydpn"
+#            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
+#            error "Build options aren't compatible with pre-built libraries"
 #        elif defined(_DEBUG)
 #             define BOOST_LIB_RT_OPT "-sgdpn"
 #            pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
@@ -243,7 +282,10 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 
 #     else
 
-#        if defined(_DEBUG)
+#        if defined(_DEBUG)\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#             define BOOST_LIB_RT_OPT "-sgyd"
+#        elif defined(_DEBUG)
 #             define BOOST_LIB_RT_OPT "-sgd"
 #        else
 #            define BOOST_LIB_RT_OPT "-s"
@@ -270,16 +312,26 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 
 #  ifdef _RTLDLL
 
-#     ifdef BOOST_BORLAND_DEBUG
+#     if defined(BOOST_BORLAND_DEBUG)\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#         define BOOST_LIB_RT_OPT "-yd"
+#     elif defined(BOOST_BORLAND_DEBUG)
 #         define BOOST_LIB_RT_OPT "-d"
+#     elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#         define BOOST_LIB_RT_OPT -y
 #     else
 #         define BOOST_LIB_RT_OPT
 #     endif
 
 #  else
 
-#     ifdef BOOST_BORLAND_DEBUG
+#     if defined(BOOST_BORLAND_DEBUG)\
+               && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#         define BOOST_LIB_RT_OPT "-syd"
+#     elif defined(BOOST_BORLAND_DEBUG)
 #         define BOOST_LIB_RT_OPT "-sd"
+#     elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+#         define BOOST_LIB_RT_OPT "-sy"
 #     else
 #         define BOOST_LIB_RT_OPT "-s"
 #     endif
@@ -309,16 +361,21 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
       && defined(BOOST_LIB_RT_OPT) \
       && defined(BOOST_LIB_VERSION)
 
-#ifndef BOOST_AUTO_LINK_NOMANGLE
-#  pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
+#ifdef BOOST_AUTO_LINK_TAGGED
+#  pragma commentcomment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
 #  ifdef BOOST_LIB_DIAGNOSTIC
 #     pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
 #  endif
-#else
+#elif defined(BOOST_AUTO_LINK_NOMANGLE)
 #  pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
 #  ifdef BOOST_LIB_DIAGNOSTIC
 #     pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
 #  endif
+#else
+#  pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
+#  ifdef BOOST_LIB_DIAGNOSTIC
+#     pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
+#  endif
 #endif
 
 #else
@@ -361,13 +418,3 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 #  undef BOOST_AUTO_LINK_NOMANGLE
 #endif
 
-
-
-
-
-
-
-
-
-
-
index 6a7b988d166b9edfbebc4c25a024992d5ee406ae..bd3a8c3f3fef644fb15e1e29e1997dc567ccf305 100644 (file)
 //
 // check for exception handling support:
 //
-#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS)
+#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
 #  define BOOST_NO_EXCEPTIONS
 #endif
 //
 //
 // all versions support __declspec:
 //
-#ifndef __STRICT_ANSI__
-#  define BOOST_HAS_DECLSPEC
+#if defined(__STRICT_ANSI__)
+// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined  
+#  define BOOST_SYMBOL_EXPORT
 #endif
 //
 // ABI fixing headers:
 #  define BOOST_NO_VOID_RETURNS
 #endif
 
+// Borland did not implement value-initialization completely, as I reported
+// in 2007, Borland Report 51854, "Value-initialization: POD struct should be
+// zero-initialized", http://qc.embarcadero.com/wc/qcmain.aspx?d=51854
+// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
+// (Niels Dekker, LKEB, April 2010)
+#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+
 #define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)
 
 
index 698624ece2971f946149f87c322420f9d27ed845..f6dc4c02ba224598f7d0e42a22112f9fe7ad8043 100644 (file)
@@ -19,8 +19,8 @@
 #endif
 //
 // versions check:
-// last known and checked version is 0x620
-#if (__CODEGEARC__ > 0x620)
+// last known and checked version is 0x621
+#if (__CODEGEARC__ > 0x621)
 #  if defined(BOOST_ASSERT_CONFIG)
 #     error "Unknown compiler version - please run the configure tests and report the results"
 #  else
@@ -41,7 +41,7 @@
 #endif
 
 // CodeGear C++ Builder 2010
-#if (__CODEGEARC__ <= 0x620)
+#if (__CODEGEARC__ <= 0x621)
 #  define BOOST_NO_TYPENAME_WITH_CTOR    // Cannot use typename keyword when making temporaries of a dependant type
 #  define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
 #  define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
 // Temporary hack, until specific MPL preprocessed headers are generated
 #  define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
 
+// CodeGear has not yet completely implemented value-initialization, for
+// example for array types, as I reported in 2010: Embarcadero Report 83751,
+// "Value-initialization: arrays should have each element value-initialized",
+// http://qc.embarcadero.com/wc/qcmain.aspx?d=83751
+// Last checked version: Embarcadero C++ 6.21
+// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
+// (Niels Dekker, LKEB, April 2010)
+#  define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+
 #  ifdef NDEBUG
       // fix broken <cstring> so that Boost.test works:
 #     include <cstring>
 //
 // C++0x macros:
 //
+#if (__CODEGEARC__ <= 0x620)
+#define BOOST_NO_STATIC_ASSERT
+#else
+#define BOOST_HAS_STATIC_ASSERT
+#endif
 #define BOOST_HAS_CHAR16_T
 #define BOOST_HAS_CHAR32_T
 #define BOOST_HAS_LONG_LONG
 #define BOOST_NO_RAW_LITERALS
 #define BOOST_NO_RVALUE_REFERENCES
 #define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_STATIC_ASSERT
 #define BOOST_NO_TEMPLATE_ALIASES
 #define BOOST_NO_UNICODE_LITERALS
 #define BOOST_NO_VARIADIC_TEMPLATES
 //
 // check for exception handling support:
 //
-#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS)
+#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
 #  define BOOST_NO_EXCEPTIONS
 #endif
 //
 //
 // all versions support __declspec:
 //
-#if !defined(__STRICT_ANSI__)
-#  define BOOST_HAS_DECLSPEC
+#if defined(__STRICT_ANSI__)
+// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined  
+#  define BOOST_SYMBOL_EXPORT
 #endif
 //
 // ABI fixing headers:
index 9dc4cef8eb5b31478cd61bde8e68be2715dc9d81..cb283376e159eb554205c29e3e8e073b5e4ff153 100644 (file)
@@ -44,7 +44,7 @@
 #endif 
 
 // See also kai.hpp which checks a Kai-specific symbol for EH
-# if !defined(__KCC) && !defined(__EXCEPTIONS)
+# if !defined(__KCC) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
 #     define BOOST_NO_EXCEPTIONS
 # endif
 
@@ -59,6 +59,9 @@
 //
 //   See above for BOOST_NO_LONG_LONG
 //
+#if (__EDG_VERSION__ < 310)
+#  define BOOST_NO_EXTERN_TEMPLATE
+#endif
 #if (__EDG_VERSION__ <= 310) || !defined(BOOST_STRICT_CONFIG)
 // No support for initializer lists
 #  define BOOST_NO_INITIALIZER_LISTS
@@ -74,7 +77,6 @@
 #define BOOST_NO_DEFAULTED_FUNCTIONS
 #define BOOST_NO_DELETED_FUNCTIONS
 #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_EXTERN_TEMPLATE
 #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
 #define BOOST_NO_LAMBDAS
 #define BOOST_NO_NULLPTR
index a01b4c28ec48231c517a132b8a409cba77d835d6..bd37d2f1c215d60d8f97f6ae8601870f11ad5e13 100644 (file)
@@ -51,7 +51,7 @@
 
 
 // check for exception handling support:
-#ifndef _CPPUNWIND
+#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)
 #  define BOOST_NO_EXCEPTIONS
 #endif
 
index 6cae94cae679ef7f8705fce838613f1946477930..54f1bb9882b0032bb67c2326340de37b2d4f09da 100644 (file)
@@ -42,6 +42,7 @@
 #   define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
 #   define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
 #   define BOOST_NO_IS_ABSTRACT
+#   define BOOST_NO_EXTERN_TEMPLATE
 #elif __GNUC__ == 3
 #  if defined (__PATHSCALE__)
 #     define BOOST_NO_TWO_PHASE_NAME_LOOKUP
@@ -58,6 +59,7 @@
 #  if __GNUC_MINOR__ < 4
 #     define BOOST_NO_IS_ABSTRACT
 #  endif
+#  define BOOST_NO_EXTERN_TEMPLATE
 #endif
 #if __GNUC__ < 4
 //
 #  endif
 #endif
 
-#ifndef __EXCEPTIONS
+#if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )
+// Previous versions of GCC did not completely implement value-initialization:
+// GCC Bug 30111, "Value-initialization of POD base class doesn't initialize
+// members", reported by Jonathan Wakely in 2006,
+// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4)
+// GCC Bug 33916, "Default constructor fails to initialize array members",
+// reported by Michael Elizabeth Chastain in 2007,
+// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4)
+// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
+#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+#endif
+
+#if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
 # define BOOST_NO_EXCEPTIONS
 #endif
 
 #if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 )
 #define BOOST_HAS_NRVO
 #endif
+
+//
+// Dynamic shared object (DSO) and dynamic-link library (DLL) support
+//
+#if __GNUC__ >= 4
+#  if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+     // All Win32 development environments, including 64-bit Windows and MinGW, define 
+     // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment,
+     // so does not define _WIN32 or its variants.
+#    define BOOST_HAS_DECLSPEC
+#    define BOOST_SYMBOL_EXPORT __attribute__((dllexport))
+#    define BOOST_SYMBOL_IMPORT __attribute__((dllimport))
+#  else
+#    define BOOST_SYMBOL_EXPORT __attribute__((visibility("default")))
+#    define BOOST_SYMBOL_IMPORT
+#  endif
+#  define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default")))
+#else
+// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined  
+#  define BOOST_SYMBOL_EXPORT
+#endif
+
 //
 // RTTI and typeinfo detection is possible post gcc-4.3:
 //
 #if __GNUC__ * 100 + __GNUC_MINOR__ >= 403
 #  ifndef __GXX_RTTI
-#     define BOOST_NO_TYPEID
-#     define BOOST_NO_RTTI
+#     ifndef BOOST_NO_TYPEID
+#        define BOOST_NO_TYPEID
+#     endif
+#     ifndef BOOST_NO_RTTI
+#        define BOOST_NO_RTTI
+#     endif
 #  endif
 #endif
 
 // C++0x features not implemented in any GCC version
 //
 #define BOOST_NO_CONSTEXPR
-#define BOOST_NO_EXTERN_TEMPLATE
-#define BOOST_NO_LAMBDAS
 #define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
 #define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
 
 // C++0x features in 4.3.n and later
 //
 //
 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
 #  define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#  define BOOST_NO_LAMBDAS
+#  define BOOST_NO_RAW_LITERALS
+#  define BOOST_NO_UNICODE_LITERALS
 #endif
 
 // ConceptGCC compiler:
index 5dd67c760402aa46a30ff5fbf628e71ca0e3a7c0..7f884b19cef9836367e5074a6696f3d0ebc4be43 100644 (file)
 //
 #define BOOST_HAS_LONG_LONG
 
+// C++0x features:
+//
+#  define BOOST_NO_CONSTEXPR
+#  define BOOST_NO_NULLPTR
+#  define BOOST_NO_TEMPLATE_ALIASES
+#  define BOOST_NO_DECLTYPE
+#  define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#  define BOOST_NO_RVALUE_REFERENCES
+#  define BOOST_NO_STATIC_ASSERT
+#  define BOOST_NO_VARIADIC_TEMPLATES
+#  define BOOST_NO_AUTO_DECLARATIONS
+#  define BOOST_NO_AUTO_MULTIDECLARATIONS
+#  define BOOST_NO_CHAR16_T
+#  define BOOST_NO_CHAR32_T
+#  define BOOST_NO_DEFAULTED_FUNCTIONS
+#  define BOOST_NO_DELETED_FUNCTIONS
+#  define BOOST_NO_INITIALIZER_LISTS
+#  define BOOST_NO_SCOPED_ENUMS  
+#  define BOOST_NO_SFINAE_EXPR
+#  define BOOST_NO_SCOPED_ENUMS
+#  define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#  define BOOST_NO_LAMBDAS
+#  define BOOST_NO_RAW_LITERALS
+#  define BOOST_NO_UNICODE_LITERALS
+
 #define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__
 
 
index 531242e9642b28258673cb5b68e3756e21e11b14..e7bc95babf7136d5c64e1bc6351b7bfd5c6f1504 100644 (file)
@@ -157,6 +157,29 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
 #  define BOOST_NO_TWO_PHASE_NAME_LOOKUP
 #endif
 
+//
+// An attempt to value-initialize a pointer-to-member may trigger an
+// internal error on Intel <= 11.1 (last checked version), as was 
+// reported by John Maddock, Intel support issue 589832, May 2010.
+// Moreover, according to test results from Huang-Vista-x86_32_intel,
+// intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some 
+// cases when it should be value-initialized.
+// (Niels Dekker, LKEB, May 2010)
+#if defined(__INTEL_COMPILER)
+#  if __INTEL_COMPILER <= 1110
+#    define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+#  endif
+#endif
+
+//
+// Dynamic shared object (DSO) and dynamic-link library (DLL) support
+//
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+#  define BOOST_SYMBOL_EXPORT __attribute__((visibility("default")))
+#  define BOOST_SYMBOL_IMPORT
+#  define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default")))
+#endif
+
 //
 // last known and checked version:
 #if (BOOST_INTEL_CXX_VERSION > 1110)
index ea06f9f4d06741dddbd4d7e5f7e47dcd9b8267c9..2337e6a8dd52888c6809bc2c37a364d6f74dc88a 100644 (file)
@@ -17,7 +17,7 @@
 #   endif
 
 // see also common_edg.hpp which needs a special check for __KCC
-# if !defined(_EXCEPTIONS)
+# if !defined(_EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
 #     define BOOST_NO_EXCEPTIONS
 # endif
 
index aeba7f805c82fae5bd44b452ca6c75654161f75f..3bc9d97555ca8c182d665ed91f7f669e98d62189 100644 (file)
@@ -48,7 +48,7 @@
 #   define BOOST_NO_INTRINSIC_WCHAR_T
 #endif
 
-#if !__option(exceptions)
+#if !__option(exceptions) && !defined(BOOST_NO_EXCEPTIONS)
 #   define BOOST_NO_EXCEPTIONS
 #endif
 
index e40553efc04e18d3775f64cdbcbcdd9baaa82628..1c7c84b70c90bcb03df25bd78e5a8df9c9638bf8 100644 (file)
 // if no threading API is detected.
 //
 
-#if (__PGIC__ >= 7)
+// PGI 10.x doesn't seem to define __PGIC__
+
+// versions earlier than 10.x do define __PGIC__
+#if __PGIC__ >= 10
+
+// options requested by configure --enable-test
+#define BOOST_HAS_PTHREADS
+#define BOOST_HAS_NRVO
+#define BOOST_HAS_LONG_LONG
+
+// options --enable-test wants undefined
+#undef BOOST_NO_STDC_NAMESPACE
+#undef BOOST_NO_EXCEPTION_STD_NAMESPACE
+#undef BOOST_DEDUCED_TYPENAME
+
+#elif __PGIC__ >= 7
 
 #define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL 
 #define BOOST_NO_TWO_PHASE_NAME_LOOKUP
 #define BOOST_NO_SWPRINTF
+#define BOOST_NO_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_AUTO_DECLARATIONS
 
 #else
 
@@ -32,8 +49,6 @@
 //
 //   See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
 //
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
 #define BOOST_NO_CHAR16_T
 #define BOOST_NO_CHAR32_T
 #define BOOST_NO_CONCEPTS
index f5184887f11ece05b826b4b8a020384afae34019..aca49fa04a5f0b0cf606b436117168692f669c30 100644 (file)
 #      define BOOST_NO_IS_ABSTRACT
 #    endif
 
+#    if (__SUNPRO_CC <= 0x5100)
+       // Sun 5.10 may not correctly value-initialize objects of
+       // some user defined types, as was reported in April 2010
+       // (CR 6947016), and confirmed by Steve Clamage.
+       // (Niels Dekker, LKEB, May 2010).
+#      define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+#    endif
+
+//
+// Dynamic shared object (DSO) and dynamic-link library (DLL) support
+//
+#if __SUNPRO_CC > 0x500
+#  define BOOST_SYMBOL_EXPORT __global
+#  define BOOST_SYMBOL_IMPORT __global
+#  define BOOST_SYMBOL_VISIBLE __global
+#endif
+
+
+
 //
 // Issues that effect all known versions:
 //
 //
 // C++0x features
 //
-
-#if(__SUNPRO_CC >= 0x590) 
 #  define BOOST_HAS_LONG_LONG
-#else
-#  define BOOST_NO_LONG_LONG
-#endif
 
 #define BOOST_NO_AUTO_DECLARATIONS
 #define BOOST_NO_AUTO_MULTIDECLARATIONS
index 01956d3a7026142a68581747587bbc851595482b..e5b6971145571b3245c74b2e200cff19576b2483 100644 (file)
 #  define BOOST_NO_INITIALIZER_LISTS
 #endif
 
+#if (__IBMCPP__ <= 1110)
+// XL C++ V11.1 and earlier versions may not always value-initialize  
+// a temporary object T(), when T is a non-POD aggregate class type. 
+// Michael Wong (IBM Canada Ltd) has confirmed this issue and gave it 
+// high priority. -- Niels Dekker (LKEB), May 2010.
+#  define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+#endif
+
 //
 // On AIX thread support seems to be indicated by _THREAD_SAFE:
 //
index 990901f0489871fbba8854700befdc4f53785955..a862570f59877632115717f12065214957ba39b5 100644 (file)
@@ -79,6 +79,8 @@
 // although a conforming signature for swprint exists in VC7.1
 // it appears not to actually work:
 #  define BOOST_NO_SWPRINTF
+// Our extern template tests also fail for this compiler:
+#  define BOOST_NO_EXTERN_TEMPLATE
 #endif
 
 #if defined(UNDER_CE)
 #  define BOOST_NO_ADL_BARRIER
 #endif
 
+
+#if (_MSC_VER <= 1600)
+// MSVC (including the latest checked version) has not yet completely 
+// implemented value-initialization, as is reported:
+// "VC++ does not value-initialize members of derived classes without 
+// user-declared constructor", reported in 2009 by Sylvester Hesp:
+// https://connect.microsoft.com/VisualStudio/feedback/details/484295
+// "Presence of copy constructor breaks member class initialization",
+// reported in 2009 by Alex Vakulenko:
+// https://connect.microsoft.com/VisualStudio/feedback/details/499606
+// "Value-initialization in new-expression", reported in 2005 by
+// Pavel Kuznetsov (MetaCommunications Engineering):
+// https://connect.microsoft.com/VisualStudio/feedback/details/100744
+// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
+// (Niels Dekker, LKEB, May 2010)
+#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+#endif
+
 #if _MSC_VER <= 1500  || !defined(BOOST_STRICT_CONFIG) // 1500 == VC++ 9.0
 #  define BOOST_NO_INITIALIZER_LISTS
 #endif
 
 //   
 // check for exception handling support:   
-#ifndef _CPPUNWIND 
+#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)
 #  define BOOST_NO_EXCEPTIONS   
 #endif 
 
 #if (_MSC_VER >= 1200)
 #   define BOOST_HAS_MS_INT64
 #endif
-#if (_MSC_VER >= 1310) && (defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1500))
+#if (_MSC_VER >= 1310) && (defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400))
 #   define BOOST_HAS_LONG_LONG
 #else
 #   define BOOST_NO_LONG_LONG
 #  define BOOST_NO_RTTI
 #endif
 
-//
-// all versions support __declspec:
-//
-#define BOOST_HAS_DECLSPEC
-
 //
 // C++0x features
 //
 #if _MSC_VER < 1600
 #define BOOST_NO_AUTO_DECLARATIONS
 #define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_DECLTYPE
 #define BOOST_NO_LAMBDAS
 #define BOOST_NO_RVALUE_REFERENCES
 #define BOOST_NO_STATIC_ASSERT
+#define BOOST_NO_NULLPTR
 #endif // _MSC_VER < 1600
+#if _MSC_VER >= 1600
+#define BOOST_HAS_STDINT_H
+#endif
 
 // C++0x features not supported by any versions
 #define BOOST_NO_CHAR16_T
 #define BOOST_NO_CONCEPTS
 #define BOOST_NO_CONSTEXPR
 #define BOOST_NO_DEFAULTED_FUNCTIONS
+#define BOOST_NO_DECLTYPE
 #define BOOST_NO_DELETED_FUNCTIONS
 #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_EXTERN_TEMPLATE
 #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
 #define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_NULLPTR
 #define BOOST_NO_RAW_LITERALS
 #define BOOST_NO_SCOPED_ENUMS
 #define BOOST_NO_SFINAE_EXPR
 #define BOOST_NO_TEMPLATE_ALIASES
 #define BOOST_NO_UNICODE_LITERALS
 #define BOOST_NO_VARIADIC_TEMPLATES
-
 //
 // prefix and suffix headers:
 //
index 41fcaa10c78dfa67b093d7d297b2dacda1d3820f..5627dd60fb5230cb3f2aefc2fd76d899ec8fe64f 100644 (file)
@@ -8,9 +8,6 @@
 //  cygwin specific config options:
 
 #define BOOST_PLATFORM "Cygwin"
-#define BOOST_NO_CWCTYPE
-#define BOOST_NO_CWCHAR
-#define BOOST_NO_SWPRINTF
 #define BOOST_HAS_DIRENT_H
 #define BOOST_HAS_LOG1P
 #define BOOST_HAS_EXPM1
index 9344818f87a4feebaa0c52408a48a5d08a77887e..f59c4ea79ef9f9d7b94c830f040a23295e267bf7 100644 (file)
 #  define BOOST_NO_SWPRINTF
 #endif
 
-#if !defined(__GNUC__) && !defined(BOOST_HAS_DECLSPEC)
+//  Default defines for BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_IMPORT
+//  If a compiler doesn't support __declspec(dllexport)/__declspec(dllimport),
+//  its boost/config/compiler/ file must define BOOST_SYMBOL_EXPORT and
+//  BOOST_SYMBOL_IMPORT
+#ifndef BOOST_SYMBOL_EXPORT
 #  define BOOST_HAS_DECLSPEC
+#  define BOOST_SYMBOL_EXPORT __declspec(dllexport)
+#  define BOOST_SYMBOL_IMPORT __declspec(dllimport)
 #endif
 
+
 #if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0)))
 #  define BOOST_HAS_STDINT_H
 #  define __STDC_LIMIT_MACROS
index 9141cd6376ac10b1de03dfa391393276a3fe1cc6..f9b086ad43732905dc42b5b964df6d68ac11b332 100644 (file)
@@ -15,6 +15,7 @@
 // compilers we support:
 
 #   define BOOST_CXX_GCCXML   0
+#   define BOOST_CXX_CLANG    0
 #   define BOOST_CXX_COMO     0
 #   define BOOST_CXX_DMC      0
 #   define BOOST_CXX_INTEL    0
@@ -31,6 +32,7 @@
 #   define BOOST_CXX_IBMCPP   0
 #   define BOOST_CXX_MSVC     0
 #   define BOOST_CXX_PGI      0
+#   define BOOST_CXX_NVCC     0
 
 
 // locate which compiler we are using and define
 // GCC-XML emulates other compilers, it has to appear first here!
 #   define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp"
 
+#elif defined __CUDACC__
+//  NVIDIA CUDA C++ compiler for GPU
+#   define BOOST_COMPILER_CONFIG "boost/config/compiler/nvcc.hpp"
+
 #elif defined __COMO__
 //  Comeau C++
 #   define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"
 
+#elif defined __clang__
+//  Clang C++ emulates GCC, so it has to appear early.
+#   define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp"
+
 #elif defined __DMC__
 //  Digital Mars C++
 #   define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp"
index 615bb064ff8c3baad511f095764d85aed9d05e56..8606e12edf7a29faa6d3cb3b05b29a61941b1bd7 100644 (file)
 // vxWorks:
 #  define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp"
 
+#elif defined(__SYMBIAN32__) 
+// Symbian: 
+#  define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp" 
+
 #else
 
 #  if defined(unix) \
index ab770599a7da27da9dab8102e49c87a3d7b07301..ea8faf14d0ebf00d16c5b57a1e4f7532b8d89537 100644 (file)
 #  define BOOST_NO_STD_LOCALE
 #endif
 
+#include <typeinfo>
+#if !_HAS_EXCEPTIONS
+#  define BOOST_NO_STD_TYPEINFO    
+#endif  
+
 //  C++0x headers implemented in 520 (as shipped by Microsoft)
 //
 #if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520
 #  define BOOST_NO_STD_UNORDERED        // deprecated; see following
 #  define BOOST_NO_0X_HDR_UNORDERED_MAP
 #  define BOOST_NO_0X_HDR_UNORDERED_SET
+#  define BOOST_NO_0X_HDR_TUPLE
+#  define BOOST_NO_0X_HDR_TYPEINDEX
+#endif
+
+#if !defined(_HAS_TR1_IMPORTS) && !defined(BOOST_NO_0X_HDR_TUPLE)
+#  define BOOST_NO_0X_HDR_TUPLE
 #endif
 
 //  C++0x headers not yet implemented
 #  define BOOST_NO_0X_HDR_MUTEX
 #  define BOOST_NO_0X_HDR_RATIO
 #  define BOOST_NO_0X_HDR_THREAD
-#  define BOOST_NO_0X_HDR_TUPLE
 
 #ifdef _CPPLIB_VER
 #  define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER
index 06731e32e7053dfb8910b27e5d6f2687c4fcfa35..97a39f3ed8f0ea4bbd9e716ccc4c90487e5eec21 100644 (file)
@@ -54,6 +54,7 @@
 #  define BOOST_NO_0X_HDR_THREAD
 #  define BOOST_NO_0X_HDR_TUPLE
 #  define BOOST_NO_0X_HDR_TYPE_TRAITS
+#  define BOOST_NO_0X_HDR_TYPEINDEX
 #  define BOOST_NO_STD_UNORDERED        // deprecated; see following
 #  define BOOST_NO_0X_HDR_UNORDERED_MAP
 #  define BOOST_NO_0X_HDR_UNORDERED_SET
index 6a57319ffd267a15ac5f4b4c9814e251aa24937d..815d605cc37ffe00ca0e8c8d0d643988f4c1dead 100644 (file)
 #  define BOOST_NO_0X_HDR_FUTURE
 #  define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
 #  define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
+#  define BOOST_NO_0X_HDR_TYPEINDEX
 
 //  --- end ---
index 7bd50cecb7c51986fb8b564e0a91619e792e225c..10792cdac21378b484e22f27db633443f1f60d98 100644 (file)
@@ -43,6 +43,7 @@
 #  define BOOST_NO_0X_HDR_THREAD
 #  define BOOST_NO_0X_HDR_TUPLE
 #  define BOOST_NO_0X_HDR_TYPE_TRAITS
+#  define BOOST_NO_0X_HDR_TYPEINDEX
 #  define BOOST_NO_STD_UNORDERED        // deprecated; see following
 #  define BOOST_NO_0X_HDR_UNORDERED_MAP
 #  define BOOST_NO_0X_HDR_UNORDERED_SET
index 6bcd232a57350e13a802774c3816d675e5d7cd76..beb15de6856da8abbe25e1e1f6e2bb1693693f1c 100644 (file)
@@ -67,6 +67,7 @@
 #  define BOOST_NO_0X_HDR_THREAD
 #  define BOOST_NO_0X_HDR_TUPLE
 #  define BOOST_NO_0X_HDR_TYPE_TRAITS
+#  define BOOST_NO_0X_HDR_TYPEINDEX
 #  define BOOST_NO_STD_UNORDERED        // deprecated; see following
 #  define BOOST_NO_0X_HDR_UNORDERED_MAP
 #  define BOOST_NO_0X_HDR_UNORDERED_SET
index cba2f54a1a0a2d02f942f460e68ad6da0c3b9027..830c32ef613b1f714de5e02ba94653239dd8a5ab 100644 (file)
 #  define BOOST_NO_0X_HDR_THREAD
 #  define BOOST_NO_0X_HDR_TUPLE
 #  define BOOST_NO_0X_HDR_TYPE_TRAITS
+#  define BOOST_NO_0X_HDR_TYPEINDEX
 #  define BOOST_NO_STD_UNORDERED        // deprecated; see following
 #  define BOOST_NO_0X_HDR_UNORDERED_MAP
 #  define BOOST_NO_0X_HDR_UNORDERED_SET
index c505008b7d77d5e6603011184db0361506a629b3..293886bcb4b3c3446590af64bc0864c3adc9a2aa 100644 (file)
 #  define BOOST_NO_0X_HDR_THREAD
 #  define BOOST_NO_0X_HDR_TUPLE
 #  define BOOST_NO_0X_HDR_TYPE_TRAITS
+#  define BOOST_NO_0X_HDR_TYPEINDEX
 #  define BOOST_NO_STD_UNORDERED        // deprecated; see following
 #  define BOOST_NO_0X_HDR_UNORDERED_MAP
 #  define BOOST_NO_0X_HDR_UNORDERED_SET
index 3dfd529effb940a797959b23cc5a5c035fd87c7b..bb6fe134c7dbb2ab6522a972ca1784ec3ce0c76d 100644 (file)
@@ -221,6 +221,7 @@ namespace boost { using std::min; using std::max; }
 #  define BOOST_NO_0X_HDR_THREAD
 #  define BOOST_NO_0X_HDR_TUPLE
 #  define BOOST_NO_0X_HDR_TYPE_TRAITS
+#  define BOOST_NO_0X_HDR_TYPEINDEX
 #  define BOOST_NO_STD_UNORDERED        // deprecated; see following
 #  define BOOST_NO_0X_HDR_UNORDERED_MAP
 #  define BOOST_NO_0X_HDR_UNORDERED_SET
index c8d6d5ad697e66fb353ad18c7377962534deeb6f..3504971fb49462b5feb28ad9dda74ba7803740d9 100644 (file)
@@ -33,6 +33,7 @@
 #  define BOOST_NO_0X_HDR_THREAD
 #  define BOOST_NO_0X_HDR_TUPLE
 #  define BOOST_NO_0X_HDR_TYPE_TRAITS
+#  define BOOST_NO_0X_HDR_TYPEINDEX
 #  define BOOST_NO_STD_UNORDERED        // deprecated; see following
 #  define BOOST_NO_0X_HDR_UNORDERED_MAP
 #  define BOOST_NO_0X_HDR_UNORDERED_SET
index fa44986946cb70aa3fc589ea6d829da072ad8a9b..3408d22588d1e1cef1a61c1424c70ef254f9c746 100644 (file)
@@ -8,7 +8,7 @@
 //  Copyright (c) 2002-2003 David Abrahams
 //  Copyright (c) 2003 Gennaro Prota
 //  Copyright (c) 2003 Eric Friedman
-//
+//  Copyright (c) 2010 Eric Jourdanneau, Joel Falcou
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 #ifndef BOOST_CONFIG_SUFFIX_HPP
 #define BOOST_CONFIG_SUFFIX_HPP
 
+//
+// ensure that visibility macros are always defined, thus symplifying use
+//
+#ifndef BOOST_SYMBOL_EXPORT
+# define BOOST_SYMBOL_EXPORT
+#endif
+#ifndef BOOST_SYMBOL_IMPORT
+# define BOOST_SYMBOL_IMPORT
+#endif
+#ifndef BOOST_SYMBOL_VISIBLE
+# define BOOST_SYMBOL_VISIBLE
+#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_NO_LONG_LONG_NUMERIC_LIMITS
 #endif
 
+//
+// Normalize BOOST_NO_STATIC_ASSERT and (depricated) BOOST_HAS_STATIC_ASSERT:
+//
+#if !defined(BOOST_NO_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT)
+#  define BOOST_HAS_STATIC_ASSERT
+#endif
+
 //
 // if there is no __int64 then there is no specialisation
 // for numeric_limits<__int64> either:
 #  define BOOST_NO_INITIALIZER_LISTS
 #endif
 
+//
+// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_RVALUE_REFERENCES is not defined
+//
+#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS)
+#define BOOST_HAS_RVALUE_REFS
+#endif
+
 //  BOOST_HAS_ABI_HEADERS
 //  This macro gets set if we have headers that fix the ABI,
 //  and prevent ODR violations when linking to external libraries:
@@ -554,6 +581,12 @@ namespace boost{
 
 #endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
 
+// When BOOST_NO_STD_TYPEINFO is defined, we can just import
+// the global definition into std namespace:
+#ifdef BOOST_NO_STD_TYPEINFO
+#include <typeinfo>
+namespace std{ using ::typeinfo; }
+#endif
 
 // ---------------------------------------------------------------------------//
 
@@ -596,6 +629,11 @@ namespace boost{
 #     endif
 #  endif
 
+//
+// Set some default values GPU support
+//
+#  ifndef BOOST_GPU_ENABLED
+#  define BOOST_GPU_ENABLED 
+#  endif
 #endif
 
-
index 47e6a160c6c50829233f18a6b4ac97cf3d0f1664..ee55e6983adc7c685f76e20a48ba6a25a7b57393 100644 (file)
@@ -366,58 +366,87 @@ INT#_C macros if they're not already defined (John Maddock).
 
 ******************************************************/
 
-#if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && !defined(INT8_C)
+#if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \
+   (!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C))
+//
+// For the following code we get several warnings along the lines of: 
+// 
+// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant 
+// 
+// So we declare this a system header to suppress these warnings. 
+//
+#if defined(__GNUC__) && (__GNUC__ >= 4) 
+#pragma GCC system_header 
+#endif 
+
 #include <limits.h>
 # define BOOST__STDC_CONSTANT_MACROS_DEFINED
 # if defined(BOOST_HAS_MS_INT64)
 //
 // Borland/Intel/Microsoft compilers have width specific suffixes:
 //
+#ifndef INT8_C
 #  define INT8_C(value)     value##i8
+#endif
+#ifndef INT16_C
 #  define INT16_C(value)    value##i16
+#endif
+#ifndef INT32_C
 #  define INT32_C(value)    value##i32
+#endif
+#ifndef INT64_C
 #  define INT64_C(value)    value##i64
+#endif
 #  ifdef __BORLANDC__
     // Borland bug: appending ui8 makes the type a signed char
 #   define UINT8_C(value)    static_cast<unsigned char>(value##u)
 #  else
 #   define UINT8_C(value)    value##ui8
 #  endif
+#ifndef UINT16_C
 #  define UINT16_C(value)   value##ui16
+#endif
+#ifndef UINT32_C
 #  define UINT32_C(value)   value##ui32
+#endif
+#ifndef UINT64_C
 #  define UINT64_C(value)   value##ui64
+#endif
+#ifndef INTMAX_C
 #  define INTMAX_C(value)   value##i64
 #  define UINTMAX_C(value)  value##ui64
+#endif
 
 # else
 //  do it the old fashioned way:
 
 //  8-bit types  ------------------------------------------------------------//
 
-#  if UCHAR_MAX == 0xff
+#  if (UCHAR_MAX == 0xff) && !defined(INT8_C)
 #   define INT8_C(value) static_cast<boost::int8_t>(value)
 #   define UINT8_C(value) static_cast<boost::uint8_t>(value##u)
 #  endif
 
 //  16-bit types  -----------------------------------------------------------//
 
-#  if USHRT_MAX == 0xffff
+#  if (USHRT_MAX == 0xffff) && !defined(INT16_C)
 #   define INT16_C(value) static_cast<boost::int16_t>(value)
 #   define UINT16_C(value) static_cast<boost::uint16_t>(value##u)
 #  endif
 
 //  32-bit types  -----------------------------------------------------------//
-
-#  if UINT_MAX == 0xffffffff
+#ifndef INT32_C
+#  if (UINT_MAX == 0xffffffff)
 #   define INT32_C(value) value
 #   define UINT32_C(value) value##u
 #  elif ULONG_MAX == 0xffffffff
 #   define INT32_C(value) value##L
 #   define UINT32_C(value) value##uL
 #  endif
+#endif
 
 //  64-bit types + intmax_t and uintmax_t  ----------------------------------//
-
+#ifndef INT64_C
 #  if defined(BOOST_HAS_LONG_LONG) && \
     (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_LLONG_MAX))
 
@@ -462,7 +491,7 @@ INT#_C macros if they're not already defined (John Maddock).
 #   define INTMAX_C(value) INT64_C(value)
 #   define UINTMAX_C(value) UINT64_C(value)
 #  endif
-
+#endif
 # endif // Borland/Microsoft specific width suffixes
 
 #endif // INT#_C macros.
index 252e9f461c54e2d4573bbbc28933ff9c419a17f3..3f9297bcab99ff6c260b1c96441111a6a177fe59 100644 (file)
 
 #include <algorithm>
 #include <vector>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/range/algorithm/equal.hpp>
+#include <boost/range/algorithm/sort.hpp>
+#include <boost/range/algorithm/stable_sort.hpp>
+#include <boost/range/algorithm/find_if.hpp>
+#include <boost/range/algorithm/count.hpp>
+#include <boost/range/algorithm/count_if.hpp>
+#include <boost/range/algorithm_ext/is_sorted.hpp>
+#include <boost/range/algorithm_ext/iota.hpp>
 
 namespace boost {
 
-  template <typename Iter1, typename Iter2>
-  Iter1 begin(const std::pair<Iter1, Iter2>& p) { return p.first; }
-
-  template <typename Iter1, typename Iter2>
-  Iter2 end(const std::pair<Iter1, Iter2>& p) { return p.second; }
-
-  template <typename Iter1, typename Iter2>
-  typename boost::detail::iterator_traits<Iter1>::difference_type
-  size(const std::pair<Iter1, Iter2>& p) {
-    return std::distance(p.first, p.second);
-  }
-
-#if 0
-  // These seem to interfere with the std::pair overloads :(
-  template <typename Container>
-  typename Container::iterator
-  begin(Container& c) { return c.begin(); }
-
-  template <typename Container>
-  typename Container::const_iterator
-  begin(const Container& c) { return c.begin(); }
-
-  template <typename Container>
-  typename Container::iterator
-  end(Container& c) { return c.end(); }
-
-  template <typename Container>
-  typename Container::const_iterator
-  end(const Container& c) { return c.end(); }
-
-  template <typename Container>
-  typename Container::size_type
-  size(const Container& c) { return c.size(); }
-#else
-  template <typename T>
-  typename std::vector<T>::iterator
-  begin(std::vector<T>& c) { return c.begin(); }
-
-  template <typename T>
-  typename std::vector<T>::const_iterator
-  begin(const std::vector<T>& c) { return c.begin(); }
-
-  template <typename T>
-  typename std::vector<T>::iterator
-  end(std::vector<T>& c) { return c.end(); }
-
-  template <typename T>
-  typename std::vector<T>::const_iterator
-  end(const std::vector<T>& c) { return c.end(); }
-
-  template <typename T>
-  typename std::vector<T>::size_type
-  size(const std::vector<T>& c) { return c.size(); }
-#endif
-  
-  template <class ForwardIterator, class T>
-  void iota(ForwardIterator first, ForwardIterator last, T value)
-  {
-    for (; first != last; ++first, ++value)
-      *first = value;
-  }
-  template <typename Container, typename T>
-  void iota(Container& c, const T& value)
-  {
-    iota(begin(c), end(c), value);
-  }
-  // Also do version with 2nd container?
-  template <typename Container, typename OutIter>
-  OutIter copy(const Container& c, OutIter result) {
-    return std::copy(begin(c), end(c), result);
-  }
-
-  template <typename Container1, typename Container2>
-  bool equal(const Container1& c1, const Container2& c2)
-  {
-    if (size(c1) != size(c2))
-      return false;
-    return std::equal(begin(c1), end(c1), begin(c2));
-  }
-
-  template <typename Container>
-  void sort(Container& c) { std::sort(begin(c), end(c)); }
-
-  template <typename Container, typename Predicate>
-  void sort(Container& c, const Predicate& p) { 
-    std::sort(begin(c), end(c), p);
-  }
-
-  template <typename Container>
-  void stable_sort(Container& c) { std::stable_sort(begin(c), end(c)); }
-
-  template <typename Container, typename Predicate>
-  void stable_sort(Container& c, const Predicate& p) { 
-    std::stable_sort(begin(c), end(c), p);
-  }
-
   template <typename InputIterator, typename Predicate>
   bool any_if(InputIterator first, InputIterator last, Predicate p)
   {
     return std::find_if(first, last, p) != last;
   }
+
   template <typename Container, typename Predicate>
   bool any_if(const Container& c, Predicate p)
   {
-    return any_if(begin(c), end(c), p);
+    return any_if(boost::begin(c), boost::end(c), p);
   }
 
   template <typename InputIterator, typename T>
@@ -159,62 +74,7 @@ namespace boost {
   template <typename Container, typename T>
   bool container_contains(const Container& c, const T& value)
   {
-    return container_contains(begin(c), end(c), value);
-  }
-
-  template <typename Container, typename T>
-  std::size_t count(const Container& c, const T& value)
-  {
-    return std::count(begin(c), end(c), value);
-  }
-
-  template <typename Container, typename Predicate>
-  std::size_t count_if(const Container& c, Predicate p)
-  {
-    return std::count_if(begin(c), end(c), p);
-  }
-
-  template <typename ForwardIterator>
-  bool is_sorted(ForwardIterator first, ForwardIterator last)
-  {
-    if (first == last)
-      return true;
-
-    ForwardIterator next = first;
-    for (++next; next != last; first = next, ++next) {
-      if (*next < *first)
-        return false;
-    }
-
-    return true;
-  }
-
-  template <typename ForwardIterator, typename StrictWeakOrdering>
-  bool is_sorted(ForwardIterator first, ForwardIterator last,
-                 StrictWeakOrdering comp)
-  {
-    if (first == last)
-      return true;
-
-    ForwardIterator next = first;
-    for (++next; next != last; first = next, ++next) {
-      if (comp(*next, *first))
-        return false;
-    }
-
-    return true;
-  }
-
-  template <typename Container>
-  bool is_sorted(const Container& c)
-  {
-    return is_sorted(begin(c), end(c));
-  }
-
-  template <typename Container, typename StrictWeakOrdering>
-  bool is_sorted(const Container& c, StrictWeakOrdering comp)
-  {
-    return is_sorted(begin(c), end(c), comp);
+    return container_contains(boost::begin(c), boost::end(c), value);
   }
 
 } // namespace boost
index bc7f780b060965c5e96ed47b5ce4ec1613c9d522..67c5a21c8a1858fcb6239772e3a6c440cd91cfa8 100644 (file)
@@ -13,7 +13,9 @@
 #include <boost/config.hpp>
 #include <boost/detail/workaround.hpp>
 
-#if ((defined(__GLIBCPP__) || defined(__GLIBCXX__)) && defined(_GLIBCXX_DEBUG)) \
+#if defined(BOOST_DETAIL_NO_CONTAINER_FWD) \
+    || ((defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
+        && (defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL))) \
     || BOOST_WORKAROUND(__BORLANDC__, > 0x551) \
     || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x842)) \
     || (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
index 36ddb7e1e5d0f9d59c824f40afe9e15866985b49..5f9b90efd9322ffec1b5b3e0742d7b0636fe0b9b 100755 (executable)
@@ -1,5 +1,6 @@
 // Copyright 2005 Caleb Epstein
 // Copyright 2006 John Maddock
+// Copyright 2010 Rene Rivera
 // Distributed under the Boost Software License, Version 1.0. (See accompany-
 // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #  error Unknown machine endianness detected.
 # endif
 # define BOOST_BYTE_ORDER __BYTE_ORDER
-#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)
+#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || \
+    defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
 # define BOOST_BIG_ENDIAN
 # define BOOST_BYTE_ORDER 4321
-#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
+#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) || \
+    defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
 # define BOOST_LITTLE_ENDIAN
 # define BOOST_BYTE_ORDER 1234
 #elif defined(__sparc) || defined(__sparc__) \
index d40ca21eb3c2f4225d45d9686cfa94598b8b5f20..93abce18ce6f2eb20bffe6f68cdb33b50de3a8a1 100755 (executable)
@@ -173,8 +173,8 @@ inline void lcast_set_precision(std::ios_base& stream, T*)
 template<class Source, class Target>
 inline void lcast_set_precision(std::ios_base& stream, Source*, Target*)
 {
-    std::streamsize const s = lcast_get_precision((Source*)0);
-    std::streamsize const t = lcast_get_precision((Target*)0);
+    std::streamsize const s = lcast_get_precision(static_cast<Source*>(0));
+    std::streamsize const t = lcast_get_precision(static_cast<Target*>(0));
     stream.precision(s > t ? s : t);
 }
 
index 76ba97a02f5ca4258c2f03f976c01fdb0a65f715..40805ec0ff05dafda339fe7796fb1b6f7eff5ddf 100644 (file)
@@ -4,7 +4,7 @@
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 //
-// See http://www.boost.org/lib/optional for documentation.
+// See http://www.boost.org/libs/optional for documentation.
 //
 // You are welcome to contact the author at:
 //  fernando_cacciola@hotmail.com
index 644c1386b7a4c3f2fd5e327350b831a329eaf80c..e695a20857728e2526d0c44ea6138cfb8df8073c 100755 (executable)
@@ -41,9 +41,9 @@
 
 #ifdef BOOST_NO_SCOPED_ENUMS
 
-# define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_t
+# define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_type
 # define BOOST_SCOPED_ENUM_END };
-# define BOOST_SCOPED_ENUM(name) name::enum_t
+# define BOOST_SCOPED_ENUM(name) name::enum_type
 
 #else
 
index 636fe277bc0e867c4142bd9810e616b9b8ac6921..3ee934f6a57b1ec0d2b9bd4dd5cbb6bff0d5dfaa 100755 (executable)
@@ -74,7 +74,7 @@ template<class T> struct sp_typeid_
     }
 };
 
-template<class T> sp_typeinfo sp_typeid_< T >::ti_( sp_typeid_< T >::name() );
+template<class T> sp_typeinfo sp_typeid_< T >::ti_ = sp_typeid_< T >::name();
 
 template<class T> struct sp_typeid_< T & >: sp_typeid_< T >
 {
index b6b64125c6a8165ac7e033f6d872cfd5be5edfcb..40b3423b374f26a5586751070bade6e9a179e41e 100644 (file)
 #else
 #define BOOST_MSVC_WORKAROUND_GUARD 0
 #endif
+#ifndef BOOST_MSVC_FULL_VER
+#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1
+#else
+#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0
+#endif
 #ifndef __GNUC__
 #define __GNUC___WORKAROUND_GUARD 1
 #else
index 32113b1391e52a1f3fb2dbcfa6049f0b9c2f990a..883d313a98fd85b875b64dbc1e2ea8f8e034ec05 100644 (file)
@@ -1,4 +1,4 @@
-//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.
 
 //Distributed under the Boost Software License, Version 1.0. (See accompanying
 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -25,7 +25,7 @@ boost
             {
             public:
 
-            virtual char const * tag_typeid_name() const = 0;
+            virtual std::string tag_typeid_name() const = 0;
             virtual std::string value_as_string() const = 0;
 
             protected:
@@ -62,7 +62,7 @@ boost
 
         private:
 
-        char const * tag_typeid_name() const;
+        std::string tag_typeid_name() const;
         std::string value_as_string() const;
 
         value_type value_;
index 78db17c065b41f20b67b5edb26c44627c165cd8a..0510fe2dfd6854fe73aa6aca891bb1ec7b7cf5b7 100644 (file)
 namespace
 boost
     {
+    typedef shared_ptr<exception_detail::clone_base const> exception_ptr;
+
+    exception_ptr current_exception();
+
+    template <class T>
+    inline
+    exception_ptr
+    copy_exception( T const & e )
+        {
+        try
+            {
+            throw enable_current_exception(e);
+            }
+        catch(
+        ... )
+            {
+            return current_exception();
+            }
+        }
+
 #ifndef BOOST_NO_RTTI
     typedef error_info<struct tag_original_exception_type,std::type_info const *> original_exception_type;
 
@@ -39,91 +59,47 @@ boost
         }
 #endif
 
-    class exception_ptr;
-    exception_ptr current_exception();
-    void rethrow_exception( exception_ptr const & );
-
-    class
-    exception_ptr
+    namespace
+    exception_detail
         {
-        typedef bool exception_ptr::*unspecified_bool_type;
-        friend exception_ptr current_exception();
-        friend void rethrow_exception( exception_ptr const & );
-
-        shared_ptr<exception_detail::clone_base const> c_;
-        bool bad_alloc_;
-
         struct
-        bad_alloc_tag
-            {
-            };
-
-        explicit
-        exception_ptr( bad_alloc_tag ):
-            bad_alloc_(true)
-            {
-            }
-
-        explicit
-        exception_ptr( shared_ptr<exception_detail::clone_base const> const & c ):
-            c_(c),
-            bad_alloc_(false)
-            {
-            BOOST_ASSERT(c);
-            }
-
-        void
-        rethrow() const
-            {
-            BOOST_ASSERT(*this);
-            if( bad_alloc_ )
-                throw enable_current_exception(std::bad_alloc());
-            else
-                c_->rethrow();
-            }
-
-        bool
-        empty() const
-            {
-            return !bad_alloc_ && !c_;
-            }
-
-        public:
-
-        exception_ptr():
-            bad_alloc_(false)
-            {
-            }
-
-        ~exception_ptr() throw()
-            {
-            }
+        bad_alloc_:
+            boost::exception,
+            std::bad_alloc
+                {
+                };
 
-        operator unspecified_bool_type() const
+        template <int Dummy>
+        exception_ptr
+        get_bad_alloc()
             {
-            return empty() ? 0 : &exception_ptr::bad_alloc_;
+            bad_alloc_ ba;
+            exception_detail::clone_impl<bad_alloc_> c(ba);
+            c <<
+                throw_function(BOOST_CURRENT_FUNCTION) <<
+                throw_file(__FILE__) <<
+                throw_line(__LINE__);
+            static exception_ptr ep(new exception_detail::clone_impl<bad_alloc_>(c));
+            return ep;
             }
 
-        friend
-        bool
-        operator==( exception_ptr const & a, exception_ptr const & b )
+        template <int Dummy>
+        struct
+        exception_ptr_bad_alloc
             {
-            return a.c_==b.c_ && a.bad_alloc_==b.bad_alloc_;
-            }
+            static exception_ptr const e;
+            };
 
-        friend
-        bool
-        operator!=( exception_ptr const & a, exception_ptr const & b )
-            {
-            return !(a==b);
-            }
-        };
+        template <int Dummy>
+        exception_ptr const
+        exception_ptr_bad_alloc<Dummy>::
+        e = get_bad_alloc<Dummy>();
+        }
 
     class
     unknown_exception:
-        public exception,
-        public std::exception,
-        public exception_detail::clone_base
+        public boost::exception,
+        public std::exception
         {
         public:
 
@@ -150,18 +126,6 @@ boost
 
         private:
 
-        exception_detail::clone_base const *
-        clone() const
-            {
-            return new unknown_exception(*this);
-            }
-
-        void
-        rethrow() const
-            {
-            throw*this;
-            }
-
         template <class E>
         void
         add_original_type( E const & e )
@@ -179,8 +143,7 @@ boost
         class
         current_exception_std_exception_wrapper:
             public T,
-            public boost::exception,
-            public clone_base
+            public boost::exception
             {
             public:
 
@@ -204,18 +167,6 @@ boost
 
             private:
 
-            clone_base const *
-            clone() const
-                {
-                return new current_exception_std_exception_wrapper(*this);
-                }
-
-            void
-            rethrow() const
-                {
-                throw *this;
-                }
-
             template <class E>
             void
             add_original_type( E const & e )
@@ -228,7 +179,7 @@ boost
 
 #ifdef BOOST_NO_RTTI
         template <class T>
-        exception const *
+        boost::exception const *
         get_boost_exception( T const * )
             {
             try
@@ -236,7 +187,7 @@ boost
                 throw;
                 }
             catch(
-            exception & x )
+            boost::exception & x )
                 {
                 return &x;
                 }
@@ -247,50 +198,50 @@ boost
             }
 #else
         template <class T>
-        exception const *
+        boost::exception const *
         get_boost_exception( T const * x )
             {
-            return dynamic_cast<exception const *>(x);
+            return dynamic_cast<boost::exception const *>(x);
             }
 #endif
 
         template <class T>
         inline
-        shared_ptr<clone_base const>
+        exception_ptr
         current_exception_std_exception( T const & e1 )
             {
             if( boost::exception const * e2 = get_boost_exception(&e1) )
-                return shared_ptr<current_exception_std_exception_wrapper<T> const>(new current_exception_std_exception_wrapper<T>(e1,*e2));
+                return boost::copy_exception(current_exception_std_exception_wrapper<T>(e1,*e2));
             else
-                return shared_ptr<current_exception_std_exception_wrapper<T> const>(new current_exception_std_exception_wrapper<T>(e1));
+                return boost::copy_exception(current_exception_std_exception_wrapper<T>(e1));
             }
 
         inline
-        shared_ptr<clone_base const>
+        exception_ptr
         current_exception_unknown_exception()
             {
-            return shared_ptr<unknown_exception const>(new unknown_exception());
+            return boost::copy_exception(unknown_exception());
             }
 
         inline
-        shared_ptr<clone_base const>
+        exception_ptr
         current_exception_unknown_boost_exception( boost::exception const & e )
             {
-            return shared_ptr<unknown_exception const>(new unknown_exception(e));
+            return boost::copy_exception(unknown_exception(e));
             }
 
         inline
-        shared_ptr<clone_base const>
+        exception_ptr
         current_exception_unknown_std_exception( std::exception const & e )
             {
             if( boost::exception const * be = get_boost_exception(&e) )
                 return current_exception_unknown_boost_exception(*be);
             else
-                return shared_ptr<unknown_exception const>(new unknown_exception(e));
+                return boost::copy_exception(unknown_exception(e));
             }
 
         inline
-        shared_ptr<clone_base const>
+        exception_ptr
         current_exception_impl()
             {
             try
@@ -300,7 +251,7 @@ boost
             catch(
             exception_detail::clone_base & e )
                 {
-                return shared_ptr<exception_detail::clone_base const>(e.clone());
+                return exception_ptr(e.clone());
                 }
             catch(
             std::domain_error & e )
@@ -396,24 +347,28 @@ boost
     exception_ptr
     current_exception()
         {
+        exception_ptr ret;
+        BOOST_ASSERT(!ret);
         try
             {
-            return exception_ptr(exception_detail::current_exception_impl());
+            ret=exception_detail::current_exception_impl();
             }
         catch(
         std::bad_alloc & )
             {
+            ret=exception_detail::exception_ptr_bad_alloc<42>::e;
             }
         catch(
         ... )
             {
             try
                 {
-                return exception_ptr(exception_detail::current_exception_std_exception(std::bad_exception()));
+                ret=exception_detail::current_exception_std_exception(std::bad_exception());
                 }
             catch(
             std::bad_alloc & )
                 {
+                ret=exception_detail::exception_ptr_bad_alloc<42>::e;
                 }
             catch(
             ... )
@@ -421,30 +376,16 @@ boost
                 BOOST_ASSERT(0);
                 }
             }
-        return exception_ptr(exception_ptr::bad_alloc_tag());
-        }
-
-    template <class T>
-    inline
-    exception_ptr
-    copy_exception( T const & e )
-        {
-        try
-            {
-            throw enable_current_exception(e);
-            }
-        catch(
-        ... )
-            {
-            return current_exception();
-            }
+        BOOST_ASSERT(ret);
+        return ret;
         }
 
     inline
     void
     rethrow_exception( exception_ptr const & p )
         {
-        p.rethrow();
+        BOOST_ASSERT(p);
+        p->rethrow();
         }
 
     inline
index 5eb1695d2a20ae8ddd4f8316b8da153637f4a11b..743313c1ec74d92ee1671bef871e286d64beef1c 100755 (executable)
@@ -20,8 +20,21 @@ boost
     namespace
     to_string_detail
         {
-        template <class T,class CharT,class Traits>
-        char operator<<( std::basic_ostream<CharT,Traits> &, T const & );
+        struct
+        partial_ordering_helper1
+            {
+            template <class CharT,class Traits>
+            partial_ordering_helper1( std::basic_ostream<CharT,Traits> & );
+            };
+
+        struct
+        partial_ordering_helper2
+            {
+            template <class T>
+            partial_ordering_helper2( T const & );
+            };
+
+        char operator<<( partial_ordering_helper1, partial_ordering_helper2 );
 
         template <class T,class CharT,class Traits>
         struct
index 60709a1f6c08991262c371b7eb9d0085bec401c0..9ab1c57f539585421741f906aa6529d5d52b8423 100644 (file)
@@ -1,4 +1,4 @@
-//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.
 
 //Distributed under the Boost Software License, Version 1.0. (See accompanying
 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 #include <boost/detail/sp_typeinfo.hpp>
 #include <boost/current_function.hpp>
 #include <boost/config.hpp>
+#ifndef BOOST_NO_TYPEID
+#include <boost/units/detail/utility.hpp>
+#endif
+#include <string>
 
 namespace
 boost
     {
     template <class T>
     inline
-    char const *
+    std::string
     tag_type_name()
         {
 #ifdef BOOST_NO_TYPEID
         return BOOST_CURRENT_FUNCTION;
 #else
-        return typeid(T*).name();
+        return units::detail::demangle(typeid(T*).name());
 #endif
         }
 
     template <class T>
     inline
-    char const *
+    std::string
     type_name()
         {
 #ifdef BOOST_NO_TYPEID
         return BOOST_CURRENT_FUNCTION;
 #else
-        return typeid(T).name();
+        return units::detail::demangle(typeid(T).name());
 #endif
         }
 
index 632a5a333978c07049c620da7735c0f794a07ffb..1d6bc2cc981a8451970e94eb327f5cec5cb5e6b8 100755 (executable)
@@ -1,4 +1,4 @@
-//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.
 
 //Distributed under the Boost Software License, Version 1.0. (See accompanying
 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -15,7 +15,9 @@
 #include <boost/config.hpp>
 #include <boost/exception/get_error_info.hpp>
 #include <boost/utility/enable_if.hpp>
-#include <boost/config.hpp>
+#ifndef BOOST_NO_RTTI
+#include <boost/units/detail/utility.hpp>
+#endif
 #include <exception>
 #include <sstream>
 #include <string>
@@ -135,7 +137,7 @@ boost
                 }
 #ifndef BOOST_NO_RTTI
             tmp << std::string("Dynamic exception type: ") <<
-                (be?BOOST_EXCEPTION_DYNAMIC_TYPEID(*be):BOOST_EXCEPTION_DYNAMIC_TYPEID(*se)).type_.name() << '\n';
+                units::detail::demangle((be?BOOST_EXCEPTION_DYNAMIC_TYPEID(*be):BOOST_EXCEPTION_DYNAMIC_TYPEID(*se)).type_.name()) << '\n';
 #endif
             if( with_what && se )
                 tmp << "std::exception::what: " << wh << '\n';
index de055e035f8307443f634a1eff821bc803b5e62e..e4e75d9eefd407bd5e98c868fc8371c43b895130 100644 (file)
@@ -9,8 +9,10 @@
 namespace
 boost
     {
+    namespace exception_detail { class clone_base; };
     template <class Tag,class T> class error_info;
-    class exception_ptr;
+    template <class T> class shared_ptr;
+    typedef shared_ptr<exception_detail::clone_base const> exception_ptr;
     typedef error_info<struct errinfo_nested_exception_,exception_ptr> errinfo_nested_exception;
     }
 
index 79b273999c3a5d59ed8ba409e8aa856f5d978fd6..adaac687bb627a73db4ee99b66915f1932b44192 100755 (executable)
@@ -75,8 +75,8 @@ boost
             void
             release()
                 {
-                if( px_ )
-                    px_->release();
+                if( px_ && px_->release() )
+                    px_=0;
                 }
             };
         }
@@ -132,21 +132,9 @@ boost
             }
         };
 
-    template <class E,class Tag,class T>
-    E const & operator<<( E const &, error_info<Tag,T> const & );
-
-    template <class E>
-    E const & operator<<( E const &, throw_function const & );
-
-    template <class E>
-    E const & operator<<( E const &, throw_file const & );
-
-    template <class E>
-    E const & operator<<( E const &, throw_line const & );
-
     class exception;
 
-    template <class>
+    template <class T>
     class shared_ptr;
 
     namespace
@@ -162,7 +150,8 @@ boost
             virtual shared_ptr<error_info_base> get( type_info_ const & ) const = 0;
             virtual void set( shared_ptr<error_info_base> const &, type_info_ const & ) = 0;
             virtual void add_ref() const = 0;
-            virtual void release() const = 0;
+            virtual bool release() const = 0;
+            virtual refcount_ptr<exception_detail::error_info_container> clone() const = 0;
 
             protected:
 
@@ -184,6 +173,20 @@ boost
         struct get_info<throw_line>;
 
         char const * get_diagnostic_information( exception const &, char const * );
+
+        void copy_boost_exception( exception *, exception const * );
+
+        template <class E,class Tag,class T>
+        E const & set_info( E const &, error_info<Tag,T> const & );
+
+        template <class E>
+        E const & set_info( E const &, throw_function const & );
+
+        template <class E>
+        E const & set_info( E const &, throw_file const & );
+
+        template <class E>
+        E const & set_info( E const &, throw_line const & );
         }
 
     class
@@ -216,30 +219,31 @@ boost
 #endif
             ;
 
-#if defined(__MWERKS__) && __MWERKS__<=0x3207
+#if (defined(__MWERKS__) && __MWERKS__<=0x3207) || (defined(_MSC_VER) && _MSC_VER<=1310)
         public:
 #else
         private:
 
         template <class E>
-        friend E const & operator<<( E const &, throw_function const & );
+        friend E const & exception_detail::set_info( E const &, throw_function const & );
 
         template <class E>
-        friend E const & operator<<( E const &, throw_file const & );
+        friend E const & exception_detail::set_info( E const &, throw_file const & );
 
         template <class E>
-        friend E const & operator<<( E const &, throw_line const & );
-
-        friend char const * exception_detail::get_diagnostic_information( exception const &, char const * );
+        friend E const & exception_detail::set_info( E const &, throw_line const & );
 
         template <class E,class Tag,class T>
-        friend E const & operator<<( E const &, error_info<Tag,T> const & );
+        friend E const & exception_detail::set_info( E const &, error_info<Tag,T> const & );
+
+        friend char const * exception_detail::get_diagnostic_information( exception const &, char const * );
 
         template <class>
         friend struct exception_detail::get_info;
         friend struct exception_detail::get_info<throw_function>;
         friend struct exception_detail::get_info<throw_file>;
         friend struct exception_detail::get_info<throw_line>;
+        friend void exception_detail::copy_boost_exception( exception *, exception const * );
 #endif
         mutable exception_detail::refcount_ptr<exception_detail::error_info_container> data_;
         mutable char const * throw_function_;
@@ -253,28 +257,32 @@ boost
         {
         }
 
-    template <class E>
-    E const &
-    operator<<( E const & x, throw_function const & y )
+    namespace
+    exception_detail
         {
-        x.throw_function_=y.v_;
-        return x;
-        }
+        template <class E>
+        E const &
+        set_info( E const & x, throw_function const & y )
+            {
+            x.throw_function_=y.v_;
+            return x;
+            }
 
-    template <class E>
-    E const &
-    operator<<( E const & x, throw_file const & y )
-        {
-        x.throw_file_=y.v_;
-        return x;
-        }
+        template <class E>
+        E const &
+        set_info( E const & x, throw_file const & y )
+            {
+            x.throw_file_=y.v_;
+            return x;
+            }
 
-    template <class E>
-    E const &
-    operator<<( E const & x, throw_line const & y )
-        {
-        x.throw_line_=y.v_;
-        return x;
+        template <class E>
+        E const &
+        set_info( E const & x, throw_line const & y )
+            {
+            x.throw_line_=y.v_;
+            return x;
+            }
         }
 
     ////////////////////////////////////////////////////////////////////////
@@ -300,10 +308,10 @@ boost
             };
 
         struct large_size { char c[256]; };
-        large_size dispatch( exception * );
+        large_size dispatch_boost_exception( exception const * );
 
         struct small_size { };
-        small_size dispatch( void * );
+        small_size dispatch_boost_exception( void const * );
 
         template <class,int>
         struct enable_error_info_helper;
@@ -326,7 +334,7 @@ boost
         struct
         enable_error_info_return_type
             {
-            typedef typename enable_error_info_helper<T,sizeof(exception_detail::dispatch((T*)0))>::type type;
+            typedef typename enable_error_info_helper<T,sizeof(exception_detail::dispatch_boost_exception((T*)0))>::type type;
             };
         }
 
@@ -363,7 +371,13 @@ boost
         void
         copy_boost_exception( exception * a, exception const * b )
             {
-            *a = *b;
+            refcount_ptr<error_info_container> data;
+            if( error_info_container * d=b->data_.get() )
+                data = d->clone();
+            a->throw_file_ = b->throw_file_;
+            a->throw_line_ = b->throw_line_;
+            a->throw_function_ = b->throw_function_;
+            a->data_ = data;
             }
 
         inline
index cbbc2c0b2f1349985c1aa638205815244f6dd01b..c918dbd34139838b884be485acd68f7ab3251f82 100755 (executable)
@@ -1,4 +1,4 @@
-//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.
 
 //Distributed under the Boost Software License, Version 1.0. (See accompanying
 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -47,7 +47,7 @@ boost
 
     template <class Tag,class T>
     inline
-    char const *
+    std::string
     error_info<Tag,T>::
     tag_typeid_name() const
         {
@@ -114,8 +114,8 @@ boost
                     tmp << header;
                     for( error_info_map::const_iterator i=info_.begin(),end=info_.end(); i!=end; ++i )
                         {
-                        shared_ptr<error_info_base const> const & x = i->second;
-                        tmp << '[' << x->tag_typeid_name() << "] = " << x->value_as_string() << '\n';
+                        error_info_base const & x = *i->second;
+                        tmp << '[' << x.tag_typeid_name() << "] = " << x.value_as_string() << '\n';
                         }
                     tmp.str().swap(diagnostic_info_str_);
                     }
@@ -131,33 +131,66 @@ boost
             mutable std::string diagnostic_info_str_;
             mutable int count_;
 
+            error_info_container_impl( error_info_container_impl const & );
+            error_info_container_impl & operator=( error_info_container const & );
+
             void
             add_ref() const
                 {
                 ++count_;
                 }
 
-            void
+            bool
             release() const
                 {
-                if( !--count_ )
+                if( --count_ )
+                    return false;
+                else
+                    {
                     delete this;
+                    return true;
+                    }
+                }
+
+            refcount_ptr<error_info_container>
+            clone() const
+                {
+                refcount_ptr<error_info_container> p;
+                error_info_container_impl * c=new error_info_container_impl;
+                p.adopt(c);
+                c->info_ = info_;
+                return p;
                 }
             };
+
+        template <class E,class Tag,class T>
+        inline
+        E const &
+        set_info( E const & x, error_info<Tag,T> const & v )
+            {
+            typedef error_info<Tag,T> error_info_tag_t;
+            shared_ptr<error_info_tag_t> p( new error_info_tag_t(v) );
+            exception_detail::error_info_container * c=x.data_.get();
+            if( !c )
+                x.data_.adopt(c=new exception_detail::error_info_container_impl);
+            c->set(p,BOOST_EXCEPTION_STATIC_TYPEID(error_info_tag_t));
+            return x;
+            }
+
+        template <class T>
+        struct
+        derives_boost_exception
+            {
+            enum e { value = (sizeof(dispatch_boost_exception((T*)0))==sizeof(large_size)) };
+            };
         }
 
     template <class E,class Tag,class T>
     inline
-    E const &
+    typename enable_if<exception_detail::derives_boost_exception<E>,E const &>::type
     operator<<( E const & x, error_info<Tag,T> const & v )
         {
-        typedef error_info<Tag,T> error_info_tag_t;
-        shared_ptr<error_info_tag_t> p( new error_info_tag_t(v) );
-        exception_detail::error_info_container * c=x.data_.get();
-        if( !c )
-            x.data_.adopt(c=new exception_detail::error_info_container_impl);
-        c->set(p,BOOST_EXCEPTION_STATIC_TYPEID(error_info_tag_t));
-        return x;
+        return exception_detail::set_info(x,v);
         }
     }
 
index 0ef35c09e6a2f853579d7e6797b8928b4c856797..9975e4f96b0a325b28b7ad65441b1d38deb56fd3 100644 (file)
@@ -37,7 +37,12 @@ namespace boost {
         str (const string_type& s) {
             size_type sz=s.size();
             if(sz != 0 && mode_ & (::std::ios_base::in | ::std::ios_base::out) ) {
+#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
+                void *vd_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0);
+                Ch *new_ptr = static_cast<Ch *>(vd_ptr);
+#else
                 Ch *new_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0);
+#endif
                 // if this didnt throw, we're safe, update the buffer
                 dealloc();
                 sz = s.copy(new_ptr, sz);
@@ -140,7 +145,7 @@ namespace boost {
         typename basic_altstringbuf<Ch, Tr, Alloc>::pos_type 
         basic_altstringbuf<Ch, Tr, Alloc>:: 
         seekpos (pos_type pos, ::std::ios_base::openmode which) {
-            off_type off = off_type(pos); // operation guaranteed by §27.4.3.2 table 88
+            off_type off = off_type(pos); // operation guaranteed by 27.4.3.2 table 88
             if(pptr() != NULL && putend_ < pptr())
                 putend_ = pptr();
             if(off != off_type(-1)) {
@@ -249,7 +254,12 @@ namespace boost {
                     add_size /= 2;
                 if(0 < add_size) {
                     new_size += add_size;
+#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
+                    void *vdptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
+                    newptr = static_cast<Ch *>(vdptr);
+#else
                     newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
+#endif
                 }
 
                 if(0 < prev_size)
index d776d95146f4fe290c5bb1262a462541ed7e1139..4555e56ec37cb07d8fa050af5d177e4350a25bbb 100644 (file)
@@ -68,6 +68,31 @@ namespace boost {
             { return io::detail::feed<CharT, Tr, Alloc, T&>(*this,x); }
 #endif
 
+#if defined(__GNUC__)
+        // GCC can't handle anonymous enums without some help
+        // ** arguments passing ** //
+        basic_format&   operator%(const int& x)
+            { return io::detail::feed<CharT, Tr, Alloc, const int&>(*this,x); }
+
+#ifndef BOOST_NO_OVERLOAD_FOR_NON_CONST
+        basic_format&   operator%(int& x)
+            { return io::detail::feed<CharT, Tr, Alloc, int&>(*this,x); }
+#endif
+#endif
+
+        // The total number of arguments expected to be passed to the format objectt
+        int expected_args() const
+            { return num_args_; }
+        // The number of arguments currently bound (see bind_arg(..) )
+        int bound_args() const;
+        // The number of arguments currently fed to the format object
+        int fed_args() const;
+        // The index (1-based) of the current argument (i.e. next to be formatted)
+        int cur_arg() const;
+        // The number of arguments still required to be fed
+        int remaining_args() const; // same as expected_args() - bound_args() - fed_args()
+
+
         // ** object modifying **//
         template<class T>
         basic_format&  bind_arg(int argN, const T& val) 
index 9dd93a5acf3580ccfc38a411f5efdf003ca1cf0b..2abb5c4b03326058c9c6515d4819d8fee445e837 100644 (file)
@@ -67,7 +67,7 @@ namespace boost {
     template< class Ch, class Tr, class Alloc> // just don't copy the buf_ member
     basic_format<Ch, Tr, Alloc>:: basic_format(const basic_format& x)
         : items_(x.items_), bound_(x.bound_), style_(x.style_),
-          cur_arg_(x.cur_arg_), num_args_(x.num_args_), dumped_(false),
+          cur_arg_(x.cur_arg_), num_args_(x.num_args_), dumped_(x.dumped_),
           prefix_(x.prefix_), exceptions_(x.exceptions_), loc_(x.loc_)
     {
     }
@@ -171,6 +171,47 @@ namespace boost {
         return *this;
     }
 
+    template< class Ch, class Tr, class Alloc>
+    int basic_format<Ch,Tr, Alloc>::
+    bound_args() const {
+        if(bound_.size()==0)
+            return 0;
+        int n=0;
+        for(int i=0; i<num_args_ ; ++i)
+            if(bound_[i])
+                ++n;
+        return n;
+    }
+
+    template< class Ch, class Tr, class Alloc>
+    int basic_format<Ch,Tr, Alloc>::
+    fed_args() const {
+        if(bound_.size()==0)
+            return cur_arg_;
+        int n=0;
+        for(int i=0; i<cur_arg_ ; ++i)
+            if(!bound_[i])
+                ++n;
+        return n;
+    }
+
+    template< class Ch, class Tr, class Alloc>
+    int basic_format<Ch,Tr, Alloc>::
+    cur_arg() const {
+      return cur_arg_+1; }
+
+    template< class Ch, class Tr, class Alloc>
+    int basic_format<Ch,Tr, Alloc>::
+    remaining_args() const {
+        if(bound_.size()==0)
+            return num_args_-cur_arg_;
+        int n=0;
+        for(int i=cur_arg_; i<num_args_ ; ++i)
+            if(!bound_[i])
+                ++n;
+        return n;
+    }
+
     template< class Ch, class Tr, class Alloc>
     typename basic_format<Ch, Tr, Alloc>::string_type 
     basic_format<Ch,Tr, Alloc>:: 
@@ -261,7 +302,7 @@ namespace detail {
             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 :
+        // In any case, we either have all args, or are on an unbound arg :
         BOOST_ASSERT( self.cur_arg_ >= self.num_args_ || ! self.bound_[self.cur_arg_]);
         return self;
     }
index c1e824c75a4a1f2e594f38bb8ea069f847a7aafe..b0d874a1fb4a26020a6a3026e444c65391029c6a 100644 (file)
@@ -148,7 +148,7 @@ namespace detail {
 
     template<class Ch, class Tr> inline
     void stream_format_state<Ch,Tr>:: reset(Ch fill) {
-        // set our params to standard's default state.   cf § 27.4.4.1 of the C++ norm
+        // set our params to standard's default state.   cf 27.4.4.1 of the C++ norm
         width_=0; precision_=6; 
         fill_=fill; // default is widen(' '), but we cant compute it without the locale
         flags_ = std::ios_base::dec | std::ios_base::skipws; 
index eb201a80e9ca5da9d0f7ae537a3d63475f8119b1..fe9bbbe3591a27f7f96e2a5198393b4cc714109e 100644 (file)
@@ -264,12 +264,12 @@ namespace boost {
           A(a)
         {
         }
-       
-       functor_wrapper(const functor_wrapper& f) :
+        
+        functor_wrapper(const functor_wrapper& f) :
           F(static_cast<const F&>(f)),
           A(static_cast<const A&>(f))
-       {
-       }
+        {
+        }
       };
 
       /**
index f9acee9cd1ecb34ced8fe5cdca5fb3d7d066162a..fdbf53fe57a7cc1ff0693e0a62e0f4fdf8e9db78 100644 (file)
@@ -51,17 +51,15 @@ namespace boost
                     limits<T>::min_exponent;
             }
 
-            // The result of frexp is always between 0.5 and 1, so its
-            // top bit will always be 1. Subtract by 0.5 to remove that.
-            v -= T(0.5);
-            v = ldexp(v, limits<std::size_t>::digits + 1);
+            v = ldexp(v, limits<std::size_t>::digits);
             std::size_t seed = static_cast<std::size_t>(v);
             v -= seed;
 
             // ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1;
             std::size_t const length
                 = (limits<T>::digits *
-                        boost::static_log2<limits<T>::radix>::value - 1)
+                        boost::static_log2<limits<T>::radix>::value
+                        + limits<std::size_t>::digits - 1)
                 / limits<std::size_t>::digits;
 
             for(std::size_t i = 0; i != length; ++i)
index 1f33b9ea9d9bfaf08b6fd68742b995d4c52e4919..108d3eda3a286f5d59d614c0574f546274f106e1 100644 (file)
 #include <string>
 #include <boost/limits.hpp>
 
+#if defined(BOOST_HASH_NO_IMPLICIT_CASTS)
+#include <boost/static_assert.hpp>
+#endif
+
 #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 #include <boost/type_traits/is_pointer.hpp>
 #endif
 
 namespace boost
 {
+#if defined(BOOST_HASH_NO_IMPLICIT_CASTS)
+
+    // If you get a static assertion here, it's because hash_value
+    // isn't declared for your type.
+    template <typename T>
+    std::size_t hash_value(T const&) {
+        BOOST_STATIC_ASSERT((T*) 0 && false);
+        return 0;
+    }
+
+#endif
+
     std::size_t hash_value(bool);
     std::size_t hash_value(char);
     std::size_t hash_value(unsigned char);
@@ -44,7 +60,7 @@ namespace boost
     std::size_t hash_value(wchar_t);
 #endif
     
-#if defined(BOOST_HAS_LONG_LONG)
+#if !defined(BOOST_NO_LONG_LONG)
     std::size_t hash_value(boost::long_long_type);
     std::size_t hash_value(boost::ulong_long_type);
 #endif
@@ -174,7 +190,7 @@ namespace boost
     }
 #endif
 
-#if defined(BOOST_HAS_LONG_LONG)
+#if !defined(BOOST_NO_LONG_LONG)
     inline std::size_t hash_value(boost::long_long_type v)
     {
         return hash_detail::hash_value_signed(v);
@@ -408,7 +424,7 @@ namespace boost
     BOOST_HASH_SPECIALIZE_REF(std::wstring)
 #endif
 
-#if defined(BOOST_HAS_LONG_LONG)
+#if !defined(BOOST_NO_LONG_LONG)
     BOOST_HASH_SPECIALIZE(boost::long_long_type)
     BOOST_HASH_SPECIALIZE(boost::ulong_long_type)
 #endif
index 3393c81ea81f86931f9feef80f7e51ba91018ddc..fc0b3983b9ecf3f34937a57e787bd48b08bfab9c 100644 (file)
@@ -57,6 +57,8 @@ namespace boost
   //  no specializations for 0 and 5: requests for a type > long are in error
 #ifdef BOOST_HAS_LONG_LONG
   template<> struct int_least_helper<1> { typedef boost::long_long_type least; };
+#elif defined(BOOST_HAS_MS_INT64)
+  template<> struct int_least_helper<1> { typedef __int64 least; };
 #endif
   template<> struct int_least_helper<2> { typedef long least; };
   template<> struct int_least_helper<3> { typedef int least; };
@@ -64,6 +66,8 @@ namespace boost
   template<> struct int_least_helper<5> { typedef signed char least; };
 #ifdef BOOST_HAS_LONG_LONG
   template<> struct int_least_helper<6> { typedef boost::ulong_long_type least; };
+#elif defined(BOOST_HAS_MS_INT64)
+  template<> struct int_least_helper<6> { typedef unsigned __int64 least; };
 #endif
   template<> struct int_least_helper<7> { typedef unsigned long least; };
   template<> struct int_least_helper<8> { typedef unsigned int least; };
index 01b0a0844f82a03755e133fdd64f6f74f6925641..e6045ca39d980604ddd70a3640e2a9233847e96f 100644 (file)
@@ -77,12 +77,18 @@ template <  >
 template <  >
     class integer_traits< unsigned long >;
 
-#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && (defined(BOOST_HAS_LONG_LONG) || defined(BOOST_HAS_MS_INT64))
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG)
 template <  >
-    class integer_traits<  ::boost::long_long_type>;
+class integer_traits<  ::boost::long_long_type>;
 
 template <  >
-    class integer_traits<  ::boost::ulong_long_type >;
+class integer_traits<  ::boost::ulong_long_type >;
+#elif !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_MS_INT64)
+template <  >
+class integer_traits<__int64>;
+
+template <  >
+class integer_traits<unsigned __int64>;
 #endif
 
 
index e449a8b0d31e14a0339a4acfceea622f090067ea..c365fe0175fb5dd6f66cde42b13d4cc9dfd89116 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef BOOST_TRANSFORM_ITERATOR_23022003THW_HPP
 #define BOOST_TRANSFORM_ITERATOR_23022003THW_HPP
 
-#include <boost/function.hpp>
 #include <boost/iterator.hpp>
 #include <boost/iterator/detail/enable_if.hpp>
 #include <boost/iterator/iterator_adaptor.hpp>
index 8f2a46d295c62cfffd5a049c877cd5dbd68526af..e03fe11dfdfe71030bd734779f445d7177a93046 100644 (file)
@@ -11,9 +11,9 @@
 //
 // See http://www.boost.org/libs/mpl for documentation.
 
-// $Id: has_xxx.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
-// $Revision: 49267 $
+// $Id: has_xxx.hpp 63518 2010-07-02 08:32:03Z agurtovoy $
+// $Date: 2010-07-02 04:32:03 -0400 (Fri, 02 Jul 2010) $
+// $Revision: 63518 $
 
 #include <boost/mpl/aux_/config/overload_resolution.hpp>
 #include <boost/mpl/aux_/config/workaround.hpp>
@@ -27,6 +27,7 @@
         )
 
 #   define BOOST_MPL_CFG_NO_HAS_XXX
+#   define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE
 
 #endif
 
index 3e7bfba1eaececa1e9d847aba25dffa70bce7011..daec4b8a8e17fa1ba82decda707e741f13370879 100644 (file)
@@ -6,11 +6,10 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 //
 
-// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header
+// *Preprocessed* version of the main "template_arity.hpp" header
 // -- DO NOT modify by hand!
 
 namespace boost { namespace mpl { namespace aux {
-
 template< int N > struct arity_tag
 {
     typedef char (&type)[N + 1];
@@ -23,7 +22,6 @@ struct max_arity
 {
     BOOST_STATIC_CONSTANT(int, value =
           ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) )
-
         );
 };
 
@@ -83,7 +81,7 @@ template< typename F, int N >
 struct template_arity_impl
 {
     BOOST_STATIC_CONSTANT(int, value =
-          sizeof(arity_helper(type_wrapper<F>(), arity_tag<N>())) - 1
+          sizeof(::boost::mpl::aux::arity_helper(type_wrapper<F>(), arity_tag<N>())) - 1
         );
 };
 
@@ -92,9 +90,7 @@ struct template_arity
 {
     BOOST_STATIC_CONSTANT(int, value  = (
           max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value
-
         ));
-
     typedef mpl::int_<value> type;
 };
 
index 47e4eeb54fb88583b4fad187f788110ed73e0f63..ed26ea24bb9dc84f6c8fb7e7f03cd53d219688db 100644 (file)
@@ -14,9 +14,9 @@
 //
 // See http://www.boost.org/libs/mpl for documentation.
 
-// $Id: template_arity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
-// $Revision: 49267 $
+// $Id: template_arity.hpp 61584 2010-04-26 18:48:26Z agurtovoy $
+// $Date: 2010-04-26 14:48:26 -0400 (Mon, 26 Apr 2010) $
+// $Revision: 61584 $
 
 #include <boost/mpl/aux_/config/ttp.hpp>
 #include <boost/mpl/aux_/config/lambda.hpp>
@@ -98,7 +98,7 @@ template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) >
 struct template_arity_impl
 {
     BOOST_STATIC_CONSTANT(int, value = 
-          sizeof(arity_helper(type_wrapper<F>(),arity_tag<N>())) - 1
+          sizeof(::boost::mpl::aux::arity_helper(type_wrapper<F>(),arity_tag<N>())) - 1
         );
 };
 
index b7d658ba35fb3b366cd01b10b41805c8317f47ab..80066174d8170e021d06b319a6c23f717b869700 100755 (executable)
@@ -2,7 +2,7 @@
 #ifndef BOOST_MPL_BITAND_HPP_INCLUDED
 #define BOOST_MPL_BITAND_HPP_INCLUDED
 
-// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Aleksey Gurtovoy 2000-2009
 // Copyright Jaap Suter 2003
 //
 // Distributed under the Boost Software License, Version 1.0. 
 //
 // See http://www.boost.org/libs/mpl for documentation.
 
-// $Id: bitand.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
-// $Revision: 49267 $
+// $Id: bitand.hpp 63520 2010-07-02 08:59:55Z agurtovoy $
+// $Date: 2010-07-02 04:59:55 -0400 (Fri, 02 Jul 2010) $
+// $Revision: 63520 $
+
+// agurt, 23/jan/10: workaround a conflict with <iso646.h> header's 
+// macros, see http://tinyurl.com/ycwdxco; 'defined(bitand)'
+// has to be checked in a separate condition, otherwise GCC complains 
+// about 'bitand' being an alternative token
+#if defined(_MSC_VER) 
+#ifndef __GCCXML__
+#if defined(bitand)
+#   pragma push_macro("bitand")
+#   undef bitand
+#   define bitand(x)
+#endif
+#endif
+#endif
 
 #define AUX778076_OP_NAME   bitand_
 #define AUX778076_OP_PREFIX bitand
 #define AUX778076_OP_TOKEN  &
 #include <boost/mpl/aux_/arithmetic_op.hpp>
 
+#if defined(_MSC_VER)
+#ifndef __GCCXML__
+#if defined(bitand)
+#   pragma pop_macro("bitand")
+#endif
+#endif
+#endif
+
 #endif // BOOST_MPL_BITAND_HPP_INCLUDED
index 1c7a10aaa6c7638c8b759fac1c5c8c36d25dcfb9..d724f35e27df7c2a217b6305439b7f2c78c480d5 100755 (executable)
@@ -2,7 +2,7 @@
 #ifndef BOOST_MPL_BITOR_HPP_INCLUDED
 #define BOOST_MPL_BITOR_HPP_INCLUDED
 
-// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright Aleksey Gurtovoy 2000-2009
 // Copyright Jaap Suter 2003
 //
 // Distributed under the Boost Software License, Version 1.0. 
 //
 // See http://www.boost.org/libs/mpl for documentation.
 
-// $Id: bitor.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
-// $Revision: 49267 $
+// $Id: bitor.hpp 63520 2010-07-02 08:59:55Z agurtovoy $
+// $Date: 2010-07-02 04:59:55 -0400 (Fri, 02 Jul 2010) $
+// $Revision: 63520 $
+
+// agurt, 23/jan/10: workaround a conflict with <iso646.h> header's 
+// macros, see http://tinyurl.com/ycwdxco; 'defined(bitor)'
+// has to be checked in a separate condition, otherwise GCC complains 
+// about 'bitor' being an alternative token
+#if defined(_MSC_VER) 
+#ifndef __GCCXML__
+#if defined(bitor)
+#   pragma push_macro("bitor")
+#   undef bitor
+#   define bitor(x)
+#endif
+#endif
+#endif
 
 #define AUX778076_OP_NAME   bitor_
 #define AUX778076_OP_PREFIX bitor
 #define AUX778076_OP_TOKEN  |
 #include <boost/mpl/aux_/arithmetic_op.hpp>
 
+#if defined(_MSC_VER)
+#ifndef __GCCXML__
+#if defined(bitor)
+#   pragma pop_macro("bitor")
+#endif
+#endif
+#endif
+
 #endif // BOOST_MPL_BITOR_HPP_INCLUDED
index 3d94caf8253c78bdb66a68f61ad0e17f7e5630d9..d483c724d3a0da6a809634ef639adb8fed9c9953 100644 (file)
@@ -10,9 +10,9 @@
 //
 // See http://www.boost.org/libs/mpl for documentation.
 
-// $Id: eval_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
-// $Revision: 49267 $
+// $Id: eval_if.hpp 61921 2010-05-11 21:33:24Z neilgroves $
+// $Date: 2010-05-11 17:33:24 -0400 (Tue, 11 May 2010) $
+// $Revision: 61921 $
 
 #include <boost/mpl/if.hpp>
 #include <boost/mpl/aux_/na_spec.hpp>
index 39ed90931449fc8243209a1202189c7df2596f82..925875952ac4e99d18b7e2eb5290d60b4dfb10f4 100644 (file)
@@ -4,6 +4,7 @@
 
 // Copyright Aleksey Gurtovoy 2002-2006
 // Copyright David Abrahams 2002-2003
+// Copyright Daniel Walker 2007
 //
 // Distributed under the Boost Software License, Version 1.0. 
 // (See accompanying file LICENSE_1_0.txt or copy at 
 //
 // See http://www.boost.org/libs/mpl for documentation.
 
-// $Id: has_xxx.hpp 49273 2008-10-11 06:54:06Z agurtovoy $
-// $Date: 2008-10-11 02:54:06 -0400 (Sat, 11 Oct 2008) $
-// $Revision: 49273 $
+// $Id: has_xxx.hpp 64146 2010-07-19 00:46:31Z djwalker $
+// $Date: 2010-07-18 20:46:31 -0400 (Sun, 18 Jul 2010) $
+// $Revision: 64146 $
 
 #include <boost/mpl/bool.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
 #include <boost/mpl/aux_/type_wrapper.hpp>
 #include <boost/mpl/aux_/yes_no.hpp>
+#include <boost/mpl/aux_/config/gcc.hpp>
 #include <boost/mpl/aux_/config/has_xxx.hpp>
 #include <boost/mpl/aux_/config/msvc_typename.hpp>
 #include <boost/mpl/aux_/config/msvc.hpp>
 #include <boost/mpl/aux_/config/static_constant.hpp>
 #include <boost/mpl/aux_/config/workaround.hpp>
 
+#include <boost/preprocessor/array/elem.hpp>
 #include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
 
 #if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) )
 # include <boost/type_traits/is_class.hpp>
@@ -271,4 +278,363 @@ struct trait \
     BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(BOOST_PP_CAT(has_,name), name, false) \
 /**/
 
+
+#if !defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE)
+
+// Create a boolean Metafunction to detect a nested template
+// member. This implementation is based on a USENET newsgroup's
+// posting by Aleksey Gurtovoy (comp.lang.c++.moderated, 2002-03-19),
+// Rani Sharoni's USENET posting cited above, the non-template has_xxx
+// implementations above, and discussion on the Boost mailing list.
+
+#   if !defined(BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES)
+#     if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
+#       define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 1
+#     endif
+#   endif
+
+#   if !defined(BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION)
+#     if (defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS))
+#       define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 1
+#     endif
+#   endif
+
+#   if !defined(BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE)
+#     if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
+#       define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 1
+#     endif
+#   endif
+
+// NOTE: Many internal implementation macros take a Boost.Preprocessor
+// array argument called args which is of the following form.
+//           ( 4, ( trait, name, max_arity, default_ ) )
+
+#   define BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) \
+      BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _introspect) \
+    /**/
+
+#   define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \
+      BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _substitute), n) \
+    /**/
+
+#   define BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args) \
+      BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _test) \
+    /**/
+
+// Thanks to Guillaume Melquiond for pointing out the need for the
+// "substitute" template as an argument to the overloaded test
+// functions to get SFINAE to work for member templates with the
+// correct name but different number of arguments.
+#   define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE(z, n, args) \
+      template< \
+          template< BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n), typename V) > class V \
+       > \
+      struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) { \
+      }; \
+    /**/
+
+#   define BOOST_MPL_HAS_MEMBER_SUBSTITUTE(args, substitute_macro) \
+      BOOST_PP_REPEAT( \
+          BOOST_PP_ARRAY_ELEM(2, args) \
+        , BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE \
+        , args \
+      ) \
+    /**/
+
+#   if !BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION
+#     define BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \
+        template< typename V > \
+        static boost::mpl::aux::no_tag \
+        BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)(...); \
+      /**/
+#   else
+#     define BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \
+        static boost::mpl::aux::no_tag \
+        BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)(...); \
+      /**/
+#   endif
+
+#   if !BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES
+#     define BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT(z, n, args) \
+        template< typename V > \
+        static boost::mpl::aux::yes_tag \
+        BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \
+            boost::mpl::aux::type_wrapper< V > const volatile* \
+          , BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) < \
+                V::template BOOST_PP_ARRAY_ELEM(1, args) \
+            >* = 0 \
+        ); \
+      /**/
+#     define BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \
+        BOOST_PP_REPEAT( \
+            BOOST_PP_ARRAY_ELEM(2, args) \
+          , BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT \
+          , args \
+        ) \
+      /**/
+#   else
+#     define BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \
+        template< typename V > \
+        static boost::mpl::aux::yes_tag \
+        BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \
+            V const volatile* \
+          , member_macro(args, V, T)* = 0 \
+        ); \
+      /**/
+#   endif
+
+#   if !BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION
+#     define BOOST_MPL_HAS_MEMBER_TEST(args) \
+          sizeof(BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< U >(0)) \
+              == sizeof(boost::mpl::aux::yes_tag) \
+      /**/
+#   else
+#     if !BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES
+#       define BOOST_MPL_HAS_MEMBER_TEST(args) \
+          sizeof( \
+              BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \
+                  static_cast< boost::mpl::aux::type_wrapper< U >* >(0) \
+              ) \
+          ) == sizeof(boost::mpl::aux::yes_tag) \
+        /**/
+#     else
+#       define BOOST_MPL_HAS_MEMBER_TEST(args) \
+          sizeof( \
+              BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \
+                  static_cast< U* >(0) \
+              ) \
+          ) == sizeof(boost::mpl::aux::yes_tag) \
+        /**/
+#     endif
+#   endif
+
+#   define BOOST_MPL_HAS_MEMBER_INTROSPECT( \
+               args, substitute_macro, member_macro \
+           ) \
+      template< typename U > \
+      struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) { \
+          BOOST_MPL_HAS_MEMBER_SUBSTITUTE(args, substitute_macro) \
+          BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \
+          BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \
+          BOOST_STATIC_CONSTANT( \
+              bool, value = BOOST_MPL_HAS_MEMBER_TEST(args) \
+          ); \
+          typedef boost::mpl::bool_< value > type; \
+      }; \
+    /**/
+
+#   define BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \
+               args, introspect_macro, substitute_macro, member_macro \
+           ) \
+      template< \
+          typename T \
+        , typename fallback_ \
+              = boost::mpl::bool_< BOOST_PP_ARRAY_ELEM(3, args) > \
+      > \
+      class BOOST_PP_ARRAY_ELEM(0, args) { \
+          introspect_macro(args, substitute_macro, member_macro) \
+      public: \
+          static const bool value \
+              = BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args)< T >::value; \
+          typedef typename BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args)< \
+              T \
+          >::type type; \
+      }; \
+    /**/
+
+// BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE expands to the full
+// implementation of the function-based metafunction. Compile with -E
+// to see the preprocessor output for this macro.
+#   define BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE( \
+               args, substitute_macro, member_macro \
+           ) \
+      BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \
+          args \
+        , BOOST_MPL_HAS_MEMBER_INTROSPECT \
+        , substitute_macro \
+        , member_macro \
+      ) \
+    /**/
+
+#   if BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE
+
+#     if !defined(BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE)
+#       if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
+#         define BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE 1
+#       endif
+#     endif
+
+#     if !BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE
+#       define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \
+                   args, n \
+               ) \
+          BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \
+        /**/
+#     else
+#       define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \
+                   args, n \
+               ) \
+          BOOST_PP_CAT( \
+              boost_mpl_has_xxx_ \
+            , BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \
+          ) \
+        /**/
+#     endif
+
+#     define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME( \
+                 args \
+             ) \
+        BOOST_PP_CAT( \
+            BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \
+                args, 0 \
+            ) \
+          , _tag \
+        ) \
+      /**/
+
+#     define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \
+                 z, n, args \
+             ) \
+        template< \
+             template< BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n), typename U) > class U \
+        > \
+        struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \
+                args, n \
+               ) { \
+            typedef \
+                BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args) \
+                type; \
+        }; \
+      /**/
+
+#     define BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \
+                 args, substitute_macro \
+             ) \
+        typedef void \
+            BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args); \
+        BOOST_PP_REPEAT( \
+            BOOST_PP_ARRAY_ELEM(2, args) \
+          , BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE_WITH_TEMPLATE_SFINAE \
+          , args \
+        ) \
+      /**/
+
+#     define BOOST_MPL_HAS_MEMBER_REJECT_WITH_TEMPLATE_SFINAE( \
+                 args, member_macro \
+             ) \
+        template< \
+            typename U \
+          , typename V \
+                = BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args) \
+        > \
+        struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args) { \
+            BOOST_STATIC_CONSTANT(bool, value = false); \
+            typedef boost::mpl::bool_< value > type; \
+        }; \
+      /**/
+
+#     define BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT_WITH_TEMPLATE_SFINAE( \
+                 z, n, args \
+             ) \
+        template< typename U > \
+        struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< \
+            U \
+          , typename \
+                BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \
+                    args, n \
+                )< \
+                    BOOST_MSVC_TYPENAME U::BOOST_PP_ARRAY_ELEM(1, args)< > \
+                >::type \
+        > { \
+            BOOST_STATIC_CONSTANT(bool, value = true); \
+            typedef boost::mpl::bool_< value > type; \
+        }; \
+      /**/
+
+#     define BOOST_MPL_HAS_MEMBER_ACCEPT_WITH_TEMPLATE_SFINAE( \
+                 args, member_macro \
+             ) \
+        BOOST_PP_REPEAT( \
+            BOOST_PP_ARRAY_ELEM(2, args) \
+          , BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT_WITH_TEMPLATE_SFINAE \
+          , args \
+        ) \
+      /**/
+
+#     define BOOST_MPL_HAS_MEMBER_INTROSPECT_WITH_TEMPLATE_SFINAE( \
+                 args, substitute_macro, member_macro \
+             ) \
+        BOOST_MPL_HAS_MEMBER_REJECT_WITH_TEMPLATE_SFINAE(args, member_macro) \
+        BOOST_MPL_HAS_MEMBER_ACCEPT_WITH_TEMPLATE_SFINAE(args, member_macro) \
+        template< typename U > \
+        struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) \
+            : BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< U > { \
+        }; \
+      /**/
+// BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE expands to the full
+// implementation of the template-based metafunction. Compile with -E
+// to see the preprocessor output for this macro.
+//
+// Note that if BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE is
+// defined BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE needs
+// to be expanded at namespace level before
+// BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE can be used.
+#     define BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE( \
+                 args, substitute_macro, member_macro \
+             ) \
+        BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \
+            args, substitute_macro \
+        ) \
+        BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \
+            args \
+          , BOOST_MPL_HAS_MEMBER_INTROSPECT_WITH_TEMPLATE_SFINAE \
+          , substitute_macro \
+          , member_macro \
+        ) \
+      /**/
+
+#   endif // BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE
+
+// Note: In the current implementation the parameter and access macros
+// are no longer expanded.
+#   if !BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
+#     define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \
+        BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE( \
+            ( 4, ( trait, name, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, default_ ) ) \
+          , BOOST_MPL_HAS_MEMBER_TEMPLATE_SUBSTITUTE_PARAMETER \
+          , BOOST_MPL_HAS_MEMBER_TEMPLATE_ACCESS \
+        ) \
+      /**/
+#   else
+#     define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \
+        BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE( \
+            ( 4, ( trait, name, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, default_ ) ) \
+          , BOOST_MPL_HAS_MEMBER_TEMPLATE_SUBSTITUTE_PARAMETER \
+          , BOOST_MPL_HAS_MEMBER_TEMPLATE_ACCESS \
+        ) \
+      /**/
+#   endif
+
+#else // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE
+
+// placeholder implementation
+
+#   define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \
+      template< typename T \
+              , typename fallback_ = boost::mpl::bool_< default_ > > \
+      struct trait { \
+          BOOST_STATIC_CONSTANT(bool, value = fallback_::value); \
+          typedef fallback_ type; \
+      }; \
+    /**/
+
+#endif // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE
+
+#   define BOOST_MPL_HAS_XXX_TEMPLATE_DEF(name) \
+      BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF( \
+          BOOST_PP_CAT(has_, name), name, false \
+      ) \
+    /**/
+
 #endif // BOOST_MPL_HAS_XXX_HPP_INCLUDED
index 6a9481aaabe386ed3f3b16bb7553bc890fb5a242..c62d8ab9bc74db4baf4f7f48281d7a2f8b438d7a 100755 (executable)
@@ -240,6 +240,18 @@ namespace boost { namespace mpl
         };
     };
 
+    template<typename Tag>
+    struct has_push_back_impl;
+
+    template<>
+    struct has_push_back_impl<mpl::string_tag>
+    {
+        template<typename Sequence>
+        struct apply
+          : mpl::true_
+        {};
+    };
+
     template<typename Tag>
     struct pop_back_impl;
 
@@ -267,6 +279,18 @@ namespace boost { namespace mpl
         #undef M0
     };
 
+    template<typename Tag>
+    struct has_pop_back_impl;
+
+    template<>
+    struct has_pop_back_impl<mpl::string_tag>
+    {
+        template<typename Sequence>
+        struct apply
+          : mpl::true_
+        {};
+    };
+
     template<typename Tag>
     struct push_front_impl;
 
@@ -341,6 +365,18 @@ namespace boost { namespace mpl
         };
     };
 
+    template<typename Tag>
+    struct has_push_front_impl;
+
+    template<>
+    struct has_push_front_impl<mpl::string_tag>
+    {
+        template<typename Sequence>
+        struct apply
+          : mpl::true_
+        {};
+    };
+
     template<typename Tag>
     struct pop_front_impl;
 
@@ -375,6 +411,18 @@ namespace boost { namespace mpl
         };
     };
 
+    template<typename Tag>
+    struct has_pop_front_impl;
+
+    template<>
+    struct has_pop_front_impl<mpl::string_tag>
+    {
+        template<typename Sequence>
+        struct apply
+          : mpl::true_
+        {};
+    };
+
     template<typename Tag>
     struct insert_range_impl;
 
index 7e8e1ac716722196cead95fc5ebfecb76a174605..fc5225f5f6114f249843b1b3eabd5d14c5bd653e 100755 (executable)
@@ -2,7 +2,7 @@
 #ifndef BOOST_MPL_ZIP_VIEW_HPP_INCLUDED
 #define BOOST_MPL_ZIP_VIEW_HPP_INCLUDED
 
-// Copyright Aleksey Gurtovoy 2000-2002
+// Copyright Aleksey Gurtovoy 2000-2010
 // Copyright David Abrahams 2000-2002
 //
 // Distributed under the Boost Software License, Version 1.0.
@@ -11,9 +11,9 @@
 //
 // See http://www.boost.org/libs/mpl for documentation.
 
-// $Id: zip_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
-// $Revision: 49267 $
+// $Id: zip_view.hpp 61591 2010-04-26 21:31:09Z agurtovoy $
+// $Date: 2010-04-26 17:31:09 -0400 (Mon, 26 Apr 2010) $
+// $Revision: 61591 $
 
 #include <boost/mpl/transform.hpp>
 #include <boost/mpl/begin_end.hpp>
@@ -53,6 +53,7 @@ struct zip_view
     
  public:
     typedef nested_begin_end_tag tag;
+    typedef zip_view type;
     typedef zip_iterator<first_ones_> begin;
     typedef zip_iterator<last_ones_> end;
 };
index 42277ba61e5fd462cd18e55ae772c2e03215655c..88041d1441ddf0a5d6e3b0a8779a2b4e77ab099a 100644 (file)
@@ -4,7 +4,7 @@
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 //
-// See http://www.boost.org/lib/optional for documentation.
+// See http://www.boost.org/libs/optional for documentation.
 //
 // You are welcome to contact the author at:
 //  fernando_cacciola@hotmail.com
@@ -168,8 +168,10 @@ class optional_base : public optional_tag
 
     typedef BOOST_DEDUCED_TYPENAME is_reference<T>::type is_reference_predicate ;
 
+  public:
     typedef BOOST_DEDUCED_TYPENAME mpl::if_<is_reference_predicate,types_when_ref,types_when_not_ref>::type types ;
 
+  protected:
     typedef bool (this_type::*unspecified_bool_type)() const;
 
     typedef BOOST_DEDUCED_TYPENAME types::reference_type       reference_type ;
index 2cf4fa654c3d550a96b4a7bc6d159e2ca2fcdb20..dcde233fa511ec718df2eec0b0ea2d531193986a 100644 (file)
@@ -4,7 +4,7 @@
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 //
-// See http://www.boost.org/lib/optional for documentation.
+// See http://www.boost.org/libs/optional for documentation.
 //
 // You are welcome to contact the author at:
 //  fernando_cacciola@hotmail.com
index ef1ecaf3a066461dc4e887aa2775d3d99bee20fb..85a18575d0bdef8978eb60ff2df8dcb7b5ab6eb6 100644 (file)
@@ -4,7 +4,7 @@
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 //
-// See http://www.boost.org/lib/optional for documentation.
+// See http://www.boost.org/libs/optional for documentation.
 //
 // You are welcome to contact the author at:
 //  fernando_cacciola@hotmail.com
index fa2ea48c92886b3d4b4ade9ab278dff8b57676a6..6ef8864274332ea81f2a36d19f213f64f5262d66 100644 (file)
@@ -76,6 +76,49 @@ namespace std{
       typedef boost::char_architype char_type;
    };
 }
+//
+// Allocator architype:
+//
+template <class T>
+class allocator_architype
+{
+public:
+   typedef T* pointer;
+   typedef const T* const_pointer;
+   typedef T& reference;
+   typedef const T& const_reference;
+   typedef T value_type;
+   typedef unsigned size_type;
+   typedef int difference_type;
+
+   template <class U>
+   struct rebind
+   {
+      typedef allocator_architype<U> other;
+   };
+
+   pointer address(reference r);
+   const_pointer address(const_reference r);
+   pointer allocate(size_type);
+   pointer allocate(size_type, pointer);
+   void deallocate(pointer, size_type);
+   size_type max_size()const;
+
+   allocator_architype();
+   allocator_architype(const allocator_architype&);
+
+   template <class Other>
+   allocator_architype(const allocator_architype<Other>&);
+
+   void construct(pointer, const_reference);
+   void destroy(pointer);
+};
+
+template <class T>
+bool operator == (const allocator_architype<T>&, const allocator_architype<T>&);
+template <class T>
+bool operator != (const allocator_architype<T>&, const allocator_architype<T>&);
+
 namespace boost{
 //
 // regex_traits_architype:
@@ -244,7 +287,8 @@ struct BaseRegexConcept
    typedef const value_type* pointer_type;
    typedef bidirectional_iterator_archetype<value_type> BidiIterator;
    typedef global_regex_namespace::sub_match<BidiIterator> sub_match_type;
-   typedef global_regex_namespace::match_results<BidiIterator> match_results_type;
+   typedef global_regex_namespace::match_results<BidiIterator, allocator_architype<sub_match_type> > match_results_type;
+   typedef global_regex_namespace::match_results<BidiIterator> match_results_default_type;
    typedef output_iterator_archetype<value_type> OutIterator;
    typedef typename regex_traits_computer<Regex>::type traits_type;
    typedef global_regex_namespace::regex_iterator<BidiIterator, value_type, traits_type> regex_iterator_type;
@@ -318,7 +362,7 @@ struct BaseRegexConcept
       const global_regex_namespace::regex_error except(e1);
       e1 = except.code();
 
-      typedef typename Regex::value_type value_type;
+      typedef typename Regex::value_type regex_value_type;
       function_requires< RegexTraitsConcept<global_regex_namespace::regex_traits<char> > >();
       function_requires< BaseRegexConcept<global_regex_namespace::basic_regex<char> > >();
    }
@@ -484,10 +528,10 @@ struct BaseRegexConcept
       typedef typename regex_iterator_type::reference rit_reference;
       typedef typename regex_iterator_type::iterator_category rit_iterator_category;
       BOOST_STATIC_ASSERT((::boost::is_same<rit_regex_type, Regex>::value));
-      BOOST_STATIC_ASSERT((::boost::is_same<rit_value_type, match_results_type>::value));
+      BOOST_STATIC_ASSERT((::boost::is_same<rit_value_type, match_results_default_type>::value));
       BOOST_STATIC_ASSERT((::boost::is_same<rit_difference_type, std::ptrdiff_t>::value));
-      BOOST_STATIC_ASSERT((::boost::is_same<rit_pointer, const match_results_type*>::value));
-      BOOST_STATIC_ASSERT((::boost::is_same<rit_reference, const match_results_type&>::value));
+      BOOST_STATIC_ASSERT((::boost::is_same<rit_pointer, const match_results_default_type*>::value));
+      BOOST_STATIC_ASSERT((::boost::is_same<rit_reference, const match_results_default_type&>::value));
       BOOST_STATIC_ASSERT((::boost::is_convertible<rit_iterator_category*, std::forward_iterator_tag*>::value));
       // this takes care of most of the checks needed:
       function_requires<ForwardIteratorConcept<regex_iterator_type> >();
@@ -540,7 +584,10 @@ struct BaseRegexConcept
    OutIterator m_out;
    BidiIterator m_in;
    global_regex_namespace::regex_constants::match_flag_type m_mft;
-   global_regex_namespace::match_results<pointer_type> m_pmatch;
+   global_regex_namespace::match_results<
+      pointer_type, 
+      allocator_architype<global_regex_namespace::sub_match<pointer_type> > > 
+      m_pmatch;
 
    BaseRegexConcept();
    BaseRegexConcept(const BaseRegexConcept&);
@@ -564,7 +611,7 @@ struct RegexConcept
    typedef std::basic_string<value_type> string_type;
    typedef boost::bidirectional_iterator_archetype<value_type> BidiIterator;
    typedef global_regex_namespace::sub_match<BidiIterator> sub_match_type;
-   typedef global_regex_namespace::match_results<BidiIterator> match_results_type;
+   typedef global_regex_namespace::match_results<BidiIterator, allocator_architype<sub_match_type> > match_results_type;
    typedef output_iterator_archetype<value_type> OutIterator;
 
 
@@ -739,7 +786,7 @@ struct RegexConcept
    OutIterator m_out;
    BidiIterator m_in;
    global_regex_namespace::regex_constants::match_flag_type m_mft;
-   global_regex_namespace::match_results<typename string_type::const_iterator> m_smatch;
+   global_regex_namespace::match_results<typename string_type::const_iterator, allocator_architype<global_regex_namespace::sub_match<typename string_type::const_iterator> > > m_smatch;
 
    RegexConcept();
    RegexConcept(const RegexConcept&);
@@ -752,7 +799,7 @@ template <class M>
 struct functor1
 {
    typedef typename M::char_type char_type;
-   const char_type* operator()(const M&)
+   const char_type* operator()(const M&)const
    {
       static const char_type c = static_cast<char_type>(0);
       return &c;
@@ -762,7 +809,7 @@ template <class M>
 struct functor1b
 {
    typedef typename M::char_type char_type;
-   std::vector<char_type> operator()(const M&)
+   std::vector<char_type> operator()(const M&)const
    {
       static const std::vector<char_type> c;
       return c;
@@ -772,7 +819,7 @@ template <class M>
 struct functor2
 {
    template <class O>
-   O operator()(const M& /*m*/, O i)
+   O operator()(const M& /*m*/, O i)const
    {
       return i;
    }
@@ -781,7 +828,7 @@ template <class M>
 struct functor3
 {
    template <class O>
-   O operator()(const M& /*m*/, O i, regex_constants::match_flag_type)
+   O operator()(const M& /*m*/, O i, regex_constants::match_flag_type)const
    {
       return i;
    }
@@ -806,7 +853,8 @@ struct BoostRegexConcept
    typedef bidirectional_iterator_archetype<value_type> BidiIterator;
    typedef output_iterator_archetype<value_type> OutputIterator;
    typedef global_regex_namespace::sub_match<BidiIterator> sub_match_type;
-   typedef global_regex_namespace::match_results<BidiIterator> match_results_type;
+   typedef global_regex_namespace::match_results<BidiIterator, allocator_architype<sub_match_type> > match_results_type;
+   typedef global_regex_namespace::match_results<BidiIterator> match_results_default_type;
 
    void constraints() 
    {
@@ -930,36 +978,90 @@ struct BoostRegexConcept
       //
       regex_constants::match_flag_type f = regex_constants::match_default;
       OutputIterator out = static_object<OutputIterator>::get();
-      functor3<match_results_type> func3;
-      out = regex_format(out, m_cresults, func3, f);
-      out = regex_format(out, m_cresults, func3);
-      functor2<match_results_type> func2;
-      out = regex_format(out, m_cresults, func2, f);
-      out = regex_format(out, m_cresults, func2);
-      functor1<match_results_type> func1;
-      out = regex_format(out, m_cresults, func1, f);
-      out = regex_format(out, m_cresults, func1);
-
-      m_string += regex_format(m_cresults, func3, f);
-      m_string += regex_format(m_cresults, func3);
-      m_string += regex_format(m_cresults, func2, f);
-      m_string += regex_format(m_cresults, func2);
-      m_string += regex_format(m_cresults, func1, f);
-      m_string += regex_format(m_cresults, func1);
-
-      out = m_cresults.format(out, func3, f);
-      out = m_cresults.format(out, func3);
-      out = m_cresults.format(out, func2, f);
-      out = m_cresults.format(out, func2);
-      out = m_cresults.format(out, func1, f);
-      out = m_cresults.format(out, func1);
-
-      m_string += m_cresults.format(func3, f);
-      m_string += m_cresults.format(func3);
-      m_string += m_cresults.format(func2, f);
-      m_string += m_cresults.format(func2);
-      m_string += m_cresults.format(func1, f);
-      m_string += m_cresults.format(func1);
+      
+      functor3<match_results_default_type> func3;
+      functor2<match_results_default_type> func2;
+      functor1<match_results_default_type> func1;
+      
+      functor3<match_results_type> func3b;
+      functor2<match_results_type> func2b;
+      functor1<match_results_type> func1b;
+
+      out = regex_format(out, m_cresults, func3b, f);
+      out = regex_format(out, m_cresults, func3b);
+      out = regex_format(out, m_cresults, func2b, f);
+      out = regex_format(out, m_cresults, func2b);
+      out = regex_format(out, m_cresults, func1b, f);
+      out = regex_format(out, m_cresults, func1b);
+      out = regex_format(out, m_cresults, boost::ref(func3b), f);
+      out = regex_format(out, m_cresults, boost::ref(func3b));
+      out = regex_format(out, m_cresults, boost::ref(func2b), f);
+      out = regex_format(out, m_cresults, boost::ref(func2b));
+      out = regex_format(out, m_cresults, boost::ref(func1b), f);
+      out = regex_format(out, m_cresults, boost::ref(func1b));
+      out = regex_format(out, m_cresults, boost::cref(func3b), f);
+      out = regex_format(out, m_cresults, boost::cref(func3b));
+      out = regex_format(out, m_cresults, boost::cref(func2b), f);
+      out = regex_format(out, m_cresults, boost::cref(func2b));
+      out = regex_format(out, m_cresults, boost::cref(func1b), f);
+      out = regex_format(out, m_cresults, boost::cref(func1b));
+
+      m_string += regex_format(m_cresults, func3b, f);
+      m_string += regex_format(m_cresults, func3b);
+      m_string += regex_format(m_cresults, func2b, f);
+      m_string += regex_format(m_cresults, func2b);
+      m_string += regex_format(m_cresults, func1b, f);
+      m_string += regex_format(m_cresults, func1b);
+      m_string += regex_format(m_cresults, boost::ref(func3b), f);
+      m_string += regex_format(m_cresults, boost::ref(func3b));
+      m_string += regex_format(m_cresults, boost::ref(func2b), f);
+      m_string += regex_format(m_cresults, boost::ref(func2b));
+      m_string += regex_format(m_cresults, boost::ref(func1b), f);
+      m_string += regex_format(m_cresults, boost::ref(func1b));
+      m_string += regex_format(m_cresults, boost::cref(func3b), f);
+      m_string += regex_format(m_cresults, boost::cref(func3b));
+      m_string += regex_format(m_cresults, boost::cref(func2b), f);
+      m_string += regex_format(m_cresults, boost::cref(func2b));
+      m_string += regex_format(m_cresults, boost::cref(func1b), f);
+      m_string += regex_format(m_cresults, boost::cref(func1b));
+
+      out = m_cresults.format(out, func3b, f);
+      out = m_cresults.format(out, func3b);
+      out = m_cresults.format(out, func2b, f);
+      out = m_cresults.format(out, func2b);
+      out = m_cresults.format(out, func1b, f);
+      out = m_cresults.format(out, func1b);
+      out = m_cresults.format(out, boost::ref(func3b), f);
+      out = m_cresults.format(out, boost::ref(func3b));
+      out = m_cresults.format(out, boost::ref(func2b), f);
+      out = m_cresults.format(out, boost::ref(func2b));
+      out = m_cresults.format(out, boost::ref(func1b), f);
+      out = m_cresults.format(out, boost::ref(func1b));
+      out = m_cresults.format(out, boost::cref(func3b), f);
+      out = m_cresults.format(out, boost::cref(func3b));
+      out = m_cresults.format(out, boost::cref(func2b), f);
+      out = m_cresults.format(out, boost::cref(func2b));
+      out = m_cresults.format(out, boost::cref(func1b), f);
+      out = m_cresults.format(out, boost::cref(func1b));
+
+      m_string += m_cresults.format(func3b, f);
+      m_string += m_cresults.format(func3b);
+      m_string += m_cresults.format(func2b, f);
+      m_string += m_cresults.format(func2b);
+      m_string += m_cresults.format(func1b, f);
+      m_string += m_cresults.format(func1b);
+      m_string += m_cresults.format(boost::ref(func3b), f);
+      m_string += m_cresults.format(boost::ref(func3b));
+      m_string += m_cresults.format(boost::ref(func2b), f);
+      m_string += m_cresults.format(boost::ref(func2b));
+      m_string += m_cresults.format(boost::ref(func1b), f);
+      m_string += m_cresults.format(boost::ref(func1b));
+      m_string += m_cresults.format(boost::cref(func3b), f);
+      m_string += m_cresults.format(boost::cref(func3b));
+      m_string += m_cresults.format(boost::cref(func2b), f);
+      m_string += m_cresults.format(boost::cref(func2b));
+      m_string += m_cresults.format(boost::cref(func1b), f);
+      m_string += m_cresults.format(boost::cref(func1b));
 
       out = regex_replace(out, m_in, m_in, ce, func3, f);
       out = regex_replace(out, m_in, m_in, ce, func3);
@@ -967,6 +1069,18 @@ struct BoostRegexConcept
       out = regex_replace(out, m_in, m_in, ce, func2);
       out = regex_replace(out, m_in, m_in, ce, func1, f);
       out = regex_replace(out, m_in, m_in, ce, func1);
+      out = regex_replace(out, m_in, m_in, ce, boost::ref(func3), f);
+      out = regex_replace(out, m_in, m_in, ce, boost::ref(func3));
+      out = regex_replace(out, m_in, m_in, ce, boost::ref(func2), f);
+      out = regex_replace(out, m_in, m_in, ce, boost::ref(func2));
+      out = regex_replace(out, m_in, m_in, ce, boost::ref(func1), f);
+      out = regex_replace(out, m_in, m_in, ce, boost::ref(func1));
+      out = regex_replace(out, m_in, m_in, ce, boost::cref(func3), f);
+      out = regex_replace(out, m_in, m_in, ce, boost::cref(func3));
+      out = regex_replace(out, m_in, m_in, ce, boost::cref(func2), f);
+      out = regex_replace(out, m_in, m_in, ce, boost::cref(func2));
+      out = regex_replace(out, m_in, m_in, ce, boost::cref(func1), f);
+      out = regex_replace(out, m_in, m_in, ce, boost::cref(func1));
 
       functor3<match_results<typename string_type::const_iterator> > func3s;
       functor2<match_results<typename string_type::const_iterator> > func2s;
@@ -977,6 +1091,18 @@ struct BoostRegexConcept
       m_string += regex_replace(m_string, ce, func2s);
       m_string += regex_replace(m_string, ce, func1s, f);
       m_string += regex_replace(m_string, ce, func1s);
+      m_string += regex_replace(m_string, ce, boost::ref(func3s), f);
+      m_string += regex_replace(m_string, ce, boost::ref(func3s));
+      m_string += regex_replace(m_string, ce, boost::ref(func2s), f);
+      m_string += regex_replace(m_string, ce, boost::ref(func2s));
+      m_string += regex_replace(m_string, ce, boost::ref(func1s), f);
+      m_string += regex_replace(m_string, ce, boost::ref(func1s));
+      m_string += regex_replace(m_string, ce, boost::cref(func3s), f);
+      m_string += regex_replace(m_string, ce, boost::cref(func3s));
+      m_string += regex_replace(m_string, ce, boost::cref(func2s), f);
+      m_string += regex_replace(m_string, ce, boost::cref(func2s));
+      m_string += regex_replace(m_string, ce, boost::cref(func1s), f);
+      m_string += regex_replace(m_string, ce, boost::cref(func1s));
    }
 
    std::basic_ostream<value_type> m_stream;
index e4b21384b579c12f9de85b19619bcfde6e6ed33e..d55881a3ea0c4308c603c523d4d755031799b4c7 100644 (file)
  *
  ****************************************************************************/
 
-#if defined(BOOST_HAS_DECLSPEC) && (defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_REGEX_STATIC_LINK)
+#ifndef BOOST_SYMBOL_EXPORT
+#  define BOOST_SYMBOL_EXPORT
+#  define BOOST_SYMBOL_IMPORT
+#endif
+
+#if (defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_REGEX_STATIC_LINK)
 #  if defined(BOOST_REGEX_SOURCE)
-#     define BOOST_REGEX_DECL __declspec(dllexport)
+#     define BOOST_REGEX_DECL BOOST_SYMBOL_EXPORT
 #     define BOOST_REGEX_BUILD_DLL
 #  else
-#     define BOOST_REGEX_DECL __declspec(dllimport)
+#     define BOOST_REGEX_DECL BOOST_SYMBOL_IMPORT
 #  endif
-#endif
-
-#ifndef BOOST_REGEX_DECL
+#else
 #  define BOOST_REGEX_DECL
 #endif
 
index c8770c6d1695559bb26a5765c72efc1e3df228da..e9a55c0c48481d6cdd2b8ee68d54d1b69fe42f48 100644 (file)
 #include <boost/mpl/int_fwd.hpp>
 #include <bitset>
 
+#ifdef BOOST_MSVC
+#pragma warning (push)
+#pragma warning (disable: 4251)
+#endif
 
 namespace boost{
 
@@ -1015,6 +1019,10 @@ inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QU
 
 } // namespace boost.
 
+#ifdef BOOST_MSVC
+#pragma warning (pop)
+#endif
+
 #include <boost/regex/v4/u32regex_iterator.hpp>
 #include <boost/regex/v4/u32regex_token_iterator.hpp>
 
index ee207d0874451d29caacd0a9f3ef38a243cf649e..f3bc0061787f024c096d0d672a9ba3426df399f5 100644 (file)
@@ -769,14 +769,14 @@ void basic_regex_creator<charT, traits>::fixup_recursions(re_syntax_base* state)
       case syntax_element_assert_backref:
          {
             // just check that the index is valid:
-            int id = static_cast<const re_brace*>(state)->index;
-            if(id < 0)
+            int idx = static_cast<const re_brace*>(state)->index;
+            if(idx < 0)
             {
-               id = -id-1;
-               if(id >= 10000)
+               idx = -idx-1;
+               if(idx >= 10000)
                {
-                  id = m_pdata->get_id(id);
-                  if(id <= 0)
+                  idx = m_pdata->get_id(idx);
+                  if(idx <= 0)
                   {
                      // check of sub-expression that doesn't exist:
                      if(0 == this->m_pdata->m_status) // update the error code if not already set
@@ -804,12 +804,12 @@ void basic_regex_creator<charT, traits>::fixup_recursions(re_syntax_base* state)
          {
             bool ok = false;
             re_syntax_base* p = base;
-            int id = static_cast<re_jump*>(state)->alt.i;
-            if(id > 10000)
-               id = m_pdata->get_id(id);
+            std::ptrdiff_t idx = static_cast<re_jump*>(state)->alt.i;
+            if(idx > 10000)
+               idx = m_pdata->get_id(idx);
             while(p)
             {
-               if((p->type == syntax_element_startmark) && (static_cast<re_brace*>(p)->index == id))
+               if((p->type == syntax_element_startmark) && (static_cast<re_brace*>(p)->index == idx))
                {
                   //
                   // We've found the target of the recursion, set the jump target:
@@ -833,7 +833,7 @@ void basic_regex_creator<charT, traits>::fixup_recursions(re_syntax_base* state)
                         next_rep_id = static_cast<re_repeat*>(p)->state_id;
                         break;
                      case syntax_element_endmark:
-                        if(static_cast<const re_brace*>(p)->index == id)
+                        if(static_cast<const re_brace*>(p)->index == idx)
                            next_rep_id = -1;
                         break;
                      default: 
@@ -1039,6 +1039,14 @@ int basic_regex_creator<charT, traits>::calculate_backstep(re_syntax_base* state
       case syntax_element_jump:
          state = static_cast<re_jump*>(state)->alt.p;
          continue;
+      case syntax_element_alt:
+         {
+            int r1 = calculate_backstep(state->next.p);
+            int r2 = calculate_backstep(static_cast<re_alt*>(state)->alt.p);
+            if((r1 < 0) || (r1 != r2))
+               return -1;
+            return result + r1;
+         }
       default:
          break;
       }
@@ -1543,3 +1551,4 @@ void basic_regex_creator<charT, traits>::probe_leading_repeat(re_syntax_base* st
 #endif
 
 #endif
+
index 3ea4d6453da6fa5ec9a26b0f18c3e19d970c90a9..172b53a0082a396081b387cfaf079dcdcb69beb5 100644 (file)
@@ -1906,7 +1906,9 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
    m_has_case_change = false;
    charT name_delim;
    int mark_reset = m_mark_reset;
+   int max_mark = m_max_mark;
    m_mark_reset = -1;
+   m_max_mark = m_mark_count;
    int v;
    //
    // select the actual extension used:
@@ -2536,6 +2538,7 @@ option_group_jump:
       m_mark_count = m_max_mark;
    }
    m_mark_reset = mark_reset;
+   m_max_mark = max_mark;
 
 
    if(markid > 0)
index bb40aa1ed879eddde63b1975b6895afe5f2dc53c..addc96cd6e4c8e459cb919dbe3d71872fd16f7d1 100644 (file)
@@ -56,7 +56,7 @@
 
 #ifdef BOOST_MSVC
 #pragma warning(push)
-#pragma warning(disable:4786)
+#pragma warning(disable:4786 4251)
 #endif
 
 namespace boost{ 
index d12dc6b270971a4d3677b8950ca6759d09d229d4..c62d136fff6f695578b947d7506f43fd4e82b657 100644 (file)
@@ -118,10 +118,14 @@ template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher< std::
 
 #undef BOOST_REGEX_TEMPLATE_DECL
 
-#elif (defined(__GNUC__) && (__GNUC__ >= 3))
+#elif (defined(__GNUC__) && (__GNUC__ >= 3)) || !defined(BOOST_NO_EXTERN_TEMPLATE)
 
 #  ifndef BOOST_REGEX_INSTANTIATE
-#     define template __extension__ extern template
+#     ifdef __GNUC__
+#        define template __extension__ extern template
+#     else
+#        define template extern template
+#     endif
 #  endif
 
 #if !defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_REGEX_ICU_INSTANCES)
index cd6b9eb5567d24735138cef5241a61a9bca71660..8f11bbbe5ad8b96e2ebc4ca83b3f0c8d9ae66acc 100644 (file)
@@ -393,7 +393,6 @@ public:
       std::swap(m_subs, that.m_subs);
       std::swap(m_named_subs, that.m_named_subs);
       std::swap(m_last_closed_paren, that.m_last_closed_paren);
-      std::swap(m_is_singular, that.m_is_singular);
       if(m_is_singular)
       {
          if(!that.m_is_singular)
@@ -412,6 +411,7 @@ public:
          std::swap(m_base, that.m_base);
          std::swap(m_null, that.m_null);
       }
+      std::swap(m_is_singular, that.m_is_singular);
    }
    bool operator==(const match_results& that)const
    {
@@ -457,7 +457,7 @@ public:
    void BOOST_REGEX_CALL set_second(BidiIterator i, size_type pos, bool m = true, bool escape_k = false)
    {
       if(pos)
-         m_last_closed_paren = pos;
+         m_last_closed_paren = static_cast<int>(pos);
       pos += 2;
       BOOST_ASSERT(m_subs.size() > pos);
       m_subs[pos].second = i;
index 52e0bcecb54ee4a1699867146191c395648c9076..52cc55cc68ce0a0132593a3cc3e82aa359c2c6a2 100644 (file)
@@ -336,7 +336,7 @@ struct recursion_info
 {
    typedef typename Results::value_type value_type;
    typedef typename value_type::iterator iterator;
-   int id;
+   int idx;
    const re_syntax_base* preturn_address;
    Results results;
    repeater_count<iterator>* repeater_stack;
@@ -366,7 +366,7 @@ public:
       BidiIterator l_base)
       :  m_result(what), base(first), last(end), 
          position(first), backstop(l_base), re(e), traits_inst(e.get_traits()), 
-         m_independent(false), next_count(&rep_obj), rep_obj(&next_count), recursion_stack_position(0)
+         m_independent(false), next_count(&rep_obj), rep_obj(&next_count)
    {
       construct_init(e, f);
    }
@@ -468,9 +468,9 @@ private:
    // matching flags in use:
    match_flag_type m_match_flags;
    // how many states we have examined so far:
-   boost::uintmax_t state_count;
+   std::ptrdiff_t state_count;
    // max number of states to examine before giving up:
-   boost::uintmax_t max_state_count;
+   std::ptrdiff_t max_state_count;
    // whether we should ignore case or not:
    bool icase;
    // set to true when (position == last), indicates that we may have a partial match:
@@ -488,8 +488,7 @@ private:
    // the bitmask to use when determining whether a match_any matches a newline or not:
    unsigned char match_any_mask;
    // recursion information:
-   recursion_info<results_type> recursion_stack[50];
-   unsigned recursion_stack_position;
+   std::vector<recursion_info<results_type> > recursion_stack;
 
 #ifdef BOOST_REGEX_NON_RECURSIVE
    //
@@ -523,7 +522,7 @@ private:
    void push_repeater_count(int i, repeater_count<BidiIterator>** s);
    void push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id);
    void push_non_greedy_repeat(const re_syntax_base* ps);
-   void push_recursion(int id, const re_syntax_base* p, results_type* presults);
+   void push_recursion(int idx, const re_syntax_base* p, results_type* presults);
    void push_recursion_pop();
 
    // pointer to base of stack:
index fd439f84b62bbb71b93e7c27142834046c8263b2..fe2242100062b099511bd7a2defc4cc13d3bdade 100644 (file)
@@ -98,23 +98,23 @@ void perl_matcher<BidiIterator, Allocator, traits>::estimate_max_state_count(std
    //
    // Calculate NS^2 first:
    //
-   static const boost::uintmax_t k = 100000;
-   boost::uintmax_t dist = boost::re_detail::distance(base, last);
+   static const std::ptrdiff_t k = 100000;
+   std::ptrdiff_t dist = boost::re_detail::distance(base, last);
    if(dist == 0)
       dist = 1;
-   boost::uintmax_t states = re.size();
+   std::ptrdiff_t states = re.size();
    if(states == 0)
       states = 1;
    states *= states;
-   if((std::numeric_limits<boost::uintmax_t>::max)() / dist < states)
+   if((std::numeric_limits<std::ptrdiff_t>::max)() / dist < states)
    {
-      max_state_count = (std::numeric_limits<boost::uintmax_t>::max)() - 2;
+      max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits<std::ptrdiff_t>::max)() - 2);
       return;
    }
    states *= dist;
-   if((std::numeric_limits<boost::uintmax_t>::max)() - k < states)
+   if((std::numeric_limits<std::ptrdiff_t>::max)() - k < states)
    {
-      max_state_count = (std::numeric_limits<boost::uintmax_t>::max)() - 2;
+      max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits<std::ptrdiff_t>::max)() - 2);
       return;
    }
    states += k;
@@ -125,15 +125,15 @@ void perl_matcher<BidiIterator, Allocator, traits>::estimate_max_state_count(std
    // Now calculate N^2:
    //
    states = dist;
-   if((std::numeric_limits<boost::uintmax_t>::max)() / dist < states)
+   if((std::numeric_limits<std::ptrdiff_t>::max)() / dist < states)
    {
-      max_state_count = (std::numeric_limits<boost::uintmax_t>::max)() - 2;
+      max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits<std::ptrdiff_t>::max)() - 2);
       return;
    }
    states *= dist;
-   if((std::numeric_limits<boost::uintmax_t>::max)() - k < states)
+   if((std::numeric_limits<std::ptrdiff_t>::max)() - k < states)
    {
-      max_state_count = (std::numeric_limits<boost::uintmax_t>::max)() - 2;
+      max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits<std::ptrdiff_t>::max)() - 2);
       return;
    }
    states += k;
@@ -732,10 +732,10 @@ inline bool perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref(
    {
       // Have we recursed into subexpression "index"?
       // If index == 0 then check for any recursion at all, otherwise for recursion to -index-1.
-      int id = -index-1;
-      if(id >= 10000)
-         id = re.get_data().get_id(id);
-      result = recursion_stack_position && ((recursion_stack[recursion_stack_position-1].id == id) || (index == 0));
+      int idx = -index-1;
+      if(idx >= 10000)
+         idx = re.get_data().get_id(idx);
+      result = !recursion_stack.empty() && ((recursion_stack.back().idx == idx) || (index == 0));
       pstate = pstate->next.p;
    }
    return result;
index 0fcd45482a073fbafdb06f440f6f173ec9a953e3..7ab678170b8bb4896aafbf02f63b63170b441d2d 100644 (file)
@@ -130,8 +130,8 @@ struct saved_single_repeat : public saved_state
 template <class Results>
 struct saved_recursion : public saved_state
 {
-   saved_recursion(int id, const re_syntax_base* p, Results* pr) 
-      : saved_state(14), recursion_id(id), preturn_address(p), results(*pr)
+   saved_recursion(int idx, const re_syntax_base* p, Results* pr) 
+      : saved_state(14), recursion_id(idx), preturn_address(p), results(*pr)
    {}
    int recursion_id;
    const re_syntax_base* preturn_address;
@@ -329,7 +329,7 @@ inline void perl_matcher<BidiIterator, Allocator, traits>::push_single_repeat(st
 }
 
 template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_recursion(int id, const re_syntax_base* p, results_type* presults)
+inline void perl_matcher<BidiIterator, Allocator, traits>::push_recursion(int idx, const re_syntax_base* p, results_type* presults)
 {
    saved_recursion<results_type>* pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
    --pmp;
@@ -339,7 +339,7 @@ inline void perl_matcher<BidiIterator, Allocator, traits>::push_recursion(int id
       pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
       --pmp;
    }
-   (void) new (pmp)saved_recursion<results_type>(id, p, presults);
+   (void) new (pmp)saved_recursion<results_type>(idx, p, presults);
    m_backup_state = pmp;
 }
 
@@ -898,20 +898,19 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_recursion()
    //
    // Set new call stack:
    //
-   if(recursion_stack_position >= static_cast<int>(sizeof(recursion_stack)/sizeof(recursion_stack[0])))
+   if(recursion_stack.capacity() == 0)
    {
-      return false;
+      recursion_stack.reserve(50);
    }
-   recursion_stack[recursion_stack_position].preturn_address = pstate->next.p;
-   recursion_stack[recursion_stack_position].results = *m_presult;
+   recursion_stack.push_back(recursion_info<results_type>());
+   recursion_stack.back().preturn_address = pstate->next.p;
+   recursion_stack.back().results = *m_presult;
    if(static_cast<const re_recurse*>(pstate)->state_id > 0)
    {
       push_repeater_count(static_cast<const re_recurse*>(pstate)->state_id, &next_count);
    }
    pstate = static_cast<const re_jump*>(pstate)->alt.p;
-   recursion_stack[recursion_stack_position].id = static_cast<const re_brace*>(pstate)->index;
-   ++recursion_stack_position;
-   //BOOST_ASSERT(recursion_stack[recursion_stack_position-1].id);
+   recursion_stack.back().idx = static_cast<const re_brace*>(pstate)->index;
 
    return true;
 }
@@ -927,14 +926,14 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_endmark()
       {
          m_presult->set_second(position, index);
       }
-      if(recursion_stack_position)
+      if(!recursion_stack.empty())
       {
-         if(index == recursion_stack[recursion_stack_position-1].id)
+         if(index == recursion_stack.back().idx)
          {
-            --recursion_stack_position;
-            pstate = recursion_stack[recursion_stack_position].preturn_address;
-            *m_presult = recursion_stack[recursion_stack_position].results;
-            push_recursion(recursion_stack[recursion_stack_position].id, recursion_stack[recursion_stack_position].preturn_address, &recursion_stack[recursion_stack_position].results);
+            pstate = recursion_stack.back().preturn_address;
+            *m_presult = recursion_stack.back().results;
+            push_recursion(recursion_stack.back().idx, recursion_stack.back().preturn_address, &recursion_stack.back().results);
+            recursion_stack.pop_back();
          }
       }
    }
@@ -951,13 +950,13 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_endmark()
 template <class BidiIterator, class Allocator, class traits>
 bool perl_matcher<BidiIterator, Allocator, traits>::match_match()
 {
-   if(recursion_stack_position)
+   if(!recursion_stack.empty())
    {
-      BOOST_ASSERT(0 == recursion_stack[recursion_stack_position-1].id);
-      --recursion_stack_position;
-      pstate = recursion_stack[recursion_stack_position].preturn_address;
-      *m_presult = recursion_stack[recursion_stack_position].results;
-      push_recursion(recursion_stack[recursion_stack_position].id, recursion_stack[recursion_stack_position].preturn_address, &recursion_stack[recursion_stack_position].results);
+      BOOST_ASSERT(0 == recursion_stack.back().idx);
+      pstate = recursion_stack.back().preturn_address;
+      *m_presult = recursion_stack.back().results;
+      push_recursion(recursion_stack.back().idx, recursion_stack.back().preturn_address, &recursion_stack.back().results);
+      recursion_stack.pop_back();
       return true;
    }
    if((m_match_flags & match_not_null) && (position == (*m_presult)[0].first))
@@ -1523,10 +1522,10 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion(bool r)
    saved_recursion<results_type>* pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
    if(!r)
    {
-      recursion_stack[recursion_stack_position].id = pmp->recursion_id;
-      recursion_stack[recursion_stack_position].preturn_address = pmp->preturn_address;
-      recursion_stack[recursion_stack_position].results = pmp->results;
-      ++recursion_stack_position;
+      recursion_stack.push_back(recursion_info<results_type>());
+      recursion_stack.back().idx = pmp->recursion_id;
+      recursion_stack.back().preturn_address = pmp->preturn_address;
+      recursion_stack.back().results = pmp->results;
    }
    boost::re_detail::inplace_destroy(pmp++);
    m_backup_state = pmp;
@@ -1539,7 +1538,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_pop(bool r)
    saved_state* pmp = static_cast<saved_state*>(m_backup_state);
    if(!r)
    {
-      --recursion_stack_position;
+      recursion_stack.pop_back();
    }
    boost::re_detail::inplace_destroy(pmp++);
    m_backup_state = pmp;
index d0de8025ee66c78789f2c5627a03ce62462711dc..74c2912204d2437ed97147162ac1e0a99e70a9ed 100644 (file)
@@ -857,16 +857,16 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_recursion()
    //
    // Set new call stack:
    //
-   if(recursion_stack_position >= static_cast<int>(sizeof(recursion_stack)/sizeof(recursion_stack[0])))
+   if(recursion_stack.capacity() == 0)
    {
-      return false;
+      recursion_stack.reserve(50);
    }
-   recursion_stack[recursion_stack_position].preturn_address = pstate->next.p;
-   recursion_stack[recursion_stack_position].results = *m_presult;
-   recursion_stack[recursion_stack_position].repeater_stack = next_count;
+   recursion_stack.push_back(recursion_info<results_type>());
+   recursion_stack.back().preturn_address = pstate->next.p;
+   recursion_stack.back().results = *m_presult;
+   recursion_stack.back().repeater_stack = next_count;
    pstate = static_cast<const re_jump*>(pstate)->alt.p;
-   recursion_stack[recursion_stack_position].id = static_cast<const re_brace*>(pstate)->index;
-   ++recursion_stack_position;
+   recursion_stack.back().idx = static_cast<const re_brace*>(pstate)->index;
 
    repeater_count<BidiIterator>* saved = next_count;
    repeater_count<BidiIterator> r(&next_count); // resets all repeat counts since we're recursing and starting fresh on those
@@ -876,9 +876,9 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_recursion()
 
    if(!result)
    {
-      --recursion_stack_position;
-      next_count = recursion_stack[recursion_stack_position].repeater_stack;
-      *m_presult = recursion_stack[recursion_stack_position].results;
+      next_count = recursion_stack.back().repeater_stack;
+      *m_presult = recursion_stack.back().results;
+      recursion_stack.pop_back();
       return false;
    }
    return true;
@@ -895,20 +895,19 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_endmark()
       {
          m_presult->set_second(position, index);
       }
-      if(recursion_stack_position)
+      if(!recursion_stack.empty())
       {
-         if(index == recursion_stack[recursion_stack_position-1].id)
+         if(index == recursion_stack.back().idx)
          {
-            --recursion_stack_position;
-            recursion_info<results_type> saved = recursion_stack[recursion_stack_position];
+            recursion_info<results_type> saved = recursion_stack.back();
+            recursion_stack.pop_back();
             const re_syntax_base* saved_state = pstate = saved.preturn_address;
             repeater_count<BidiIterator>* saved_count = next_count;
             next_count = saved.repeater_stack;
             *m_presult = saved.results;
             if(!match_all_states())
             {
-               recursion_stack[recursion_stack_position] = saved;
-               ++recursion_stack_position;
+               recursion_stack.push_back(saved);
                next_count = saved_count;
                return false;
             }
@@ -928,17 +927,17 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_endmark()
 template <class BidiIterator, class Allocator, class traits>
 bool perl_matcher<BidiIterator, Allocator, traits>::match_match()
 {
-   if(recursion_stack_position)
+   if(!recursion_stack.empty())
    {
-      BOOST_ASSERT(0 == recursion_stack[recursion_stack_position-1].id);
-      --recursion_stack_position;
-      const re_syntax_base* saved_state = pstate = recursion_stack[recursion_stack_position].preturn_address;
-      *m_presult = recursion_stack[recursion_stack_position].results;
+      BOOST_ASSERT(0 == recursion_stack.back().idx);
+      const re_syntax_base* saved_state = pstate = recursion_stack.back().preturn_address;
+      *m_presult = recursion_stack.back().results;
+      recursion_stack.pop_back();
       if(!match_all_states())
       {
-         recursion_stack[recursion_stack_position].preturn_address = saved_state;
-         recursion_stack[recursion_stack_position].results = *m_presult;
-         ++recursion_stack_position;
+         recursion_stack.push_back(recursion_info<results_type>());
+         recursion_stack.back().preturn_address = saved_state;
+         recursion_stack.back().results = *m_presult;
          return false;
       }
       return true;
index 0ca9baa7aed0d3f2ca9ead08ef07e4e0892dd727..2bd6bac1d31b7f566783544b839297375c5ed29b 100644 (file)
@@ -34,6 +34,7 @@
 #ifndef BOOST_NO_SFINAE
 #include <boost/mpl/has_xxx.hpp>
 #endif
+#include <boost/ref.hpp>
 
 namespace boost{
 
@@ -334,7 +335,7 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
             m_position = --base;
          }
       }
-      put((this->m_results)[this->m_results.size() > 1 ? this->m_results.size() - 1 : 1]);
+      put((this->m_results)[this->m_results.size() > 1 ? static_cast<int>(this->m_results.size() - 1) : 1]);
       break;
    case '{':
       have_brace = true;
@@ -384,7 +385,7 @@ bool basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::handle
    if(have_brace && (*m_position == '^'))
       ++m_position;
 
-   int max_len = m_end - m_position;
+   std::ptrdiff_t max_len = m_end - m_position;
 
    if((max_len >= 5) && std::equal(m_position, m_position + 5, MATCH))
    {
@@ -447,7 +448,7 @@ bool basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::handle
             return false;
          }
       }
-      put((this->m_results)[this->m_results.size() > 1 ? this->m_results.size() - 1 : 1]);
+      put((this->m_results)[this->m_results.size() > 1 ? static_cast<int>(this->m_results.size() - 1) : 1]);
       return true;
    }
    if((max_len >= 20) && std::equal(m_position, m_position + 20, LAST_SUBMATCH_RESULT))
@@ -895,7 +896,7 @@ private:
    // F must be a pointer, a function, or a class with a function call operator:
    //
    BOOST_STATIC_ASSERT((::boost::is_pointer<F>::value || ::boost::is_function<F>::value || ::boost::is_class<F>::value));
-   static formatter_wrapper<F> f;
+   static formatter_wrapper<typename unwrap_reference<F>::type> f;
    static M m;
    static O out;
    static boost::regex_constants::match_flag_type flags;
@@ -963,7 +964,7 @@ struct format_functor3
    template <class OutputIter>
    OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f)
    {
-      return func(m, i, f);
+      return boost::unwrap_ref(func)(m, i, f);
    }
    template <class OutputIter, class Traits>
    OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
@@ -983,7 +984,7 @@ struct format_functor2
    template <class OutputIter>
    OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type /*f*/)
    {
-      return func(m, i);
+      return boost::unwrap_ref(func)(m, i);
    }
    template <class OutputIter, class Traits>
    OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
@@ -1020,7 +1021,7 @@ struct format_functor1
    template <class OutputIter>
    OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type /*f*/)
    {
-      return do_format_string(func(m), i);
+      return do_format_string(boost::unwrap_ref(func)(m), i);
    }
    template <class OutputIter, class Traits>
    OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
index 06527f1a1f9675ae7da9ed9070427ec659631998..46a8a8d3af120678872d59de73da6ab80653ce26 100644 (file)
@@ -149,7 +149,37 @@ namespace boost{ namespace re_detail{
    {
       return stdext::unchecked_equal(first, last, with);
    }
-
+#elif BOOST_WORKAROUND(BOOST_MSVC, > 1500)
+   //
+   // MSVC 10 will either emit warnings or else refuse to compile
+   // code that makes perfectly legitimate use of std::copy, when
+   // the OutputIterator type is a user-defined class (apparently all user 
+   // defined iterators are "unsafe").  What's more Microsoft have removed their
+   // non-standard "unchecked" versions, even though their still in the MS
+   // documentation!! Work around this as best we can: 
+   //
+   template<class InputIterator, class OutputIterator>
+   inline OutputIterator copy(
+      InputIterator first, 
+      InputIterator last, 
+      OutputIterator dest
+   )
+   {
+      while(first != last)
+         *dest++ = *first++;
+      return dest;
+   }
+   template<class InputIterator1, class InputIterator2>
+   inline bool equal(
+      InputIterator1 first, 
+      InputIterator1 last, 
+      InputIterator2 with
+   )
+   {
+      while(first != last)
+         if(*first++ != *with++) return false;
+      return true;
+   }
 #else 
    using std::copy; 
    using std::equal; 
index c47a2192c7daac95986a0f31db41a1c33357f361..4039494df2a0121c374c49501aced1ffd126d6ac 100644 (file)
@@ -292,7 +292,7 @@ template <class charT, class Traits, class Alloc>
 inline u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> make_u32regex_token_iterator(const std::basic_string<charT, Traits, Alloc>& p, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
 {
    typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type;
-   return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, m);
+   return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, submatch, m);
 }
 inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
 {
index b7f0ea8f2ddd26ee0bde8762dead3b7c61143fc0..eb39797b510ea7fa1f2e25dc54e0ba196657d2a6 100644 (file)
@@ -25,7 +25,7 @@
 # define BOOST_SP_NO_SP_CONVERTIBLE
 #endif
 
-#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x620 )
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x630 )
 # define BOOST_SP_NO_SP_CONVERTIBLE
 #endif
 
@@ -45,7 +45,7 @@ template< class Y, class T > struct sp_convertible
     static yes f( T* );
     static no  f( ... );
 
-    enum _vt { value = sizeof( f( static_cast<Y*>(0) ) ) == sizeof(yes) };
+    enum _vt { value = sizeof( (f)( static_cast<Y*>(0) ) ) == sizeof(yes) };
 };
 
 struct sp_empty
index a956cc0c974168883d99badc46961e076b983493..23eadd808bacc9740f256d459f83d6e5f7492cee 100644 (file)
@@ -55,7 +55,7 @@ namespace detail
 {
 
 #if !defined( BOOST_USE_WINDOWS_H )
-  extern "C" void __stdcall Sleep( unsigned ms );
+  extern "C" void __stdcall Sleep( unsigned long ms );
 #endif
 
 inline void yield( unsigned k )
index d47718808c44c0473ba5ba0f2ebcb75028609509..c4ed28af9a0a0a4d76303f10ad25d4b27ceb365e 100644 (file)
@@ -87,10 +87,12 @@ public:
 };
 
 #if defined( BOOST_HAS_RVALUE_REFS )
-template< class T > T&& forward( T &&t )
+
+template< class T > T&& sp_forward( T & t )
 {
-    return t;
+    return static_cast< T&& >( t );
 }
+
 #endif
 
 } // namespace detail
@@ -101,9 +103,9 @@ template< class T > T&& forward( T &&t )
 
 template< class T > boost::shared_ptr< T > make_shared()
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -118,9 +120,9 @@ template< class T > boost::shared_ptr< T > make_shared()
 
 template< class T, class A > boost::shared_ptr< T > allocate_shared( A const & a )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -137,15 +139,15 @@ template< class T, class A > boost::shared_ptr< T > allocate_shared( A const & a
 
 // Variadic templates, rvalue reference
 
-template< class T, class... Args > boost::shared_ptr< T > make_shared( Args && ... args )
+template< class T, class Arg1, class... Args > boost::shared_ptr< T > make_shared( Arg1 && arg1, Args && ... args )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
-    ::new( pv ) T( detail::forward<Args>( args )... );
+    ::new( pv ) T( boost::detail::sp_forward<Arg1>( arg1 ), boost::detail::sp_forward<Args>( args )... );
     pd->set_initialized();
 
     T * pt2 = static_cast< T* >( pv );
@@ -154,15 +156,15 @@ template< class T, class... Args > boost::shared_ptr< T > make_shared( Args && .
     return boost::shared_ptr< T >( pt, pt2 );
 }
 
-template< class T, class A, class... Args > boost::shared_ptr< T > allocate_shared( A const & a, Args && ... args )
+template< class T, class A, class Arg1, class... Args > boost::shared_ptr< T > allocate_shared( A const & a, Arg1 && arg1, Args && ... args )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
-    ::new( pv ) T( detail::forward<Args>( args )... );
+    ::new( pv ) T( boost::detail::sp_forward<Arg1>( arg1 ), boost::detail::sp_forward<Args>( args )... );
     pd->set_initialized();
 
     T * pt2 = static_cast< T* >( pv );
@@ -178,9 +180,9 @@ template< class T, class A, class... Args > boost::shared_ptr< T > allocate_shar
 template< class T, class A1 >
 boost::shared_ptr< T > make_shared( A1 const & a1 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -196,9 +198,9 @@ boost::shared_ptr< T > make_shared( A1 const & a1 )
 template< class T, class A, class A1 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -214,9 +216,9 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1 )
 template< class T, class A1, class A2 >
 boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -232,9 +234,9 @@ boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2 )
 template< class T, class A, class A1, class A2 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -250,9 +252,9 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a
 template< class T, class A1, class A2, class A3 >
 boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -268,9 +270,9 @@ boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3
 template< class T, class A, class A1, class A2, class A3 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -286,9 +288,9 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a
 template< class T, class A1, class A2, class A3, class A4 >
 boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -304,9 +306,9 @@ boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3,
 template< class T, class A, class A1, class A2, class A3, class A4 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -322,9 +324,9 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a
 template< class T, class A1, class A2, class A3, class A4, class A5 >
 boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -340,9 +342,9 @@ boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3,
 template< class T, class A, class A1, class A2, class A3, class A4, class A5 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -358,9 +360,9 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a
 template< class T, class A1, class A2, class A3, class A4, class A5, class A6 >
 boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -376,9 +378,9 @@ boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3,
 template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -394,9 +396,9 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a
 template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 >
 boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -412,9 +414,9 @@ boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3,
 template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -430,9 +432,9 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a
 template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 >
 boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -448,9 +450,9 @@ boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3,
 template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -466,9 +468,9 @@ boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a
 template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 >
 boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >() );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >() );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
@@ -484,9 +486,9 @@ boost::shared_ptr< T > make_shared( A1 const & a1, A2 const & a2, A3 const & a3,
 template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 >
 boost::shared_ptr< T > allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9 )
 {
-    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), detail::sp_ms_deleter< T >(), a );
+    boost::shared_ptr< T > pt( static_cast< T* >( 0 ), boost::detail::sp_ms_deleter< T >(), a );
 
-    detail::sp_ms_deleter< T > * pd = boost::get_deleter< detail::sp_ms_deleter< T > >( pt );
+    boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
 
     void * pv = pd->address();
 
index 656b8de31e23a90c65b926243128ccbd9767f42a..a38405400e0c40e968cb61db2ef9fc077906efd9 100644 (file)
 #if !defined( BOOST_EXCEPTION_DISABLE )
 # include <boost/exception/exception.hpp>
 # include <boost/current_function.hpp>
-# define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(::boost::enable_error_info(x) <<\
-    ::boost::throw_function(BOOST_CURRENT_FUNCTION) <<\
-    ::boost::throw_file(__FILE__) <<\
-    ::boost::throw_line(__LINE__))
+# define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_CURRENT_FUNCTION,__FILE__,__LINE__)
 #else
 # define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x)
 #endif
 
 namespace boost
 {
-
 #ifdef BOOST_NO_EXCEPTIONS
 
 void throw_exception( std::exception const & e ); // user defined
@@ -70,6 +66,26 @@ template<class E> BOOST_ATTRIBUTE_NORETURN inline void throw_exception( E const
 
 #endif
 
+#if !defined( BOOST_EXCEPTION_DISABLE )
+    namespace
+    exception_detail
+    {
+        template <class E>
+        BOOST_ATTRIBUTE_NORETURN
+        void
+        throw_exception_( E const & x, char const * current_function, char const * file, int line )
+        {
+            boost::throw_exception(
+                set_info(
+                    set_info(
+                        set_info(
+                            enable_error_info(x),
+                            throw_function(current_function)),
+                        throw_file(file)),
+                    throw_line(line)));
+        }
+    }
+#endif
 } // namespace boost
 
 #endif // #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED
index ef7ba7306676c0e25ac0d77773e04cc761feaac2..57d2954c0af924c37f75eafab06d7acd1d58f31d 100644 (file)
@@ -40,6 +40,9 @@
 #include <boost/assert.hpp>
 #include <boost/detail/workaround.hpp>
 #include <boost/mpl/if.hpp>
+#if !defined(BOOST_NO_CWCTYPE)
+#include <cwctype>
+#endif
 
 //
 // the following must not be macros if we are to prefix them
 #ifdef ispunct
 #  undef ispunct
 #endif
+#ifdef iswpunct
+#  undef iswpunct
+#endif
 #ifdef isspace
 #  undef isspace
 #endif
+#ifdef iswspace
+#  undef iswspace
+#endif
 //
 // fix namespace problems:
 //
 namespace std{
  using ::ispunct;
  using ::isspace;
+#if !defined(BOOST_NO_CWCTYPE)
+ using ::iswpunct;
+ using ::iswspace;
+#endif
 }
 #endif
 
 namespace boost{
-
   //===========================================================================
   // The escaped_list_separator class. Which is a model of TokenizerFunction
   // An escaped list is a super-set of what is commonly known as a comma 
@@ -76,17 +88,12 @@ namespace boost{
   struct escaped_list_error : public std::runtime_error{
     escaped_list_error(const std::string& what_arg):std::runtime_error(what_arg) { }
   };
-  
+
 
 // The out of the box GCC 2.95 on cygwin does not have a char_traits class.
 // MSVC does not like the following typename
-#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
-  template <class Char, 
-    class Traits = typename std::basic_string<Char>::traits_type >
-#else
-  template <class Char, 
-    class Traits = std::basic_string<Char>::traits_type >
-#endif
+  template <class Char,
+    class Traits = BOOST_DEDUCED_TYPENAME std::basic_string<Char>::traits_type >
   class escaped_list_separator {
 
   private:
@@ -100,7 +107,7 @@ namespace boost{
     };
     string_type  escape_;
     string_type  c_;
-    string_type  quote_;      
+    string_type  quote_;
     bool last_;
 
     bool is_escape(Char e) {
@@ -140,21 +147,21 @@ namespace boost{
     }
 
     public:
-    
+
     explicit escaped_list_separator(Char  e = '\\',
                                     Char c = ',',Char  q = '\"')
       : escape_(1,e), c_(1,c), quote_(1,q), last_(false) { }
-    
+
     escaped_list_separator(string_type e, string_type c, string_type q)
       : escape_(e), c_(c), quote_(q), last_(false) { }
-    
+
     void reset() {last_=false;}
 
     template <typename InputIterator, typename Token>
     bool operator()(InputIterator& next,InputIterator end,Token& tok) {
       bool bInQuote = false;
       tok = Token();
-      
+
       if (next == end) {
         if (last_) {
           last_ = false;
@@ -193,8 +200,44 @@ namespace boost{
   //===========================================================================
   // The classes here are used by offset_separator and char_separator to implement
   // faster assigning of tokens using assign instead of +=
-  
+
   namespace tokenizer_detail {
+  //===========================================================================
+  // Tokenizer was broken for wide character separators, at least on Windows, since
+  // CRT functions isspace etc only expect values in [0, 0xFF]. Debug build asserts
+  // if higher values are passed in. The traits extension class should take care of this.
+  // Assuming that the conditional will always get optimized out in the function
+  // implementations, argument types are not a problem since both forms of character classifiers
+  // expect an int.
+  // In case there is no cwctype header, we implement the checks manually.
+  // We make use of the fact that the tested categories should fit in ASCII.
+  template<typename traits>
+  struct traits_extension : public traits {
+    typedef typename traits::char_type char_type;
+    static bool isspace(char_type c)
+    {
+#if !defined(BOOST_NO_CWCTYPE)
+      if (sizeof(char_type) == 1)
+        return std::isspace(c) != 0;
+      else
+        return std::iswspace(c) != 0;
+#else
+      return static_cast< unsigned >(c) <= 255 && std::isspace(c) != 0;
+#endif
+    }
+
+    static bool ispunct(char_type c)
+    {
+#if !defined(BOOST_NO_CWCTYPE)
+      if (sizeof(char_type) == 1)
+        return std::ispunct(c) != 0;
+      else
+        return std::iswpunct(c) != 0;
+#else
+      return static_cast< unsigned >(c) <= 255 && std::ispunct(c) != 0;
+#endif
+    }
+  };
 
   // The assign_or_plus_equal struct contains functions that implement
   // assign, +=, and clearing based on the iterator type.  The
@@ -229,26 +272,20 @@ namespace boost{
 
     }
 
-    template<class Token, class Value> 
-    static void plus_equal(Token &, const Value &) {
-    
-  }
+    template<class Token, class Value>
+    static void plus_equal(Token &, const Value &) { }
 
     // If we are doing an assign, there is no need for the
-    // the clear. 
+    // the clear.
     //
     template<class Token>
-    static void clear(Token &) {
-
-    }
+    static void clear(Token &) { }
   };
 
   template <>
   struct assign_or_plus_equal<std::input_iterator_tag> {
     template<class Iterator, class Token>
-    static void assign(Iterator b, Iterator e, Token &t) {
-
-    }
+    static void assign(Iterator b, Iterator e, Token &t) { }
     template<class Token, class Value> 
     static void plus_equal(Token &t, const Value &v) {
       t += v;
@@ -284,10 +321,10 @@ namespace boost{
     typedef typename cat::type iterator_category;
   };
 
-  
-}
 
-   
+  } // namespace tokenizer_detail
+
+
   //===========================================================================
   // The offset_separator class, which is a model of TokenizerFunction.
   // Offset breaks a string into tokens based on a range of offsets
@@ -299,7 +336,7 @@ namespace boost{
     unsigned int current_offset_;
     bool wrap_offsets_;
     bool return_partial_last_;
-    
+
   public:
     template <typename Iter>
     offset_separator(Iter begin, Iter end, bool wrap_offsets = true,
@@ -307,7 +344,7 @@ namespace boost{
       : offsets_(begin,end), current_offset_(0),
         wrap_offsets_(wrap_offsets),
         return_partial_last_(return_partial_last) { }
-   
+
     offset_separator()
       : offsets_(1,1), current_offset_(),
         wrap_offsets_(true), return_partial_last_(true) { }
@@ -320,18 +357,16 @@ namespace boost{
     bool operator()(InputIterator& next, InputIterator end, Token& tok)
     {
       typedef tokenizer_detail::assign_or_plus_equal<
-#if     !defined(BOOST_MSVC) || BOOST_MSVC > 1300
-        typename
-#endif
-        tokenizer_detail::get_iterator_category<
-        InputIterator>::iterator_category> assigner;
-
+        BOOST_DEDUCED_TYPENAME tokenizer_detail::get_iterator_category<
+          InputIterator
+        >::iterator_category
+      > assigner;
 
       BOOST_ASSERT(!offsets_.empty());
-    
+
       assigner::clear(tok);
       InputIterator start(next);
-      
+
       if (next == end)
         return false;
 
@@ -342,7 +377,7 @@ namespace boost{
         else
           return false;
       }
-      
+
       int c = offsets_[current_offset_];
       int i = 0;
       for (; i < c; ++i) {
@@ -350,11 +385,11 @@ namespace boost{
         assigner::plus_equal(tok,*next++);
       }
       assigner::assign(start,next,tok);
-    
+
       if (!return_partial_last_)
         if (i < (c-1) )
           return false;
-      
+
       ++current_offset_;
       return true;
     }
@@ -378,15 +413,11 @@ namespace boost{
   enum empty_token_policy { drop_empty_tokens, keep_empty_tokens };
 
   // The out of the box GCC 2.95 on cygwin does not have a char_traits class.
-#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
-  template <typename Char, 
-    typename Traits = typename std::basic_string<Char>::traits_type >
-#else
-  template <typename Char, 
-    typename Traits = std::basic_string<Char>::traits_type >
-#endif
+  template <typename Char,
+    typename Tr = BOOST_DEDUCED_TYPENAME std::basic_string<Char>::traits_type >
   class char_separator
   {
+    typedef tokenizer_detail::traits_extension<Tr> Traits;
     typedef std::basic_string<Char,Traits> string_type;
   public:
     explicit 
@@ -407,8 +438,8 @@ namespace boost{
                 // use ispunct() for kept delimiters and isspace for dropped.
     explicit
     char_separator()
-      : m_use_ispunct(true), 
-        m_use_isspace(true), 
+      : m_use_ispunct(true),
+        m_use_isspace(true),
         m_empty_tokens(drop_empty_tokens) { }
 
     void reset() { }
@@ -417,11 +448,10 @@ namespace boost{
     bool operator()(InputIterator& next, InputIterator end, Token& tok)
     {
       typedef tokenizer_detail::assign_or_plus_equal<
-#if     !defined(BOOST_MSVC) || BOOST_MSVC > 1300
-        typename
-#endif
-        tokenizer_detail::get_iterator_category<
-        InputIterator>::iterator_category> assigner;
+        BOOST_DEDUCED_TYPENAME tokenizer_detail::get_iterator_category<
+          InputIterator
+        >::iterator_category
+      > assigner;
 
       assigner::clear(tok);
 
@@ -429,7 +459,7 @@ namespace boost{
       if (m_empty_tokens == drop_empty_tokens)
         for (; next != end  && is_dropped(*next); ++next)
           { }
-      
+
       InputIterator start(next);
 
       if (m_empty_tokens == drop_empty_tokens) {
@@ -446,13 +476,13 @@ namespace boost{
           // append all the non delim characters
           for (; next != end && !is_dropped(*next) && !is_kept(*next); ++next)
             assigner::plus_equal(tok,*next);
-      } 
+      }
       else { // m_empty_tokens == keep_empty_tokens
-        
+
         // Handle empty token at the end
         if (next == end)
         {
-          if (m_output_done == false) 
+          if (m_output_done == false)
           {
             m_output_done = true;
             assigner::assign(start,next,tok);
@@ -461,7 +491,7 @@ namespace boost{
           else
             return false;
         }
-        
+
         if (is_kept(*next)) {
           if (m_output_done == false)
             m_output_done = true;
@@ -493,13 +523,13 @@ namespace boost{
     bool m_use_isspace;
     empty_token_policy m_empty_tokens;
     bool m_output_done;
-    
+
     bool is_kept(Char E) const
-    {  
+    {
       if (m_kept_delims.length())
         return m_kept_delims.find(E) != string_type::npos;
       else if (m_use_ispunct) {
-        return std::ispunct(E) != 0;
+        return Traits::ispunct(E) != 0;
       } else
         return false;
     }
@@ -508,7 +538,7 @@ namespace boost{
       if (m_dropped_delims.length())
         return m_dropped_delims.find(E) != string_type::npos;
       else if (m_use_isspace) {
-        return std::isspace(E) != 0;
+        return Traits::isspace(E) != 0;
       } else
         return false;
     }
@@ -525,31 +555,27 @@ namespace boost{
   // cannot be returned as tokens. These are often whitespace
 
   // The out of the box GCC 2.95 on cygwin does not have a char_traits class.
-#if !defined(BOOST_MSVC) || BOOST_MSVC > 1300
-  template <class Char, 
-    class Traits = typename std::basic_string<Char>::traits_type >
-#else
-  template <class Char, 
-    class Traits = std::basic_string<Char>::traits_type >
-#endif
+  template <class Char,
+    class Tr = BOOST_DEDUCED_TYPENAME std::basic_string<Char>::traits_type >
   class char_delimiters_separator {
-  private:  
+  private:
 
+    typedef tokenizer_detail::traits_extension<Tr> Traits;
     typedef std::basic_string<Char,Traits> string_type;
     string_type returnable_;
     string_type nonreturnable_;
     bool return_delims_;
     bool no_ispunct_;
     bool no_isspace_;
-    
+
     bool is_ret(Char E)const
-    {  
+    {
       if (returnable_.length())
         return  returnable_.find(E) != string_type::npos;
       else{
         if (no_ispunct_) {return false;}
         else{
-          int r = std::ispunct(E);
+          int r = Traits::ispunct(E);
           return r != 0;
         }
       }
@@ -561,12 +587,12 @@ namespace boost{
       else{
         if (no_isspace_) {return false;}
         else{
-          int r = std::isspace(E);
+          int r = Traits::isspace(E);
           return r != 0;
         }
       }
     }
-    
+
   public:
     explicit char_delimiters_separator(bool return_delims = false, 
                                        const Char* returnable = 0,
@@ -575,7 +601,7 @@ namespace boost{
         nonreturnable_(nonreturnable ? nonreturnable:string_type().c_str()),
         return_delims_(return_delims), no_ispunct_(returnable!=0),
         no_isspace_(nonreturnable!=0) { }
-    
+
     void reset() { }
 
   public:
@@ -583,16 +609,16 @@ namespace boost{
      template <typename InputIterator, typename Token>
      bool operator()(InputIterator& next, InputIterator end,Token& tok) {
      tok = Token();
-     
+
      // skip past all nonreturnable delims
      // skip past the returnable only if we are not returning delims
      for (;next!=end && ( is_nonret(*next) || (is_ret(*next) 
        && !return_delims_ ) );++next) { }
-     
+
      if (next == end) {
        return false;
      }
-     
+
      // if we are to return delims and we are one a returnable one
      // move past it and stop
      if (is_ret(*next) && return_delims_) {
@@ -603,8 +629,8 @@ namespace boost{
        // append all the non delim characters
        for (;next!=end && !is_nonret(*next) && !is_ret(*next);++next)
          tok+=*next;
-       
-       
+
+
      return true;
    }
   };
@@ -612,10 +638,4 @@ namespace boost{
 
 } //namespace boost
 
-
-#endif 
-
-
-
-
-
+#endif
index 0c313b81c548c65900eb72a75330f52876ca3e9c..a46e90af05e153a92f78fb736fd642d8b3848504 100644 (file)
@@ -16,6 +16,9 @@
 #include "boost/type_traits/add_reference.hpp"
 #include "boost/type_traits/add_volatile.hpp"
 #include "boost/type_traits/alignment_of.hpp"
+#if !defined(__BORLANDC__) && !defined(__CUDACC__)
+#include "boost/type_traits/has_new_operator.hpp"
+#endif
 #include "boost/type_traits/has_nothrow_assign.hpp"
 #include "boost/type_traits/has_nothrow_constructor.hpp"
 #include "boost/type_traits/has_nothrow_copy.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_rvalue_reference.hpp"
+#include "boost/type_traits/is_lvalue_reference.hpp"
 #include "boost/type_traits/is_same.hpp"
 #include "boost/type_traits/is_scalar.hpp"
 #include "boost/type_traits/is_stateless.hpp"
 #include "boost/type_traits/is_union.hpp"
 #include "boost/type_traits/is_void.hpp"
+#include "boost/type_traits/is_virtual_base_of.hpp"
 #include "boost/type_traits/is_volatile.hpp"
 #include "boost/type_traits/rank.hpp"
 #include "boost/type_traits/extent.hpp"
index 7dfb4bed89e7dea8414775593595b68fc13e2379..eb4f9b1631a816149c074d34ca9df5476f4a55e1 100644 (file)
@@ -51,13 +51,31 @@ struct add_reference_impl
 };
 
 #else
+//
+// We can't filter out rvalue_references at the same level as
+// references or we get ambiguities from msvc:
+//
 
 template <typename T>
-struct add_reference_impl
+struct add_reference_rvalue_layer
 {
     typedef T& type;
 };
 
+#ifndef BOOST_NO_RVALUE_REFERENCES
+template <typename T>
+struct add_reference_rvalue_layer<T&&>
+{
+    typedef T&& type;
+};
+#endif
+
+template <typename T>
+struct add_reference_impl
+{
+    typedef typename add_reference_rvalue_layer<T>::type type;
+};
+
 #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(typename T,add_reference,T&,T&)
 #endif
index bfc3f7e53b2d5fb03d2aa1650555d401265f734d..6d708cd0cb0fe564b6a4485d8bebab9bdcbbea47 100644 (file)
@@ -166,7 +166,7 @@ struct function_traits_helper<R (*)(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)>
 
 template<typename Function>
 struct function_traits : 
-   public detail::function_traits_helper<typename boost::add_pointer<Function>::type>
+       public boost::detail::function_traits_helper<typename boost::add_pointer<Function>::type>
 {
 };
 
@@ -227,7 +227,7 @@ type_of_size<11> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6, T7, T8,
 template<typename Function>
 struct function_traits
 {
-  BOOST_STATIC_CONSTANT(unsigned, arity = (sizeof(detail::function_arity_helper((Function*)0))-1));
+  BOOST_STATIC_CONSTANT(unsigned, arity = (sizeof(boost::detail::function_arity_helper((Function*)0))-1));
 };
 
 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
index 9ccc333cb2ba4fa5be13fd6f6c7013631e47e890..0813dac903dc4badc250a857a5f74338d04ec8e4 100755 (executable)
@@ -25,7 +25,7 @@ struct is_convertible_from_tester
 
 }
 
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_complex,T,(::boost::is_convertible<T, detail::is_convertible_from_tester>::value))
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_complex,T,(::boost::is_convertible<T, boost::detail::is_convertible_from_tester>::value))
 
 } // namespace boost
 
index e66d18a3162402e22b754e4752e9b78f11f1d78c..812ed1515fa8884b0b54811756d445fef7915e5c 100644 (file)
@@ -50,12 +50,31 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,__is_const(T))
 
 #elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 
-//* is a type T  declared const - is_const<T>
+namespace detail{
+//
+// We can't filter out rvalue_references at the same level as
+// references or we get ambiguities from msvc:
+//
+template <class T>
+struct is_const_rvalue_filter
+{
 #if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
-   BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::cv_traits_imp<typename remove_bounds<T>::type*>::is_const)
+       BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<typename boost::remove_bounds<T>::type*>::is_const);
 #else
-   BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::cv_traits_imp<T*>::is_const)
+       BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<T*>::is_const);
+#endif
+};
+#ifndef BOOST_NO_RVALUE_REFERENCES
+template <class T>
+struct is_const_rvalue_filter<T&&>
+{
+       BOOST_STATIC_CONSTANT(bool, value = false);
+};
 #endif
+}
+
+//* is a type T  declared const - is_const<T>
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::is_const_rvalue_filter<T>::value)
 BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T&,false)
 
 #if  defined(BOOST_ILLEGAL_CV_REFERENCES)
@@ -98,7 +117,7 @@ struct is_const_helper<false,false>
     {
         static T* t;
         BOOST_STATIC_CONSTANT(bool, value = (
-            sizeof(detail::yes_type) == sizeof(detail::is_const_tester(t))
+            sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_const_tester(t))
             ));
     };
 };
@@ -110,7 +129,7 @@ struct is_const_helper<false,true>
     {
         static T t;
         BOOST_STATIC_CONSTANT(bool, value = (
-            sizeof(detail::yes_type) == sizeof(detail::is_const_tester(&t))
+            sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_const_tester(&t))
             ));
     };
 };
index a31a930faed4d5186934f34feee064d41328ef08..c05c297eaf9b8208c081aeec63e4c49ef52db9e6 100644 (file)
@@ -132,7 +132,7 @@ template <typename From, typename To>
 struct is_convertible_basic_impl
 {
     static From _m_from;
-    static bool const value = sizeof( detail::checker<To>::_m_check(_m_from, 0) )
+    static bool const value = sizeof( boost::detail::checker<To>::_m_check(_m_from, 0) )
         == sizeof(::boost::type_traits::yes_type);
 };
 
index c8eb7912da05177feed8c6ee340c4859d50921de..45c4e9e1eeb610314931b23fa9fc17e1e98eb954 100644 (file)
@@ -36,6 +36,12 @@ namespace boost {
 namespace detail {
 
 #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4624) // destructor could not be generated
+#endif
+
 template <typename T>
 struct empty_helper_t1 : public T
 {
@@ -47,6 +53,10 @@ private:
    empty_helper_t1& operator=(const empty_helper_t1&);
 };
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 struct empty_helper_t2 { int i[256]; };
 
 #if !BOOST_WORKAROUND(__BORLANDC__, < 0x600)
index 95dba0dab05d001a96b0697b653a2502930b2ae7..55c05c156421a2264ea2ea5e48e47700086c4232 100644 (file)
@@ -95,6 +95,9 @@ struct is_function_impl<T&> : public false_type
 BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_function,T,__is_function(T))
 #else
 BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_function,T,::boost::detail::is_function_impl<T>::value)
+#ifndef BOOST_NO_RVALUE_REFERENCES
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_function,T&&,false)
+#endif
 #endif
 } // namespace boost
 
diff --git a/boost/boost/type_traits/is_lvalue_reference.hpp b/boost/boost/type_traits/is_lvalue_reference.hpp
new file mode 100644 (file)
index 0000000..a6af859
--- /dev/null
@@ -0,0 +1,118 @@
+
+//  (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, 
+//      Howard Hinnant and John Maddock 2000. 
+//  (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001
+
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+//    Fixed is_pointer, is_lvalue_reference, is_const, is_volatile, is_same, 
+//    is_member_pointer based on the Simulated Partial Specialization work 
+//    of Mat Marcus and Jesse Jones. See  http://opensource.adobe.com or 
+//    http://groups.yahoo.com/group/boost/message/5441 
+//    Some workarounds in here use ideas suggested from "Generic<Programming>: 
+//    Mappings between Types and Values" 
+//    by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html).
+
+
+#ifndef BOOST_TT_IS_LVALUE_REFERENCE_HPP_INCLUDED
+#define BOOST_TT_IS_LVALUE_REFERENCE_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/wrap.hpp>
+#endif
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+#if defined( __CODEGEARC__ )
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,__is_reference(T))
+#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T&,true)
+
+#if  defined(BOOST_ILLEGAL_CV_REFERENCES)
+// these are illegal specialisations; cv-qualifies applied to
+// references have no effect according to [8.3.2p1],
+// C++ Builder requires them though as it treats cv-qualified
+// references as distinct types...
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& const,true)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& volatile,true)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_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_lvalue_reference,T const ,::boost::is_lvalue_reference<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T volatile ,::boost::is_lvalue_reference<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T const volatile ,::boost::is_lvalue_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_lvalue_reference,T[N],false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,const T[N],false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,volatile T[N],false)
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,const volatile T[N],false)
+#endif
+
+#else
+
+#ifdef BOOST_MSVC
+#   pragma warning(push)
+#   pragma warning(disable: 4181 4097)
+#endif
+
+namespace detail {
+
+using ::boost::type_traits::yes_type;
+using ::boost::type_traits::no_type;
+using ::boost::type_traits::wrap;
+
+template <class T> T&(* is_lvalue_reference_helper1(wrap<T>) )(wrap<T>);
+char is_lvalue_reference_helper1(...);
+
+template <class T> no_type is_lvalue_reference_helper2(T&(*)(wrap<T>));
+yes_type is_lvalue_reference_helper2(...);
+
+template <typename T>
+struct is_lvalue_reference_impl
+{
+    BOOST_STATIC_CONSTANT(
+        bool, value = sizeof(
+            ::boost::detail::is_lvalue_reference_helper2(
+                ::boost::detail::is_lvalue_reference_helper1(::boost::type_traits::wrap<T>()))) == 1
+        );
+};
+
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void,false)
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void const,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void volatile,false)
+BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void const volatile,false)
+#endif
+
+} // namespace detail
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,::boost::detail::is_lvalue_reference_impl<T>::value)
+
+#ifdef BOOST_MSVC
+#   pragma warning(pop)
+#endif
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+} // namespace boost
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED
+
index dcf84db70936dc7cd5a88588595468f267498a3d..49b5f9ff0fb5af611d4a82585e7121dc813084fa 100644 (file)
@@ -1,6 +1,6 @@
 
 //  (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, 
-//      Howard Hinnant and John Maddock 2000. 
+//      Howard Hinnant and John Maddock 2000, 2010
 //  (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001
 
 //  Use, modification and distribution are subject to the Boost Software License,
 //
 //  See http://www.boost.org/libs/type_traits for most recent version including documentation.
 
-//    Fixed is_pointer, is_reference, is_const, is_volatile, is_same, 
-//    is_member_pointer based on the Simulated Partial Specialization work 
-//    of Mat Marcus and Jesse Jones. See  http://opensource.adobe.com or 
-//    http://groups.yahoo.com/group/boost/message/5441 
-//    Some workarounds in here use ideas suggested from "Generic<Programming>: 
-//    Mappings between Types and Values" 
-//    by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html).
-
-
 #ifndef BOOST_TT_IS_REFERENCE_HPP_INCLUDED
 #define BOOST_TT_IS_REFERENCE_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/wrap.hpp>
-#endif
+#include <boost/type_traits/is_lvalue_reference.hpp>
+#include <boost/type_traits/is_rvalue_reference.hpp>
+#include <boost/type_traits/ice.hpp>
 
 // should be the last #include
 #include <boost/type_traits/detail/bool_trait_def.hpp>
 
 namespace boost {
 
-#if defined( __CODEGEARC__ )
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,__is_reference(T))
-#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,false)
-BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T&,true)
-
-#if  defined(BOOST_ILLEGAL_CV_REFERENCES)
-// these are illegal specialisations; cv-qualifies applied to
-// references have no effect according to [8.3.2p1],
-// C++ Builder requires them though as it treats cv-qualified
-// references as distinct types...
-BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T& const,true)
-BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T& volatile,true)
-BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T& const volatile,true)
-#endif
-
-#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
-#   pragma warning(push)
-#   pragma warning(disable: 4181 4097)
-#endif
-
 namespace detail {
 
-using ::boost::type_traits::yes_type;
-using ::boost::type_traits::no_type;
-using ::boost::type_traits::wrap;
-
-template <class T> T&(* is_reference_helper1(wrap<T>) )(wrap<T>);
-char is_reference_helper1(...);
-
-template <class T> no_type is_reference_helper2(T&(*)(wrap<T>));
-yes_type is_reference_helper2(...);
-
 template <typename T>
 struct is_reference_impl
 {
-    BOOST_STATIC_CONSTANT(
-        bool, value = sizeof(
-            ::boost::detail::is_reference_helper2(
-                ::boost::detail::is_reference_helper1(::boost::type_traits::wrap<T>()))) == 1
-        );
+   BOOST_STATIC_CONSTANT(bool, value =
+      (::boost::type_traits::ice_or<
+         ::boost::is_lvalue_reference<T>::value, ::boost::is_rvalue_reference<T>::value
+       >::value));
 };
 
-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)
 
-#ifdef BOOST_MSVC
-#   pragma warning(pop)
-#endif
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
 } // namespace boost
 
 #include <boost/type_traits/detail/bool_trait_undef.hpp>
diff --git a/boost/boost/type_traits/is_rvalue_reference.hpp b/boost/boost/type_traits/is_rvalue_reference.hpp
new file mode 100644 (file)
index 0000000..cac2ee0
--- /dev/null
@@ -0,0 +1,29 @@
+
+//  (C) John Maddock 2010. 
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED
+#define BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED
+
+#include <boost/type_traits/config.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+namespace boost {
+
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_rvalue_reference,T,false)
+#ifndef BOOST_NO_RVALUE_REFERENCES
+BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_rvalue_reference,T&&,true)
+#endif
+
+} // namespace boost
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED
+
index e0d1808b4d1def169ed354091b095c9bf7a40cd8..c6afbd7f0504a51f94b20262de8f52710d12c4db 100644 (file)
@@ -61,7 +61,7 @@ struct is_same_part_1
 template< typename T1, typename T2 >
 struct is_same_impl
 {
-    enum { value = detail::is_same_part_1<T1>::template part_2<T2>::value };
+    enum { value = boost::detail::is_same_part_1<T1>::template part_2<T2>::value };
 };
 
 #else // generic "no-partial-specialization" version
@@ -81,7 +81,7 @@ struct is_same_impl
 
    BOOST_STATIC_CONSTANT(bool, value =
       (::boost::type_traits::ice_and<
-         (sizeof(type_traits::yes_type) == sizeof(detail::is_same_tester(&t,&u))),
+         (sizeof(type_traits::yes_type) == sizeof(boost::detail::is_same_tester(&t,&u))),
          (::boost::is_reference<T>::value == ::boost::is_reference<U>::value),
          (sizeof(T) == sizeof(U))
         >::value));
index 7ab253a6915f78471132751c266144629fca4020..e5312632003b3d96b12bf72775b1c158a5fc7ccb 100644 (file)
 
 namespace boost {
 
+namespace detail{
+template <class T>
+struct is_volatile_rval_filter
+{
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
+       BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<typename boost::remove_bounds<T>::type*>::is_volatile);
+#else
+       BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<T*>::is_volatile);
+#endif
+};
+#ifndef BOOST_NO_RVALUE_REFERENCES
+//
+// We can't filter out rvalue_references at the same level as
+// references or we get ambiguities from msvc:
+//
+template <class T>
+struct is_volatile_rval_filter<T&&>
+{
+       BOOST_STATIC_CONSTANT(bool, value = false);
+};
+#endif
+}
+
 #if defined( __CODEGEARC__ )
 BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,__is_volatile(T))
 #elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 
 //* is a type T declared volatile - is_volatile<T>
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
-   BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::cv_traits_imp<typename boost::remove_bounds<T>::type*>::is_volatile)
-#else
-   BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::cv_traits_imp<T*>::is_volatile)
-#endif
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::is_volatile_rval_filter<T>::value)
 BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T&,false)
 
 #if  defined(BOOST_ILLEGAL_CV_REFERENCES)
@@ -86,7 +105,7 @@ struct is_volatile_helper<false,false>
     {
         static T* t;
         BOOST_STATIC_CONSTANT(bool, value = (
-            sizeof(detail::yes_type) == sizeof(detail::is_volatile_tester(t))
+            sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_volatile_tester(t))
             ));
     };
 };
@@ -98,7 +117,7 @@ struct is_volatile_helper<false,true>
     {
         static T t;
         BOOST_STATIC_CONSTANT(bool, value = (
-            sizeof(detail::yes_type) == sizeof(detail::is_volatile_tester(&t))
+            sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_volatile_tester(&t))
             ));
     };
 };
index 351713223281463c68db38f4c04506ae87eac5ba..25c0edfaaaf594a22a25037046936edac2526c7c 100755 (executable)
@@ -36,7 +36,7 @@ namespace boost {
 
     template<typename T>
     struct remove_all_extents {
-        typedef typename detail::remove_all_extents_impl_typeof<
+        typedef typename boost::detail::remove_all_extents_impl_typeof<
             boost::is_array<T>::value                
         >::template inner<T,remove_all_extents<T> >::type type;
         BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_all_extents,T)
index 12a9b0533569ac111bb3bdaf596ceebaccb0196d..4b23b352766d7832124cef3ed528ec49e120a3d6 100755 (executable)
@@ -32,7 +32,7 @@ namespace boost {
 
     template<typename T>
     struct remove_bounds {
-        typedef typename detail::remove_bounds_impl_typeof<
+        typedef typename boost::detail::remove_bounds_impl_typeof<
             boost::is_array<T>::value                
         >::template inner<T,remove_bounds<T> >::type type;
         BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_bounds,T)
index 5395e80022c03965934b6cdb39e9428f69f9d920..d370754ade32748ae54b8d502d93a9996e83fac7 100755 (executable)
@@ -124,7 +124,7 @@ namespace boost {
 
     template<typename T>
     struct remove_const {
-        typedef detail::remove_const_impl_typeof<
+        typedef boost::detail::remove_const_impl_typeof<
             boost::is_pointer<T>::value,
             boost::is_array<T>::value,
             boost::is_const<T>::value,
index c7b0379c43229128037b0f7a51618428ceb44206..9fbf8b845df6c6bc33fb416865cfbbdb3295323e 100755 (executable)
@@ -171,7 +171,7 @@ namespace boost {
 
     template<typename T>
     struct remove_cv {
-        typedef detail::remove_cv_impl_typeof<
+        typedef boost::detail::remove_cv_impl_typeof<
             boost::is_pointer<T>::value,
             boost::is_array<T>::value,
             boost::is_const<T>::value,
index f87ec416da1579d242e05d86f687e1359d17b78a..c5a59ef6f4fd0dbf1cc8295f22fc972b1a15adb4 100755 (executable)
@@ -32,7 +32,7 @@ namespace boost {
 
     template<typename T>
     struct remove_extent {
-        typedef typename detail::remove_extent_impl_typeof<
+        typedef typename boost::detail::remove_extent_impl_typeof<
             boost::is_array<T>::value                
         >::template inner<T,remove_extent<T> >::type type;
         BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_extent,T)
index 8b9b0d4e112adb2335bf72242a49d37e616adf91..ec847f9d8e0401434a93d7f2acf3ad287231ac43 100755 (executable)
@@ -32,7 +32,7 @@ namespace boost {
 
     template<typename T>
     struct remove_pointer {
-        typedef typename detail::remove_pointer_impl_typeof<
+        typedef typename boost::detail::remove_pointer_impl_typeof<
             boost::is_pointer<T>::value
         >::template inner<T,remove_pointer<T> >::type type;
         BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_pointer,T)
index 367d352eddcd73a54f977b8d25d8dc981054c2ba..f8a77d4c51f4ed4aa131c9f6cd062b7fb447fef2 100755 (executable)
@@ -32,7 +32,7 @@ namespace boost {
     
     template<typename T>
     struct remove_reference {
-        typedef typename detail::remove_reference_impl_typeof<
+        typedef typename boost::detail::remove_reference_impl_typeof<
             boost::is_reference<T>::value
         >::template inner<T,remove_reference<T> >::type type;
         BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_reference,T)
index 3759f2a378889bb709705917ef2602891069d2ca..6f9259c5b163674a8c2f5a246b25441c59fcf6e5 100755 (executable)
@@ -124,7 +124,7 @@ namespace boost {
 
     template<typename T>
     struct remove_volatile {
-        typedef detail::remove_volatile_impl_typeof<
+        typedef boost::detail::remove_volatile_impl_typeof<
             boost::is_pointer<T>::value,
             boost::is_array<T>::value,
             boost::is_const<T>::value,
index 7e18d88b1a0ddba85328b3b32bdb8289d7b599db..f4d1739ae4a396edd65e55b1b4b25b2ccdcd0bb9 100644 (file)
@@ -54,6 +54,18 @@ struct remove_const_impl
         >::type type;
 };
 
+#ifndef BOOST_NO_RVALUE_REFERENCES
+//
+// We can't filter out rvalue_references at the same level as
+// references or we get ambiguities from msvc:
+//
+template <typename T>
+struct remove_const_impl<T&&>
+{
+    typedef T&& type;
+};
+#endif
+
 } // namespace detail
 
 // * convert a type T to non-const type - remove_const<T>
index 09f8ff103cec90b87c9158b9fb429638fbb5f291..668e755604e8fe3950f7ae28ab190dd9afcbe03c 100644 (file)
 
 namespace boost {
 
+namespace detail{
+
+template <class T>
+struct rvalue_ref_filter_rem_cv
+{
+       typedef typename boost::detail::cv_traits_imp<T*>::unqualified_type type;
+};
+
+#ifndef BOOST_NO_RVALUE_REFERENCES
+//
+// We can't filter out rvalue_references at the same level as
+// references or we get ambiguities from msvc:
+//
+template <class T>
+struct rvalue_ref_filter_rem_cv<T&&>
+{
+       typedef T&& type;
+};
+#endif
+
+}
+
 #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 
 //  convert a type T to a non-cv-qualified type - remove_cv<T>
-BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename boost::detail::cv_traits_imp<T*>::unqualified_type)
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename boost::detail::rvalue_ref_filter_rem_cv<T>::type)
 BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_cv,T&,T&)
 #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
 BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const[N],T type[N])
index 8fddc46722a533f008bc910054b5fdfcae835af6..a87db3395a9cd9885f8a38dd894314fff0131e7b 100644 (file)
@@ -24,7 +24,27 @@ namespace boost {
 
 #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 
-BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,T)
+namespace detail{
+//
+// We can't filter out rvalue_references at the same level as
+// references or we get ambiguities from msvc:
+//
+template <class T>
+struct remove_rvalue_ref
+{
+       typedef T type;
+};
+#ifndef BOOST_NO_RVALUE_REFERENCES
+template <class T>
+struct remove_rvalue_ref<T&&>
+{
+       typedef T type;
+};
+#endif
+
+} // namespace detail
+
+BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,typename boost::detail::remove_rvalue_ref<T>::type)
 BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T&,T)
 
 #if defined(BOOST_ILLEGAL_CV_REFERENCES)
index 723ebe35af40b0f9053d0e2649908a7510b9e632..073a2a3eccc32cd1be019127f5b353d4f65375d1 100644 (file)
@@ -53,6 +53,17 @@ struct remove_volatile_impl
         >::type type;
 };
 
+//
+// We can't filter out rvalue_references at the same level as
+// references or we get ambiguities from msvc:
+//
+#ifndef BOOST_NO_RVALUE_REFERENCES
+template <typename T>
+struct remove_volatile_impl<T&&>
+{
+    typedef T&& type;
+};
+#endif
 } // namespace detail
 
 // * convert a type T to a non-volatile type - remove_volatile<T>
index d790ee1ef11a796c4f4e86643c6e2ec7dd8fe95e..ac31055dc8bde6d83107f9d3ed0d90ce1b1a6578 100644 (file)
@@ -286,43 +286,43 @@ struct __declspec(align(128)) a128 {
 template<> class type_with_alignment<8>  
 { 
    typedef mpl::if_c<
-      ::boost::alignment_of<detail::max_align>::value < 8,
+      ::boost::alignment_of<boost::detail::max_align>::value < 8,
       align::a8,
-      detail::type_with_alignment_imp<8> >::type t1; 
+      boost::detail::type_with_alignment_imp<8> >::type t1; 
 public: 
    typedef t1::type type;
 };
 template<> class type_with_alignment<16> 
 { 
    typedef mpl::if_c<
-      ::boost::alignment_of<detail::max_align>::value < 16,
+      ::boost::alignment_of<boost::detail::max_align>::value < 16,
       align::a16,
-      detail::type_with_alignment_imp<16> >::type t1; 
+      boost::detail::type_with_alignment_imp<16> >::type t1; 
 public: 
    typedef t1::type type;
 };
 template<> class type_with_alignment<32> 
 { 
    typedef mpl::if_c<
-      ::boost::alignment_of<detail::max_align>::value < 32,
+      ::boost::alignment_of<boost::detail::max_align>::value < 32,
       align::a32,
-      detail::type_with_alignment_imp<32> >::type t1; 
+      boost::detail::type_with_alignment_imp<32> >::type t1; 
 public: 
    typedef t1::type type;
 };
 template<> class type_with_alignment<64> {
    typedef mpl::if_c<
-      ::boost::alignment_of<detail::max_align>::value < 64,
+      ::boost::alignment_of<boost::detail::max_align>::value < 64,
       align::a64,
-      detail::type_with_alignment_imp<64> >::type t1; 
+      boost::detail::type_with_alignment_imp<64> >::type t1; 
 public: 
    typedef t1::type type;
 };
 template<> class type_with_alignment<128> {
    typedef mpl::if_c<
-      ::boost::alignment_of<detail::max_align>::value < 128,
+      ::boost::alignment_of<boost::detail::max_align>::value < 128,
       align::a128,
-      detail::type_with_alignment_imp<128> >::type t1; 
+      boost::detail::type_with_alignment_imp<128> >::type t1; 
 public: 
    typedef t1::type type;
 };
index e6888a6efa395297192edd0b3fcd07478c07aaf8..7e2515c6eea20cb07f34a72dcbff6efe5bee7ec1 100644 (file)
@@ -4,7 +4,7 @@
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 //
-// See http://www.boost.org/lib/optional for documentation.
+// See http://www.boost.org/libs/optional for documentation.
 //
 // You are welcome to contact the author at:
 //  fernando_cacciola@hotmail.com
index 6ce724781896817dd0797996b1ec3a906a5aa1eb..afd76b5a8598ce0674a1de82e5e7f70d88bf9699 100644 (file)
@@ -5,7 +5,7 @@
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 //
-// See http://www.boost.org/lib/optional for documentation.
+// See http://www.boost.org/libs/optional for documentation.
 //
 // You are welcome to contact the author at:
 //  fernando_cacciola@hotmail.com
index b1fc4d3dcf8f66871fc37e811d96e601c2c1878a..58f48c708c2db3ed2048513ba8a3b27a168f64d3 100644 (file)
@@ -5,7 +5,7 @@
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 //
-// See http://www.boost.org/lib/optional for documentation.
+// See http://www.boost.org/libs/optional for documentation.
 //
 // You are welcome to contact the author at:
 //  fernando_cacciola@hotmail.com
index 41616c3f301363eb286c257adc2d31c61e820076..035bf1926c8b341e9eb691e82f16fbf68718a158 100644 (file)
 # define BOOST_RESULT_OF_ARGS BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)
 #endif
 
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
+template<typename F BOOST_PP_COMMA_IF(BOOST_PP_ITERATION())
+         BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),typename T)>
+struct tr1_result_of<F(BOOST_RESULT_OF_ARGS)>
+    : mpl::if_<
+          mpl::or_< is_pointer<F>, is_member_function_pointer<F> >
+        , boost::detail::tr1_result_of_impl<
+            typename remove_cv<F>::type, 
+            typename remove_cv<F>::type(BOOST_RESULT_OF_ARGS), 
+            (boost::detail::has_result_type<F>::value)>
+        , boost::detail::tr1_result_of_impl<
+            F,
+            F(BOOST_RESULT_OF_ARGS), 
+            (boost::detail::has_result_type<F>::value)> >::type { };
+#endif
+
+#if !defined(BOOST_NO_DECLTYPE) && defined(BOOST_RESULT_OF_USE_DECLTYPE)
+
+// As of N2588, C++0x result_of only supports function call
+// expressions of the form f(x). This precludes support for member
+// function pointers, which are invoked with expressions of the form
+// o->*f(x). This implementation supports both.
+template<typename F BOOST_PP_COMMA_IF(BOOST_PP_ITERATION())
+         BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),typename T)>
+struct result_of<F(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T))>
+    : mpl::if_<
+          mpl::or_< is_pointer<F>, is_member_function_pointer<F> >
+        , detail::tr1_result_of_impl<
+            typename remove_cv<F>::type, 
+            typename remove_cv<F>::type(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), false
+          >
+        , detail::cpp0x_result_of_impl<
+              F(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T))
+          >
+      >::type
+{};
+
+namespace detail {
+
+# define BOOST_RESULT_OF_STATIC_MEMBERS(z, n, _) \
+     static T ## n t ## n; \
+  /**/
+
+template<typename F BOOST_PP_COMMA_IF(BOOST_PP_ITERATION())
+         BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),typename T)>
+class cpp0x_result_of_impl<F(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T))>
+{
+  static F f;
+  BOOST_PP_REPEAT(BOOST_PP_ITERATION(), BOOST_RESULT_OF_STATIC_MEMBERS, _)
+public:
+  typedef decltype(f(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),t))) type;
+};
+
+} // namespace detail 
+
+#else // defined(BOOST_NO_DECLTYPE)
+
 #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
 template<typename F BOOST_PP_COMMA_IF(BOOST_PP_ITERATION())
          BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),typename T)>
 struct result_of<F(BOOST_RESULT_OF_ARGS)>
-    : boost::detail::result_of_impl<F, F(BOOST_RESULT_OF_ARGS), (boost::detail::has_result_type<F>::value)> {};
+    : tr1_result_of<F(BOOST_RESULT_OF_ARGS)> { };
 #endif
 
+#endif // defined(BOOST_NO_DECLTYPE)
+
 #undef BOOST_RESULT_OF_ARGS
 
 #if BOOST_PP_ITERATION() >= 1 
@@ -32,14 +91,14 @@ namespace detail {
 
 template<typename R,  typename FArgs BOOST_PP_COMMA_IF(BOOST_PP_ITERATION())
          BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),typename T)>
-struct result_of_impl<R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), FArgs, false>
+struct tr1_result_of_impl<R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), FArgs, false>
 {
   typedef R type;
 };
 
 template<typename R,  typename FArgs BOOST_PP_COMMA_IF(BOOST_PP_ITERATION())
          BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),typename T)>
-struct result_of_impl<R (&)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), FArgs, false>
+struct tr1_result_of_impl<R (&)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), FArgs, false>
 {
   typedef R type;
 };
@@ -47,7 +106,7 @@ struct result_of_impl<R (&)(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), FArgs
 #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
 template<typename R, typename FArgs BOOST_PP_COMMA_IF(BOOST_PP_ITERATION())
          BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),typename T)>
-struct result_of_impl<R (T0::*)
+struct tr1_result_of_impl<R (T0::*)
                      (BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_ITERATION(),T)),
                  FArgs, false>
 {
@@ -56,7 +115,7 @@ struct result_of_impl<R (T0::*)
 
 template<typename R, typename FArgs BOOST_PP_COMMA_IF(BOOST_PP_ITERATION())
          BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),typename T)>
-struct result_of_impl<R (T0::*)
+struct tr1_result_of_impl<R (T0::*)
                      (BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_ITERATION(),T))
                      const,
                  FArgs, false>
@@ -66,7 +125,7 @@ struct result_of_impl<R (T0::*)
 
 template<typename R, typename FArgs BOOST_PP_COMMA_IF(BOOST_PP_ITERATION())
          BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),typename T)>
-struct result_of_impl<R (T0::*)
+struct tr1_result_of_impl<R (T0::*)
                      (BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_ITERATION(),T))
                      volatile,
                  FArgs, false>
@@ -76,7 +135,7 @@ struct result_of_impl<R (T0::*)
 
 template<typename R, typename FArgs BOOST_PP_COMMA_IF(BOOST_PP_ITERATION())
          BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),typename T)>
-struct result_of_impl<R (T0::*)
+struct tr1_result_of_impl<R (T0::*)
                      (BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_ITERATION(),T))
                      const volatile,
                  FArgs, false>
index 16eaacf2ad33cf0115e69d8b3c228289ccd2c105..f84b003c70c232f42d24255b8c4396af58d950b5 100644 (file)
@@ -5,7 +5,7 @@
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 //
-// See http://www.boost.org/lib/optional for documentation.
+// See http://www.boost.org/libs/optional for documentation.
 //
 // You are welcome to contact the author at:
 //  fernando_cacciola@hotmail.com
index e35e0980bb1ea6ddb4d4b9d5b79564650a9c2b66..9a42fd2ca7b4e01fcb6a01d37c7f3757568cfd73 100644 (file)
 #define BOOST_RESULT_OF_HPP
 
 #include <boost/config.hpp>
-#include <boost/type_traits/ice.hpp>
-#include <boost/type.hpp>
-#include <boost/preprocessor.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp> 
+#include <boost/preprocessor/punctuation/comma_if.hpp> 
+#include <boost/preprocessor/repetition/enum_params.hpp> 
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp> 
 #include <boost/detail/workaround.hpp>
 #include <boost/mpl/has_xxx.hpp>
 #include <boost/mpl/if.hpp>
 #include <boost/mpl/bool.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_member_function_pointer.hpp>
+#include <boost/type_traits/remove_cv.hpp>
 
 #ifndef BOOST_RESULT_OF_NUM_ARGS
 #  define BOOST_RESULT_OF_NUM_ARGS 10
 namespace boost {
 
 template<typename F> struct result_of;
+template<typename F> struct tr1_result_of; // a TR1-style implementation of result_of
 
 #if !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 namespace detail {
 
 BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type)
 
-template<typename F, typename FArgs, bool HasResultType> struct result_of_impl;
+template<typename F, typename FArgs, bool HasResultType> struct tr1_result_of_impl;
+template<typename F> struct cpp0x_result_of_impl;
 
 template<typename F>
 struct result_of_void_impl
@@ -51,8 +58,13 @@ struct result_of_void_impl<R (&)(void)>
   typedef R type;
 };
 
+// Determine the return type of a function pointer or pointer to member.
 template<typename F, typename FArgs>
-struct result_of_impl<F, FArgs, true>
+struct result_of_pointer
+  : tr1_result_of_impl<typename remove_cv<F>::type, FArgs, false> { };
+
+template<typename F, typename FArgs>
+struct tr1_result_of_impl<F, FArgs, true>
 {
   typedef typename F::result_type type;
 };
@@ -68,7 +80,7 @@ struct result_of_nested_result : F::template result<FArgs>
 {};
 
 template<typename F, typename FArgs>
-struct result_of_impl<F, FArgs, false>
+struct tr1_result_of_impl<F, FArgs, false>
   : mpl::if_<is_function_with_no_args<FArgs>,
              result_of_void_impl<F>,
              result_of_nested_result<F, FArgs> >::type
index 347b7f459a44209ff7afdc0eeb19395b243a45ab..833a34692d05fe44be1370730130bd117bea0896 100644 (file)
@@ -5,7 +5,7 @@
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 //
-// See http://www.boost.org/lib/optional for documentation.
+// See http://www.boost.org/libs/optional for documentation.
 //
 // You are welcome to contact the author at:
 //  fernando_cacciola@hotmail.com
index 5aefac928d94e65af05dc18b9410d47e26047a8e..5de958575ea6a748449f90244a9a2a4e0f51167b 100644 (file)
@@ -9,6 +9,8 @@
 // 23 May 2008 (Fixed operator= const issue, added initialized_value) Niels Dekker, Fernando Cacciola
 // 21 Ago 2008 (Added swap) Niels Dekker, Fernando Cacciola
 // 20 Feb 2009 (Fixed logical const-ness issues) Niels Dekker, Fernando Cacciola
+// 03 Apr 2010 (Added initialized<T>, suggested by Jeffrey Hellrung, fixing #3472) Niels Dekker
+// 30 May 2010 (Made memset call conditional, fixing #3869) Niels Dekker
 //
 #ifndef BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
 #define BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
@@ -20,6 +22,7 @@
 // contains. More details on these issues are at libs/utility/value_init.htm
 
 #include <boost/aligned_storage.hpp>
+#include <boost/config.hpp> // For BOOST_NO_COMPLETE_VALUE_INITIALIZATION.
 #include <boost/detail/workaround.hpp>
 #include <boost/static_assert.hpp>
 #include <boost/type_traits/cv_traits.hpp>
 #include <cstring>
 #include <new>
 
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#if _MSC_VER >= 1310
+// It is safe to ignore the following warning from MSVC 7.1 or higher:
+// "warning C4351: new behavior: elements of array will be default initialized"
+#pragma warning(disable: 4351)
+// It is safe to ignore the following MSVC warning, which may pop up when T is 
+// a const type: "warning C4512: assignment operator could not be generated".
+#pragma warning(disable: 4512)
+#endif
+#endif
+
+#ifdef BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+  // Implementation detail: The macro BOOST_DETAIL_VALUE_INIT_WORKAROUND_SUGGESTED 
+  // suggests that a workaround should be applied, because of compiler issues 
+  // regarding value-initialization.
+  #define BOOST_DETAIL_VALUE_INIT_WORKAROUND_SUGGESTED
+#endif
+
+// Implementation detail: The macro BOOST_DETAIL_VALUE_INIT_WORKAROUND
+// switches the value-initialization workaround either on or off.
+#ifndef BOOST_DETAIL_VALUE_INIT_WORKAROUND
+  #ifdef BOOST_DETAIL_VALUE_INIT_WORKAROUND_SUGGESTED
+  #define BOOST_DETAIL_VALUE_INIT_WORKAROUND 1
+  #else
+  #define BOOST_DETAIL_VALUE_INIT_WORKAROUND 0
+  #endif
+#endif
+
 namespace boost {
 
 template<class T>
-class value_initialized
+class initialized
 {
   private :
     struct wrapper
@@ -40,6 +72,18 @@ class value_initialized
       typename
 #endif 
       remove_const<T>::type data;
+
+      wrapper()
+      :
+      data()
+      {
+      }
+
+      wrapper(T const & arg)
+      :
+      data(arg)
+      {
+      }
     };
 
     mutable
@@ -55,30 +99,25 @@ class value_initialized
 
   public :
 
-    value_initialized()
+    initialized()
     {
+#if BOOST_DETAIL_VALUE_INIT_WORKAROUND
       std::memset(&x, 0, sizeof(x));
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#if _MSC_VER >= 1310
-// When using MSVC 7.1 or higher, the following placement new expression may trigger warning C4345:
-// "behavior change: an object of POD type constructed with an initializer of the form ()
-// will be default-initialized".  It is safe to ignore this warning when using value_initialized.
-#pragma warning(disable: 4345)
-#endif
 #endif
       new (wrapper_address()) wrapper();
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
     }
 
-    value_initialized(value_initialized const & arg)
+    initialized(initialized const & arg)
     {
       new (wrapper_address()) wrapper( static_cast<wrapper const &>(*(arg.wrapper_address())));
     }
 
-    value_initialized & operator=(value_initialized const & arg)
+    explicit initialized(T const & arg)
+    {
+      new (wrapper_address()) wrapper(arg);
+    }
+
+    initialized & operator=(initialized const & arg)
     {
       // Assignment is only allowed when T is non-const.
       BOOST_STATIC_ASSERT( ! is_const<T>::value );
@@ -86,7 +125,7 @@ class value_initialized
       return *this;
     }
 
-    ~value_initialized()
+    ~initialized()
     {
       wrapper_address()->wrapper::~wrapper();
     }
@@ -101,17 +140,81 @@ class value_initialized
       return wrapper_address()->data;
     }
 
-    void swap(value_initialized & arg)
+    void swap(initialized & arg)
     {
       ::boost::swap( this->data(), arg.data() );
     }
 
-    operator T const &() const { return this->data(); }
+    operator T const &() const
+    {
+      return wrapper_address()->data;
+    }
 
-    operator T&() { return this->data(); }
+    operator T&()
+    {
+      return wrapper_address()->data;
+    }
 
 } ;
 
+template<class T>
+T const& get ( initialized<T> const& x )
+{
+  return x.data() ;
+}
+
+template<class T>
+T& get ( initialized<T>& x )
+{
+  return x.data() ;
+}
+
+template<class T>
+void swap ( initialized<T> & lhs, initialized<T> & rhs )
+{
+  lhs.swap(rhs) ;
+}
+
+template<class T>
+class value_initialized
+{
+  private :
+
+    // initialized<T> does value-initialization by default.
+    initialized<T> m_data;
+
+  public :
+    
+    value_initialized()
+    :
+    m_data()
+    { }
+    
+    T const & data() const
+    {
+      return m_data.data();
+    }
+
+    T& data()
+    {
+      return m_data.data();
+    }
+
+    void swap(value_initialized & arg)
+    {
+      m_data.swap(arg.m_data);
+    }
+
+    operator T const &() const
+    {
+      return m_data;
+    }
+
+    operator T&()
+    {
+      return m_data;
+    }
+} ;
 
 
 template<class T>
@@ -119,6 +222,7 @@ T const& get ( value_initialized<T> const& x )
 {
   return x.data() ;
 }
+
 template<class T>
 T& get ( value_initialized<T>& x )
 {
@@ -138,7 +242,7 @@ class initialized_value_t
     
     template <class T> operator T() const
     {
-      return get( value_initialized<T>() );
+      return initialized<T>().data();
     }
 };
 
@@ -147,5 +251,8 @@ initialized_value_t const initialized_value = {} ;
 
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
 
 #endif
index e95ff85e710b0ce21c7a4534f16206e1c3f1d5ff..8d996f8701d8285fad8ddad0fc21d5eea95f6194 100644 (file)
@@ -19,7 +19,7 @@
 //  BOOST_VERSION / 100 % 1000 is the minor version
 //  BOOST_VERSION / 100000 is the major version
 
-#define BOOST_VERSION 104200
+#define BOOST_VERSION 104400
 
 //
 //  BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
@@ -27,7 +27,7 @@
 //  number, y is the minor version number, and z is the patch level if not 0.
 //  This is used by <config/auto_link.hpp> to select which library version to link to.
 
-#define BOOST_LIB_VERSION "1_42"
+#define BOOST_LIB_VERSION "1_44"
 
 #endif