|
Boost : |
From: Jurko Gospodnetiæ (jurko.gospodnetic_at_[hidden])
Date: 2007-12-12 06:44:08
Hi.
I'm attaching two patches - one for the Boost test and one for the
Boost iterator library to make them compatible with HP-UX PA_RISC 11.11
system headers. These headers define global preprocessor macros R1, R2,
... so these patches rename similarly named identifiers in Boost code.
Patches have been prepared based on SVN revision 41987.
They are simple local variable and template parameter renames which
should not cause problems. New names are a bit more verbose to eliminate
possible conflicts with headers on other system.
Could someone please apply them?
And could they be applied to the 1.35 branch as well?
These patches will allow Boost ASIO to compile and pass all tests on
this platform.
Hope this helps.
Best regards,
Jurko Gospodnetiæ
--- C:\Documents and Settings\Jurko\Desktop\SVN_41987\boost\iterator\iterator_facade.hpp 2007-12-12 11:50:30.000000000 +-0100
+++ C:\Documents and Settings\Jurko\Desktop\Modified\boost\iterator\iterator_facade.hpp 2007-12-12 12:13:51.000000000 +-0100
@@ -428,34 +428,34 @@
};
} // namespace detail
// Macros which describe the declarations of binary operators
# ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
-# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \
- template < \
- class Derived1, class V1, class TC1, class R1, class D1 \
- , class Derived2, class V2, class TC2, class R2, class D2 \
- > \
- prefix typename mpl::apply2<result_type,Derived1,Derived2>::type \
- operator op( \
- iterator_facade<Derived1, V1, TC1, R1, D1> const& lhs \
- , iterator_facade<Derived2, V2, TC2, R2, D2> const& rhs)
+# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \
+ template < \
+ class Derived1, class V1, class TC1, class Reference1, class Difference1 \
+ , class Derived2, class V2, class TC2, class Reference2, class Difference2 \
+ > \
+ prefix typename mpl::apply2<result_type,Derived1,Derived2>::type \
+ operator op( \
+ iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs \
+ , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs)
# else
-# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \
- template < \
- class Derived1, class V1, class TC1, class R1, class D1 \
- , class Derived2, class V2, class TC2, class R2, class D2 \
- > \
- prefix typename boost::detail::enable_if_interoperable< \
- Derived1, Derived2 \
- , typename mpl::apply2<result_type,Derived1,Derived2>::type \
- >::type \
- operator op( \
- iterator_facade<Derived1, V1, TC1, R1, D1> const& lhs \
- , iterator_facade<Derived2, V2, TC2, R2, D2> const& rhs)
+# define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \
+ template < \
+ class Derived1, class V1, class TC1, class Reference1, class Difference1 \
+ , class Derived2, class V2, class TC2, class Reference2, class Difference2 \
+ > \
+ prefix typename boost::detail::enable_if_interoperable< \
+ Derived1, Derived2 \
+ , typename mpl::apply2<result_type,Derived1,Derived2>::type \
+ >::type \
+ operator op( \
+ iterator_facade<Derived1, V1, TC1, Reference1, Difference1> const& lhs \
+ , iterator_facade<Derived2, V2, TC2, Reference2, Difference2> const& rhs)
# endif
# define BOOST_ITERATOR_FACADE_PLUS_HEAD(prefix,args) \
template <class Derived, class V, class TC, class R, class D> \
prefix Derived operator+ args
--- C:\Documents and Settings\Jurko\Desktop\SVN_41987\boost\test\test_tools.hpp 2007-12-12 11:49:19.000000000 +-0100
+++ C:\Documents and Settings\Jurko\Desktop\Modified\boost\test\test_tools.hpp 2007-12-12 12:27:50.000000000 +-0100
@@ -643,24 +643,24 @@
//____________________________________________________________________________//
template <class Left, class Right>
inline predicate_result
bitwise_equal_impl( Left const& left, Right const& right )
{
- predicate_result res( true );
+ predicate_result res( true );
std::size_t left_bit_size = sizeof(Left)*CHAR_BIT;
std::size_t right_bit_size = sizeof(Right)*CHAR_BIT;
- static Left const L1( 1 );
- static Right const R1( 1 );
+ static Left const leftOne ( 1 );
+ static Right const rightOne( 1 );
std::size_t total_bits = left_bit_size < right_bit_size ? left_bit_size : right_bit_size;
for( std::size_t counter = 0; counter < total_bits; ++counter ) {
- if( ( left & ( L1 << counter ) ) != ( right & ( R1 << counter ) ) ) {
+ if( ( left & ( leftOne << counter ) ) != ( right & ( rightOne << counter ) ) ) {
res = false;
res.message() << "\nMismatch in a position " << counter;
}
}
if( left_bit_size != right_bit_size ) {
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk