--- /dev/null
+/* The following code declares class array,
+ * an STL container (as wrapper) for arrays of constant size.
+ *
+ * See
+ * http://www.boost.org/libs/array/
+ * for documentation.
+ *
+ * The original author site is at: http://www.josuttis.com/
+ *
+ * (C) Copyright Nicolai M. Josuttis 2001.
+ *
+ * Distributed under the Boost Software License, Version 1.0. (See
+ * accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * 14 Apr 2012 - (mtc) Added support for boost::hash
+ * 28 Dec 2010 - (mtc) Added cbegin and cend (and crbegin and crend) for C++Ox compatibility.
+ * 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)
+ * 20 Jan 2001 - STLport fix (Beman Dawes)
+ * 29 Sep 2000 - Initial Revision (Nico Josuttis)
+ *
+ * Jan 29, 2004
+ */
+#ifndef BOOST_ARRAY_HPP
+#define BOOST_ARRAY_HPP
+
+#include <boost/detail/workaround.hpp>
+
+#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>
+#include <stdexcept>
+#include <boost/assert.hpp>
+#include <boost/swap.hpp>
+
+// Handles broken standard libraries better than <iterator>
+#include <boost/detail/iterator.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/functional/hash_fwd.hpp>
+#include <algorithm>
+
+// FIXES for broken compilers
+#include <boost/config.hpp>
+
+
+namespace boost {
+
+ template<class T, std::size_t N>
+ class array {
+ public:
+ T elems[N]; // fixed-size array of elements of type T
+
+ public:
+ // type definitions
+ typedef T value_type;
+ typedef T* iterator;
+ typedef const T* const_iterator;
+ typedef T& reference;
+ typedef const T& const_reference;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+
+ // iterator support
+ iterator begin() { return elems; }
+ const_iterator begin() const { return elems; }
+ const_iterator cbegin() const { return elems; }
+
+ iterator end() { return elems+N; }
+ const_iterator end() const { return elems+N; }
+ const_iterator cend() const { return elems+N; }
+
+ // reverse iterator support
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310)
+ // workaround for broken reverse_iterator in VC7
+ typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator,
+ reference, iterator, reference> > reverse_iterator;
+ 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;
+ typedef std::reverse_iterator<const_iterator,T> const_reverse_iterator;
+#endif
+
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ const_reverse_iterator rbegin() const {
+ return const_reverse_iterator(end());
+ }
+ const_reverse_iterator crbegin() const {
+ return const_reverse_iterator(end());
+ }
+
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rend() const {
+ return const_reverse_iterator(begin());
+ }
+ const_reverse_iterator crend() const {
+ return const_reverse_iterator(begin());
+ }
+
+ // operator[]
+ reference operator[](size_type i)
+ {
+ BOOST_ASSERT_MSG( i < N, "out of range" );
+ return elems[i];
+ }
+
+ const_reference operator[](size_type i) const
+ {
+ BOOST_ASSERT_MSG( i < N, "out of range" );
+ return elems[i];
+ }
+
+ // at() with range check
+ reference at(size_type i) { rangecheck(i); return elems[i]; }
+ const_reference at(size_type i) const { rangecheck(i); return elems[i]; }
+
+ // front() and back()
+ reference front()
+ {
+ return elems[0];
+ }
+
+ const_reference front() const
+ {
+ return elems[0];
+ }
+
+ reference back()
+ {
+ return elems[N-1];
+ }
+
+ const_reference back() const
+ {
+ return elems[N-1];
+ }
+
+ // size is constant
+ static size_type size() { return N; }
+ static bool empty() { return false; }
+ static size_type max_size() { return N; }
+ enum { static_size = N };
+
+ // swap (note: linear complexity)
+ void swap (array<T,N>& y) {
+ for (size_type i = 0; i < N; ++i)
+ boost::swap(elems[i],y.elems[i]);
+ }
+
+ // direct access to data (read-only)
+ const T* data() const { return elems; }
+ T* data() { return elems; }
+
+ // use array as C array (direct read/write access to data)
+ T* c_array() { return elems; }
+
+ // assignment with type conversion
+ template <typename T2>
+ array<T,N>& operator= (const array<T2,N>& rhs) {
+ std::copy(rhs.begin(),rhs.end(), begin());
+ return *this;
+ }
+
+ // assign one value to all elements
+ void assign (const T& value) { fill ( value ); } // A synonym for fill
+ void fill (const T& value)
+ {
+ std::fill_n(begin(),size(),value);
+ }
+
+ // check range (may be private because it is static)
+ static void rangecheck (size_type i) {
+ if (i >= size()) {
+ std::out_of_range e("array<>: index out of range");
+ boost::throw_exception(e);
+ }
+ }
+
+ };
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+ template< class T >
+ class array< T, 0 > {
+
+ public:
+ // type definitions
+ typedef T value_type;
+ typedef T* iterator;
+ typedef const T* const_iterator;
+ typedef T& reference;
+ typedef const T& const_reference;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+
+ // iterator support
+ iterator begin() { return iterator( reinterpret_cast< T * >( this ) ); }
+ const_iterator begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); }
+ const_iterator cbegin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); }
+
+ iterator end() { return begin(); }
+ const_iterator end() const { return begin(); }
+ const_iterator cend() const { return cbegin(); }
+
+ // reverse iterator support
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310)
+ // workaround for broken reverse_iterator in VC7
+ typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator,
+ reference, iterator, reference> > reverse_iterator;
+ 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;
+ typedef std::reverse_iterator<const_iterator,T> const_reverse_iterator;
+#endif
+
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ const_reverse_iterator rbegin() const {
+ return const_reverse_iterator(end());
+ }
+ const_reverse_iterator crbegin() const {
+ return const_reverse_iterator(end());
+ }
+
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rend() const {
+ return const_reverse_iterator(begin());
+ }
+ const_reverse_iterator crend() const {
+ return const_reverse_iterator(begin());
+ }
+
+ // operator[]
+ reference operator[](size_type /*i*/)
+ {
+ return failed_rangecheck();
+ }
+
+ const_reference operator[](size_type /*i*/) const
+ {
+ return failed_rangecheck();
+ }
+
+ // at() with range check
+ reference at(size_type /*i*/) { return failed_rangecheck(); }
+ const_reference at(size_type /*i*/) const { return failed_rangecheck(); }
+
+ // front() and back()
+ reference front()
+ {
+ return failed_rangecheck();
+ }
+
+ const_reference front() const
+ {
+ return failed_rangecheck();
+ }
+
+ reference back()
+ {
+ return failed_rangecheck();
+ }
+
+ const_reference back() const
+ {
+ return failed_rangecheck();
+ }
+
+ // size is constant
+ static size_type size() { return 0; }
+ static bool empty() { return true; }
+ static size_type max_size() { return 0; }
+ enum { static_size = 0 };
+
+ void swap (array<T,0>& /*y*/) {
+ }
+
+ // direct access to data (read-only)
+ const T* data() const { return 0; }
+ T* data() { return 0; }
+
+ // use array as C array (direct read/write access to data)
+ T* c_array() { return 0; }
+
+ // assignment with type conversion
+ template <typename T2>
+ array<T,0>& operator= (const array<T2,0>& ) {
+ return *this;
+ }
+
+ // assign one value to all elements
+ 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) && !defined(__PATHSCALE__))
+ //
+ // We need to return something here to keep
+ // some compilers happy: however we will never
+ // actually get here....
+ //
+ static T placeholder;
+ return placeholder;
+#endif
+ }
+ };
+#endif
+
+ // comparisons
+ template<class T, std::size_t N>
+ bool operator== (const array<T,N>& x, const array<T,N>& y) {
+ return std::equal(x.begin(), x.end(), y.begin());
+ }
+ template<class T, std::size_t N>
+ bool operator< (const array<T,N>& x, const array<T,N>& y) {
+ return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
+ }
+ template<class T, std::size_t N>
+ bool operator!= (const array<T,N>& x, const array<T,N>& y) {
+ return !(x==y);
+ }
+ template<class T, std::size_t N>
+ bool operator> (const array<T,N>& x, const array<T,N>& y) {
+ return y<x;
+ }
+ template<class T, std::size_t N>
+ bool operator<= (const array<T,N>& x, const array<T,N>& y) {
+ return !(y<x);
+ }
+ template<class T, std::size_t N>
+ bool operator>= (const array<T,N>& x, const array<T,N>& y) {
+ return !(x<y);
+ }
+
+ // global swap()
+ template<class T, std::size_t N>
+ inline void swap (array<T,N>& x, array<T,N>& y) {
+ x.swap(y);
+ }
+
+#if defined(__SUNPRO_CC)
+// Trac ticket #4757; the Sun Solaris compiler can't handle
+// syntax like 'T(&get_c_array(boost::array<T,N>& arg))[N]'
+//
+// We can't just use this for all compilers, because the
+// borland compilers can't handle this form.
+ namespace detail {
+ template <typename T, std::size_t N> struct c_array
+ {
+ typedef T type[N];
+ };
+ }
+
+ // Specific for boost::array: simply returns its elems data member.
+ template <typename T, std::size_t N>
+ typename detail::c_array<T,N>::type& get_c_array(boost::array<T,N>& arg)
+ {
+ return arg.elems;
+ }
+
+ // Specific for boost::array: simply returns its elems data member.
+ template <typename T, std::size_t N>
+ typename const detail::c_array<T,N>::type& get_c_array(const boost::array<T,N>& arg)
+ {
+ return arg.elems;
+ }
+#else
+// 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;
+ }
+#endif
+
+#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
+
+
+ template<class T, std::size_t N>
+ std::size_t hash_value(const array<T,N>& arr)
+ {
+ return boost::hash_range(arr.begin(), arr.end());
+ }
+
+} /* namespace boost */
+
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+# pragma warning(pop)
+#endif
+
+#endif /*BOOST_ARRAY_HPP*/
--- /dev/null
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_ASSERT_DWA2006430_HPP
+# define BOOST_CONCEPT_ASSERT_DWA2006430_HPP
+
+# include <boost/config.hpp>
+# include <boost/detail/workaround.hpp>
+
+// The old protocol used a constraints() member function in concept
+// checking classes. If the compiler supports SFINAE, we can detect
+// that function and seamlessly support the old concept checking
+// classes. In this release, backward compatibility with the old
+// concept checking classes is enabled by default, where available.
+// The old protocol is deprecated, though, and backward compatibility
+// will no longer be the default in the next release.
+
+# if !defined(BOOST_NO_OLD_CONCEPT_SUPPORT) \
+ && !defined(BOOST_NO_SFINAE) \
+ \
+ && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4)) \
+ && !(BOOST_WORKAROUND(__GNUC__, == 2))
+
+// Note: gcc-2.96 through 3.3.x have some SFINAE, but no ability to
+// check for the presence of particularmember functions.
+
+# define BOOST_OLD_CONCEPT_SUPPORT
+
+# endif
+
+# ifdef BOOST_MSVC
+# include <boost/concept/detail/msvc.hpp>
+# elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+# include <boost/concept/detail/borland.hpp>
+# else
+# include <boost/concept/detail/general.hpp>
+# endif
+
+ // Usage, in class or function context:
+ //
+ // BOOST_CONCEPT_ASSERT((UnaryFunctionConcept<F,bool,int>));
+ //
+# define BOOST_CONCEPT_ASSERT(ModelInParens) \
+ BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens)
+
+#endif // BOOST_CONCEPT_ASSERT_DWA2006430_HPP
--- /dev/null
+// Copyright David Abrahams 2009. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP
+# define BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP
+
+namespace boost
+{
+ namespace concepts {}
+
+# if defined(BOOST_HAS_CONCEPTS) && !defined(BOOST_CONCEPT_NO_BACKWARD_KEYWORD)
+ namespace concept = concepts;
+# endif
+} // namespace boost::concept
+
+#endif // BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP
--- /dev/null
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
+# define BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
+
+# include <boost/preprocessor/cat.hpp>
+# include <boost/concept/detail/backward_compatibility.hpp>
+
+namespace boost { namespace concepts {
+
+template <class ModelFnPtr>
+struct require;
+
+template <class Model>
+struct require<void(*)(Model)>
+{
+ enum { instantiate = sizeof((((Model*)0)->~Model()), 3) };
+};
+
+# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
+ enum \
+ { \
+ BOOST_PP_CAT(boost_concept_check,__LINE__) = \
+ boost::concepts::require<ModelFnPtr>::instantiate \
+ }
+
+}} // namespace boost::concept
+
+#endif // BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
--- /dev/null
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP
+# define BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP
+# include <boost/preprocessor/seq/for_each_i.hpp>
+# include <boost/preprocessor/seq/enum.hpp>
+# include <boost/preprocessor/comma_if.hpp>
+# include <boost/preprocessor/cat.hpp>
+#endif // BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP
+
+// BOOST_concept(SomeName, (p1)(p2)...(pN))
+//
+// Expands to "template <class p1, class p2, ...class pN> struct SomeName"
+//
+// Also defines an equivalent SomeNameConcept for backward compatibility.
+// Maybe in the next release we can kill off the "Concept" suffix for good.
+#if BOOST_WORKAROUND(__GNUC__, <= 3)
+# define BOOST_concept(name, params) \
+ template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
+ struct name; /* forward declaration */ \
+ \
+ template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
+ struct BOOST_PP_CAT(name,Concept) \
+ : name< BOOST_PP_SEQ_ENUM(params) > \
+ { \
+ /* at least 2.96 and 3.4.3 both need this */ \
+ BOOST_PP_CAT(name,Concept)(); \
+ }; \
+ \
+ template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
+ struct name
+#else
+# define BOOST_concept(name, params) \
+ template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
+ struct name; /* forward declaration */ \
+ \
+ template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
+ struct BOOST_PP_CAT(name,Concept) \
+ : name< BOOST_PP_SEQ_ENUM(params) > \
+ { \
+ }; \
+ \
+ template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \
+ struct name
+#endif
+
+// Helper for BOOST_concept, above.
+# define BOOST_CONCEPT_typename(r, ignored, index, t) \
+ BOOST_PP_COMMA_IF(index) typename t
+
--- /dev/null
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+# undef BOOST_concept_typename
+# undef BOOST_concept
--- /dev/null
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
+# define BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
+
+# include <boost/preprocessor/cat.hpp>
+# include <boost/concept/detail/backward_compatibility.hpp>
+
+# ifdef BOOST_OLD_CONCEPT_SUPPORT
+# include <boost/concept/detail/has_constraints.hpp>
+# include <boost/mpl/if.hpp>
+# endif
+
+// This implementation works on Comeau and GCC, all the way back to
+// 2.95
+namespace boost { namespace concepts {
+
+template <class ModelFn>
+struct requirement_;
+
+namespace detail
+{
+ template <void(*)()> struct instantiate {};
+}
+
+template <class Model>
+struct requirement
+{
+ static void failed() { ((Model*)0)->~Model(); }
+};
+
+struct failed {};
+
+template <class Model>
+struct requirement<failed ************ Model::************>
+{
+ static void failed() { ((Model*)0)->~Model(); }
+};
+
+# ifdef BOOST_OLD_CONCEPT_SUPPORT
+
+template <class Model>
+struct constraint
+{
+ static void failed() { ((Model*)0)->constraints(); }
+};
+
+template <class Model>
+struct requirement_<void(*)(Model)>
+ : mpl::if_<
+ concepts::not_satisfied<Model>
+ , constraint<Model>
+ , requirement<failed ************ Model::************>
+ >::type
+{};
+
+# else
+
+// For GCC-2.x, these can't have exactly the same name
+template <class Model>
+struct requirement_<void(*)(Model)>
+ : requirement<failed ************ Model::************>
+{};
+
+# endif
+
+# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
+ typedef ::boost::concepts::detail::instantiate< \
+ &::boost::concepts::requirement_<ModelFnPtr>::failed> \
+ BOOST_PP_CAT(boost_concept_check,__LINE__)
+
+}}
+
+#endif // BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
--- /dev/null
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
+# define BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
+
+# include <boost/mpl/bool.hpp>
+# include <boost/detail/workaround.hpp>
+# include <boost/concept/detail/backward_compatibility.hpp>
+
+namespace boost { namespace concepts {
+
+namespace detail
+{
+
+// Here we implement the metafunction that detects whether a
+// constraints metafunction exists
+ typedef char yes;
+ typedef char (&no)[2];
+
+ template <class Model, void (Model::*)()>
+ struct wrap_constraints {};
+
+#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) || defined(__CUDACC__)
+ // Work around the following bogus error in Sun Studio 11, by
+ // turning off the has_constraints function entirely:
+ // Error: complex expression not allowed in dependent template
+ // argument expression
+ inline no has_constraints_(...);
+#else
+ template <class Model>
+ inline yes has_constraints_(Model*, wrap_constraints<Model,&Model::constraints>* = 0);
+ inline no has_constraints_(...);
+#endif
+}
+
+// This would be called "detail::has_constraints," but it has a strong
+// tendency to show up in error messages.
+template <class Model>
+struct not_satisfied
+{
+ BOOST_STATIC_CONSTANT(
+ bool
+ , value = sizeof( detail::has_constraints_((Model*)0) ) == sizeof(detail::yes) );
+ typedef mpl::bool_<value> type;
+};
+
+}} // namespace boost::concepts::detail
+
+#endif // BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
--- /dev/null
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
+# define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
+
+# include <boost/preprocessor/cat.hpp>
+# include <boost/concept/detail/backward_compatibility.hpp>
+
+# ifdef BOOST_OLD_CONCEPT_SUPPORT
+# include <boost/concept/detail/has_constraints.hpp>
+# include <boost/mpl/if.hpp>
+# endif
+
+
+namespace boost { namespace concepts {
+
+
+template <class Model>
+struct check
+{
+ virtual void failed(Model* x)
+ {
+ x->~Model();
+ }
+};
+
+# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
+struct failed {};
+template <class Model>
+struct check<failed ************ Model::************>
+{
+ virtual void failed(Model* x)
+ {
+ x->~Model();
+ }
+};
+# endif
+
+# ifdef BOOST_OLD_CONCEPT_SUPPORT
+
+namespace detail
+{
+ // No need for a virtual function here, since evaluating
+ // not_satisfied below will have already instantiated the
+ // constraints() member.
+ struct constraint {};
+}
+
+template <class Model>
+struct require
+ : mpl::if_c<
+ not_satisfied<Model>::value
+ , detail::constraint
+# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
+ , check<Model>
+# else
+ , check<failed ************ Model::************>
+# endif
+ >::type
+{};
+
+# else
+
+template <class Model>
+struct require
+# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
+ : check<Model>
+# else
+ : check<failed ************ Model::************>
+# endif
+{};
+
+# endif
+
+# if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+
+//
+// The iterator library sees some really strange errors unless we
+// do things this way.
+//
+template <class Model>
+struct require<void(*)(Model)>
+{
+ virtual void failed(Model*)
+ {
+ require<Model>();
+ }
+};
+
+# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
+enum \
+{ \
+ BOOST_PP_CAT(boost_concept_check,__LINE__) = \
+ sizeof(::boost::concepts::require<ModelFnPtr>) \
+}
+
+# else // Not vc-7.1
+
+template <class Model>
+require<Model>
+require_(void(*)(Model));
+
+# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
+enum \
+{ \
+ BOOST_PP_CAT(boost_concept_check,__LINE__) = \
+ sizeof(::boost::concepts::require_((ModelFnPtr)0)) \
+}
+
+# endif
+}}
+
+#endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
--- /dev/null
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_USAGE_DWA2006919_HPP
+# define BOOST_CONCEPT_USAGE_DWA2006919_HPP
+
+# include <boost/concept/assert.hpp>
+# include <boost/detail/workaround.hpp>
+# include <boost/concept/detail/backward_compatibility.hpp>
+
+namespace boost { namespace concepts {
+
+# if BOOST_WORKAROUND(__GNUC__, == 2)
+
+# define BOOST_CONCEPT_USAGE(model) ~model()
+
+# else
+
+template <class Model>
+struct usage_requirements
+{
+ ~usage_requirements() { ((Model*)0)->~Model(); }
+};
+
+# if BOOST_WORKAROUND(__GNUC__, <= 3)
+
+# define BOOST_CONCEPT_USAGE(model) \
+ model(); /* at least 2.96 and 3.4.3 both need this :( */ \
+ BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \
+ ~model()
+
+# else
+
+# define BOOST_CONCEPT_USAGE(model) \
+ BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \
+ ~model()
+
+# endif
+
+# endif
+
+}} // namespace boost::concepts
+
+#endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP
--- /dev/null
+//
+// (C) Copyright Jeremy Siek 2000.
+// Copyright 2002 The Trustees of Indiana University.
+//
+// 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)
+//
+// Revision History:
+// 05 May 2001: Workarounds for HP aCC from Thomas Matelich. (Jeremy Siek)
+// 02 April 2001: Removed limits header altogether. (Jeremy Siek)
+// 01 April 2001: Modified to use new <boost/limits.hpp> header. (JMaddock)
+//
+
+// See http://www.boost.org/libs/concept_check for documentation.
+
+#ifndef BOOST_CONCEPT_CHECKS_HPP
+# define BOOST_CONCEPT_CHECKS_HPP
+
+# include <boost/concept/assert.hpp>
+
+# include <boost/iterator.hpp>
+# include <boost/type_traits/conversion_traits.hpp>
+# include <utility>
+# include <boost/type_traits/is_same.hpp>
+# include <boost/type_traits/is_void.hpp>
+# include <boost/mpl/assert.hpp>
+# include <boost/mpl/bool.hpp>
+# include <boost/detail/workaround.hpp>
+# include <boost/detail/iterator.hpp>
+
+# include <boost/concept/usage.hpp>
+# include <boost/concept/detail/concept_def.hpp>
+
+namespace boost
+{
+
+ //
+ // Backward compatibility
+ //
+
+ template <class Model>
+ inline void function_requires(Model* = 0)
+ {
+ BOOST_CONCEPT_ASSERT((Model));
+ }
+ template <class T> inline void ignore_unused_variable_warning(T const&) {}
+
+# define BOOST_CLASS_REQUIRE(type_var, ns, concept) \
+ BOOST_CONCEPT_ASSERT((ns::concept<type_var>))
+
+# define BOOST_CLASS_REQUIRE2(type_var1, type_var2, ns, concept) \
+ BOOST_CONCEPT_ASSERT((ns::concept<type_var1,type_var2>))
+
+# define BOOST_CLASS_REQUIRE3(tv1, tv2, tv3, ns, concept) \
+ BOOST_CONCEPT_ASSERT((ns::concept<tv1,tv2,tv3>))
+
+# define BOOST_CLASS_REQUIRE4(tv1, tv2, tv3, tv4, ns, concept) \
+ BOOST_CONCEPT_ASSERT((ns::concept<tv1,tv2,tv3,tv4>))
+
+
+ //
+ // Begin concept definitions
+ //
+ BOOST_concept(Integer, (T))
+ {
+ BOOST_CONCEPT_USAGE(Integer)
+ {
+ x.error_type_must_be_an_integer_type();
+ }
+ private:
+ T x;
+ };
+
+ template <> struct Integer<char> {};
+ template <> struct Integer<signed char> {};
+ template <> struct Integer<unsigned char> {};
+ template <> struct Integer<short> {};
+ template <> struct Integer<unsigned short> {};
+ template <> struct Integer<int> {};
+ template <> struct Integer<unsigned int> {};
+ template <> struct Integer<long> {};
+ template <> struct Integer<unsigned long> {};
+# if defined(BOOST_HAS_LONG_LONG)
+ template <> struct Integer< ::boost::long_long_type> {};
+ template <> struct Integer< ::boost::ulong_long_type> {};
+# elif defined(BOOST_HAS_MS_INT64)
+ template <> struct Integer<__int64> {};
+ template <> struct Integer<unsigned __int64> {};
+# endif
+
+ BOOST_concept(SignedInteger,(T)) {
+ BOOST_CONCEPT_USAGE(SignedInteger) {
+ x.error_type_must_be_a_signed_integer_type();
+ }
+ private:
+ T x;
+ };
+ template <> struct SignedInteger<signed char> { };
+ template <> struct SignedInteger<short> {};
+ template <> struct SignedInteger<int> {};
+ template <> struct SignedInteger<long> {};
+# if defined(BOOST_HAS_LONG_LONG)
+ template <> struct SignedInteger< ::boost::long_long_type> {};
+# elif defined(BOOST_HAS_MS_INT64)
+ template <> struct SignedInteger<__int64> {};
+# endif
+
+ BOOST_concept(UnsignedInteger,(T)) {
+ BOOST_CONCEPT_USAGE(UnsignedInteger) {
+ x.error_type_must_be_an_unsigned_integer_type();
+ }
+ private:
+ T x;
+ };
+
+ template <> struct UnsignedInteger<unsigned char> {};
+ template <> struct UnsignedInteger<unsigned short> {};
+ template <> struct UnsignedInteger<unsigned int> {};
+ template <> struct UnsignedInteger<unsigned long> {};
+# if defined(BOOST_HAS_LONG_LONG)
+ template <> struct UnsignedInteger< ::boost::ulong_long_type> {};
+# elif defined(BOOST_HAS_MS_INT64)
+ template <> struct UnsignedInteger<unsigned __int64> {};
+# endif
+
+ //===========================================================================
+ // Basic Concepts
+
+ BOOST_concept(DefaultConstructible,(TT))
+ {
+ BOOST_CONCEPT_USAGE(DefaultConstructible) {
+ TT a; // require default constructor
+ ignore_unused_variable_warning(a);
+ }
+ };
+
+ BOOST_concept(Assignable,(TT))
+ {
+ BOOST_CONCEPT_USAGE(Assignable) {
+#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
+ a = b; // require assignment operator
+#endif
+ const_constraints(b);
+ }
+ private:
+ void const_constraints(const TT& x) {
+#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
+ a = x; // const required for argument to assignment
+#else
+ ignore_unused_variable_warning(x);
+#endif
+ }
+ private:
+ TT a;
+ TT b;
+ };
+
+
+ BOOST_concept(CopyConstructible,(TT))
+ {
+ BOOST_CONCEPT_USAGE(CopyConstructible) {
+ TT a(b); // require copy constructor
+ TT* ptr = &a; // require address of operator
+ const_constraints(a);
+ ignore_unused_variable_warning(ptr);
+ }
+ private:
+ void const_constraints(const TT& a) {
+ TT c(a); // require const copy constructor
+ const TT* ptr = &a; // require const address of operator
+ ignore_unused_variable_warning(c);
+ ignore_unused_variable_warning(ptr);
+ }
+ TT b;
+ };
+
+#if (defined _MSC_VER)
+# pragma warning( push )
+# pragma warning( disable : 4510 ) // default constructor could not be generated
+# pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required
+#endif
+ // The SGI STL version of Assignable requires copy constructor and operator=
+ BOOST_concept(SGIAssignable,(TT))
+ {
+ BOOST_CONCEPT_USAGE(SGIAssignable) {
+ TT c(a);
+#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
+ a = b; // require assignment operator
+#endif
+ const_constraints(b);
+ ignore_unused_variable_warning(c);
+ }
+ private:
+ void const_constraints(const TT& x) {
+ TT c(x);
+#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
+ a = x; // const required for argument to assignment
+#endif
+ ignore_unused_variable_warning(c);
+ }
+ TT a;
+ TT b;
+ };
+#if (defined _MSC_VER)
+# pragma warning( pop )
+#endif
+
+ BOOST_concept(Convertible,(X)(Y))
+ {
+ BOOST_CONCEPT_USAGE(Convertible) {
+ Y y = x;
+ ignore_unused_variable_warning(y);
+ }
+ private:
+ X x;
+ };
+
+ // The C++ standard requirements for many concepts talk about return
+ // types that must be "convertible to bool". The problem with this
+ // requirement is that it leaves the door open for evil proxies that
+ // define things like operator|| with strange return types. Two
+ // possible solutions are:
+ // 1) require the return type to be exactly bool
+ // 2) stay with convertible to bool, and also
+ // specify stuff about all the logical operators.
+ // For now we just test for convertible to bool.
+ template <class TT>
+ void require_boolean_expr(const TT& t) {
+ bool x = t;
+ ignore_unused_variable_warning(x);
+ }
+
+ BOOST_concept(EqualityComparable,(TT))
+ {
+ BOOST_CONCEPT_USAGE(EqualityComparable) {
+ require_boolean_expr(a == b);
+ require_boolean_expr(a != b);
+ }
+ private:
+ TT a, b;
+ };
+
+ BOOST_concept(LessThanComparable,(TT))
+ {
+ BOOST_CONCEPT_USAGE(LessThanComparable) {
+ require_boolean_expr(a < b);
+ }
+ private:
+ TT a, b;
+ };
+
+ // This is equivalent to SGI STL's LessThanComparable.
+ BOOST_concept(Comparable,(TT))
+ {
+ BOOST_CONCEPT_USAGE(Comparable) {
+ require_boolean_expr(a < b);
+ require_boolean_expr(a > b);
+ require_boolean_expr(a <= b);
+ require_boolean_expr(a >= b);
+ }
+ private:
+ TT a, b;
+ };
+
+#define BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(OP,NAME) \
+ BOOST_concept(NAME, (First)(Second)) \
+ { \
+ BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \
+ private: \
+ bool constraints_() { return a OP b; } \
+ First a; \
+ Second b; \
+ }
+
+#define BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(OP,NAME) \
+ BOOST_concept(NAME, (Ret)(First)(Second)) \
+ { \
+ BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \
+ private: \
+ Ret constraints_() { return a OP b; } \
+ First a; \
+ Second b; \
+ }
+
+ BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, EqualOp);
+ BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, NotEqualOp);
+ BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, LessThanOp);
+ BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, LessEqualOp);
+ BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, GreaterThanOp);
+ BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, GreaterEqualOp);
+
+ BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, PlusOp);
+ BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, TimesOp);
+ BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, DivideOp);
+ BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, SubtractOp);
+ BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, ModOp);
+
+ //===========================================================================
+ // Function Object Concepts
+
+ BOOST_concept(Generator,(Func)(Return))
+ {
+ BOOST_CONCEPT_USAGE(Generator) { test(is_void<Return>()); }
+
+ private:
+ void test(boost::mpl::false_)
+ {
+ // Do we really want a reference here?
+ const Return& r = f();
+ ignore_unused_variable_warning(r);
+ }
+
+ void test(boost::mpl::true_)
+ {
+ f();
+ }
+
+ Func f;
+ };
+
+ BOOST_concept(UnaryFunction,(Func)(Return)(Arg))
+ {
+ BOOST_CONCEPT_USAGE(UnaryFunction) { test(is_void<Return>()); }
+
+ private:
+ void test(boost::mpl::false_)
+ {
+ f(arg); // "priming the pump" this way keeps msvc6 happy (ICE)
+ Return r = f(arg);
+ ignore_unused_variable_warning(r);
+ }
+
+ void test(boost::mpl::true_)
+ {
+ 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;
+ };
+
+ BOOST_concept(BinaryFunction,(Func)(Return)(First)(Second))
+ {
+ BOOST_CONCEPT_USAGE(BinaryFunction) { test(is_void<Return>()); }
+ private:
+ void test(boost::mpl::false_)
+ {
+ f(first,second);
+ Return r = f(first, second); // require operator()
+ (void)r;
+ }
+
+ void test(boost::mpl::true_)
+ {
+ f(first,second);
+ }
+
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+ && BOOST_WORKAROUND(__GNUC__, > 3)))
+ // Declare a dummy constructor 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::BinaryFunction<YourClassHere>::arg"
+ // in class without a constructor [-Wuninitialized])
+ BinaryFunction();
+#endif
+
+ Func f;
+ First first;
+ Second second;
+ };
+
+ BOOST_concept(UnaryPredicate,(Func)(Arg))
+ {
+ BOOST_CONCEPT_USAGE(UnaryPredicate) {
+ require_boolean_expr(f(arg)); // require operator() returning bool
+ }
+ private:
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+ && BOOST_WORKAROUND(__GNUC__, > 3)))
+ // Declare a dummy constructor 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::UnaryPredicate<YourClassHere>::arg"
+ // in class without a constructor [-Wuninitialized])
+ UnaryPredicate();
+#endif
+
+ Func f;
+ Arg arg;
+ };
+
+ BOOST_concept(BinaryPredicate,(Func)(First)(Second))
+ {
+ BOOST_CONCEPT_USAGE(BinaryPredicate) {
+ require_boolean_expr(f(a, b)); // require operator() returning bool
+ }
+ private:
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+ && BOOST_WORKAROUND(__GNUC__, > 3)))
+ // Declare a dummy constructor 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::BinaryPredicate<YourClassHere>::arg"
+ // in class without a constructor [-Wuninitialized])
+ BinaryPredicate();
+#endif
+ Func f;
+ First a;
+ Second b;
+ };
+
+ // use this when functor is used inside a container class like std::set
+ BOOST_concept(Const_BinaryPredicate,(Func)(First)(Second))
+ : BinaryPredicate<Func, First, Second>
+ {
+ BOOST_CONCEPT_USAGE(Const_BinaryPredicate) {
+ const_constraints(f);
+ }
+ private:
+ void const_constraints(const Func& fun) {
+ // operator() must be a const member function
+ require_boolean_expr(fun(a, b));
+ }
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+ && BOOST_WORKAROUND(__GNUC__, > 3)))
+ // Declare a dummy constructor 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::Const_BinaryPredicate<YourClassHere>::arg"
+ // in class without a constructor [-Wuninitialized])
+ Const_BinaryPredicate();
+#endif
+
+ Func f;
+ First a;
+ Second b;
+ };
+
+ BOOST_concept(AdaptableGenerator,(Func)(Return))
+ : Generator<Func, typename Func::result_type>
+ {
+ typedef typename Func::result_type result_type;
+
+ BOOST_CONCEPT_USAGE(AdaptableGenerator)
+ {
+ BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>));
+ }
+ };
+
+ BOOST_concept(AdaptableUnaryFunction,(Func)(Return)(Arg))
+ : UnaryFunction<Func, typename Func::result_type, typename Func::argument_type>
+ {
+ typedef typename Func::argument_type argument_type;
+ typedef typename Func::result_type result_type;
+
+ ~AdaptableUnaryFunction()
+ {
+ BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>));
+ BOOST_CONCEPT_ASSERT((Convertible<Arg, argument_type>));
+ }
+ };
+
+ BOOST_concept(AdaptableBinaryFunction,(Func)(Return)(First)(Second))
+ : BinaryFunction<
+ Func
+ , typename Func::result_type
+ , typename Func::first_argument_type
+ , typename Func::second_argument_type
+ >
+ {
+ typedef typename Func::first_argument_type first_argument_type;
+ typedef typename Func::second_argument_type second_argument_type;
+ typedef typename Func::result_type result_type;
+
+ ~AdaptableBinaryFunction()
+ {
+ BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>));
+ BOOST_CONCEPT_ASSERT((Convertible<First, first_argument_type>));
+ BOOST_CONCEPT_ASSERT((Convertible<Second, second_argument_type>));
+ }
+ };
+
+ BOOST_concept(AdaptablePredicate,(Func)(Arg))
+ : UnaryPredicate<Func, Arg>
+ , AdaptableUnaryFunction<Func, bool, Arg>
+ {
+ };
+
+ BOOST_concept(AdaptableBinaryPredicate,(Func)(First)(Second))
+ : BinaryPredicate<Func, First, Second>
+ , AdaptableBinaryFunction<Func, bool, First, Second>
+ {
+ };
+
+ //===========================================================================
+ // Iterator Concepts
+
+ BOOST_concept(InputIterator,(TT))
+ : Assignable<TT>
+ , EqualityComparable<TT>
+ {
+ typedef typename boost::detail::iterator_traits<TT>::value_type value_type;
+ typedef typename boost::detail::iterator_traits<TT>::difference_type difference_type;
+ typedef typename boost::detail::iterator_traits<TT>::reference reference;
+ typedef typename boost::detail::iterator_traits<TT>::pointer pointer;
+ typedef typename boost::detail::iterator_traits<TT>::iterator_category iterator_category;
+
+ BOOST_CONCEPT_USAGE(InputIterator)
+ {
+ BOOST_CONCEPT_ASSERT((SignedInteger<difference_type>));
+ BOOST_CONCEPT_ASSERT((Convertible<iterator_category, std::input_iterator_tag>));
+
+ TT j(i);
+ (void)*i; // require dereference operator
+ ++j; // require preincrement operator
+ i++; // require postincrement operator
+ }
+ private:
+ TT i;
+ };
+
+ BOOST_concept(OutputIterator,(TT)(ValueT))
+ : Assignable<TT>
+ {
+ BOOST_CONCEPT_USAGE(OutputIterator) {
+
+ ++i; // require preincrement operator
+ i++; // require postincrement operator
+ *i++ = t; // require postincrement and assignment
+ }
+ private:
+ TT i, j;
+ ValueT t;
+ };
+
+ BOOST_concept(ForwardIterator,(TT))
+ : InputIterator<TT>
+ {
+ BOOST_CONCEPT_USAGE(ForwardIterator)
+ {
+ BOOST_CONCEPT_ASSERT((Convertible<
+ BOOST_DEDUCED_TYPENAME ForwardIterator::iterator_category
+ , std::forward_iterator_tag
+ >));
+
+ typename InputIterator<TT>::reference r = *i;
+ ignore_unused_variable_warning(r);
+ }
+
+ private:
+ TT i;
+ };
+
+ BOOST_concept(Mutable_ForwardIterator,(TT))
+ : ForwardIterator<TT>
+ {
+ BOOST_CONCEPT_USAGE(Mutable_ForwardIterator) {
+ *i++ = *i; // require postincrement and assignment
+ }
+ private:
+ TT i;
+ };
+
+ BOOST_concept(BidirectionalIterator,(TT))
+ : ForwardIterator<TT>
+ {
+ BOOST_CONCEPT_USAGE(BidirectionalIterator)
+ {
+ BOOST_CONCEPT_ASSERT((Convertible<
+ BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category
+ , std::bidirectional_iterator_tag
+ >));
+
+ --i; // require predecrement operator
+ i--; // require postdecrement operator
+ }
+ private:
+ TT i;
+ };
+
+ BOOST_concept(Mutable_BidirectionalIterator,(TT))
+ : BidirectionalIterator<TT>
+ , Mutable_ForwardIterator<TT>
+ {
+ BOOST_CONCEPT_USAGE(Mutable_BidirectionalIterator)
+ {
+ *i-- = *i; // require postdecrement and assignment
+ }
+ private:
+ TT i;
+ };
+
+ BOOST_concept(RandomAccessIterator,(TT))
+ : BidirectionalIterator<TT>
+ , Comparable<TT>
+ {
+ BOOST_CONCEPT_USAGE(RandomAccessIterator)
+ {
+ BOOST_CONCEPT_ASSERT((Convertible<
+ BOOST_DEDUCED_TYPENAME BidirectionalIterator<TT>::iterator_category
+ , std::random_access_iterator_tag
+ >));
+
+ i += n; // require assignment addition operator
+ i = i + n; i = n + i; // require addition with difference type
+ i -= n; // require assignment subtraction operator
+ i = i - n; // require subtraction with difference type
+ n = i - j; // require difference operator
+ (void)i[n]; // require element access operator
+ }
+
+ private:
+ TT a, b;
+ TT i, j;
+ typename boost::detail::iterator_traits<TT>::difference_type n;
+ };
+
+ BOOST_concept(Mutable_RandomAccessIterator,(TT))
+ : RandomAccessIterator<TT>
+ , Mutable_BidirectionalIterator<TT>
+ {
+ BOOST_CONCEPT_USAGE(Mutable_RandomAccessIterator)
+ {
+ i[n] = *i; // require element access and assignment
+ }
+ private:
+ TT i;
+ typename boost::detail::iterator_traits<TT>::difference_type n;
+ };
+
+ //===========================================================================
+ // Container s
+
+ BOOST_concept(Container,(C))
+ : Assignable<C>
+ {
+ typedef typename C::value_type value_type;
+ typedef typename C::difference_type difference_type;
+ typedef typename C::size_type size_type;
+ typedef typename C::const_reference const_reference;
+ typedef typename C::const_pointer const_pointer;
+ typedef typename C::const_iterator const_iterator;
+
+ BOOST_CONCEPT_USAGE(Container)
+ {
+ BOOST_CONCEPT_ASSERT((InputIterator<const_iterator>));
+ const_constraints(c);
+ }
+
+ private:
+ void const_constraints(const C& cc) {
+ i = cc.begin();
+ i = cc.end();
+ n = cc.size();
+ n = cc.max_size();
+ b = cc.empty();
+ }
+ C c;
+ bool b;
+ const_iterator i;
+ size_type n;
+ };
+
+ BOOST_concept(Mutable_Container,(C))
+ : Container<C>
+ {
+ typedef typename C::reference reference;
+ typedef typename C::iterator iterator;
+ typedef typename C::pointer pointer;
+
+ BOOST_CONCEPT_USAGE(Mutable_Container)
+ {
+ BOOST_CONCEPT_ASSERT((
+ Assignable<typename Mutable_Container::value_type>));
+
+ BOOST_CONCEPT_ASSERT((InputIterator<iterator>));
+
+ i = c.begin();
+ i = c.end();
+ c.swap(c2);
+ }
+
+ private:
+ iterator i;
+ C c, c2;
+ };
+
+ BOOST_concept(ForwardContainer,(C))
+ : Container<C>
+ {
+ BOOST_CONCEPT_USAGE(ForwardContainer)
+ {
+ BOOST_CONCEPT_ASSERT((
+ ForwardIterator<
+ typename ForwardContainer::const_iterator
+ >));
+ }
+ };
+
+ BOOST_concept(Mutable_ForwardContainer,(C))
+ : ForwardContainer<C>
+ , Mutable_Container<C>
+ {
+ BOOST_CONCEPT_USAGE(Mutable_ForwardContainer)
+ {
+ BOOST_CONCEPT_ASSERT((
+ Mutable_ForwardIterator<
+ typename Mutable_ForwardContainer::iterator
+ >));
+ }
+ };
+
+ BOOST_concept(ReversibleContainer,(C))
+ : ForwardContainer<C>
+ {
+ typedef typename
+ C::const_reverse_iterator
+ const_reverse_iterator;
+
+ BOOST_CONCEPT_USAGE(ReversibleContainer)
+ {
+ BOOST_CONCEPT_ASSERT((
+ BidirectionalIterator<
+ typename ReversibleContainer::const_iterator>));
+
+ BOOST_CONCEPT_ASSERT((BidirectionalIterator<const_reverse_iterator>));
+
+ const_constraints(c);
+ }
+ private:
+ void const_constraints(const C& cc)
+ {
+ const_reverse_iterator i = cc.rbegin();
+ i = cc.rend();
+ }
+ C c;
+ };
+
+ BOOST_concept(Mutable_ReversibleContainer,(C))
+ : Mutable_ForwardContainer<C>
+ , ReversibleContainer<C>
+ {
+ typedef typename C::reverse_iterator reverse_iterator;
+
+ BOOST_CONCEPT_USAGE(Mutable_ReversibleContainer)
+ {
+ typedef typename Mutable_ForwardContainer<C>::iterator iterator;
+ BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator<iterator>));
+ BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator<reverse_iterator>));
+
+ reverse_iterator i = c.rbegin();
+ i = c.rend();
+ }
+ private:
+ C c;
+ };
+
+ BOOST_concept(RandomAccessContainer,(C))
+ : ReversibleContainer<C>
+ {
+ typedef typename C::size_type size_type;
+ typedef typename C::const_reference const_reference;
+
+ BOOST_CONCEPT_USAGE(RandomAccessContainer)
+ {
+ BOOST_CONCEPT_ASSERT((
+ RandomAccessIterator<
+ typename RandomAccessContainer::const_iterator
+ >));
+
+ const_constraints(c);
+ }
+ private:
+ void const_constraints(const C& cc)
+ {
+ const_reference r = cc[n];
+ ignore_unused_variable_warning(r);
+ }
+
+ C c;
+ size_type n;
+ };
+
+ BOOST_concept(Mutable_RandomAccessContainer,(C))
+ : Mutable_ReversibleContainer<C>
+ , RandomAccessContainer<C>
+ {
+ private:
+ typedef Mutable_RandomAccessContainer self;
+ public:
+ BOOST_CONCEPT_USAGE(Mutable_RandomAccessContainer)
+ {
+ BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator<typename self::iterator>));
+ BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator<typename self::reverse_iterator>));
+
+ typename self::reference r = c[i];
+ ignore_unused_variable_warning(r);
+ }
+
+ private:
+ typename Mutable_ReversibleContainer<C>::size_type i;
+ C c;
+ };
+
+ // A Sequence is inherently mutable
+ BOOST_concept(Sequence,(S))
+ : Mutable_ForwardContainer<S>
+ // Matt Austern's book puts DefaultConstructible here, the C++
+ // standard places it in Container --JGS
+ // ... so why aren't we following the standard? --DWA
+ , DefaultConstructible<S>
+ {
+ BOOST_CONCEPT_USAGE(Sequence)
+ {
+ S
+ c(n),
+ c2(n, t),
+ c3(first, last);
+
+ c.insert(p, t);
+ c.insert(p, n, t);
+ c.insert(p, first, last);
+
+ c.erase(p);
+ c.erase(p, q);
+
+ typename Sequence::reference r = c.front();
+
+ ignore_unused_variable_warning(c);
+ ignore_unused_variable_warning(c2);
+ ignore_unused_variable_warning(c3);
+ ignore_unused_variable_warning(r);
+ const_constraints(c);
+ }
+ private:
+ void const_constraints(const S& c) {
+ typename Sequence::const_reference r = c.front();
+ ignore_unused_variable_warning(r);
+ }
+
+ typename S::value_type t;
+ typename S::size_type n;
+ typename S::value_type* first, *last;
+ typename S::iterator p, q;
+ };
+
+ BOOST_concept(FrontInsertionSequence,(S))
+ : Sequence<S>
+ {
+ BOOST_CONCEPT_USAGE(FrontInsertionSequence)
+ {
+ c.push_front(t);
+ c.pop_front();
+ }
+ private:
+ S c;
+ typename S::value_type t;
+ };
+
+ BOOST_concept(BackInsertionSequence,(S))
+ : Sequence<S>
+ {
+ BOOST_CONCEPT_USAGE(BackInsertionSequence)
+ {
+ c.push_back(t);
+ c.pop_back();
+ typename BackInsertionSequence::reference r = c.back();
+ ignore_unused_variable_warning(r);
+ const_constraints(c);
+ }
+ private:
+ void const_constraints(const S& cc) {
+ typename BackInsertionSequence::const_reference
+ r = cc.back();
+ ignore_unused_variable_warning(r);
+ };
+ S c;
+ typename S::value_type t;
+ };
+
+ BOOST_concept(AssociativeContainer,(C))
+ : ForwardContainer<C>
+ , DefaultConstructible<C>
+ {
+ typedef typename C::key_type key_type;
+ typedef typename C::key_compare key_compare;
+ typedef typename C::value_compare value_compare;
+ typedef typename C::iterator iterator;
+
+ BOOST_CONCEPT_USAGE(AssociativeContainer)
+ {
+ i = c.find(k);
+ r = c.equal_range(k);
+ c.erase(k);
+ c.erase(i);
+ c.erase(r.first, r.second);
+ const_constraints(c);
+ BOOST_CONCEPT_ASSERT((BinaryPredicate<key_compare,key_type,key_type>));
+
+ typedef typename AssociativeContainer::value_type value_type_;
+ BOOST_CONCEPT_ASSERT((BinaryPredicate<value_compare,value_type_,value_type_>));
+ }
+
+ // Redundant with the base concept, but it helps below.
+ typedef typename C::const_iterator const_iterator;
+ private:
+ void const_constraints(const C& cc)
+ {
+ ci = cc.find(k);
+ n = cc.count(k);
+ cr = cc.equal_range(k);
+ }
+
+ C c;
+ iterator i;
+ std::pair<iterator,iterator> r;
+ const_iterator ci;
+ std::pair<const_iterator,const_iterator> cr;
+ typename C::key_type k;
+ typename C::size_type n;
+ };
+
+ BOOST_concept(UniqueAssociativeContainer,(C))
+ : AssociativeContainer<C>
+ {
+ BOOST_CONCEPT_USAGE(UniqueAssociativeContainer)
+ {
+ C c(first, last);
+
+ pos_flag = c.insert(t);
+ c.insert(first, last);
+
+ ignore_unused_variable_warning(c);
+ }
+ private:
+ std::pair<typename C::iterator, bool> pos_flag;
+ typename C::value_type t;
+ typename C::value_type* first, *last;
+ };
+
+ BOOST_concept(MultipleAssociativeContainer,(C))
+ : AssociativeContainer<C>
+ {
+ BOOST_CONCEPT_USAGE(MultipleAssociativeContainer)
+ {
+ C c(first, last);
+
+ pos = c.insert(t);
+ c.insert(first, last);
+
+ ignore_unused_variable_warning(c);
+ ignore_unused_variable_warning(pos);
+ }
+ private:
+ typename C::iterator pos;
+ typename C::value_type t;
+ typename C::value_type* first, *last;
+ };
+
+ BOOST_concept(SimpleAssociativeContainer,(C))
+ : AssociativeContainer<C>
+ {
+ BOOST_CONCEPT_USAGE(SimpleAssociativeContainer)
+ {
+ typedef typename C::key_type key_type;
+ typedef typename C::value_type value_type;
+ BOOST_MPL_ASSERT((boost::is_same<key_type,value_type>));
+ }
+ };
+
+ BOOST_concept(PairAssociativeContainer,(C))
+ : AssociativeContainer<C>
+ {
+ BOOST_CONCEPT_USAGE(PairAssociativeContainer)
+ {
+ typedef typename C::key_type key_type;
+ typedef typename C::value_type value_type;
+ typedef typename C::mapped_type mapped_type;
+ typedef std::pair<const key_type, mapped_type> required_value_type;
+ BOOST_MPL_ASSERT((boost::is_same<value_type,required_value_type>));
+ }
+ };
+
+ BOOST_concept(SortedAssociativeContainer,(C))
+ : AssociativeContainer<C>
+ , ReversibleContainer<C>
+ {
+ BOOST_CONCEPT_USAGE(SortedAssociativeContainer)
+ {
+ C
+ c(kc),
+ c2(first, last),
+ c3(first, last, kc);
+
+ p = c.upper_bound(k);
+ p = c.lower_bound(k);
+ r = c.equal_range(k);
+
+ c.insert(p, t);
+
+ ignore_unused_variable_warning(c);
+ ignore_unused_variable_warning(c2);
+ ignore_unused_variable_warning(c3);
+ const_constraints(c);
+ }
+
+ void const_constraints(const C& c)
+ {
+ kc = c.key_comp();
+ vc = c.value_comp();
+
+ cp = c.upper_bound(k);
+ cp = c.lower_bound(k);
+ cr = c.equal_range(k);
+ }
+
+ private:
+ typename C::key_compare kc;
+ typename C::value_compare vc;
+ typename C::value_type t;
+ typename C::key_type k;
+ typedef typename C::iterator iterator;
+ typedef typename C::const_iterator const_iterator;
+
+ typedef SortedAssociativeContainer self;
+ iterator p;
+ const_iterator cp;
+ std::pair<typename self::iterator,typename self::iterator> r;
+ std::pair<typename self::const_iterator,typename self::const_iterator> cr;
+ typename C::value_type* first, *last;
+ };
+
+ // HashedAssociativeContainer
+
+ BOOST_concept(Collection,(C))
+ {
+ BOOST_CONCEPT_USAGE(Collection)
+ {
+ boost::function_requires<boost::InputIteratorConcept<iterator> >();
+ boost::function_requires<boost::InputIteratorConcept<const_iterator> >();
+ boost::function_requires<boost::CopyConstructibleConcept<value_type> >();
+ const_constraints(c);
+ i = c.begin();
+ i = c.end();
+ c.swap(c);
+ }
+
+ void const_constraints(const C& cc) {
+ ci = cc.begin();
+ ci = cc.end();
+ n = cc.size();
+ b = cc.empty();
+ }
+
+ private:
+ typedef typename C::value_type value_type;
+ typedef typename C::iterator iterator;
+ typedef typename C::const_iterator const_iterator;
+ typedef typename C::reference reference;
+ typedef typename C::const_reference const_reference;
+ // typedef typename C::pointer pointer;
+ typedef typename C::difference_type difference_type;
+ typedef typename C::size_type size_type;
+
+ C c;
+ bool b;
+ iterator i;
+ const_iterator ci;
+ size_type n;
+ };
+} // namespace boost
+
+# include <boost/concept/detail/concept_undef.hpp>
+
+#endif // BOOST_CONCEPT_CHECKS_HPP
+
BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used,
contains one or more of the following letters after
- a hiphen:
+ a hyphen:
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.
+ p STLport build.
+ n STLport build without its IOStreams.
BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
// select toolset if not defined already:
//
#ifndef BOOST_LIB_TOOLSET
-// Note: no compilers before 1200 are supported
-#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
+# if defined(BOOST_MSVC) && (BOOST_MSVC < 1200)
+ // Note: no compilers before 1200 are supported
+# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
-# ifdef UNDER_CE
- // vc6:
-# define BOOST_LIB_TOOLSET "evc4"
-# else
- // vc6:
-# define BOOST_LIB_TOOLSET "vc6"
-# endif
+# ifdef UNDER_CE
+ // eVC4:
+# define BOOST_LIB_TOOLSET "evc4"
+# else
+ // vc6:
+# define BOOST_LIB_TOOLSET "vc6"
+# endif
-#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300)
+# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1310)
- // vc7:
-# define BOOST_LIB_TOOLSET "vc7"
+ // vc7:
+# define BOOST_LIB_TOOLSET "vc7"
-#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1310)
+# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1400)
- // vc71:
-# define BOOST_LIB_TOOLSET "vc71"
+ // vc71:
+# define BOOST_LIB_TOOLSET "vc71"
-#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1400)
+# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1500)
- // vc80:
-# define BOOST_LIB_TOOLSET "vc80"
+ // vc80:
+# define BOOST_LIB_TOOLSET "vc80"
-#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1500)
+# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1600)
- // vc90:
-# define BOOST_LIB_TOOLSET "vc90"
+ // vc90:
+# define BOOST_LIB_TOOLSET "vc90"
-#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1600)
+# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1700)
- // vc10:
-# define BOOST_LIB_TOOLSET "vc100"
+ // vc10:
+# define BOOST_LIB_TOOLSET "vc100"
-#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1700)
+# elif defined(BOOST_MSVC)
- // vc11:
-# define BOOST_LIB_TOOLSET "vc110"
+ // vc11:
+# define BOOST_LIB_TOOLSET "vc110"
-#elif defined(__BORLANDC__)
+# elif defined(__BORLANDC__)
- // CBuilder 6:
-# define BOOST_LIB_TOOLSET "bcb"
+ // CBuilder 6:
+# define BOOST_LIB_TOOLSET "bcb"
-#elif defined(__ICL)
+# elif defined(__ICL)
- // Intel C++, no version number:
-# define BOOST_LIB_TOOLSET "iw"
+ // Intel C++, no version number:
+# define BOOST_LIB_TOOLSET "iw"
-#elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF )
+# elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF )
- // Metrowerks CodeWarrior 8.x
-# define BOOST_LIB_TOOLSET "cw8"
+ // Metrowerks CodeWarrior 8.x
+# define BOOST_LIB_TOOLSET "cw8"
-#elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF )
+# elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF )
- // Metrowerks CodeWarrior 9.x
-# define BOOST_LIB_TOOLSET "cw9"
+ // Metrowerks CodeWarrior 9.x
+# define BOOST_LIB_TOOLSET "cw9"
-#endif
+# endif
#endif // BOOST_LIB_TOOLSET
//
# 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")
+# 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")
+# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
# error "Build options aren't compatible with pre-built libraries"
# else
# define BOOST_LIB_RT_OPT "-p"
# 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")
+# 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")
+# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
# error "Build options aren't compatible with pre-built libraries"
# else
# define BOOST_LIB_RT_OPT "-pn"
# 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")
+# 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")
+# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
# error "Build options aren't compatible with pre-built libraries"
# else
# define BOOST_LIB_RT_OPT "-sp"
# 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")
+# 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")
+# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
# error "Build options aren't compatible with pre-built libraries"
# else
# define BOOST_LIB_RT_OPT "-spn"
// sanity check:
//
#if defined(__STL_DEBUG) || defined(_STLP_DEBUG)
-#error "Pre-built versions of the Boost libraries are not provided in STLPort-debug form"
+#error "Pre-built versions of the Boost libraries are not provided in STLport-debug form"
#endif
# ifdef _RTLDLL
# define BOOST_NO_OPERATORS_IN_NAMESPACE
# endif
// Variadic macros do not exist for C++ Builder versions 5 and below
-#define BOOST_NO_VARIADIC_MACROS
+#define BOOST_NO_CXX11_VARIADIC_MACROS
# endif
// Version 5.51 and below:
// C++0x Macros:
//
#if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610)
-# define BOOST_NO_CHAR16_T
-# define BOOST_NO_CHAR32_T
-# define BOOST_NO_DECLTYPE
-# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-# define BOOST_NO_EXTERN_TEMPLATE
-# define BOOST_NO_RVALUE_REFERENCES
-# define BOOST_NO_SCOPED_ENUMS
-# define BOOST_NO_STATIC_ASSERT
+# define BOOST_NO_CXX11_CHAR16_T
+# define BOOST_NO_CXX11_CHAR32_T
+# define BOOST_NO_CXX11_DECLTYPE
+# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+# define BOOST_NO_CXX11_EXTERN_TEMPLATE
+# define BOOST_NO_CXX11_RVALUE_REFERENCES
+# define BOOST_NO_CXX11_SCOPED_ENUMS
+# define BOOST_NO_CXX11_STATIC_ASSERT
#else
# define BOOST_HAS_ALIGNOF
# define BOOST_HAS_CHAR16_T
# define BOOST_HAS_STATIC_ASSERT
#endif
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DECLTYPE_N3276
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
#define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS // UTF-8 still not supported
-#define BOOST_NO_VARIADIC_TEMPLATES
-#define BOOST_NO_NOEXCEPT
-#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS // UTF-8 still not supported
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#if __BORLANDC__ >= 0x590
# define BOOST_HAS_TR1_HASH
// Clang compiler setup.
-#if __has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
-#else
+#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
#endif
-#if !__has_feature(cxx_rtti)
+#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI)
# define BOOST_NO_RTTI
#endif
+#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID)
+# define BOOST_NO_TYPEID
+#endif
+
#if defined(__int64)
# define BOOST_HAS_MS_INT64
#endif
#define BOOST_HAS_NRVO
// Clang supports "long long" in all compilation modes.
+#define BOOST_HAS_LONG_LONG
+
+//
+// Dynamic shared object (DSO) and dynamic-link library (DLL) support
+//
+#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
+# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default")))
+# define BOOST_SYMBOL_IMPORT
+# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
+#endif
#if !__has_feature(cxx_auto_type)
-# define BOOST_NO_AUTO_DECLARATIONS
-# define BOOST_NO_AUTO_MULTIDECLARATIONS
+# define BOOST_NO_CXX11_AUTO_DECLARATIONS
+# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
#endif
#if !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
-# define BOOST_NO_CHAR16_T
-# define BOOST_NO_CHAR32_T
+# define BOOST_NO_CXX11_CHAR16_T
+# define BOOST_NO_CXX11_CHAR32_T
#endif
#if !__has_feature(cxx_constexpr)
-# define BOOST_NO_CONSTEXPR
+# define BOOST_NO_CXX11_CONSTEXPR
#endif
#if !__has_feature(cxx_decltype)
-# define BOOST_NO_DECLTYPE
+# define BOOST_NO_CXX11_DECLTYPE
#endif
-#define BOOST_NO_DECLTYPE_N3276
+#if !__has_feature(cxx_decltype_incomplete_return_types)
+# define BOOST_NO_CXX11_DECLTYPE_N3276
+#endif
#if !__has_feature(cxx_defaulted_functions)
-# define BOOST_NO_DEFAULTED_FUNCTIONS
+# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
#endif
#if !__has_feature(cxx_deleted_functions)
-# define BOOST_NO_DELETED_FUNCTIONS
+# define BOOST_NO_CXX11_DELETED_FUNCTIONS
#endif
#if !__has_feature(cxx_explicit_conversions)
-# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
#endif
#if !__has_feature(cxx_default_function_template_args)
-# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
+# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
#endif
#if !__has_feature(cxx_generalized_initializers)
-# define BOOST_NO_INITIALIZER_LISTS
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
#endif
#if !__has_feature(cxx_lambdas)
-# define BOOST_NO_LAMBDAS
+# define BOOST_NO_CXX11_LAMBDAS
+#endif
+
+#if !__has_feature(cxx_local_type_template_args)
+# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
#endif
#if !__has_feature(cxx_noexcept)
-# define BOOST_NO_NOEXCEPT
+# define BOOST_NO_CXX11_NOEXCEPT
#endif
#if !__has_feature(cxx_nullptr)
-# define BOOST_NO_NULLPTR
+# define BOOST_NO_CXX11_NULLPTR
+#endif
+
+#if !__has_feature(cxx_range_for)
+# define BOOST_NO_CXX11_RANGE_BASED_FOR
#endif
#if !__has_feature(cxx_raw_string_literals)
-# define BOOST_NO_RAW_LITERALS
+# define BOOST_NO_CXX11_RAW_LITERALS
#endif
#if !__has_feature(cxx_generalized_initializers)
-# define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#endif
#if !__has_feature(cxx_rvalue_references)
-# define BOOST_NO_RVALUE_REFERENCES
+# define BOOST_NO_CXX11_RVALUE_REFERENCES
#endif
#if !__has_feature(cxx_strong_enums)
-# define BOOST_NO_SCOPED_ENUMS
+# define BOOST_NO_CXX11_SCOPED_ENUMS
#endif
#if !__has_feature(cxx_static_assert)
-# define BOOST_NO_STATIC_ASSERT
+# define BOOST_NO_CXX11_STATIC_ASSERT
#endif
#if !__has_feature(cxx_alias_templates)
-# define BOOST_NO_TEMPLATE_ALIASES
+# define BOOST_NO_CXX11_TEMPLATE_ALIASES
#endif
#if !__has_feature(cxx_unicode_literals)
-# define BOOST_NO_UNICODE_LITERALS
+# define BOOST_NO_CXX11_UNICODE_LITERALS
#endif
#if !__has_feature(cxx_variadic_templates)
-# define BOOST_NO_VARIADIC_TEMPLATES
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#endif
// Clang always supports variadic macros
// C++0x macros:
//
#if (__CODEGEARC__ <= 0x620)
-#define BOOST_NO_STATIC_ASSERT
+#define BOOST_NO_CXX11_STATIC_ASSERT
#else
#define BOOST_HAS_STATIC_ASSERT
#endif
// #define BOOST_HAS_STATIC_ASSERT
#define BOOST_HAS_STD_TYPE_TRAITS
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_EXTERN_TEMPLATE
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NOEXCEPT
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
#define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
-#define BOOST_NO_VARIADIC_TEMPLATES
-#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
//
// TR1 macros:
#define BOOST_HAS_MACRO_USE_FACET
-#define BOOST_NO_INITIALIZER_LISTS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
// On non-Win32 platforms let the platform config figure this out:
#ifdef _WIN32
// See above for BOOST_NO_LONG_LONG
//
#if (__EDG_VERSION__ < 310)
-# define BOOST_NO_EXTERN_TEMPLATE
+# define BOOST_NO_CXX11_EXTERN_TEMPLATE
#endif
#if (__EDG_VERSION__ <= 310)
// No support for initializer lists
-# define BOOST_NO_INITIALIZER_LISTS
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
#endif
#if (__EDG_VERSION__ < 400)
-# define BOOST_NO_VARIADIC_MACROS
+# define BOOST_NO_CXX11_VARIADIC_MACROS
#endif
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DECLTYPE_N3276
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NOEXCEPT
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
#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
-#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#ifdef c_plusplus
// EDG has "long long" in non-strict mode
//
// Cray peculiarities, probably version 7 specific:
//
-#undef BOOST_NO_AUTO_DECLARATIONS
-#undef BOOST_NO_AUTO_MULTIDECLARATIONS
+#undef BOOST_NO_CXX11_AUTO_DECLARATIONS
+#undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
#define BOOST_HAS_NRVO
-#define BOOST_NO_VARIADIC_TEMPLATES
-#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
-#define BOOST_NO_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_UNICODE_LITERALS
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#define BOOST_HAS_NRVO
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_STATIC_ASSERT
#define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_SCOPED_ENUMS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_NOEXCEPT
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DECLTYPE_N3276
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_CONSTEXPR
+#define BOOST_NO_CXX11_SCOPED_ENUMS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_CONSTEXPR
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CHAR16_T
//#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
//#define BOOST_HAS_FPCLASSIFY
//
// C++0x features
//
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DECLTYPE_N3276
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_EXTERN_TEMPLATE
-#define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NOEXCEPT
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
#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
-#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#if (__DMC__ < 0x812)
-#define BOOST_NO_VARIADIC_MACROS
+#define BOOST_NO_CXX11_VARIADIC_MACROS
#endif
#if __DMC__ < 0x800
# 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
+# define BOOST_NO_CXX11_EXTERN_TEMPLATE
// Variadic macros do not exist for gcc versions before 3.0
-# define BOOST_NO_VARIADIC_MACROS
+# define BOOST_NO_CXX11_VARIADIC_MACROS
#elif __GNUC__ == 3
# if defined (__PATHSCALE__)
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
# if __GNUC_MINOR__ < 4
# define BOOST_NO_IS_ABSTRACT
# endif
-# define BOOST_NO_EXTERN_TEMPLATE
+# define BOOST_NO_CXX11_EXTERN_TEMPLATE
#endif
#if __GNUC__ < 4
//
# endif
#endif
-// C++0x features not implemented in any GCC version
//
-#define BOOST_NO_TEMPLATE_ALIASES
+// Recent GCC versions have __int128 when in 64-bit mode:
+//
+#if defined(__SIZEOF_INT128__)
+# define BOOST_HAS_INT128
+#endif
// C++0x features in 4.3.n and later
//
# define BOOST_HAS_STATIC_ASSERT
# define BOOST_HAS_VARIADIC_TMPL
#else
-# define BOOST_NO_DECLTYPE
-# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-# define BOOST_NO_RVALUE_REFERENCES
-# define BOOST_NO_STATIC_ASSERT
+# define BOOST_NO_CXX11_DECLTYPE
+# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+# define BOOST_NO_CXX11_RVALUE_REFERENCES
+# define BOOST_NO_CXX11_STATIC_ASSERT
// Variadic templates compiler:
// http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html
# if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__))
# define BOOST_HAS_VARIADIC_TMPL
# else
-# define BOOST_NO_VARIADIC_TEMPLATES
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
# endif
#endif
// C++0x features in 4.4.n and later
//
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_NO_AUTO_DECLARATIONS
-# define BOOST_NO_AUTO_MULTIDECLARATIONS
-# define BOOST_NO_CHAR16_T
-# define BOOST_NO_CHAR32_T
-# define BOOST_NO_INITIALIZER_LISTS
-# define BOOST_NO_DEFAULTED_FUNCTIONS
-# define BOOST_NO_DELETED_FUNCTIONS
+# define BOOST_NO_CXX11_AUTO_DECLARATIONS
+# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+# define BOOST_NO_CXX11_CHAR16_T
+# define BOOST_NO_CXX11_CHAR32_T
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+# define BOOST_NO_CXX11_DELETED_FUNCTIONS
#endif
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
# define BOOST_NO_SFINAE_EXPR
#endif
// C++0x features in 4.5.0 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
+# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+# define BOOST_NO_CXX11_LAMBDAS
+# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+# define BOOST_NO_CXX11_RAW_LITERALS
+# define BOOST_NO_CXX11_UNICODE_LITERALS
#endif
// C++0x features in 4.5.1 and later
//
#if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40501) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
-// scoped enums have a serious bug in 4.4.0, so define BOOST_NO_SCOPED_ENUMS before 4.5.1
+// scoped enums have a serious bug in 4.4.0, so define BOOST_NO_CXX11_SCOPED_ENUMS before 4.5.1
// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
-# define BOOST_NO_SCOPED_ENUMS
+# define BOOST_NO_CXX11_SCOPED_ENUMS
#endif
// C++0x features in 4.6.n and later
//
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_NOEXCEPT
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#endif
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#endif
// C++0x features not supported at all yet
//
-#define BOOST_NO_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DECLTYPE_N3276
#ifndef BOOST_COMPILER
# define BOOST_COMPILER "GNU C++ version " __VERSION__
// C++0x features:
//
-# define BOOST_NO_CONSTEXPR
-# define BOOST_NO_NULLPTR
-# define BOOST_NO_TEMPLATE_ALIASES
-# define BOOST_NO_DECLTYPE
-# define BOOST_NO_DECLTYPE_N3276
-# 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_VARIADIC_MACROS
-# 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_CXX11_CONSTEXPR
+# define BOOST_NO_CXX11_NULLPTR
+# define BOOST_NO_CXX11_TEMPLATE_ALIASES
+# define BOOST_NO_CXX11_DECLTYPE
+# define BOOST_NO_CXX11_DECLTYPE_N3276
+# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+# define BOOST_NO_CXX11_RVALUE_REFERENCES
+# define BOOST_NO_CXX11_STATIC_ASSERT
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+# define BOOST_NO_CXX11_VARIADIC_MACROS
+# define BOOST_NO_CXX11_AUTO_DECLARATIONS
+# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+# define BOOST_NO_CXX11_CHAR16_T
+# define BOOST_NO_CXX11_CHAR32_T
+# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+# define BOOST_NO_CXX11_DELETED_FUNCTIONS
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# define BOOST_NO_CXX11_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_NO_NOEXCEPT
-#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+# define BOOST_NO_CXX11_LAMBDAS
+# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+# define BOOST_NO_CXX11_RANGE_BASED_FOR
+# define BOOST_NO_CXX11_RAW_LITERALS
+# define BOOST_NO_CXX11_UNICODE_LITERALS
+# define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__
//
#if !defined(__EDG__)
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DECLTYPE_N3276
-#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_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NOEXCEPT
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
#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
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
/*
See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and
*/
#if (__HP_aCC < 62500) || !defined(HP_CXX0x_SOURCE)
- #define BOOST_NO_VARIADIC_MACROS
+ #define BOOST_NO_CXX11_VARIADIC_MACROS
#endif
#endif
// - ICC added static_assert in 11.0 (first version with C++0x support)
//
#if defined(BOOST_INTEL_STDCXX0X)
-# undef BOOST_NO_STATIC_ASSERT
+# undef BOOST_NO_CXX11_STATIC_ASSERT
//
// These pass our test cases, but aren't officially supported according to:
// http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/
//
-//# undef BOOST_NO_LAMBDAS
-//# undef BOOST_NO_DECLTYPE
-//# undef BOOST_NO_AUTO_DECLARATIONS
-//# undef BOOST_NO_AUTO_MULTIDECLARATIONS
+//# undef BOOST_NO_CXX11_LAMBDAS
+//# undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+//# undef BOOST_NO_CXX11_DECLTYPE
+//# undef BOOST_NO_CXX11_AUTO_DECLARATIONS
+//# undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
#endif
#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION >= 1200)
-//# undef BOOST_NO_RVALUE_REFERENCES // Enabling this breaks Filesystem and Exception libraries
-//# undef BOOST_NO_SCOPED_ENUMS // doesn't really work!!
-# undef BOOST_NO_DELETED_FUNCTIONS
-# undef BOOST_NO_DEFAULTED_FUNCTIONS
-# undef BOOST_NO_LAMBDAS
-# undef BOOST_NO_DECLTYPE
-# undef BOOST_NO_AUTO_DECLARATIONS
-# undef BOOST_NO_AUTO_MULTIDECLARATIONS
+//# undef BOOST_NO_CXX11_RVALUE_REFERENCES // Enabling this breaks Filesystem and Exception libraries
+//# undef BOOST_NO_CXX11_SCOPED_ENUMS // doesn't really work!!
+# undef BOOST_NO_CXX11_DELETED_FUNCTIONS
+# undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+# undef BOOST_NO_CXX11_LAMBDAS
+# undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+# undef BOOST_NO_CXX11_DECLTYPE
+# undef BOOST_NO_CXX11_AUTO_DECLARATIONS
+# undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
#endif
// icl Version 12.1.0.233 Build 20110811 and possibly some other builds
// had an incorrect __INTEL_COMPILER value of 9999. Intel say this has been fixed.
#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION > 1200)
-# undef BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-# undef BOOST_NO_NULLPTR
-# undef BOOST_NO_RVALUE_REFERENCES
+# undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+# undef BOOST_NO_CXX11_NULLPTR
+# undef BOOST_NO_CXX11_RVALUE_REFERENCES
# undef BOOST_NO_SFINAE_EXPR
-# undef BOOST_NO_TEMPLATE_ALIASES
-# undef BOOST_NO_VARIADIC_TEMPLATES
+# undef BOOST_NO_CXX11_TEMPLATE_ALIASES
+# undef BOOST_NO_CXX11_VARIADIC_TEMPLATES
// http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/
// continues to list scoped enum support as "Partial"
-//# undef BOOST_NO_SCOPED_ENUMS
+//# undef BOOST_NO_CXX11_SCOPED_ENUMS
#endif
#if defined(_MSC_VER) && (_MSC_VER <= 1700)
//
// Although the Intel compiler is capable of supporting these, it appears not to in MSVC compatibility mode:
//
-# define BOOST_NO_INITIALIZER_LISTS
-# define BOOST_NO_VARIADIC_TEMPLATES
-# define BOOST_NO_DELETED_FUNCTIONS
-# define BOOST_NO_DEFAULTED_FUNCTIONS
-# define BOOST_NO_TEMPLATE_ALIASES
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+# define BOOST_NO_CXX11_DELETED_FUNCTIONS
+# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+# define BOOST_NO_CXX11_TEMPLATE_ALIASES
#endif
#if (BOOST_INTEL_CXX_VERSION < 1200)
#if __MWERKS__ > 0x3206 && __option(rvalue_refs)
# define BOOST_HAS_RVALUE_REFS
#else
-# define BOOST_NO_RVALUE_REFERENCES
+# define BOOST_NO_CXX11_RVALUE_REFERENCES
#endif
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DECLTYPE_N3276
-#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_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NOEXCEPT
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_SCOPED_ENUMS
#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
-#define BOOST_NO_VARIADIC_MACROS
-#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_VARIADIC_MACROS
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
//
// 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_CONSTEXPR
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DECLTYPE_N3276
-#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_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NOEXCEPT
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
#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
-#define BOOST_NO_VARIADIC_MACROS
-#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_VARIADIC_MACROS
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
//
// versions check:
# define BOOST_HAS_EXPM1
# define BOOST_HAS_DIRENT_H
# define BOOST_HAS_CLOCK_GETTIME
-# define BOOST_NO_VARIADIC_TEMPLATES
-# define BOOST_NO_UNICODE_LITERALS
-# define BOOST_NO_TEMPLATE_ALIASES
-# define BOOST_NO_STD_UNORDERED
-# define BOOST_NO_STATIC_ASSERT
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+# define BOOST_NO_CXX11_UNICODE_LITERALS
+# define BOOST_NO_CXX11_TEMPLATE_ALIASES
+# define BOOST_NO_CXX11_STATIC_ASSERT
# define BOOST_NO_SFINAE_EXPR
-# define BOOST_NO_SCOPED_ENUMS
-# define BOOST_NO_RVALUE_REFERENCES
-# define BOOST_NO_RAW_LITERALS
-# define BOOST_NO_NULLPTR
-# define BOOST_NO_NUMERIC_LIMITS_LOWEST
-# define BOOST_NO_NOEXCEPT
-# define BOOST_NO_LAMBDAS
-# define BOOST_NO_INITIALIZER_LISTS
+# define BOOST_NO_CXX11_SCOPED_ENUMS
+# define BOOST_NO_CXX11_RVALUE_REFERENCES
+# define BOOST_NO_CXX11_RANGE_BASED_FOR
+# define BOOST_NO_CXX11_RAW_LITERALS
+# define BOOST_NO_CXX11_NULLPTR
+# define BOOST_NO_CXX11_NUMERIC_LIMITS
+# define BOOST_NO_CXX11_NOEXCEPT
+# define BOOST_NO_CXX11_LAMBDAS
+# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
-# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-# define BOOST_NO_DELETED_FUNCTIONS
-# define BOOST_NO_DEFAULTED_FUNCTIONS
-# define BOOST_NO_DECLTYPE
-# define BOOST_NO_DECLTYPE_N3276
-# define BOOST_NO_CONSTEXPR
+# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+# define BOOST_NO_CXX11_DELETED_FUNCTIONS
+# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+# define BOOST_NO_CXX11_DECLTYPE
+# define BOOST_NO_CXX11_DECLTYPE_N3276
+# define BOOST_NO_CXX11_CONSTEXPR
# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
-# define BOOST_NO_CHAR32_T
-# define BOOST_NO_CHAR16_T
-# define BOOST_NO_AUTO_MULTIDECLARATIONS
-# define BOOST_NO_AUTO_DECLARATIONS
-# define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
-# define BOOST_NO_0X_HDR_UNORDERED_SET
-# define BOOST_NO_0X_HDR_UNORDERED_MAP
-# define BOOST_NO_0X_HDR_TYPEINDEX
-# define BOOST_NO_0X_HDR_TUPLE
-# define BOOST_NO_0X_HDR_THREAD
-# define BOOST_NO_0X_HDR_SYSTEM_ERROR
-# define BOOST_NO_0X_HDR_REGEX
-# define BOOST_NO_0X_HDR_RATIO
-# define BOOST_NO_0X_HDR_RANDOM
-# define BOOST_NO_0X_HDR_MUTEX
-# define BOOST_NO_0X_HDR_INITIALIZER_LIST
-# define BOOST_NO_0X_HDR_FUTURE
-# define BOOST_NO_0X_HDR_FORWARD_LIST
-# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-# define BOOST_NO_0X_HDR_CODECVT
-# define BOOST_NO_0X_HDR_CHRONO
+# define BOOST_NO_CXX11_CHAR32_T
+# define BOOST_NO_CXX11_CHAR16_T
+# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+# define BOOST_NO_CXX11_AUTO_DECLARATIONS
+# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+# define BOOST_NO_CXX11_HDR_UNORDERED_SET
+# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+# define BOOST_NO_CXX11_HDR_TYPEINDEX
+# define BOOST_NO_CXX11_HDR_TUPLE
+# define BOOST_NO_CXX11_HDR_THREAD
+# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+# define BOOST_NO_CXX11_HDR_REGEX
+# define BOOST_NO_CXX11_HDR_RATIO
+# define BOOST_NO_CXX11_HDR_RANDOM
+# define BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_FORWARD_LIST
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_CODECVT
+# define BOOST_NO_CXX11_HDR_CHRONO
#endif
// (C) Copyright Noel Belcourt 2007.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
+// 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 for most recent version.
// if no threading API is detected.
//
-#if __PGIC__ >= 10
+#if __PGIC__ >= 11
// options requested by configure --enable-test
#define BOOST_HAS_PTHREADS
+#define BOOST_HAS_THREADS
+#define BOOST_HAS_PTHREAD_YIELD
+#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
+
+#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+
+#elif __PGIC__ >= 10
+
+// options requested by configure --enable-test
+#define BOOST_HAS_THREADS
#define BOOST_HAS_NRVO
#define BOOST_HAS_LONG_LONG
#elif __PGIC__ >= 7
-#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
+#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
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
#else
//
// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
//
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DECLTYPE_N3276
-#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_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NOEXCEPT
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_NUMERIC_LIMITS
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
#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
-#define BOOST_NO_VARIADIC_MACROS
-#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_SWPRINTF
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_VARIADIC_MACROS
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+
+#define BOOST_NO_CXX11_HDR_UNORDERED_SET
+#define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+#define BOOST_NO_CXX11_HDR_TYPEINDEX
+#define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+#define BOOST_NO_CXX11_HDR_TUPLE
+#define BOOST_NO_CXX11_HDR_THREAD
+#define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+#define BOOST_NO_CXX11_HDR_REGEX
+#define BOOST_NO_CXX11_HDR_RATIO
+#define BOOST_NO_CXX11_HDR_RANDOM
+#define BOOST_NO_CXX11_HDR_MUTEX
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_HDR_FUTURE
+#define BOOST_NO_CXX11_HDR_FORWARD_LIST
+#define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+#define BOOST_NO_CXX11_HDR_CODECVT
+#define BOOST_NO_CXX11_HDR_CHRONO
+#define BOOST_NO_CXX11_HDR_ARRAY
//
// version check:
//
# define BOOST_HAS_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_CONSTEXPR
-#define BOOST_NO_DECLTYPE
-#define BOOST_NO_DECLTYPE_N3276
-#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_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NOEXCEPT
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
#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
-#define BOOST_NO_VARIADIC_MACROS
-#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_VARIADIC_MACROS
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
//
// Version
// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
//
#if ! __IBMCPP_AUTO_TYPEDEDUCTION
-# define BOOST_NO_AUTO_DECLARATIONS
-# define BOOST_NO_AUTO_MULTIDECLARATIONS
+# define BOOST_NO_CXX11_AUTO_DECLARATIONS
+# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
#endif
#if ! __IBMCPP_UTF_LITERAL__
-# define BOOST_NO_CHAR16_T
-# define BOOST_NO_CHAR32_T
+# define BOOST_NO_CXX11_CHAR16_T
+# define BOOST_NO_CXX11_CHAR32_T
+#endif
+#if ! __IBMCPP_CONSTEXPR
+# define BOOST_NO_CXX11_CONSTEXPR
#endif
-#define BOOST_NO_CONSTEXPR
#if ! __IBMCPP_DECLTYPE
-# define BOOST_NO_DECLTYPE
+# define BOOST_NO_CXX11_DECLTYPE
#else
# define BOOST_HAS_DECLTYPE
#endif
-#define BOOST_NO_DECLTYPE_N3276
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#if ! __IBMCPP_EXPLICIT_CONVERSION_OPERATORS
+# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#endif
#if ! __IBMCPP_EXTERN_TEMPLATE
-# define BOOST_NO_EXTERN_TEMPLATE
+# define BOOST_NO_CXX11_EXTERN_TEMPLATE
#endif
#if ! __IBMCPP_VARIADIC_TEMPLATES
// not enabled separately at this time
-# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#endif
-#define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_NOEXCEPT
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_SCOPED_ENUMS
+# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#endif
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#if ! __IBMCPP_RVALUE_REFERENCES
+# define BOOST_NO_CXX11_RVALUE_REFERENCES
+#endif
+#if ! __IBMCPP_SCOPED_ENUM
+# define BOOST_NO_CXX11_SCOPED_ENUMS
+#endif
#define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#if ! __IBMCPP_STATIC_ASSERT
-# define BOOST_NO_STATIC_ASSERT
+# define BOOST_NO_CXX11_STATIC_ASSERT
#endif
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
#if ! __IBMCPP_VARIADIC_TEMPLATES
-# define BOOST_NO_VARIADIC_TEMPLATES
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#endif
#if ! __C99_MACRO_WITH_VA_ARGS
-# define BOOST_NO_VARIADIC_MACROS
+# define BOOST_NO_CXX11_VARIADIC_MACROS
#endif
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for most recent version.
-
+//
// Microsoft Visual C++ compiler setup:
+//
+// We need to be careful with the checks in this file, as contrary
+// to popular belief there are versions with _MSC_VER with the final
+// digit non-zero (mainly the MIPS cross compiler).
+//
+// So we either test _MSC_VER >= XXXX or else _MSC_VER < XXXX.
+// No other comparisons (==, >, or <=) are safe.
+//
#define BOOST_MSVC _MSC_VER
+//
+// Helper macro BOOST_MSVC_FULL_VER for use in Boost code:
+//
#if _MSC_FULL_VER > 100000000
# define BOOST_MSVC_FULL_VER _MSC_FULL_VER
#else
# define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10)
#endif
-// turn off the warnings before we #include anything
+// Attempt to suppress VC6 warnings about the length of decorated names (obsolete):
#pragma warning( disable : 4503 ) // warning: decorated name length exceeded
+//
+// versions check:
+// we don't support Visual C++ prior to version 6:
+#if _MSC_VER < 1200
+# error "Compiler not supported or configured - please reconfigure"
+#endif
+
#if _MSC_VER < 1300 // 1200 == VC++ 6.0, 1200-1202 == eVC++4
# pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
# define BOOST_NO_VOID_RETURNS
# define BOOST_NO_EXCEPTION_STD_NAMESPACE
-# if BOOST_MSVC == 1202
+# if _MSC_VER == 1202
# define BOOST_NO_STD_TYPEINFO
# endif
- // disable min/max macro defines on vc6:
- //
#endif
/// Visual Studio has no fenv.h
#define BOOST_NO_FENV_H
-#if (_MSC_VER <= 1300) // 1300 == VC++ 7.0
+#if (_MSC_VER < 1310) // 130X == VC++ 7.0
# if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
# define BOOST_NO_IS_ABSTRACT
# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
// TODO: what version is meant here? Have there really been any fixes in cl 12.01 (as e.g. shipped with eVC4)?
-# if (_MSC_VER > 1200)
+# if (_MSC_VER >= 1300)
# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
# endif
// it appears not to actually work:
# define BOOST_NO_SWPRINTF
// Our extern template tests also fail for this compiler:
-# define BOOST_NO_EXTERN_TEMPLATE
+# define BOOST_NO_CXX11_EXTERN_TEMPLATE
// Variadic macros do not exist for VC7.1 and lower
-# define BOOST_NO_VARIADIC_MACROS
+# define BOOST_NO_CXX11_VARIADIC_MACROS
#endif
#if defined(UNDER_CE)
# define BOOST_NO_SWPRINTF
#endif
-#if _MSC_VER <= 1400 // 1400 == VC++ 8.0
+#if _MSC_VER < 1500 // 140X == VC++ 8.0
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
#endif
-#if _MSC_VER == 1500 // 1500 == VC++ 9.0
+#if _MSC_VER < 1600 // 150X == VC++ 9.0
// A bug in VC9:
# 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
// 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
+# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
-#if _MSC_VER <= 1500 || !defined(BOOST_STRICT_CONFIG) // 1500 == VC++ 9.0
-# define BOOST_NO_INITIALIZER_LISTS
+#if _MSC_VER < 1600 || !defined(BOOST_STRICT_CONFIG) // 150X == VC++ 9.0
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
#endif
#ifndef _NATIVE_WCHAR_T_DEFINED
# define BOOST_NO_RTTI
#endif
+//
+// TR1 features:
+//
+#if _MSC_VER >= 1700
+// # define BOOST_HAS_TR1_HASH // don't know if this is true yet.
+// # define BOOST_HAS_TR1_TYPE_TRAITS // don't know if this is true yet.
+# define BOOST_HAS_TR1_UNORDERED_MAP
+# define BOOST_HAS_TR1_UNORDERED_SET
+#endif
+
//
// C++0x features
//
// C++ features supported by VC++ 10 (aka 2010)
//
#if _MSC_VER < 1600
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_LAMBDAS
-#define BOOST_NO_RVALUE_REFERENCES
-#define BOOST_NO_STATIC_ASSERT
-#define BOOST_NO_NULLPTR
-#define BOOST_NO_DECLTYPE
+# define BOOST_NO_CXX11_AUTO_DECLARATIONS
+# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+# define BOOST_NO_CXX11_LAMBDAS
+# define BOOST_NO_CXX11_RVALUE_REFERENCES
+# define BOOST_NO_CXX11_STATIC_ASSERT
+# define BOOST_NO_CXX11_NULLPTR
+# define BOOST_NO_CXX11_DECLTYPE
#endif // _MSC_VER < 1600
#if _MSC_VER >= 1600
-#define BOOST_HAS_STDINT_H
+# define BOOST_HAS_STDINT_H
#endif
+// C++ features supported by VC++ 11 (aka 2012)
+//
+#if _MSC_VER < 1700
+# define BOOST_NO_CXX11_RANGE_BASED_FOR
+# define BOOST_NO_CXX11_SCOPED_ENUMS
+#endif // _MSC_VER < 1700
+
// C++0x features not supported by any versions
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_CONSTEXPR
-#define BOOST_NO_DECLTYPE_N3276
-#define BOOST_NO_DEFAULTED_FUNCTIONS
-#define BOOST_NO_DELETED_FUNCTIONS
-#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_INITIALIZER_LISTS
-#define BOOST_NO_NOEXCEPT
-#define BOOST_NO_RAW_LITERALS
-#define BOOST_NO_SCOPED_ENUMS
-#define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
-#define BOOST_NO_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#define BOOST_NO_SFINAE_EXPR
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
-#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
//
// prefix and suffix headers:
//
# define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp"
#endif
+#ifndef BOOST_COMPILER
// TODO:
// these things are mostly bogus. 1200 means version 12.0 of the compiler. The
// artificial versions assigned to them only refer to the versions of some IDE
// Note: these are so far off, they are not really supported
# elif _MSC_VER < 1300 // eVC++ 4 comes with 1200-1202
# define BOOST_COMPILER_VERSION evc4.0
-# elif _MSC_VER == 1400
+# elif _MSC_VER < 1400
+ // Note: I'm not aware of any CE compiler with version 13xx
+# if defined(BOOST_ASSERT_CONFIG)
+# error "Unknown EVC++ compiler version - please run the configure tests and report the results"
+# else
+# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results")
+# endif
+# elif _MSC_VER < 1500
# define BOOST_COMPILER_VERSION evc8
-# elif _MSC_VER == 1500
+# elif _MSC_VER < 1600
# define BOOST_COMPILER_VERSION evc9
-# elif _MSC_VER == 1600
+# elif _MSC_VER < 1700
# define BOOST_COMPILER_VERSION evc10
-# elif _MSC_VER == 1700
+# elif _MSC_VER < 1800
# define BOOST_COMPILER_VERSION evc11
# else
# if defined(BOOST_ASSERT_CONFIG)
# define BOOST_COMPILER_VERSION 5.0
# elif _MSC_VER < 1300
# define BOOST_COMPILER_VERSION 6.0
-# elif _MSC_VER == 1300
+# elif _MSC_VER < 1310
# define BOOST_COMPILER_VERSION 7.0
-# elif _MSC_VER == 1310
+# elif _MSC_VER < 1400
# define BOOST_COMPILER_VERSION 7.1
-# elif _MSC_VER == 1400
+# elif _MSC_VER < 1500
# define BOOST_COMPILER_VERSION 8.0
-# elif _MSC_VER == 1500
+# elif _MSC_VER < 1600
# define BOOST_COMPILER_VERSION 9.0
-# elif _MSC_VER == 1600
+# elif _MSC_VER < 1700
# define BOOST_COMPILER_VERSION 10.0
-# elif _MSC_VER == 1700
+# elif _MSC_VER < 1800
# define BOOST_COMPILER_VERSION 11.0
# else
# define BOOST_COMPILER_VERSION _MSC_VER
# endif
# endif
-#define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
-
-//
-// versions check:
-// we don't support Visual C++ prior to version 6:
-#if _MSC_VER < 1200
-#error "Compiler not supported or configured - please reconfigure"
+# define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
#endif
+
//
// last known and checked version is 1700 (VC11, aka 2011):
#if (_MSC_VER > 1700)
// C++0x headers implemented in 520 (as shipped by Microsoft)
//
#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520
-# define BOOST_NO_0X_HDR_ARRAY
-# define BOOST_NO_0X_HDR_CODECVT
-# define BOOST_NO_0X_HDR_FORWARD_LIST
-# define BOOST_NO_0X_HDR_INITIALIZER_LIST
-# define BOOST_NO_0X_HDR_RANDOM
-# define BOOST_NO_0X_HDR_REGEX
-# define BOOST_NO_0X_HDR_SYSTEM_ERROR
-# 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
-# define BOOST_NO_NUMERIC_LIMITS_LOWEST
+# define BOOST_NO_CXX11_HDR_ARRAY
+# define BOOST_NO_CXX11_HDR_CODECVT
+# define BOOST_NO_CXX11_HDR_FORWARD_LIST
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# define BOOST_NO_CXX11_HDR_RANDOM
+# define BOOST_NO_CXX11_HDR_REGEX
+# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+# define BOOST_NO_CXX11_HDR_UNORDERED_SET
+# define BOOST_NO_CXX11_HDR_TUPLE
+# define BOOST_NO_CXX11_HDR_TYPEINDEX
+# define BOOST_NO_CXX11_HDR_FUNCTIONAL
+# define BOOST_NO_CXX11_NUMERIC_LIMITS
+# define BOOST_NO_CXX11_SMART_PTR
#endif
-#if (!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(BOOST_NO_0X_HDR_TUPLE)
-# define BOOST_NO_0X_HDR_TUPLE
+#if (!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(BOOST_NO_CXX11_HDR_TUPLE)
+# define BOOST_NO_CXX11_HDR_TUPLE
#endif
+
+// C++0x headers implemented in 540 (as shipped by Microsoft)
+//
+#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 540
+# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_HDR_CHRONO
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_RATIO
+# define BOOST_NO_CXX11_HDR_THREAD
+# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+#endif
+
//
// C++0x headers not yet (fully) implemented:
//
-# define BOOST_NO_0X_HDR_TYPE_TRAITS
-# define BOOST_NO_0X_HDR_CHRONO
-# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-# define BOOST_NO_0X_HDR_FUTURE
-# define BOOST_NO_0X_HDR_MUTEX
-# define BOOST_NO_0X_HDR_RATIO
-# define BOOST_NO_0X_HDR_THREAD
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
#ifdef _CPPLIB_VER
# define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER
// C++0x headers not yet implemented
//
-# define BOOST_NO_0X_HDR_ARRAY
-# define BOOST_NO_0X_HDR_CHRONO
-# define BOOST_NO_0X_HDR_CODECVT
-# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-# define BOOST_NO_0X_HDR_FORWARD_LIST
-# define BOOST_NO_0X_HDR_FUTURE
-# define BOOST_NO_0X_HDR_INITIALIZER_LIST
-# define BOOST_NO_0X_HDR_MUTEX
-# define BOOST_NO_0X_HDR_RANDOM
-# define BOOST_NO_0X_HDR_RATIO
-# define BOOST_NO_0X_HDR_REGEX
-# define BOOST_NO_0X_HDR_SYSTEM_ERROR
-# 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
-# define BOOST_NO_NUMERIC_LIMITS_LOWEST
+# define BOOST_NO_CXX11_HDR_ARRAY
+# define BOOST_NO_CXX11_HDR_CHRONO
+# define BOOST_NO_CXX11_HDR_CODECVT
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_FORWARD_LIST
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# define BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_RANDOM
+# define BOOST_NO_CXX11_HDR_RATIO
+# define BOOST_NO_CXX11_HDR_REGEX
+# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+# define BOOST_NO_CXX11_HDR_THREAD
+# define BOOST_NO_CXX11_HDR_TUPLE
+# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_HDR_TYPEINDEX
+# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+# define BOOST_NO_CXX11_HDR_UNORDERED_SET
+# define BOOST_NO_CXX11_NUMERIC_LIMITS
+# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+# define BOOST_NO_CXX11_SMART_PTR
+# define BOOST_NO_CXX11_HDR_FUNCTIONAL
//
// Intrinsic type_traits support.
#define BOOST_HAS_THREADS
#ifdef _LIBCPP_HAS_NO_VARIADICS
-# define BOOST_NO_0X_HDR_TUPLE
+# define BOOST_NO_CXX11_HDR_TUPLE
#endif
//
// These appear to be unusable/incomplete so far:
//
-# define BOOST_NO_0X_HDR_CHRONO
-# define BOOST_NO_0X_HDR_FUTURE
-# define BOOST_NO_0X_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_HDR_CHRONO
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
// libc++ uses a non-standard messages_base
#define BOOST_NO_STD_MESSAGES
// C++0x headers in GCC 4.3.0 and later
//
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_NO_0X_HDR_ARRAY
-# define BOOST_NO_0X_HDR_REGEX
-# define BOOST_NO_0X_HDR_TUPLE
-# 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_CXX11_HDR_ARRAY
+# define BOOST_NO_CXX11_HDR_REGEX
+# define BOOST_NO_CXX11_HDR_TUPLE
+# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+# define BOOST_NO_CXX11_HDR_UNORDERED_SET
+# define BOOST_NO_CXX11_HDR_FUNCTIONAL
#endif
// C++0x headers in GCC 4.4.0 and later
//
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_NO_0X_HDR_CHRONO
-# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-# define BOOST_NO_0X_HDR_FORWARD_LIST
-# define BOOST_NO_0X_HDR_INITIALIZER_LIST
-# define BOOST_NO_0X_HDR_MUTEX
-# define BOOST_NO_0X_HDR_RATIO
-# define BOOST_NO_0X_HDR_SYSTEM_ERROR
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_FORWARD_LIST
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# define BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_RATIO
+# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+# define BOOST_NO_CXX11_SMART_PTR
#else
# define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
# define BOOST_HAS_TR1_COMPLEX_OVERLOADS
#endif
-#if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) && (!defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE) || !defined(BOOST_NO_0X_HDR_MUTEX))
-# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-# define BOOST_NO_0X_HDR_MUTEX
+#if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) && (!defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) || !defined(BOOST_NO_CXX11_HDR_MUTEX))
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_MUTEX
#endif
// C++0x features in GCC 4.5.0 and later
//
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_NO_NUMERIC_LIMITS_LOWEST
-# define BOOST_NO_0X_HDR_FUTURE
-# define BOOST_NO_0X_HDR_RANDOM
+# define BOOST_NO_CXX11_NUMERIC_LIMITS
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_RANDOM
#endif
-// C++0x features in GCC 4.5.0 and later
+// C++0x features in GCC 4.6.0 and later
//
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_NO_0X_HDR_TYPEINDEX
+# define BOOST_NO_CXX11_HDR_TYPEINDEX
+#endif
+
+// C++0x features in GCC 4.7.0 and later
+//
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+// Note that although <chrono> existed prior to 4.7, "stead_clock" is spelled "monotonic_clock"
+// so 4.7.0 is the first truely conforming one.
+# define BOOST_NO_CXX11_HDR_CHRONO
+# define BOOST_NO_CXX11_ALLOCATOR
#endif
// C++0x headers not yet (fully!) implemented
//
-# define BOOST_NO_0X_HDR_THREAD
-# define BOOST_NO_0X_HDR_TYPE_TRAITS
-# define BOOST_NO_0X_HDR_CODECVT
+# define BOOST_NO_CXX11_HDR_THREAD
+# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_HDR_CODECVT
+# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
// --- end ---
// C++0x headers not yet implemented
//
-# define BOOST_NO_0X_HDR_ARRAY
-# define BOOST_NO_0X_HDR_CHRONO
-# define BOOST_NO_0X_HDR_CODECVT
-# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-# define BOOST_NO_0X_HDR_FORWARD_LIST
-# define BOOST_NO_0X_HDR_FUTURE
-# define BOOST_NO_0X_HDR_INITIALIZER_LIST
-# define BOOST_NO_0X_HDR_MUTEX
-# define BOOST_NO_0X_HDR_RANDOM
-# define BOOST_NO_0X_HDR_RATIO
-# define BOOST_NO_0X_HDR_REGEX
-# define BOOST_NO_0X_HDR_SYSTEM_ERROR
-# 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
-# define BOOST_NO_NUMERIC_LIMITS_LOWEST
+# define BOOST_NO_CXX11_HDR_ARRAY
+# define BOOST_NO_CXX11_HDR_CHRONO
+# define BOOST_NO_CXX11_HDR_CODECVT
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_FORWARD_LIST
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# define BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_RANDOM
+# define BOOST_NO_CXX11_HDR_RATIO
+# define BOOST_NO_CXX11_HDR_REGEX
+# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+# define BOOST_NO_CXX11_HDR_THREAD
+# define BOOST_NO_CXX11_HDR_TUPLE
+# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_HDR_TYPEINDEX
+# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+# define BOOST_NO_CXX11_HDR_UNORDERED_SET
+# define BOOST_NO_CXX11_NUMERIC_LIMITS
+# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+# define BOOST_NO_CXX11_SMART_PTR
+# define BOOST_NO_CXX11_HDR_FUNCTIONAL
#define BOOST_STDLIB "Modena C++ standard library"
// C++0x headers not yet implemented
//
-# define BOOST_NO_0X_HDR_ARRAY
-# define BOOST_NO_0X_HDR_CHRONO
-# define BOOST_NO_0X_HDR_CODECVT
-# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-# define BOOST_NO_0X_HDR_FORWARD_LIST
-# define BOOST_NO_0X_HDR_FUTURE
-# define BOOST_NO_0X_HDR_INITIALIZER_LIST
-# define BOOST_NO_0X_HDR_MUTEX
-# define BOOST_NO_0X_HDR_RANDOM
-# define BOOST_NO_0X_HDR_RATIO
-# define BOOST_NO_0X_HDR_REGEX
-# define BOOST_NO_0X_HDR_SYSTEM_ERROR
-# 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
-# define BOOST_NO_NUMERIC_LIMITS_LOWEST
+# define BOOST_NO_CXX11_HDR_ARRAY
+# define BOOST_NO_CXX11_HDR_CHRONO
+# define BOOST_NO_CXX11_HDR_CODECVT
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_FORWARD_LIST
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# define BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_RANDOM
+# define BOOST_NO_CXX11_HDR_RATIO
+# define BOOST_NO_CXX11_HDR_REGEX
+# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+# define BOOST_NO_CXX11_HDR_THREAD
+# define BOOST_NO_CXX11_HDR_TUPLE
+# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_HDR_TYPEINDEX
+# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+# define BOOST_NO_CXX11_HDR_UNORDERED_SET
+# define BOOST_NO_CXX11_NUMERIC_LIMITS
+# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+# define BOOST_NO_CXX11_SMART_PTR
+# define BOOST_NO_CXX11_HDR_FUNCTIONAL
#define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__)
#endif
#if _RWSTD_VER < 0x05000000
-# define BOOST_NO_0X_HDR_ARRAY
+# define BOOST_NO_CXX11_HDR_ARRAY
#endif
// type_traits header is incomplete:
-# define BOOST_NO_0X_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
//
// C++0x headers not yet implemented
//
-# define BOOST_NO_0X_HDR_CHRONO
-# define BOOST_NO_0X_HDR_CODECVT
-# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-# define BOOST_NO_0X_HDR_FORWARD_LIST
-# define BOOST_NO_0X_HDR_FUTURE
-# define BOOST_NO_0X_HDR_INITIALIZER_LIST
-# define BOOST_NO_0X_HDR_MUTEX
-# define BOOST_NO_0X_HDR_RANDOM
-# define BOOST_NO_0X_HDR_RATIO
-# define BOOST_NO_0X_HDR_REGEX
-# define BOOST_NO_0X_HDR_SYSTEM_ERROR
-# define BOOST_NO_0X_HDR_THREAD
-# define BOOST_NO_0X_HDR_TUPLE
-# 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
-# define BOOST_NO_NUMERIC_LIMITS_LOWEST
+# define BOOST_NO_CXX11_HDR_CHRONO
+# define BOOST_NO_CXX11_HDR_CODECVT
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_FORWARD_LIST
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# define BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_RANDOM
+# define BOOST_NO_CXX11_HDR_RATIO
+# define BOOST_NO_CXX11_HDR_REGEX
+# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+# define BOOST_NO_CXX11_HDR_THREAD
+# define BOOST_NO_CXX11_HDR_TUPLE
+# define BOOST_NO_CXX11_HDR_TYPEINDEX
+# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+# define BOOST_NO_CXX11_HDR_UNORDERED_SET
+# define BOOST_NO_CXX11_NUMERIC_LIMITS
+# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+# define BOOST_NO_CXX11_SMART_PTR
+# define BOOST_NO_CXX11_HDR_FUNCTIONAL
// C++0x headers not yet implemented
//
-# define BOOST_NO_0X_HDR_ARRAY
-# define BOOST_NO_0X_HDR_CHRONO
-# define BOOST_NO_0X_HDR_CODECVT
-# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-# define BOOST_NO_0X_HDR_FORWARD_LIST
-# define BOOST_NO_0X_HDR_FUTURE
-# define BOOST_NO_0X_HDR_INITIALIZER_LIST
-# define BOOST_NO_0X_HDR_MUTEX
-# define BOOST_NO_0X_HDR_RANDOM
-# define BOOST_NO_0X_HDR_RATIO
-# define BOOST_NO_0X_HDR_REGEX
-# define BOOST_NO_0X_HDR_SYSTEM_ERROR
-# 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
-# define BOOST_NO_NUMERIC_LIMITS_LOWEST
+# define BOOST_NO_CXX11_HDR_ARRAY
+# define BOOST_NO_CXX11_HDR_CHRONO
+# define BOOST_NO_CXX11_HDR_CODECVT
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_FORWARD_LIST
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# define BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_RANDOM
+# define BOOST_NO_CXX11_HDR_RATIO
+# define BOOST_NO_CXX11_HDR_REGEX
+# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+# define BOOST_NO_CXX11_HDR_THREAD
+# define BOOST_NO_CXX11_HDR_TUPLE
+# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_HDR_TYPEINDEX
+# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+# define BOOST_NO_CXX11_HDR_UNORDERED_SET
+# define BOOST_NO_CXX11_NUMERIC_LIMITS
+# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+# define BOOST_NO_CXX11_SMART_PTR
+# define BOOST_NO_CXX11_HDR_FUNCTIONAL
#define BOOST_STDLIB "SGI standard library"
# endif
#endif
-#if defined(_STLPORT_VERSION) && ((_STLPORT_VERSION < 0x500) || (_STLPORT_VERSION >= 0x520))
-# define BOOST_NO_STD_UNORDERED
-#endif
-
#if defined(_STLPORT_VERSION) && (_STLPORT_VERSION >= 0x520)
# define BOOST_HAS_TR1_UNORDERED_SET
# define BOOST_HAS_TR1_UNORDERED_MAP
// C++0x headers not yet implemented
//
-# define BOOST_NO_0X_HDR_ARRAY
-# define BOOST_NO_0X_HDR_CHRONO
-# define BOOST_NO_0X_HDR_CODECVT
-# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-# define BOOST_NO_0X_HDR_FORWARD_LIST
-# define BOOST_NO_0X_HDR_FUTURE
-# define BOOST_NO_0X_HDR_INITIALIZER_LIST
-# define BOOST_NO_0X_HDR_MUTEX
-# define BOOST_NO_0X_HDR_RANDOM
-# define BOOST_NO_0X_HDR_RATIO
-# define BOOST_NO_0X_HDR_REGEX
-# define BOOST_NO_0X_HDR_SYSTEM_ERROR
-# 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
-# define BOOST_NO_NUMERIC_LIMITS_LOWEST
+# define BOOST_NO_CXX11_HDR_ARRAY
+# define BOOST_NO_CXX11_HDR_CHRONO
+# define BOOST_NO_CXX11_HDR_CODECVT
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_FORWARD_LIST
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# define BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_RANDOM
+# define BOOST_NO_CXX11_HDR_RATIO
+# define BOOST_NO_CXX11_HDR_REGEX
+# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+# define BOOST_NO_CXX11_HDR_THREAD
+# define BOOST_NO_CXX11_HDR_TUPLE
+# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_HDR_TYPEINDEX
+# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+# define BOOST_NO_CXX11_HDR_UNORDERED_SET
+# define BOOST_NO_CXX11_NUMERIC_LIMITS
+# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+# define BOOST_NO_CXX11_SMART_PTR
+# define BOOST_NO_CXX11_HDR_FUNCTIONAL
#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)
// C++0x headers not yet implemented
//
-# define BOOST_NO_0X_HDR_ARRAY
-# define BOOST_NO_0X_HDR_CHRONO
-# define BOOST_NO_0X_HDR_CODECVT
-# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-# define BOOST_NO_0X_HDR_FORWARD_LIST
-# define BOOST_NO_0X_HDR_FUTURE
-# define BOOST_NO_0X_HDR_INITIALIZER_LIST
-# define BOOST_NO_0X_HDR_MUTEX
-# define BOOST_NO_0X_HDR_RANDOM
-# define BOOST_NO_0X_HDR_RATIO
-# define BOOST_NO_0X_HDR_REGEX
-# define BOOST_NO_0X_HDR_SYSTEM_ERROR
-# 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
-# define BOOST_NO_NUMERIC_LIMITS_LOWEST
+# define BOOST_NO_CXX11_HDR_ARRAY
+# define BOOST_NO_CXX11_HDR_CHRONO
+# define BOOST_NO_CXX11_HDR_CODECVT
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_FORWARD_LIST
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# define BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_RANDOM
+# define BOOST_NO_CXX11_HDR_RATIO
+# define BOOST_NO_CXX11_HDR_REGEX
+# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+# define BOOST_NO_CXX11_HDR_THREAD
+# define BOOST_NO_CXX11_HDR_TUPLE
+# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_HDR_TYPEINDEX
+# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+# define BOOST_NO_CXX11_HDR_UNORDERED_SET
+# define BOOST_NO_CXX11_NUMERIC_LIMITS
+# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+# define BOOST_NO_CXX11_SMART_PTR
+# define BOOST_NO_CXX11_HDR_FUNCTIONAL
#define BOOST_STDLIB "Visual Age default standard library"
// Boost config.hpp configuration header file ------------------------------//
+// boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file
// Copyright (c) 2001-2003 John Maddock
// Copyright (c) 2001 Darin Adler
# 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_HASH_MAP_HEADER <hash_map>
#endif
-//
-// Set BOOST_NO_INITIALIZER_LISTS if there is no library support.
-//
-
-#if defined(BOOST_NO_0X_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)
-# define BOOST_NO_INITIALIZER_LISTS
-#endif
-#if defined(BOOST_NO_INITIALIZER_LISTS) && !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
-# define BOOST_NO_0X_HDR_INITIALIZER_LIST
-#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
-
-//
-// Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_VARIADIC_TEMPLATES is not defined
-//
-#if !defined(BOOST_NO_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL)
-#define BOOST_HAS_VARIADIC_TMPL
-#endif
-
-//
-// Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined
-//
-#if !defined(BOOST_NO_DECLTYPE_N3276) && defined(BOOST_NO_DECLTYPE)
-#define BOOST_NO_DECLTYPE_N3276
-#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:
# endif
}
#endif
+// same again for __int128:
+#if defined(BOOST_HAS_INT128) && defined(__cplusplus)
+namespace boost{
+# ifdef __GNUC__
+ __extension__ typedef __int128 int128_type;
+ __extension__ typedef unsigned __int128 uint128_type;
+# else
+ typedef __int128 int128_type;
+ typedef unsigned __int128 uint128_type;
+# endif
+}
+#endif
// BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------//
//
#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
#define BOOST_DO_JOIN2( X, Y ) X##Y
-//
-// Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR
-// These aid the transition to C++11 while still supporting C++03 compilers
-//
-#ifdef BOOST_NO_NOEXCEPT
-# define BOOST_NOEXCEPT
-# define BOOST_NOEXCEPT_IF(Predicate)
-# define BOOST_NOEXCEPT_EXPR(Expression) false
-#else
-# define BOOST_NOEXCEPT noexcept
-# define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
-# define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
-#endif
-
//
// Set some default values for compiler/library/platform names.
// These are for debugging config setup only:
# define BOOST_GPU_ENABLED
# endif
+// BOOST_FORCEINLINE ---------------------------------------------//
+// Macro to use in place of 'inline' to force a function to be inline
+#if !defined(BOOST_FORCEINLINE)
+# if defined(_MSC_VER)
+# define BOOST_FORCEINLINE __forceinline
+# elif defined(__GNUC__) && __GNUC__ > 3
+# define BOOST_FORCEINLINE inline __attribute__ ((always_inline))
+# else
+# define BOOST_FORCEINLINE inline
+# endif
+#endif
+
+//
+// Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined
+//
+#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
+#define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE
+#endif
+
+// -------------------- Deprecated macros for 1.50 ---------------------------
+// These will go away in a future release
+
+// Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP
+// instead of BOOST_NO_STD_UNORDERED
+#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET)
+# ifndef BOOST_NO_CXX11_STD_UNORDERED
+# define BOOST_NO_CXX11_STD_UNORDERED
+# endif
+#endif
+
+// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS
+#if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)
+# define BOOST_NO_INITIALIZER_LISTS
+#endif
+
+// Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY
+#if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_BOOST_NO_0X_HDR_ARRAY)
+# define BOOST_NO_0X_HDR_ARRAY
+#endif
+// Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO
+#if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO)
+# define BOOST_NO_0X_HDR_CHRONO
+#endif
+// Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT
+#if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT)
+# define BOOST_NO_0X_HDR_CODECVT
+#endif
+// Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE
+#if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE)
+# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
+#endif
+// Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST
+#if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST)
+# define BOOST_NO_0X_HDR_FORWARD_LIST
+#endif
+// Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE
+#if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE)
+# define BOOST_NO_0X_HDR_FUTURE
+#endif
+
+// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+// instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS
+#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST
+# define BOOST_NO_0X_HDR_INITIALIZER_LIST
+# endif
+# ifndef BOOST_NO_INITIALIZER_LISTS
+# define BOOST_NO_INITIALIZER_LISTS
+# endif
+#endif
+
+// Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX
+#if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX)
+# define BOOST_NO_0X_HDR_MUTEX
+#endif
+// Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM
+#if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM)
+# define BOOST_NO_0X_HDR_RANDOM
+#endif
+// Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO
+#if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO)
+# define BOOST_NO_0X_HDR_RATIO
+#endif
+// Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX
+#if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX)
+# define BOOST_NO_0X_HDR_REGEX
+#endif
+// Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR
+#if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR)
+# define BOOST_NO_0X_HDR_SYSTEM_ERROR
+#endif
+// Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD
+#if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD)
+# define BOOST_NO_0X_HDR_THREAD
+#endif
+// Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE
+#if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE)
+# define BOOST_NO_0X_HDR_TUPLE
+#endif
+// Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS
+#if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS)
+# define BOOST_NO_0X_HDR_TYPE_TRAITS
+#endif
+// Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX
+#if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX)
+# define BOOST_NO_0X_HDR_TYPEINDEX
+#endif
+// Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP
+#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP)
+# define BOOST_NO_0X_HDR_UNORDERED_MAP
+#endif
+// Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET
+#if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET)
+# define BOOST_NO_0X_HDR_UNORDERED_SET
+#endif
+
+// ------------------ End of deprecated macros for 1.50 ---------------------------
+
+// -------------------- Deprecated macros for 1.51 ---------------------------
+// These will go away in a future release
+
+// Use BOOST_NO_CXX11_AUTO_DECLARATIONS instead of BOOST_NO_AUTO_DECLARATIONS
+#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_AUTO_DECLARATIONS)
+# define BOOST_NO_AUTO_DECLARATIONS
+#endif
+// Use BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS instead of BOOST_NO_AUTO_MULTIDECLARATIONS
+#if defined(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS) && !defined(BOOST_NO_AUTO_MULTIDECLARATIONS)
+# define BOOST_NO_AUTO_MULTIDECLARATIONS
+#endif
+// Use BOOST_NO_CXX11_CHAR16_T instead of BOOST_NO_CHAR16_T
+#if defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CHAR16_T)
+# define BOOST_NO_CHAR16_T
+#endif
+// Use BOOST_NO_CXX11_CHAR32_T instead of BOOST_NO_CHAR32_T
+#if defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CHAR32_T)
+# define BOOST_NO_CHAR32_T
+#endif
+// Use BOOST_NO_CXX11_TEMPLATE_ALIASES instead of BOOST_NO_TEMPLATE_ALIASES
+#if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_TEMPLATE_ALIASES)
+# define BOOST_NO_TEMPLATE_ALIASES
+#endif
+// Use BOOST_NO_CXX11_CONSTEXPR instead of BOOST_NO_CONSTEXPR
+#if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CONSTEXPR)
+# define BOOST_NO_CONSTEXPR
+#endif
+// Use BOOST_NO_CXX11_DECLTYPE_N3276 instead of BOOST_NO_DECLTYPE_N3276
+#if defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_DECLTYPE_N3276)
+# define BOOST_NO_DECLTYPE_N3276
+#endif
+// Use BOOST_NO_CXX11_DECLTYPE instead of BOOST_NO_DECLTYPE
+#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE)
+# define BOOST_NO_DECLTYPE
+#endif
+// Use BOOST_NO_CXX11_DEFAULTED_FUNCTIONS instead of BOOST_NO_DEFAULTED_FUNCTIONS
+#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_DEFAULTED_FUNCTIONS)
+# define BOOST_NO_DEFAULTED_FUNCTIONS
+#endif
+// Use BOOST_NO_CXX11_DELETED_FUNCTIONS instead of BOOST_NO_DELETED_FUNCTIONS
+#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_DELETED_FUNCTIONS)
+# define BOOST_NO_DELETED_FUNCTIONS
+#endif
+// Use BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS instead of BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS)
+# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#endif
+// Use BOOST_NO_CXX11_EXTERN_TEMPLATE instead of BOOST_NO_EXTERN_TEMPLATE
+#if defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) && !defined(BOOST_NO_EXTERN_TEMPLATE)
+# define BOOST_NO_EXTERN_TEMPLATE
+#endif
+// Use BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS instead of BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#if defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
+# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#endif
+// Use BOOST_NO_CXX11_LAMBDAS instead of BOOST_NO_LAMBDAS
+#if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS)
+# define BOOST_NO_LAMBDAS
+#endif
+// Use BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS instead of BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#if defined(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS) && !defined(BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS)
+# define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#endif
+// Use BOOST_NO_CXX11_NOEXCEPT instead of BOOST_NO_NOEXCEPT
+#if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT)
+# define BOOST_NO_NOEXCEPT
+#endif
+// Use BOOST_NO_CXX11_NULLPTR instead of BOOST_NO_NULLPTR
+#if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR)
+# define BOOST_NO_NULLPTR
+#endif
+// Use BOOST_NO_CXX11_RAW_LITERALS instead of BOOST_NO_RAW_LITERALS
+#if defined(BOOST_NO_CXX11_RAW_LITERALS) && !defined(BOOST_NO_RAW_LITERALS)
+# define BOOST_NO_RAW_LITERALS
+#endif
+// Use BOOST_NO_CXX11_RVALUE_REFERENCES instead of BOOST_NO_RVALUE_REFERENCES
+#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_RVALUE_REFERENCES)
+# define BOOST_NO_RVALUE_REFERENCES
+#endif
+// Use BOOST_NO_CXX11_SCOPED_ENUMS instead of BOOST_NO_SCOPED_ENUMS
+#if defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_NO_SCOPED_ENUMS)
+# define BOOST_NO_SCOPED_ENUMS
+#endif
+// Use BOOST_NO_CXX11_STATIC_ASSERT instead of BOOST_NO_STATIC_ASSERT
+#if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT)
+# define BOOST_NO_STATIC_ASSERT
+#endif
+// Use BOOST_NO_CXX11_STD_UNORDERED instead of BOOST_NO_STD_UNORDERED
+#if defined(BOOST_NO_CXX11_STD_UNORDERED) && !defined(BOOST_NO_STD_UNORDERED)
+# define BOOST_NO_STD_UNORDERED
+#endif
+// Use BOOST_NO_CXX11_UNICODE_LITERALS instead of BOOST_NO_UNICODE_LITERALS
+#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS)
+# define BOOST_NO_UNICODE_LITERALS
+#endif
+// Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead of BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX)
+# define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#endif
+// Use BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of BOOST_NO_VARIADIC_TEMPLATES
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+# define BOOST_NO_VARIADIC_TEMPLATES
+#endif
+// Use BOOST_NO_CXX11_VARIADIC_MACROS instead of BOOST_NO_VARIADIC_MACROS
+#if defined(BOOST_NO_CXX11_VARIADIC_MACROS) && !defined(BOOST_NO_VARIADIC_MACROS)
+# define BOOST_NO_VARIADIC_MACROS
+#endif
+// Use BOOST_NO_CXX11_NUMERIC_LIMITS instead of BOOST_NO_NUMERIC_LIMITS_LOWEST
+#if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST)
+# define BOOST_NO_NUMERIC_LIMITS_LOWEST
+#endif
+// ------------------ End of deprecated macros for 1.51 ---------------------------
+
+
+
+//
+// Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR
+// These aid the transition to C++11 while still supporting C++03 compilers
+//
+#ifdef BOOST_NO_CXX11_NOEXCEPT
+# define BOOST_NOEXCEPT
+# define BOOST_NOEXCEPT_IF(Predicate)
+# define BOOST_NOEXCEPT_EXPR(Expression) false
+#else
+# define BOOST_NOEXCEPT noexcept
+# define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
+# define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
+#endif
+
//
// constexpr workarounds
//
-#if defined(BOOST_NO_CONSTEXPR)
+#if defined(BOOST_NO_CXX11_CONSTEXPR)
#define BOOST_CONSTEXPR
#define BOOST_CONSTEXPR_OR_CONST const
#else
#define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST
-// BOOST_FORCEINLINE ---------------------------------------------//
-// Macro to use in place of 'inline' to force a function to be inline
-#if !defined(BOOST_FORCEINLINE)
-# if defined(_MSC_VER)
-# define BOOST_FORCEINLINE __forceinline
-# elif defined(__GNUC__) && __GNUC__ > 3
-# define BOOST_FORCEINLINE inline __attribute__ ((always_inline))
-# else
-# define BOOST_FORCEINLINE inline
-# endif
+//
+// Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined
+//
+#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT)
+# define BOOST_HAS_STATIC_ASSERT
#endif
+//
+// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined
+//
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS)
+#define BOOST_HAS_RVALUE_REFS
+#endif
+
+//
+// Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_CXX11_VARIADIC_TEMPLATES is not defined
+//
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL)
+#define BOOST_HAS_VARIADIC_TMPL
#endif
+
+#endif
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Ion Gaztanaga 2005-2011. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2012. 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)
//
/// @cond
-namespace boost{
-namespace intrusive{
+namespace boost{
+namespace intrusive{
//Create namespace to avoid compilation errors
}}
}}}
-#include <utility>
-#include <memory>
-#include <functional>
+#include <utility>
+#include <memory>
+#include <functional>
#include <iosfwd>
#include <string>
//vector class
template <class T
- ,class A = std::allocator<T> >
+ ,class Allocator = std::allocator<T> >
class vector;
//vector class
template <class T
- ,class A = std::allocator<T> >
+ ,class Allocator = std::allocator<T> >
class stable_vector;
//vector class
template <class T
- ,class A = std::allocator<T> >
+ ,class Allocator = std::allocator<T> >
class deque;
//list class
template <class T
- ,class A = std::allocator<T> >
+ ,class Allocator = std::allocator<T> >
class list;
//slist class
template <class T
- ,class A = std::allocator<T> >
+ ,class Allocator = std::allocator<T> >
class slist;
//set class
-template <class T
- ,class Pred = std::less<T>
- ,class A = std::allocator<T> >
+template <class Key
+ ,class Compare = std::less<Key>
+ ,class Allocator = std::allocator<Key> >
class set;
//multiset class
-template <class T
- ,class Pred = std::less<T>
- ,class A = std::allocator<T> >
+template <class Key
+ ,class Compare = std::less<Key>
+ ,class Allocator = std::allocator<Key> >
class multiset;
//map class
template <class Key
,class T
- ,class Pred = std::less<Key>
- ,class A = std::allocator<std::pair<const Key, T> > >
+ ,class Compare = std::less<Key>
+ ,class Allocator = std::allocator<std::pair<const Key, T> > >
class map;
//multimap class
template <class Key
,class T
- ,class Pred = std::less<Key>
- ,class A = std::allocator<std::pair<const Key, T> > >
+ ,class Compare = std::less<Key>
+ ,class Allocator = std::allocator<std::pair<const Key, T> > >
class multimap;
//flat_set class
-template <class T
- ,class Pred = std::less<T>
- ,class A = std::allocator<T> >
+template <class Key
+ ,class Compare = std::less<Key>
+ ,class Allocator = std::allocator<Key> >
class flat_set;
//flat_multiset class
-template <class T
- ,class Pred = std::less<T>
- ,class A = std::allocator<T> >
+template <class Key
+ ,class Compare = std::less<Key>
+ ,class Allocator = std::allocator<Key> >
class flat_multiset;
//flat_map class
template <class Key
,class T
- ,class Pred = std::less<Key>
- ,class A = std::allocator<std::pair<Key, T> > >
+ ,class Compare = std::less<Key>
+ ,class Allocator = std::allocator<std::pair<Key, T> > >
class flat_map;
//flat_multimap class
template <class Key
,class T
- ,class Pred = std::less<Key>
- ,class A = std::allocator<std::pair<Key, T> > >
+ ,class Compare = std::less<Key>
+ ,class Allocator = std::allocator<std::pair<Key, T> > >
class flat_multimap;
//basic_string class
template <class CharT
,class Traits = std::char_traits<CharT>
- ,class A = std::allocator<CharT> >
+ ,class Allocator = std::allocator<CharT> >
class basic_string;
//! Type used to tag that the input range is
//! guaranteed to be ordered
-struct ordered_range_impl_t {};
+struct ordered_range_t
+{};
//! Type used to tag that the input range is
//! guaranteed to be ordered and unique
-struct ordered_unique_range_impl_t{};
-
-/// @cond
-
-typedef ordered_range_impl_t * ordered_range_t;
-typedef ordered_unique_range_impl_t *ordered_unique_range_t;
-
-/// @endcond
+struct ordered_unique_range_t
+ : public ordered_range_t
+{};
//! Value used to tag that the input range is
//! guaranteed to be ordered
-static const ordered_range_t ordered_range = 0;
+static const ordered_range_t ordered_range = ordered_range_t();
//! Value used to tag that the input range is
//! guaranteed to be ordered and unique
-static const ordered_unique_range_t ordered_unique_range = 0;
+static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t();
/// @cond
#include <cstddef>
#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/type_traits/is_enum.hpp>
#include <boost/type_traits/is_pointer.hpp>
#include <boost/detail/workaround.hpp>
typedef const T param_type;
};
-template <typename T, bool isp, bool b1>
+template <typename T, bool isp, bool b1, bool b2>
struct ct_imp
{
typedef const T& param_type;
};
-template <typename T, bool isp>
-struct ct_imp<T, isp, true>
+template <typename T, bool isp, bool b2>
+struct ct_imp<T, isp, true, b2>
+{
+ typedef typename ct_imp2<T, sizeof(T) <= sizeof(void*)>::param_type param_type;
+};
+
+template <typename T, bool isp, bool b1>
+struct ct_imp<T, isp, b1, true>
{
typedef typename ct_imp2<T, sizeof(T) <= sizeof(void*)>::param_type param_type;
};
-template <typename T, bool b1>
-struct ct_imp<T, true, b1>
+template <typename T, bool b1, bool b2>
+struct ct_imp<T, true, b1, b2>
{
typedef const T param_type;
};
typedef typename boost::detail::ct_imp<
T,
::boost::is_pointer<T>::value,
- ::boost::is_arithmetic<T>::value
+ ::boost::is_arithmetic<T>::value,
+ ::boost::is_enum<T>::value
>::param_type param_type;
};
// Define BOOST_DETAIL_NO_CONTAINER_FWD if you don't want this header to //
// forward declare standard containers. //
// //
+// BOOST_DETAIL_CONTAINER_FWD to make it foward declare containers even if it //
+// normally doesn't. //
+// //
+// BOOST_DETAIL_NO_CONTAINER_FWD overrides BOOST_DETAIL_CONTAINER_FWD. //
+// //
////////////////////////////////////////////////////////////////////////////////
#if !defined(BOOST_DETAIL_NO_CONTAINER_FWD)
-# if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
+# if defined(BOOST_DETAIL_CONTAINER_FWD)
+ // Force forward declarations.
+# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
// STLport
# define BOOST_DETAIL_NO_CONTAINER_FWD
# elif defined(__LIBCOMO__)
# endif
#endif
-// BOOST_DETAIL_TEST_* macros are for testing only
-// and shouldn't be relied upon. But you can use
-// BOOST_DETAIL_NO_CONTAINER_FWD to prevent forward
-// declaration of containers.
-
#if !defined(BOOST_DETAIL_TEST_CONFIG_ONLY)
#if defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \
template <class charT, class traits, class Allocator> class basic_string;
#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+
template <class charT> struct string_char_traits;
#else
template <class charT> struct char_traits;
#elif defined(_WIN32_WCE)
+#if _WIN32_WCE >= 0x600
+
+extern "C" long __cdecl _InterlockedIncrement( long volatile * );
+extern "C" long __cdecl _InterlockedDecrement( long volatile * );
+extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long );
+extern "C" long __cdecl _InterlockedExchange( long volatile *, long );
+extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long );
+
+# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement
+# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
+# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange
+# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
+
+#else
// under Windows CE we still have old-style Interlocked* functions
extern "C" long __cdecl InterlockedIncrement( long* );
# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange
# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd
+#endif
+
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long*)(dest),(long)(exchange),(long)(compare)))
# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
#if defined(_MSC_VER)
#define BOOST_ATTRIBUTE_NORETURN __declspec(noreturn)
#elif defined(__GNUC__)
-#define BOOST_ATTRIBUTE_NORETURN __attribute__((noreturn))
+#define BOOST_ATTRIBUTE_NORETURN __attribute__((__noreturn__))
#else
#define BOOST_ATTRIBUTE_NORETURN
#endif
namespace
exception_detail
{
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# pragma GCC visibility push (default)
+# endif
+#endif
template <class T>
struct
error_info_injector:
{
}
};
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# pragma GCC visibility pop
+# endif
+#endif
struct large_size { char c[256]; };
large_size dispatch_boost_exception( exception const * );
namespace
exception_detail
{
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# pragma GCC visibility push (default)
+# endif
+#endif
class
clone_base
{
{
}
};
+#if defined(__GNUC__)
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# pragma GCC visibility pop
+# endif
+#endif
inline
void
class
clone_impl:
public T,
- public clone_base
+ public virtual clone_base
{
+ struct clone_tag { };
+ clone_impl( clone_impl const & x, clone_tag ):
+ T(x)
+ {
+ copy_boost_exception(this,&x);
+ }
+
public:
explicit
clone_base const *
clone() const
{
- return new clone_impl(*this);
+ return new clone_impl(*this,clone_tag());
}
void
vtable_type* get_vtable() const {
return reinterpret_cast<vtable_type*>(
- reinterpret_cast<std::size_t>(vtable) & ~static_cast<size_t>(0x01));
+ reinterpret_cast<std::size_t>(vtable) & ~static_cast<std::size_t>(0x01));
}
struct clear_type {};
{
this->assign_to_own(f);
}
-
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ BOOST_FUNCTION_FUNCTION(BOOST_FUNCTION_FUNCTION&& f) : function_base()
+ {
+ this->move_assign(f);
+ }
+#endif
+
~BOOST_FUNCTION_FUNCTION() { clear(); }
result_type operator()(BOOST_FUNCTION_PARMS) const
BOOST_CATCH_END
return *this;
}
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ // Move assignment from another BOOST_FUNCTION_FUNCTION
+ BOOST_FUNCTION_FUNCTION& operator=(BOOST_FUNCTION_FUNCTION&& f)
+ {
+
+ if (&f == this)
+ return *this;
+
+ this->clear();
+ BOOST_TRY {
+ this->move_assign(f);
+ } BOOST_CATCH (...) {
+ vtable = 0;
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return *this;
+ }
+#endif
void swap(BOOST_FUNCTION_FUNCTION& other)
{
function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ // Move constructors
+ function(self_type&& f): base_type(static_cast<base_type&&>(f)){}
+ function(base_type&& f): base_type(static_cast<base_type&&>(f)){}
+#endif
+
self_type& operator=(const self_type& f)
{
self_type(f).swap(*this);
return *this;
}
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ self_type& operator=(self_type&& f)
+ {
+ self_type(static_cast<self_type&&>(f)).swap(*this);
+ return *this;
+ }
+#endif
+
template<typename Functor>
#ifndef BOOST_NO_SFINAE
typename enable_if_c<
self_type(f).swap(*this);
return *this;
}
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ self_type& operator=(base_type&& f)
+ {
+ self_type(static_cast<base_type&&>(f)).swap(*this);
+ return *this;
+ }
+#endif
};
#undef BOOST_FUNCTION_PARTIAL_SPEC
# pragma once
#endif
+// Set BOOST_HASH_CONFORMANT_FLOATS to 1 for libraries known to have
+// sufficiently good floating point support to not require any
+// workarounds.
+//
+// When set to 0, the library tries to automatically
+// use the best available implementation. This normally works well, but
+// breaks when ambiguities are created by odd namespacing of the functions.
+//
+// Note that if this is set to 0, the library should still take full
+// advantage of the platform's floating point support.
+
+#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
+# define BOOST_HASH_CONFORMANT_FLOATS 0
+#elif defined(__LIBCOMO__)
+# define BOOST_HASH_CONFORMANT_FLOATS 0
+#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
+// Rogue Wave library:
+# define BOOST_HASH_CONFORMANT_FLOATS 0
+#elif defined(_LIBCPP_VERSION)
+// libc++
+# define BOOST_HASH_CONFORMANT_FLOATS 1
+#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
+// GNU libstdc++ 3
+# if defined(__GNUC__) && __GNUC__ >= 4
+# define BOOST_HASH_CONFORMANT_FLOATS 1
+# else
+# define BOOST_HASH_CONFORMANT_FLOATS 0
+# endif
+#elif defined(__STL_CONFIG_H)
+// generic SGI STL
+# define BOOST_HASH_CONFORMANT_FLOATS 0
+#elif defined(__MSL_CPP__)
+// MSL standard lib:
+# define BOOST_HASH_CONFORMANT_FLOATS 0
+#elif defined(__IBMCPP__)
+// VACPP std lib (probably conformant for much earlier version).
+# if __IBMCPP__ >= 1210
+# define BOOST_HASH_CONFORMANT_FLOATS 1
+# else
+# define BOOST_HASH_CONFORMANT_FLOATS 0
+# endif
+#elif defined(MSIPL_COMPILE_H)
+// Modena C++ standard library
+# define BOOST_HASH_CONFORMANT_FLOATS 0
+#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
+// Dinkumware Library (this has to appear after any possible replacement libraries):
+# if _CPPLIB_VER >= 405
+# define BOOST_HASH_CONFORMANT_FLOATS 1
+# else
+# define BOOST_HASH_CONFORMANT_FLOATS 0
+# endif
+#else
+# define BOOST_HASH_CONFORMANT_FLOATS 0
+#endif
+
+#if BOOST_HASH_CONFORMANT_FLOATS
+
+// The standard library is known to be compliant, so don't use the
+// configuration mechanism.
+
+namespace boost {
+ namespace hash_detail {
+ template <typename Float>
+ struct call_ldexp {
+ typedef Float float_type;
+ inline Float operator()(Float x, int y) const {
+ return std::ldexp(x, y);
+ }
+ };
+
+ template <typename Float>
+ struct call_frexp {
+ typedef Float float_type;
+ inline Float operator()(Float x, int* y) const {
+ return std::frexp(x, y);
+ }
+ };
+
+ template <typename Float>
+ struct select_hash_type
+ {
+ typedef Float type;
+ };
+ }
+}
+
+#else // BOOST_HASH_CONFORMANT_FLOATS == 0
+
// The C++ standard requires that the C float functions are overloarded
// for float, double and long double in the std namespace, but some of the older
// library implementations don't support this. On some that don't, the C99
}
}
+#endif // BOOST_HASH_CONFORMANT_FLOATS
+
#endif
-// Copyright 2005-2009 Daniel James.
+// Copyright 2005-2012 Daniel James.
// 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/config.hpp>
#include <boost/functional/hash/detail/float_functions.hpp>
#include <boost/functional/hash/detail/limits.hpp>
+#include <boost/utility/enable_if.hpp>
#include <boost/integer/static_log2.hpp>
#include <boost/cstdint.hpp>
#include <boost/assert.hpp>
+#include <boost/limits.hpp>
+#include <cstring>
-// Include hash implementation for the current platform.
-
-// Cygwn
-#if defined(__CYGWIN__)
-# if defined(__i386__) || defined(_M_IX86)
-# include <boost/functional/hash/detail/hash_float_x86.hpp>
-# else
-# include <boost/functional/hash/detail/hash_float_generic.hpp>
-# endif
-#else
-# include <boost/functional/hash/detail/hash_float_generic.hpp>
+#if defined(BOOST_MSVC)
+#pragma warning(push)
+#if BOOST_MSVC >= 1400
+#pragma warning(disable:6294) // Ill-defined for-loop: initial condition does
+ // not satisfy test. Loop body not executed
+#endif
#endif
// Can we use fpclassify?
# define BOOST_HASH_USE_FPCLASSIFY 0
#endif
+namespace boost
+{
+ namespace hash_detail
+ {
+ inline void hash_float_combine(std::size_t& seed, std::size_t value)
+ {
+ seed ^= value + (seed<<6) + (seed>>2);
+ }
+
+ ////////////////////////////////////////////////////////////////////////
+ // Binary hash function
+ //
+ // Only used for floats with known iec559 floats, and certain values in
+ // numeric_limits
+
+ inline std::size_t hash_binary(char* ptr, std::size_t length)
+ {
+ std::size_t seed = 0;
+
+ if (length >= sizeof(std::size_t)) {
+ seed = *(std::size_t*) ptr;
+ length -= sizeof(std::size_t);
+ ptr += sizeof(std::size_t);
+
+ while(length >= sizeof(std::size_t)) {
+ std::size_t buffer = 0;
+ std::memcpy(&buffer, ptr, sizeof(std::size_t));
+ hash_float_combine(seed, buffer);
+ length -= sizeof(std::size_t);
+ ptr += sizeof(std::size_t);
+ }
+ }
+
+ if (length > 0) {
+ std::size_t buffer = 0;
+ std::memcpy(&buffer, ptr, length);
+ hash_float_combine(seed, buffer);
+ }
+
+ return seed;
+ }
+
+ template <typename Float>
+ inline std::size_t float_hash_impl(Float v,
+ BOOST_DEDUCED_TYPENAME boost::enable_if_c<
+ std::numeric_limits<Float>::is_iec559 &&
+ std::numeric_limits<Float>::digits == 24 &&
+ std::numeric_limits<Float>::radix == 2 &&
+ std::numeric_limits<Float>::max_exponent == 128,
+ int>::type
+ )
+ {
+ return hash_binary((char*) &v, 4);
+ }
+
+
+ template <typename Float>
+ inline std::size_t float_hash_impl(Float v,
+ BOOST_DEDUCED_TYPENAME boost::enable_if_c<
+ std::numeric_limits<Float>::is_iec559 &&
+ std::numeric_limits<Float>::digits == 53 &&
+ std::numeric_limits<Float>::radix == 2 &&
+ std::numeric_limits<Float>::max_exponent == 1024,
+ int>::type
+ )
+ {
+ return hash_binary((char*) &v, 8);
+ }
+
+ template <typename Float>
+ inline std::size_t float_hash_impl(Float v,
+ BOOST_DEDUCED_TYPENAME boost::enable_if_c<
+ std::numeric_limits<Float>::is_iec559 &&
+ std::numeric_limits<Float>::digits == 64 &&
+ std::numeric_limits<Float>::radix == 2 &&
+ std::numeric_limits<Float>::max_exponent == 16384,
+ int>::type
+ )
+ {
+ return hash_binary((char*) &v, 10);
+ }
+
+ template <typename Float>
+ inline std::size_t float_hash_impl(Float v,
+ BOOST_DEDUCED_TYPENAME boost::enable_if_c<
+ std::numeric_limits<Float>::is_iec559 &&
+ std::numeric_limits<Float>::digits == 113 &&
+ std::numeric_limits<Float>::radix == 2 &&
+ std::numeric_limits<Float>::max_exponent == 16384,
+ int>::type
+ )
+ {
+ return hash_binary((char*) &v, 16);
+ }
+
+ ////////////////////////////////////////////////////////////////////////
+ // Portable hash function
+ //
+ // Used as a fallback when the binary hash function isn't supported.
+
+ template <class T>
+ inline std::size_t float_hash_impl2(T v)
+ {
+ boost::hash_detail::call_frexp<T> frexp;
+ boost::hash_detail::call_ldexp<T> ldexp;
+
+ int exp = 0;
+
+ v = frexp(v, &exp);
+
+ // A postive value is easier to hash, so combine the
+ // sign with the exponent and use the absolute value.
+ if(v < 0) {
+ v = -v;
+ exp += limits<T>::max_exponent -
+ limits<T>::min_exponent;
+ }
+
+ v = ldexp(v, limits<std::size_t>::digits);
+ std::size_t seed = static_cast<std::size_t>(v);
+ v -= static_cast<T>(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
+ + limits<std::size_t>::digits - 1)
+ / limits<std::size_t>::digits;
+
+ for(std::size_t i = 0; i != length; ++i)
+ {
+ v = ldexp(v, limits<std::size_t>::digits);
+ std::size_t part = static_cast<std::size_t>(v);
+ v -= static_cast<T>(part);
+ hash_float_combine(seed, part);
+ }
+
+ hash_float_combine(seed, exp);
+
+ return seed;
+ }
+
+#if !defined(BOOST_HASH_DETAIL_TEST_WITHOUT_GENERIC)
+ template <class T>
+ inline std::size_t float_hash_impl(T v, ...)
+ {
+ typedef BOOST_DEDUCED_TYPENAME select_hash_type<T>::type type;
+ return float_hash_impl2(static_cast<type>(v));
+ }
+#endif
+ }
+}
+
#if BOOST_HASH_USE_FPCLASSIFY
#include <boost/config/no_tr1/cmath.hpp>
template <class T>
inline std::size_t float_hash_value(T v)
{
+#if defined(fpclassify)
+ switch (fpclassify(v))
+#elif BOOST_HASH_CONFORMANT_FLOATS
+ switch (std::fpclassify(v))
+#else
using namespace std;
- switch (fpclassify(v)) {
+ switch (fpclassify(v))
+#endif
+ {
case FP_ZERO:
return 0;
case FP_INFINITE:
return (std::size_t)(-3);
case FP_NORMAL:
case FP_SUBNORMAL:
- return float_hash_impl(v);
+ return float_hash_impl(v, 0);
default:
BOOST_ASSERT(0);
return 0;
{
namespace hash_detail
{
+ template <class T>
+ inline bool is_zero(T v)
+ {
+#if !defined(__GNUC__)
+ return v == 0;
+#else
+ // GCC's '-Wfloat-equal' will complain about comparing
+ // v to 0, but because it disables warnings for system
+ // headers it won't complain if you use std::equal_to to
+ // compare with 0. Resulting in this silliness:
+ return std::equal_to<T>()(v, 0);
+#endif
+ }
+
template <class T>
inline std::size_t float_hash_value(T v)
{
- return v == 0 ? 0 : float_hash_impl(v);
+ return boost::hash_detail::is_zero(v) ? 0 : float_hash_impl(v, 0);
}
}
}
#undef BOOST_HASH_USE_FPCLASSIFY
+#if defined(BOOST_MSVC)
+#pragma warning(pop)
+#endif
+
#endif
+++ /dev/null
-
-// Copyright 2005-2009 Daniel James.
-// 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)
-
-// A general purpose hash function for non-zero floating point values.
-
-#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_GENERIC_HEADER)
-#define BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_GENERIC_HEADER
-
-#include <boost/functional/hash/detail/float_functions.hpp>
-#include <boost/integer/static_log2.hpp>
-#include <boost/functional/hash/detail/limits.hpp>
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-#if defined(BOOST_MSVC)
-#pragma warning(push)
-#if BOOST_MSVC >= 1400
-#pragma warning(disable:6294) // Ill-defined for-loop: initial condition does
- // not satisfy test. Loop body not executed
-#endif
-#endif
-
-namespace boost
-{
- namespace hash_detail
- {
- inline void hash_float_combine(std::size_t& seed, std::size_t value)
- {
- seed ^= value + (seed<<6) + (seed>>2);
- }
-
- template <class T>
- inline std::size_t float_hash_impl2(T v)
- {
- boost::hash_detail::call_frexp<T> frexp;
- boost::hash_detail::call_ldexp<T> ldexp;
-
- int exp = 0;
-
- v = frexp(v, &exp);
-
- // A postive value is easier to hash, so combine the
- // sign with the exponent and use the absolute value.
- if(v < 0) {
- v = -v;
- exp += limits<T>::max_exponent -
- limits<T>::min_exponent;
- }
-
- v = ldexp(v, limits<std::size_t>::digits);
- std::size_t seed = static_cast<std::size_t>(v);
- v -= static_cast<T>(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
- + limits<std::size_t>::digits - 1)
- / limits<std::size_t>::digits;
-
- for(std::size_t i = 0; i != length; ++i)
- {
- v = ldexp(v, limits<std::size_t>::digits);
- std::size_t part = static_cast<std::size_t>(v);
- v -= static_cast<T>(part);
- hash_float_combine(seed, part);
- }
-
- hash_float_combine(seed, exp);
-
- return seed;
- }
-
- template <class T>
- inline std::size_t float_hash_impl(T v)
- {
- typedef BOOST_DEDUCED_TYPENAME select_hash_type<T>::type type;
- return float_hash_impl2(static_cast<type>(v));
- }
- }
-}
-
-#if defined(BOOST_MSVC)
-#pragma warning(pop)
-#endif
-
-#endif
+++ /dev/null
-
-// Copyright 2005-2009 Daniel James.
-// 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)
-
-// A non-portable hash function form non-zero floats on x86.
-//
-// Even if you're on an x86 platform, this might not work if their floating
-// point isn't set up as this expects. So this should only be used if it's
-// absolutely certain that it will work.
-
-#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_X86_HEADER)
-#define BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_X86_HEADER
-
-#include <boost/cstdint.hpp>
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-namespace boost
-{
- namespace hash_detail
- {
- inline void hash_float_combine(std::size_t& seed, std::size_t value)
- {
- seed ^= value + (seed<<6) + (seed>>2);
- }
-
- inline std::size_t float_hash_impl(float v)
- {
- boost::uint32_t* ptr = (boost::uint32_t*)&v;
- std::size_t seed = *ptr;
- return seed;
- }
-
- inline std::size_t float_hash_impl(double v)
- {
- boost::uint32_t* ptr = (boost::uint32_t*)&v;
- std::size_t seed = *ptr++;
- hash_float_combine(seed, *ptr);
- return seed;
- }
-
- inline std::size_t float_hash_impl(long double v)
- {
- boost::uint32_t* ptr = (boost::uint32_t*)&v;
- std::size_t seed = *ptr++;
- hash_float_combine(seed, *ptr++);
- hash_float_combine(seed, *(boost::uint16_t*)ptr);
- return seed;
- }
- }
-}
-
-#endif
#include <boost/functional/hash/hash.hpp>
#include <boost/detail/container_fwd.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+
+#if !defined(BOOST_NO_CXX11_HDR_ARRAY)
+# include <array>
+#endif
+
+#if !defined(BOOST_NO_CXX11_HDR_TUPLE)
+# include <tuple>
+#endif
+
+#if !defined(BOOST_NO_CXX11_HDR_MEMORY)
+# include <memory>
+#endif
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
std::size_t hash_value(std::pair<A, B> const& v)
{
std::size_t seed = 0;
- hash_combine(seed, v.first);
- hash_combine(seed, v.second);
+ boost::hash_combine(seed, v.first);
+ boost::hash_combine(seed, v.second);
return seed;
}
template <class T, class A>
std::size_t hash_value(std::vector<T, A> const& v)
{
- return hash_range(v.begin(), v.end());
+ return boost::hash_range(v.begin(), v.end());
}
template <class T, class A>
std::size_t hash_value(std::list<T, A> const& v)
{
- return hash_range(v.begin(), v.end());
+ return boost::hash_range(v.begin(), v.end());
}
template <class T, class A>
std::size_t hash_value(std::deque<T, A> const& v)
{
- return hash_range(v.begin(), v.end());
+ return boost::hash_range(v.begin(), v.end());
}
template <class K, class C, class A>
std::size_t hash_value(std::set<K, C, A> const& v)
{
- return hash_range(v.begin(), v.end());
+ return boost::hash_range(v.begin(), v.end());
}
template <class K, class C, class A>
std::size_t hash_value(std::multiset<K, C, A> const& v)
{
- return hash_range(v.begin(), v.end());
+ return boost::hash_range(v.begin(), v.end());
}
template <class K, class T, class C, class A>
std::size_t hash_value(std::map<K, T, C, A> const& v)
{
- return hash_range(v.begin(), v.end());
+ return boost::hash_range(v.begin(), v.end());
}
template <class K, class T, class C, class A>
std::size_t hash_value(std::multimap<K, T, C, A> const& v)
{
- return hash_range(v.begin(), v.end());
+ return boost::hash_range(v.begin(), v.end());
}
template <class T>
return seed;
}
+#if !defined(BOOST_NO_CXX11_HDR_ARRAY)
+ template <class T, std::size_t N>
+ std::size_t hash_value(std::array<T, N> const& v)
+ {
+ return boost::hash_range(v.begin(), v.end());
+ }
+#endif
+
+#if !defined(BOOST_NO_CXX11_HDR_TUPLE)
+ namespace hash_detail {
+ template <std::size_t I, typename T>
+ inline typename boost::enable_if_c<(I == std::tuple_size<T>::value),
+ void>::type
+ hash_combine_tuple(std::size_t&, T const&)
+ {
+ }
+
+ template <std::size_t I, typename T>
+ inline typename boost::enable_if_c<(I < std::tuple_size<T>::value),
+ void>::type
+ hash_combine_tuple(std::size_t& seed, T const& v)
+ {
+ boost::hash_combine(seed, std::get<I>(v));
+ boost::hash_detail::hash_combine_tuple<I + 1>(seed, v);
+ }
+
+ template <typename T>
+ inline std::size_t hash_tuple(T const& v)
+ {
+ std::size_t seed = 0;
+ boost::hash_detail::hash_combine_tuple<0>(seed, v);
+ return seed;
+ }
+ }
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template <typename... T>
+ inline std::size_t hash_value(std::tuple<T...> const& v)
+ {
+ return boost::hash_detail::hash_tuple(v);
+ }
+#else
+
+ inline std::size_t hash_value(std::tuple<> const& v)
+ {
+ return boost::hash_detail::hash_tuple(v);
+ }
+
+# define BOOST_HASH_TUPLE_F(z, n, _) \
+ template< \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \
+ > \
+ inline std::size_t hash_value(std::tuple< \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, A) \
+ > const& v) \
+ { \
+ return boost::hash_detail::hash_tuple(v); \
+ }
+
+ BOOST_PP_REPEAT_FROM_TO(1, 11, BOOST_HASH_TUPLE_F, _)
+# undef BOOST_HASH_TUPLE_F
+#endif
+
+#endif
+
+#if !defined(BOOST_NO_CXX11_SMART_PTR)
+ template <typename T>
+ inline std::size_t hash_value(std::shared_ptr<T> const& x) {
+ return boost::hash_value(x.get());
+ }
+
+ template <typename T, typename Deleter>
+ inline std::size_t hash_value(std::unique_ptr<T, Deleter> const& x) {
+ return boost::hash_value(x.get());
+ }
+#endif
+
//
// call_hash_impl
//
#include <boost/functional/hash/detail/hash_float.hpp>
#include <string>
#include <boost/limits.hpp>
-
-#if defined(BOOST_HASH_NO_IMPLICIT_CASTS)
-#include <boost/static_assert.hpp>
-#endif
+#include <boost/type_traits/is_enum.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/utility/enable_if.hpp>
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
#include <boost/type_traits/is_pointer.hpp>
#endif
-#if !defined(BOOST_NO_0X_HDR_TYPEINDEX)
+#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
#include <typeindex>
#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;
- }
+ namespace hash_detail
+ {
+ struct enable_hash_value { typedef std::size_t type; };
+
+ template <typename T> struct basic_numbers {};
+ template <typename T> struct long_numbers;
+ template <typename T> struct ulong_numbers;
+ template <typename T> struct float_numbers {};
+
+ template <> struct basic_numbers<bool> :
+ boost::hash_detail::enable_hash_value {};
+ template <> struct basic_numbers<char> :
+ boost::hash_detail::enable_hash_value {};
+ template <> struct basic_numbers<unsigned char> :
+ boost::hash_detail::enable_hash_value {};
+ template <> struct basic_numbers<signed char> :
+ boost::hash_detail::enable_hash_value {};
+ template <> struct basic_numbers<short> :
+ boost::hash_detail::enable_hash_value {};
+ template <> struct basic_numbers<unsigned short> :
+ boost::hash_detail::enable_hash_value {};
+ template <> struct basic_numbers<int> :
+ boost::hash_detail::enable_hash_value {};
+ template <> struct basic_numbers<unsigned int> :
+ boost::hash_detail::enable_hash_value {};
+ template <> struct basic_numbers<long> :
+ boost::hash_detail::enable_hash_value {};
+ template <> struct basic_numbers<unsigned long> :
+ boost::hash_detail::enable_hash_value {};
+#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
+ template <> struct basic_numbers<wchar_t> :
+ boost::hash_detail::enable_hash_value {};
#endif
- std::size_t hash_value(bool);
- std::size_t hash_value(char);
- std::size_t hash_value(unsigned char);
- std::size_t hash_value(signed char);
- std::size_t hash_value(short);
- std::size_t hash_value(unsigned short);
- std::size_t hash_value(int);
- std::size_t hash_value(unsigned int);
- std::size_t hash_value(long);
- std::size_t hash_value(unsigned long);
+ // long_numbers is defined like this to allow for separate
+ // specialization for long_long and int128_type, in case
+ // they conflict.
+ template <typename T> struct long_numbers2 {};
+ template <typename T> struct ulong_numbers2 {};
+ template <typename T> struct long_numbers : long_numbers2<T> {};
+ template <typename T> struct ulong_numbers : ulong_numbers2<T> {};
-#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
- std::size_t hash_value(wchar_t);
-#endif
-
#if !defined(BOOST_NO_LONG_LONG)
- std::size_t hash_value(boost::long_long_type);
- std::size_t hash_value(boost::ulong_long_type);
+ template <> struct long_numbers<boost::long_long_type> :
+ boost::hash_detail::enable_hash_value {};
+ template <> struct ulong_numbers<boost::ulong_long_type> :
+ boost::hash_detail::enable_hash_value {};
#endif
+#if defined(BOOST_HAS_INT128)
+ template <> struct long_numbers2<boost::int128_type> :
+ boost::hash_detail::enable_hash_value {};
+ template <> struct ulong_numbers2<boost::uint128_type> :
+ boost::hash_detail::enable_hash_value {};
+#endif
+
+ template <> struct float_numbers<float> :
+ boost::hash_detail::enable_hash_value {};
+ template <> struct float_numbers<double> :
+ boost::hash_detail::enable_hash_value {};
+ template <> struct float_numbers<long double> :
+ boost::hash_detail::enable_hash_value {};
+ }
+
+ template <typename T>
+ typename boost::hash_detail::basic_numbers<T>::type hash_value(T);
+ template <typename T>
+ typename boost::hash_detail::long_numbers<T>::type hash_value(T);
+ template <typename T>
+ typename boost::hash_detail::ulong_numbers<T>::type hash_value(T);
+
+ template <typename T>
+ typename boost::enable_if<boost::is_enum<T>, std::size_t>::type
+ hash_value(T);
+
#if !BOOST_WORKAROUND(__DMC__, <= 0x848)
template <class T> std::size_t hash_value(T* const&);
#else
std::size_t hash_value(T (&x)[N]);
#endif
- std::size_t hash_value(float v);
- std::size_t hash_value(double v);
- std::size_t hash_value(long double v);
-
template <class Ch, class A>
std::size_t hash_value(
std::basic_string<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch>, A> const&);
-#if !defined(BOOST_NO_0X_HDR_TYPEINDEX)
+ template <typename T>
+ typename boost::hash_detail::float_numbers<T>::type hash_value(T);
+
+#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
std::size_t hash_value(std::type_index);
#endif
}
}
- inline std::size_t hash_value(bool v)
- {
- return static_cast<std::size_t>(v);
- }
-
- inline std::size_t hash_value(char v)
- {
- return static_cast<std::size_t>(v);
- }
-
- inline std::size_t hash_value(unsigned char v)
- {
- return static_cast<std::size_t>(v);
- }
-
- inline std::size_t hash_value(signed char v)
- {
- return static_cast<std::size_t>(v);
- }
-
- inline std::size_t hash_value(short v)
- {
- return static_cast<std::size_t>(v);
- }
-
- inline std::size_t hash_value(unsigned short v)
- {
- return static_cast<std::size_t>(v);
- }
-
- inline std::size_t hash_value(int v)
- {
- return static_cast<std::size_t>(v);
- }
-
- inline std::size_t hash_value(unsigned int v)
+ template <typename T>
+ typename boost::hash_detail::basic_numbers<T>::type hash_value(T v)
{
return static_cast<std::size_t>(v);
}
- inline std::size_t hash_value(long v)
+ template <typename T>
+ typename boost::hash_detail::long_numbers<T>::type hash_value(T v)
{
- return static_cast<std::size_t>(v);
+ return hash_detail::hash_value_signed(v);
}
- inline std::size_t hash_value(unsigned long v)
+ template <typename T>
+ typename boost::hash_detail::ulong_numbers<T>::type hash_value(T v)
{
- return static_cast<std::size_t>(v);
+ return hash_detail::hash_value_unsigned(v);
}
-#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
- inline std::size_t hash_value(wchar_t v)
+ template <typename T>
+ typename boost::enable_if<boost::is_enum<T>, std::size_t>::type
+ hash_value(T v)
{
return static_cast<std::size_t>(v);
}
-#endif
-
-#if !defined(BOOST_NO_LONG_LONG)
- inline std::size_t hash_value(boost::long_long_type v)
- {
- return hash_detail::hash_value_signed(v);
- }
-
- inline std::size_t hash_value(boost::ulong_long_type v)
- {
- return hash_detail::hash_value_unsigned(v);
- }
-#endif
// Implementation by Alberto Barbati and Dave Harris.
#if !BOOST_WORKAROUND(__DMC__, <= 0x848)
return hash_range(v.begin(), v.end());
}
- inline std::size_t hash_value(float v)
- {
- return boost::hash_detail::float_hash_value(v);
- }
-
- inline std::size_t hash_value(double v)
- {
- return boost::hash_detail::float_hash_value(v);
- }
-
- inline std::size_t hash_value(long double v)
+ template <typename T>
+ typename boost::hash_detail::float_numbers<T>::type hash_value(T v)
{
return boost::hash_detail::float_hash_value(v);
}
-#if !defined(BOOST_NO_0X_HDR_TYPEINDEX)
+#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
inline std::size_t hash_value(std::type_index v)
{
return v.hash_code();
BOOST_HASH_SPECIALIZE(boost::ulong_long_type)
#endif
-#if !defined(BOOST_NO_0X_HDR_TYPEINDEX)
+#if defined(BOOST_HAS_INT128)
+ BOOST_HASH_SPECIALIZE(boost::int128_type)
+ BOOST_HASH_SPECIALIZE(boost::uint128_type)
+#endif
+
+#if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX)
BOOST_HASH_SPECIALIZE(std::type_index)
#endif
--- /dev/null
+
+// Copyright 2005-2009 Daniel James.
+// 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/functional/hash/hash_fwd.hpp>
+
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef GET_POINTER_DWA20021219_HPP
-# define GET_POINTER_DWA20021219_HPP
+#define GET_POINTER_DWA20021219_HPP
+
+#include <boost/config.hpp>
// In order to avoid circular dependencies with Boost.TR1
// we make sure that our include of <memory> doesn't try to
// pull in the TR1 headers: that's why we use this header
// rather than including <memory> directly:
-# include <boost/config/no_tr1/memory.hpp> // std::auto_ptr
+#include <boost/config/no_tr1/memory.hpp> // std::auto_ptr
namespace boost {
return p.get();
}
+#if !defined( BOOST_NO_CXX11_SMART_PTR )
+
+template<class T> T * get_pointer( std::unique_ptr<T> const& p )
+{
+ return p.get();
+}
+
+template<class T> T * get_pointer( std::shared_ptr<T> const& p )
+{
+ return p.get();
+}
+
+#endif
} // namespace boost
+++ /dev/null
-// Copyright David Abrahams 2003.
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-#ifndef IMPLICIT_CAST_DWA200356_HPP
-# define IMPLICIT_CAST_DWA200356_HPP
-
-# include <boost/mpl/identity.hpp>
-
-namespace boost {
-
-// implementation originally suggested by C. Green in
-// http://lists.boost.org/MailArchives/boost/msg00886.php
-
-// The use of identity creates a non-deduced form, so that the
-// explicit template argument must be supplied
-template <typename T>
-inline T implicit_cast (typename mpl::identity<T>::type x) {
- return x;
-}
-
-// incomplete return type now is here
-//template <typename T>
-//void implicit_cast (...);
-
-} // namespace boost
-
-
-#endif // IMPLICIT_CAST_DWA200356_HPP
#include <boost/integer_traits.hpp> // for boost::::boost::integer_traits
#include <boost/limits.hpp> // for ::std::numeric_limits
#include <boost/cstdint.hpp> // for boost::int64_t and BOOST_NO_INTEGRAL_INT64_T
+#include <boost/static_assert.hpp>
//
// We simply cannot include this header on gcc without getting copious warnings of the kind:
// convert category to type
template< int Category > struct int_least_helper {}; // default is empty
+ template< int Category > struct uint_least_helper {}; // default is empty
// specializatons: 1=long, 2=int, 3=short, 4=signed char,
// 6=unsigned long, 7=unsigned int, 8=unsigned short, 9=unsigned char
template<> struct int_least_helper<4> { typedef short least; };
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; };
+ template<> struct uint_least_helper<1> { typedef boost::ulong_long_type least; };
#elif defined(BOOST_HAS_MS_INT64)
- template<> struct int_least_helper<6> { typedef unsigned __int64 least; };
+ template<> struct uint_least_helper<1> { 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; };
- template<> struct int_least_helper<9> { typedef unsigned short least; };
- template<> struct int_least_helper<10> { typedef unsigned char least; };
+ template<> struct uint_least_helper<2> { typedef unsigned long least; };
+ template<> struct uint_least_helper<3> { typedef unsigned int least; };
+ template<> struct uint_least_helper<4> { typedef unsigned short least; };
+ template<> struct uint_least_helper<5> { typedef unsigned char least; };
template <int Bits>
struct exact_signed_base_helper{};
template< int Bits > // bits (including sign) required
struct int_t : public detail::exact_signed_base_helper<Bits>
{
+ BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::intmax_t) * CHAR_BIT),
+ "No suitable signed integer type with the requested number of bits is available.");
typedef typename detail::int_least_helper
<
#ifdef BOOST_HAS_LONG_LONG
- (Bits-1 <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
+ (Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
#else
1 +
#endif
template< int Bits > // bits required
struct uint_t : public detail::exact_unsigned_base_helper<Bits>
{
+ BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::uintmax_t) * CHAR_BIT),
+ "No suitable unsigned integer type with the requested number of bits is available.");
#if (defined(__BORLANDC__) || defined(__CODEGEAR__)) && defined(BOOST_NO_INTEGRAL_INT64_T)
// It's really not clear why this workaround should be needed... shrug I guess! JM
BOOST_STATIC_CONSTANT(int, s =
(Bits <= ::std::numeric_limits<unsigned char>::digits));
typedef typename detail::int_least_helper< ::boost::uint_t<Bits>::s>::least least;
#else
- typedef typename detail::int_least_helper
+ typedef typename detail::uint_least_helper
<
- 5 +
#ifdef BOOST_HAS_LONG_LONG
- (Bits-1 <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
+ (Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
#else
1 +
#endif
// It's really not clear why this workaround should be needed... shrug I guess! JM
#if defined(BOOST_NO_INTEGRAL_INT64_T)
BOOST_STATIC_CONSTANT(unsigned, which =
- 6 +
+ 1 +
(MaxValue <= ::boost::integer_traits<unsigned long>::const_max) +
(MaxValue <= ::boost::integer_traits<unsigned int>::const_max) +
(MaxValue <= ::boost::integer_traits<unsigned short>::const_max) +
typedef typename detail::int_least_helper< ::boost::uint_value_t<MaxValue>::which>::least least;
#else // BOOST_NO_INTEGRAL_INT64_T
BOOST_STATIC_CONSTANT(unsigned, which =
- 5 +
+ 1 +
(MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) +
(MaxValue <= ::boost::integer_traits<unsigned long>::const_max) +
(MaxValue <= ::boost::integer_traits<unsigned int>::const_max) +
(MaxValue <= ::boost::integer_traits<unsigned short>::const_max) +
(MaxValue <= ::boost::integer_traits<unsigned char>::const_max));
- typedef typename detail::int_least_helper< ::boost::uint_value_t<MaxValue>::which>::least least;
+ typedef typename detail::uint_least_helper< ::boost::uint_value_t<MaxValue>::which>::least least;
#endif // BOOST_NO_INTEGRAL_INT64_T
#else
- typedef typename detail::int_least_helper
+ typedef typename detail::uint_least_helper
<
- 5 +
#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
(MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) +
#else
* accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
- * $Id: integer_traits.hpp 76784 2012-01-29 21:58:13Z eric_niebler $
+ * $Id: integer_traits.hpp 81851 2012-12-11 14:42:26Z marshall $
*
* Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers
*/
--- /dev/null
+// (C) Copyright Jeremy Siek 2002.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_ITERATOR_CONCEPTS_HPP
+#define BOOST_ITERATOR_CONCEPTS_HPP
+
+#include <boost/concept_check.hpp>
+#include <boost/iterator/iterator_categories.hpp>
+
+// Use boost::detail::iterator_traits to work around some MSVC/Dinkumware problems.
+#include <boost/detail/iterator.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_integral.hpp>
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/or.hpp>
+
+#include <boost/static_assert.hpp>
+
+// Use boost/limits to work around missing limits headers on some compilers
+#include <boost/limits.hpp>
+#include <boost/config.hpp>
+
+#include <algorithm>
+
+#include <boost/concept/detail/concept_def.hpp>
+
+namespace boost_concepts
+{
+ // Used a different namespace here (instead of "boost") so that the
+ // concept descriptions do not take for granted the names in
+ // namespace boost.
+
+ //===========================================================================
+ // Iterator Access Concepts
+
+ BOOST_concept(ReadableIterator,(Iterator))
+ : boost::Assignable<Iterator>
+ , boost::CopyConstructible<Iterator>
+
+ {
+ typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::value_type value_type;
+ typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::reference reference;
+
+ BOOST_CONCEPT_USAGE(ReadableIterator)
+ {
+
+ value_type v = *i;
+ boost::ignore_unused_variable_warning(v);
+ }
+ private:
+ Iterator i;
+ };
+
+ template <
+ typename Iterator
+ , typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::value_type
+ >
+ struct WritableIterator
+ : boost::CopyConstructible<Iterator>
+ {
+ BOOST_CONCEPT_USAGE(WritableIterator)
+ {
+ *i = v;
+ }
+ private:
+ ValueType v;
+ Iterator i;
+ };
+
+ template <
+ typename Iterator
+ , typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::value_type
+ >
+ struct WritableIteratorConcept : WritableIterator<Iterator,ValueType> {};
+
+ BOOST_concept(SwappableIterator,(Iterator))
+ {
+ BOOST_CONCEPT_USAGE(SwappableIterator)
+ {
+ std::iter_swap(i1, i2);
+ }
+ private:
+ Iterator i1;
+ Iterator i2;
+ };
+
+ BOOST_concept(LvalueIterator,(Iterator))
+ {
+ typedef typename boost::detail::iterator_traits<Iterator>::value_type value_type;
+
+ BOOST_CONCEPT_USAGE(LvalueIterator)
+ {
+ value_type& r = const_cast<value_type&>(*i);
+ boost::ignore_unused_variable_warning(r);
+ }
+ private:
+ Iterator i;
+ };
+
+
+ //===========================================================================
+ // Iterator Traversal Concepts
+
+ BOOST_concept(IncrementableIterator,(Iterator))
+ : boost::Assignable<Iterator>
+ , boost::CopyConstructible<Iterator>
+ {
+ typedef typename boost::iterator_traversal<Iterator>::type traversal_category;
+
+ BOOST_CONCEPT_ASSERT((
+ boost::Convertible<
+ traversal_category
+ , boost::incrementable_traversal_tag
+ >));
+
+ BOOST_CONCEPT_USAGE(IncrementableIterator)
+ {
+ ++i;
+ (void)i++;
+ }
+ private:
+ Iterator i;
+ };
+
+ BOOST_concept(SinglePassIterator,(Iterator))
+ : IncrementableIterator<Iterator>
+ , boost::EqualityComparable<Iterator>
+
+ {
+ BOOST_CONCEPT_ASSERT((
+ boost::Convertible<
+ BOOST_DEDUCED_TYPENAME SinglePassIterator::traversal_category
+ , boost::single_pass_traversal_tag
+ > ));
+ };
+
+ BOOST_concept(ForwardTraversal,(Iterator))
+ : SinglePassIterator<Iterator>
+ , boost::DefaultConstructible<Iterator>
+ {
+ typedef typename boost::detail::iterator_traits<Iterator>::difference_type difference_type;
+
+ BOOST_MPL_ASSERT((boost::is_integral<difference_type>));
+ BOOST_MPL_ASSERT_RELATION(std::numeric_limits<difference_type>::is_signed, ==, true);
+
+ BOOST_CONCEPT_ASSERT((
+ boost::Convertible<
+ BOOST_DEDUCED_TYPENAME ForwardTraversal::traversal_category
+ , boost::forward_traversal_tag
+ > ));
+ };
+
+ BOOST_concept(BidirectionalTraversal,(Iterator))
+ : ForwardTraversal<Iterator>
+ {
+ BOOST_CONCEPT_ASSERT((
+ boost::Convertible<
+ BOOST_DEDUCED_TYPENAME BidirectionalTraversal::traversal_category
+ , boost::bidirectional_traversal_tag
+ > ));
+
+ BOOST_CONCEPT_USAGE(BidirectionalTraversal)
+ {
+ --i;
+ (void)i--;
+ }
+ private:
+ Iterator i;
+ };
+
+ BOOST_concept(RandomAccessTraversal,(Iterator))
+ : BidirectionalTraversal<Iterator>
+ {
+ BOOST_CONCEPT_ASSERT((
+ boost::Convertible<
+ BOOST_DEDUCED_TYPENAME RandomAccessTraversal::traversal_category
+ , boost::random_access_traversal_tag
+ > ));
+
+ BOOST_CONCEPT_USAGE(RandomAccessTraversal)
+ {
+ i += n;
+ i = i + n;
+ i = n + i;
+ i -= n;
+ i = i - n;
+ n = i - j;
+ }
+
+ private:
+ typename BidirectionalTraversal<Iterator>::difference_type n;
+ Iterator i, j;
+ };
+
+ //===========================================================================
+ // Iterator Interoperability
+
+ namespace detail
+ {
+ template <typename Iterator1, typename Iterator2>
+ void interop_single_pass_constraints(Iterator1 const& i1, Iterator2 const& i2)
+ {
+ bool b;
+ b = i1 == i2;
+ b = i1 != i2;
+
+ b = i2 == i1;
+ b = i2 != i1;
+ boost::ignore_unused_variable_warning(b);
+ }
+
+ template <typename Iterator1, typename Iterator2>
+ void interop_rand_access_constraints(
+ Iterator1 const& i1, Iterator2 const& i2,
+ boost::random_access_traversal_tag, boost::random_access_traversal_tag)
+ {
+ bool b;
+ typename boost::detail::iterator_traits<Iterator2>::difference_type n;
+ b = i1 < i2;
+ b = i1 <= i2;
+ b = i1 > i2;
+ b = i1 >= i2;
+ n = i1 - i2;
+
+ b = i2 < i1;
+ b = i2 <= i1;
+ b = i2 > i1;
+ b = i2 >= i1;
+ n = i2 - i1;
+ boost::ignore_unused_variable_warning(b);
+ boost::ignore_unused_variable_warning(n);
+ }
+
+ template <typename Iterator1, typename Iterator2>
+ void interop_rand_access_constraints(
+ Iterator1 const&, Iterator2 const&,
+ boost::single_pass_traversal_tag, boost::single_pass_traversal_tag)
+ { }
+
+ } // namespace detail
+
+ BOOST_concept(InteroperableIterator,(Iterator)(ConstIterator))
+ {
+ private:
+ typedef typename boost::detail::pure_traversal_tag<
+ typename boost::iterator_traversal<
+ Iterator
+ >::type
+ >::type traversal_category;
+
+ typedef typename boost::detail::pure_traversal_tag<
+ typename boost::iterator_traversal<
+ ConstIterator
+ >::type
+ >::type const_traversal_category;
+
+ public:
+ BOOST_CONCEPT_ASSERT((SinglePassIterator<Iterator>));
+ BOOST_CONCEPT_ASSERT((SinglePassIterator<ConstIterator>));
+
+ BOOST_CONCEPT_USAGE(InteroperableIterator)
+ {
+ detail::interop_single_pass_constraints(i, ci);
+ detail::interop_rand_access_constraints(i, ci, traversal_category(), const_traversal_category());
+
+ ci = i;
+ }
+
+ private:
+ Iterator i;
+ ConstIterator ci;
+ };
+
+} // namespace boost_concepts
+
+#include <boost/concept/detail/concept_undef.hpp>
+
+#endif // BOOST_ITERATOR_CONCEPTS_HPP
#include <boost/iterator/detail/facade_iterator_category.hpp>
#include <boost/iterator/detail/enable_if.hpp>
-#include <boost/implicit_cast.hpp>
#include <boost/static_assert.hpp>
+#include <boost/utility/addressof.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/add_const.hpp>
// Returning a mutable reference allows nonsense like
// (*r++).mutate(), but it imposes fewer assumptions about the
- // behavior of the value_type. In particular, recall taht
+ // behavior of the value_type. In particular, recall that
// (*r).mutate() is legal if operator* returns by value.
value_type&
operator*() const
// operator->() needs special support for input iterators to strictly meet the
// standard's requirements. If *i is not a reference type, we must still
- // produce a lvalue to which a pointer can be formed. We do that by
- // returning an instantiation of this special proxy class template.
- template <class T>
- struct operator_arrow_proxy
+ // produce an lvalue to which a pointer can be formed. We do that by
+ // returning a proxy object containing an instance of the reference object.
+ template <class Reference, class Pointer>
+ struct operator_arrow_dispatch // proxy references
{
- operator_arrow_proxy(T const* px) : m_value(*px) {}
- T* operator->() const { return &m_value; }
- // This function is needed for MWCW and BCC, which won't call operator->
- // again automatically per 13.3.1.2 para 8
- operator T*() const { return &m_value; }
- mutable T m_value;
+ struct proxy
+ {
+ explicit proxy(Reference const & x) : m_ref(x) {}
+ Reference* operator->() { return boost::addressof(m_ref); }
+ // This function is needed for MWCW and BCC, which won't call
+ // operator-> again automatically per 13.3.1.2 para 8
+ operator Reference*() { return boost::addressof(m_ref); }
+ Reference m_ref;
+ };
+ typedef proxy result_type;
+ static result_type apply(Reference const & x)
+ {
+ return result_type(x);
+ }
};
- // A metafunction that gets the result type for operator->. Also
- // has a static function make() which builds the result from a
- // Reference
- template <class ValueType, class Reference, class Pointer>
- struct operator_arrow_result
+ template <class T, class Pointer>
+ struct operator_arrow_dispatch<T&, Pointer> // "real" references
{
- // CWPro8.3 won't accept "operator_arrow_result::type", and we
- // need that type below, so metafunction forwarding would be a
- // losing proposition here.
- typedef typename mpl::if_<
- is_reference<Reference>
- , Pointer
- , operator_arrow_proxy<ValueType>
- >::type type;
-
- static type make(Reference x)
+ typedef Pointer result_type;
+ static result_type apply(T& x)
{
- return boost::implicit_cast<type>(&x);
+ return boost::addressof(x);
}
};
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
// Deal with ETI
template<>
- struct operator_arrow_result<int, int, int>
+ struct operator_arrow_dispatch<int, int>
{
- typedef int type;
+ typedef int result_type;
};
# endif
Value, CategoryOrTraversal, Reference, Difference
> associated_types;
- typedef boost::detail::operator_arrow_result<
- typename associated_types::value_type
- , Reference
+ typedef boost::detail::operator_arrow_dispatch<
+ Reference
, typename associated_types::pointer
- > pointer_;
+ > operator_arrow_dispatch_;
protected:
// For use by derived classes
typedef Reference reference;
typedef Difference difference_type;
- typedef typename pointer_::type pointer;
+ typedef typename operator_arrow_dispatch_::result_type pointer;
typedef typename associated_types::iterator_category iterator_category;
pointer operator->() const
{
- return pointer_::make(*this->derived());
+ return operator_arrow_dispatch_::apply(*this->derived());
}
typename boost::detail::operator_brackets_result<Derived,Value,reference>::type
--- /dev/null
+// (C) Copyright David Abrahams 2002.
+// (C) Copyright Jeremy Siek 2002.
+// (C) Copyright Thomas Witt 2002.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_REVERSE_ITERATOR_23022003THW_HPP
+#define BOOST_REVERSE_ITERATOR_23022003THW_HPP
+
+#include <boost/next_prior.hpp>
+#include <boost/iterator.hpp>
+#include <boost/iterator/iterator_adaptor.hpp>
+
+namespace boost
+{
+
+ //
+ //
+ //
+ template <class Iterator>
+ class reverse_iterator
+ : public iterator_adaptor< reverse_iterator<Iterator>, Iterator >
+ {
+ typedef iterator_adaptor< reverse_iterator<Iterator>, Iterator > super_t;
+
+ friend class iterator_core_access;
+
+ public:
+ reverse_iterator() {}
+
+ explicit reverse_iterator(Iterator x)
+ : super_t(x) {}
+
+ template<class OtherIterator>
+ reverse_iterator(
+ reverse_iterator<OtherIterator> const& r
+ , typename enable_if_convertible<OtherIterator, Iterator>::type* = 0
+ )
+ : super_t(r.base())
+ {}
+
+ private:
+ typename super_t::reference dereference() const { return *boost::prior(this->base()); }
+
+ void increment() { --this->base_reference(); }
+ void decrement() { ++this->base_reference(); }
+
+ void advance(typename super_t::difference_type n)
+ {
+ this->base_reference() += -n;
+ }
+
+ template <class OtherIterator>
+ typename super_t::difference_type
+ distance_to(reverse_iterator<OtherIterator> const& y) const
+ {
+ return this->base_reference() - y.base();
+ }
+ };
+
+ template <class BidirectionalIterator>
+ reverse_iterator<BidirectionalIterator> make_reverse_iterator(BidirectionalIterator x)
+ {
+ return reverse_iterator<BidirectionalIterator>(x);
+ }
+
+} // namespace boost
+
+#endif // BOOST_REVERSE_ITERATOR_23022003THW_HPP
// with additional fixes and suggestions from Gennaro Prota,
// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
-// Cheng Yang, Matthew Bradbury, David W. Birdsall and other Boosters
+// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2012
#include <boost/config.hpp>
#define BOOST_LCAST_NO_WCHAR_T
#endif
-#if (defined(__MINGW32__) || defined(__MINGW64__)) && (__GNUC__ == 4) \
- && ((__GNUC_MINOR__ == 4) || (__GNUC_MINOR__ == 5)) && defined(__STRICT_ANSI__) \
- && !defined(BOOST_LCAST_NO_WCHAR_T)
-
-// workaround for a mingw bug
-// http://sourceforge.net/tracker/index.php?func=detail&aid=2373234&group_id=2435&atid=102435
-#include <_mingw.h>
-#if (__GNUC_MINOR__ == 4)
-extern "C" {
-_CRTIMP int __cdecl swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...);
-_CRTIMP int __cdecl vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...);
-}
-#endif
-#if (__GNUC_MINOR__ == 5)
-extern "C" {
-_CRTIMP int __cdecl swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...);
-_CRTIMP int __cdecl vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , va_list);
-}
-#endif
-#endif
-
#include <climits>
#include <cstddef>
-#include <istream>
#include <string>
#include <cstring>
#include <cstdio>
#include <typeinfo>
#include <exception>
-#include <cmath>
#include <boost/limits.hpp>
#include <boost/mpl/if.hpp>
#include <boost/throw_exception.hpp>
-#include <boost/type_traits/is_pointer.hpp>
-#include <boost/type_traits/is_integral.hpp>
-#include <boost/type_traits/is_arithmetic.hpp>
-#include <boost/type_traits/remove_pointer.hpp>
-#include <boost/numeric/conversion/cast.hpp>
#include <boost/type_traits/ice.hpp>
-#include <boost/type_traits/make_unsigned.hpp>
-#include <boost/type_traits/is_signed.hpp>
-#include <boost/math/special_functions/sign.hpp>
-#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/type_traits/is_pointer.hpp>
#include <boost/static_assert.hpp>
#include <boost/detail/lcast_precision.hpp>
#include <boost/detail/workaround.hpp>
-#if !defined(__SUNPRO_CC)
-#include <boost/container/container_fwd.hpp>
-#endif // !defined(__SUNPRO_CC)
-#ifndef BOOST_NO_CWCHAR
-# include <cwchar>
-#endif
+
#ifndef BOOST_NO_STD_LOCALE
# include <locale>
#else
# ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
-# warning "Unable to use <locale> header. boost::lexical_cast will use the 'C' locale."
-# define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+ // Getting error at this point means, that your STL library is old/lame/misconfigured.
+ // If nothing can be done with STL library, define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE,
+ // but beware: lexical_cast will understand only 'C' locale delimeters and thousands
+ // separators.
+# error "Unable to use <locale> header. Define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE to force "
+# error "boost::lexical_cast to use only 'C' locale during conversions."
# endif
#endif
namespace boost
{
// exception used to indicate runtime lexical_cast failure
- class bad_lexical_cast :
+ class BOOST_SYMBOL_VISIBLE bad_lexical_cast :
// workaround MSVC bug with std::bad_cast when _HAS_EXCEPTIONS == 0
#if defined(BOOST_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS
public std::exception
{
public:
- bad_lexical_cast() :
+ bad_lexical_cast() BOOST_NOEXCEPT :
#ifndef BOOST_NO_TYPEID
source(&typeid(void)), target(&typeid(void))
#else
bad_lexical_cast(
const std::type_info &source_type_arg,
- const std::type_info &target_type_arg) :
+ const std::type_info &target_type_arg) BOOST_NOEXCEPT :
source(&source_type_arg), target(&target_type_arg)
{
}
return *target;
}
+#ifndef BOOST_NO_CXX11_NOEXCEPT
+ virtual const char *what() const noexcept
+#else
virtual const char *what() const throw()
+#endif
{
return "bad lexical cast: "
"source type value could not be interpreted as target";
}
+
+#ifndef BOOST_NO_CXX11_NOEXCEPT
+ virtual ~bad_lexical_cast() BOOST_NOEXCEPT
+#else
virtual ~bad_lexical_cast() throw()
- {
- }
+#endif
+ {}
private:
const std::type_info *source;
const std::type_info *target;
};
- namespace detail // selectors for choosing stream character type
+ namespace detail // widest_char
{
- template<typename Type>
- struct stream_char
- {
- typedef char type;
- };
+ template <typename TargetChar, typename SourceChar>
+ struct widest_char
+ {
+ typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
+ (sizeof(TargetChar) > sizeof(SourceChar))
+ , TargetChar
+ , SourceChar >::type type;
+ };
+ }
+} // namespace boost
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- template<class CharT, class Traits, class Alloc>
- struct stream_char< std::basic_string<CharT,Traits,Alloc> >
- {
- typedef CharT type;
- };
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(__SUNPRO_CC) && !defined(__PGIC__)
-#if !defined(__SUNPRO_CC)
- template<class CharT, class Traits, class Alloc>
- struct stream_char< ::boost::container::basic_string<CharT,Traits,Alloc> >
- {
- typedef CharT type;
- };
-#endif // !defined(__SUNPRO_CC)
+#include <cmath>
+#include <istream>
+
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+#include <array>
#endif
-#ifndef BOOST_LCAST_NO_WCHAR_T
-#ifndef BOOST_NO_INTRINSIC_WCHAR_T
- template<>
- struct stream_char<wchar_t>
- {
- typedef wchar_t type;
- };
+#include <boost/array.hpp>
+#include <boost/numeric/conversion/cast.hpp>
+#include <boost/type_traits/make_unsigned.hpp>
+#include <boost/type_traits/is_signed.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/type_traits/has_left_shift.hpp>
+#include <boost/type_traits/has_right_shift.hpp>
+#include <boost/math/special_functions/sign.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/range/iterator_range_core.hpp>
+#include <boost/container/container_fwd.hpp>
+#ifndef BOOST_NO_CWCHAR
+# include <cwchar>
#endif
- template<>
- struct stream_char<wchar_t *>
- {
- typedef wchar_t type;
- };
+namespace boost {
- template<>
- struct stream_char<const wchar_t *>
+ namespace detail // is_char_or_wchar<...>
{
- typedef wchar_t type;
- };
+ // returns true, if T is one of the character types
+ template < typename T >
+ struct is_char_or_wchar
+ {
+ typedef boost::type_traits::ice_or<
+ boost::is_same< T, char >::value,
+ #ifndef BOOST_LCAST_NO_WCHAR_T
+ boost::is_same< T, wchar_t >::value,
+ #endif
+ #ifndef BOOST_NO_CXX11_CHAR16_T
+ boost::is_same< T, char16_t >::value,
+ #endif
+ #ifndef BOOST_NO_CXX11_CHAR32_T
+ boost::is_same< T, char32_t >::value,
+ #endif
+ boost::is_same< T, unsigned char >::value,
+ boost::is_same< T, signed char >::value
+ > result_type;
+
+ BOOST_STATIC_CONSTANT(bool, value = (result_type::value) );
+ };
+ }
-#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- template<>
- struct stream_char<std::wstring>
+ namespace detail // normalize_single_byte_char<Char>
{
- typedef wchar_t type;
- };
-#endif
-#endif
+ // Converts signed/unsigned char to char
+ template < class Char >
+ struct normalize_single_byte_char
+ {
+ typedef Char type;
+ };
+ template <>
+ struct normalize_single_byte_char< signed char >
+ {
+ typedef char type;
+ };
-#ifndef BOOST_NO_CHAR16_T
+ template <>
+ struct normalize_single_byte_char< unsigned char >
+ {
+ typedef char type;
+ };
+ }
- template<>
- struct stream_char<char16_t>
+ namespace detail // deduce_character_type_later<T>
{
- typedef char16_t type;
- };
+ // Helper type, meaning that stram character for T must be deduced
+ // at Stage 2 (See deduce_source_char<T> and deduce_target_char<T>)
+ template < class T > struct deduce_character_type_later {};
+ }
- template<>
- struct stream_char<char16_t *>
+ namespace detail // stream_char_common<T>
{
- typedef char16_t type;
- };
+ // Selectors to choose stream character type (common for Source and Target)
+ // Returns one of char, wchar_t, char16_t, char32_t or deduce_character_type_later<T> types
+ // Executed on Stage 1 (See deduce_source_char<T> and deduce_target_char<T>)
+ template < typename Type >
+ struct stream_char_common: public boost::mpl::if_c<
+ boost::detail::is_char_or_wchar< Type >::value,
+ Type,
+ boost::detail::deduce_character_type_later< Type >
+ > {};
+
+ template < typename Char >
+ struct stream_char_common< Char* >: public boost::mpl::if_c<
+ boost::detail::is_char_or_wchar< Char >::value,
+ Char,
+ boost::detail::deduce_character_type_later< Char* >
+ > {};
+
+ template < typename Char >
+ struct stream_char_common< const Char* >: public boost::mpl::if_c<
+ boost::detail::is_char_or_wchar< Char >::value,
+ Char,
+ boost::detail::deduce_character_type_later< const Char* >
+ > {};
+
+ template < typename Char >
+ struct stream_char_common< boost::iterator_range< Char* > >: public boost::mpl::if_c<
+ boost::detail::is_char_or_wchar< Char >::value,
+ Char,
+ boost::detail::deduce_character_type_later< boost::iterator_range< Char* > >
+ > {};
+
+ template < typename Char >
+ struct stream_char_common< boost::iterator_range< const Char* > >: public boost::mpl::if_c<
+ boost::detail::is_char_or_wchar< Char >::value,
+ Char,
+ boost::detail::deduce_character_type_later< boost::iterator_range< const Char* > >
+ > {};
+
+ template < class Char, class Traits, class Alloc >
+ struct stream_char_common< std::basic_string< Char, Traits, Alloc > >
+ {
+ typedef Char type;
+ };
- template<>
- struct stream_char<const char16_t *>
- {
- typedef char16_t type;
- };
+ template < class Char, class Traits, class Alloc >
+ struct stream_char_common< boost::container::basic_string< Char, Traits, Alloc > >
+ {
+ typedef Char type;
+ };
+ template < typename Char, std::size_t N >
+ struct stream_char_common< boost::array< Char, N > >: public boost::mpl::if_c<
+ boost::detail::is_char_or_wchar< Char >::value,
+ Char,
+ boost::detail::deduce_character_type_later< boost::array< Char, N > >
+ > {};
+
+ template < typename Char, std::size_t N >
+ struct stream_char_common< boost::array< const Char, N > >: public boost::mpl::if_c<
+ boost::detail::is_char_or_wchar< Char >::value,
+ Char,
+ boost::detail::deduce_character_type_later< boost::array< const Char, N > >
+ > {};
+
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+ template < typename Char, std::size_t N >
+ struct stream_char_common< std::array<Char, N > >: public boost::mpl::if_c<
+ boost::detail::is_char_or_wchar< Char >::value,
+ Char,
+ boost::detail::deduce_character_type_later< std::array< Char, N > >
+ > {};
+
+ template < typename Char, std::size_t N >
+ struct stream_char_common< std::array< const Char, N > >: public boost::mpl::if_c<
+ boost::detail::is_char_or_wchar< Char >::value,
+ Char,
+ boost::detail::deduce_character_type_later< std::array< const Char, N > >
+ > {};
+#endif
+
+#if !defined(BOOST_LCAST_NO_WCHAR_T) && defined(BOOST_NO_INTRINSIC_WCHAR_T)
+ template <>
+ struct stream_char_common< wchar_t >
+ {
+ typedef char type;
+ };
#endif
+ }
-#ifndef BOOST_NO_CHAR32_T
-
- template<>
- struct stream_char<char32_t>
+ namespace detail // deduce_source_char_impl<T>
{
- typedef char32_t type;
- };
+ // If type T is `deduce_character_type_later` type, then tries to deduce
+ // character type using boost::has_left_shift<T> metafunction.
+ // Otherwise supplied type T is a character type, that must be normalized
+ // using normalize_single_byte_char<Char>.
+ // Executed at Stage 2 (See deduce_source_char<T> and deduce_target_char<T>)
+ template < class Char >
+ struct deduce_source_char_impl
+ {
+ typedef BOOST_DEDUCED_TYPENAME boost::detail::normalize_single_byte_char< Char >::type type;
+ };
+
+ template < class T >
+ struct deduce_source_char_impl< deduce_character_type_later< T > >
+ {
+ typedef boost::has_left_shift< std::basic_ostream< char >, T > result_t;
+
+#if defined(BOOST_LCAST_NO_WCHAR_T)
+ BOOST_STATIC_ASSERT_MSG((result_t::value),
+ "Source type is not std::ostream`able and std::wostream`s are not supported by your STL implementation");
+ typedef char type;
+#else
+ typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
+ result_t::value, char, wchar_t
+ >::type type;
+
+ BOOST_STATIC_ASSERT_MSG((result_t::value || boost::has_left_shift< std::basic_ostream< type >, T >::value),
+ "Source type is neither std::ostream`able nor std::wostream`able");
+#endif
+ };
+ }
- template<>
- struct stream_char<char32_t *>
+ namespace detail // deduce_target_char_impl<T>
{
- typedef char32_t type;
- };
+ // If type T is `deduce_character_type_later` type, then tries to deduce
+ // character type using boost::has_right_shift<T> metafunction.
+ // Otherwise supplied type T is a character type, that must be normalized
+ // using normalize_single_byte_char<Char>.
+ // Executed at Stage 2 (See deduce_source_char<T> and deduce_target_char<T>)
+ template < class Char >
+ struct deduce_target_char_impl
+ {
+ typedef BOOST_DEDUCED_TYPENAME normalize_single_byte_char< Char >::type type;
+ };
+
+ template < class T >
+ struct deduce_target_char_impl< deduce_character_type_later<T> >
+ {
+ typedef boost::has_right_shift<std::basic_istream<char>, T > result_t;
+
+#if defined(BOOST_LCAST_NO_WCHAR_T)
+ BOOST_STATIC_ASSERT_MSG((result_t::value),
+ "Target type is not std::istream`able and std::wistream`s are not supported by your STL implementation");
+ typedef char type;
+#else
+ typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
+ result_t::value, char, wchar_t
+ >::type type;
+
+ BOOST_STATIC_ASSERT_MSG((result_t::value || boost::has_right_shift<std::basic_istream<wchar_t>, T >::value),
+ "Target type is neither std::istream`able nor std::wistream`able");
+#endif
+ };
+ }
- template<>
- struct stream_char<const char32_t *>
+ namespace detail // deduce_target_char<T> and deduce_source_char<T>
{
- typedef char32_t type;
- };
+ // We deduce stream character types in two stages.
+ //
+ // Stage 1 is common for Target and Source. At Stage 1 we get
+ // non normalized character type (may contain unsigned/signed char)
+ // or deduce_character_type_later<T> where T is the original type.
+ // Stage 1 is executed by stream_char_common<T>
+ //
+ // At Stage 2 we normalize character types or try to deduce character
+ // type using metafunctions.
+ // Stage 2 is executed by deduce_target_char_impl<T> and
+ // deduce_source_char_impl<T>
+ //
+ // deduce_target_char<T> and deduce_source_char<T> functions combine
+ // both stages
-#endif
+ template < class T >
+ struct deduce_target_char
+ {
+ typedef BOOST_DEDUCED_TYPENAME stream_char_common< T >::type stage1_type;
+ typedef BOOST_DEDUCED_TYPENAME deduce_target_char_impl< stage1_type >::type stage2_type;
- template<typename TargetChar, typename SourceChar>
- struct widest_char
+ typedef stage2_type type;
+ };
+
+ template < class T >
+ struct deduce_source_char
{
- typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
- (sizeof(TargetChar) > sizeof(SourceChar))
- , TargetChar
- , SourceChar >::type type;
+ typedef BOOST_DEDUCED_TYPENAME stream_char_common< T >::type stage1_type;
+ typedef BOOST_DEDUCED_TYPENAME deduce_source_char_impl< stage1_type >::type stage2_type;
+
+ typedef stage2_type type;
};
}
namespace detail // deduce_char_traits template
{
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- template<class CharT, class Target, class Source>
+ // We are attempting to get char_traits<> from Source or Tagret
+ // template parameter. Otherwise we'll be using std::char_traits<Char>
+ template < class Char, class Target, class Source >
struct deduce_char_traits
{
- typedef std::char_traits<CharT> type;
+ typedef std::char_traits< Char > type;
};
- template<class CharT, class Traits, class Alloc, class Source>
- struct deduce_char_traits< CharT
- , std::basic_string<CharT,Traits,Alloc>
+ template < class Char, class Traits, class Alloc, class Source >
+ struct deduce_char_traits< Char
+ , std::basic_string< Char, Traits, Alloc >
, Source
>
{
typedef Traits type;
};
- template<class CharT, class Target, class Traits, class Alloc>
- struct deduce_char_traits< CharT
+ template < class Char, class Target, class Traits, class Alloc >
+ struct deduce_char_traits< Char
, Target
- , std::basic_string<CharT,Traits,Alloc>
+ , std::basic_string< Char, Traits, Alloc >
>
{
typedef Traits type;
};
-#if !defined(__SUNPRO_CC)
- template<class CharT, class Traits, class Alloc, class Source>
- struct deduce_char_traits< CharT
- , ::boost::container::basic_string<CharT,Traits,Alloc>
+ template < class Char, class Traits, class Alloc, class Source >
+ struct deduce_char_traits< Char
+ , boost::container::basic_string< Char, Traits, Alloc >
, Source
>
{
typedef Traits type;
};
- template<class CharT, class Target, class Traits, class Alloc>
- struct deduce_char_traits< CharT
+ template < class Char, class Target, class Traits, class Alloc >
+ struct deduce_char_traits< Char
, Target
- , ::boost::container::basic_string<CharT,Traits,Alloc>
+ , boost::container::basic_string< Char, Traits, Alloc >
>
{
typedef Traits type;
};
- template<class CharT, class Traits, class Alloc1, class Alloc2>
- struct deduce_char_traits< CharT
- , std::basic_string<CharT,Traits,Alloc1>
- , std::basic_string<CharT,Traits,Alloc2>
+ template < class Char, class Traits, class Alloc1, class Alloc2 >
+ struct deduce_char_traits< Char
+ , std::basic_string< Char, Traits, Alloc1 >
+ , std::basic_string< Char, Traits, Alloc2 >
>
{
typedef Traits type;
};
- template<class CharT, class Traits, class Alloc1, class Alloc2>
- struct deduce_char_traits< CharT
- , ::boost::container::basic_string<CharT,Traits,Alloc1>
- , ::boost::container::basic_string<CharT,Traits,Alloc2>
+ template<class Char, class Traits, class Alloc1, class Alloc2>
+ struct deduce_char_traits< Char
+ , boost::container::basic_string< Char, Traits, Alloc1 >
+ , boost::container::basic_string< Char, Traits, Alloc2 >
>
{
typedef Traits type;
};
- template<class CharT, class Traits, class Alloc1, class Alloc2>
- struct deduce_char_traits< CharT
- , ::boost::container::basic_string<CharT,Traits,Alloc1>
- , std::basic_string<CharT,Traits,Alloc2>
+ template < class Char, class Traits, class Alloc1, class Alloc2 >
+ struct deduce_char_traits< Char
+ , boost::container::basic_string< Char, Traits, Alloc1 >
+ , std::basic_string< Char, Traits, Alloc2 >
>
{
typedef Traits type;
};
- template<class CharT, class Traits, class Alloc1, class Alloc2>
- struct deduce_char_traits< CharT
- , std::basic_string<CharT,Traits,Alloc1>
- , ::boost::container::basic_string<CharT,Traits,Alloc2>
+ template < class Char, class Traits, class Alloc1, class Alloc2 >
+ struct deduce_char_traits< Char
+ , std::basic_string< Char, Traits, Alloc1 >
+ , boost::container::basic_string< Char, Traits, Alloc2 >
>
{
typedef Traits type;
};
-#endif // !defined(__SUNPRO_CC)
-#endif
}
+ namespace detail // array_to_pointer_decay<T>
+ {
+ template<class T>
+ struct array_to_pointer_decay
+ {
+ typedef T type;
+ };
+
+ template<class T, std::size_t N>
+ struct array_to_pointer_decay<T[N]>
+ {
+ typedef const T * type;
+ };
+ }
+
+ namespace detail // is_this_float_conversion_optimized<Float, Char>
+ {
+ // this metafunction evaluates to true, if we have optimized comnversion
+ // from Float type to Char array.
+ // Must be in sync with lexical_stream_limited_src<Char, ...>::shl_real_type(...)
+ template <typename Float, typename Char>
+ struct is_this_float_conversion_optimized
+ {
+ typedef boost::type_traits::ice_and<
+ boost::is_float<Float>::value,
+#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__)
+ boost::type_traits::ice_or<
+ boost::type_traits::ice_eq<sizeof(Char), sizeof(char) >::value,
+ boost::is_same<Char, wchar_t>::value
+ >::value
+#else
+ boost::type_traits::ice_eq<sizeof(Char), sizeof(char) >::value
+#endif
+ > result_type;
+
+ BOOST_STATIC_CONSTANT(bool, value = (result_type::value) );
+ };
+ }
+
namespace detail // lcast_src_length
{
// Return max. length of string representation of Source;
BOOST_STATIC_ASSERT(sizeof(Source) * CHAR_BIT <= 256);
#endif
};
-// TODO: FIX for char16_t, char32_t, we can ignore CharT
+
#define BOOST_LCAST_DEF(T) \
template<> struct lcast_src_length<T> \
: lcast_src_length_integral<T> \
#endif // #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
}
+ namespace detail // lexical_cast_stream_traits<Source, Target>
+ {
+ template <class Source, class Target>
+ struct lexical_cast_stream_traits {
+ typedef BOOST_DEDUCED_TYPENAME boost::detail::array_to_pointer_decay<Source>::type src;
+ typedef BOOST_DEDUCED_TYPENAME boost::remove_cv<src>::type no_cv_src;
+
+ typedef boost::detail::deduce_source_char<no_cv_src> deduce_src_char_metafunc;
+ typedef BOOST_DEDUCED_TYPENAME deduce_src_char_metafunc::type src_char_t;
+ typedef BOOST_DEDUCED_TYPENAME boost::detail::deduce_target_char<Target>::type target_char_t;
+
+ typedef BOOST_DEDUCED_TYPENAME boost::detail::widest_char<
+ target_char_t, src_char_t
+ >::type char_type;
+
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+ BOOST_STATIC_ASSERT_MSG(( !boost::is_same<char16_t, src_char_t>::value
+ && !boost::is_same<char16_t, target_char_t>::value),
+ "Your compiler does not have full support for char16_t" );
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+ BOOST_STATIC_ASSERT_MSG(( !boost::is_same<char32_t, src_char_t>::value
+ && !boost::is_same<char32_t, target_char_t>::value),
+ "Your compiler does not have full support for char32_t" );
+#endif
+
+ typedef BOOST_DEDUCED_TYPENAME boost::detail::deduce_char_traits<
+ char_type, Target, no_cv_src
+ >::type traits;
+
+ typedef boost::type_traits::ice_and<
+ boost::is_same<char, src_char_t>::value, // source is not a wide character based type
+ boost::type_traits::ice_ne<sizeof(char), sizeof(target_char_t) >::value, // target type is based on wide character
+ boost::type_traits::ice_not<
+ boost::detail::is_char_or_wchar<no_cv_src>::value // single character widening is optimized
+ >::value // and does not requires stringbuffer
+ > is_string_widening_required_t;
+
+ typedef boost::type_traits::ice_not< boost::type_traits::ice_or<
+ boost::is_integral<no_cv_src>::value,
+ boost::detail::is_this_float_conversion_optimized<no_cv_src, char_type >::value,
+ boost::detail::is_char_or_wchar<
+ BOOST_DEDUCED_TYPENAME deduce_src_char_metafunc::stage1_type // if we did not get character type at stage1
+ >::value // then we have no optimization for that type
+ >::value > is_source_input_not_optimized_t;
+
+ // If we have an optimized conversion for
+ // Source, we do not need to construct stringbuf.
+ BOOST_STATIC_CONSTANT(bool, requires_stringbuf =
+ (boost::type_traits::ice_or<
+ is_string_widening_required_t::value, is_source_input_not_optimized_t::value
+ >::value)
+ );
+
+ typedef boost::detail::lcast_src_length<no_cv_src> len_t;
+ };
+ }
+
namespace detail // '0', '+' and '-' constants
{
- template<typename CharT> struct lcast_char_constants;
+ template < typename Char > struct lcast_char_constants;
template<>
struct lcast_char_constants<char>
};
#endif
-#ifndef BOOST_NO_CHAR16_T
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
template<>
struct lcast_char_constants<char16_t>
{
};
#endif
-#ifndef BOOST_NO_CHAR32_T
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
template<>
struct lcast_char_constants<char32_t>
{
namespace detail // lcast_to_unsigned
{
-#if (defined _MSC_VER)
-# pragma warning( push )
-// C4146: unary minus operator applied to unsigned type, result still unsigned
-# pragma warning( disable : 4146 )
-#elif defined( __BORLANDC__ )
-# pragma option push -w-8041
-#endif
template<class T>
inline
- BOOST_DEDUCED_TYPENAME make_unsigned<T>::type lcast_to_unsigned(T value)
+ BOOST_DEDUCED_TYPENAME make_unsigned<T>::type lcast_to_unsigned(T value) BOOST_NOEXCEPT
{
- typedef BOOST_DEDUCED_TYPENAME make_unsigned<T>::type result_type;
- result_type uvalue = static_cast<result_type>(value);
- return value < 0 ? -uvalue : uvalue;
+ typedef BOOST_DEDUCED_TYPENAME boost::make_unsigned<T>::type result_type;
+ return static_cast<result_type>(
+ value < 0 ? 0u - static_cast<result_type>(value) : value
+ );
}
-#if (defined _MSC_VER)
-# pragma warning( pop )
-#elif defined( __BORLANDC__ )
-# pragma option pop
-#endif
}
namespace detail // lcast_put_unsigned
namespace detail
{
+ template <class CharT>
+ bool lc_iequal(const CharT* val, const CharT* lcase, const CharT* ucase, unsigned int len) BOOST_NOEXCEPT {
+ for( unsigned int i=0; i < len; ++i ) {
+ if ( val[i] != lcase[i] && val[i] != ucase[i] ) return false;
+ }
+
+ return true;
+ }
+
/* Returns true and sets the correct value if found NaN or Inf. */
template <class CharT, class T>
inline bool parse_inf_nan_impl(const CharT* begin, const CharT* end, T& value
, const CharT* lc_NAN, const CharT* lc_nan
, const CharT* lc_INFINITY, const CharT* lc_infinity
- , const CharT opening_brace, const CharT closing_brace)
+ , const CharT opening_brace, const CharT closing_brace) BOOST_NOEXCEPT
{
using namespace std;
if (begin == end) return false;
else if( *begin == plus ) ++begin;
if( end-begin < 3 ) return false;
- if( !memcmp(begin, lc_nan, 3*sizeof(CharT)) || !memcmp(begin, lc_NAN, 3*sizeof(CharT)) )
+ if( lc_iequal(begin, lc_nan, lc_NAN, 3) )
{
begin += 3;
if (end != begin) /* It is 'nan(...)' or some bad input*/
if (( /* 'INF' or 'inf' */
end-begin==3
&&
- (!memcmp(begin, lc_infinity, 3*sizeof(CharT)) || !memcmp(begin, lc_INFINITY, 3*sizeof(CharT)))
+ lc_iequal(begin, lc_infinity, lc_INFINITY, 3)
)
||
( /* 'INFINITY' or 'infinity' */
end-begin==inifinity_size
&&
- (!memcmp(begin, lc_infinity, inifinity_size)|| !memcmp(begin, lc_INFINITY, inifinity_size))
+ lc_iequal(begin, lc_infinity, lc_INFINITY, inifinity_size)
)
)
{
return false;
}
+ template <class CharT, class T>
+ bool put_inf_nan_impl(CharT* begin, CharT*& end, const T& value
+ , const CharT* lc_nan
+ , const CharT* lc_infinity) BOOST_NOEXCEPT
+ {
+ using namespace std;
+ const CharT minus = lcast_char_constants<CharT>::minus;
+ if ( (boost::math::isnan)(value) )
+ {
+ if ( (boost::math::signbit)(value) )
+ {
+ *begin = minus;
+ ++ begin;
+ }
+
+ memcpy(begin, lc_nan, 3 * sizeof(CharT));
+ end = begin + 3;
+ return true;
+ } else if ( (boost::math::isinf)(value) )
+ {
+ if ( (boost::math::signbit)(value) )
+ {
+ *begin = minus;
+ ++ begin;
+ }
+
+ memcpy(begin, lc_infinity, 3 * sizeof(CharT));
+ end = begin + 3;
+ return true;
+ }
+
+ return false;
+ }
+
+
#ifndef BOOST_LCAST_NO_WCHAR_T
template <class T>
- bool parse_inf_nan(const wchar_t* begin, const wchar_t* end, T& value)
+ bool parse_inf_nan(const wchar_t* begin, const wchar_t* end, T& value) BOOST_NOEXCEPT
{
return parse_inf_nan_impl(begin, end, value
, L"NAN", L"nan"
, L"INFINITY", L"infinity"
, L'(', L')');
}
+
+ template <class T>
+ bool put_inf_nan(wchar_t* begin, wchar_t*& end, const T& value) BOOST_NOEXCEPT
+ {
+ return put_inf_nan_impl(begin, end, value, L"nan", L"infinity");
+ }
+
#endif
-#ifndef BOOST_NO_CHAR16_T
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
template <class T>
- bool parse_inf_nan(const char16_t* begin, const char16_t* end, T& value)
+ bool parse_inf_nan(const char16_t* begin, const char16_t* end, T& value) BOOST_NOEXCEPT
{
return parse_inf_nan_impl(begin, end, value
, u"NAN", u"nan"
, u"INFINITY", u"infinity"
, u'(', u')');
}
+
+ template <class T>
+ bool put_inf_nan(char16_t* begin, char16_t*& end, const T& value) BOOST_NOEXCEPT
+ {
+ return put_inf_nan_impl(begin, end, value, u"nan", u"infinity");
+ }
#endif
-#ifndef BOOST_NO_CHAR32_T
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
template <class T>
- bool parse_inf_nan(const char32_t* begin, const char32_t* end, T& value)
+ bool parse_inf_nan(const char32_t* begin, const char32_t* end, T& value) BOOST_NOEXCEPT
{
return parse_inf_nan_impl(begin, end, value
, U"NAN", U"nan"
, U"INFINITY", U"infinity"
, U'(', U')');
}
+
+ template <class T>
+ bool put_inf_nan(char32_t* begin, char32_t*& end, const T& value) BOOST_NOEXCEPT
+ {
+ return put_inf_nan_impl(begin, end, value, U"nan", U"infinity");
+ }
#endif
template <class CharT, class T>
- bool parse_inf_nan(const CharT* begin, const CharT* end, T& value)
+ bool parse_inf_nan(const CharT* begin, const CharT* end, T& value) BOOST_NOEXCEPT
{
return parse_inf_nan_impl(begin, end, value
, "NAN", "nan"
, "INFINITY", "infinity"
, '(', ')');
}
-#ifndef BOOST_LCAST_NO_WCHAR_T
- template <class T>
- bool put_inf_nan(wchar_t* begin, wchar_t*& end, const T& value)
- {
- using namespace std;
- if ( (boost::math::isnan)(value) )
- {
- if ( (boost::math::signbit)(value) )
- {
- memcpy(begin,L"-nan", sizeof(L"-nan"));
- end = begin + 4;
- } else
- {
- memcpy(begin,L"nan", sizeof(L"nan"));
- end = begin + 3;
- }
- return true;
- } else if ( (boost::math::isinf)(value) )
- {
- if ( (boost::math::signbit)(value) )
- {
- memcpy(begin,L"-inf", sizeof(L"-inf"));
- end = begin + 4;
- } else
- {
- memcpy(begin,L"inf", sizeof(L"inf"));
- end = begin + 3;
- }
- return true;
- }
- return false;
- }
-#endif
template <class CharT, class T>
- bool put_inf_nan(CharT* begin, CharT*& end, const T& value)
+ bool put_inf_nan(CharT* begin, CharT*& end, const T& value) BOOST_NOEXCEPT
{
- using namespace std;
- if ( (boost::math::isnan)(value) )
- {
- if ( (boost::math::signbit)(value) )
- {
- memcpy(begin,"-nan", sizeof("-nan"));
- end = begin + 4;
- } else
- {
- memcpy(begin,"nan", sizeof("nan"));
- end = begin + 3;
- }
- return true;
- } else if ( (boost::math::isinf)(value) )
- {
- if ( (boost::math::signbit)(value) )
- {
- memcpy(begin,"-inf", sizeof("-inf"));
- end = begin + 4;
- } else
- {
- memcpy(begin,"inf", sizeof("inf"));
- end = begin + 3;
- }
- return true;
- }
-
- return false;
+ return put_inf_nan_impl(begin, end, value, "nan", "infinity");
}
-
}
CharT const capital_e = lcast_char_constants<CharT>::capital_e;
CharT const lowercase_e = lcast_char_constants<CharT>::lowercase_e;
- value = 0.0;
+ value = static_cast<T>(0);
if (parse_inf_nan(begin, end, value)) return true;
/* Getting the plus/minus sign */
bool has_minus = false;
- if ( *begin == minus ) {
+ if (Traits::eq(*begin, minus) ) {
++ begin;
has_minus = true;
if (begin == end) return false;
- } else if ( *begin == plus ) {
+ } else if (Traits::eq(*begin, plus) ) {
++begin;
if (begin == end) return false;
}
/* We allow no thousand_separators after decimal point */
mantissa_type tmp_mantissa = mantissa * 10u;
- if ( *begin == lowercase_e || *begin == capital_e ) break;
+ if (Traits::eq(*begin, lowercase_e) || Traits::eq(*begin, capital_e)) break;
if ( *begin < czero || *begin >= czero + 10 ) return false;
if ( is_mantissa_full
|| tmp_mantissa / 10u != mantissa
found_number_before_exp = true;
++ length_since_last_delim;
- } else if ( *begin == decimal_point || *begin == lowercase_e || *begin == capital_e) {
+ } else if (Traits::eq(*begin, decimal_point) || Traits::eq(*begin, lowercase_e) || Traits::eq(*begin, capital_e)) {
#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
/* If ( we need to check grouping
* and ( grouping missmatches
) return false;
#endif
- if(*begin == decimal_point){
+ if(Traits::eq(*begin, decimal_point)) {
++ begin;
found_decimal = true;
+ if (!found_number_before_exp && begin==end) return false;
continue;
}else {
if (!found_number_before_exp) return false;
}
}
#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
- else if (grouping_size && *begin == thousands_sep){
+ else if (grouping_size && Traits::eq(*begin, thousands_sep)){
if(found_grouping)
{
/* It is not he first time, when we find thousands separator,
}
// Exponent found
- if ( begin != end && ( *begin == lowercase_e || *begin == capital_e ) ) {
+ if ( begin != end && (Traits::eq(*begin, lowercase_e) || Traits::eq(*begin, capital_e)) ) {
++ begin;
if ( begin == end ) return false;
bool exp_has_minus = false;
- if( *begin == minus ) {
+ if(Traits::eq(*begin, minus)) {
exp_has_minus = true;
++ begin;
if ( begin == end ) return false;
- } else if (*begin == plus ) {
+ } else if (Traits::eq(*begin, plus)) {
++ begin;
if ( begin == end ) return false;
}
namespace detail
{
- struct do_not_construct_stringbuffer_t{};
+ struct do_not_construct_out_stream_t{};
}
namespace detail // optimized stream wrapper
>
class lexical_stream_limited_src
{
- typedef stl_buf_unlocker<std::basic_streambuf<CharT, Traits>, CharT > local_streambuffer_t;
#if defined(BOOST_NO_STRINGSTREAM)
- typedef stl_buf_unlocker<std::strstream, CharT > local_stringbuffer_t;
+ typedef std::ostrstream out_stream_t;
+ typedef stl_buf_unlocker<std::strstreambuf, char> unlocked_but_t;
#elif defined(BOOST_NO_STD_LOCALE)
- typedef stl_buf_unlocker<std::stringstream, CharT > local_stringbuffer_t;
+ typedef std::ostringstream out_stream_t;
+ typedef stl_buf_unlocker<std::stringbuf, char> unlocked_but_t;
#else
- typedef stl_buf_unlocker<std::basic_stringbuf<CharT, Traits>, CharT > local_stringbuffer_t;
+ typedef std::basic_ostringstream<CharT, Traits> out_stream_t;
+ typedef stl_buf_unlocker<std::basic_stringbuf<CharT, Traits>, CharT> unlocked_but_t;
#endif
- typedef BOOST_DEDUCED_TYPENAME ::boost::mpl::if_c<
+ typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
RequiresStringbuffer,
- local_stringbuffer_t,
- do_not_construct_stringbuffer_t
- >::type deduced_stringbuffer_t;
+ out_stream_t,
+ do_not_construct_out_stream_t
+ >::type deduced_out_stream_t;
// A string representation of Source is written to [start, finish).
CharT* start;
CharT* finish;
- deduced_stringbuffer_t stringbuffer;
+ deduced_out_stream_t out_stream;
public:
lexical_stream_limited_src(CharT* sta, CharT* fin)
void operator=(lexical_stream_limited_src const&);
/************************************ HELPER FUNCTIONS FOR OPERATORS << ( ... ) ********************************/
- bool shl_char(CharT ch)
+ bool shl_char(CharT ch) BOOST_NOEXCEPT
{
Traits::assign(*start, ch);
finish = start + 1;
bool shl_char(T ch)
{
BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)) ,
- "boost::lexical_cast does not support conversions from whar_t to char types."
+ "boost::lexical_cast does not support narrowing of char types."
"Use boost::locale instead" );
#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
std::locale loc;
- wchar_t w = BOOST_USE_FACET(std::ctype<wchar_t>, loc).widen(ch);
+ CharT const w = BOOST_USE_FACET(std::ctype<CharT>, loc).widen(ch);
#else
- wchar_t w = ch;
+ CharT const w = static_cast<CharT>(ch);
#endif
Traits::assign(*start, w);
finish = start + 1;
}
#endif
- bool shl_char_array(CharT const* str)
+ bool shl_char_array(CharT const* str) BOOST_NOEXCEPT
{
start = const_cast<CharT*>(str);
finish = start + Traits::length(str);
return true;
}
-#ifndef BOOST_LCAST_NO_WCHAR_T
template <class T>
bool shl_char_array(T const* str)
{
BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)),
- "boost::lexical_cast does not support conversions from wchar_t to char types."
+ "boost::lexical_cast does not support narrowing of char types."
"Use boost::locale instead" );
return shl_input_streamable(str);
}
-#endif
+
+ bool shl_char_array_limited(CharT const* str, std::size_t max_size) BOOST_NOEXCEPT
+ {
+ start = const_cast<CharT*>(str);
+ finish = std::find(start, start + max_size, Traits::to_char_type(0));
+ return true;
+ }
template<typename InputStreamable>
bool shl_input_streamable(InputStreamable& input)
{
- std::basic_ostream<CharT> stream(&stringbuffer);
- bool const result = !(stream << input).fail();
- start = stringbuffer.pbase();
- finish = stringbuffer.pptr();
+#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE)
+ // If you have compilation error at this point, than your STL library
+ // does not support such conversions. Try updating it.
+ BOOST_STATIC_ASSERT((boost::is_same<char, CharT>::value));
+#endif
+ bool const result = !(out_stream << input).fail();
+ const unlocked_but_t* const p
+ = static_cast<unlocked_but_t*>(out_stream.rdbuf()) ;
+ start = p->pbase();
+ finish = p->pptr();
return result;
}
return true;
}
-#if (defined _MSC_VER)
-# pragma warning( push )
-// C4996: This function or variable may be unsafe. Consider using sprintf_s instead
-# pragma warning( disable : 4996 )
-#endif
+ template <class T, class SomeCharT>
+ bool shl_real_type(const T& val, SomeCharT* begin, SomeCharT*& end)
+ {
+ if (put_inf_nan(begin, end, val)) return true;
+ lcast_set_precision(out_stream, &val);
+ return shl_input_streamable(val);
+ }
- template <class T>
- bool shl_float(float val,T* out)
+ static bool shl_real_type(float val, char* begin, char*& end)
{ using namespace std;
- if (put_inf_nan(start,finish,val)) return true;
- finish = start + sprintf(out,"%.*g", static_cast<int>(boost::detail::lcast_get_precision<float >()), val );
- return finish > start;
+ if (put_inf_nan(begin, end, val)) return true;
+ const double val_as_double = val;
+ end = begin +
+#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+ sprintf_s(begin, end-begin,
+#else
+ sprintf(begin,
+#endif
+ "%.*g", static_cast<int>(boost::detail::lcast_get_precision<float>()), val_as_double);
+ return end > begin;
}
- template <class T>
- bool shl_double(double val,T* out)
+ static bool shl_real_type(double val, char* begin, char*& end)
{ using namespace std;
- if (put_inf_nan(start,finish,val)) return true;
- finish = start + sprintf(out,"%.*lg", static_cast<int>(boost::detail::lcast_get_precision<double >()), val );
- return finish > start;
+ if (put_inf_nan(begin, end, val)) return true;
+ end = begin +
+#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+ sprintf_s(begin, end-begin,
+#else
+ sprintf(begin,
+#endif
+ "%.*g", static_cast<int>(boost::detail::lcast_get_precision<double>()), val);
+ return end > begin;
}
+
#ifndef __MINGW32__
- template <class T>
- bool shl_long_double(long double val,T* out)
+ static bool shl_real_type(long double val, char* begin, char*& end)
{ using namespace std;
- if (put_inf_nan(start,finish,val)) return true;
- finish = start + sprintf(out,"%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double >()), val );
- return finish > start;
- }
+ if (put_inf_nan(begin, end, val)) return true;
+ end = begin +
+#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+ sprintf_s(begin, end-begin,
+#else
+ sprintf(begin,
#endif
-
-#if (defined _MSC_VER)
-# pragma warning( pop )
+ "%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double>()), val );
+ return end > begin;
+ }
#endif
-#ifndef BOOST_LCAST_NO_WCHAR_T
- bool shl_float(float val,wchar_t* out)
+#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__)
+ static bool shl_real_type(float val, wchar_t* begin, wchar_t*& end)
{ using namespace std;
- if (put_inf_nan(start,finish,val)) return true;
- finish = start + swprintf(out,
-#if !defined(__MINGW32__) && !defined(UNDER_CE)
- finish-start,
-#endif
- L"%.*g", static_cast<int>(boost::detail::lcast_get_precision<float >()), val );
-
- return finish > start;
+ if (put_inf_nan(begin, end, val)) return true;
+ const double val_as_double = val;
+ end = begin + swprintf(begin, end-begin,
+ L"%.*g",
+ static_cast<int>(boost::detail::lcast_get_precision<float >()),
+ val_as_double );
+ return end > begin;
}
-
- bool shl_double(double val,wchar_t* out)
+ static bool shl_real_type(double val, wchar_t* begin, wchar_t*& end)
{ using namespace std;
- if (put_inf_nan(start,finish,val)) return true;
- /* __MINGW32__ is defined for both mingw.org and for mingw-w64.
- * For mingw-w64, __MINGW64__ is defined, too, when targetting
- * 64 bits.
- *
- * swprintf realization in MinGW and under WinCE does not conform
- * to the ISO C
- * Standard.
- */
- finish = start + swprintf(out,
-#if !defined(__MINGW32__) && !defined(UNDER_CE)
- finish-start,
-#endif
- L"%.*lg", static_cast<int>(boost::detail::lcast_get_precision<double >()), val );
- return finish > start;
+ if (put_inf_nan(begin, end, val)) return true;
+ end = begin + swprintf(begin, end-begin,
+ L"%.*g", static_cast<int>(boost::detail::lcast_get_precision<double >()), val );
+ return end > begin;
}
-#ifndef __MINGW32__
- bool shl_long_double(long double val,wchar_t* out)
+ static bool shl_real_type(long double val, wchar_t* begin, wchar_t*& end)
{ using namespace std;
- if (put_inf_nan(start,finish,val)) return true;
- finish = start + swprintf(out,
-#if !defined(UNDER_CE)
- finish-start,
-#endif
+ if (put_inf_nan(begin, end, val)) return true;
+ end = begin + swprintf(begin, end-begin,
L"%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double >()), val );
- return finish > start;
+ return end > begin;
}
#endif
-#endif
-
/************************************ OPERATORS << ( ... ) ********************************/
public:
template<class Alloc>
- bool operator<<(std::basic_string<CharT,Traits,Alloc> const& str)
+ bool operator<<(std::basic_string<CharT,Traits,Alloc> const& str) BOOST_NOEXCEPT
{
start = const_cast<CharT*>(str.data());
finish = start + str.length();
return true;
}
-#if !defined(__SUNPRO_CC)
template<class Alloc>
- bool operator<<(::boost::container::basic_string<CharT,Traits,Alloc> const& str)
+ bool operator<<(boost::container::basic_string<CharT,Traits,Alloc> const& str) BOOST_NOEXCEPT
{
start = const_cast<CharT*>(str.data());
finish = start + str.length();
return true;
}
-#endif // !defined(__SUNPRO_CC)
- bool operator<<(bool value)
+
+ bool operator<<(bool value) BOOST_NOEXCEPT
{
CharT const czero = lcast_char_constants<CharT>::zero;
Traits::assign(*start, Traits::to_char_type(czero + value));
return true;
}
+ bool operator<<(const iterator_range<CharT*>& rng) BOOST_NOEXCEPT
+ {
+ start = rng.begin();
+ finish = rng.end();
+ return true;
+ }
+
+ bool operator<<(const iterator_range<const CharT*>& rng) BOOST_NOEXCEPT
+ {
+ start = const_cast<CharT*>(rng.begin());
+ finish = const_cast<CharT*>(rng.end());
+ return true;
+ }
+
+ bool operator<<(const iterator_range<const signed char*>& rng) BOOST_NOEXCEPT
+ {
+ return (*this) << iterator_range<char*>(
+ const_cast<char*>(reinterpret_cast<const char*>(rng.begin())),
+ const_cast<char*>(reinterpret_cast<const char*>(rng.end()))
+ );
+ }
+
+ bool operator<<(const iterator_range<const unsigned char*>& rng) BOOST_NOEXCEPT
+ {
+ return (*this) << iterator_range<char*>(
+ const_cast<char*>(reinterpret_cast<const char*>(rng.begin())),
+ const_cast<char*>(reinterpret_cast<const char*>(rng.end()))
+ );
+ }
+
+ bool operator<<(const iterator_range<signed char*>& rng) BOOST_NOEXCEPT
+ {
+ return (*this) << iterator_range<char*>(
+ reinterpret_cast<char*>(rng.begin()),
+ reinterpret_cast<char*>(rng.end())
+ );
+ }
+
+ bool operator<<(const iterator_range<unsigned char*>& rng) BOOST_NOEXCEPT
+ {
+ return (*this) << iterator_range<char*>(
+ reinterpret_cast<char*>(rng.begin()),
+ reinterpret_cast<char*>(rng.end())
+ );
+ }
+
bool operator<<(char ch) { return shl_char(ch); }
bool operator<<(unsigned char ch) { return ((*this) << static_cast<char>(ch)); }
bool operator<<(signed char ch) { return ((*this) << static_cast<char>(ch)); }
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
bool operator<<(wchar_t ch) { return shl_char(ch); }
#endif
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+ bool operator<<(char16_t ch) { return shl_char(ch); }
+ bool operator<<(char16_t * str) { return shl_char_array(str); }
+ bool operator<<(char16_t const * str) { return shl_char_array(str); }
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+ bool operator<<(char32_t ch) { return shl_char(ch); }
+ bool operator<<(char32_t * str) { return shl_char_array(str); }
+ bool operator<<(char32_t const * str) { return shl_char_array(str); }
#endif
bool operator<<(unsigned char const* ch) { return ((*this) << reinterpret_cast<char const*>(ch)); }
bool operator<<(unsigned char * ch) { return ((*this) << reinterpret_cast<char *>(ch)); }
bool operator<<(unsigned __int64 n) { start = lcast_put_unsigned<Traits>(n, finish); return true; }
bool operator<<( __int64 n) { return shl_signed(n); }
#endif
- bool operator<<(float val) { return shl_float(val,start); }
- bool operator<<(double val) { return shl_double(val,start); }
+ bool operator<<(float val) { return shl_real_type(val, start, finish); }
+ bool operator<<(double val) { return shl_real_type(val, start, finish); }
bool operator<<(long double val) {
#ifndef __MINGW32__
- return shl_long_double(val,start);
+ return shl_real_type(val, start, finish);
#else
- return shl_double(val,start);
+ return shl_real_type(static_cast<double>(val), start, finish);
#endif
}
+
+ template <std::size_t N>
+ bool operator<<(boost::array<CharT, N> const& input) BOOST_NOEXCEPT
+ { return shl_char_array_limited(input.begin(), N); }
+
+ template <std::size_t N>
+ bool operator<<(boost::array<unsigned char, N> const& input) BOOST_NOEXCEPT
+ { return ((*this) << reinterpret_cast<boost::array<char, N> const& >(input)); }
+
+ template <std::size_t N>
+ bool operator<<(boost::array<signed char, N> const& input) BOOST_NOEXCEPT
+ { return ((*this) << reinterpret_cast<boost::array<char, N> const& >(input)); }
+
+ template <std::size_t N>
+ bool operator<<(boost::array<const CharT, N> const& input) BOOST_NOEXCEPT
+ { return shl_char_array_limited(input.begin(), N); }
+
+ template <std::size_t N>
+ bool operator<<(boost::array<const unsigned char, N> const& input) BOOST_NOEXCEPT
+ { return ((*this) << reinterpret_cast<boost::array<const char, N> const& >(input)); }
+
+ template <std::size_t N>
+ bool operator<<(boost::array<const signed char, N> const& input) BOOST_NOEXCEPT
+ { return ((*this) << reinterpret_cast<boost::array<const char, N> const& >(input)); }
+
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+ template <std::size_t N>
+ bool operator<<(std::array<CharT, N> const& input) BOOST_NOEXCEPT
+ {
+ if (input.size()) return shl_char_array_limited(&input[0], N);
+ else return true;
+ }
+
+ template <std::size_t N>
+ bool operator<<(std::array<unsigned char, N> const& input) BOOST_NOEXCEPT
+ { return ((*this) << reinterpret_cast<boost::array<char, N> const& >(input)); }
+
+ template <std::size_t N>
+ bool operator<<(std::array<signed char, N> const& input) BOOST_NOEXCEPT
+ { return ((*this) << reinterpret_cast<boost::array<char, N> const& >(input)); }
+
+ template <std::size_t N>
+ bool operator<<(std::array<const CharT, N> const& input) BOOST_NOEXCEPT
+ {
+ if (input.size()) return shl_char_array_limited(&input[0], N);
+ else return true;
+ }
- template<class InStreamable>
+ template <std::size_t N>
+ bool operator<<(std::array<const unsigned char, N> const& input) BOOST_NOEXCEPT
+ { return ((*this) << reinterpret_cast<boost::array<const char, N> const& >(input)); }
+
+ template <std::size_t N>
+ bool operator<<(std::array<const signed char, N> const& input) BOOST_NOEXCEPT
+ { return ((*this) << reinterpret_cast<boost::array<const char, N> const& >(input)); }
+#endif
+
+ template <class InStreamable>
bool operator<<(const InStreamable& input) { return shl_input_streamable(input); }
/************************************ HELPER FUNCTIONS FOR OPERATORS >> ( ... ) ********************************/
}
bool const succeed = lcast_ret_unsigned<Traits>(output, start, finish);
-#if (defined _MSC_VER)
-# pragma warning( push )
-// C4146: unary minus operator applied to unsigned type, result still unsigned
-# pragma warning( disable : 4146 )
-#elif defined( __BORLANDC__ )
-# pragma option push -w-8041
-#endif
- if (has_minus) output = static_cast<Type>(-output);
-#if (defined _MSC_VER)
-# pragma warning( pop )
-#elif defined( __BORLANDC__ )
-# pragma option pop
-#endif
+
+ if (has_minus) {
+ output = static_cast<Type>(0u - output);
+ }
+
return succeed;
}
bool succeed = lcast_ret_unsigned<Traits>(out_tmp, start, finish);
if (has_minus) {
-#if (defined _MSC_VER)
-# pragma warning( push )
-// C4146: unary minus operator applied to unsigned type, result still unsigned
-# pragma warning( disable : 4146 )
-#elif defined( __BORLANDC__ )
-# pragma option push -w-8041
-#endif
- utype const comp_val = static_cast<utype>(-(std::numeric_limits<Type>::min)());
+ utype const comp_val = (static_cast<utype>(1) << std::numeric_limits<Type>::digits);
succeed = succeed && out_tmp<=comp_val;
- output = -out_tmp;
-#if (defined _MSC_VER)
-# pragma warning( pop )
-#elif defined( __BORLANDC__ )
-# pragma option pop
-#endif
+ output = static_cast<Type>(0u - out_tmp);
} else {
utype const comp_val = static_cast<utype>((std::numeric_limits<Type>::max)());
succeed = succeed && out_tmp<=comp_val;
if(is_pointer<InputStreamable>::value)
return false;
- local_streambuffer_t bb;
- bb.setg(start, start, finish);
- std::basic_istream<CharT> stream(&bb);
+#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE)
+ // If you have compilation error at this point, than your STL library
+ // unsupports such conversions. Try updating it.
+ BOOST_STATIC_ASSERT((boost::is_same<char, CharT>::value));
+#endif
+
+#if defined(BOOST_NO_STRINGSTREAM)
+ std::istrstream stream(start, finish - start);
+#elif defined(BOOST_NO_STD_LOCALE)
+ std::istringstream stream;
+#else
+ std::basic_istringstream<CharT, Traits> stream;
+#endif
+ static_cast<unlocked_but_t*>(stream.rdbuf())
+ ->setg(start, start, finish);
+
stream.unsetf(std::ios::skipws);
lcast_set_precision(stream, static_cast<InputStreamable*>(0));
#if (defined _MSC_VER)
inline bool shr_xchar(T& output)
{
BOOST_STATIC_ASSERT_MSG(( sizeof(CharT) == sizeof(T) ),
- "boost::lexical_cast does not support conversions from whar_t to char types."
+ "boost::lexical_cast does not support narrowing of character types."
"Use boost::locale instead" );
bool const ok = (finish - start == 1);
- if(ok) {
+ if (ok) {
CharT out;
Traits::assign(out, *start);
output = static_cast<T>(out);
#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
bool operator>>(wchar_t& output) { return shr_xchar(output); }
#endif
-#ifndef BOOST_NO_CHAR16_T
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
bool operator>>(char16_t& output) { return shr_xchar(output); }
#endif
-#ifndef BOOST_NO_CHAR32_T
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
bool operator>>(char32_t& output) { return shr_xchar(output); }
#endif
-#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- bool operator>>(std::string& str) { str.assign(start, finish); return true; }
-# ifndef BOOST_LCAST_NO_WCHAR_T
- bool operator>>(std::wstring& str) { str.assign(start, finish); return true; }
-# endif
-#else
template<class Alloc>
bool operator>>(std::basic_string<CharT,Traits,Alloc>& str) { str.assign(start, finish); return true; }
-#if !defined(__SUNPRO_CC)
+
template<class Alloc>
- bool operator>>(::boost::container::basic_string<CharT,Traits,Alloc>& str) { str.assign(start, finish); return true; }
-#endif // !defined(__SUNPRO_CC)
+ bool operator>>(boost::container::basic_string<CharT,Traits,Alloc>& str) { str.assign(start, finish); return true; }
+
+
+ private:
+ template <std::size_t N, class ArrayT>
+ bool shr_std_array(ArrayT& output) BOOST_NOEXCEPT
+ {
+ using namespace std;
+ const std::size_t size = finish - start;
+ if (size > N - 1) { // `-1` because we need to store \0 at the end
+ return false;
+ }
+
+ memcpy(&output[0], start, size * sizeof(CharT));
+ output[size] = Traits::to_char_type(0);
+ return true;
+ }
+
+ public:
+
+ template <std::size_t N>
+ bool operator>>(boost::array<CharT, N>& output) BOOST_NOEXCEPT
+ {
+ return shr_std_array<N>(output);
+ }
+
+ template <std::size_t N>
+ bool operator>>(boost::array<unsigned char, N>& output)
+ {
+ return ((*this) >> reinterpret_cast<boost::array<char, N>& >(output));
+ }
+
+ template <std::size_t N>
+ bool operator>>(boost::array<signed char, N>& output)
+ {
+ return ((*this) >> reinterpret_cast<boost::array<char, N>& >(output));
+ }
+
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+ template <std::size_t N>
+ bool operator>>(std::array<CharT, N>& output) BOOST_NOEXCEPT
+ {
+ return shr_std_array<N>(output);
+ }
+
+ template <std::size_t N>
+ bool operator>>(std::array<unsigned char, N>& output)
+ {
+ return ((*this) >> reinterpret_cast<std::array<char, N>& >(output));
+ }
+
+ template <std::size_t N>
+ bool operator>>(std::array<signed char, N>& output)
+ {
+ return ((*this) >> reinterpret_cast<std::array<char, N>& >(output));
+ }
#endif
+
+
/*
* case "-0" || "0" || "+0" : output = false; return true;
* case "1" || "+1": output = true; return true;
* default: return false;
*/
- bool operator>>(bool& output)
+ bool operator>>(bool& output) BOOST_NOEXCEPT
{
CharT const zero = lcast_char_constants<CharT>::zero;
CharT const plus = lcast_char_constants<CharT>::plus;
CharT const lowercase_e = lcast_char_constants<CharT>::lowercase_e;
if ( return_value &&
(
- *(finish-1) == lowercase_e // 1.0e
- || *(finish-1) == capital_e // 1.0E
- || *(finish-1) == minus // 1.0e- or 1.0E-
- || *(finish-1) == plus // 1.0e+ or 1.0E+
+ Traits::eq(*(finish-1), lowercase_e) // 1.0e
+ || Traits::eq(*(finish-1), capital_e) // 1.0E
+ || Traits::eq(*(finish-1), minus) // 1.0e- or 1.0E-
+ || Traits::eq(*(finish-1), plus) // 1.0e+ or 1.0E+
)
) return false;
* */
boost::mpl::if_c<
#if defined(BOOST_HAS_LONG_LONG) || defined(BOOST_HAS_MS_INT64)
- ::boost::type_traits::ice_eq< sizeof(double), sizeof(long double) >::value,
+ boost::type_traits::ice_eq< sizeof(double), sizeof(long double) >::value,
#else
0
#endif
};
}
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
- // call-by-const reference version
-
namespace detail
{
- template<class T>
- struct array_to_pointer_decay
- {
- typedef T type;
- };
-
- template<class T, std::size_t N>
- struct array_to_pointer_decay<T[N]>
- {
- typedef const T * type;
- };
-
template<typename T>
struct is_stdstring
{
{
BOOST_STATIC_CONSTANT(bool, value = true );
};
-#if !defined(__SUNPRO_CC)
+
template<typename CharT, typename Traits, typename Alloc>
- struct is_stdstring< ::boost::container::basic_string<CharT, Traits, Alloc> >
+ struct is_stdstring< boost::container::basic_string<CharT, Traits, Alloc> >
{
BOOST_STATIC_CONSTANT(bool, value = true );
};
-#endif // !defined(__SUNPRO_CC)
- template<typename T>
- struct is_char_or_wchar
- {
- private:
-#ifndef BOOST_LCAST_NO_WCHAR_T
- typedef wchar_t wchar_t_if_supported;
-#else
- typedef char wchar_t_if_supported;
-#endif
-
-#ifndef BOOST_NO_CHAR16_T
- typedef char16_t char16_t_if_supported;
-#else
- typedef char char16_t_if_supported;
-#endif
-
-#ifndef BOOST_NO_CHAR32_T
- typedef char32_t char32_t_if_supported;
-#else
- typedef char char32_t_if_supported;
-#endif
- public:
-
- BOOST_STATIC_CONSTANT(bool, value =
- (
- ::boost::type_traits::ice_or<
- is_same< T, char >::value,
- is_same< T, wchar_t_if_supported >::value,
- is_same< T, char16_t_if_supported >::value,
- is_same< T, char32_t_if_supported >::value,
- is_same< T, unsigned char >::value,
- is_same< T, signed char >::value
- >::value
- )
- );
- };
template<typename Target, typename Source>
struct is_arithmetic_and_not_xchars
{
BOOST_STATIC_CONSTANT(bool, value =
(
- ::boost::type_traits::ice_and<
- is_arithmetic<Source>::value,
- is_arithmetic<Target>::value,
- ::boost::type_traits::ice_not<
+ boost::type_traits::ice_and<
+ boost::is_arithmetic<Source>::value,
+ boost::is_arithmetic<Target>::value,
+ boost::type_traits::ice_not<
detail::is_char_or_wchar<Target>::value
>::value,
- ::boost::type_traits::ice_not<
+ boost::type_traits::ice_not<
detail::is_char_or_wchar<Source>::value
>::value
>::value
{
BOOST_STATIC_CONSTANT(bool, value =
(
- ::boost::type_traits::ice_or<
- ::boost::type_traits::ice_and<
+ boost::type_traits::ice_or<
+ boost::type_traits::ice_and<
is_same<Source,Target>::value,
is_char_or_wchar<Target>::value
>::value,
- ::boost::type_traits::ice_and<
- ::boost::type_traits::ice_eq< sizeof(char),sizeof(Target)>::value,
- ::boost::type_traits::ice_eq< sizeof(char),sizeof(Source)>::value,
+ boost::type_traits::ice_and<
+ boost::type_traits::ice_eq< sizeof(char),sizeof(Target)>::value,
+ boost::type_traits::ice_eq< sizeof(char),sizeof(Source)>::value,
is_char_or_wchar<Target>::value,
is_char_or_wchar<Source>::value
>::value
{
BOOST_STATIC_CONSTANT(bool, value = true );
};
-#if !defined(__SUNPRO_CC)
+
template<typename CharT, typename Traits, typename Alloc>
- struct is_char_array_to_stdstring< ::boost::container::basic_string<CharT, Traits, Alloc>, CharT* >
+ struct is_char_array_to_stdstring< boost::container::basic_string<CharT, Traits, Alloc>, CharT* >
{
BOOST_STATIC_CONSTANT(bool, value = true );
};
template<typename CharT, typename Traits, typename Alloc>
- struct is_char_array_to_stdstring< ::boost::container::basic_string<CharT, Traits, Alloc>, const CharT* >
+ struct is_char_array_to_stdstring< boost::container::basic_string<CharT, Traits, Alloc>, const CharT* >
{
BOOST_STATIC_CONSTANT(bool, value = true );
};
-#endif // !defined(__SUNPRO_CC)
#if (defined _MSC_VER)
# pragma warning( push )
{
static inline Target lexical_cast_impl(const Source& arg)
{
- typedef BOOST_DEDUCED_TYPENAME detail::array_to_pointer_decay<Source>::type src;
-
- typedef BOOST_DEDUCED_TYPENAME detail::widest_char<
- BOOST_DEDUCED_TYPENAME detail::stream_char<Target>::type
- , BOOST_DEDUCED_TYPENAME detail::stream_char<src>::type
- >::type char_type;
-
- typedef detail::lcast_src_length<src> lcast_src_length;
- std::size_t const src_len = lcast_src_length::value;
- char_type buf[src_len + 1];
- lcast_src_length::check_coverage();
-
- typedef BOOST_DEDUCED_TYPENAME
- deduce_char_traits<char_type,Target,Source>::type traits;
-
- typedef BOOST_DEDUCED_TYPENAME remove_pointer<src >::type removed_ptr_t;
-
- // is_char_types_match variable value can be computed via
- // sizeof(char_type) == sizeof(removed_ptr_t). But when
- // removed_ptr_t is an incomplete type or void*, compilers
- // produce warnings or errors.
- const bool is_char_types_match =
- (::boost::type_traits::ice_or<
- ::boost::type_traits::ice_and<
- ::boost::type_traits::ice_eq<sizeof(char_type), sizeof(char) >::value,
- ::boost::type_traits::ice_or<
- ::boost::is_same<char, removed_ptr_t>::value,
- ::boost::is_same<unsigned char, removed_ptr_t>::value,
- ::boost::is_same<signed char, removed_ptr_t>::value
- >::value
- >::value,
- is_same<char_type, removed_ptr_t>::value
- >::value);
-
- const bool requires_stringbuf =
- !(
- ::boost::type_traits::ice_or<
- is_stdstring<src >::value,
- is_arithmetic<src >::value,
- ::boost::type_traits::ice_and<
- is_pointer<src >::value,
- is_char_or_wchar<removed_ptr_t >::value,
- is_char_types_match
- >::value
- >::value
- );
-
- detail::lexical_stream_limited_src<char_type,traits, requires_stringbuf >
- interpreter(buf, buf + src_len);
-
- Target result;
+ typedef lexical_cast_stream_traits<Source, Target> stream_trait;
+
+ typedef detail::lexical_stream_limited_src<
+ BOOST_DEDUCED_TYPENAME stream_trait::char_type,
+ BOOST_DEDUCED_TYPENAME stream_trait::traits,
+ stream_trait::requires_stringbuf
+ > interpreter_type;
+
+ // Target type must be default constructible
+ Target result;
+
+ BOOST_DEDUCED_TYPENAME stream_trait::char_type buf[stream_trait::len_t::value + 1];
+ stream_trait::len_t::check_coverage();
+
+ interpreter_type interpreter(buf, buf + stream_trait::len_t::value + 1);
+
// Disabling ADL, by directly specifying operators.
if(!(interpreter.operator <<(arg) && interpreter.operator >>(result)))
BOOST_LCAST_THROW_BAD_CAST(Source, Target);
+
return result;
}
};
# pragma warning( pop )
#endif
- template<typename Source>
+ template <typename Source>
struct lexical_cast_copy
{
- static inline Source lexical_cast_impl(const Source &arg)
+ static inline const Source& lexical_cast_impl(const Source &arg) BOOST_NOEXCEPT
{
return arg;
}
};
- class precision_loss_error : public boost::numeric::bad_numeric_cast
+ template <class Source, class Target >
+ struct detect_precision_loss
{
- public:
- virtual const char * what() const throw()
- { return "bad numeric conversion: precision loss error"; }
- };
-
- template<class S >
- struct throw_on_precision_loss
- {
- typedef boost::numeric::Trunc<S> Rounder;
- typedef S source_type ;
+ typedef boost::numeric::Trunc<Source> Rounder;
+ typedef Source source_type ;
- typedef typename mpl::if_< is_arithmetic<S>,S,S const&>::type argument_type ;
+ typedef BOOST_DEDUCED_TYPENAME mpl::if_<
+ boost::is_arithmetic<Source>, Source, Source const&
+ >::type argument_type ;
static source_type nearbyint ( argument_type s )
{
- source_type orig_div_round = s / Rounder::nearbyint(s);
+ const source_type near_int = Rounder::nearbyint(s);
+ if (near_int) {
+ const source_type orig_div_round = s / near_int;
+ const source_type eps = std::numeric_limits<source_type>::epsilon();
+
+ if ((orig_div_round > 1 ? orig_div_round - 1 : 1 - orig_div_round) > eps)
+ BOOST_LCAST_THROW_BAD_CAST(Source, Target);
+ }
- if ( (orig_div_round > 1 ? orig_div_round - 1 : 1 - orig_div_round) > std::numeric_limits<source_type>::epsilon() )
- BOOST_THROW_EXCEPTION( precision_loss_error() );
return s ;
}
typedef typename Rounder::round_style round_style;
} ;
- template<typename Target, typename Source>
+ template <class Source, class Target >
+ struct nothrow_overflow_handler
+ {
+ void operator() ( boost::numeric::range_check_result r )
+ {
+ if (r != boost::numeric::cInRange)
+ BOOST_LCAST_THROW_BAD_CAST(Source, Target);
+ }
+ } ;
+
+ template <typename Target, typename Source>
struct lexical_cast_dynamic_num_not_ignoring_minus
{
static inline Target lexical_cast_impl(const Source &arg)
{
- try{
- typedef boost::numeric::converter<
- Target,
- Source,
- boost::numeric::conversion_traits<Target,Source>,
- boost::numeric::def_overflow_handler,
- throw_on_precision_loss<Source>
- > Converter ;
-
- return Converter::convert(arg);
- } catch( ::boost::numeric::bad_numeric_cast const& ) {
- BOOST_LCAST_THROW_BAD_CAST(Source, Target);
- }
- BOOST_UNREACHABLE_RETURN(static_cast<Target>(0));
+ return boost::numeric::converter<
+ Target,
+ Source,
+ boost::numeric::conversion_traits<Target,Source>,
+ nothrow_overflow_handler<Source, Target>,
+ detect_precision_loss<Source, Target>
+ >::convert(arg);
}
};
- template<typename Target, typename Source>
+ template <typename Target, typename Source>
struct lexical_cast_dynamic_num_ignoring_minus
{
static inline Target lexical_cast_impl(const Source &arg)
{
- try{
- typedef boost::numeric::converter<
- Target,
- Source,
- boost::numeric::conversion_traits<Target,Source>,
- boost::numeric::def_overflow_handler,
- throw_on_precision_loss<Source>
- > Converter ;
-
- bool has_minus = ( arg < 0);
- if ( has_minus ) {
- return static_cast<Target>(-Converter::convert(-arg));
- } else {
- return Converter::convert(arg);
- }
- } catch( ::boost::numeric::bad_numeric_cast const& ) {
- BOOST_LCAST_THROW_BAD_CAST(Source, Target);
- }
- BOOST_UNREACHABLE_RETURN(static_cast<Target>(0));
+ typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if_c<
+ boost::is_float<Source>::value,
+ boost::mpl::identity<Source>,
+ boost::make_unsigned<Source>
+ >::type usource_t;
+
+ typedef boost::numeric::converter<
+ Target,
+ usource_t,
+ boost::numeric::conversion_traits<Target,usource_t>,
+ nothrow_overflow_handler<usource_t, Target>,
+ detect_precision_loss<usource_t, Target>
+ > converter_t;
+
+ return (
+ arg < 0 ? 0u - converter_t::convert(0u - arg) : converter_t::convert(arg)
+ );
}
};
* optional, so if a negative number is read, no errors will arise
* and the result will be the two's complement.
*/
- template<typename Target, typename Source>
+ template <typename Target, typename Source>
struct lexical_cast_dynamic_num
{
static inline Target lexical_cast_impl(const Source &arg)
{
- typedef BOOST_DEDUCED_TYPENAME ::boost::mpl::if_c<
- ::boost::type_traits::ice_and<
- ::boost::type_traits::ice_or<
- ::boost::is_signed<Source>::value,
- ::boost::is_float<Source>::value
+ typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
+ boost::type_traits::ice_and<
+ boost::type_traits::ice_or<
+ boost::is_signed<Source>::value,
+ boost::is_float<Source>::value
>::value,
- ::boost::type_traits::ice_not<
- is_same<Source, bool>::value
+ boost::type_traits::ice_not<
+ boost::is_same<Source, bool>::value
>::value,
- ::boost::type_traits::ice_not<
- is_same<Target, bool>::value
+ boost::type_traits::ice_not<
+ boost::is_same<Target, bool>::value
>::value,
- ::boost::is_unsigned<Target>::value
+ boost::is_unsigned<Target>::value
>::value,
lexical_cast_dynamic_num_ignoring_minus<Target, Source>,
lexical_cast_dynamic_num_not_ignoring_minus<Target, Source>
};
}
- template<typename Target, typename Source>
+ template <typename Target, typename Source>
inline Target lexical_cast(const Source &arg)
{
- typedef BOOST_DEDUCED_TYPENAME detail::array_to_pointer_decay<Source>::type src;
-
- typedef BOOST_DEDUCED_TYPENAME ::boost::type_traits::ice_or<
- detail::is_xchar_to_xchar<Target, src>::value,
- detail::is_char_array_to_stdstring<Target,src>::value,
- ::boost::type_traits::ice_and<
- is_same<Target, src>::value,
- detail::is_stdstring<Target>::value
+ typedef BOOST_DEDUCED_TYPENAME boost::detail::array_to_pointer_decay<Source>::type src;
+
+ typedef BOOST_DEDUCED_TYPENAME boost::type_traits::ice_or<
+ boost::detail::is_xchar_to_xchar<Target, src >::value,
+ boost::detail::is_char_array_to_stdstring<Target, src >::value,
+ boost::type_traits::ice_and<
+ boost::is_same<Target, src >::value,
+ boost::detail::is_stdstring<Target >::value
>::value
- > do_copy_type;
+ > shall_we_copy_t;
typedef BOOST_DEDUCED_TYPENAME
- detail::is_arithmetic_and_not_xchars<Target, src> do_copy_with_dynamic_check_type;
-
- typedef BOOST_DEDUCED_TYPENAME ::boost::mpl::if_c<
- do_copy_type::value,
- detail::lexical_cast_copy<src>,
- BOOST_DEDUCED_TYPENAME ::boost::mpl::if_c<
- do_copy_with_dynamic_check_type::value,
- detail::lexical_cast_dynamic_num<Target, src>,
- detail::lexical_cast_do_cast<Target, src>
+ boost::detail::is_arithmetic_and_not_xchars<Target, src > shall_we_copy_with_dynamic_check_t;
+
+ typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
+ shall_we_copy_t::value,
+ boost::detail::lexical_cast_copy<src >,
+ BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
+ shall_we_copy_with_dynamic_check_t::value,
+ boost::detail::lexical_cast_dynamic_num<Target, src >,
+ boost::detail::lexical_cast_do_cast<Target, src >
>::type
>::type caster_type;
return caster_type::lexical_cast_impl(arg);
}
- #else
+ template <typename Target, typename CharType>
+ inline Target lexical_cast(const CharType* chars, std::size_t count)
+ {
+ BOOST_STATIC_ASSERT_MSG(boost::detail::is_char_or_wchar<CharType>::value,
+ "CharType must be a character or wide character type");
+
+ return boost::lexical_cast<Target>(
+ boost::iterator_range<const CharType*>(chars, chars + count)
+ );
+ }
+
+} // namespace boost
- namespace detail // stream wrapper for handling lexical conversions
+#else // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+namespace boost {
+ namespace detail
{
+
+ // selectors for choosing stream character type
+ template<typename Type>
+ struct stream_char
+ {
+ typedef char type;
+ };
+
+#ifndef BOOST_LCAST_NO_WCHAR_T
+#ifndef BOOST_NO_INTRINSIC_WCHAR_T
+ template<>
+ struct stream_char<wchar_t>
+ {
+ typedef wchar_t type;
+ };
+#endif
+
+ template<>
+ struct stream_char<wchar_t *>
+ {
+ typedef wchar_t type;
+ };
+
+ template<>
+ struct stream_char<const wchar_t *>
+ {
+ typedef wchar_t type;
+ };
+
+ template<>
+ struct stream_char<std::wstring>
+ {
+ typedef wchar_t type;
+ };
+#endif
+
+ // stream wrapper for handling lexical conversions
template<typename Target, typename Source, typename Traits>
class lexical_stream
{
return result;
}
- #endif
-}
+} // namespace boost
+
+#endif
// Copyright Kevlin Henney, 2000-2005.
// Copyright Alexander Nasonov, 2006-2010.
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
+#undef BOOST_LCAST_THROW_BAD_CAST
#undef BOOST_LCAST_NO_WCHAR_T
-#endif
+
+#endif // BOOST_LEXICAL_CAST_INCLUDED
+
//
// Mathematically undefined properties:
//
- typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, discrete_quantile<> >::type assert_undefined_type;
+ typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, assert_undefined<> >::type assert_undefined_type;
//
// Max iterations:
//
//
// Mathematically undefined properties:
//
- typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, discrete_quantile<> >::type assert_undefined_type;
+ typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, typename Policy::assert_undefined_type >::type assert_undefined_type;
//
// Max iterations:
//
- typedef typename detail::find_arg<arg_list, is_max_series_iterations<mpl::_1>, max_series_iterations<> >::type max_series_iterations_type;
- typedef typename detail::find_arg<arg_list, is_max_root_iterations<mpl::_1>, max_root_iterations<> >::type max_root_iterations_type;
+ typedef typename detail::find_arg<arg_list, is_max_series_iterations<mpl::_1>, typename Policy::max_series_iterations_type>::type max_series_iterations_type;
+ typedef typename detail::find_arg<arg_list, is_max_root_iterations<mpl::_1>, typename Policy::max_root_iterations_type>::type max_root_iterations_type;
//
// Define a typelist of the policies:
//
return FP_NAN;
}
-#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
-template <>
-inline int fpclassify_imp<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && (defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS))
+inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
{
return boost::math::detail::fpclassify_imp(t, generic_tag<true>());
}
{
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
+ typedef typename tools::promote_args<T>::type value_type;
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
if(std::numeric_limits<T>::is_specialized && detail::is_generic_tag_false(static_cast<method*>(0)))
- return detail::fpclassify_imp(t, detail::generic_tag<true>());
- return detail::fpclassify_imp(t, method());
+ return detail::fpclassify_imp(static_cast<value_type>(t), detail::generic_tag<true>());
+ return detail::fpclassify_imp(static_cast<value_type>(t), method());
#else
- return detail::fpclassify_imp(t, method());
+ return detail::fpclassify_imp(static_cast<value_type>(t), method());
#endif
}
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+template <>
+inline int fpclassify<long double> BOOST_NO_MACRO_EXPAND(long double t)
+{
+ typedef detail::fp_traits<long double>::type traits;
+ typedef traits::method method;
+ typedef long double value_type;
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ if(std::numeric_limits<long double>::is_specialized && detail::is_generic_tag_false(static_cast<method*>(0)))
+ return detail::fpclassify_imp(static_cast<value_type>(t), detail::generic_tag<true>());
+ return detail::fpclassify_imp(static_cast<value_type>(t), method());
+#else
+ return detail::fpclassify_imp(static_cast<value_type>(t), method());
+#endif
+}
+#endif
+
namespace detail {
#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
}
#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
-template <>
-inline bool isfinite_impl<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+inline bool isfinite_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
{
return boost::math::detail::isfinite_impl(t, generic_tag<true>());
}
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
typedef typename boost::is_floating_point<T>::type fp_tag;
- return detail::isfinite_impl(x, method());
+ typedef typename tools::promote_args<T>::type value_type;
+ return detail::isfinite_impl(static_cast<value_type>(x), method());
}
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+template<>
+inline bool (isfinite)(long double x)
+{ //!< \brief return true if floating-point type t is finite.
+ typedef detail::fp_traits<long double>::type traits;
+ typedef traits::method method;
+ typedef boost::is_floating_point<long double>::type fp_tag;
+ typedef long double value_type;
+ return detail::isfinite_impl(static_cast<value_type>(x), method());
+}
+#endif
+
//------------------------------------------------------------------------------
namespace detail {
}
#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
-template <>
-inline bool isnormal_impl<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+inline bool isnormal_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
{
return boost::math::detail::isnormal_impl(t, generic_tag<true>());
}
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
typedef typename boost::is_floating_point<T>::type fp_tag;
- return detail::isnormal_impl(x, method());
+ typedef typename tools::promote_args<T>::type value_type;
+ return detail::isnormal_impl(static_cast<value_type>(x), method());
}
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+template<>
+inline bool (isnormal)(long double x)
+{
+ typedef detail::fp_traits<long double>::type traits;
+ typedef traits::method method;
+ typedef boost::is_floating_point<long double>::type fp_tag;
+ typedef long double value_type;
+ return detail::isnormal_impl(static_cast<value_type>(x), method());
+}
+#endif
+
//------------------------------------------------------------------------------
namespace detail {
}
#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
-template <>
-inline bool isinf_impl<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+inline bool isinf_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
{
return boost::math::detail::isinf_impl(t, generic_tag<true>());
}
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
typedef typename boost::is_floating_point<T>::type fp_tag;
- return detail::isinf_impl(x, method());
+ typedef typename tools::promote_args<T>::type value_type;
+ return detail::isinf_impl(static_cast<value_type>(x), method());
+}
+
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+template<>
+inline bool (isinf)(long double x)
+{
+ typedef detail::fp_traits<long double>::type traits;
+ typedef traits::method method;
+ typedef boost::is_floating_point<long double>::type fp_tag;
+ typedef long double value_type;
+ return detail::isinf_impl(static_cast<value_type>(x), method());
}
+#endif
//------------------------------------------------------------------------------
} // namespace detail
-template<class T> bool (isnan)(T x)
+template<class T>
+inline bool (isnan)(T x)
{ //!< \brief return true if floating-point type t is NaN (Not A Number).
typedef typename detail::fp_traits<T>::type traits;
typedef typename traits::method method;
template <> inline bool isnan BOOST_NO_MACRO_EXPAND<float>(float t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); }
template <> inline bool isnan BOOST_NO_MACRO_EXPAND<double>(double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); }
template <> inline bool isnan BOOST_NO_MACRO_EXPAND<long double>(long double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); }
+#elif defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+template<>
+inline bool (isnan)(long double x)
+{ //!< \brief return true if floating-point type t is NaN (Not A Number).
+ typedef detail::fp_traits<long double>::type traits;
+ typedef traits::method method;
+ typedef boost::is_floating_point<long double>::type fp_tag;
+ return detail::isnan_impl(x, method());
+}
#endif
} // namespace math
template <class T>
typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann(unsigned v, T x);
+ template <class T1, class T2, class Policy>
+ std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol);
+
+ template <class T1, class T2>
+ std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_1(T1 v, T2 x);
+
+ template <class T1, class T2, class Policy>
+ std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_2(T1 v, T2 x, const Policy& pol);
+
+ template <class T1, class T2>
+ std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_2(T1 v, T2 x);
+
+ template <class T1, class T2, class Policy>
+ std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_1(T1 v, T2 x, const Policy& pol);
+
+ template <class T1, class T2>
+ std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> sph_hankel_1(T1 v, T2 x);
+
+ template <class T1, class T2, class Policy>
+ std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_2(T1 v, T2 x, const Policy& pol);
+
+ template <class T1, class T2>
+ std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> sph_hankel_2(T1 v, T2 x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type airy_ai(T x, const Policy&);
+
+ template <class T>
+ typename tools::promote_args<T>::type airy_ai(T x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type airy_bi(T x, const Policy&);
+
+ template <class T>
+ typename tools::promote_args<T>::type airy_bi(T x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type airy_ai_prime(T x, const Policy&);
+
+ template <class T>
+ typename tools::promote_args<T>::type airy_ai_prime(T x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type airy_bi_prime(T x, const Policy&);
+
+ template <class T>
+ typename tools::promote_args<T>::type airy_bi_prime(T x);
+
template <class T, class Policy>
typename tools::promote_args<T>::type sin_pi(T x, const Policy&);
template <class T, class Policy>
typename tools::promote_args<T>::type zeta(T s, const Policy&);
+ // Owen's T function:
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a, const Policy& pol);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a);
+
+ // Jacobi Functions:
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type jacobi_elliptic(T k, T theta, T* pcn, T* pdn, const Policy&);
+
+ template <class T>
+ typename tools::promote_args<T>::type jacobi_elliptic(T k, T theta, T* pcn = 0, T* pdn = 0);
+
+ template <class U, class T, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta, const Policy& pol);
+
+ template <class U, class T>
+ typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_cn(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_cn(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_dn(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_dn(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_cd(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_cd(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_dc(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_dc(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_ns(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_ns(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_sd(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_sd(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_ds(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_ds(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_nc(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_nc(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_nd(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_nd(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_sc(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_sc(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_cs(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_cs(T k, U theta);
+
+
template <class T>
typename tools::promote_args<T>::type zeta(T s);
template <class T> T float_next(const T& a){ return boost::math::float_next(a, Policy()); }\
template <class T> T float_prior(const T& a){ return boost::math::float_prior(a, Policy()); }\
template <class T> T float_distance(const T& a, const T& b){ return boost::math::float_distance(a, b, Policy()); }\
+ \
+ template <class RT1, class RT2>\
+ inline typename boost::math::tools::promote_args<RT1, RT2>::type owens_t(RT1 a, RT2 z){ return boost::math::owens_t(a, z, Policy()); }\
+ \
+ template <class T1, class T2>\
+ inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> cyl_hankel_1(T1 v, T2 x)\
+ { return boost::math::cyl_hankel_1(v, x, Policy()); }\
+ \
+ template <class T1, class T2>\
+ inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> cyl_hankel_2(T1 v, T2 x)\
+ { return boost::math::cyl_hankel_2(v, x, Policy()); }\
+ \
+ template <class T1, class T2>\
+ inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> sph_hankel_1(T1 v, T2 x)\
+ { return boost::math::sph_hankel_1(v, x, Policy()); }\
+ \
+ template <class T1, class T2>\
+ inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> sph_hankel_2(T1 v, T2 x)\
+ { return boost::math::sph_hankel_2(v, x, Policy()); }\
+ \
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type jacobi_elliptic(T k, T theta, T* pcn, T* pdn)\
+ { return boost::math::jacobi_elliptic(k, theta, pcn, pdn, Policy()); }\
+ \
+ template <class U, class T>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_sn(U k, T theta)\
+ { return boost::math::jacobi_sn(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_cn(T k, U theta)\
+ { return boost::math::jacobi_cn(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_dn(T k, U theta)\
+ { return boost::math::jacobi_dn(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_cd(T k, U theta)\
+ { return boost::math::jacobi_cd(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_dc(T k, U theta)\
+ { return boost::math::jacobi_dc(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_ns(T k, U theta)\
+ { return boost::math::jacobi_ns(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_sd(T k, U theta)\
+ { return boost::math::jacobi_sd(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_ds(T k, U theta)\
+ { return boost::math::jacobi_ds(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_nc(T k, U theta)\
+ { return boost::math::jacobi_nc(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_nd(T k, U theta)\
+ { return boost::math::jacobi_nd(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_sc(T k, U theta)\
+ { return boost::math::jacobi_sc(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_cs(T k, U theta)\
+ { return boost::math::jacobi_cs(k, theta, Policy()); }\
+ \
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type airy_ai(T x)\
+ { return boost::math::airy_ai(x, Policy()); }\
+ \
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type airy_bi(T x)\
+ { return boost::math::airy_bi(x, Policy()); }\
+ \
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type airy_ai_prime(T x)\
+ { return boost::math::airy_ai_prime(x, Policy()); }\
+ \
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type airy_bi_prime(T x)\
+ { return boost::math::airy_bi_prime(x, Policy()); }\
+ \
+
+
+
#endif // BOOST_MATH_SPECIAL_MATH_FWD_HPP
#include <algorithm> // for min and max
#include <boost/config/no_tr1/cmath.hpp>
#include <climits>
+#include <cfloat>
#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
# include <math.h>
#endif
#include <boost/math/special_functions/detail/round_fwd.hpp>
#if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \
- || (defined(__hppa) && !defined(__OpenBSD__)) || defined(__NO_LONG_DOUBLE_MATH)) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+ || (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \
+ && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
#endif
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
# define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
# include <float.h>
#endif
+#ifdef __IBMCPP__
+//
+// For reasons I don't unserstand, the tests with IMB's compiler all
+// pass at long double precision, but fail with real_concept, those tests
+// are disabled for now. (JM 2012).
+# define BOOST_MATH_NO_REAL_CONCEPT_TESTS
+#endif
#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106)) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
//
// Darwin's rather strange "double double" is rather hard to
# define BOOST_MATH_USE_C99
#endif
+#if defined(_LIBCPP_VERSION) && !defined(_MSC_VER)
+# define BOOST_MATH_USE_C99
+#endif
+
#if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \
|| defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \
- || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99))
+ || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99))\
+ || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
# define BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY
#endif
// See http://www.boost.org/libs/mpl for documentation.
// $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/O1_size_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: O1_size_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: advance.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/advance_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: advance_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/common_name_wknd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: always.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: and.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: apply_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: apply_wrap.hpp 49272 2008-10-11 06:50:46Z agurtovoy $
-// $Date: 2008-10-11 02:50:46 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:50:46 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49272 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: arg.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: arg_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/adl_barrier.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: assert.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/not.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: at.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/at_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: at_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: O1_size_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/O1_size_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: adl_barrier.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/adl.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: advance_backward.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: advance_forward.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: arg_typedef.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/lambda.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: arithmetic_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: arity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/dtp.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: arity_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/int.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: at_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: begin_end_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: clear_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/clear_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: common_name_wknd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/workaround.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: comparison_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: adl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/msvc.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: arrays.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/msvc.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/msvc.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: compiler.hpp 53189 2009-05-22 20:07:55Z hkaiser $
-// $Date: 2009-05-22 16:07:55 -0400 (Fri, 22 May 2009) $
+// $Date: 2009-05-22 13:07:55 -0700 (Fri, 22 May 2009) $
// $Revision: 53189 $
#if !defined(BOOST_MPL_CFG_COMPILER_DIR)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: ctps.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/workaround.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: dmc_ambiguous_ctps.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/workaround.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: dtp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/workaround.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: eti.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/msvc.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: forwarding.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/workaround.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: gcc.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if defined(__GNUC__) && !defined(__EDG_VERSION__)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: has_apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/has_xxx.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: has_xxx.hpp 63518 2010-07-02 08:32:03Z agurtovoy $
-// $Date: 2010-07-02 04:32:03 -0400 (Fri, 02 Jul 2010) $
+// $Date: 2010-07-02 01:32:03 -0700 (Fri, 02 Jul 2010) $
// $Revision: 63518 $
#include <boost/mpl/aux_/config/overload_resolution.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: integral.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/msvc.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: intel.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
// See http://www.boost.org/libs/mpl for documentation.
// $Id: lambda.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/ttp.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: msvc.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
// See http://www.boost.org/libs/mpl for documentation.
// $Id: msvc_typename.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/msvc.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: nttp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/msvc.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: overload_resolution.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/workaround.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: pp_counter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_AUX_PP_COUNTER)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: preprocessor.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/workaround.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: static_constant.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: ttp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/msvc.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: typeof.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/gcc.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: use_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
// #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
// See http://www.boost.org/libs/mpl for documentation.
// $Id: workaround.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/detail/workaround.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: contains_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/contains_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: count_args.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/preprocessor/expr_if.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: empty_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/empty_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: fold_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: fold_impl_body.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
# include <boost/mpl/limits/unrolling.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: full_lambda.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: has_apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/has_xxx.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: has_begin.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/has_xxx.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: has_rebind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/msvc.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: has_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/has_xxx.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: has_tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/has_xxx.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: has_type.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/has_xxx.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/compiler.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: insert_range_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/copy.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: inserter_algorithm.hpp 55648 2009-08-18 05:16:53Z agurtovoy $
-// $Date: 2009-08-18 01:16:53 -0400 (Tue, 18 Aug 2009) $
+// $Date: 2009-08-17 22:16:53 -0700 (Mon, 17 Aug 2009) $
// $Revision: 55648 $
#include <boost/mpl/back_inserter.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: integral_wrapper.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
// See http://www.boost.org/libs/mpl for documentation.
// $Id: is_msvc_eti_arg.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/yes_no.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iter_apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/apply.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iter_fold_if_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iter_fold_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iter_push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/push_front.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: joint_iter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/next_prior.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: lambda_arity_param.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/ttp.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: lambda_no_ctps.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: lambda_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/void.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: lambda_support.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/lambda.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: largest_int.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/if.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: logical_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
// See http://www.boost.org/libs/mpl for documentation.
// $Id: msvc_dtw.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
// See http://www.boost.org/libs/mpl for documentation.
// $Id: msvc_eti_base.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/is_msvc_eti_arg.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: msvc_is_class.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/if.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: msvc_never_true.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/msvc.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: msvc_type.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/eti.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: na.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/bool.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: na_assert.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/na.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: na_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/adl_barrier.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: na_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: nested_type_wknd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/gcc.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: nttp_decl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/nttp.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: numeric_cast_utils.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/numeric_cast.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: numeric_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: add.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/preprocessor.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: def_params_tail.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/limits/arity.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: default_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/preprocessor.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: enum.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/preprocessor.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: ext_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/preprocessor.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: filter_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#define BOOST_MPL_PP_FILTER_PARAMS_0(p1,p2,p3,p4,p5,p6,p7,p8,p9)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/preprocessor.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: partial_spec_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/limits/arity.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: range.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/preprocessor/seq/subseq.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: repeat.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/preprocessor.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: sub.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/preprocessor.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: tuple.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#define BOOST_MPL_PP_TUPLE_11_ELEM_0(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e0
// See http://www.boost.org/libs/mpl for documentation.
// $Id: push_back_impl.hpp 55679 2009-08-20 07:50:16Z agurtovoy $
-// $Date: 2009-08-20 03:50:16 -0400 (Thu, 20 Aug 2009) $
+// $Date: 2009-08-20 00:50:16 -0700 (Thu, 20 Aug 2009) $
// $Revision: 55679 $
#include <boost/mpl/push_back_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: push_front_impl.hpp 55679 2009-08-20 07:50:16Z agurtovoy $
-// $Date: 2009-08-20 03:50:16 -0400 (Thu, 20 Aug 2009) $
+// $Date: 2009-08-20 00:50:16 -0700 (Thu, 20 Aug 2009) $
// $Revision: 55679 $
#include <boost/mpl/push_front_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: reverse_fold_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: reverse_fold_impl_body.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
# include <boost/mpl/limits/unrolling.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: sequence_wrapper.hpp 49271 2008-10-11 06:46:00Z agurtovoy $
-// $Date: 2008-10-11 02:46:00 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:46:00 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49271 $
# include <boost/mpl/aux_/config/ctps.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: size_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/size_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: static_cast.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/workaround.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: template_arity.hpp 61584 2010-04-26 18:48:26Z agurtovoy $
-// $Date: 2010-04-26 14:48:26 -0400 (Mon, 26 Apr 2010) $
+// $Date: 2010-04-26 11:48:26 -0700 (Mon, 26 Apr 2010) $
// $Revision: 61584 $
#include <boost/mpl/aux_/config/ttp.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: template_arity_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl { namespace aux {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: traits_lambda_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/sequence_tag_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: type_wrapper.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/ctps.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: value_wknd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/static_cast.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: yes_no.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/nttp_decl.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: back_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: back_inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/push_back.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: begin_end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: begin_end_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bind_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bool.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/bool_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: bool_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/adl_barrier.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: clear.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/clear_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: clear_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: comparison.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/equal_to.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: contains.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/contains_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: contains_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: copy.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/fold.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: deref.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/msvc_type.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: distance.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/distance_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: distance_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/common_name_wknd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/empty_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: empty_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: equal_to.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME equal_to
// See http://www.boost.org/libs/mpl for documentation.
// $Id: eval_if.hpp 61921 2010-05-11 21:33:24Z neilgroves $
-// $Date: 2010-05-11 17:33:24 -0400 (Tue, 11 May 2010) $
+// $Date: 2010-05-11 14:33:24 -0700 (Tue, 11 May 2010) $
// $Revision: 61921 $
#include <boost/mpl/if.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: find.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/find_if.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: find_if.hpp 49274 2008-10-11 07:22:05Z agurtovoy $
-// $Date: 2008-10-11 03:22:05 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-11 00:22:05 -0700 (Sat, 11 Oct 2008) $
// $Revision: 49274 $
#include <boost/mpl/aux_/find_if_pred.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: front_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: front_inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/push_front.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: greater.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME greater
// See http://www.boost.org/libs/mpl for documentation.
// $Id: greater_equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME greater_equal
// See http://www.boost.org/libs/mpl for documentation.
// $Id: has_xxx.hpp 64146 2010-07-19 00:46:31Z djwalker $
-// $Date: 2010-07-18 20:46:31 -0400 (Sun, 18 Jul 2010) $
+// $Date: 2010-07-18 17:46:31 -0700 (Sun, 18 Jul 2010) $
// $Revision: 64146 $
#include <boost/mpl/bool.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: identity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/na_spec.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/value_wknd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: insert_range.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/insert_range_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: insert_range_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: int.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/int_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: int_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/adl_barrier.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: integral_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/integral_c_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: integral_c_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/workaround.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: integral_c_tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
// See http://www.boost.org/libs/mpl for documentation.
// $Id: is_placeholder.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/arg_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iter_fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iter_fold_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iterator_range.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/na_spec.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iterator_tags.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/int.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: joint_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/joint_iter.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: lambda.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/lambda_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: lambda_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/void_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: less.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME less
// See http://www.boost.org/libs/mpl for documentation.
// $Id: less_equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME less_equal
// See http://www.boost.org/libs/mpl for documentation.
// $Id: arity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_LIMIT_METAFUNCTION_ARITY)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: list.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_LIMIT_LIST_SIZE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: unrolling.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_LIMIT_UNROLLING)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: vector.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_LIMIT_VECTOR_SIZE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: list.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/O1_size_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: begin_end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: clear.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/clear_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/empty_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/front_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
// See http://www.boost.org/libs/mpl for documentation.
// $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/long.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/iterator_tags.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: numbered.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if defined(BOOST_PP_IS_ITERATING)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: numbered_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if defined(BOOST_PP_IS_ITERATING)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: pop_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/pop_front_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: push_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/push_back_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/push_front_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/size_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl { namespace aux {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: list0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/long.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: list0_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/list/list0.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: list10.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: list10_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: list20.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: list20_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: list30.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: list30_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: list40.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: list40_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: list50.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: list50_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: logical.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/or.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: long.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/long_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: long_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/adl_barrier.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: minus.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME minus
// See http://www.boost.org/libs/mpl for documentation.
// $Id: multiplies.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/times.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: negate.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/integral_c.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: next.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/next_prior.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: next_prior.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/common_name_wknd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: not.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/bool.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: not_equal_to.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME not_equal_to
// See http://www.boost.org/libs/mpl for documentation.
// $Id: numeric_cast.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/msvc.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: or.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: pair.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/msvc_eti_base.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: placeholders.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
// See http://www.boost.org/libs/mpl for documentation.
// $Id: plus.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME plus
// See http://www.boost.org/libs/mpl for documentation.
// $Id: pop_back_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: pop_front_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: prior.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/next_prior.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: protect.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/arity.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: push_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/push_back_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: push_back_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/push_front_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: push_front_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: quote.hpp 49272 2008-10-11 06:50:46Z agurtovoy $
-// $Date: 2008-10-11 02:50:46 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:50:46 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49272 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: remove_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/fold.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: reverse_fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/begin_end.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: same_as.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/not.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: sequence_tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/sequence_tag_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: sequence_tag_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/size_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: size_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
namespace boost { namespace mpl {
// See http://www.boost.org/libs/mpl for documentation.
// $Id: size_t.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/size_t_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: size_t_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/adl_barrier.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/eval_if.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: times.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#define AUX778076_OP_NAME times
// See http://www.boost.org/libs/mpl for documentation.
// $Id: vector.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/O1_size_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: at.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/at_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/back_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: begin_end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/typeof.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: clear.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/clear_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/empty_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/front_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/typeof.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/long.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/vector/aux_/at.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: numbered.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/preprocessor/enum_params.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: numbered_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/preprocessor/enum_params.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: pop_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/pop_back_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: pop_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/pop_front_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: push_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/push_back_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/push_front_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/size_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/config/typeof.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: vector0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/long.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: vector0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/vector/aux_/at.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: vector0_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/vector/vector0.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: vector10.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: vector10_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: vector20.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: vector20_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: vector30.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: vector30_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: vector40.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: vector40_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: vector50.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: vector50_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
// See http://www.boost.org/libs/mpl for documentation.
// $Id: void.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/void_fwd.hpp>
// See http://www.boost.org/libs/mpl for documentation.
// $Id: void_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $
// $Revision: 49267 $
#include <boost/mpl/aux_/adl_barrier.hpp>
#include <typeinfo> // for std::bad_cast
#include <boost/config/no_tr1/cmath.hpp> // for std::floor and std::ceil
+#include <boost/throw_exception.hpp>
#include <functional>
{
void operator() ( range_check_result r ) // throw(negative_overflow,positive_overflow)
{
+#ifndef BOOST_NO_EXCEPTIONS
if ( r == cNegOverflow )
throw negative_overflow() ;
else if ( r == cPosOverflow )
throw positive_overflow() ;
+#else
+ if ( r == cNegOverflow )
+ ::boost::throw_exception(negative_overflow()) ;
+ else if ( r == cPosOverflow )
+ ::boost::throw_exception(positive_overflow()) ;
+#endif
}
} ;
template<class T>
inline
-bool operator == ( none_t x, optional<T> const& y )
+bool operator == ( none_t , optional<T> const& y )
{ return equal_pointees(optional<T>() ,y); }
template<class T>
inline
-bool operator < ( none_t x, optional<T> const& y )
+bool operator < ( none_t , optional<T> const& y )
{ return less_pointees(optional<T>() ,y); }
template<class T>
--- /dev/null
+// Boost.Range library
+//
+// Copyright Neil Groves 2009.
+// Use, modification and distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EQUAL_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EQUAL_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/range/concepts.hpp>
+#include <iterator>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ // An implementation of equality comparison that is optimized for iterator
+ // traversal categories less than RandomAccessTraversal.
+ template< class SinglePassTraversalReadableIterator1,
+ class SinglePassTraversalReadableIterator2,
+ class IteratorCategoryTag1,
+ class IteratorCategoryTag2 >
+ inline bool equal_impl( SinglePassTraversalReadableIterator1 first1,
+ SinglePassTraversalReadableIterator1 last1,
+ SinglePassTraversalReadableIterator2 first2,
+ SinglePassTraversalReadableIterator2 last2,
+ IteratorCategoryTag1,
+ IteratorCategoryTag2 )
+ {
+ while (true)
+ {
+ // If we have reached the end of the left range then this is
+ // the end of the loop. They are equal if and only if we have
+ // simultaneously reached the end of the right range.
+ if (first1 == last1)
+ return first2 == last2;
+
+ // If we have reached the end of the right range at this line
+ // it indicates that the right range is shorter than the left
+ // and hence the result is false.
+ if (first2 == last2)
+ return false;
+
+ // continue looping if and only if the values are equal
+ if (*first1 != *first2)
+ break;
+
+ ++first1;
+ ++first2;
+ }
+
+ // Reaching this line in the algorithm indicates that a value
+ // inequality has been detected.
+ return false;
+ }
+
+ template< class SinglePassTraversalReadableIterator1,
+ class SinglePassTraversalReadableIterator2,
+ class IteratorCategoryTag1,
+ class IteratorCategoryTag2,
+ class BinaryPredicate >
+ inline bool equal_impl( SinglePassTraversalReadableIterator1 first1,
+ SinglePassTraversalReadableIterator1 last1,
+ SinglePassTraversalReadableIterator2 first2,
+ SinglePassTraversalReadableIterator2 last2,
+ BinaryPredicate pred,
+ IteratorCategoryTag1,
+ IteratorCategoryTag2 )
+ {
+ while (true)
+ {
+ // If we have reached the end of the left range then this is
+ // the end of the loop. They are equal if and only if we have
+ // simultaneously reached the end of the right range.
+ if (first1 == last1)
+ return first2 == last2;
+
+ // If we have reached the end of the right range at this line
+ // it indicates that the right range is shorter than the left
+ // and hence the result is false.
+ if (first2 == last2)
+ return false;
+
+ // continue looping if and only if the values are equal
+ if (!pred(*first1, *first2))
+ break;
+
+ ++first1;
+ ++first2;
+ }
+
+ // Reaching this line in the algorithm indicates that a value
+ // inequality has been detected.
+ return false;
+ }
+
+ // An implementation of equality comparison that is optimized for
+ // random access iterators.
+ template< class RandomAccessTraversalReadableIterator1,
+ class RandomAccessTraversalReadableIterator2 >
+ inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1,
+ RandomAccessTraversalReadableIterator1 last1,
+ RandomAccessTraversalReadableIterator2 first2,
+ RandomAccessTraversalReadableIterator2 last2,
+ std::random_access_iterator_tag,
+ std::random_access_iterator_tag )
+ {
+ return ((last1 - first1) == (last2 - first2))
+ && std::equal(first1, last1, first2);
+ }
+
+ template< class RandomAccessTraversalReadableIterator1,
+ class RandomAccessTraversalReadableIterator2,
+ class BinaryPredicate >
+ inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1,
+ RandomAccessTraversalReadableIterator1 last1,
+ RandomAccessTraversalReadableIterator2 first2,
+ RandomAccessTraversalReadableIterator2 last2,
+ BinaryPredicate pred )
+ {
+ return ((last1 - first1) == (last2 - first2))
+ && std::equal(first1, last1, first2, pred);
+ }
+
+ template< class SinglePassTraversalReadableIterator1,
+ class SinglePassTraversalReadableIterator2 >
+ inline bool equal( SinglePassTraversalReadableIterator1 first1,
+ SinglePassTraversalReadableIterator1 last1,
+ SinglePassTraversalReadableIterator2 first2,
+ SinglePassTraversalReadableIterator2 last2 )
+ {
+ BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1;
+ BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2;
+
+ return equal_impl(first1, last1, first2, last2, tag1, tag2);
+ }
+
+ template< class SinglePassTraversalReadableIterator1,
+ class SinglePassTraversalReadableIterator2,
+ class BinaryPredicate >
+ inline bool equal( SinglePassTraversalReadableIterator1 first1,
+ SinglePassTraversalReadableIterator1 last1,
+ SinglePassTraversalReadableIterator2 first2,
+ SinglePassTraversalReadableIterator2 last2,
+ BinaryPredicate pred )
+ {
+ BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1;
+ BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2;
+
+ return equal_impl(first1, last1, first2, last2, pred, tag1, tag2);
+ }
+
+ } // namespace range_detail
+
+ namespace range
+ {
+
+ /// \brief template function equal
+ ///
+ /// range-based version of the equal std algorithm
+ ///
+ /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+ /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+ /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+ template< class SinglePassRange1, class SinglePassRange2 >
+ inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2 )
+ {
+ BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+
+ return ::boost::range_detail::equal(
+ ::boost::begin(rng1), ::boost::end(rng1),
+ ::boost::begin(rng2), ::boost::end(rng2) );
+ }
+
+ /// \overload
+ template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
+ inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2,
+ BinaryPredicate pred )
+ {
+ BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+ BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+
+ return ::boost::range_detail::equal(
+ ::boost::begin(rng1), ::boost::end(rng1),
+ ::boost::begin(rng2), ::boost::end(rng2),
+ pred);
+ }
+
+ } // namespace range
+ using ::boost::range::equal;
+} // namespace boost
+
+#endif // include guard
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_BEGIN_HPP
+#define BOOST_RANGE_BEGIN_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/range/config.hpp>
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+#include <boost/range/detail/begin.hpp>
+#else
+
+#include <boost/range/iterator.hpp>
+
+namespace boost
+{
+
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+ !BOOST_WORKAROUND(__GNUC__, < 3) \
+ /**/
+namespace range_detail
+{
+#endif
+
+ //////////////////////////////////////////////////////////////////////
+ // primary template
+ //////////////////////////////////////////////////////////////////////
+
+ template< typename C >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
+ range_begin( C& c )
+ {
+ //
+ // If you get a compile-error here, it is most likely because
+ // you have not implemented range_begin() properly in
+ // the namespace of C
+ //
+ return c.begin();
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // pair
+ //////////////////////////////////////////////////////////////////////
+
+ template< typename Iterator >
+ inline Iterator range_begin( const std::pair<Iterator,Iterator>& p )
+ {
+ return p.first;
+ }
+
+ template< typename Iterator >
+ inline Iterator range_begin( std::pair<Iterator,Iterator>& p )
+ {
+ return p.first;
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // array
+ //////////////////////////////////////////////////////////////////////
+
+ //
+ // May this be discarded? Or is it needed for bad compilers?
+ //
+ template< typename T, std::size_t sz >
+ inline const T* range_begin( const T (&a)[sz] )
+ {
+ return a;
+ }
+
+ template< typename T, std::size_t sz >
+ inline T* range_begin( T (&a)[sz] )
+ {
+ return a;
+ }
+
+
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+ !BOOST_WORKAROUND(__GNUC__, < 3) \
+ /**/
+} // namespace 'range_detail'
+#endif
+
+// Use a ADL namespace barrier to avoid ambiguity with other unqualified
+// calls. This is particularly important with C++0x encouraging
+// unqualified calls to begin/end.
+namespace range_adl_barrier
+{
+
+template< class T >
+inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type begin( T& r )
+{
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+ !BOOST_WORKAROUND(__GNUC__, < 3) \
+ /**/
+ using namespace range_detail;
+#endif
+ return range_begin( r );
+}
+
+template< class T >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type begin( const T& r )
+{
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+ !BOOST_WORKAROUND(__GNUC__, < 3) \
+ /**/
+ using namespace range_detail;
+#endif
+ return range_begin( r );
+}
+
+ } // namespace range_adl_barrier
+} // namespace boost
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+namespace boost
+{
+ namespace range_adl_barrier
+ {
+ template< class T >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type
+ const_begin( const T& r )
+ {
+ return boost::range_adl_barrier::begin( r );
+ }
+ } // namespace range_adl_barrier
+
+ using namespace range_adl_barrier;
+} // namespace boost
+
+#endif
+
--- /dev/null
+// Boost.Range library concept checks
+//
+// Copyright Neil Groves 2009. 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)
+//
+// Copyright Daniel Walker 2006. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_CONCEPTS_HPP
+#define BOOST_RANGE_CONCEPTS_HPP
+
+#include <boost/concept_check.hpp>
+#include <boost/iterator/iterator_concepts.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/value_type.hpp>
+#include <boost/range/detail/misc_concept.hpp>
+
+/*!
+ * \file
+ * \brief Concept checks for the Boost Range library.
+ *
+ * The structures in this file may be used in conjunction with the
+ * Boost Concept Check library to insure that the type of a function
+ * parameter is compatible with a range concept. If not, a meaningful
+ * compile time error is generated. Checks are provided for the range
+ * concepts related to iterator traversal categories. For example, the
+ * following line checks that the type T models the ForwardRange
+ * concept.
+ *
+ * \code
+ * BOOST_CONCEPT_ASSERT((ForwardRangeConcept<T>));
+ * \endcode
+ *
+ * A different concept check is required to ensure writeable value
+ * access. For example to check for a ForwardRange that can be written
+ * to, the following code is required.
+ *
+ * \code
+ * BOOST_CONCEPT_ASSERT((WriteableForwardRangeConcept<T>));
+ * \endcode
+ *
+ * \see http://www.boost.org/libs/range/doc/range.html for details
+ * about range concepts.
+ * \see http://www.boost.org/libs/iterator/doc/iterator_concepts.html
+ * for details about iterator concepts.
+ * \see http://www.boost.org/libs/concept_check/concept_check.htm for
+ * details about concept checks.
+ */
+
+namespace boost {
+
+ namespace range_detail {
+
+#ifndef BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+
+// List broken compiler versions here:
+ #ifdef __GNUC__
+ // GNUC 4.2 has strange issues correctly detecting compliance with the Concepts
+ // hence the least disruptive approach is to turn-off the concept checking for
+ // this version of the compiler.
+ #if __GNUC__ == 4 && __GNUC_MINOR__ == 2
+ #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0
+ #endif
+ #endif
+
+ #ifdef __BORLANDC__
+ #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0
+ #endif
+
+ #ifdef __PATHCC__
+ #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0
+ #endif
+
+// Default to using the concept asserts unless we have defined it off
+// during the search for black listed compilers.
+ #ifndef BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+ #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 1
+ #endif
+
+#endif
+
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+ #define BOOST_RANGE_CONCEPT_ASSERT( x ) BOOST_CONCEPT_ASSERT( x )
+#else
+ #define BOOST_RANGE_CONCEPT_ASSERT( x )
+#endif
+
+ // Rationale for the inclusion of redefined iterator concept
+ // classes:
+ //
+ // The Range algorithms often do not require that the iterators are
+ // Assignable or default constructable, but the correct standard
+ // conformant iterators do require the iterators to be a model of the
+ // Assignable concept.
+ // Iterators that contains a functor that is not assignable therefore
+ // are not correct models of the standard iterator concepts,
+ // despite being adequate for most algorithms. An example of this
+ // use case is the combination of the boost::adaptors::filtered
+ // class with a boost::lambda::bind generated functor.
+ // Ultimately modeling the range concepts using composition
+ // with the Boost.Iterator concepts would render the library
+ // incompatible with many common Boost.Lambda expressions.
+ template<class Iterator>
+ struct IncrementableIteratorConcept : CopyConstructible<Iterator>
+ {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+ typedef BOOST_DEDUCED_TYPENAME iterator_traversal<Iterator>::type traversal_category;
+
+ BOOST_RANGE_CONCEPT_ASSERT((
+ Convertible<
+ traversal_category,
+ incrementable_traversal_tag
+ >));
+
+ BOOST_CONCEPT_USAGE(IncrementableIteratorConcept)
+ {
+ ++i;
+ (void)i++;
+ }
+ private:
+ Iterator i;
+#endif
+ };
+
+ template<class Iterator>
+ struct SinglePassIteratorConcept
+ : IncrementableIteratorConcept<Iterator>
+ , EqualityComparable<Iterator>
+ {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+ BOOST_RANGE_CONCEPT_ASSERT((
+ Convertible<
+ BOOST_DEDUCED_TYPENAME SinglePassIteratorConcept::traversal_category,
+ single_pass_traversal_tag
+ >));
+
+ BOOST_CONCEPT_USAGE(SinglePassIteratorConcept)
+ {
+ Iterator i2(++i);
+ boost::ignore_unused_variable_warning(i2);
+
+ // deliberately we are loose with the postfix version for the single pass
+ // iterator due to the commonly poor adherence to the specification means that
+ // many algorithms would be unusable, whereas actually without the check they
+ // work
+ (void)(i++);
+
+ BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::reference r1(*i);
+ boost::ignore_unused_variable_warning(r1);
+
+ BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::reference r2(*(++i));
+ boost::ignore_unused_variable_warning(r2);
+ }
+ private:
+ Iterator i;
+#endif
+ };
+
+ template<class Iterator>
+ struct ForwardIteratorConcept
+ : SinglePassIteratorConcept<Iterator>
+ , DefaultConstructible<Iterator>
+ {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+ typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::difference_type difference_type;
+
+ BOOST_MPL_ASSERT((is_integral<difference_type>));
+ BOOST_MPL_ASSERT_RELATION(std::numeric_limits<difference_type>::is_signed, ==, true);
+
+ BOOST_RANGE_CONCEPT_ASSERT((
+ Convertible<
+ BOOST_DEDUCED_TYPENAME ForwardIteratorConcept::traversal_category,
+ forward_traversal_tag
+ >));
+
+ BOOST_CONCEPT_USAGE(ForwardIteratorConcept)
+ {
+ // See the above note in the SinglePassIteratorConcept about the handling of the
+ // postfix increment. Since with forward and better iterators there is no need
+ // for a proxy, we can sensibly require that the dereference result
+ // is convertible to reference.
+ Iterator i2(i++);
+ boost::ignore_unused_variable_warning(i2);
+ BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::reference r(*(i++));
+ boost::ignore_unused_variable_warning(r);
+ }
+ private:
+ Iterator i;
+#endif
+ };
+
+ template<class Iterator>
+ struct BidirectionalIteratorConcept
+ : ForwardIteratorConcept<Iterator>
+ {
+ #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+ BOOST_RANGE_CONCEPT_ASSERT((
+ Convertible<
+ BOOST_DEDUCED_TYPENAME BidirectionalIteratorConcept::traversal_category,
+ bidirectional_traversal_tag
+ >));
+
+ BOOST_CONCEPT_USAGE(BidirectionalIteratorConcept)
+ {
+ --i;
+ (void)i--;
+ }
+ private:
+ Iterator i;
+ #endif
+ };
+
+ template<class Iterator>
+ struct RandomAccessIteratorConcept
+ : BidirectionalIteratorConcept<Iterator>
+ {
+ #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+ BOOST_RANGE_CONCEPT_ASSERT((
+ Convertible<
+ BOOST_DEDUCED_TYPENAME RandomAccessIteratorConcept::traversal_category,
+ random_access_traversal_tag
+ >));
+
+ BOOST_CONCEPT_USAGE(RandomAccessIteratorConcept)
+ {
+ i += n;
+ i = i + n;
+ i = n + i;
+ i -= n;
+ i = i - n;
+ n = i - j;
+ }
+ private:
+ BOOST_DEDUCED_TYPENAME RandomAccessIteratorConcept::difference_type n;
+ Iterator i;
+ Iterator j;
+ #endif
+ };
+
+ } // namespace range_detail
+
+ //! Check if a type T models the SinglePassRange range concept.
+ template<class T>
+ struct SinglePassRangeConcept
+ {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<T const>::type const_iterator;
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<T>::type iterator;
+
+ BOOST_RANGE_CONCEPT_ASSERT((range_detail::SinglePassIteratorConcept<iterator>));
+ BOOST_RANGE_CONCEPT_ASSERT((range_detail::SinglePassIteratorConcept<const_iterator>));
+
+ BOOST_CONCEPT_USAGE(SinglePassRangeConcept)
+ {
+ // This has been modified from assigning to this->i
+ // (where i was a member variable) to improve
+ // compatibility with Boost.Lambda
+ iterator i1 = boost::begin(*m_range);
+ iterator i2 = boost::end(*m_range);
+
+ ignore_unused_variable_warning(i1);
+ ignore_unused_variable_warning(i2);
+
+ const_constraints(*m_range);
+ }
+
+ private:
+ void const_constraints(const T& const_range)
+ {
+ const_iterator ci1 = boost::begin(const_range);
+ const_iterator ci2 = boost::end(const_range);
+
+ ignore_unused_variable_warning(ci1);
+ ignore_unused_variable_warning(ci2);
+ }
+
+ // Rationale:
+ // The type of m_range is T* rather than T because it allows
+ // T to be an abstract class. The other obvious alternative of
+ // T& produces a warning on some compilers.
+ T* m_range;
+#endif
+ };
+
+ //! Check if a type T models the ForwardRange range concept.
+ template<class T>
+ struct ForwardRangeConcept : SinglePassRangeConcept<T>
+ {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+ BOOST_RANGE_CONCEPT_ASSERT((range_detail::ForwardIteratorConcept<BOOST_DEDUCED_TYPENAME ForwardRangeConcept::iterator>));
+ BOOST_RANGE_CONCEPT_ASSERT((range_detail::ForwardIteratorConcept<BOOST_DEDUCED_TYPENAME ForwardRangeConcept::const_iterator>));
+#endif
+ };
+
+ template<class Range>
+ struct WriteableRangeConcept
+ {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+ typedef BOOST_DEDUCED_TYPENAME range_iterator<Range>::type iterator;
+
+ BOOST_CONCEPT_USAGE(WriteableRangeConcept)
+ {
+ *i = v;
+ }
+ private:
+ iterator i;
+ BOOST_DEDUCED_TYPENAME range_value<Range>::type v;
+#endif
+ };
+
+ //! Check if a type T models the WriteableForwardRange range concept.
+ template<class T>
+ struct WriteableForwardRangeConcept
+ : ForwardRangeConcept<T>
+ , WriteableRangeConcept<T>
+ {
+ };
+
+ //! Check if a type T models the BidirectionalRange range concept.
+ template<class T>
+ struct BidirectionalRangeConcept : ForwardRangeConcept<T>
+ {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+ BOOST_RANGE_CONCEPT_ASSERT((BidirectionalIteratorConcept<BOOST_DEDUCED_TYPENAME BidirectionalRangeConcept::iterator>));
+ BOOST_RANGE_CONCEPT_ASSERT((BidirectionalIteratorConcept<BOOST_DEDUCED_TYPENAME BidirectionalRangeConcept::const_iterator>));
+#endif
+ };
+
+ //! Check if a type T models the WriteableBidirectionalRange range concept.
+ template<class T>
+ struct WriteableBidirectionalRangeConcept
+ : BidirectionalRangeConcept<T>
+ , WriteableRangeConcept<T>
+ {
+ };
+
+ //! Check if a type T models the RandomAccessRange range concept.
+ template<class T>
+ struct RandomAccessRangeConcept : BidirectionalRangeConcept<T>
+ {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+ BOOST_RANGE_CONCEPT_ASSERT((RandomAccessIteratorConcept<BOOST_DEDUCED_TYPENAME RandomAccessRangeConcept::iterator>));
+ BOOST_RANGE_CONCEPT_ASSERT((RandomAccessIteratorConcept<BOOST_DEDUCED_TYPENAME RandomAccessRangeConcept::const_iterator>));
+#endif
+ };
+
+ //! Check if a type T models the WriteableRandomAccessRange range concept.
+ template<class T>
+ struct WriteableRandomAccessRangeConcept
+ : RandomAccessRangeConcept<T>
+ , WriteableRangeConcept<T>
+ {
+ };
+
+} // namespace boost
+
+#endif // BOOST_RANGE_CONCEPTS_HPP
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_CONFIG_HPP
+#define BOOST_RANGE_CONFIG_HPP
+
+#include <boost/detail/workaround.hpp>
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_RANGE_DEDUCED_TYPENAME
+#error "macro already defined!"
+#endif
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+# define BOOST_RANGE_DEDUCED_TYPENAME typename
+#else
+# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) && !defined(_MSC_EXTENSIONS)
+# define BOOST_RANGE_DEDUCED_TYPENAME typename
+# else
+# define BOOST_RANGE_DEDUCED_TYPENAME BOOST_DEDUCED_TYPENAME
+# endif
+#endif
+
+#ifdef BOOST_RANGE_NO_ARRAY_SUPPORT
+#error "macro already defined!"
+#endif
+
+#if BOOST_WORKAROUND( BOOST_MSVC, < 1300 ) || BOOST_WORKAROUND( __MWERKS__, <= 0x3003 )
+#define BOOST_RANGE_NO_ARRAY_SUPPORT 1
+#endif
+
+#ifdef BOOST_RANGE_NO_ARRAY_SUPPORT
+#define BOOST_RANGE_ARRAY_REF() (boost_range_array)
+#define BOOST_RANGE_NO_STATIC_ASSERT
+#else
+#define BOOST_RANGE_ARRAY_REF() (&boost_range_array)
+#endif
+
+
+
+#endif
+
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_CONST_ITERATOR_HPP
+#define BOOST_RANGE_CONST_ITERATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/range/config.hpp>
+
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#include <boost/range/detail/const_iterator.hpp>
+#else
+
+#include <boost/range/detail/extract_optional_type.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <cstddef>
+#include <utility>
+
+namespace boost
+{
+ //////////////////////////////////////////////////////////////////////////
+ // default
+ //////////////////////////////////////////////////////////////////////////
+
+ namespace range_detail {
+ BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( const_iterator )
+ }
+
+ template< typename C >
+ struct range_const_iterator : range_detail::extract_const_iterator<C>
+ {};
+
+ //////////////////////////////////////////////////////////////////////////
+ // pair
+ //////////////////////////////////////////////////////////////////////////
+
+ template< typename Iterator >
+ struct range_const_iterator< std::pair<Iterator,Iterator> >
+ {
+ typedef Iterator type;
+ };
+
+ //////////////////////////////////////////////////////////////////////////
+ // array
+ //////////////////////////////////////////////////////////////////////////
+
+ template< typename T, std::size_t sz >
+ struct range_const_iterator< T[sz] >
+ {
+ typedef const T* type;
+ };
+
+} // namespace boost
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_BEGIN_HPP
+#define BOOST_RANGE_DETAIL_BEGIN_HPP
+
+#include <boost/config.hpp> // BOOST_MSVC
+#include <boost/detail/workaround.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/detail/common.hpp>
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1310)
+# include <boost/range/value_type.hpp>
+#endif
+
+namespace boost
+{
+
+ namespace range_detail
+ {
+ template< typename T >
+ struct range_begin;
+
+ //////////////////////////////////////////////////////////////////////
+ // default
+ //////////////////////////////////////////////////////////////////////
+
+ template<>
+ struct range_begin<std_container_>
+ {
+ template< typename C >
+ static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type fun( C& c )
+ {
+ return c.begin();
+ };
+ };
+
+ //////////////////////////////////////////////////////////////////////
+ // pair
+ //////////////////////////////////////////////////////////////////////
+
+ template<>
+ struct range_begin<std_pair_>
+ {
+ template< typename P >
+ static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type fun( const P& p )
+ {
+ return p.first;
+ }
+ };
+
+ //////////////////////////////////////////////////////////////////////
+ // array
+ //////////////////////////////////////////////////////////////////////
+
+ template<>
+ struct range_begin<array_>
+ {
+ #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)
+ template< typename T, std::size_t sz >
+ static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] )
+ {
+ return boost_range_array;
+ }
+ #else
+ template<typename T>
+ static BOOST_RANGE_DEDUCED_TYPENAME range_value<T>::type* fun(T& t)
+ {
+ return t;
+ }
+ #endif
+ };
+
+ } // namespace 'range_detail'
+
+ namespace range_adl_barrier
+ {
+ template< typename C >
+ inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
+ begin( C& c )
+ {
+ return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
+ }
+ }
+} // namespace 'boost'
+
+
+#endif
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_COMMON_HPP
+#define BOOST_RANGE_DETAIL_COMMON_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/range/config.hpp>
+#include <boost/range/detail/sfinae.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/type_traits/detail/ice_or.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/int.hpp>
+#include <cstddef>
+
+//////////////////////////////////////////////////////////////////////////////
+// missing partial specialization workaround.
+//////////////////////////////////////////////////////////////////////////////
+
+namespace boost
+{
+ namespace range_detail
+ {
+ // 1 = std containers
+ // 2 = std::pair
+ // 3 = const std::pair
+ // 4 = array
+ // 5 = const array
+ // 6 = char array
+ // 7 = wchar_t array
+ // 8 = char*
+ // 9 = const char*
+ // 10 = whar_t*
+ // 11 = const wchar_t*
+ // 12 = string
+
+ typedef mpl::int_<1>::type std_container_;
+ typedef mpl::int_<2>::type std_pair_;
+ typedef mpl::int_<3>::type const_std_pair_;
+ typedef mpl::int_<4>::type array_;
+ typedef mpl::int_<5>::type const_array_;
+ typedef mpl::int_<6>::type char_array_;
+ typedef mpl::int_<7>::type wchar_t_array_;
+ typedef mpl::int_<8>::type char_ptr_;
+ typedef mpl::int_<9>::type const_char_ptr_;
+ typedef mpl::int_<10>::type wchar_t_ptr_;
+ typedef mpl::int_<11>::type const_wchar_t_ptr_;
+ typedef mpl::int_<12>::type string_;
+
+ template< typename C >
+ struct range_helper
+ {
+ static C* c;
+ static C ptr;
+
+ BOOST_STATIC_CONSTANT( bool, is_pair_ = sizeof( boost::range_detail::is_pair_impl( c ) ) == sizeof( yes_type ) );
+ BOOST_STATIC_CONSTANT( bool, is_char_ptr_ = sizeof( boost::range_detail::is_char_ptr_impl( ptr ) ) == sizeof( yes_type ) );
+ BOOST_STATIC_CONSTANT( bool, is_const_char_ptr_ = sizeof( boost::range_detail::is_const_char_ptr_impl( ptr ) ) == sizeof( yes_type ) );
+ BOOST_STATIC_CONSTANT( bool, is_wchar_t_ptr_ = sizeof( boost::range_detail::is_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ) );
+ BOOST_STATIC_CONSTANT( bool, is_const_wchar_t_ptr_ = sizeof( boost::range_detail::is_const_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ) );
+ BOOST_STATIC_CONSTANT( bool, is_char_array_ = sizeof( boost::range_detail::is_char_array_impl( ptr ) ) == sizeof( yes_type ) );
+ BOOST_STATIC_CONSTANT( bool, is_wchar_t_array_ = sizeof( boost::range_detail::is_wchar_t_array_impl( ptr ) ) == sizeof( yes_type ) );
+ BOOST_STATIC_CONSTANT( bool, is_string_ = (boost::type_traits::ice_or<is_const_char_ptr_, is_const_wchar_t_ptr_>::value ));
+ BOOST_STATIC_CONSTANT( bool, is_array_ = boost::is_array<C>::value );
+
+ };
+
+ template< typename C >
+ class range
+ {
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_pair_,
+ boost::range_detail::std_pair_,
+ void >::type pair_t;
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_array_,
+ boost::range_detail::array_,
+ pair_t >::type array_t;
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_string_,
+ boost::range_detail::string_,
+ array_t >::type string_t;
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_const_char_ptr_,
+ boost::range_detail::const_char_ptr_,
+ string_t >::type const_char_ptr_t;
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_char_ptr_,
+ boost::range_detail::char_ptr_,
+ const_char_ptr_t >::type char_ptr_t;
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_const_wchar_t_ptr_,
+ boost::range_detail::const_wchar_t_ptr_,
+ char_ptr_t >::type const_wchar_ptr_t;
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_wchar_t_ptr_,
+ boost::range_detail::wchar_t_ptr_,
+ const_wchar_ptr_t >::type wchar_ptr_t;
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_wchar_t_array_,
+ boost::range_detail::wchar_t_array_,
+ wchar_ptr_t >::type wchar_array_t;
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper<C>::is_char_array_,
+ boost::range_detail::char_array_,
+ wchar_array_t >::type char_array_t;
+ public:
+ typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::is_void<char_array_t>::value,
+ boost::range_detail::std_container_,
+ char_array_t >::type type;
+ }; // class 'range'
+ }
+}
+
+#endif
+
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_CONST_ITERATOR_HPP
+#define BOOST_RANGE_DETAIL_CONST_ITERATOR_HPP
+
+#include <boost/range/detail/common.hpp>
+#include <boost/range/detail/remove_extent.hpp>
+
+//////////////////////////////////////////////////////////////////////////////
+// missing partial specialization workaround.
+//////////////////////////////////////////////////////////////////////////////
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template< typename T >
+ struct range_const_iterator_;
+
+ template<>
+ struct range_const_iterator_<std_container_>
+ {
+ template< typename C >
+ struct pts
+ {
+ typedef BOOST_RANGE_DEDUCED_TYPENAME C::const_iterator type;
+ };
+ };
+
+ template<>
+ struct range_const_iterator_<std_pair_>
+ {
+ template< typename P >
+ struct pts
+ {
+ typedef BOOST_RANGE_DEDUCED_TYPENAME P::first_type type;
+ };
+ };
+
+
+ template<>
+ struct range_const_iterator_<array_>
+ {
+ template< typename T >
+ struct pts
+ {
+ typedef const BOOST_RANGE_DEDUCED_TYPENAME
+ remove_extent<T>::type* type;
+ };
+ };
+ }
+
+ template< typename C >
+ class range_const_iterator
+ {
+ typedef BOOST_DEDUCED_TYPENAME range_detail::range<C>::type c_type;
+ public:
+ typedef BOOST_DEDUCED_TYPENAME range_detail::range_const_iterator_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type;
+ };
+
+}
+
+#endif
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_END_HPP
+#define BOOST_RANGE_DETAIL_END_HPP
+
+#include <boost/config.hpp> // BOOST_MSVC
+#include <boost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+# include <boost/range/detail/vc6/end.hpp>
+#else
+# include <boost/range/detail/implementation_help.hpp>
+# include <boost/range/iterator.hpp>
+# include <boost/range/detail/common.hpp>
+# if BOOST_WORKAROUND(BOOST_MSVC, < 1310)
+# include <boost/range/detail/remove_extent.hpp>
+# endif
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template< typename T >
+ struct range_end;
+
+ //////////////////////////////////////////////////////////////////////
+ // default
+ //////////////////////////////////////////////////////////////////////
+
+ template<>
+ struct range_end<std_container_>
+ {
+ template< typename C >
+ static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
+ fun( C& c )
+ {
+ return c.end();
+ };
+ };
+
+ //////////////////////////////////////////////////////////////////////
+ // pair
+ //////////////////////////////////////////////////////////////////////
+
+ template<>
+ struct range_end<std_pair_>
+ {
+ template< typename P >
+ static BOOST_RANGE_DEDUCED_TYPENAME range_iterator<P>::type
+ fun( const P& p )
+ {
+ return p.second;
+ }
+ };
+
+ //////////////////////////////////////////////////////////////////////
+ // array
+ //////////////////////////////////////////////////////////////////////
+
+ template<>
+ struct range_end<array_>
+ {
+ #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)
+ template< typename T, std::size_t sz >
+ static T* fun( T BOOST_RANGE_ARRAY_REF()[sz] )
+ {
+ return boost::range_detail::array_end( boost_range_array );
+ }
+ #else
+ template<typename T>
+ static BOOST_RANGE_DEDUCED_TYPENAME remove_extent<T>::type* fun(T& t)
+ {
+ return t + remove_extent<T>::size;
+ }
+ #endif
+ };
+
+ } // namespace 'range_detail'
+
+ namespace range_adl_barrier
+ {
+ template< typename C >
+ inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator<C>::type
+ end( C& c )
+ {
+ return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
+ }
+ } // namespace range_adl_barrier
+
+} // namespace 'boost'
+
+# endif // VC6
+#endif
--- /dev/null
+// Boost.Range library
+//
+// Copyright Arno Schoedl & Neil Groves 2009.
+// Use, modification and distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED
+#define BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_NO_PARTIAL_TEMPLATE_SPECIALIZATION
+
+#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \
+ template< typename C > \
+ struct extract_ ## a_typedef \
+ { \
+ typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \
+ };
+
+#else
+
+namespace boost {
+ namespace range_detail {
+ template< typename T > struct exists { typedef void type; };
+ }
+}
+
+// Defines extract_some_typedef<T> which exposes T::some_typedef as
+// extract_some_typedef<T>::type if T::some_typedef exists. Otherwise
+// extract_some_typedef<T> is empty.
+#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \
+ template< typename C, typename Enable=void > \
+ struct extract_ ## a_typedef \
+ {}; \
+ template< typename C > \
+ struct extract_ ## a_typedef< C \
+ , BOOST_DEDUCED_TYPENAME boost::range_detail::exists< BOOST_DEDUCED_TYPENAME C::a_typedef >::type \
+ > { \
+ typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \
+ };
+
+#endif
+
+#endif // include guard
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_IMPLEMENTATION_HELP_HPP
+#define BOOST_RANGE_DETAIL_IMPLEMENTATION_HELP_HPP
+
+#include <boost/range/config.hpp>
+#include <boost/range/detail/common.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <cstddef>
+#include <string.h>
+
+#ifndef BOOST_NO_CWCHAR
+#include <wchar.h>
+#endif
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template <typename T>
+ inline void boost_range_silence_warning( const T& ) { }
+
+ /////////////////////////////////////////////////////////////////////
+ // end() help
+ /////////////////////////////////////////////////////////////////////
+
+ inline const char* str_end( const char* s, const char* )
+ {
+ return s + strlen( s );
+ }
+
+#ifndef BOOST_NO_CWCHAR
+ inline const wchar_t* str_end( const wchar_t* s, const wchar_t* )
+ {
+ return s + wcslen( s );
+ }
+#else
+ inline const wchar_t* str_end( const wchar_t* s, const wchar_t* )
+ {
+ if( s == 0 || s[0] == 0 )
+ return s;
+ while( *++s != 0 )
+ ;
+ return s;
+ }
+#endif
+
+ template< class Char >
+ inline Char* str_end( Char* s )
+ {
+ return const_cast<Char*>( str_end( s, s ) );
+ }
+
+ template< class T, std::size_t sz >
+ inline T* array_end( T BOOST_RANGE_ARRAY_REF()[sz] )
+ {
+ return boost_range_array + sz;
+ }
+
+ template< class T, std::size_t sz >
+ inline const T* array_end( const T BOOST_RANGE_ARRAY_REF()[sz] )
+ {
+ return boost_range_array + sz;
+ }
+
+ /////////////////////////////////////////////////////////////////////
+ // size() help
+ /////////////////////////////////////////////////////////////////////
+
+ template< class Char >
+ inline std::size_t str_size( const Char* const& s )
+ {
+ return str_end( s ) - s;
+ }
+
+ template< class T, std::size_t sz >
+ inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz] )
+ {
+ boost_range_silence_warning( boost_range_array );
+ return sz;
+ }
+
+ template< class T, std::size_t sz >
+ inline std::size_t array_size( const T BOOST_RANGE_ARRAY_REF()[sz] )
+ {
+ boost_range_silence_warning( boost_range_array );
+ return sz;
+ }
+
+ } // namespace 'range_detail'
+
+} // namespace 'boost'
+
+
+#endif
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_ITERATOR_HPP
+#define BOOST_RANGE_DETAIL_ITERATOR_HPP
+
+#include <boost/range/detail/common.hpp>
+#include <boost/range/detail/remove_extent.hpp>
+
+#include <boost/static_assert.hpp>
+
+//////////////////////////////////////////////////////////////////////////////
+// missing partial specialization workaround.
+//////////////////////////////////////////////////////////////////////////////
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template< typename T >
+ struct range_iterator_ {
+ template< typename C >
+ struct pts
+ {
+ typedef int type;
+ };
+ };
+
+ template<>
+ struct range_iterator_<std_container_>
+ {
+ template< typename C >
+ struct pts
+ {
+ typedef BOOST_RANGE_DEDUCED_TYPENAME C::iterator type;
+ };
+ };
+
+ template<>
+ struct range_iterator_<std_pair_>
+ {
+ template< typename P >
+ struct pts
+ {
+ typedef BOOST_RANGE_DEDUCED_TYPENAME P::first_type type;
+ };
+ };
+
+ template<>
+ struct range_iterator_<array_>
+ {
+ template< typename T >
+ struct pts
+ {
+ typedef BOOST_RANGE_DEDUCED_TYPENAME
+ remove_extent<T>::type* type;
+ };
+ };
+
+ }
+
+ template< typename C >
+ class range_mutable_iterator
+ {
+ typedef BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type c_type;
+ public:
+ typedef typename range_detail::range_iterator_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type;
+ };
+}
+
+#endif
--- /dev/null
+// Boost.Range library concept checks
+//
+// Copyright Neil Groves 2009. 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)
+//
+#ifndef BOOST_RANGE_DETAIL_MISC_CONCEPT_HPP_INCLUDED
+#define BOOST_RANGE_DETAIL_MISC_CONCEPT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template<typename T1, typename T2>
+ class SameTypeConcept
+ {
+ public:
+ BOOST_CONCEPT_USAGE(SameTypeConcept)
+ {
+ same_type(a,b);
+ }
+ private:
+ template<typename T> void same_type(T,T) {}
+ T1 a;
+ T2 b;
+ };
+ }
+}
+
+#endif // include guard
--- /dev/null
+// Boost.Range library
+//
+// Copyright Jonathan Turkanis 2005. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+
+#ifndef BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP
+#define BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP
+
+#include <boost/config.hpp> // MSVC, NO_INTRINSIC_WCHAR_T, put size_t in std.
+#include <cstddef>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+
+ template< typename Case1 = mpl::true_,
+ typename Type1 = mpl::void_,
+ typename Case2 = mpl::true_,
+ typename Type2 = mpl::void_,
+ typename Case3 = mpl::true_,
+ typename Type3 = mpl::void_,
+ typename Case4 = mpl::true_,
+ typename Type4 = mpl::void_,
+ typename Case5 = mpl::true_,
+ typename Type5 = mpl::void_,
+ typename Case6 = mpl::true_,
+ typename Type6 = mpl::void_,
+ typename Case7 = mpl::true_,
+ typename Type7 = mpl::void_,
+ typename Case8 = mpl::true_,
+ typename Type8 = mpl::void_,
+ typename Case9 = mpl::true_,
+ typename Type9 = mpl::void_,
+ typename Case10 = mpl::true_,
+ typename Type10 = mpl::void_,
+ typename Case11 = mpl::true_,
+ typename Type11 = mpl::void_,
+ typename Case12 = mpl::true_,
+ typename Type12 = mpl::void_,
+ typename Case13 = mpl::true_,
+ typename Type13 = mpl::void_,
+ typename Case14 = mpl::true_,
+ typename Type14 = mpl::void_,
+ typename Case15 = mpl::true_,
+ typename Type15 = mpl::void_,
+ typename Case16 = mpl::true_,
+ typename Type16 = mpl::void_,
+ typename Case17 = mpl::true_,
+ typename Type17 = mpl::void_,
+ typename Case18 = mpl::true_,
+ typename Type18 = mpl::void_,
+ typename Case19 = mpl::true_,
+ typename Type19 = mpl::void_,
+ typename Case20 = mpl::true_,
+ typename Type20 = mpl::void_>
+ struct select {
+ typedef typename
+ mpl::eval_if<
+ Case1, mpl::identity<Type1>, mpl::eval_if<
+ Case2, mpl::identity<Type2>, mpl::eval_if<
+ Case3, mpl::identity<Type3>, mpl::eval_if<
+ Case4, mpl::identity<Type4>, mpl::eval_if<
+ Case5, mpl::identity<Type5>, mpl::eval_if<
+ Case6, mpl::identity<Type6>, mpl::eval_if<
+ Case7, mpl::identity<Type7>, mpl::eval_if<
+ Case8, mpl::identity<Type8>, mpl::eval_if<
+ Case9, mpl::identity<Type9>, mpl::if_<
+ Case10, Type10, mpl::void_ > > > > > > > > >
+ >::type result1;
+ typedef typename
+ mpl::eval_if<
+ Case11, mpl::identity<Type11>, mpl::eval_if<
+ Case12, mpl::identity<Type12>, mpl::eval_if<
+ Case13, mpl::identity<Type13>, mpl::eval_if<
+ Case14, mpl::identity<Type14>, mpl::eval_if<
+ Case15, mpl::identity<Type15>, mpl::eval_if<
+ Case16, mpl::identity<Type16>, mpl::eval_if<
+ Case17, mpl::identity<Type17>, mpl::eval_if<
+ Case18, mpl::identity<Type18>, mpl::eval_if<
+ Case19, mpl::identity<Type19>, mpl::if_<
+ Case20, Type20, mpl::void_ > > > > > > > > >
+ > result2;
+ typedef typename
+ mpl::eval_if<
+ is_same<result1, mpl::void_>,
+ result2,
+ mpl::identity<result1>
+ >::type type;
+ };
+
+ template<typename T>
+ struct remove_extent {
+ static T* ar;
+ BOOST_STATIC_CONSTANT(std::size_t, size = sizeof(*ar) / sizeof((*ar)[0]));
+
+ typedef typename
+ select<
+ is_same<T, bool[size]>, bool,
+ is_same<T, char[size]>, char,
+ is_same<T, signed char[size]>, signed char,
+ is_same<T, unsigned char[size]>, unsigned char,
+ #ifndef BOOST_NO_INTRINSIC_WCHAR_T
+ is_same<T, wchar_t[size]>, wchar_t,
+ #endif
+ is_same<T, short[size]>, short,
+ is_same<T, unsigned short[size]>, unsigned short,
+ is_same<T, int[size]>, int,
+ is_same<T, unsigned int[size]>, unsigned int,
+ is_same<T, long[size]>, long,
+ is_same<T, unsigned long[size]>, unsigned long,
+ is_same<T, float[size]>, float,
+ is_same<T, double[size]>, double,
+ is_same<T, long double[size]>, long double
+ >::type result1;
+ typedef typename
+ select<
+ is_same<T, const bool[size]>, const bool,
+ is_same<T, const char[size]>, const char,
+ is_same<T, const signed char[size]>, const signed char,
+ is_same<T, const unsigned char[size]>, const unsigned char,
+ #ifndef BOOST_NO_INTRINSIC_WCHAR_T
+ is_same<T, const wchar_t[size]>, const wchar_t,
+ #endif
+ is_same<T, const short[size]>, const short,
+ is_same<T, const unsigned short[size]>, const unsigned short,
+ is_same<T, const int[size]>, const int,
+ is_same<T, const unsigned int[size]>, const unsigned int,
+ is_same<T, const long[size]>, const long,
+ is_same<T, const unsigned long[size]>, const unsigned long,
+ is_same<T, const float[size]>, const float,
+ is_same<T, const double[size]>, const double,
+ is_same<T, const long double[size]>, const long double
+ > result2;
+ typedef typename
+ mpl::eval_if<
+ is_same<result1, mpl::void_>,
+ result2,
+ mpl::identity<result1>
+ >::type type;
+ };
+
+ } // namespace 'range_detail'
+
+} // namespace 'boost'
+
+
+#endif
--- /dev/null
+// This header intentionally has no include guards.
+//
+// Copyright (c) 2010 Neil Groves
+// 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
+//
+// This code utilises the experience gained during the evolution of
+// <boost/smart_ptr/operator_bool.hpp>
+#ifndef BOOST_RANGE_SAFE_BOOL_INCLUDED_HPP
+#define BOOST_RANGE_SAFE_BOOL_INCLUDED_HPP
+
+#include <boost/config.hpp>
+#include <boost/range/config.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+
+template<class DataMemberPtr>
+class safe_bool
+{
+public:
+ typedef safe_bool this_type;
+
+#if (defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570)) || defined(__CINT_)
+ typedef bool unspecified_bool_type;
+ static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr)
+ {
+ return x;
+ }
+#elif defined(_MANAGED)
+ static void unspecified_bool(this_type***)
+ {
+ }
+ typedef void(*unspecified_bool_type)(this_type***);
+ static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr)
+ {
+ return x ? unspecified_bool : 0;
+ }
+#elif \
+ ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \
+ ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \
+ ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) )
+
+ typedef bool (this_type::*unspecified_bool_type)() const;
+
+ static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr)
+ {
+ return x ? &this_type::detail_safe_bool_member_fn : 0;
+ }
+private:
+ bool detail_safe_bool_member_fn() const { return false; }
+#else
+ typedef DataMemberPtr unspecified_bool_type;
+ static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr p)
+ {
+ return x ? p : 0;
+ }
+#endif
+private:
+ safe_bool();
+ safe_bool(const safe_bool&);
+ void operator=(const safe_bool&);
+ ~safe_bool();
+};
+
+ } // namespace range_detail
+} // namespace boost
+
+#endif // include guard
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_SFINAE_HPP
+#define BOOST_RANGE_DETAIL_SFINAE_HPP
+
+#include <boost/range/config.hpp>
+#include <boost/type_traits/is_array.hpp>
+#include <boost/type_traits/detail/yes_no_type.hpp>
+#include <utility>
+
+
+namespace boost
+{
+ namespace range_detail
+ {
+ using type_traits::yes_type;
+ using type_traits::no_type;
+
+ //////////////////////////////////////////////////////////////////////
+ // string
+ //////////////////////////////////////////////////////////////////////
+
+ yes_type is_string_impl( const char* const );
+ yes_type is_string_impl( const wchar_t* const );
+ no_type is_string_impl( ... );
+
+ template< std::size_t sz >
+ yes_type is_char_array_impl( char BOOST_RANGE_ARRAY_REF()[sz] );
+ template< std::size_t sz >
+ yes_type is_char_array_impl( const char BOOST_RANGE_ARRAY_REF()[sz] );
+ no_type is_char_array_impl( ... );
+
+ template< std::size_t sz >
+ yes_type is_wchar_t_array_impl( wchar_t BOOST_RANGE_ARRAY_REF()[sz] );
+ template< std::size_t sz >
+ yes_type is_wchar_t_array_impl( const wchar_t BOOST_RANGE_ARRAY_REF()[sz] );
+ no_type is_wchar_t_array_impl( ... );
+
+ yes_type is_char_ptr_impl( char* const );
+ no_type is_char_ptr_impl( ... );
+
+ yes_type is_const_char_ptr_impl( const char* const );
+ no_type is_const_char_ptr_impl( ... );
+
+ yes_type is_wchar_t_ptr_impl( wchar_t* const );
+ no_type is_wchar_t_ptr_impl( ... );
+
+ yes_type is_const_wchar_t_ptr_impl( const wchar_t* const );
+ no_type is_const_wchar_t_ptr_impl( ... );
+
+ //////////////////////////////////////////////////////////////////////
+ // pair
+ //////////////////////////////////////////////////////////////////////
+
+ template< typename Iterator >
+ yes_type is_pair_impl( const std::pair<Iterator,Iterator>* );
+ no_type is_pair_impl( ... );
+
+ //////////////////////////////////////////////////////////////////////
+ // tags
+ //////////////////////////////////////////////////////////////////////
+
+ struct char_or_wchar_t_array_tag {};
+
+ } // namespace 'range_detail'
+
+} // namespace 'boost'
+
+#endif
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_SIZE_TYPE_HPP
+#define BOOST_RANGE_DETAIL_SIZE_TYPE_HPP
+
+#include <boost/range/detail/common.hpp>
+
+//////////////////////////////////////////////////////////////////////////////
+// missing partial specialization workaround.
+//////////////////////////////////////////////////////////////////////////////
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template< typename T >
+ struct range_size_type_
+ {
+ template< typename C >
+ struct pts
+ {
+ typedef std::size_t type;
+ };
+ };
+
+ template<>
+ struct range_size_type_<std_container_>
+ {
+ template< typename C >
+ struct pts
+ {
+ typedef BOOST_RANGE_DEDUCED_TYPENAME C::size_type type;
+ };
+ };
+ }
+
+ template< typename C >
+ class range_size
+ {
+ typedef typename range_detail::range<C>::type c_type;
+ public:
+ typedef typename range_detail::range_size_type_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type;
+ };
+}
+
+#endif
+
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DETAIL_VC6_END_HPP
+#define BOOST_RANGE_DETAIL_VC6_END_HPP
+
+#include <boost/range/detail/implementation_help.hpp>
+#include <boost/range/detail/implementation_help.hpp>
+#include <boost/range/result_iterator.hpp>
+#include <boost/range/detail/common.hpp>
+#include <boost/range/detail/remove_extent.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template< typename T >
+ struct range_end;
+
+ //////////////////////////////////////////////////////////////////////
+ // default
+ //////////////////////////////////////////////////////////////////////
+
+ template<>
+ struct range_end<std_container_>
+ {
+ template< typename C >
+ struct inner {
+ static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator<C>::type
+ fun( C& c )
+ {
+ return c.end();
+ };
+ };
+ };
+
+ //////////////////////////////////////////////////////////////////////
+ // pair
+ //////////////////////////////////////////////////////////////////////
+
+ template<>
+ struct range_end<std_pair_>
+ {
+ template< typename P >
+ struct inner {
+ static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator<P>::type
+ fun( const P& p )
+ {
+ return p.second;
+ }
+ };
+ };
+
+ //////////////////////////////////////////////////////////////////////
+ // array
+ //////////////////////////////////////////////////////////////////////
+
+ template<>
+ struct range_end<array_>
+ {
+ template< typename T >
+ struct inner {
+ static BOOST_DEDUCED_TYPENAME remove_extent<T>::type*
+ fun(T& t)
+ {
+ return t + remove_extent<T>::size;
+ }
+ };
+ };
+
+
+ template<>
+ struct range_end<char_array_>
+ {
+ template< typename T >
+ struct inner {
+ static BOOST_DEDUCED_TYPENAME remove_extent<T>::type*
+ fun(T& t)
+ {
+ return t + remove_extent<T>::size;
+ }
+ };
+ };
+
+ template<>
+ struct range_end<wchar_t_array_>
+ {
+ template< typename T >
+ struct inner {
+ static BOOST_DEDUCED_TYPENAME remove_extent<T>::type*
+ fun(T& t)
+ {
+ return t + remove_extent<T>::size;
+ }
+ };
+ };
+
+ //////////////////////////////////////////////////////////////////////
+ // string
+ //////////////////////////////////////////////////////////////////////
+
+ template<>
+ struct range_end<char_ptr_>
+ {
+ template< typename T >
+ struct inner {
+ static char* fun( char* s )
+ {
+ return boost::range_detail::str_end( s );
+ }
+ };
+ };
+
+ template<>
+ struct range_end<const_char_ptr_>
+ {
+ template< typename T >
+ struct inner {
+ static const char* fun( const char* s )
+ {
+ return boost::range_detail::str_end( s );
+ }
+ };
+ };
+
+ template<>
+ struct range_end<wchar_t_ptr_>
+ {
+ template< typename T >
+ struct inner {
+ static wchar_t* fun( wchar_t* s )
+ {
+ return boost::range_detail::str_end( s );
+ }
+ };
+ };
+
+
+ template<>
+ struct range_end<const_wchar_t_ptr_>
+ {
+ template< typename T >
+ struct inner {
+ static const wchar_t* fun( const wchar_t* s )
+ {
+ return boost::range_detail::str_end( s );
+ }
+ };
+ };
+
+ } // namespace 'range_detail'
+
+ template< typename C >
+ inline BOOST_DEDUCED_TYPENAME range_result_iterator<C>::type
+ end( C& c )
+ {
+ return range_detail::range_end<range_detail::range<C>::type>::inner<C>::fun( c );
+ }
+
+} // namespace 'boost'
+
+
+#endif
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DIFFERENCE_TYPE_HPP
+#define BOOST_RANGE_DIFFERENCE_TYPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/range/config.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/iterator/iterator_traits.hpp>
+
+namespace boost
+{
+ template< class T >
+ struct range_difference : iterator_difference< typename range_iterator<T>::type >
+ { };
+}
+
+#endif
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2006. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DISTANCE_HPP
+#define BOOST_RANGE_DISTANCE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/difference_type.hpp>
+
+namespace boost
+{
+
+ template< class T >
+ inline BOOST_DEDUCED_TYPENAME range_difference<T>::type
+ distance( const T& r )
+ {
+ return std::distance( boost::begin( r ), boost::end( r ) );
+ }
+
+} // namespace 'boost'
+
+#endif
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_EMPTY_HPP
+#define BOOST_RANGE_EMPTY_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/range/config.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+
+namespace boost
+{
+
+ template< class T >
+ inline bool empty( const T& r )
+ {
+ return boost::begin( r ) == boost::end( r );
+ }
+
+} // namespace 'boost'
+
+
+#endif
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_END_HPP
+#define BOOST_RANGE_END_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/range/config.hpp>
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+#include <boost/range/detail/end.hpp>
+#else
+
+#include <boost/range/detail/implementation_help.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/const_iterator.hpp>
+
+namespace boost
+{
+
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+ !BOOST_WORKAROUND(__GNUC__, < 3) \
+ /**/
+namespace range_detail
+{
+#endif
+
+ //////////////////////////////////////////////////////////////////////
+ // primary template
+ //////////////////////////////////////////////////////////////////////
+ template< typename C >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
+ range_end( C& c )
+ {
+ //
+ // If you get a compile-error here, it is most likely because
+ // you have not implemented range_begin() properly in
+ // the namespace of C
+ //
+ return c.end();
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // pair
+ //////////////////////////////////////////////////////////////////////
+
+ template< typename Iterator >
+ inline Iterator range_end( const std::pair<Iterator,Iterator>& p )
+ {
+ return p.second;
+ }
+
+ template< typename Iterator >
+ inline Iterator range_end( std::pair<Iterator,Iterator>& p )
+ {
+ return p.second;
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // array
+ //////////////////////////////////////////////////////////////////////
+
+ template< typename T, std::size_t sz >
+ inline const T* range_end( const T (&a)[sz] )
+ {
+ return range_detail::array_end<T,sz>( a );
+ }
+
+ template< typename T, std::size_t sz >
+ inline T* range_end( T (&a)[sz] )
+ {
+ return range_detail::array_end<T,sz>( a );
+ }
+
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+ !BOOST_WORKAROUND(__GNUC__, < 3) \
+ /**/
+} // namespace 'range_detail'
+#endif
+
+namespace range_adl_barrier
+{
+
+template< class T >
+inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type end( T& r )
+{
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+ !BOOST_WORKAROUND(__GNUC__, < 3) \
+ /**/
+ using namespace range_detail;
+#endif
+ return range_end( r );
+}
+
+template< class T >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type end( const T& r )
+{
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+ !BOOST_WORKAROUND(__GNUC__, < 3) \
+ /**/
+ using namespace range_detail;
+#endif
+ return range_end( r );
+}
+
+ } // namespace range_adl_barrier
+} // namespace 'boost'
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+namespace boost
+{
+ namespace range_adl_barrier
+ {
+ template< class T >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type
+ const_end( const T& r )
+ {
+ return boost::range_adl_barrier::end( r );
+ }
+ } // namespace range_adl_barrier
+ using namespace range_adl_barrier;
+} // namespace boost
+
+#endif
+
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2006. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_FUNCTIONS_HPP
+#define BOOST_RANGE_FUNCTIONS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/size.hpp>
+#include <boost/range/distance.hpp>
+#include <boost/range/empty.hpp>
+#include <boost/range/rbegin.hpp>
+#include <boost/range/rend.hpp>
+
+#endif
+
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ITERATOR_HPP
+#define BOOST_RANGE_ITERATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <boost/range/config.hpp>
+#include <boost/range/mutable_iterator.hpp>
+#include <boost/range/const_iterator.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/mpl/eval_if.hpp>
+
+namespace boost
+{
+
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+
+ namespace range_detail_vc7_1
+ {
+ template< typename C, typename Sig = void(C) >
+ struct range_iterator
+ {
+ typedef BOOST_RANGE_DEDUCED_TYPENAME
+ mpl::eval_if_c< is_const<C>::value,
+ range_const_iterator< typename remove_const<C>::type >,
+ range_mutable_iterator<C> >::type type;
+ };
+
+ template< typename C, typename T >
+ struct range_iterator< C, void(T[]) >
+ {
+ typedef T* type;
+ };
+ }
+
+#endif
+
+ template< typename C >
+ struct range_iterator
+ {
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+
+ typedef BOOST_RANGE_DEDUCED_TYPENAME
+ range_detail_vc7_1::range_iterator<C>::type type;
+
+#else
+
+ typedef BOOST_RANGE_DEDUCED_TYPENAME
+ mpl::eval_if_c< is_const<C>::value,
+ range_const_iterator< typename remove_const<C>::type >,
+ range_mutable_iterator<C> >::type type;
+
+#endif
+ };
+
+} // namespace boost
+
+//#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif
--- /dev/null
+// Boost.Range library
+//
+// Copyright Neil Groves & Thorsten Ottosen & Pavol Droba 2003-2004.
+// Use, modification and distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ITERATOR_RANGE_CORE_HPP_INCLUDED
+#define BOOST_RANGE_ITERATOR_RANGE_CORE_HPP_INCLUDED
+
+#include <boost/config.hpp> // Define __STL_CONFIG_H, if appropriate.
+#include <boost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
+ #pragma warning( push )
+ #pragma warning( disable : 4996 )
+#endif
+
+#include <boost/assert.hpp>
+#include <boost/iterator/iterator_traits.hpp>
+#include <boost/iterator/iterator_facade.hpp>
+#include <boost/type_traits/is_abstract.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/range/functions.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/algorithm/equal.hpp>
+#include <boost/range/detail/safe_bool.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <iterator>
+#include <algorithm>
+#include <cstddef>
+
+/*! \file
+ Defines the \c iterator_class and related functions.
+ \c iterator_range is a simple wrapper of iterator pair idiom. It provides
+ a rich subset of Container interface.
+*/
+
+
+namespace boost
+{
+ namespace iterator_range_detail
+ {
+ //
+ // The functions adl_begin and adl_end are implemented in a separate
+ // class for gcc-2.9x
+ //
+ template<class IteratorT>
+ struct iterator_range_impl {
+ template< class ForwardRange >
+ static IteratorT adl_begin( ForwardRange& r )
+ {
+ return static_cast<IteratorT>( boost::begin( r ) );
+ }
+
+ template< class ForwardRange >
+ static IteratorT adl_end( ForwardRange& r )
+ {
+ return static_cast<IteratorT>( boost::end( r ) );
+ }
+ };
+
+ template< class Left, class Right >
+ inline bool less_than( const Left& l, const Right& r )
+ {
+ return std::lexicographical_compare( boost::begin(l),
+ boost::end(l),
+ boost::begin(r),
+ boost::end(r) );
+ }
+
+ template< class Left, class Right >
+ inline bool greater_than( const Left& l, const Right& r )
+ {
+ return less_than(r,l);
+ }
+
+ template< class Left, class Right >
+ inline bool less_or_equal_than( const Left& l, const Right& r )
+ {
+ return !iterator_range_detail::less_than(r,l);
+ }
+
+ template< class Left, class Right >
+ inline bool greater_or_equal_than( const Left& l, const Right& r )
+ {
+ return !iterator_range_detail::less_than(l,r);
+ }
+
+ // This version is maintained since it is used in other boost libraries
+ // such as Boost.Assign
+ template< class Left, class Right >
+ inline bool equal(const Left& l, const Right& r)
+ {
+ return boost::equal(l, r);
+ }
+
+ struct range_tag { };
+ struct const_range_tag { };
+ }
+
+// iterator range template class -----------------------------------------//
+
+ //! iterator_range class
+ /*!
+ An \c iterator_range delimits a range in a sequence by beginning and ending iterators.
+ An iterator_range can be passed to an algorithm which requires a sequence as an input.
+ For example, the \c toupper() function may be used most frequently on strings,
+ but can also be used on iterator_ranges:
+
+ \code
+ boost::tolower( find( s, "UPPERCASE STRING" ) );
+ \endcode
+
+ Many algorithms working with sequences take a pair of iterators,
+ delimiting a working range, as an arguments. The \c iterator_range class is an
+ encapsulation of a range identified by a pair of iterators.
+ It provides a collection interface,
+ so it is possible to pass an instance to an algorithm requiring a collection as an input.
+ */
+ template<class IteratorT>
+ class iterator_range
+ {
+ typedef range_detail::safe_bool< IteratorT iterator_range<IteratorT>::* > safe_bool_t;
+ protected: // Used by sub_range
+ //! implementation class
+ typedef iterator_range_detail::iterator_range_impl<IteratorT> impl;
+ public:
+ //! this type
+ typedef iterator_range<IteratorT> type;
+ typedef BOOST_DEDUCED_TYPENAME safe_bool_t::unspecified_bool_type unspecified_bool_type;
+ //BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type);
+
+ //! Encapsulated value type
+ typedef BOOST_DEDUCED_TYPENAME
+ iterator_value<IteratorT>::type value_type;
+
+ //! Difference type
+ typedef BOOST_DEDUCED_TYPENAME
+ iterator_difference<IteratorT>::type difference_type;
+
+ //! Size type
+ typedef std::size_t size_type; // note: must be unsigned
+
+ //! This type
+ typedef iterator_range<IteratorT> this_type;
+
+ //! Reference type
+ //
+ // Needed because value-type is the same for
+ // const and non-const iterators
+ //
+ typedef BOOST_DEDUCED_TYPENAME
+ iterator_reference<IteratorT>::type reference;
+
+ //! const_iterator type
+ /*!
+ There is no distinction between const_iterator and iterator.
+ These typedefs are provides to fulfill container interface
+ */
+ typedef IteratorT const_iterator;
+ //! iterator type
+ typedef IteratorT iterator;
+
+ private: // for return value of operator()()
+ typedef BOOST_DEDUCED_TYPENAME
+ boost::mpl::if_< boost::is_abstract<value_type>,
+ reference, value_type >::type abstract_value_type;
+
+ public:
+ iterator_range() : m_Begin( iterator() ), m_End( iterator() )
+ { }
+
+ //! Constructor from a pair of iterators
+ template< class Iterator >
+ iterator_range( Iterator Begin, Iterator End ) :
+ m_Begin(Begin), m_End(End)
+ {}
+
+ //! Constructor from a Range
+ template< class Range >
+ iterator_range( const Range& r ) :
+ m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+ {}
+
+ //! Constructor from a Range
+ template< class Range >
+ iterator_range( Range& r ) :
+ m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+ {}
+
+ //! Constructor from a Range
+ template< class Range >
+ iterator_range( const Range& r, iterator_range_detail::const_range_tag ) :
+ m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+ {}
+
+ //! Constructor from a Range
+ template< class Range >
+ iterator_range( Range& r, iterator_range_detail::range_tag ) :
+ m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+ {}
+
+ #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+ this_type& operator=( const this_type& r )
+ {
+ m_Begin = r.begin();
+ m_End = r.end();
+ return *this;
+ }
+ #endif
+
+ template< class Iterator >
+ iterator_range& operator=( const iterator_range<Iterator>& r )
+ {
+ m_Begin = r.begin();
+ m_End = r.end();
+ return *this;
+ }
+
+ template< class ForwardRange >
+ iterator_range& operator=( ForwardRange& r )
+ {
+ m_Begin = impl::adl_begin( r );
+ m_End = impl::adl_end( r );
+ return *this;
+ }
+
+ template< class ForwardRange >
+ iterator_range& operator=( const ForwardRange& r )
+ {
+ m_Begin = impl::adl_begin( r );
+ m_End = impl::adl_end( r );
+ return *this;
+ }
+
+ IteratorT begin() const
+ {
+ return m_Begin;
+ }
+
+ IteratorT end() const
+ {
+ return m_End;
+ }
+
+ difference_type size() const
+ {
+ return m_End - m_Begin;
+ }
+
+ bool empty() const
+ {
+ return m_Begin == m_End;
+ }
+
+ operator unspecified_bool_type() const
+ {
+ return safe_bool_t::to_unspecified_bool(m_Begin != m_End, &iterator_range::m_Begin);
+ }
+
+ bool operator!() const
+ {
+ return empty();
+ }
+
+ bool equal( const iterator_range& r ) const
+ {
+ return m_Begin == r.m_Begin && m_End == r.m_End;
+ }
+
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+ bool operator==( const iterator_range& r ) const
+ {
+ return boost::equal( *this, r );
+ }
+
+ bool operator!=( const iterator_range& r ) const
+ {
+ return !operator==(r);
+ }
+
+ bool operator<( const iterator_range& r ) const
+ {
+ return iterator_range_detail::less_than( *this, r );
+ }
+
+ bool operator>( const iterator_range& r ) const
+ {
+ return iterator_range_detail::greater_than( *this, r );
+ }
+
+ bool operator<=( const iterator_range& r ) const
+ {
+ return iterator_range_detail::less_or_equal_than( *this, r );
+ }
+
+ bool operator>=( const iterator_range& r ) const
+ {
+ return iterator_range_detail::greater_or_equal_than( *this, r );
+ }
+
+#endif
+
+ public: // convenience
+ reference front() const
+ {
+ BOOST_ASSERT( !empty() );
+ return *m_Begin;
+ }
+
+ reference back() const
+ {
+ BOOST_ASSERT( !empty() );
+ IteratorT last( m_End );
+ return *--last;
+ }
+
+ // pop_front() - added to model the SinglePassRangePrimitiveConcept
+ void pop_front()
+ {
+ BOOST_ASSERT( !empty() );
+ ++m_Begin;
+ }
+
+ // pop_back() - added to model the BidirectionalRangePrimitiveConcept
+ void pop_back()
+ {
+ BOOST_ASSERT( !empty() );
+ --m_End;
+ }
+
+ reference operator[]( difference_type at ) const
+ {
+ BOOST_ASSERT( at >= 0 && at < size() );
+ return m_Begin[at];
+ }
+
+ //
+ // When storing transform iterators, operator[]()
+ // fails because it returns by reference. Therefore
+ // operator()() is provided for these cases.
+ //
+ abstract_value_type operator()( difference_type at ) const
+ {
+ BOOST_ASSERT( at >= 0 && at < size() );
+ return m_Begin[at];
+ }
+
+ iterator_range& advance_begin( difference_type n )
+ {
+ std::advance( m_Begin, n );
+ return *this;
+ }
+
+ iterator_range& advance_end( difference_type n )
+ {
+ std::advance( m_End, n );
+ return *this;
+ }
+
+ private:
+ // begin and end iterators
+ IteratorT m_Begin;
+ IteratorT m_End;
+
+ protected:
+ //
+ // Allow subclasses an easy way to access the
+ // base type
+ //
+ typedef iterator_range iterator_range_;
+ };
+
+// iterator range free-standing operators ---------------------------//
+
+ /////////////////////////////////////////////////////////////////////
+ // comparison operators
+ /////////////////////////////////////////////////////////////////////
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator==( const ForwardRange& l,
+ const iterator_range<IteratorT>& r )
+ {
+ return boost::equal( l, r );
+ }
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator!=( const ForwardRange& l,
+ const iterator_range<IteratorT>& r )
+ {
+ return !boost::equal( l, r );
+ }
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator<( const ForwardRange& l,
+ const iterator_range<IteratorT>& r )
+ {
+ return iterator_range_detail::less_than( l, r );
+ }
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator<=( const ForwardRange& l,
+ const iterator_range<IteratorT>& r )
+ {
+ return iterator_range_detail::less_or_equal_than( l, r );
+ }
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator>( const ForwardRange& l,
+ const iterator_range<IteratorT>& r )
+ {
+ return iterator_range_detail::greater_than( l, r );
+ }
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator>=( const ForwardRange& l,
+ const iterator_range<IteratorT>& r )
+ {
+ return iterator_range_detail::greater_or_equal_than( l, r );
+ }
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+#else
+ template< class Iterator1T, class Iterator2T >
+ inline bool operator==( const iterator_range<Iterator1T>& l,
+ const iterator_range<Iterator2T>& r )
+ {
+ return boost::equal( l, r );
+ }
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator==( const iterator_range<IteratorT>& l,
+ const ForwardRange& r )
+ {
+ return boost::equal( l, r );
+ }
+
+
+ template< class Iterator1T, class Iterator2T >
+ inline bool operator!=( const iterator_range<Iterator1T>& l,
+ const iterator_range<Iterator2T>& r )
+ {
+ return !boost::equal( l, r );
+ }
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator!=( const iterator_range<IteratorT>& l,
+ const ForwardRange& r )
+ {
+ return !boost::equal( l, r );
+ }
+
+
+ template< class Iterator1T, class Iterator2T >
+ inline bool operator<( const iterator_range<Iterator1T>& l,
+ const iterator_range<Iterator2T>& r )
+ {
+ return iterator_range_detail::less_than( l, r );
+ }
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator<( const iterator_range<IteratorT>& l,
+ const ForwardRange& r )
+ {
+ return iterator_range_detail::less_than( l, r );
+ }
+
+ template< class Iterator1T, class Iterator2T >
+ inline bool operator<=( const iterator_range<Iterator1T>& l,
+ const iterator_range<Iterator2T>& r )
+ {
+ return iterator_range_detail::less_or_equal_than( l, r );
+ }
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator<=( const iterator_range<IteratorT>& l,
+ const ForwardRange& r )
+ {
+ return iterator_range_detail::less_or_equal_than( l, r );
+ }
+
+ template< class Iterator1T, class Iterator2T >
+ inline bool operator>( const iterator_range<Iterator1T>& l,
+ const iterator_range<Iterator2T>& r )
+ {
+ return iterator_range_detail::greater_than( l, r );
+ }
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator>( const iterator_range<IteratorT>& l,
+ const ForwardRange& r )
+ {
+ return iterator_range_detail::greater_than( l, r );
+ }
+
+ template< class Iterator1T, class Iterator2T >
+ inline bool operator>=( const iterator_range<Iterator1T>& l,
+ const iterator_range<Iterator2T>& r )
+ {
+ return iterator_range_detail::greater_or_equal_than( l, r );
+ }
+
+ template< class IteratorT, class ForwardRange >
+ inline bool operator>=( const iterator_range<IteratorT>& l,
+ const ForwardRange& r )
+ {
+ return iterator_range_detail::greater_or_equal_than( l, r );
+ }
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+// iterator range utilities -----------------------------------------//
+
+ //! iterator_range construct helper
+ /*!
+ Construct an \c iterator_range from a pair of iterators
+
+ \param Begin A begin iterator
+ \param End An end iterator
+ \return iterator_range object
+ */
+ template< typename IteratorT >
+ inline iterator_range< IteratorT >
+ make_iterator_range( IteratorT Begin, IteratorT End )
+ {
+ return iterator_range<IteratorT>( Begin, End );
+ }
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+ template< typename Range >
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+ make_iterator_range( Range& r )
+ {
+ return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+ ( boost::begin( r ), boost::end( r ) );
+ }
+
+#else
+ //! iterator_range construct helper
+ /*!
+ Construct an \c iterator_range from a \c Range containing the begin
+ and end iterators.
+ */
+ template< class ForwardRange >
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
+ make_iterator_range( ForwardRange& r )
+ {
+ return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
+ ( r, iterator_range_detail::range_tag() );
+ }
+
+ template< class ForwardRange >
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type >
+ make_iterator_range( const ForwardRange& r )
+ {
+ return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type >
+ ( r, iterator_range_detail::const_range_tag() );
+ }
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+ namespace iterator_range_detail
+ {
+ template< class Range >
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+ make_range_impl( Range& r,
+ BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
+ BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
+ {
+ //
+ // Not worth the effort
+ //
+ //if( advance_begin == 0 && advance_end == 0 )
+ // return make_iterator_range( r );
+ //
+
+ BOOST_DEDUCED_TYPENAME range_iterator<Range>::type
+ new_begin = boost::begin( r ),
+ new_end = boost::end( r );
+ std::advance( new_begin, advance_begin );
+ std::advance( new_end, advance_end );
+ return make_iterator_range( new_begin, new_end );
+ }
+ }
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+ template< class Range >
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+ make_iterator_range( Range& r,
+ BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
+ BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
+ {
+ //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
+ return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
+ }
+
+#else
+
+ template< class Range >
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+ make_iterator_range( Range& r,
+ BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
+ BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
+ {
+ //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
+ return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
+ }
+
+ template< class Range >
+ inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type >
+ make_iterator_range( const Range& r,
+ BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
+ BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
+ {
+ //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
+ return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
+ }
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+ //! copy a range into a sequence
+ /*!
+ Construct a new sequence of the specified type from the elements
+ in the given range
+
+ \param Range An input range
+ \return New sequence
+ */
+ template< typename SeqT, typename Range >
+ inline SeqT copy_range( const Range& r )
+ {
+ return SeqT( boost::begin( r ), boost::end( r ) );
+ }
+
+} // namespace 'boost'
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
+ #pragma warning( pop )
+#endif
+
+#endif
+
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_MUTABLE_ITERATOR_HPP
+#define BOOST_RANGE_MUTABLE_ITERATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/range/config.hpp>
+
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#include <boost/range/detail/iterator.hpp>
+#else
+
+#include <boost/range/detail/extract_optional_type.hpp>
+#include <boost/iterator/iterator_traits.hpp>
+#include <cstddef>
+#include <utility>
+
+namespace boost
+{
+ //////////////////////////////////////////////////////////////////////////
+ // default
+ //////////////////////////////////////////////////////////////////////////
+
+ namespace range_detail {
+ BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( iterator )
+ }
+
+ template< typename C >
+ struct range_mutable_iterator : range_detail::extract_iterator<C>
+ {};
+
+ //////////////////////////////////////////////////////////////////////////
+ // pair
+ //////////////////////////////////////////////////////////////////////////
+
+ template< typename Iterator >
+ struct range_mutable_iterator< std::pair<Iterator,Iterator> >
+ {
+ typedef Iterator type;
+ };
+
+ //////////////////////////////////////////////////////////////////////////
+ // array
+ //////////////////////////////////////////////////////////////////////////
+
+ template< typename T, std::size_t sz >
+ struct range_mutable_iterator< T[sz] >
+ {
+ typedef T* type;
+ };
+
+} // namespace boost
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#endif
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_RBEGIN_HPP
+#define BOOST_RANGE_RBEGIN_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/range/end.hpp>
+#include <boost/range/reverse_iterator.hpp>
+
+namespace boost
+{
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+template< class C >
+inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
+rbegin( C& c )
+{
+ return BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type( boost::end( c ) );
+}
+
+#else
+
+template< class C >
+inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
+rbegin( C& c )
+{
+ typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
+ iter_type;
+ return iter_type( boost::end( c ) );
+}
+
+template< class C >
+inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const C>::type
+rbegin( const C& c )
+{
+ typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<const C>::type
+ iter_type;
+ return iter_type( boost::end( c ) );
+}
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+template< class T >
+inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const T>::type
+const_rbegin( const T& r )
+{
+ return boost::rbegin( r );
+}
+
+} // namespace 'boost'
+
+#endif
+
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_REND_HPP
+#define BOOST_RANGE_REND_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/range/begin.hpp>
+#include <boost/range/reverse_iterator.hpp>
+
+namespace boost
+{
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+template< class C >
+inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
+rend( C& c )
+{
+ return BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type( boost::begin( c ) );
+}
+
+#else
+
+template< class C >
+inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
+rend( C& c )
+{
+ typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<C>::type
+ iter_type;
+ return iter_type( boost::begin( c ) );
+}
+
+template< class C >
+inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const C>::type
+rend( const C& c )
+{
+ typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator<const C>::type
+ iter_type;
+ return iter_type( boost::begin( c ) );
+}
+
+#endif
+
+template< class T >
+inline BOOST_DEDUCED_TYPENAME range_reverse_iterator<const T>::type
+const_rend( const T& r )
+{
+ return boost::rend( r );
+}
+
+} // namespace 'boost'
+
+#endif
+
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_RESULT_ITERATOR_HPP
+#define BOOST_RANGE_RESULT_ITERATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <boost/range/iterator.hpp>
+
+namespace boost
+{
+ //
+ // This interface is deprecated, use range_iterator<T>
+ //
+
+ template< typename C >
+ struct range_result_iterator : range_iterator<C>
+ { };
+
+} // namespace boost
+
+
+#endif
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_REVERSE_ITERATOR_HPP
+#define BOOST_RANGE_REVERSE_ITERATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/range/config.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/iterator/reverse_iterator.hpp>
+
+
+namespace boost
+{
+ //////////////////////////////////////////////////////////////////////////
+ // default
+ //////////////////////////////////////////////////////////////////////////
+
+ template< typename C >
+ struct range_reverse_iterator
+ {
+ typedef reverse_iterator<
+ BOOST_DEDUCED_TYPENAME range_iterator<C>::type > type;
+ };
+
+
+} // namespace boost
+
+
+#endif
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_SIZE_HPP
+#define BOOST_RANGE_SIZE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/range/config.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/size_type.hpp>
+#include <boost/assert.hpp>
+
+namespace boost
+{
+ namespace range_detail
+ {
+ template<class SinglePassRange>
+ inline BOOST_DEDUCED_TYPENAME range_size<const SinglePassRange>::type
+ range_calculate_size(const SinglePassRange& rng)
+ {
+ BOOST_ASSERT( (boost::end(rng) - boost::begin(rng)) >= 0 &&
+ "reachability invariant broken!" );
+ return boost::end(rng) - boost::begin(rng);
+ }
+ }
+
+ template<class SinglePassRange>
+ inline BOOST_DEDUCED_TYPENAME range_size<const SinglePassRange>::type
+ size(const SinglePassRange& rng)
+ {
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
+ !BOOST_WORKAROUND(__GNUC__, < 3) \
+ /**/
+ using namespace range_detail;
+#endif
+ return range_calculate_size(rng);
+ }
+
+} // namespace 'boost'
+
+#endif
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_SIZE_TYPE_HPP
+#define BOOST_RANGE_SIZE_TYPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <boost/range/config.hpp>
+#include <boost/range/difference_type.hpp>
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#include <boost/range/detail/size_type.hpp>
+#else
+
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/make_unsigned.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <cstddef>
+#include <utility>
+
+namespace boost
+{
+ namespace detail
+ {
+
+ //////////////////////////////////////////////////////////////////////////
+ // default
+ //////////////////////////////////////////////////////////////////////////
+
+ template<typename T>
+ class has_size_type
+ {
+ typedef char no_type;
+ struct yes_type { char dummy[2]; };
+
+ template<typename C>
+ static yes_type test(BOOST_DEDUCED_TYPENAME C::size_type x);
+
+ template<typename C, typename Arg>
+ static no_type test(Arg x);
+
+ public:
+ static const bool value = sizeof(test<T>(0)) == sizeof(yes_type);
+ };
+
+ template<typename C, typename Enabler=void>
+ struct range_size
+ {
+ typedef BOOST_DEDUCED_TYPENAME make_unsigned<
+ BOOST_DEDUCED_TYPENAME range_difference<C>::type
+ >::type type;
+ };
+
+ template<typename C>
+ struct range_size<
+ C,
+ BOOST_DEDUCED_TYPENAME enable_if<has_size_type<C>, void>::type
+ >
+ {
+ typedef BOOST_DEDUCED_TYPENAME C::size_type type;
+ };
+
+ }
+
+ template< class T >
+ struct range_size :
+ detail::range_size<T>
+ { };
+
+ template< class T >
+ struct range_size<const T >
+ : detail::range_size<T>
+ { };
+
+} // namespace boost
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+
+#endif
--- /dev/null
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_VALUE_TYPE_HPP
+#define BOOST_RANGE_VALUE_TYPE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/range/config.hpp>
+#include <boost/range/iterator.hpp>
+
+//#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+//#include <boost/range/detail/value_type.hpp>
+//#else
+
+#include <boost/iterator/iterator_traits.hpp>
+
+namespace boost
+{
+ template< class T >
+ struct range_value : iterator_value< typename range_iterator<T>::type >
+ { };
+}
+
+#endif
# define BOOST_REGEX_HAS_OTHER_WCHAR_T
# ifdef BOOST_MSVC
# pragma warning(push)
-# pragma warning(disable : 4251 4231 4660)
+# pragma warning(disable : 4251 4231)
+# if BOOST_MSVC < 1600
+# pragma warning(disable : 4660)
+# endif
# endif
# if defined(_DLL) && defined(BOOST_MSVC) && (BOOST_MSVC < 1600)
# include <string>
--s;
}
else
- --pos;
+ ++pos;
}
BOOST_ASSERT(s_data.index[k]->first.get() == result.get());
BOOST_ASSERT(&(s_data.index.find(k)->first) == s_data.cont.back().second);
}
void increment()
{
+ // We must not start with a continuation character:
+ if((static_cast<boost::uint8_t>(*m_position) & 0xC0) == 0x80)
+ invalid_sequence();
// skip high surrogate first if there is one:
unsigned c = detail::utf8_byte_count(*m_position);
- std::advance(m_position, c);
+ if(m_value == pending_read)
+ {
+ // Since we haven't read in a value, we need to validate the code points:
+ for(unsigned i = 0; i < c; ++i)
+ {
+ ++m_position;
+ // We must have a continuation byte:
+ if((i != c - 1) && ((static_cast<boost::uint8_t>(*m_position) & 0xC0) != 0x80))
+ invalid_sequence();
+ }
+ }
+ else
+ {
+ std::advance(m_position, c);
+ }
m_value = pending_read;
}
void decrement()
// we must not have a continuation character:
if((m_value & 0xC0u) == 0x80u)
invalid_sequence();
- // see how many extra byts we have:
+ // see how many extra bytes we have:
unsigned extra = detail::utf8_trailing_byte_count(*m_position);
// extract the extra bits, 6 from each extra byte:
BaseIterator next(m_position);
{
++next;
m_value <<= 6;
+ // We must have a continuation byte:
+ if((static_cast<boost::uint8_t>(*next) & 0xC0) != 0x80)
+ invalid_sequence();
m_value += static_cast<boost::uint8_t>(*next) & 0x3Fu;
}
// we now need to remove a few of the leftmost bits, but how many depends
namespace boost{
#ifdef BOOST_MSVC
#pragma warning(push)
-#pragma warning(disable : 4251 4231 4660 4800)
+#pragma warning(disable : 4251 4231 4800)
+#if BOOST_MSVC < 1600
+#pragma warning(disable : 4660)
+#endif
#endif
namespace re_detail{
// begin, end:
const_iterator BOOST_REGEX_CALL begin()const
{
- return (!this->m_status ? 0 : this->m_expression);
+ return (this->m_status ? 0 : this->m_expression);
}
const_iterator BOOST_REGEX_CALL end()const
{
- return (!this->m_status ? 0 : this->m_expression + this->m_expression_len);
+ return (this->m_status ? 0 : this->m_expression + this->m_expression_len);
}
flag_type BOOST_REGEX_CALL flags()const
{
public:
typedef digraph<charT> digraph_type;
typedef typename traits::string_type string_type;
- typedef typename traits::char_class_type mask_type;
+ typedef typename traits::char_class_type m_type;
basic_char_set()
{
}
m_empty = false;
}
- void add_class(mask_type m)
+ void add_class(m_type m)
{
m_classes |= m;
m_empty = false;
}
- void add_negated_class(mask_type m)
+ void add_negated_class(m_type m)
{
m_negated_classes |= m;
m_empty = false;
{
return m_equivalents.end();
}
- mask_type classes()const
+ m_type classes()const
{
return m_classes;
}
- mask_type negated_classes()const
+ m_type negated_classes()const
{
return m_negated_classes;
}
std::vector<digraph_type> m_ranges; // a list of end points of our ranges
bool m_negate; // true if the set is to be negated
bool m_has_digraphs; // true if we have digraphs present
- mask_type m_classes; // character classes to match
- mask_type m_negated_classes; // negated character classes to match
+ m_type m_classes; // character classes to match
+ m_type m_negated_classes; // negated character classes to match
bool m_empty; // whether we've added anything yet
std::vector<digraph_type> m_equivalents; // a list of equivalence classes
};
{
typedef typename traits::string_type string_type;
typedef typename basic_char_set<charT, traits>::list_iterator item_iterator;
- typedef typename traits::char_class_type mask_type;
+ typedef typename traits::char_class_type m_type;
- re_set_long<mask_type>* result = static_cast<re_set_long<mask_type>*>(append_state(syntax_element_long_set, sizeof(re_set_long<mask_type>)));
+ re_set_long<m_type>* result = static_cast<re_set_long<m_type>*>(append_state(syntax_element_long_set, sizeof(re_set_long<m_type>)));
//
// fill in the basics:
//
//
// finally reset the address of our last state:
//
- m_last_state = result = static_cast<re_set_long<mask_type>*>(getaddress(offset));
+ m_last_state = result = static_cast<re_set_long<m_type>*>(getaddress(offset));
return result;
}
-namespace{
-
template<class T>
inline bool char_less(T t1, T t2)
{
return t1 < t2;
}
-template<>
-inline bool char_less<char>(char t1, char t2)
+inline bool char_less(char t1, char t2)
{
return static_cast<unsigned char>(t1) < static_cast<unsigned char>(t2);
}
-template<>
-inline bool char_less<signed char>(signed char t1, signed char t2)
+inline bool char_less(signed char t1, signed char t2)
{
return static_cast<unsigned char>(t1) < static_cast<unsigned char>(t2);
}
-}
template <class charT, class traits>
re_syntax_base* basic_regex_creator<charT, traits>::append_set(
}
else
{
- if(char_less<charT>(c2, c1))
+ if(char_less(c2, c1))
{
// Oops error:
return 0;
//
// and now the classes:
//
- typedef typename traits::char_class_type mask_type;
- mask_type m = char_set.classes();
+ typedef typename traits::char_class_type m_type;
+ m_type m = char_set.classes();
if(flags() & regbase::icase)
{
// adjust m as needed:
template <class charT, class traits>
int basic_regex_creator<charT, traits>::calculate_backstep(re_syntax_base* state)
{
- typedef typename traits::char_class_type mask_type;
+ typedef typename traits::char_class_type m_type;
int result = 0;
while(state)
{
state = rep->alt.p;
continue;
}
- else if((state->type == syntax_element_long_set_rep))
+ else if(state->type == syntax_element_long_set_rep)
{
BOOST_ASSERT(rep->next.p->type == syntax_element_long_set);
- if(static_cast<re_set_long<mask_type>*>(rep->next.p)->singleton == 0)
+ if(static_cast<re_set_long<m_type>*>(rep->next.p)->singleton == 0)
return -1;
if(rep->max != rep->min)
return -1;
}
return -1;
case syntax_element_long_set:
- if(static_cast<re_set_long<mask_type>*>(state)->singleton == 0)
+ if(static_cast<re_set_long<m_type>*>(state)->singleton == 0)
return -1;
result += 1;
break;
if(l_map)
{
l_map[0] |= mask_init;
- l_map['\n'] |= mask;
- l_map['\r'] |= mask;
- l_map['\f'] |= mask;
+ l_map[static_cast<unsigned>('\n')] |= mask;
+ l_map[static_cast<unsigned>('\r')] |= mask;
+ l_map[static_cast<unsigned>('\f')] |= mask;
l_map[0x85] |= mask;
}
// now figure out if we can match a NULL string at this point:
case syntax_element_long_set:
if(l_map)
{
- typedef typename traits::char_class_type mask_type;
- if(static_cast<re_set_long<mask_type>*>(state)->singleton)
+ typedef typename traits::char_class_type m_type;
+ if(static_cast<re_set_long<m_type>*>(state)->singleton)
{
l_map[0] |= mask_init;
for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i)
{
charT c = static_cast<charT>(i);
- if(&c != re_is_set_member(&c, &c + 1, static_cast<re_set_long<mask_type>*>(state), *m_pdata, l_icase))
+ if(&c != re_is_set_member(&c, &c + 1, static_cast<re_set_long<m_type>*>(state), *m_pdata, l_icase))
l_map[i] |= mask;
}
}
if(l_map)
{
l_map[0] |= mask_init;
- l_map['\n'] |= mask;
- l_map['\r'] |= mask;
+ l_map[static_cast<unsigned>('\n')] |= mask;
+ l_map[static_cast<unsigned>('\r')] |= mask;
}
if(pnull)
*pnull |= mask;
re_syntax_base* p = m_pdata->m_first_state;
while(p)
{
- if((p->type == syntax_element_recurse))
+ if(p->type == syntax_element_recurse)
{
re_brace* p2 = static_cast<re_brace*>(static_cast<re_jump*>(p)->alt.p);
if((p2->type == syntax_element_startmark) && (p2->index == static_cast<re_brace*>(state)->index))
template <class charT, class traits>
syntax_element_type basic_regex_creator<charT, traits>::get_repeat_type(re_syntax_base* state)
{
- typedef typename traits::char_class_type mask_type;
+ typedef typename traits::char_class_type m_type;
if(state->type == syntax_element_rep)
{
// check to see if we are repeating a single state:
case re_detail::syntax_element_set:
return re_detail::syntax_element_short_set_rep;
case re_detail::syntax_element_long_set:
- if(static_cast<re_detail::re_set_long<mask_type>*>(state->next.p)->singleton)
+ if(static_cast<re_detail::re_set_long<m_type>*>(state->next.p)->singleton)
return re_detail::syntax_element_long_set_rep;
break;
default:
this->m_pdata->m_status = error_code;
m_position = m_end; // don't bother parsing anything else
+#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
//
// Augment error message with the regular expression text:
//
}
message += "'.";
}
+#endif
#ifndef BOOST_NO_EXCEPTIONS
if(0 == (this->flags() & regex_constants::no_except))
bool basic_regex_parser<charT, traits>::parse_extended_escape()
{
++m_position;
+ if(m_position == m_end)
+ {
+ fail(regex_constants::error_escape, m_position - m_base, "Incomplete escape sequence found.");
+ return false;
+ }
bool negate = false; // in case this is a character class escape: \w \d etc
switch(this->m_traits.escape_syntax_type(*m_position))
{
case regex_constants::escape_type_class:
{
escape_type_class_jump:
- typedef typename traits::char_class_type mask_type;
- mask_type m = this->m_traits.lookup_classname(m_position, m_position+1);
+ typedef typename traits::char_class_type m_type;
+ m_type m = this->m_traits.lookup_classname(m_position, m_position+1);
if(m != 0)
{
basic_char_set<charT, traits> char_set;
++name_first;
negated = true;
}
- typedef typename traits::char_class_type mask_type;
- mask_type m = this->m_traits.lookup_classname(name_first, name_last);
+ typedef typename traits::char_class_type m_type;
+ m_type m = this->m_traits.lookup_classname(name_first, name_last);
if(m == 0)
{
if(char_set.empty() && (name_last - name_first == 1))
return false;
}
v = this->m_traits.toi(m_position, m_end, 10);
+ if(m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
if(*m_position == charT('R'))
{
if(++m_position == m_end)
this->m_pdata->m_data.align();
re_jump* jmp = static_cast<re_jump*>(this->getaddress(jump_offset));
jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp);
- if(this->m_last_state == jmp)
+ if((this->m_last_state == jmp) && (markid != -2))
{
- // Oops... we didn't have anything inside the assertion:
+ // Oops... we didn't have anything inside the assertion.
+ // Note we don't get here for negated forward lookahead as (?!)
+ // does have some uses.
// Rewind to start of (? sequence:
--m_position;
while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
#define BOOST_CPP_REGEX_TRAITS_HPP_INCLUDED
#include <boost/config.hpp>
+#include <boost/integer.hpp>
#ifndef BOOST_NO_STD_LOCALE
typename parser_buf<charT, traits>::pos_type
parser_buf<charT, traits>::seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which)
{
+ typedef typename boost::int_t<sizeof(way) * CHAR_BIT>::least cast_type;
+
if(which & ::std::ios_base::out)
return pos_type(off_type(-1));
std::ptrdiff_t size = this->egptr() - this->eback();
std::ptrdiff_t pos = this->gptr() - this->eback();
charT* g = this->eback();
- switch(way)
+ switch(static_cast<cast_type>(way))
{
case ::std::ios_base::beg:
if((off < 0) || (off > size))
# ifdef BOOST_MSVC
# pragma warning(push)
-# pragma warning(disable : 4251 4231 4660)
+# pragma warning(disable : 4251 4231)
+# if BOOST_MSVC < 1600
+# pragma warning(disable : 4660)
+# endif
# endif
template class BOOST_REGEX_TEMPLATE_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >;
#undef BOOST_REGEX_TEMPLATE_DECL
-#elif (defined(__GNUC__) && (__GNUC__ >= 3)) || !defined(BOOST_NO_EXTERN_TEMPLATE)
+#elif (defined(__GNUC__) && (__GNUC__ >= 3)) || !defined(BOOST_NO_CXX11_EXTERN_TEMPLATE)
# ifndef BOOST_REGEX_INSTANTIATE
# ifdef __GNUC__
namespace boost{
#ifdef BOOST_MSVC
#pragma warning(push)
-#pragma warning(disable : 4251 4231 4660)
+#pragma warning(disable : 4251 4231)
+# if BOOST_MSVC < 1600
+# pragma warning(disable : 4660)
+# endif
#endif
namespace re_detail{
#ifdef BOOST_MSVC
#pragma warning(push)
-#pragma warning(disable : 4251 4231 4660)
+#pragma warning(disable : 4251 4231)
+# if BOOST_MSVC < 1600
+# pragma warning(disable : 4660)
+# endif
#endif
template <class BidiIterator, class Allocator, class traits>
#ifdef __BORLANDC__
#pragma option push -w-8008 -w-8066 -w-8004
#endif
- typedef typename traits::char_class_type mask_type;
+ typedef typename traits::char_class_type m_type;
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
- const re_set_long<mask_type>* set = static_cast<const re_set_long<mask_type>*>(pstate->next.p);
+ const re_set_long<m_type>* set = static_cast<const re_set_long<m_type>*>(pstate->next.p);
std::size_t count = 0;
//
// start by working out how much we can skip:
}while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
}
+ // remember where we got to if this is a leading repeat:
+ if((rep->leading) && (count < rep->max))
+ restart = position;
if(position == last)
{
// can't repeat any more, remove the pushed state:
template <class BidiIterator, class Allocator, class traits>
bool perl_matcher<BidiIterator, Allocator, traits>::unwind_long_set_repeat(bool r)
{
- typedef typename traits::char_class_type mask_type;
+ typedef typename traits::char_class_type m_type;
saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
// if we have a match, just discard this state:
const re_repeat* rep = pmp->rep;
std::size_t count = pmp->count;
pstate = rep->next.p;
- const re_set_long<mask_type>* set = static_cast<const re_set_long<mask_type>*>(pstate);
+ const re_set_long<m_type>* set = static_cast<const re_set_long<m_type>*>(pstate);
position = pmp->last_position;
BOOST_ASSERT(rep->type == syntax_element_long_set_rep);
}
inline int toi(ForwardIter& i, ForwardIter j, int base)
{
+#if defined(_MSC_VER) && defined(__INTEL_COMPILER) && ((__INTEL_COMPILER == 9999) || (__INTEL_COMPILER == 1210))
+ // Workaround for Intel support issue #656654.
+ // See also https://svn.boost.org/trac/boost/ticket/6359
+ return toi(i, j, base, mpl::false_());
+#else
typedef typename boost::is_convertible<ForwardIter, const char_type*&>::type tag_type;
return toi(i, j, base, tag_type());
+#endif
}
const traits& m_traits; // the traits class for localised formatting operations
// flags |= match_prev_avail;
BidirectionalIterator next_start = what[0].second;
match_flag_type f(flags);
- if(!what.length())
+ if(!what.length() || (f & regex_constants::match_posix))
f |= regex_constants::match_not_initial_null;
//if(base != next_start)
// f |= regex_constants::match_not_bob;
connection release();
- inline void swap(scoped_connection&);
+ void swap(scoped_connection&);
scoped_connection& operator=(const connection&);
scoped_connection& operator=(const scoped_connection&);
|| slot_ == other.slot_));
}
-#if BOOST_WORKAROUND(_MSC_VER, <= 1600)
+#if BOOST_WORKAROUND(_MSC_VER, <= 1700)
void decrement();
void advance(difference_type);
#endif
--- /dev/null
+/*
+ * Copyright (c) 2012 Glen Joseph Fernandes
+ * glenfe at live dot com
+ *
+ * Distributed under the Boost Software License,
+ * Version 1.0. (See accompanying file LICENSE_1_0.txt
+ * or copy at http://boost.org/LICENSE_1_0.txt)
+ */
+#ifndef BOOST_SMART_PTR_ALLOCATE_SHARED_ARRAY_HPP
+#define BOOST_SMART_PTR_ALLOCATE_SHARED_ARRAY_HPP
+
+#include <boost/smart_ptr/shared_ptr.hpp>
+#include <boost/smart_ptr/detail/allocate_array_helper.hpp>
+#include <boost/smart_ptr/detail/array_deleter.hpp>
+#include <boost/smart_ptr/detail/array_traits.hpp>
+#include <boost/smart_ptr/detail/sp_if_array.hpp>
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list>
+#endif
+
+namespace boost {
+ template<typename T, typename A>
+ inline typename boost::detail::sp_if_array<T>::type
+ allocate_shared(const A& allocator, std::size_t size) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ T1* p1 = 0;
+ T2* p2 = 0;
+ std::size_t n1 = size * boost::detail::array_total<T1>::size;
+ boost::detail::allocate_array_helper<A, T2[]> a1(allocator, n1, &p2);
+ boost::detail::array_deleter<T2[]> d1(n1);
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[]>* D2;
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->init(p2);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template<typename T, typename A, typename... Args>
+ inline typename boost::detail::sp_if_array<T>::type
+ allocate_shared(const A& allocator, std::size_t size, Args&&... args) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ T1* p1 = 0;
+ T2* p2 = 0;
+ std::size_t n1 = size * boost::detail::array_total<T1>::size;
+ boost::detail::allocate_array_helper<A, T2[]> a1(allocator, n1, &p2);
+ boost::detail::array_deleter<T2[]> d1(n1);
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[]>* D2;
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->init(p2, boost::detail::sp_forward<Args>(args)...);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+ template<typename T, typename A, typename... Args>
+ inline typename boost::detail::sp_if_size_array<T>::type
+ allocate_shared(const A& allocator, Args&&... args) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ enum {
+ N = boost::detail::array_total<T>::size
+ };
+ T1* p1 = 0;
+ T2* p2 = 0;
+ boost::detail::allocate_array_helper<A, T2[N]> a1(allocator, &p2);
+ boost::detail::array_deleter<T2[N]> d1;
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[N]>* D2;
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->init(p2, boost::detail::sp_forward<Args>(args)...);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+#endif
+#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
+ template<typename T, typename A>
+ inline typename boost::detail::sp_if_size_array<T>::type
+ allocate_shared(const A& allocator, const T& list) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ typedef const T2 T3;
+ enum {
+ N = boost::detail::array_total<T>::size
+ };
+ T1* p1 = 0;
+ T2* p2 = 0;
+ T3* p3 = 0;
+ boost::detail::allocate_array_helper<A, T2[N]> a1(allocator, &p2);
+ boost::detail::array_deleter<T2[N]> d1;
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[N]>* D2;
+ p3 = reinterpret_cast<T3*>(list);
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->init_list(p2, p3);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+ template<typename T, typename A>
+ inline typename boost::detail::sp_if_array<T>::type
+ allocate_shared(const A& allocator, std::size_t size,
+ const typename boost::detail::array_inner<T>::type& list) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ typedef const T2 T3;
+ enum {
+ M = boost::detail::array_total<T1>::size
+ };
+ T1* p1 = 0;
+ T2* p2 = 0;
+ T3* p3 = 0;
+ std::size_t n1 = M * size;
+ boost::detail::allocate_array_helper<A, T2[]> a1(allocator, n1, &p2);
+ boost::detail::array_deleter<T2[]> d1(n1);
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[]>* D2;
+ p3 = reinterpret_cast<T3*>(list);
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->template init_list<M>(p2, p3);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+ template<typename T, typename A>
+ inline typename boost::detail::sp_if_size_array<T>::type
+ allocate_shared(const A& allocator,
+ const typename boost::detail::array_inner<T>::type& list) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ typedef const T2 T3;
+ enum {
+ M = boost::detail::array_total<T1>::size,
+ N = boost::detail::array_total<T>::size
+ };
+ T1* p1 = 0;
+ T2* p2 = 0;
+ T3* p3 = 0;
+ boost::detail::allocate_array_helper<A, T2[N]> a1(allocator, &p2);
+ boost::detail::array_deleter<T2[N]> d1;
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[N]>* D2;
+ p3 = reinterpret_cast<T3*>(list);
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->template init_list<M>(p2, p3);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ template<typename T, typename A>
+ inline typename boost::detail::sp_if_array<T>::type
+ allocate_shared(const A& allocator,
+ std::initializer_list<typename boost::detail::array_inner<T>::type> list) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ typedef const T2 T3;
+ T1* p1 = 0;
+ T2* p2 = 0;
+ T3* p3 = 0;
+ std::size_t n1 = list.size() * boost::detail::array_total<T1>::size;
+ boost::detail::allocate_array_helper<A, T2[]> a1(allocator, n1, &p2);
+ boost::detail::array_deleter<T2[]> d1(n1);
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[]>* D2;
+ p3 = reinterpret_cast<T3*>(list.begin());
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->init_list(p2, p3);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+#endif
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template<typename T, typename A>
+ inline typename boost::detail::sp_if_array<T>::type
+ allocate_shared(const A& allocator, std::size_t size,
+ typename boost::detail::array_base<T>::type&& value) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ T1* p1 = 0;
+ T2* p2 = 0;
+ std::size_t n1 = size * boost::detail::array_total<T1>::size;
+ boost::detail::allocate_array_helper<A, T2[]> a1(allocator, n1, &p2);
+ boost::detail::array_deleter<T2[]> d1(n1);
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[]>* D2;
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->init(p2, boost::detail::sp_forward<T2>(value));
+ return boost::shared_ptr<T>(s1, p1);
+ }
+ template<typename T, typename A>
+ inline typename boost::detail::sp_if_size_array<T>::type
+ allocate_shared(const A& allocator,
+ typename boost::detail::array_base<T>::type&& value) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ enum {
+ N = boost::detail::array_total<T>::size
+ };
+ T1* p1 = 0;
+ T2* p2 = 0;
+ boost::detail::allocate_array_helper<A, T2[N]> a1(allocator, &p2);
+ boost::detail::array_deleter<T2[N]> d1;
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[N]>* D2;
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->init(p2, boost::detail::sp_forward<T2>(value));
+ return boost::shared_ptr<T>(s1, p1);
+ }
+#endif
+#endif
+ template<typename T, typename A>
+ inline typename boost::detail::sp_if_array<T>::type
+ allocate_shared_noinit(const A& allocator, std::size_t size) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ T1* p1 = 0;
+ T2* p2 = 0;
+ std::size_t n1 = size * boost::detail::array_total<T1>::size;
+ boost::detail::allocate_array_helper<A, T2[]> a1(allocator, n1, &p2);
+ boost::detail::array_deleter<T2[]> d1(n1);
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[]>* D2;
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->noinit(p2);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+ template<typename T, typename A>
+ inline typename boost::detail::sp_if_size_array<T>::type
+ allocate_shared_noinit(const A& allocator) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ enum {
+ N = boost::detail::array_total<T>::size
+ };
+ T1* p1 = 0;
+ T2* p2 = 0;
+ boost::detail::allocate_array_helper<A, T2[N]> a1(allocator, &p2);
+ boost::detail::array_deleter<T2[N]> d1;
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[N]>* D2;
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->noinit(p2);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+}
+
+#endif
--- /dev/null
+/*
+ * Copyright (c) 2012 Glen Joseph Fernandes
+ * glenfe at live dot com
+ *
+ * Distributed under the Boost Software License,
+ * Version 1.0. (See accompanying file LICENSE_1_0.txt
+ * or copy at http://boost.org/LICENSE_1_0.txt)
+ */
+#ifndef BOOST_SMART_PTR_DETAIL_ALLOCATE_ARRAY_HELPER_HPP
+#define BOOST_SMART_PTR_DETAIL_ALLOCATE_ARRAY_HELPER_HPP
+
+#include <boost/type_traits/alignment_of.hpp>
+
+namespace boost {
+ namespace detail {
+ template<typename A, typename T, typename Y = char>
+ class allocate_array_helper;
+ template<typename A, typename T, typename Y>
+ class allocate_array_helper<A, T[], Y> {
+ template<typename A9, typename T9, typename Y9>
+ friend class allocate_array_helper;
+ typedef typename A::template rebind<Y> ::other A2;
+ typedef typename A::template rebind<char>::other A3;
+ public:
+ typedef typename A2::value_type value_type;
+ typedef typename A2::pointer pointer;
+ typedef typename A2::const_pointer const_pointer;
+ typedef typename A2::reference reference;
+ typedef typename A2::const_reference const_reference;
+ typedef typename A2::size_type size_type;
+ typedef typename A2::difference_type difference_type;
+ template<typename U>
+ struct rebind {
+ typedef allocate_array_helper<A, T[], U> other;
+ };
+ allocate_array_helper(const A& allocator, std::size_t size, T** data)
+ : allocator(allocator),
+ size(sizeof(T) * size),
+ data(data) {
+ }
+ template<class U>
+ allocate_array_helper(const allocate_array_helper<A, T[], U>& other)
+ : allocator(other.allocator),
+ size(other.size),
+ data(other.data) {
+ }
+ pointer address(reference value) const {
+ return allocator.address(value);
+ }
+ const_pointer address(const_reference value) const {
+ return allocator.address(value);
+ }
+ size_type max_size() const {
+ return allocator.max_size();
+ }
+ pointer allocate(size_type count, const void* value = 0) {
+ std::size_t a1 = boost::alignment_of<T>::value;
+ std::size_t n1 = count * sizeof(Y) + a1 - 1;
+ char* p1 = A3(allocator).allocate(n1 + size, value);
+ char* p2 = p1 + n1;
+ while (std::size_t(p2) % a1 != 0) {
+ p2--;
+ }
+ *data = reinterpret_cast<T*>(p2);
+ return reinterpret_cast<Y*>(p1);
+ }
+ void deallocate(pointer memory, size_type count) {
+ std::size_t a1 = boost::alignment_of<T>::value;
+ std::size_t n1 = count * sizeof(Y) + a1 - 1;
+ char* p1 = reinterpret_cast<char*>(memory);
+ A3(allocator).deallocate(p1, n1 + size);
+ }
+ void construct(pointer memory, const Y& value) {
+ allocator.construct(memory, value);
+ }
+ void destroy(pointer memory) {
+ allocator.destroy(memory);
+ }
+ template<typename U>
+ bool operator==(const allocate_array_helper<A, T[], U>& other) const {
+ return allocator == other.allocator;
+ }
+ template<typename U>
+ bool operator!=(const allocate_array_helper<A, T[], U>& other) const {
+ return !(*this == other);
+ }
+ private:
+ A2 allocator;
+ std::size_t size;
+ T** data;
+ };
+ template<typename A, typename T, std::size_t N, typename Y>
+ class allocate_array_helper<A, T[N], Y> {
+ template<typename A9, typename T9, typename Y9>
+ friend class allocate_array_helper;
+ typedef typename A::template rebind<Y> ::other A2;
+ typedef typename A::template rebind<char>::other A3;
+ public:
+ typedef typename A2::value_type value_type;
+ typedef typename A2::pointer pointer;
+ typedef typename A2::const_pointer const_pointer;
+ typedef typename A2::reference reference;
+ typedef typename A2::const_reference const_reference;
+ typedef typename A2::size_type size_type;
+ typedef typename A2::difference_type difference_type;
+ template<typename U>
+ struct rebind {
+ typedef allocate_array_helper<A, T[N], U> other;
+ };
+ allocate_array_helper(const A& allocator, T** data)
+ : allocator(allocator),
+ data(data) {
+ }
+ template<class U>
+ allocate_array_helper(const allocate_array_helper<A, T[N], U>& other)
+ : allocator(other.allocator),
+ data(other.data) {
+ }
+ pointer address(reference value) const {
+ return allocator.address(value);
+ }
+ const_pointer address(const_reference value) const {
+ return allocator.address(value);
+ }
+ size_type max_size() const {
+ return allocator.max_size();
+ }
+ pointer allocate(size_type count, const void* value = 0) {
+ std::size_t a1 = boost::alignment_of<T>::value;
+ std::size_t n1 = count * sizeof(Y) + a1 - 1;
+ char* p1 = A3(allocator).allocate(n1 + N1, value);
+ char* p2 = p1 + n1;
+ while (std::size_t(p2) % a1 != 0) {
+ p2--;
+ }
+ *data = reinterpret_cast<T*>(p2);
+ return reinterpret_cast<Y*>(p1);
+ }
+ void deallocate(pointer memory, size_type count) {
+ std::size_t a1 = boost::alignment_of<T>::value;
+ std::size_t n1 = count * sizeof(Y) + a1 - 1;
+ char* p1 = reinterpret_cast<char*>(memory);
+ A3(allocator).deallocate(p1, n1 + N1);
+ }
+ void construct(pointer memory, const Y& value) {
+ allocator.construct(memory, value);
+ }
+ void destroy(pointer memory) {
+ allocator.destroy(memory);
+ }
+ template<typename U>
+ bool operator==(const allocate_array_helper<A, T[N], U>& other) const {
+ return allocator == other.allocator;
+ }
+ template<typename U>
+ bool operator!=(const allocate_array_helper<A, T[N], U>& other) const {
+ return !(*this == other);
+ }
+ private:
+ enum {
+ N1 = N * sizeof(T)
+ };
+ A2 allocator;
+ T** data;
+ };
+ }
+}
+
+#endif
--- /dev/null
+/*
+ * Copyright (c) 2012 Glen Joseph Fernandes
+ * glenfe at live dot com
+ *
+ * Distributed under the Boost Software License,
+ * Version 1.0. (See accompanying file LICENSE_1_0.txt
+ * or copy at http://boost.org/LICENSE_1_0.txt)
+ */
+#ifndef BOOST_SMART_PTR_DETAIL_ARRAY_DELETER_HPP
+#define BOOST_SMART_PTR_DETAIL_ARRAY_DELETER_HPP
+
+#include <boost/smart_ptr/detail/array_utility.hpp>
+#include <boost/smart_ptr/detail/sp_forward.hpp>
+
+namespace boost {
+ namespace detail {
+ template<typename T>
+ class array_deleter;
+ template<typename T>
+ class array_deleter<T[]> {
+ public:
+ array_deleter(std::size_t size)
+ : size(size),
+ object(0) {
+ }
+ ~array_deleter() {
+ if (object) {
+ array_destroy(object, size);
+ }
+ }
+ void init(T* memory) {
+ array_init(memory, size);
+ object = memory;
+ }
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ void init(T* memory, T&& value) {
+ array_init_value(memory, size, sp_forward<T>(value));
+ object = memory;
+ }
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template<typename... Args>
+ void init(T* memory, Args&&... args) {
+ array_init_args(memory, size, sp_forward<Args>(args)...);
+ object = memory;
+ }
+#endif
+#endif
+ void init_list(T* memory, const T* list) {
+ array_init_list(memory, size, list);
+ object = memory;
+ }
+ template<std::size_t M>
+ void init_list(T* memory, const T* list) {
+ array_init_list<T, M>(memory, size, list);
+ object = memory;
+ }
+ void noinit(T* memory) {
+ array_noinit(memory, size);
+ object = memory;
+ }
+ void operator()(const void*) {
+ if (object) {
+ array_destroy(object, size);
+ object = 0;
+ }
+ }
+ private:
+ std::size_t size;
+ T* object;
+ };
+ template<typename T, std::size_t N>
+ class array_deleter<T[N]> {
+ public:
+ array_deleter()
+ : object(0) {
+ }
+ ~array_deleter() {
+ if (object) {
+ array_destroy(object, N);
+ }
+ }
+ void init(T* memory) {
+ array_init(memory, N);
+ object = memory;
+ }
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ void init(T* memory, T&& value) {
+ array_init_value(memory, N, sp_forward<T>(value));
+ object = memory;
+ }
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template<typename... Args>
+ void init(T* memory, Args&&... args) {
+ array_init_args(memory, N, sp_forward<Args>(args)...);
+ object = memory;
+ }
+#endif
+#endif
+ void init_list(T* memory, const T* list) {
+ array_init_list(memory, N, list);
+ object = memory;
+ }
+ template<std::size_t M>
+ void init_list(T* memory, const T* list) {
+ array_init_list<T, M>(memory, N, list);
+ object = memory;
+ }
+ void noinit(T* memory) {
+ array_noinit(memory, N);
+ object = memory;
+ }
+ void operator()(const void*) {
+ if (object) {
+ array_destroy(object, N);
+ object = 0;
+ }
+ }
+ private:
+ T* object;
+ };
+ }
+}
+
+#endif
--- /dev/null
+/*
+ * Copyright (c) 2012 Glen Joseph Fernandes
+ * glenfe at live dot com
+ *
+ * Distributed under the Boost Software License,
+ * Version 1.0. (See accompanying file LICENSE_1_0.txt
+ * or copy at http://boost.org/LICENSE_1_0.txt)
+ */
+#ifndef BOOST_SMART_PTR_DETAIL_ARRAY_TRAITS_HPP
+#define BOOST_SMART_PTR_DETAIL_ARRAY_TRAITS_HPP
+
+#include <boost/type_traits/remove_cv.hpp>
+
+namespace boost {
+ namespace detail {
+ template<typename T>
+ struct array_base {
+ typedef typename boost::remove_cv<T>::type type;
+ };
+ template<typename T>
+ struct array_base<T[]> {
+ typedef typename array_base<T>::type type;
+ };
+ template<typename T, std::size_t N>
+ struct array_base<T[N]> {
+ typedef typename array_base<T>::type type;
+ };
+ template<typename T>
+ struct array_total {
+ enum {
+ size = 1
+ };
+ };
+ template<typename T, std::size_t N>
+ struct array_total<T[N]> {
+ enum {
+ size = N * array_total<T>::size
+ };
+ };
+ template<typename T>
+ struct array_inner;
+ template<typename T>
+ struct array_inner<T[]> {
+ typedef T type;
+ };
+ template<typename T, std::size_t N>
+ struct array_inner<T[N]> {
+ typedef T type;
+ };
+ }
+}
+
+#endif
--- /dev/null
+/*
+ * Copyright (c) 2012 Glen Joseph Fernandes
+ * glenfe at live dot com
+ *
+ * Distributed under the Boost Software License,
+ * Version 1.0. (See accompanying file LICENSE_1_0.txt
+ * or copy at http://boost.org/LICENSE_1_0.txt)
+ */
+#ifndef BOOST_SMART_PTR_DETAIL_ARRAY_UTILITY_HPP
+#define BOOST_SMART_PTR_DETAIL_ARRAY_UTILITY_HPP
+
+#include <boost/config.hpp>
+#include <boost/type_traits/has_trivial_constructor.hpp>
+#include <boost/type_traits/has_trivial_destructor.hpp>
+
+namespace boost {
+ namespace detail {
+ template<typename T>
+ inline void array_destroy(T*, std::size_t, boost::true_type) {
+ }
+ template<typename T>
+ inline void array_destroy(T* memory, std::size_t size, boost::false_type) {
+ for (std::size_t i = size; i > 0; ) {
+ memory[--i].~T();
+ }
+ }
+ template<typename T>
+ inline void array_destroy(T* memory, std::size_t size) {
+ boost::has_trivial_destructor<T> type;
+ array_destroy(memory, size, type);
+ }
+ template<typename T>
+ inline void array_init(T* memory, std::size_t size, boost::true_type) {
+ for (std::size_t i = 0; i < size; i++) {
+ memory[i] = T();
+ }
+ }
+ template<typename T>
+ inline void array_init(T* memory, std::size_t size, boost::false_type) {
+#if !defined(BOOST_NO_EXCEPTIONS)
+ std::size_t i = 0;
+ try {
+ for (; i < size; i++) {
+ void* p1 = memory + i;
+ ::new(p1) T();
+ }
+ } catch (...) {
+ array_destroy(memory, i);
+ throw;
+ }
+#else
+ for (std::size_t i = 0; i < size; i++) {
+ void* p1 = memory + i;
+ ::new(p1) T();
+ }
+#endif
+ }
+ template<typename T>
+ inline void array_init(T* memory, std::size_t size) {
+ boost::has_trivial_default_constructor<T> type;
+ array_init(memory, size, type);
+ }
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template<typename T>
+ inline void array_init_value(T* memory, std::size_t size, T&& value) {
+#if !defined(BOOST_NO_EXCEPTIONS)
+ std::size_t i = 0;
+ try {
+ for (; i < size; i++) {
+ void* p1 = memory + i;
+ ::new(p1) T(value);
+ }
+ } catch (...) {
+ array_destroy(memory, i);
+ throw;
+ }
+#else
+ for (std::size_t i = 0; i < size; i++) {
+ void* p1 = memory + i;
+ ::new(p1) T(value);
+ }
+#endif
+ }
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template<typename T, typename... Args>
+ inline void array_init_args(T* memory, std::size_t size, Args&&... args) {
+#if !defined(BOOST_NO_EXCEPTIONS)
+ std::size_t i = 0;
+ try {
+ for (; i < size; i++) {
+ void* p1 = memory + i;
+ ::new(p1) T(args...);
+ }
+ } catch (...) {
+ array_destroy(memory, i);
+ throw;
+ }
+#else
+ for (std::size_t i = 0; i < size; i++) {
+ void* p1 = memory + i;
+ ::new(p1) T(args...);
+ }
+#endif
+ }
+#endif
+#endif
+ template<typename T>
+ inline void array_init_list(T* memory, std::size_t size, const T* list) {
+#if !defined(BOOST_NO_EXCEPTIONS)
+ std::size_t i = 0;
+ try {
+ for (; i < size; i++) {
+ void* p1 = memory + i;
+ ::new(p1) T(list[i]);
+ }
+ } catch (...) {
+ array_destroy(memory, i);
+ throw;
+ }
+#else
+ for (std::size_t i = 0; i < size; i++) {
+ void* p1 = memory + i;
+ ::new(p1) T(list[i]);
+ }
+#endif
+ }
+ template<typename T, std::size_t N>
+ inline void array_init_list(T* memory, std::size_t size, const T* list) {
+#if !defined(BOOST_NO_EXCEPTIONS)
+ std::size_t i = 0;
+ try {
+ for (; i < size; i++) {
+ void* p1 = memory + i;
+ ::new(p1) T(list[i % N]);
+ }
+ } catch (...) {
+ array_destroy(memory, i);
+ throw;
+ }
+#else
+ for (std::size_t i = 0; i < size; i++) {
+ void* p1 = memory + i;
+ ::new(p1) T(list[i % N]);
+ }
+#endif
+ }
+ template<typename T>
+ inline void array_noinit(T*, std::size_t, boost::true_type) {
+ }
+ template<typename T>
+ inline void array_noinit(T* memory, std::size_t size, boost::false_type) {
+#if !defined(BOOST_NO_EXCEPTIONS)
+ std::size_t i = 0;
+ try {
+ for (; i < size; i++) {
+ void* p1 = memory + i;
+ ::new(p1) T;
+ }
+ } catch (...) {
+ array_destroy(memory, i);
+ throw;
+ }
+#else
+ for (std::size_t i = 0; i < size; i++) {
+ void* p1 = memory + i;
+ ::new(p1) T;
+ }
+#endif
+ }
+ template<typename T>
+ inline void array_noinit(T* memory, std::size_t size) {
+ boost::has_trivial_default_constructor<T> type;
+ array_noinit(memory, size, type);
+ }
+ }
+}
+
+#endif
--- /dev/null
+/*
+ * Copyright (c) 2012 Glen Joseph Fernandes
+ * glenfe at live dot com
+ *
+ * Distributed under the Boost Software License,
+ * Version 1.0. (See accompanying file LICENSE_1_0.txt
+ * or copy at http://boost.org/LICENSE_1_0.txt)
+ */
+#ifndef BOOST_SMART_PTR_DETAIL_MAKE_ARRAY_HELPER_HPP
+#define BOOST_SMART_PTR_DETAIL_MAKE_ARRAY_HELPER_HPP
+
+#include <boost/type_traits/alignment_of.hpp>
+
+namespace boost {
+ namespace detail {
+ template<typename T, typename Y = char>
+ class make_array_helper;
+ template<typename T, typename Y>
+ class make_array_helper<T[], Y> {
+ template<typename T2, typename Y2>
+ friend class make_array_helper;
+ public:
+ typedef Y value_type;
+ typedef Y* pointer;
+ typedef const Y* const_pointer;
+ typedef Y& reference;
+ typedef const Y& const_reference;
+ typedef std::size_t size_type;
+ typedef ptrdiff_t difference_type;
+ template<typename U>
+ struct rebind {
+ typedef make_array_helper<T[], U> other;
+ };
+ make_array_helper(std::size_t size, T** data)
+ : size(sizeof(T) * size),
+ data(data) {
+ }
+ template<class U>
+ make_array_helper(const make_array_helper<T[], U>& other)
+ : size(other.size),
+ data(other.data) {
+ }
+ pointer address(reference value) const {
+ return &value;
+ }
+ const_pointer address(const_reference value) const {
+ return &value;
+ }
+ size_type max_size() const {
+ return static_cast<std::size_t>(-1) / sizeof(Y);
+ }
+ pointer allocate(size_type count, const void* = 0) {
+ std::size_t a1 = boost::alignment_of<T>::value;
+ std::size_t n1 = count * sizeof(Y) + a1 - 1;
+ void* p1 = ::operator new(n1 + size);
+ char* p2 = static_cast<char*>(p1) + n1;
+ while (std::size_t(p2) % a1 != 0) {
+ p2--;
+ }
+ *data = reinterpret_cast<T*>(p2);
+ return reinterpret_cast<Y*>(p1);
+ }
+ void deallocate(pointer memory, size_type) {
+ void* p1 = memory;
+ ::operator delete(p1);
+ }
+ void construct(pointer memory, const Y& value) {
+ void* p1 = memory;
+ ::new(p1) Y(value);
+ }
+ void destroy(pointer memory) {
+ memory->~Y();
+ }
+ template<typename U>
+ bool operator==(const make_array_helper<T[], U>& other) const {
+ return true;
+ }
+ template<typename U>
+ bool operator!=(const make_array_helper<T[], U>& other) const {
+ return !(*this == other);
+ }
+ private:
+ std::size_t size;
+ T** data;
+ };
+ template<typename T, std::size_t N, typename Y>
+ class make_array_helper<T[N], Y> {
+ template<typename T2, typename Y2>
+ friend class make_array_helper;
+ public:
+ typedef Y value_type;
+ typedef Y* pointer;
+ typedef const Y* const_pointer;
+ typedef Y& reference;
+ typedef const Y& const_reference;
+ typedef std::size_t size_type;
+ typedef ptrdiff_t difference_type;
+ template<typename U>
+ struct rebind {
+ typedef make_array_helper<T[N], U> other;
+ };
+ make_array_helper(T** data)
+ : data(data) {
+ }
+ template<class U>
+ make_array_helper(const make_array_helper<T[N], U>& other)
+ : data(other.data) {
+ }
+ pointer address(reference value) const {
+ return &value;
+ }
+ const_pointer address(const_reference value) const {
+ return &value;
+ }
+ size_type max_size() const {
+ return static_cast<std::size_t>(-1) / sizeof(Y);
+ }
+ pointer allocate(size_type count, const void* = 0) {
+ std::size_t a1 = boost::alignment_of<T>::value;
+ std::size_t n1 = count * sizeof(Y) + a1 - 1;
+ void* p1 = ::operator new(n1 + N1);
+ char* p2 = static_cast<char*>(p1) + n1;
+ while (std::size_t(p2) % a1 != 0) {
+ p2--;
+ }
+ *data = reinterpret_cast<T*>(p2);
+ return reinterpret_cast<Y*>(p1);
+ }
+ void deallocate(pointer memory, size_type) {
+ void* p1 = memory;
+ ::operator delete(p1);
+ }
+ void construct(pointer memory, const Y& value) {
+ void* p1 = memory;
+ ::new(p1) Y(value);
+ }
+ void destroy(pointer memory) {
+ memory->~Y();
+ }
+ template<typename U>
+ bool operator==(const make_array_helper<T[N], U>& other) const {
+ return true;
+ }
+ template<typename U>
+ bool operator!=(const make_array_helper<T[N], U>& other) const {
+ return !(*this == other);
+ }
+ private:
+ enum {
+ N1 = N * sizeof(T)
+ };
+ T** data;
+ };
+ }
+}
+
+#endif
// This header intentionally has no include guards.
//
-// Copyright (c) 2001-2009 Peter Dimov
+// Copyright (c) 2001-2009, 2012 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
-#if ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__)
+#if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) && !defined( BOOST_NO_CXX11_NULLPTR )
- operator bool () const
+ explicit operator bool () const BOOST_NOEXCEPT
+ {
+ return px != 0;
+ }
+
+#elif ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__)
+
+ operator bool () const BOOST_NOEXCEPT
{
return px != 0;
}
typedef void (*unspecified_bool_type)( this_type*** );
- operator unspecified_bool_type() const // never throws
+ operator unspecified_bool_type() const BOOST_NOEXCEPT
{
return px == 0? 0: unspecified_bool;
}
( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \
( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) )
- typedef T * (this_type::*unspecified_bool_type)() const;
+ typedef element_type * (this_type::*unspecified_bool_type)() const;
- operator unspecified_bool_type() const // never throws
+ operator unspecified_bool_type() const BOOST_NOEXCEPT
{
return px == 0? 0: &this_type::get;
}
#else
- typedef T * this_type::*unspecified_bool_type;
+ typedef element_type * this_type::*unspecified_bool_type;
- operator unspecified_bool_type() const // never throws
+ operator unspecified_bool_type() const BOOST_NOEXCEPT
{
return px == 0? 0: &this_type::px;
}
#endif
// operator! is redundant, but some compilers need it
- bool operator! () const // never throws
+ bool operator! () const BOOST_NOEXCEPT
{
return px == 0;
}
// rather than including <memory> directly:
#include <boost/config/no_tr1/memory.hpp> // std::auto_ptr
#include <functional> // std::less
-#include <new> // std::bad_alloc
+
+#ifdef BOOST_NO_EXCEPTIONS
+# include <new> // std::bad_alloc
+#endif
+
+#if !defined( BOOST_NO_CXX11_SMART_PTR )
+# include <boost/utility/addressof.hpp>
+#endif
namespace boost
{
{
};
+#if !defined( BOOST_NO_CXX11_SMART_PTR )
+
+template< class T > class sp_reference_wrapper
+{
+public:
+
+ explicit sp_reference_wrapper( T & t): t_( boost::addressof( t ) )
+ {
+ }
+
+ template< class Y > void operator()( Y * p ) const
+ {
+ (*t_)( p );
+ }
+
+private:
+
+ T * t_;
+};
+
+template< class D > struct sp_convert_reference
+{
+ typedef D type;
+};
+
+template< class D > struct sp_convert_reference< D& >
+{
+ typedef sp_reference_wrapper< D > type;
+};
+
+#endif
+
class weak_count;
class shared_count
#endif
+#if !defined( BOOST_NO_CXX11_SMART_PTR )
+
+ template<class Y, class D>
+ explicit shared_count( std::unique_ptr<Y, D> & r ): pi_( 0 )
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
+ {
+ typedef typename sp_convert_reference<D>::type D2;
+
+ D2 d2( r.get_deleter() );
+ pi_ = new sp_counted_impl_pd< typename std::unique_ptr<Y, D>::pointer, D2 >( r.get(), d2 );
+
+#ifdef BOOST_NO_EXCEPTIONS
+
+ if( pi_ == 0 )
+ {
+ boost::throw_exception( std::bad_alloc() );
+ }
+
+#endif
+
+ r.release();
+ }
+
+#endif
+
~shared_count() // nothrow
{
if( pi_ != 0 ) pi_->release();
if( pi_ != 0 ) pi_->add_ref_copy();
}
-#if defined( BOOST_HAS_RVALUE_REFS )
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
shared_count(shared_count && r): pi_(r.pi_) // nothrow
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
{
return pi_? pi_->get_deleter( ti ): 0;
}
+
+ void * get_untyped_deleter() const
+ {
+ return pi_? pi_->get_untyped_deleter(): 0;
+ }
};
// Move support
-#if defined( BOOST_HAS_RVALUE_REFS )
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
weak_count(weak_count && r): pi_(r.pi_) // nothrow
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
enum _vt { value = sizeof( (f)( static_cast<Y*>(0) ) ) == sizeof(yes) };
};
+template< class Y, class T > struct sp_convertible< Y, T[] >
+{
+ enum _vt { value = false };
+};
+
+template< class Y, class T > struct sp_convertible< Y[], T[] >
+{
+ enum _vt { value = sp_convertible< Y[1], T[1] >::value };
+};
+
+template< class Y, std::size_t N, class T > struct sp_convertible< Y[N], T[] >
+{
+ enum _vt { value = sp_convertible< Y[1], T[1] >::value };
+};
+
struct sp_empty
{
};
#elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 )
# include <boost/smart_ptr/detail/sp_counted_base_nt.hpp>
-#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) )
-# include <boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp>
+#elif defined( __SNC__ )
+# include <boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp>
-#elif defined( __GNUC__ ) && defined( __ia64__ ) && !defined( __INTEL_COMPILER )
-# include <boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp>
+#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) && !defined(__PATHSCALE__)
+# include <boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp>
#elif defined(__HP_aCC) && defined(__ia64)
# include <boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp>
+#elif defined( __GNUC__ ) && defined( __ia64__ ) && !defined( __INTEL_COMPILER ) && !defined(__PATHSCALE__)
+# include <boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp>
+
+#elif defined( __IBMCPP__ ) && defined( __powerpc )
+# include <boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp>
+
#elif defined( __MWERKS__ ) && defined( __POWERPC__ )
# include <boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp>
-#elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) )
+#elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) ) && !defined(__PATHSCALE__) && !defined( _AIX )
# include <boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp>
-#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) )
+#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__)
# include <boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp>
#elif defined( BOOST_SP_HAS_SYNC )
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
{
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
{
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
{
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
{
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
{
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
{
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
{
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
{
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
{
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
{
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+// detail/sp_counted_base_gcc_sparc.hpp - g++ on Sparc V8+
+//
+// Copyright (c) 2006 Piotr Wyderski
+// Copyright (c) 2006 Tomas Puverle
+// Copyright (c) 2006 Peter Dimov
+// Copyright (c) 2011 Emil Dotchevski
+//
+// 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
+//
+// Thanks to Michael van der Westhuizen
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <inttypes.h> // uint32_t
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline uint32_t compare_and_swap( uint32_t * dest_, uint32_t compare_, uint32_t swap_ )
+{
+ return __builtin_cellAtomicCompareAndSwap32(dest_,compare_,swap_);
+}
+
+inline uint32_t atomic_fetch_and_add( uint32_t * pw, uint32_t dv )
+{
+ // long r = *pw;
+ // *pw += dv;
+ // return r;
+
+ for( ;; )
+ {
+ uint32_t r = *pw;
+
+ if( __builtin_expect((compare_and_swap(pw, r, r + dv) == r), 1) )
+ {
+ return r;
+ }
+ }
+}
+
+inline void atomic_increment( uint32_t * pw )
+{
+ (void) __builtin_cellAtomicIncr32( pw );
+}
+
+inline uint32_t atomic_decrement( uint32_t * pw )
+{
+ return __builtin_cellAtomicDecr32( pw );
+}
+
+inline uint32_t atomic_conditional_increment( uint32_t * pw )
+{
+ // long r = *pw;
+ // if( r != 0 ) ++*pw;
+ // return r;
+
+ for( ;; )
+ {
+ uint32_t r = *pw;
+
+ if( r == 0 )
+ {
+ return r;
+ }
+
+ if( __builtin_expect( ( compare_and_swap( pw, r, r + 1 ) == r ), 1 ) )
+ {
+ return r;
+ }
+ }
+}
+
+class sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ uint32_t use_count_; // #shared
+ uint32_t weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_decrement( &use_count_ ) == 1 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_decrement( &weak_count_ ) == 1 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return const_cast< uint32_t const volatile & >( use_count_ );
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
{
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
{
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED
+
+//
+// detail/sp_counted_base_vacpp_ppc.hpp - xlC(vacpp) on POWER
+// based on: detail/sp_counted_base_w32.hpp
+//
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+// Copyright 2004-2005 Peter Dimov
+// Copyright 2006 Michael van der Westhuizen
+// Copyright 2012 IBM Corp.
+//
+// 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)
+//
+//
+// Lock-free algorithm by Alexander Terekhov
+//
+// Thanks to Ben Hitchings for the #weak + (#shared != 0)
+// formulation
+//
+
+#include <boost/detail/sp_typeinfo.hpp>
+
+extern "builtin" void __lwsync(void);
+extern "builtin" void __isync(void);
+extern "builtin" int __fetch_and_add(volatile int* addr, int val);
+extern "builtin" int __compare_and_swap(volatile int*, int*, int);
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline void atomic_increment( int *pw )
+{
+ // ++*pw;
+ __lwsync();
+ __fetch_and_add(pw, 1);
+ __isync();
+}
+
+inline int atomic_decrement( int *pw )
+{
+ // return --*pw;
+ __lwsync();
+ int originalValue = __fetch_and_add(pw, -1);
+ __isync();
+
+ return (originalValue - 1);
+}
+
+inline int atomic_conditional_increment( int *pw )
+{
+ // if( *pw != 0 ) ++*pw;
+ // return *pw;
+
+ __lwsync();
+ int v = *const_cast<volatile int*>(pw);
+ for (;;)
+ // loop until state is known
+ {
+ if (v == 0) return 0;
+ if (__compare_and_swap(pw, &v, v + 1))
+ {
+ __isync(); return (v + 1);
+ }
+ }
+}
+
+class sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ int use_count_; // #shared
+ int weak_count_; // #weak + (#shared != 0)
+ char pad[64] __attribute__((__aligned__(64)));
+ // pad to prevent false sharing
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_decrement( &use_count_ ) == 0 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_decrement( &weak_count_ ) == 0 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return *const_cast<volatile int*>(&use_count_);
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
{
return 0;
}
+ virtual void * get_untyped_deleter()
+ {
+ return 0;
+ }
+
#if defined(BOOST_SP_USE_STD_ALLOCATOR)
void * operator new( std::size_t )
return ti == BOOST_SP_TYPEID(D)? &reinterpret_cast<char&>( del ): 0;
}
+ virtual void * get_untyped_deleter()
+ {
+ return &reinterpret_cast<char&>( del );
+ }
+
#if defined(BOOST_SP_USE_STD_ALLOCATOR)
void * operator new( std::size_t )
{
return ti == BOOST_SP_TYPEID( D )? &reinterpret_cast<char&>( d_ ): 0;
}
+
+ virtual void * get_untyped_deleter()
+ {
+ return &reinterpret_cast<char&>( d_ );
+ }
};
#ifdef __CODEGUARD__
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_FORWARD_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_FORWARD_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+// detail/sp_forward.hpp
+//
+// Copyright 2008,2012 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0.
+// See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+
+#include <boost/config.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+template< class T > T&& sp_forward( T & t ) BOOST_NOEXCEPT
+{
+ return static_cast< T&& >( t );
+}
+
+#endif
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_FORWARD_HPP_INCLUDED
// are available.
//
-#if defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) && !defined( BOOST_SP_NO_SYNC )
+#ifndef BOOST_SP_NO_SYNC
+
+#if defined( __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 )
+
+# define BOOST_SP_HAS_SYNC
+
+#elif defined( __IBMCPP__ ) && ( __IBMCPP__ >= 1210 )
+
+# define BOOST_SP_HAS_SYNC
+
+#elif defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 )
#define BOOST_SP_HAS_SYNC
#undef BOOST_SP_HAS_SYNC
#endif
-#if defined( __INTEL_COMPILER ) && !defined( __ia64__ ) && ( __INTEL_COMPILER < 1100 )
+#if defined( __INTEL_COMPILER ) && !defined( __ia64__ ) && ( __INTEL_COMPILER < 1110 )
#undef BOOST_SP_HAS_SYNC
#endif
-#endif // __GNUC__ * 100 + __GNUC_MINOR__ >= 401
+#if defined(__PATHSCALE__) && ((__PATHCC__ == 4) && (__PATHCC_MINOR__ < 9))
+#undef BOOST_SP_HAS_SYNC
+#endif
+
+#endif
+
+#endif // #ifndef BOOST_SP_NO_SYNC
#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED
--- /dev/null
+/*
+ * Copyright (c) 2012 Glen Joseph Fernandes
+ * glenfe at live dot com
+ *
+ * Distributed under the Boost Software License,
+ * Version 1.0. (See accompanying file LICENSE_1_0.txt
+ * or copy at http://boost.org/LICENSE_1_0.txt)
+ */
+#ifndef BOOST_SMART_PTR_DETAIL_SP_IF_ARRAY_HPP
+#define BOOST_SMART_PTR_DETAIL_SP_IF_ARRAY_HPP
+
+#include <boost/smart_ptr/shared_ptr.hpp>
+
+namespace boost {
+ namespace detail {
+ template<typename T>
+ struct sp_if_array;
+ template<typename T>
+ struct sp_if_array<T[]> {
+ typedef boost::shared_ptr<T[]> type;
+ };
+ template<typename T>
+ struct sp_if_size_array;
+ template<typename T, std::size_t N>
+ struct sp_if_size_array<T[N]> {
+ typedef boost::shared_ptr<T[N]> type;
+ };
+ }
+}
+
+#endif
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+// detail/sp_nullptr_t.hpp
+//
+// Copyright 2013 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0.
+// See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+
+#include <boost/config.hpp>
+#include <cstddef>
+
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+namespace boost
+{
+
+namespace detail
+{
+
+#if defined( __clang__ ) && !defined( _LIBCPP_VERSION ) && !defined( BOOST_NO_CXX11_DECLTYPE )
+
+ typedef decltype(nullptr) sp_nullptr_t;
+
+#else
+
+ typedef std::nullptr_t sp_nullptr_t;
+
+#endif
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // !defined( BOOST_NO_CXX11_NULLPTR )
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED
#include <boost/smart_ptr/detail/yield_k.hpp>
-#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
+#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7S__)
# define BOOST_SP_ARM_BARRIER "dmb"
+# define BOOST_SP_ARM_HAS_LDREX
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__)
# define BOOST_SP_ARM_BARRIER "mcr p15, 0, r0, c7, c10, 5"
+# define BOOST_SP_ARM_HAS_LDREX
#else
{
int r;
+#ifdef BOOST_SP_ARM_HAS_LDREX
+
+ __asm__ __volatile__(
+ "ldrex %0, [%2]; \n"
+ "cmp %0, %1; \n"
+ "strexne %0, %1, [%2]; \n"
+ BOOST_SP_ARM_BARRIER :
+ "=&r"( r ): // outputs
+ "r"( 1 ), "r"( &v_ ): // inputs
+ "memory", "cc" );
+
+#else
+
__asm__ __volatile__(
- "swp %0, %1, [%2]\n\t"
- BOOST_SP_ARM_BARRIER :
+ "swp %0, %1, [%2];\n"
+ BOOST_SP_ARM_BARRIER :
"=&r"( r ): // outputs
"r"( 1 ), "r"( &v_ ): // inputs
"memory", "cc" );
+#endif
+
return r == 0;
}
#define BOOST_DETAIL_SPINLOCK_INIT {0}
#undef BOOST_SP_ARM_BARRIER
+#undef BOOST_SP_ARM_HAS_LDREX
#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED
{
protected:
- enable_shared_from_this()
+ enable_shared_from_this() BOOST_NOEXCEPT
{
}
- enable_shared_from_this(enable_shared_from_this const &)
+ enable_shared_from_this(enable_shared_from_this const &) BOOST_NOEXCEPT
{
}
- enable_shared_from_this & operator=(enable_shared_from_this const &)
+ enable_shared_from_this & operator=(enable_shared_from_this const &) BOOST_NOEXCEPT
{
return *this;
}
- ~enable_shared_from_this()
+ ~enable_shared_from_this() BOOST_NOEXCEPT // ~weak_ptr<T> newer throws, so this call also must not throw
{
}
#include <boost/assert.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/smart_ptr/detail/sp_convertible.hpp>
+#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
#include <boost/config/no_tr1/functional.hpp> // for std::less
typedef T element_type;
- intrusive_ptr(): px( 0 )
+ intrusive_ptr() BOOST_NOEXCEPT : px( 0 )
{
}
// Move support
-#if defined( BOOST_HAS_RVALUE_REFS )
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
- intrusive_ptr(intrusive_ptr && rhs): px( rhs.px )
+ intrusive_ptr(intrusive_ptr && rhs) BOOST_NOEXCEPT : px( rhs.px )
{
rhs.px = 0;
}
- intrusive_ptr & operator=(intrusive_ptr && rhs)
+ intrusive_ptr & operator=(intrusive_ptr && rhs) BOOST_NOEXCEPT
{
this_type( static_cast< intrusive_ptr && >( rhs ) ).swap(*this);
return *this;
return *this;
}
- void reset()
+ void reset() BOOST_NOEXCEPT
{
this_type().swap( *this );
}
this_type( rhs ).swap( *this );
}
- T * get() const
+ T * get() const BOOST_NOEXCEPT
{
return px;
}
// implicit conversion to "bool"
#include <boost/smart_ptr/detail/operator_bool.hpp>
- void swap(intrusive_ptr & rhs)
+ void swap(intrusive_ptr & rhs) BOOST_NOEXCEPT
{
T * tmp = px;
px = rhs.px;
#endif
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+template<class T> inline bool operator==( intrusive_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+{
+ return p.get() == 0;
+}
+
+template<class T> inline bool operator==( boost::detail::sp_nullptr_t, intrusive_ptr<T> const & p ) BOOST_NOEXCEPT
+{
+ return p.get() == 0;
+}
+
+template<class T> inline bool operator!=( intrusive_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+{
+ return p.get() != 0;
+}
+
+template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, intrusive_ptr<T> const & p ) BOOST_NOEXCEPT
+{
+ return p.get() != 0;
+}
+
+#endif
+
template<class T> inline bool operator<(intrusive_ptr<T> const & a, intrusive_ptr<T> const & b)
{
return std::less<T *>()(a.get(), b.get());
// make_shared.hpp
//
-// Copyright (c) 2007, 2008 Peter Dimov
+// Copyright (c) 2007, 2008, 2012 Peter Dimov
//
// 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/smart_ptr/make_shared.html
// for documentation.
-#include <boost/config.hpp>
-#include <boost/smart_ptr/shared_ptr.hpp>
-#include <boost/type_traits/type_with_alignment.hpp>
-#include <boost/type_traits/alignment_of.hpp>
-#include <cstddef>
-#include <new>
-
-namespace boost
-{
-
-namespace detail
-{
-
-template< std::size_t N, std::size_t A > struct sp_aligned_storage
-{
- union type
- {
- char data_[ N ];
- typename boost::type_with_alignment< A >::type align_;
- };
-};
-
-template< class T > class sp_ms_deleter
-{
-private:
-
- typedef typename sp_aligned_storage< sizeof( T ), ::boost::alignment_of< T >::value >::type storage_type;
-
- bool initialized_;
- storage_type storage_;
-
-private:
-
- void destroy()
- {
- if( initialized_ )
- {
-#if defined( __GNUC__ )
-
- // fixes incorrect aliasing warning
- T * p = reinterpret_cast< T* >( storage_.data_ );
- p->~T();
-
-#else
-
- reinterpret_cast< T* >( storage_.data_ )->~T();
-
-#endif
-
- initialized_ = false;
- }
- }
-
-public:
-
- sp_ms_deleter(): initialized_( false )
- {
- }
-
- // optimization: do not copy storage_
- sp_ms_deleter( sp_ms_deleter const & ): initialized_( false )
- {
- }
-
- ~sp_ms_deleter()
- {
- destroy();
- }
-
- void operator()( T * )
- {
- destroy();
- }
-
- void * address()
- {
- return storage_.data_;
- }
-
- void set_initialized()
- {
- initialized_ = true;
- }
-};
-
-#if defined( BOOST_HAS_RVALUE_REFS )
-
-template< class T > T&& sp_forward( T & t )
-{
- return static_cast< T&& >( t );
-}
-
-#endif
-
-} // namespace detail
-
-#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )
-# define BOOST_SP_MSD( T ) boost::detail::sp_inplace_tag< boost::detail::sp_ms_deleter< T > >()
-#else
-# define BOOST_SP_MSD( T ) boost::detail::sp_ms_deleter< T >()
-#endif
-
-// Zero-argument versions
-//
-// Used even when variadic templates are available because of the new T() vs new T issue
-
-template< class T > boost::shared_ptr< T > make_shared()
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T();
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-template< class T, class A > boost::shared_ptr< T > allocate_shared( A const & a )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T();
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-#if defined( BOOST_HAS_VARIADIC_TMPL ) && defined( BOOST_HAS_RVALUE_REFS )
-
-// Variadic templates, rvalue reference
-
-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 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( boost::detail::sp_forward<Arg1>( arg1 ), boost::detail::sp_forward<Args>( args )... );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( boost::detail::sp_forward<Arg1>( arg1 ), boost::detail::sp_forward<Args>( args )... );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-#elif defined( BOOST_HAS_RVALUE_REFS )
-
-// For example MSVC 10.0
-
-template< class T, class A1 >
-boost::shared_ptr< T > make_shared( A1 && a1 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-template< class T, class A, class A1 >
-boost::shared_ptr< T > allocate_shared( A const & a, A1 && a1 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-template< class T, class A1, class A2 >
-boost::shared_ptr< T > make_shared( A1 && a1, A2 && a2 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 ),
- boost::detail::sp_forward<A2>( a2 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-template< class T, class A, class A1, class A2 >
-boost::shared_ptr< T > allocate_shared( A const & a, A1 && a1, A2 && a2 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 ),
- boost::detail::sp_forward<A2>( a2 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-template< class T, class A1, class A2, class A3 >
-boost::shared_ptr< T > make_shared( A1 && a1, A2 && a2, A3 && a3 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 ),
- boost::detail::sp_forward<A2>( a2 ),
- boost::detail::sp_forward<A3>( a3 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-template< class T, class A, class A1, class A2, class A3 >
-boost::shared_ptr< T > allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 ),
- boost::detail::sp_forward<A2>( a2 ),
- boost::detail::sp_forward<A3>( a3 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-template< class T, class A1, class A2, class A3, class A4 >
-boost::shared_ptr< T > make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 ),
- boost::detail::sp_forward<A2>( a2 ),
- boost::detail::sp_forward<A3>( a3 ),
- boost::detail::sp_forward<A4>( a4 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-template< class T, class A, class A1, class A2, class A3, class A4 >
-boost::shared_ptr< T > allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 ),
- boost::detail::sp_forward<A2>( a2 ),
- boost::detail::sp_forward<A3>( a3 ),
- boost::detail::sp_forward<A4>( a4 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-template< class T, class A1, class A2, class A3, class A4, class A5 >
-boost::shared_ptr< T > make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 ),
- boost::detail::sp_forward<A2>( a2 ),
- boost::detail::sp_forward<A3>( a3 ),
- boost::detail::sp_forward<A4>( a4 ),
- boost::detail::sp_forward<A5>( a5 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 ),
- boost::detail::sp_forward<A2>( a2 ),
- boost::detail::sp_forward<A3>( a3 ),
- boost::detail::sp_forward<A4>( a4 ),
- boost::detail::sp_forward<A5>( a5 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-template< class T, class A1, class A2, class A3, class A4, class A5, class A6 >
-boost::shared_ptr< T > make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 ),
- boost::detail::sp_forward<A2>( a2 ),
- boost::detail::sp_forward<A3>( a3 ),
- boost::detail::sp_forward<A4>( a4 ),
- boost::detail::sp_forward<A5>( a5 ),
- boost::detail::sp_forward<A6>( a6 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 ),
- boost::detail::sp_forward<A2>( a2 ),
- boost::detail::sp_forward<A3>( a3 ),
- boost::detail::sp_forward<A4>( a4 ),
- boost::detail::sp_forward<A5>( a5 ),
- boost::detail::sp_forward<A6>( a6 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 >
-boost::shared_ptr< T > make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 ),
- boost::detail::sp_forward<A2>( a2 ),
- boost::detail::sp_forward<A3>( a3 ),
- boost::detail::sp_forward<A4>( a4 ),
- boost::detail::sp_forward<A5>( a5 ),
- boost::detail::sp_forward<A6>( a6 ),
- boost::detail::sp_forward<A7>( a7 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 ),
- boost::detail::sp_forward<A2>( a2 ),
- boost::detail::sp_forward<A3>( a3 ),
- boost::detail::sp_forward<A4>( a4 ),
- boost::detail::sp_forward<A5>( a5 ),
- boost::detail::sp_forward<A6>( a6 ),
- boost::detail::sp_forward<A7>( a7 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 ),
- boost::detail::sp_forward<A2>( a2 ),
- boost::detail::sp_forward<A3>( a3 ),
- boost::detail::sp_forward<A4>( a4 ),
- boost::detail::sp_forward<A5>( a5 ),
- boost::detail::sp_forward<A6>( a6 ),
- boost::detail::sp_forward<A7>( a7 ),
- boost::detail::sp_forward<A8>( a8 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 ),
- boost::detail::sp_forward<A2>( a2 ),
- boost::detail::sp_forward<A3>( a3 ),
- boost::detail::sp_forward<A4>( a4 ),
- boost::detail::sp_forward<A5>( a5 ),
- boost::detail::sp_forward<A6>( a6 ),
- boost::detail::sp_forward<A7>( a7 ),
- boost::detail::sp_forward<A8>( a8 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 ),
- boost::detail::sp_forward<A2>( a2 ),
- boost::detail::sp_forward<A3>( a3 ),
- boost::detail::sp_forward<A4>( a4 ),
- boost::detail::sp_forward<A5>( a5 ),
- boost::detail::sp_forward<A6>( a6 ),
- boost::detail::sp_forward<A7>( a7 ),
- boost::detail::sp_forward<A8>( a8 ),
- boost::detail::sp_forward<A9>( a9 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T(
- boost::detail::sp_forward<A1>( a1 ),
- boost::detail::sp_forward<A2>( a2 ),
- boost::detail::sp_forward<A3>( a3 ),
- boost::detail::sp_forward<A4>( a4 ),
- boost::detail::sp_forward<A5>( a5 ),
- boost::detail::sp_forward<A6>( a6 ),
- boost::detail::sp_forward<A7>( a7 ),
- boost::detail::sp_forward<A8>( a8 ),
- boost::detail::sp_forward<A9>( a9 )
- );
-
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-#else
-
-// C++03 version
-
-template< class T, class A1 >
-boost::shared_ptr< T > make_shared( A1 const & a1 )
-{
- boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1, a2 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1, a2 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1, a2, a3 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1, a2, a3 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1, a2, a3, a4 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1, a2, a3, a4 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1, a2, a3, a4, a5 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1, a2, a3, a4, a5 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1, a2, a3, a4, a5, a6 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1, a2, a3, a4, a5, a6 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ) );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8, a9 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
-
-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 ), BOOST_SP_MSD( T ), a );
-
- boost::detail::sp_ms_deleter< T > * pd = boost::get_deleter< boost::detail::sp_ms_deleter< T > >( pt );
-
- void * pv = pd->address();
-
- ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8, a9 );
- pd->set_initialized();
-
- T * pt2 = static_cast< T* >( pv );
-
- boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
- return boost::shared_ptr< T >( pt, pt2 );
-}
+#include <boost/smart_ptr/make_shared_object.hpp>
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( BOOST_NO_SFINAE )
+# include <boost/smart_ptr/make_shared_array.hpp>
+# include <boost/smart_ptr/allocate_shared_array.hpp>
#endif
-#undef BOOST_SP_MSD
-
-} // namespace boost
-
#endif // #ifndef BOOST_SMART_PTR_MAKE_SHARED_HPP_INCLUDED
--- /dev/null
+/*
+ * Copyright (c) 2012 Glen Joseph Fernandes
+ * glenfe at live dot com
+ *
+ * Distributed under the Boost Software License,
+ * Version 1.0. (See accompanying file LICENSE_1_0.txt
+ * or copy at http://boost.org/LICENSE_1_0.txt)
+ */
+#ifndef BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP
+#define BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP
+
+#include <boost/smart_ptr/shared_ptr.hpp>
+#include <boost/smart_ptr/detail/array_deleter.hpp>
+#include <boost/smart_ptr/detail/array_traits.hpp>
+#include <boost/smart_ptr/detail/make_array_helper.hpp>
+#include <boost/smart_ptr/detail/sp_if_array.hpp>
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list>
+#endif
+
+namespace boost {
+ template<typename T>
+ inline typename boost::detail::sp_if_array<T>::type
+ make_shared(std::size_t size) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ T1* p1 = 0;
+ T2* p2 = 0;
+ std::size_t n1 = size * boost::detail::array_total<T1>::size;
+ boost::detail::make_array_helper<T2[]> a1(n1, &p2);
+ boost::detail::array_deleter<T2[]> d1(n1);
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[]>* D2;
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->init(p2);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template<typename T, typename... Args>
+ inline typename boost::detail::sp_if_array<T>::type
+ make_shared(std::size_t size, Args&&... args) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ T1* p1 = 0;
+ T2* p2 = 0;
+ std::size_t n1 = size * boost::detail::array_total<T1>::size;
+ boost::detail::make_array_helper<T2[]> a1(n1, &p2);
+ boost::detail::array_deleter<T2[]> d1(n1);
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[]>* D2;
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->init(p2, boost::detail::sp_forward<Args>(args)...);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+ template<typename T, typename... Args>
+ inline typename boost::detail::sp_if_size_array<T>::type
+ make_shared(Args&&... args) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ enum {
+ N = boost::detail::array_total<T>::size
+ };
+ T1* p1 = 0;
+ T2* p2 = 0;
+ boost::detail::make_array_helper<T2[N]> a1(&p2);
+ boost::detail::array_deleter<T2[N]> d1;
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[N]>* D2;
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->init(p2, boost::detail::sp_forward<Args>(args)...);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+#endif
+#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
+ template<typename T>
+ inline typename boost::detail::sp_if_size_array<T>::type
+ make_shared(const T& list) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ typedef const T2 T3;
+ enum {
+ N = boost::detail::array_total<T>::size
+ };
+ T1* p1 = 0;
+ T2* p2 = 0;
+ T3* p3 = 0;
+ boost::detail::make_array_helper<T2[N]> a1(&p2);
+ boost::detail::array_deleter<T2[N]> d1;
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[N]>* D2;
+ p3 = reinterpret_cast<T3*>(list);
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->init_list(p2, p3);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+ template<typename T>
+ inline typename boost::detail::sp_if_array<T>::type
+ make_shared(std::size_t size,
+ const typename boost::detail::array_inner<T>::type& list) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ typedef const T2 T3;
+ enum {
+ M = boost::detail::array_total<T1>::size
+ };
+ T1* p1 = 0;
+ T2* p2 = 0;
+ T3* p3 = 0;
+ std::size_t n1 = M * size;
+ boost::detail::make_array_helper<T2[]> a1(n1, &p2);
+ boost::detail::array_deleter<T2[]> d1(n1);
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[]>* D2;
+ p3 = reinterpret_cast<T3*>(list);
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->template init_list<M>(p2, p3);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+ template<typename T>
+ inline typename boost::detail::sp_if_size_array<T>::type
+ make_shared(const typename boost::detail::array_inner<T>::type& list) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ typedef const T2 T3;
+ enum {
+ M = boost::detail::array_total<T1>::size,
+ N = boost::detail::array_total<T>::size
+ };
+ T1* p1 = 0;
+ T2* p2 = 0;
+ T3* p3 = 0;
+ boost::detail::make_array_helper<T2[N]> a1(&p2);
+ boost::detail::array_deleter<T2[N]> d1;
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[N]>* D2;
+ p3 = reinterpret_cast<T3*>(list);
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->template init_list<M>(p2, p3);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ template<typename T>
+ inline typename boost::detail::sp_if_array<T>::type
+ make_shared(std::initializer_list<typename boost::detail::array_inner<T>::type> list) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ typedef const T2 T3;
+ T1* p1 = 0;
+ T2* p2 = 0;
+ T3* p3 = 0;
+ std::size_t n1 = list.size() * boost::detail::array_total<T1>::size;
+ boost::detail::make_array_helper<T2[]> a1(n1, &p2);
+ boost::detail::array_deleter<T2[]> d1(n1);
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[]>* D2;
+ p3 = reinterpret_cast<T3*>(list.begin());
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->init_list(p2, p3);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+#endif
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template<typename T>
+ inline typename boost::detail::sp_if_array<T>::type
+ make_shared(std::size_t size,
+ typename boost::detail::array_base<T>::type&& value) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ T1* p1 = 0;
+ T2* p2 = 0;
+ std::size_t n1 = size * boost::detail::array_total<T1>::size;
+ boost::detail::make_array_helper<T2[]> a1(n1, &p2);
+ boost::detail::array_deleter<T2[]> d1(n1);
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[]>* D2;
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->init(p2, boost::detail::sp_forward<T2>(value));
+ return boost::shared_ptr<T>(s1, p1);
+ }
+ template<typename T>
+ inline typename boost::detail::sp_if_size_array<T>::type
+ make_shared(typename boost::detail::array_base<T>::type&& value) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ enum {
+ N = boost::detail::array_total<T>::size
+ };
+ T1* p1 = 0;
+ T2* p2 = 0;
+ boost::detail::make_array_helper<T2[N]> a1(&p2);
+ boost::detail::array_deleter<T2[N]> d1;
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[N]>* D2;
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->init(p2, boost::detail::sp_forward<T2>(value));
+ return boost::shared_ptr<T>(s1, p1);
+ }
+#endif
+#endif
+ template<typename T>
+ inline typename boost::detail::sp_if_array<T>::type
+ make_shared_noinit(std::size_t size) {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ T1* p1 = 0;
+ T2* p2 = 0;
+ std::size_t n1 = size * boost::detail::array_total<T1>::size;
+ boost::detail::make_array_helper<T2[]> a1(n1, &p2);
+ boost::detail::array_deleter<T2[]> d1(n1);
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[]>* D2;
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->noinit(p2);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+ template<typename T>
+ inline typename boost::detail::sp_if_size_array<T>::type
+ make_shared_noinit() {
+ typedef typename boost::detail::array_inner<T>::type T1;
+ typedef typename boost::detail::array_base<T1>::type T2;
+ enum {
+ N = boost::detail::array_total<T>::size
+ };
+ T1* p1 = 0;
+ T2* p2 = 0;
+ boost::detail::make_array_helper<T2[N]> a1(&p2);
+ boost::detail::array_deleter<T2[N]> d1;
+ boost::shared_ptr<T> s1(p1, d1, a1);
+ typedef boost::detail::array_deleter<T2[N]>* D2;
+ p1 = reinterpret_cast<T1*>(p2);
+ D2 d2 = static_cast<D2>(s1._internal_get_untyped_deleter());
+ d2->noinit(p2);
+ return boost::shared_ptr<T>(s1, p1);
+ }
+}
+
+#endif
--- /dev/null
+#ifndef BOOST_SMART_PTR_MAKE_SHARED_OBJECT_HPP_INCLUDED
+#define BOOST_SMART_PTR_MAKE_SHARED_OBJECT_HPP_INCLUDED
+
+// make_shared_object.hpp
+//
+// Copyright (c) 2007, 2008, 2012 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0.
+// See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+//
+// See http://www.boost.org/libs/smart_ptr/make_shared.html
+// for documentation.
+
+#include <boost/config.hpp>
+#include <boost/smart_ptr/shared_ptr.hpp>
+#include <boost/smart_ptr/detail/sp_forward.hpp>
+#include <boost/type_traits/type_with_alignment.hpp>
+#include <boost/type_traits/alignment_of.hpp>
+#include <cstddef>
+#include <new>
+
+namespace boost
+{
+
+namespace detail
+{
+
+template< std::size_t N, std::size_t A > struct sp_aligned_storage
+{
+ union type
+ {
+ char data_[ N ];
+ typename boost::type_with_alignment< A >::type align_;
+ };
+};
+
+template< class T > class sp_ms_deleter
+{
+private:
+
+ typedef typename sp_aligned_storage< sizeof( T ), ::boost::alignment_of< T >::value >::type storage_type;
+
+ bool initialized_;
+ storage_type storage_;
+
+private:
+
+ void destroy()
+ {
+ if( initialized_ )
+ {
+#if defined( __GNUC__ )
+
+ // fixes incorrect aliasing warning
+ T * p = reinterpret_cast< T* >( storage_.data_ );
+ p->~T();
+
+#else
+
+ reinterpret_cast< T* >( storage_.data_ )->~T();
+
+#endif
+
+ initialized_ = false;
+ }
+ }
+
+public:
+
+ sp_ms_deleter() BOOST_NOEXCEPT : initialized_( false )
+ {
+ }
+
+ // optimization: do not copy storage_
+ sp_ms_deleter( sp_ms_deleter const & ) BOOST_NOEXCEPT : initialized_( false )
+ {
+ }
+
+ ~sp_ms_deleter()
+ {
+ destroy();
+ }
+
+ void operator()( T * )
+ {
+ destroy();
+ }
+
+ void * address() BOOST_NOEXCEPT
+ {
+ return storage_.data_;
+ }
+
+ void set_initialized() BOOST_NOEXCEPT
+ {
+ initialized_ = true;
+ }
+};
+
+template< class T > struct sp_if_not_array
+{
+ typedef boost::shared_ptr< T > type;
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< class T > struct sp_if_not_array< T[] >
+{
+};
+
+#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
+
+template< class T, std::size_t N > struct sp_if_not_array< T[N] >
+{
+};
+
+#endif
+
+#endif
+
+} // namespace detail
+
+#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )
+# define BOOST_SP_MSD( T ) boost::detail::sp_inplace_tag< boost::detail::sp_ms_deleter< T > >()
+#else
+# define BOOST_SP_MSD( T ) boost::detail::sp_ms_deleter< T >()
+#endif
+
+// Zero-argument versions
+//
+// Used even when variadic templates are available because of the new T() vs new T issue
+
+template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared()
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T();
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared_noinit()
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T;
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T();
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A > typename boost::detail::sp_if_not_array< T >::type allocate_shared_noinit( A const & a )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T;
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+#if !defined( BOOST_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+// Variadic templates, rvalue reference
+
+template< class T, class Arg1, class... Args > typename boost::detail::sp_if_not_array< T >::type make_shared( Arg1 && arg1, Args && ... args )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( boost::detail::sp_forward<Arg1>( arg1 ), boost::detail::sp_forward<Args>( args )... );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class Arg1, class... Args > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, Arg1 && arg1, Args && ... args )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( boost::detail::sp_forward<Arg1>( arg1 ), boost::detail::sp_forward<Args>( args )... );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+#elif !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+// For example MSVC 10.0
+
+template< class T, class A1 >
+typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1 >
+typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2 >
+typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 ),
+ boost::detail::sp_forward<A2>( a2 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2 >
+typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 ),
+ boost::detail::sp_forward<A2>( a2 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3 >
+typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 ),
+ boost::detail::sp_forward<A2>( a2 ),
+ boost::detail::sp_forward<A3>( a3 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3 >
+typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 ),
+ boost::detail::sp_forward<A2>( a2 ),
+ boost::detail::sp_forward<A3>( a3 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4 >
+typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 ),
+ boost::detail::sp_forward<A2>( a2 ),
+ boost::detail::sp_forward<A3>( a3 ),
+ boost::detail::sp_forward<A4>( a4 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4 >
+typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 ),
+ boost::detail::sp_forward<A2>( a2 ),
+ boost::detail::sp_forward<A3>( a3 ),
+ boost::detail::sp_forward<A4>( a4 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4, class A5 >
+typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 ),
+ boost::detail::sp_forward<A2>( a2 ),
+ boost::detail::sp_forward<A3>( a3 ),
+ boost::detail::sp_forward<A4>( a4 ),
+ boost::detail::sp_forward<A5>( a5 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5 >
+typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 ),
+ boost::detail::sp_forward<A2>( a2 ),
+ boost::detail::sp_forward<A3>( a3 ),
+ boost::detail::sp_forward<A4>( a4 ),
+ boost::detail::sp_forward<A5>( a5 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4, class A5, class A6 >
+typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 ),
+ boost::detail::sp_forward<A2>( a2 ),
+ boost::detail::sp_forward<A3>( a3 ),
+ boost::detail::sp_forward<A4>( a4 ),
+ boost::detail::sp_forward<A5>( a5 ),
+ boost::detail::sp_forward<A6>( a6 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6 >
+typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 ),
+ boost::detail::sp_forward<A2>( a2 ),
+ boost::detail::sp_forward<A3>( a3 ),
+ boost::detail::sp_forward<A4>( a4 ),
+ boost::detail::sp_forward<A5>( a5 ),
+ boost::detail::sp_forward<A6>( a6 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 >
+typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 ),
+ boost::detail::sp_forward<A2>( a2 ),
+ boost::detail::sp_forward<A3>( a3 ),
+ boost::detail::sp_forward<A4>( a4 ),
+ boost::detail::sp_forward<A5>( a5 ),
+ boost::detail::sp_forward<A6>( a6 ),
+ boost::detail::sp_forward<A7>( a7 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7 >
+typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 ),
+ boost::detail::sp_forward<A2>( a2 ),
+ boost::detail::sp_forward<A3>( a3 ),
+ boost::detail::sp_forward<A4>( a4 ),
+ boost::detail::sp_forward<A5>( a5 ),
+ boost::detail::sp_forward<A6>( a6 ),
+ boost::detail::sp_forward<A7>( a7 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 >
+typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 ),
+ boost::detail::sp_forward<A2>( a2 ),
+ boost::detail::sp_forward<A3>( a3 ),
+ boost::detail::sp_forward<A4>( a4 ),
+ boost::detail::sp_forward<A5>( a5 ),
+ boost::detail::sp_forward<A6>( a6 ),
+ boost::detail::sp_forward<A7>( a7 ),
+ boost::detail::sp_forward<A8>( a8 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 >
+typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 ),
+ boost::detail::sp_forward<A2>( a2 ),
+ boost::detail::sp_forward<A3>( a3 ),
+ boost::detail::sp_forward<A4>( a4 ),
+ boost::detail::sp_forward<A5>( a5 ),
+ boost::detail::sp_forward<A6>( a6 ),
+ boost::detail::sp_forward<A7>( a7 ),
+ boost::detail::sp_forward<A8>( a8 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 >
+typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 ),
+ boost::detail::sp_forward<A2>( a2 ),
+ boost::detail::sp_forward<A3>( a3 ),
+ boost::detail::sp_forward<A4>( a4 ),
+ boost::detail::sp_forward<A5>( a5 ),
+ boost::detail::sp_forward<A6>( a6 ),
+ boost::detail::sp_forward<A7>( a7 ),
+ boost::detail::sp_forward<A8>( a8 ),
+ boost::detail::sp_forward<A9>( a9 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 >
+typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T(
+ boost::detail::sp_forward<A1>( a1 ),
+ boost::detail::sp_forward<A2>( a2 ),
+ boost::detail::sp_forward<A3>( a3 ),
+ boost::detail::sp_forward<A4>( a4 ),
+ boost::detail::sp_forward<A5>( a5 ),
+ boost::detail::sp_forward<A6>( a6 ),
+ boost::detail::sp_forward<A7>( a7 ),
+ boost::detail::sp_forward<A8>( a8 ),
+ boost::detail::sp_forward<A9>( a9 )
+ );
+
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+#else
+
+// C++03 version
+
+template< class T, class A1 >
+typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1 >
+typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2 >
+typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1, a2 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2 >
+typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1, a2 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3 >
+typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1, a2, a3 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3 >
+typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1, a2, a3 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4 >
+typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4 )
+{
+ boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1, a2, a3, a4 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4 >
+typename boost::detail::sp_if_not_array< T >::type 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 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1, a2, a3, a4 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4, class A5 >
+typename boost::detail::sp_if_not_array< T >::type 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 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1, a2, a3, a4, a5 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5 >
+typename boost::detail::sp_if_not_array< T >::type 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 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1, a2, a3, a4, a5 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4, class A5, class A6 >
+typename boost::detail::sp_if_not_array< T >::type 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 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1, a2, a3, a4, a5, a6 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6 >
+typename boost::detail::sp_if_not_array< T >::type 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 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1, a2, a3, a4, a5, a6 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 >
+typename boost::detail::sp_if_not_array< T >::type 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 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7 >
+typename boost::detail::sp_if_not_array< T >::type 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 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 >
+typename boost::detail::sp_if_not_array< T >::type 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 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 >
+typename boost::detail::sp_if_not_array< T >::type 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 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 >
+typename boost::detail::sp_if_not_array< T >::type 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 ), BOOST_SP_MSD( T ) );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8, a9 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 >
+typename boost::detail::sp_if_not_array< T >::type 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 ), BOOST_SP_MSD( T ), a );
+
+ boost::detail::sp_ms_deleter< T > * pd = static_cast<boost::detail::sp_ms_deleter< T > *>( pt._internal_get_untyped_deleter() );
+
+ void * pv = pd->address();
+
+ ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8, a9 );
+ pd->set_initialized();
+
+ T * pt2 = static_cast< T* >( pv );
+
+ boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 );
+ return boost::shared_ptr< T >( pt, pt2 );
+}
+
+#endif
+
+#undef BOOST_SP_MSD
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_MAKE_SHARED_OBJECT_HPP_INCLUDED
// http://www.boost.org/libs/smart_ptr/scoped_array.htm
//
+#include <boost/config.hpp>
#include <boost/assert.hpp>
#include <boost/checked_delete.hpp>
-#include <boost/config.hpp> // in case ptrdiff_t not in std
+#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
#include <boost/detail/workaround.hpp>
typedef T element_type;
- explicit scoped_array( T * p = 0 ) : px( p ) // never throws
+ explicit scoped_array( T * p = 0 ) BOOST_NOEXCEPT : px( p )
{
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
boost::sp_array_constructor_hook( px );
boost::checked_array_delete( px );
}
- void reset(T * p = 0) // never throws
+ void reset(T * p = 0) // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
{
BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors
this_type(p).swap(*this);
}
- T & operator[](std::ptrdiff_t i) const // never throws
+ T & operator[](std::ptrdiff_t i) const // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
{
BOOST_ASSERT( px != 0 );
BOOST_ASSERT( i >= 0 );
return px[i];
}
- T * get() const // never throws
+ T * get() const BOOST_NOEXCEPT
{
return px;
}
// implicit conversion to "bool"
#include <boost/smart_ptr/detail/operator_bool.hpp>
- void swap(scoped_array & b) // never throws
+ void swap(scoped_array & b) BOOST_NOEXCEPT
{
T * tmp = b.px;
b.px = px;
}
};
-template<class T> inline void swap(scoped_array<T> & a, scoped_array<T> & b) // never throws
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+template<class T> inline bool operator==( scoped_array<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+{
+ return p.get() == 0;
+}
+
+template<class T> inline bool operator==( boost::detail::sp_nullptr_t, scoped_array<T> const & p ) BOOST_NOEXCEPT
+{
+ return p.get() == 0;
+}
+
+template<class T> inline bool operator!=( scoped_array<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+{
+ return p.get() != 0;
+}
+
+template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, scoped_array<T> const & p ) BOOST_NOEXCEPT
+{
+ return p.get() != 0;
+}
+
+#endif
+
+template<class T> inline void swap(scoped_array<T> & a, scoped_array<T> & b) BOOST_NOEXCEPT
{
a.swap(b);
}
// http://www.boost.org/libs/smart_ptr/scoped_ptr.htm
//
+#include <boost/config.hpp>
#include <boost/assert.hpp>
#include <boost/checked_delete.hpp>
+#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
#include <boost/detail/workaround.hpp>
#ifndef BOOST_NO_AUTO_PTR
#ifndef BOOST_NO_AUTO_PTR
- explicit scoped_ptr( std::auto_ptr<T> p ): px( p.release() ) // never throws
+ explicit scoped_ptr( std::auto_ptr<T> p ) BOOST_NOEXCEPT : px( p.release() )
{
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
boost::sp_scalar_constructor_hook( px );
return px;
}
- T * get() const // never throws
+ T * get() const BOOST_NOEXCEPT
{
return px;
}
// implicit conversion to "bool"
#include <boost/smart_ptr/detail/operator_bool.hpp>
- void swap(scoped_ptr & b) // never throws
+ void swap(scoped_ptr & b) BOOST_NOEXCEPT
{
T * tmp = b.px;
b.px = px;
}
};
-template<class T> inline void swap(scoped_ptr<T> & a, scoped_ptr<T> & b) // never throws
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+template<class T> inline bool operator==( scoped_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+{
+ return p.get() == 0;
+}
+
+template<class T> inline bool operator==( boost::detail::sp_nullptr_t, scoped_ptr<T> const & p ) BOOST_NOEXCEPT
+{
+ return p.get() == 0;
+}
+
+template<class T> inline bool operator!=( scoped_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+{
+ return p.get() != 0;
+}
+
+template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, scoped_ptr<T> const & p ) BOOST_NOEXCEPT
+{
+ return p.get() != 0;
+}
+
+#endif
+
+template<class T> inline void swap(scoped_ptr<T> & a, scoped_ptr<T> & b) BOOST_NOEXCEPT
{
a.swap(b);
}
// get_pointer(p) is a generic way to say p.get()
-template<class T> inline T * get_pointer(scoped_ptr<T> const & p)
+template<class T> inline T * get_pointer(scoped_ptr<T> const & p) BOOST_NOEXCEPT
{
return p.get();
}
// shared_array.hpp
//
// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
-// Copyright (c) 2001, 2002 Peter Dimov
+// Copyright (c) 2001, 2002, 2012 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
#include <boost/assert.hpp>
#include <boost/checked_delete.hpp>
+#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/smart_ptr/detail/shared_count.hpp>
+#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
#include <boost/detail/workaround.hpp>
#include <cstddef> // for std::ptrdiff_t
typedef T element_type;
- explicit shared_array(T * p = 0): px(p), pn(p, deleter())
+ shared_array() BOOST_NOEXCEPT : px( 0 ), pn()
{
}
+ template<class Y>
+ explicit shared_array( Y * p ): px( p ), pn( p, checked_array_deleter<Y>() )
+ {
+ boost::detail::sp_assert_convertible< Y[], T[] >();
+ }
+
//
// Requirements: D's copy constructor must not throw
//
// shared_array will release p by calling d(p)
//
- template<class D> shared_array(T * p, D d): px(p), pn(p, d)
+ template<class Y, class D> shared_array( Y * p, D d ): px( p ), pn( p, d )
{
+ boost::detail::sp_assert_convertible< Y[], T[] >();
+ }
+
+ // As above, but with allocator. A's copy constructor shall not throw.
+
+ template<class Y, class D, class A> shared_array( Y * p, D d, A a ): px( p ), pn( p, d, a )
+ {
+ boost::detail::sp_assert_convertible< Y[], T[] >();
}
// generated copy constructor, destructor are fine...
-#if defined( BOOST_HAS_RVALUE_REFS )
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
// ... except in C++0x, move disables the implicit copy
- shared_array( shared_array const & r ): px( r.px ), pn( r.pn ) // never throws
+ shared_array( shared_array const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn )
{
}
+ shared_array( shared_array && r ) BOOST_NOEXCEPT : px( r.px ), pn()
+ {
+ pn.swap( r.pn );
+ r.px = 0;
+ }
+
+#endif
+
+ // conversion
+
+ template<class Y>
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
+ shared_array( shared_array<Y> const & r, typename boost::detail::sp_enable_if_convertible< Y[], T[] >::type = boost::detail::sp_empty() )
+
+#else
+
+ shared_array( shared_array<Y> const & r )
+
#endif
+ BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) // never throws
+ {
+ boost::detail::sp_assert_convertible< Y[], T[] >();
+ }
+
+ // aliasing
+
+ template< class Y >
+ shared_array( shared_array<Y> const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn )
+ {
+ }
// assignment
- shared_array & operator=( shared_array const & r ) // never throws
+ shared_array & operator=( shared_array const & r ) BOOST_NOEXCEPT
{
this_type( r ).swap( *this );
return *this;
}
- void reset(T * p = 0)
+#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400)
+
+ template<class Y>
+ shared_array & operator=( shared_array<Y> const & r ) BOOST_NOEXCEPT
+ {
+ this_type( r ).swap( *this );
+ return *this;
+ }
+
+#endif
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ shared_array & operator=( shared_array && r ) BOOST_NOEXCEPT
+ {
+ this_type( static_cast< shared_array && >( r ) ).swap( *this );
+ return *this;
+ }
+
+ template<class Y>
+ shared_array & operator=( shared_array<Y> && r ) BOOST_NOEXCEPT
+ {
+ this_type( static_cast< shared_array<Y> && >( r ) ).swap( *this );
+ return *this;
+ }
+
+#endif
+
+ void reset() BOOST_NOEXCEPT
+ {
+ this_type().swap( *this );
+ }
+
+ template<class Y> void reset( Y * p ) // Y must be complete
+ {
+ BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors
+ this_type( p ).swap( *this );
+ }
+
+ template<class Y, class D> void reset( Y * p, D d )
+ {
+ this_type( p, d ).swap( *this );
+ }
+
+ template<class Y, class D, class A> void reset( Y * p, D d, A a )
{
- BOOST_ASSERT(p == 0 || p != px);
- this_type(p).swap(*this);
+ this_type( p, d, a ).swap( *this );
}
- template <class D> void reset(T * p, D d)
+ template<class Y> void reset( shared_array<Y> const & r, element_type * p )
{
- this_type(p, d).swap(*this);
+ this_type( r, p ).swap( *this );
}
- T & operator[] (std::ptrdiff_t i) const // never throws
+ T & operator[] (std::ptrdiff_t i) const // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
{
BOOST_ASSERT(px != 0);
BOOST_ASSERT(i >= 0);
return px[i];
}
- T * get() const // never throws
+ T * get() const BOOST_NOEXCEPT
{
return px;
}
// implicit conversion to "bool"
#include <boost/smart_ptr/detail/operator_bool.hpp>
- bool unique() const // never throws
+ bool unique() const BOOST_NOEXCEPT
{
return pn.unique();
}
- long use_count() const // never throws
+ long use_count() const BOOST_NOEXCEPT
{
return pn.use_count();
}
- void swap(shared_array<T> & other) // never throws
+ void swap(shared_array<T> & other) BOOST_NOEXCEPT
{
std::swap(px, other.px);
pn.swap(other.pn);
private:
+ template<class Y> friend class shared_array;
+
T * px; // contained pointer
detail::shared_count pn; // reference counter
}; // shared_array
-template<class T> inline bool operator==(shared_array<T> const & a, shared_array<T> const & b) // never throws
+template<class T> inline bool operator==(shared_array<T> const & a, shared_array<T> const & b) BOOST_NOEXCEPT
{
return a.get() == b.get();
}
-template<class T> inline bool operator!=(shared_array<T> const & a, shared_array<T> const & b) // never throws
+template<class T> inline bool operator!=(shared_array<T> const & a, shared_array<T> const & b) BOOST_NOEXCEPT
{
return a.get() != b.get();
}
-template<class T> inline bool operator<(shared_array<T> const & a, shared_array<T> const & b) // never throws
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+template<class T> inline bool operator==( shared_array<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+{
+ return p.get() == 0;
+}
+
+template<class T> inline bool operator==( boost::detail::sp_nullptr_t, shared_array<T> const & p ) BOOST_NOEXCEPT
+{
+ return p.get() == 0;
+}
+
+template<class T> inline bool operator!=( shared_array<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+{
+ return p.get() != 0;
+}
+
+template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, shared_array<T> const & p ) BOOST_NOEXCEPT
+{
+ return p.get() != 0;
+}
+
+#endif
+
+template<class T> inline bool operator<(shared_array<T> const & a, shared_array<T> const & b) BOOST_NOEXCEPT
{
return std::less<T*>()(a.get(), b.get());
}
-template<class T> void swap(shared_array<T> & a, shared_array<T> & b) // never throws
+template<class T> void swap(shared_array<T> & a, shared_array<T> & b) BOOST_NOEXCEPT
{
a.swap(b);
}
#include <boost/smart_ptr/detail/shared_count.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/smart_ptr/detail/sp_convertible.hpp>
+#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
#if !defined(BOOST_SP_NO_ATOMIC_ACCESS)
#include <boost/smart_ptr/detail/spinlock_pool.hpp>
template<class T> class shared_ptr;
template<class T> class weak_ptr;
template<class T> class enable_shared_from_this;
-template<class T> class enable_shared_from_this2;
+class enable_shared_from_raw;
namespace detail
{
-struct static_cast_tag {};
-struct const_cast_tag {};
-struct dynamic_cast_tag {};
-struct polymorphic_cast_tag {};
+// sp_element, element_type
-template<class T> struct shared_ptr_traits
+template< class T > struct sp_element
{
- typedef T & reference;
+ typedef T type;
};
-template<> struct shared_ptr_traits<void>
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< class T > struct sp_element< T[] >
+{
+ typedef T type;
+};
+
+#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
+
+template< class T, std::size_t N > struct sp_element< T[N] >
+{
+ typedef T type;
+};
+
+#endif
+
+#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+// sp_dereference, return type of operator*
+
+template< class T > struct sp_dereference
+{
+ typedef T & type;
+};
+
+template<> struct sp_dereference< void >
{
- typedef void reference;
+ typedef void type;
};
#if !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
-template<> struct shared_ptr_traits<void const>
+template<> struct sp_dereference< void const >
+{
+ typedef void type;
+};
+
+template<> struct sp_dereference< void volatile >
+{
+ typedef void type;
+};
+
+template<> struct sp_dereference< void const volatile >
+{
+ typedef void type;
+};
+
+#endif // !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< class T > struct sp_dereference< T[] >
+{
+ typedef void type;
+};
+
+#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
+
+template< class T, std::size_t N > struct sp_dereference< T[N] >
{
- typedef void reference;
+ typedef void type;
};
-template<> struct shared_ptr_traits<void volatile>
+#endif
+
+#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+// sp_member_access, return type of operator->
+
+template< class T > struct sp_member_access
+{
+ typedef T * type;
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< class T > struct sp_member_access< T[] >
+{
+ typedef void type;
+};
+
+#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
+
+template< class T, std::size_t N > struct sp_member_access< T[N] >
+{
+ typedef void type;
+};
+
+#endif
+
+#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+// sp_array_access, return type of operator[]
+
+template< class T > struct sp_array_access
{
- typedef void reference;
+ typedef void type;
};
-template<> struct shared_ptr_traits<void const volatile>
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< class T > struct sp_array_access< T[] >
{
- typedef void reference;
+ typedef T & type;
+};
+
+#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
+
+template< class T, std::size_t N > struct sp_array_access< T[N] >
+{
+ typedef T & type;
};
#endif
+#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+// sp_extent, for operator[] index check
+
+template< class T > struct sp_extent
+{
+ enum _vt { value = 0 };
+};
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< class T, std::size_t N > struct sp_extent< T[N] >
+{
+ enum _vt { value = N };
+};
+
+#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
// enable_shared_from_this support
template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr<X> const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe )
}
}
-template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_this2< T > const * pe )
-{
- if( pe != 0 )
- {
- pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) );
- }
-}
+template< class X, class Y > inline void sp_enable_shared_from_this( boost::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_raw const * pe );
#ifdef _MANAGED
#endif
+// sp_assert_convertible
+
+template< class Y, class T > inline void sp_assert_convertible()
+{
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
+
+ // static_assert( sp_convertible< Y, T >::value );
+ typedef char tmp[ sp_convertible< Y, T >::value? 1: -1 ];
+ (void)sizeof( tmp );
+
+#else
+
+ T* p = static_cast< Y* >( 0 );
+ (void)p;
+
+#endif
+}
+
+// pointer constructor helper
+
+template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T > * ppx, Y * p, boost::detail::shared_count & pn )
+{
+ boost::detail::shared_count( p ).swap( pn );
+ boost::detail::sp_enable_shared_from_this( ppx, p, p );
+}
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * p, boost::detail::shared_count & pn )
+{
+ sp_assert_convertible< Y[], T[] >();
+ boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn );
+}
+
+template< class T, std::size_t N, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * p, boost::detail::shared_count & pn )
+{
+ sp_assert_convertible< Y[N], T[N] >();
+ boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn );
+}
+
+#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+// deleter constructor helper
+
+template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T > * ppx, Y * p )
+{
+ boost::detail::sp_enable_shared_from_this( ppx, p, p );
+}
+
+#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
+template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * /*p*/ )
+{
+ sp_assert_convertible< Y[], T[] >();
+}
+
+template< class T, std::size_t N, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * /*p*/ )
+{
+ sp_assert_convertible< Y[N], T[N] >();
+}
+
+#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+
} // namespace detail
public:
- typedef T element_type;
- typedef T value_type;
- typedef T * pointer;
- typedef typename boost::detail::shared_ptr_traits<T>::reference reference;
+ typedef typename boost::detail::sp_element< T >::type element_type;
- shared_ptr(): px(0), pn() // never throws in 1.30+
+ shared_ptr() BOOST_NOEXCEPT : px( 0 ), pn() // never throws in 1.30+
{
}
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+ shared_ptr( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT : px( 0 ), pn() // never throws
+ {
+ }
+
+#endif
+
template<class Y>
- explicit shared_ptr( Y * p ): px( p ), pn( p ) // Y must be complete
+ explicit shared_ptr( Y * p ): px( p ), pn() // Y must be complete
{
- boost::detail::sp_enable_shared_from_this( this, p, p );
+ boost::detail::sp_pointer_construct( this, p, pn );
}
//
// shared_ptr will release p by calling d(p)
//
- template<class Y, class D> shared_ptr(Y * p, D d): px(p), pn(p, d)
+ template<class Y, class D> shared_ptr( Y * p, D d ): px( p ), pn( p, d )
{
- boost::detail::sp_enable_shared_from_this( this, p, p );
+ boost::detail::sp_deleter_construct( this, p );
}
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+ template<class D> shared_ptr( boost::detail::sp_nullptr_t p, D d ): px( p ), pn( p, d )
+ {
+ }
+
+#endif
+
// As above, but with allocator. A's copy constructor shall not throw.
template<class Y, class D, class A> shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a )
{
- boost::detail::sp_enable_shared_from_this( this, p, p );
+ boost::detail::sp_deleter_construct( this, p );
}
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+ template<class D, class A> shared_ptr( boost::detail::sp_nullptr_t p, D d, A a ): px( p ), pn( p, d, a )
+ {
+ }
+
+#endif
+
// generated copy constructor, destructor are fine...
-#if defined( BOOST_HAS_RVALUE_REFS )
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
// ... except in C++0x, move disables the implicit copy
- shared_ptr( shared_ptr const & r ): px( r.px ), pn( r.pn ) // never throws
+ shared_ptr( shared_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn )
{
}
#endif
template<class Y>
- explicit shared_ptr(weak_ptr<Y> const & r): pn(r.pn) // may throw
+ explicit shared_ptr( weak_ptr<Y> const & r ): pn( r.pn ) // may throw
{
+ boost::detail::sp_assert_convertible< Y, T >();
+
// it is now safe to copy r.px, as pn(r.pn) did not throw
px = r.px;
}
template<class Y>
- shared_ptr( weak_ptr<Y> const & r, boost::detail::sp_nothrow_tag ): px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) // never throws
+ shared_ptr( weak_ptr<Y> const & r, boost::detail::sp_nothrow_tag )
+ BOOST_NOEXCEPT : px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() )
{
if( !pn.empty() )
{
shared_ptr( shared_ptr<Y> const & r )
#endif
- : px( r.px ), pn( r.pn ) // never throws
+ BOOST_NOEXCEPT : px( r.px ), pn( r.pn )
{
+ boost::detail::sp_assert_convertible< Y, T >();
}
// aliasing
template< class Y >
- shared_ptr( shared_ptr<Y> const & r, T * p ): px( p ), pn( r.pn ) // never throws
+ shared_ptr( shared_ptr<Y> const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn )
{
}
- template<class Y>
- shared_ptr(shared_ptr<Y> const & r, boost::detail::static_cast_tag): px(static_cast<element_type *>(r.px)), pn(r.pn)
- {
- }
+#ifndef BOOST_NO_AUTO_PTR
template<class Y>
- shared_ptr(shared_ptr<Y> const & r, boost::detail::const_cast_tag): px(const_cast<element_type *>(r.px)), pn(r.pn)
+ explicit shared_ptr( std::auto_ptr<Y> & r ): px(r.get()), pn()
{
- }
+ boost::detail::sp_assert_convertible< Y, T >();
- template<class Y>
- shared_ptr(shared_ptr<Y> const & r, boost::detail::dynamic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn)
- {
- if(px == 0) // need to allocate new counter -- the cast failed
- {
- pn = boost::detail::shared_count();
- }
- }
+ Y * tmp = r.get();
+ pn = boost::detail::shared_count( r );
- template<class Y>
- shared_ptr(shared_ptr<Y> const & r, boost::detail::polymorphic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn)
- {
- if(px == 0)
- {
- boost::throw_exception(std::bad_cast());
- }
+ boost::detail::sp_deleter_construct( this, tmp );
}
-#ifndef BOOST_NO_AUTO_PTR
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
template<class Y>
- explicit shared_ptr(std::auto_ptr<Y> & r): px(r.get()), pn()
+ shared_ptr( std::auto_ptr<Y> && r ): px(r.get()), pn()
{
+ boost::detail::sp_assert_convertible< Y, T >();
+
Y * tmp = r.get();
- pn = boost::detail::shared_count(r);
- boost::detail::sp_enable_shared_from_this( this, tmp, tmp );
+ pn = boost::detail::shared_count( r );
+
+ boost::detail::sp_deleter_construct( this, tmp );
}
-#if !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+#elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template<class Ap>
explicit shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr<Ap, int>::type = 0 ): px( r.get() ), pn()
{
- typename Ap::element_type * tmp = r.get();
+ typedef typename Ap::element_type Y;
+
+ boost::detail::sp_assert_convertible< Y, T >();
+
+ Y * tmp = r.get();
pn = boost::detail::shared_count( r );
- boost::detail::sp_enable_shared_from_this( this, tmp, tmp );
- }
+ boost::detail::sp_deleter_construct( this, tmp );
+ }
#endif // BOOST_NO_SFINAE, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#endif // BOOST_NO_AUTO_PTR
+#if !defined( BOOST_NO_CXX11_SMART_PTR )
+
+ template< class Y, class D >
+ shared_ptr( std::unique_ptr< Y, D > && r ): px( r.get() ), pn()
+ {
+ boost::detail::sp_assert_convertible< Y, T >();
+
+ typename std::unique_ptr< Y, D >::pointer tmp = r.get();
+ pn = boost::detail::shared_count( r );
+
+ boost::detail::sp_deleter_construct( this, tmp );
+ }
+
+#endif
+
// assignment
- shared_ptr & operator=( shared_ptr const & r ) // never throws
+ shared_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT
{
this_type(r).swap(*this);
return *this;
#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400)
template<class Y>
- shared_ptr & operator=(shared_ptr<Y> const & r) // never throws
+ shared_ptr & operator=(shared_ptr<Y> const & r) BOOST_NOEXCEPT
{
this_type(r).swap(*this);
return *this;
template<class Y>
shared_ptr & operator=( std::auto_ptr<Y> & r )
{
- this_type(r).swap(*this);
+ this_type( r ).swap( *this );
+ return *this;
+ }
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ template<class Y>
+ shared_ptr & operator=( std::auto_ptr<Y> && r )
+ {
+ this_type( static_cast< std::auto_ptr<Y> && >( r ) ).swap( *this );
return *this;
}
-#if !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+#elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template<class Ap>
typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r )
return *this;
}
-
#endif // BOOST_NO_SFINAE, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#endif // BOOST_NO_AUTO_PTR
+#if !defined( BOOST_NO_CXX11_SMART_PTR )
+
+ template<class Y, class D>
+ shared_ptr & operator=( std::unique_ptr<Y, D> && r )
+ {
+ this_type( static_cast< std::unique_ptr<Y, D> && >( r ) ).swap(*this);
+ return *this;
+ }
+
+#endif
+
// Move support
-#if defined( BOOST_HAS_RVALUE_REFS )
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
- shared_ptr( shared_ptr && r ): px( r.px ), pn() // never throws
+ shared_ptr( shared_ptr && r ) BOOST_NOEXCEPT : px( r.px ), pn()
{
pn.swap( r.pn );
r.px = 0;
shared_ptr( shared_ptr<Y> && r )
#endif
- : px( r.px ), pn() // never throws
+ BOOST_NOEXCEPT : px( r.px ), pn()
{
+ boost::detail::sp_assert_convertible< Y, T >();
+
pn.swap( r.pn );
r.px = 0;
}
- shared_ptr & operator=( shared_ptr && r ) // never throws
+ shared_ptr & operator=( shared_ptr && r ) BOOST_NOEXCEPT
{
this_type( static_cast< shared_ptr && >( r ) ).swap( *this );
return *this;
}
template<class Y>
- shared_ptr & operator=( shared_ptr<Y> && r ) // never throws
+ shared_ptr & operator=( shared_ptr<Y> && r ) BOOST_NOEXCEPT
{
this_type( static_cast< shared_ptr<Y> && >( r ) ).swap( *this );
return *this;
#endif
- void reset() // never throws in 1.30+
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+ shared_ptr & operator=( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT // never throws
{
this_type().swap(*this);
+ return *this;
}
- template<class Y> void reset(Y * p) // Y must be complete
+#endif
+
+ void reset() BOOST_NOEXCEPT // never throws in 1.30+
{
- BOOST_ASSERT(p == 0 || p != px); // catch self-reset errors
- this_type(p).swap(*this);
+ this_type().swap(*this);
+ }
+
+ template<class Y> void reset( Y * p ) // Y must be complete
+ {
+ BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors
+ this_type( p ).swap( *this );
}
template<class Y, class D> void reset( Y * p, D d )
this_type( p, d, a ).swap( *this );
}
- template<class Y> void reset( shared_ptr<Y> const & r, T * p )
+ template<class Y> void reset( shared_ptr<Y> const & r, element_type * p )
{
this_type( r, p ).swap( *this );
}
-
- reference operator* () const // never throws
+
+ // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
+ typename boost::detail::sp_dereference< T >::type operator* () const
{
- BOOST_ASSERT(px != 0);
+ BOOST_ASSERT( px != 0 );
return *px;
}
-
- T * operator-> () const // never throws
+
+ // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
+ typename boost::detail::sp_member_access< T >::type operator-> () const
{
- BOOST_ASSERT(px != 0);
+ BOOST_ASSERT( px != 0 );
return px;
}
+
+ // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
+ typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const
+ {
+ BOOST_ASSERT( px != 0 );
+ BOOST_ASSERT( i >= 0 && ( i < boost::detail::sp_extent< T >::value || boost::detail::sp_extent< T >::value == 0 ) );
+
+ return px[ i ];
+ }
- T * get() const // never throws
+ element_type * get() const BOOST_NOEXCEPT
{
return px;
}
// implicit conversion to "bool"
#include <boost/smart_ptr/detail/operator_bool.hpp>
- bool unique() const // never throws
+ bool unique() const BOOST_NOEXCEPT
{
return pn.unique();
}
- long use_count() const // never throws
+ long use_count() const BOOST_NOEXCEPT
{
return pn.use_count();
}
- void swap(shared_ptr<T> & other) // never throws
+ void swap( shared_ptr & other ) BOOST_NOEXCEPT
{
std::swap(px, other.px);
pn.swap(other.pn);
}
- template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const
+ template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const BOOST_NOEXCEPT
{
return pn < rhs.pn;
}
- template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const
+ template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const BOOST_NOEXCEPT
{
return pn < rhs.pn;
}
- void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const
+ void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const BOOST_NOEXCEPT
{
return pn.get_deleter( ti );
}
- bool _internal_equiv( shared_ptr const & r ) const
+ void * _internal_get_untyped_deleter() const BOOST_NOEXCEPT
+ {
+ return pn.get_untyped_deleter();
+ }
+
+ bool _internal_equiv( shared_ptr const & r ) const BOOST_NOEXCEPT
{
return px == r.px && pn == r.pn;
}
#endif
- T * px; // contained pointer
+ element_type * px; // contained pointer
boost::detail::shared_count pn; // reference counter
}; // shared_ptr
-template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b)
+template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_NOEXCEPT
{
return a.get() == b.get();
}
-template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b)
+template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_NOEXCEPT
{
return a.get() != b.get();
}
// Resolve the ambiguity between our op!= and the one in rel_ops
-template<class T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T> const & b)
+template<class T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T> const & b) BOOST_NOEXCEPT
{
return a.get() != b.get();
}
#endif
-template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b)
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+template<class T> inline bool operator==( shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
{
- return a.owner_before( b );
+ return p.get() == 0;
}
-template<class T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b)
+template<class T> inline bool operator==( boost::detail::sp_nullptr_t, shared_ptr<T> const & p ) BOOST_NOEXCEPT
{
- a.swap(b);
+ return p.get() == 0;
}
-template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r)
+template<class T> inline bool operator!=( shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
{
- return shared_ptr<T>(r, boost::detail::static_cast_tag());
+ return p.get() != 0;
}
-template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r)
+template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, shared_ptr<T> const & p ) BOOST_NOEXCEPT
{
- return shared_ptr<T>(r, boost::detail::const_cast_tag());
+ return p.get() != 0;
}
-template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r)
+#endif
+
+template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_NOEXCEPT
{
- return shared_ptr<T>(r, boost::detail::dynamic_cast_tag());
+ return a.owner_before( b );
}
-// shared_*_cast names are deprecated. Use *_pointer_cast instead.
+template<class T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b) BOOST_NOEXCEPT
+{
+ a.swap(b);
+}
-template<class T, class U> shared_ptr<T> shared_static_cast(shared_ptr<U> const & r)
+template<class T, class U> shared_ptr<T> static_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT
{
- return shared_ptr<T>(r, boost::detail::static_cast_tag());
+ (void) static_cast< T* >( static_cast< U* >( 0 ) );
+
+ typedef typename shared_ptr<T>::element_type E;
+
+ E * p = static_cast< E* >( r.get() );
+ return shared_ptr<T>( r, p );
}
-template<class T, class U> shared_ptr<T> shared_dynamic_cast(shared_ptr<U> const & r)
+template<class T, class U> shared_ptr<T> const_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT
{
- return shared_ptr<T>(r, boost::detail::dynamic_cast_tag());
+ (void) const_cast< T* >( static_cast< U* >( 0 ) );
+
+ typedef typename shared_ptr<T>::element_type E;
+
+ E * p = const_cast< E* >( r.get() );
+ return shared_ptr<T>( r, p );
}
-template<class T, class U> shared_ptr<T> shared_polymorphic_cast(shared_ptr<U> const & r)
+template<class T, class U> shared_ptr<T> dynamic_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT
{
- return shared_ptr<T>(r, boost::detail::polymorphic_cast_tag());
+ (void) dynamic_cast< T* >( static_cast< U* >( 0 ) );
+
+ typedef typename shared_ptr<T>::element_type E;
+
+ E * p = dynamic_cast< E* >( r.get() );
+ return p? shared_ptr<T>( r, p ): shared_ptr<T>();
}
-template<class T, class U> shared_ptr<T> shared_polymorphic_downcast(shared_ptr<U> const & r)
+template<class T, class U> shared_ptr<T> reinterpret_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT
{
- BOOST_ASSERT(dynamic_cast<T *>(r.get()) == r.get());
- return shared_static_cast<T>(r);
+ (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) );
+
+ typedef typename shared_ptr<T>::element_type E;
+
+ E * p = reinterpret_cast< E* >( r.get() );
+ return shared_ptr<T>( r, p );
}
// get_pointer() enables boost::mem_fn to recognize shared_ptr
-template<class T> inline T * get_pointer(shared_ptr<T> const & p)
+template<class T> inline typename shared_ptr<T>::element_type * get_pointer(shared_ptr<T> const & p) BOOST_NOEXCEPT
{
return p.get();
}
// get_deleter
+namespace detail
+{
+
#if ( defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3) ) || \
( defined(__EDG_VERSION__) && BOOST_WORKAROUND(__EDG_VERSION__, <= 238) ) || \
( defined(__HP_aCC) && BOOST_WORKAROUND(__HP_aCC, <= 33500) )
// g++ 2.9x doesn't allow static_cast<X const *>(void *)
// apparently EDG 2.38 and HP aCC A.03.35 also don't accept it
-template<class D, class T> D * get_deleter(shared_ptr<T> const & p)
+template<class D, class T> D * basic_get_deleter(shared_ptr<T> const & p)
{
void const * q = p._internal_get_deleter(BOOST_SP_TYPEID(D));
return const_cast<D *>(static_cast<D const *>(q));
#else
-template<class D, class T> D * get_deleter(shared_ptr<T> const & p)
+template<class D, class T> D * basic_get_deleter( shared_ptr<T> const & p ) BOOST_NOEXCEPT
{
- return static_cast<D *>(p._internal_get_deleter(BOOST_SP_TYPEID(D)));
+ return static_cast<D *>( p._internal_get_deleter(BOOST_SP_TYPEID(D)) );
}
#endif
+class esft2_deleter_wrapper
+{
+private:
+
+ shared_ptr<void> deleter_;
+
+public:
+
+ esft2_deleter_wrapper()
+ {
+ }
+
+ template< class T > void set_deleter( shared_ptr<T> const & deleter )
+ {
+ deleter_ = deleter;
+ }
+
+ template<typename D> D* get_deleter() const BOOST_NOEXCEPT
+ {
+ return boost::detail::basic_get_deleter<D>( deleter_ );
+ }
+
+ template< class T> void operator()( T* )
+ {
+ BOOST_ASSERT( deleter_.use_count() <= 1 );
+ deleter_.reset();
+ }
+};
+
+} // namespace detail
+
+template<class D, class T> D * get_deleter( shared_ptr<T> const & p ) BOOST_NOEXCEPT
+{
+ D *del = boost::detail::basic_get_deleter<D>(p);
+
+ if(del == 0)
+ {
+ boost::detail::esft2_deleter_wrapper *del_wrapper = boost::detail::basic_get_deleter<boost::detail::esft2_deleter_wrapper>(p);
+// The following get_deleter method call is fully qualified because
+// older versions of gcc (2.95, 3.2.3) fail to compile it when written del_wrapper->get_deleter<D>()
+ if(del_wrapper) del = del_wrapper->::boost::detail::esft2_deleter_wrapper::get_deleter<D>();
+ }
+
+ return del;
+}
+
// atomic access
#if !defined(BOOST_SP_NO_ATOMIC_ACCESS)
-template<class T> inline bool atomic_is_lock_free( shared_ptr<T> const * /*p*/ )
+template<class T> inline bool atomic_is_lock_free( shared_ptr<T> const * /*p*/ ) BOOST_NOEXCEPT
{
return false;
}
template< class T > struct hash;
-template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p )
+template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p ) BOOST_NOEXCEPT
{
return boost::hash< T* >()( p.get() );
}
public:
- typedef T element_type;
+ typedef typename boost::detail::sp_element< T >::type element_type;
- weak_ptr(): px(0), pn() // never throws in 1.30+
+ weak_ptr() BOOST_NOEXCEPT : px(0), pn() // never throws in 1.30+
{
}
// generated copy constructor, assignment, destructor are fine...
-#if defined( BOOST_HAS_RVALUE_REFS )
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
// ... except in C++0x, move disables the implicit copy
- weak_ptr( weak_ptr const & r ): px( r.px ), pn( r.pn ) // never throws
+ weak_ptr( weak_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn )
{
}
- weak_ptr & operator=( weak_ptr const & r ) // never throws
+ weak_ptr & operator=( weak_ptr const & r ) BOOST_NOEXCEPT
{
px = r.px;
pn = r.pn;
weak_ptr( weak_ptr<Y> const & r )
#endif
- : px(r.lock().get()), pn(r.pn) // never throws
+ BOOST_NOEXCEPT : px(r.lock().get()), pn(r.pn)
{
+ boost::detail::sp_assert_convertible< Y, T >();
}
-#if defined( BOOST_HAS_RVALUE_REFS )
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
template<class Y>
#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
weak_ptr( weak_ptr<Y> && r )
#endif
- : px( r.lock().get() ), pn( static_cast< boost::detail::weak_count && >( r.pn ) ) // never throws
+ BOOST_NOEXCEPT : px( r.lock().get() ), pn( static_cast< boost::detail::weak_count && >( r.pn ) )
{
+ boost::detail::sp_assert_convertible< Y, T >();
r.px = 0;
}
// for better efficiency in the T == Y case
- weak_ptr( weak_ptr && r ): px( r.px ), pn( static_cast< boost::detail::weak_count && >( r.pn ) ) // never throws
+ weak_ptr( weak_ptr && r )
+ BOOST_NOEXCEPT : px( r.px ), pn( static_cast< boost::detail::weak_count && >( r.pn ) )
{
r.px = 0;
}
// for better efficiency in the T == Y case
- weak_ptr & operator=( weak_ptr && r ) // never throws
+ weak_ptr & operator=( weak_ptr && r ) BOOST_NOEXCEPT
{
this_type( static_cast< weak_ptr && >( r ) ).swap( *this );
return *this;
weak_ptr( shared_ptr<Y> const & r )
#endif
- : px( r.px ), pn( r.pn ) // never throws
+ BOOST_NOEXCEPT : px( r.px ), pn( r.pn )
{
+ boost::detail::sp_assert_convertible< Y, T >();
}
#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1300)
template<class Y>
- weak_ptr & operator=(weak_ptr<Y> const & r) // never throws
+ weak_ptr & operator=( weak_ptr<Y> const & r ) BOOST_NOEXCEPT
{
+ boost::detail::sp_assert_convertible< Y, T >();
+
px = r.lock().get();
pn = r.pn;
+
return *this;
}
-#if defined( BOOST_HAS_RVALUE_REFS )
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
template<class Y>
- weak_ptr & operator=( weak_ptr<Y> && r )
+ weak_ptr & operator=( weak_ptr<Y> && r ) BOOST_NOEXCEPT
{
this_type( static_cast< weak_ptr<Y> && >( r ) ).swap( *this );
return *this;
#endif
template<class Y>
- weak_ptr & operator=(shared_ptr<Y> const & r) // never throws
+ weak_ptr & operator=( shared_ptr<Y> const & r ) BOOST_NOEXCEPT
{
+ boost::detail::sp_assert_convertible< Y, T >();
+
px = r.px;
pn = r.pn;
+
return *this;
}
#endif
- shared_ptr<T> lock() const // never throws
+ shared_ptr<T> lock() const BOOST_NOEXCEPT
{
- return shared_ptr<element_type>( *this, boost::detail::sp_nothrow_tag() );
+ return shared_ptr<T>( *this, boost::detail::sp_nothrow_tag() );
}
- long use_count() const // never throws
+ long use_count() const BOOST_NOEXCEPT
{
return pn.use_count();
}
- bool expired() const // never throws
+ bool expired() const BOOST_NOEXCEPT
{
return pn.use_count() == 0;
}
return pn.empty();
}
- void reset() // never throws in 1.30+
+ void reset() BOOST_NOEXCEPT // never throws in 1.30+
{
this_type().swap(*this);
}
- void swap(this_type & other) // never throws
+ void swap(this_type & other) BOOST_NOEXCEPT
{
std::swap(px, other.px);
pn.swap(other.pn);
}
- void _internal_assign(T * px2, boost::detail::shared_count const & pn2)
+ template<typename Y>
+ void _internal_aliasing_assign(weak_ptr<Y> const & r, element_type * px2)
{
px = px2;
- pn = pn2;
+ pn = r.pn;
}
- template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const
+ template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const BOOST_NOEXCEPT
{
return pn < rhs.pn;
}
- template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const
+ template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const BOOST_NOEXCEPT
{
return pn < rhs.pn;
}
#endif
- T * px; // contained pointer
+ element_type * px; // contained pointer
boost::detail::weak_count pn; // reference counter
}; // weak_ptr
-template<class T, class U> inline bool operator<(weak_ptr<T> const & a, weak_ptr<U> const & b)
+template<class T, class U> inline bool operator<(weak_ptr<T> const & a, weak_ptr<U> const & b) BOOST_NOEXCEPT
{
return a.owner_before( b );
}
-template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b)
+template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b) BOOST_NOEXCEPT
{
a.swap(b);
}
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
-#ifndef BOOST_NO_STATIC_ASSERT
+#ifndef BOOST_NO_CXX11_STATIC_ASSERT
# define BOOST_STATIC_ASSERT_MSG( B, Msg ) static_assert(B, Msg)
#else
# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B )
# define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x)
#endif
-#ifndef BOOST_NO_STATIC_ASSERT
+#ifndef BOOST_NO_CXX11_STATIC_ASSERT
# define BOOST_STATIC_ASSERT( B ) static_assert(B, #B)
#else
enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \
= sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) }
#endif
-#endif // defined(BOOST_NO_STATIC_ASSERT)
+#endif // defined(BOOST_NO_CXX11_STATIC_ASSERT)
#endif // BOOST_STATIC_ASSERT_HPP
--- /dev/null
+// Copyright (C) 2007 Joseph Gauterin
+//
+// 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_SWAP_HPP
+#define BOOST_SWAP_HPP
+
+#include "boost/utility/swap.hpp"
+
+#endif
-#ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED
-#define BOOST_THROW_EXCEPTION_HPP_INCLUDED
+#ifndef UUID_AA15E74A856F11E08B8D93F24824019B
+#define UUID_AA15E74A856F11E08B8D93F24824019B
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
// MS compatible compilers support #pragma once
set_info(
set_info(
set_info(
- boost::enable_error_info(x),
+ enable_error_info(x),
throw_function(current_function)),
throw_file(file)),
throw_line(line)));
#endif
} // namespace boost
-#endif // #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
+#endif
BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_lvalue_reference,T,typename boost::add_reference<T>::type)
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_lvalue_reference,T&&,T&)
#endif
typedef T& type;
};
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <typename T>
struct add_reference_rvalue_layer<T&&>
{
//----------------------------------------------------------------------------//
// //
// C++03 implementation of //
-// 20.7.6.2 Reference modifications [meta.trans.ref] //
+// 20.9.7.2 Reference modifications [meta.trans.ref] //
// Written by Vicente J. Botet Escriba //
// //
// If T names an object or function type then the member typedef type
struct add_rvalue_reference_helper
{ typedef T type; };
-#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template <typename T>
struct add_rvalue_reference_helper<T, true>
{
template <typename T>
struct add_rvalue_reference_imp
- {
+ {
typedef typename boost::type_traits_detail::add_rvalue_reference_helper
- <T, (!is_void<T>::value && !is_reference<T>::value) >::type type;
+ <T, (is_void<T>::value == false && is_reference<T>::value == false) >::type type;
};
}
#endif
//----------------------------------------------------------------------------//
-#if defined(BOOST_NO_VARIADIC_TEMPLATES) && !defined(BOOST_COMMON_TYPE_ARITY)
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_COMMON_TYPE_ARITY)
#define BOOST_COMMON_TYPE_ARITY 3
#endif
//----------------------------------------------------------------------------//
-#if defined(BOOST_NO_DECLTYPE) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) && !defined(BOOST_TYPEOF_SILENT)
+#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) && !defined(BOOST_TYPEOF_SILENT)
#define BOOST_TYPEOF_SILENT
#include <boost/typeof/typeof.hpp> // boost wonders never cease!
#endif
//----------------------------------------------------------------------------//
-#ifndef BOOST_NO_STATIC_ASSERT
+#ifndef BOOST_NO_CXX11_STATIC_ASSERT
#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
#elif defined(BOOST_COMMON_TYPE_USES_MPL_ASSERT)
#include <boost/mpl/assert.hpp>
#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
#endif
-#if !defined(BOOST_NO_STATIC_ASSERT) || !defined(BOOST_COMMON_TYPE_USES_MPL_ASSERT)
+#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) || !defined(BOOST_COMMON_TYPE_USES_MPL_ASSERT)
#define BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE "must be complete type"
#endif
-#if defined(BOOST_NO_DECLTYPE) && defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF)
+#if defined(BOOST_NO_CXX11_DECLTYPE) && defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF)
#include <boost/type_traits/detail/common_type_imp.hpp>
#include <boost/type_traits/remove_cv.hpp>
#endif
//----------------------------------------------------------------------------//
// //
// C++03 implementation of //
-// 20.6.7 Other transformations [meta.trans.other] //
+// 20.9.7.6 Other transformations [meta.trans.other] //
// Written by Howard Hinnant //
// Adapted for Boost by Beman Dawes, Vicente Botet and Jeffrey Hellrung //
// //
namespace boost {
// prototype
-#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template<typename... T>
struct common_type;
#else // or no specialization
// 1 arg
template<typename T>
-#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
struct common_type<T>
#else
struct common_type<T, void, void>
static typename add_rvalue_reference<U>::type declval_U(); // workaround gcc bug; not required by std
static typename add_rvalue_reference<bool>::type declval_b();
-#if !defined(BOOST_NO_DECLTYPE)
+#if !defined(BOOST_NO_CXX11_DECLTYPE)
public:
typedef decltype(declval<bool>() ? declval<T>() : declval<U>()) type;
#elif defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF)
};
}
-#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <class T, class U>
struct common_type<T, U>
#else
// 3 or more args
-#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template<typename T, typename U, typename... V>
struct common_type<T, U, V...> {
public:
#include <boost/detail/workaround.hpp>
//
-// whenever we have a conversion function with elipses
+// whenever we have a conversion function with ellipses
// it needs to be declared __cdecl to suppress compiler
// warnings from MS and Borland compilers (this *must*
// appear before we include is_same.hpp below):
// http://www.boost.org/LICENSE_1_0.txt)
// $Source$
-// $Date: 2011-10-09 18:28:33 -0400 (Sun, 09 Oct 2011) $
+// $Date: 2011-10-09 15:28:33 -0700 (Sun, 09 Oct 2011) $
// $Revision: 74865 $
#include <boost/type_traits/detail/template_arity_spec.hpp>
// http://www.boost.org/LICENSE_1_0.txt)
// $Source$
-// $Date: 2011-10-09 18:28:33 -0400 (Sun, 09 Oct 2011) $
+// $Date: 2011-10-09 15:28:33 -0700 (Sun, 09 Oct 2011) $
// $Revision: 74865 $
#undef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL
* struct make_signed_soft<T>
*
* These metafunction are identical to make_unsigned and make_signed,
- * respetively, except for special-casing bool.
+ * respectively, except for special-casing bool.
******************************************************************************/
template< class T >
namespace boost {
namespace type_traits {
-// Note it is acceptible to use ellipsis here, since the argument will
+// Note it is acceptable to use ellipsis here, since the argument will
// always be a pointer type of some sort (JM 2005/06/04):
no_type BOOST_TT_DECL is_function_ptr_tester(...);
// http://www.boost.org/LICENSE_1_0.txt)
// $Source$
-// $Date: 2011-04-25 08:26:48 -0400 (Mon, 25 Apr 2011) $
+// $Date: 2011-04-25 05:26:48 -0700 (Mon, 25 Apr 2011) $
// $Revision: 71481 $
#include <boost/type_traits/detail/template_arity_spec.hpp>
// http://www.boost.org/LICENSE_1_0.txt)
// $Source$
-// $Date: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $
+// $Date: 2004-09-02 08:41:37 -0700 (Thu, 02 Sep 2004) $
// $Revision: 24874 $
#undef BOOST_TT_AUX_SIZE_T_TRAIT_DEF1
// http://www.boost.org/LICENSE_1_0.txt)
// $Source$
-// $Date: 2011-04-25 08:26:48 -0400 (Mon, 25 Apr 2011) $
+// $Date: 2011-04-25 05:26:48 -0700 (Mon, 25 Apr 2011) $
// $Revision: 71481 $
#include <boost/type_traits/detail/template_arity_spec.hpp>
// http://www.boost.org/LICENSE_1_0.txt)
// $Source$
-// $Date: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $
+// $Date: 2004-09-02 08:41:37 -0700 (Thu, 02 Sep 2004) $
// $Revision: 24874 $
#undef BOOST_TT_AUX_TYPE_TRAIT_DEF1
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#endif
-#if defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215)
+#if (defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215))\
+ || (defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1500))
# include <boost/type_traits/is_same.hpp>
+# include <boost/type_traits/is_function.hpp>
# define BOOST_IS_UNION(T) __is_union(T)
# define BOOST_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T))
# define BOOST_IS_ABSTRACT(T) __is_abstract(T)
# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same<T,U>::value)
# define BOOST_IS_CLASS(T) __is_class(T)
-# define BOOST_IS_CONVERTIBLE(T,U) ((__is_convertible_to(T,U) || is_same<T,U>::value) && !__is_abstract(U))
+# define BOOST_IS_CONVERTIBLE(T,U) ((__is_convertible_to(T,U) || (is_same<T,U>::value && !is_function<U>::value)) && !__is_abstract(U))
# define BOOST_IS_ENUM(T) __is_enum(T)
// This one doesn't quite always do the right thing:
// # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
#endif
#if defined(BOOST_CLANG) && defined(__has_feature)
+# include <cstddef>
# include <boost/type_traits/is_same.hpp>
# include <boost/type_traits/is_reference.hpp>
# include <boost/type_traits/is_volatile.hpp>
# if __has_feature(is_union)
# define BOOST_IS_UNION(T) __is_union(T)
# endif
-# if __has_feature(is_pod) && defined(_LIBCPP_VERSION)
+# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_pod)
# define BOOST_IS_POD(T) __is_pod(T)
# endif
-# if __has_feature(is_empty) && defined(_LIBCPP_VERSION)
+# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty)
# define BOOST_IS_EMPTY(T) __is_empty(T)
# endif
# if __has_feature(has_trivial_constructor)
# define BOOST_HAS_TYPE_TRAITS_INTRINSICS
#endif
-#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__)))
+#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) && !defined(BOOST_CLANG)
# include <boost/type_traits/is_same.hpp>
# include <boost/type_traits/is_reference.hpp>
# include <boost/type_traits/is_volatile.hpp>
+
// At this time supported by EDG (Intel C++ 7, Comeau 4.3.2) and VC7.1.
// - Adapted and added into Boost.Serialization library by Robert Ramey
// (starting with submission #10).
-// - Jan 2004: GCC 3.4 fixed to suport DR337 (Giovanni Bajo).
+// - Jan 2004: GCC 3.4 fixed to support DR337 (Giovanni Bajo).
// - Jan 2004: modified to be part of Boost.TypeTraits (Pavel Vozenilek).
// - Nov 2004: Christoph Ludwig found that the implementation did not work with
// template types and gcc-3.4 or VC7.1, fix due to Christoph Ludwig
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-// Some fixes for is_array are based on a newgroup posting by Jonathan Lundquist.
+// Some fixes for is_array are based on a newsgroup posting by Jonathan Lundquist.
#ifndef BOOST_TT_IS_ARRAY_HPP_INCLUDED
BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<T*>::is_const);
#endif
};
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <class T>
struct is_const_rvalue_filter<T&&>
{
#include <boost/type_traits/detail/yes_no_type.hpp>
#include <boost/type_traits/config.hpp>
#include <boost/type_traits/is_array.hpp>
-#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/ice.hpp>
#include <boost/type_traits/is_arithmetic.hpp>
#include <boost/type_traits/is_void.hpp>
#ifndef BOOST_NO_IS_ABSTRACT
#include <boost/type_traits/is_abstract.hpp>
#endif
+#include <boost/type_traits/add_lvalue_reference.hpp>
#include <boost/type_traits/add_rvalue_reference.hpp>
+#include <boost/type_traits/is_function.hpp>
#if defined(__MWERKS__)
-#include <boost/type_traits/is_function.hpp>
#include <boost/type_traits/remove_reference.hpp>
#endif
#ifndef BOOST_IS_CONVERTIBLE
-// is one type convertable to another?
+// is one type convertible to another?
//
// there are multiple versions of the is_convertible
// template, almost every compiler seems to require its
{
static no_type BOOST_TT_DECL _m_check(...);
static yes_type BOOST_TT_DECL _m_check(To);
- static typename add_rvalue_reference<From>::type _m_from;
+ static typename add_lvalue_reference<From>::type _m_from;
enum { value = sizeof( _m_check(_m_from) ) == sizeof(yes_type) };
};
};
static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(T);
};
- static typename add_rvalue_reference<From>::type _m_from;
+ static typename add_lvalue_reference<From>::type _m_from;
static bool const value = sizeof( checker<To>::_m_check(_m_from) )
== sizeof(::boost::type_traits::yes_type);
#pragma option pop
struct any_conversion
{
template <typename T> any_conversion(const volatile T&);
+ template <typename T> any_conversion(const T&);
+ template <typename T> any_conversion(volatile T&);
template <typename T> any_conversion(T&);
};
template <typename From, typename To>
struct is_convertible_basic_impl
{
- static typename add_rvalue_reference<From>::type _m_from;
- static bool const value = sizeof( boost::detail::checker<To>::_m_check(_m_from, 0) )
+ typedef typename add_lvalue_reference<From>::type lvalue_type;
+ typedef typename add_rvalue_reference<From>::type rvalue_type;
+ static lvalue_type _m_from;
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6)))
+ static bool const value =
+ sizeof( boost::detail::checker<To>::_m_check(static_cast<rvalue_type>(_m_from), 0) )
+ == sizeof(::boost::type_traits::yes_type);
+#else
+ static bool const value =
+ sizeof( boost::detail::checker<To>::_m_check(_m_from, 0) )
== sizeof(::boost::type_traits::yes_type);
+#endif
};
#elif (defined(__EDG_VERSION__) && (__EDG_VERSION__ >= 245) && !defined(__ICL)) \
struct any_conversion
{
template <typename T> any_conversion(const volatile T&);
+ template <typename T> any_conversion(const T&);
+ template <typename T> any_conversion(volatile T&);
// we need this constructor to catch references to functions
// (which can not be cv-qualified):
template <typename T> any_conversion(T&);
{
static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...);
static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int);
- static typename add_rvalue_reference<From>::type _m_from;
+ typedef typename add_lvalue_reference<From>::type lvalue_type;
+ typedef typename add_rvalue_reference<From>::type rvalue_type;
+ static lvalue_type _m_from;
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ BOOST_STATIC_CONSTANT(bool, value =
+ sizeof( _m_check(static_cast<rvalue_type>(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type)
+ );
+#else
BOOST_STATIC_CONSTANT(bool, value =
sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type)
);
+#endif
};
#elif defined(__DMC__)
struct any_conversion
{
template <typename T> any_conversion(const volatile T&);
+ template <typename T> any_conversion(const T&);
+ template <typename T> any_conversion(volatile T&);
// we need this constructor to catch references to functions
// (which can not be cv-qualified):
template <typename T> any_conversion(T&);
template <class T>
static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion, float, T);
static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int, int);
- static typename add_rvalue_reference<From>::type _m_from;
+ typedef typename add_lvalue_reference<From>::type lvalue_type;
+ typedef typename add_rvalue_reference<From>::type rvalue_type;
+ static lvalue_type _m_from;
// Static constants sometime cause the conversion of _m_from to To to be
// called. This doesn't happen with an enum.
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ enum { value =
+ sizeof( _m_check(static_cast<rvalue_type>(_m_from), 0, 0) ) == sizeof(::boost::type_traits::yes_type)
+ };
+#else
enum { value =
sizeof( _m_check(_m_from, 0, 0) ) == sizeof(::boost::type_traits::yes_type)
};
+#endif
};
#elif defined(__MWERKS__)
struct any_conversion
{
template <typename T> any_conversion(const volatile T&);
+ template <typename T> any_conversion(const T&);
+ template <typename T> any_conversion(volatile T&);
+ template <typename T> any_conversion(T&);
};
template <typename From, typename To>
{
static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...);
static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int);
- static typename add_rvalue_reference<From>::type _m_from;
+ typedef typename add_lvalue_reference<From>::type lvalue_type;
+ typedef typename add_rvalue_reference<From>::type rvalue_type;
+ static lvalue_type _m_from;
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ BOOST_STATIC_CONSTANT(bool, value =
+ sizeof( _m_check(static_cast<rvalue_type>(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type)
+ );
+#else
BOOST_STATIC_CONSTANT(bool, value =
sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type)
);
+#endif
};
template <typename From, typename To>
{
static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...);
static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To);
- static typename add_rvalue_reference<From>::type _m_from;
+ typedef typename add_lvalue_reference<From>::type lvalue_type;
+ typedef typename add_rvalue_reference<From>::type rvalue_type;
+ static lvalue_type _m_from;
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ BOOST_STATIC_CONSTANT(bool, value =
+ sizeof( _m_check(static_cast<rvalue_type>(_m_from)) ) == sizeof(::boost::type_traits::yes_type)
+ );
+#else
BOOST_STATIC_CONSTANT(bool, value =
sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type)
);
+#endif
};
template <typename From, typename To>
{};
#else
-
//
// This version seems to work pretty well for a wide spectrum of compilers,
// however it does rely on undefined behaviour by passing UDT's through (...).
{
static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...);
static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To);
- static typename add_rvalue_reference<From>::type _m_from;
+ typedef typename add_lvalue_reference<From>::type lvalue_type;
+ typedef typename add_rvalue_reference<From>::type rvalue_type;
+ static lvalue_type _m_from;
#ifdef BOOST_MSVC
#pragma warning(push)
#pragma warning(disable:4244)
#pragma warning(disable:6334)
#endif
#endif
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ BOOST_STATIC_CONSTANT(bool, value =
+ sizeof( _m_check(static_cast<rvalue_type>(_m_from)) ) == sizeof(::boost::type_traits::yes_type)
+ );
+#else
BOOST_STATIC_CONSTANT(bool, value =
sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type)
);
+#endif
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
template <typename From, typename To>
struct is_convertible_impl
{
- typedef typename add_reference<From>::type ref_type;
enum { value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_or<
- ::boost::detail::is_convertible_basic_impl<ref_type,To>::value,
+ ::boost::detail::is_convertible_basic_impl<From,To>::value,
::boost::is_void<To>::value
>::value,
::boost::type_traits::ice_not<
::boost::is_array<To>::value
+ >::value,
+ ::boost::type_traits::ice_not<
+ ::boost::is_function<To>::value
>::value
>::value) };
};
template <typename From, typename To>
struct is_convertible_impl
{
- typedef typename add_reference<From>::type ref_type;
BOOST_STATIC_CONSTANT(bool, value =
(::boost::type_traits::ice_and<
::boost::type_traits::ice_or<
- ::boost::detail::is_convertible_basic_impl<ref_type,To>::value,
+ ::boost::detail::is_convertible_basic_impl<From,To>::value,
::boost::is_void<To>::value
>::value,
::boost::type_traits::ice_not<
::boost::is_array<To>::value
+ >::value,
+ ::boost::type_traits::ice_not<
+ ::boost::is_function<To>::value
>::value
>::value)
);
template <typename T>
struct is_function_impl<T&> : public false_type
{};
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+template <typename T>
+struct is_function_impl<T&&> : public false_type
+{};
+#endif
#endif
#endif
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
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_function,T&&,false)
#endif
#endif
namespace boost {
//* is a type T an [cv-qualified-] integral type described in the standard (3.9.1p3)
-// as an extention we include long long, as this is likely to be added to the
+// as an extension we include long long, as this is likely to be added to the
// standard at a later date
#if defined( __CODEGEARC__ )
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_integral,T,__is_integral(T))
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int64,true)
BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true)
#endif
+
+#ifdef BOOST_HAS_INT128
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,boost::int128_type,true)
+BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,boost::uint128_type,true)
+#endif
#endif // non-CodeGear implementation
namespace boost {
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_rvalue_reference,T,false)
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_rvalue_reference,T&&,true)
#endif
#ifdef BOOST_MSVC
#pragma warning( push )
#pragma warning( disable : 4584 4250)
-#elif defined __GNUC__
+#elif defined(__GNUC__) && (__GNUC__ >= 4)
#pragma GCC system_header
#endif
BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp<T*>::is_volatile);
#endif
};
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
//
// We can't filter out rvalue_references at the same level as
// references or we get ambiguities from msvc:
is_same<t_no_cv, unsigned long>,
long,
#if defined(BOOST_HAS_LONG_LONG)
+#ifdef BOOST_HAS_INT128
+ typename mpl::if_c<
+ sizeof(t_no_cv) == sizeof(boost::long_long_type),
+ boost::long_long_type,
+ boost::int128_type
+ >::type
+#else
boost::long_long_type
+#endif
#elif defined(BOOST_HAS_MS_INT64)
__int64
#else
sizeof(t_no_cv) == sizeof(unsigned long),
long,
#if defined(BOOST_HAS_LONG_LONG)
+#ifdef BOOST_HAS_INT128
+ typename mpl::if_c<
+ sizeof(t_no_cv) == sizeof(boost::long_long_type),
+ boost::long_long_type,
+ boost::int128_type
+ >::type
+#else
boost::long_long_type
+#endif
#elif defined(BOOST_HAS_MS_INT64)
__int64
#else
is_same<t_no_cv, long>,
unsigned long,
#if defined(BOOST_HAS_LONG_LONG)
+#ifdef BOOST_HAS_INT128
+ typename mpl::if_c<
+ sizeof(t_no_cv) == sizeof(boost::ulong_long_type),
+ boost::ulong_long_type,
+ boost::uint128_type
+ >::type
+#else
boost::ulong_long_type
+#endif
#elif defined(BOOST_HAS_MS_INT64)
unsigned __int64
#else
sizeof(t_no_cv) == sizeof(unsigned long),
unsigned long,
#if defined(BOOST_HAS_LONG_LONG)
+#ifdef BOOST_HAS_INT128
+ typename mpl::if_c<
+ sizeof(t_no_cv) == sizeof(boost::ulong_long_type),
+ boost::ulong_long_type,
+ boost::uint128_type
+ >::type
+#else
boost::ulong_long_type
+#endif
#elif defined(BOOST_HAS_MS_INT64)
unsigned __int64
#else
>::type type;
};
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
//
// We can't filter out rvalue_references at the same level as
// references or we get ambiguities from msvc:
typedef typename boost::detail::cv_traits_imp<T*>::unqualified_type type;
};
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
//
// We can't filter out rvalue_references at the same level as
// references or we get ambiguities from msvc:
{
typedef T type;
};
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <class T>
struct remove_rvalue_ref<T&&>
{
// We can't filter out rvalue_references at the same level as
// references or we get ambiguities from msvc:
//
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <typename T>
struct remove_volatile_impl<T&&>
{
#include <boost/utility/base_from_member.hpp>
#include <boost/utility/binary.hpp>
#include <boost/utility/enable_if.hpp>
+#include <boost/utility/identity_type.hpp>
#include <boost/checked_delete.hpp>
#include <boost/next_prior.hpp>
#include <boost/noncopyable.hpp>
//----------------------------------------------------------------------------//
#include <boost/type_traits/add_rvalue_reference.hpp>
+//#include <boost/type_traits/add_lvalue_reference.hpp>
//----------------------------------------------------------------------------//
// //
namespace boost {
+//#if !defined(BOOST_NO_RVALUE_REFERENCES)
template <typename T>
- typename add_rvalue_reference<T>::type declval(); //noexcept; // as unevaluated operand
-
+ typename add_rvalue_reference<T>::type declval() BOOST_NOEXCEPT; // as unevaluated operand
+//#else
+// template <typename T>
+// typename add_lvalue_reference<T>::type declval() BOOST_NOEXCEPT; // as unevaluated operand
+//#endif
} // namespace boost
#endif // BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP
--- /dev/null
+
+// Copyright (C) 2009-2012 Lorenzo Caminiti
+// Distributed under the Boost Software License, Version 1.0
+// (see accompanying file LICENSE_1_0.txt or a copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// Home at http://www.boost.org/libs/utility/identity_type
+
+/** @file
+Wrap type expressions with round parenthesis so they can be passed to macros
+even if they contain commas.
+*/
+
+#ifndef BOOST_IDENTITY_TYPE_HPP_
+#define BOOST_IDENTITY_TYPE_HPP_
+
+#include <boost/type_traits/function_traits.hpp>
+
+/**
+@brief This macro allows to wrap the specified type expression within extra
+round parenthesis so the type can be passed as a single macro parameter even if
+it contains commas (not already wrapped within round parenthesis).
+
+@Params
+@Param{parenthesized_type,
+The type expression to be passed as macro parameter wrapped by a single set
+of round parenthesis <c>(...)</c>.
+This type expression can contain an arbitrary number of commas.
+}
+@EndParams
+
+This macro works on any C++03 compiler (it does not use variadic macros).
+
+This macro must be prefixed by <c>typename</c> when used within templates.
+Note that the compiler will not be able to automatically determine function
+template parameters when they are wrapped with this macro (these parameters
+need to be explicitly specified when calling the function template).
+
+On some compilers (like GCC), using this macro on abstract types requires to
+add and remove a reference to the specified type.
+*/
+#define BOOST_IDENTITY_TYPE(parenthesized_type) \
+ /* must NOT prefix this with `::` to work with parenthesized syntax */ \
+ boost::function_traits< void parenthesized_type >::arg1_type
+
+#endif // #include guard
+
// BOOST_VERSION / 100 % 1000 is the minor version
// BOOST_VERSION / 100000 is the major version
-#define BOOST_VERSION 104900
+#define BOOST_VERSION 105300
//
// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
// 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_49"
+#define BOOST_LIB_VERSION "1_53"
#endif
-
-
-
#define BOOST_REGEX_SOURCE
+#include <boost/config.hpp>
#include <climits>
#include <stdexcept>
#include <string>
{
if(_fi_FindNextFile(dat, lpFindFileData))
return dat;
+ closedir(h);
}
delete dat;
return 0;
#define BOOST_REGEX_SOURCE
+#include <boost/config.hpp>
#include <cstdio>
#include <boost/regex.hpp>
#include <boost/cregex.hpp>
#define BOOST_REGEX_SOURCE
+#include <boost/config.hpp>
#include <new>
#include <boost/regex.hpp>
#include <boost/throw_exception.hpp>
#define BOOST_REGEX_SOURCE
+#include <boost/config.hpp>
#include <memory>
#include <cstring>
#include <boost/assert.hpp>
// allocate and copy data:
register pointer ptr = static_cast<pointer>(::operator new(newsize));
BOOST_REGEX_NOEH_ASSERT(ptr)
- std::memcpy(ptr, start, datasize);
+ if(start)
+ std::memcpy(ptr, start, datasize);
// get rid of old buffer:
::operator delete(start);
typedef slot_container_type::const_iterator const_group_iterator;
-#if BOOST_WORKAROUND(_MSC_VER, <= 1600)
+#if BOOST_WORKAROUND(_MSC_VER, <= 1700)
void named_slot_map_iterator::decrement() { assert(false); }
void named_slot_map_iterator::advance(difference_type) { assert(false); }
#endif
i->first.disconnect();
i = next;
}
- groups.erase(group);
+ groups.erase((const_group_iterator) group);
}
}
}
// Clear out empty groups
- if (empty(g)) groups.erase(g++);
+ if (empty(g)) groups.erase((const_group_iterator) g++);
else ++g;
}
}