src/cxx_supportlib/vendor-modified/boost/operators.hpp in passenger-5.0.24 vs src/cxx_supportlib/vendor-modified/boost/operators.hpp in passenger-5.0.25
- old
+ new
@@ -80,12 +80,14 @@
// you understand the whole library implementation.
#ifndef BOOST_OPERATORS_HPP
#define BOOST_OPERATORS_HPP
+#include <cstddef>
+#include <iterator>
+
#include <boost/config.hpp>
-#include <boost/iterator.hpp>
#include <boost/detail/workaround.hpp>
#if defined(__sgi) && !defined(__GNUC__)
# pragma set woff 1234
#endif
@@ -95,19 +97,12 @@
#endif // operator-> not begin a UDT
namespace boost {
namespace detail {
-template <typename T> class empty_base {
+template <typename T> class empty_base {};
-// Helmut Zeisel, empty base class optimization bug with GCC 3.0.0
-#if defined(__GNUC__) && __GNUC__==3 && __GNUC_MINOR__==0 && __GNU_PATCHLEVEL__==0
- bool dummy;
-#endif
-
-};
-
} // namespace detail
} // namespace boost
// In this section we supply the xxxx1 and xxxx2 forms of the operator
// templates, which are explicitly targeted at the 1-type-argument and
@@ -709,11 +704,10 @@
// Here's where we put it all together, defining the xxxx forms of the templates
// in namespace boost. We also define specializations of is_chained_base<> for
// the xxxx, xxxx1, and xxxx2 templates, importing them into boost:: as
// necessary.
//
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
// is_chained_base<> - a traits class used to distinguish whether an operator
// template argument is being used for base class chaining, or is specifying a
// 2nd argument type.
@@ -807,29 +801,11 @@
\
BOOST_OPERATOR_TEMPLATE2(template_name##2) \
BOOST_OPERATOR_TEMPLATE1(template_name##1)
-#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-# define BOOST_OPERATOR_TEMPLATE4(template_name4) \
- BOOST_IMPORT_TEMPLATE4(template_name4)
-# define BOOST_OPERATOR_TEMPLATE3(template_name3) \
- BOOST_IMPORT_TEMPLATE3(template_name3)
-# define BOOST_OPERATOR_TEMPLATE2(template_name2) \
- BOOST_IMPORT_TEMPLATE2(template_name2)
-# define BOOST_OPERATOR_TEMPLATE1(template_name1) \
- BOOST_IMPORT_TEMPLATE1(template_name1)
-
- // In this case we can only assume that template_name<> is equivalent to the
- // more commonly needed template_name1<> form.
-# define BOOST_OPERATOR_TEMPLATE(template_name) \
- template <class T, class B = ::boost::detail::empty_base<T> > \
- struct template_name : template_name##1<T, B> {};
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
namespace boost {
BOOST_OPERATOR_TEMPLATE(less_than_comparable)
BOOST_OPERATOR_TEMPLATE(equality_comparable)
BOOST_OPERATOR_TEMPLATE(multipliable)
@@ -895,18 +871,14 @@
: totally_ordered2<T,U
, integer_arithmetic2<T,U
, bitwise2<T,U
> > > {};
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <class T, class U = T>
struct operators : operators2<T, U> {};
template <class T> struct operators<T, T>
-#else
-template <class T> struct operators
-#endif
: totally_ordered<T
, integer_arithmetic<T
, bitwise<T
, unit_steppable<T
> > > > {};
@@ -919,17 +891,17 @@
class D = std::ptrdiff_t,
class P = V const *,
class R = V const &>
struct input_iterator_helper
: input_iteratable<T, P
- , boost::iterator<std::input_iterator_tag, V, D, P, R
+ , std::iterator<std::input_iterator_tag, V, D, P, R
> > {};
template<class T>
struct output_iterator_helper
: output_iteratable<T
- , boost::iterator<std::output_iterator_tag, void, void, void, void
+ , std::iterator<std::output_iterator_tag, void, void, void, void
> >
{
T& operator*() { return static_cast<T&>(*this); }
T& operator++() { return static_cast<T&>(*this); }
};
@@ -939,30 +911,30 @@
class D = std::ptrdiff_t,
class P = V*,
class R = V&>
struct forward_iterator_helper
: forward_iteratable<T, P
- , boost::iterator<std::forward_iterator_tag, V, D, P, R
+ , std::iterator<std::forward_iterator_tag, V, D, P, R
> > {};
template <class T,
class V,
class D = std::ptrdiff_t,
class P = V*,
class R = V&>
struct bidirectional_iterator_helper
: bidirectional_iteratable<T, P
- , boost::iterator<std::bidirectional_iterator_tag, V, D, P, R
+ , std::iterator<std::bidirectional_iterator_tag, V, D, P, R
> > {};
template <class T,
class V,
class D = std::ptrdiff_t,
class P = V*,
class R = V&>
struct random_access_iterator_helper
: random_access_iteratable<T, P, D, R
- , boost::iterator<std::random_access_iterator_tag, V, D, P, R
+ , std::iterator<std::random_access_iterator_tag, V, D, P, R
> >
{
friend D requires_difference_operator(const T& x, const T& y) {
return x - y;
}