Index: boost/circular_buffer/debug.hpp =================================================================== --- boost/circular_buffer/debug.hpp (revision 74788) +++ boost/circular_buffer/debug.hpp (working copy) @@ -130,7 +130,7 @@ void invalidate_iterators(const Iterator& it) { const debug_iterator_base* previous = 0; for (const debug_iterator_base* p = m_iterators; p != 0; p = p->next()) { - if (((Iterator*)p)->m_it == it.m_it) { + if ((static_cast(p))->m_it == it.m_it) { p->invalidate(); remove(p, previous); continue; @@ -144,7 +144,7 @@ void invalidate_iterators_except(const Iterator& it) { const debug_iterator_base* previous = 0; for (const debug_iterator_base* p = m_iterators; p != 0; p = p->next()) { - if (((Iterator*)p)->m_it != it.m_it) { + if ((static_cast(p))->m_it != it.m_it) { p->invalidate(); remove(p, previous); continue; Index: boost/function/function_template.hpp =================================================================== --- boost/function/function_template.hpp (revision 74788) +++ boost/function/function_template.hpp (working copy) @@ -625,7 +625,7 @@ assign_to(const reference_wrapper& f, function_buffer& functor, function_obj_ref_tag) const { - functor.obj_ref.obj_ptr = (void *)(f.get_pointer()); + functor.obj_ref.obj_ptr = static_cast(f.get_pointer()); functor.obj_ref.is_const_qualified = is_const::value; functor.obj_ref.is_volatile_qualified = is_volatile::value; return true; Index: boost/ptr_container/ptr_sequence_adapter.hpp =================================================================== --- boost/ptr_container/ptr_sequence_adapter.hpp (revision 74788) +++ boost/ptr_container/ptr_sequence_adapter.hpp (working copy) @@ -427,7 +427,7 @@ BOOST_DEDUCED_TYPENAME PtrSeqAdapter::iterator last, PtrSeqAdapter& from ) // strong { - BOOST_ASSERT( (void*)&from != (void*)this ); + BOOST_ASSERT( static_cast(&from) != static_cast(this) ); if( from.empty() ) return; this->base(). @@ -440,7 +440,7 @@ BOOST_DEDUCED_TYPENAME PtrSeqAdapter::iterator object, PtrSeqAdapter& from ) // strong { - BOOST_ASSERT( (void*)&from != (void*)this ); + BOOST_ASSERT( static_cast(&from) != static_cast(this) ); if( from.empty() ) return; this->base().insert( before.base(), *object.base() ); // strong @@ -462,7 +462,7 @@ template< class PtrSeqAdapter > void transfer( iterator before, PtrSeqAdapter& from ) // strong { - BOOST_ASSERT( (void*)&from != (void*)this ); + BOOST_ASSERT( static_cast(&from) != static_cast(this) ); if( from.empty() ) return; this->base(). Index: boost/unordered/detail/buckets.hpp =================================================================== --- boost/unordered/detail/buckets.hpp (revision 74788) +++ boost/unordered/detail/buckets.hpp (working copy) @@ -583,17 +583,17 @@ void construct(bool which, H const& hf, P const& eq) { - new((void*) &funcs_[which]) function_pair(hf, eq); + new(static_cast (&funcs_[which])) function_pair(hf, eq); } void construct(bool which, function_pair const& f) { - new((void*) &funcs_[which]) function_pair(f); + new(static_cast (&funcs_[which])) function_pair(f); } void destroy(bool which) { - boost::unordered::detail::destroy((function_pair*)(&funcs_[which])); + boost::unordered::detail::destroy(reinterpret_cast(&funcs_[which])); } public: Index: boost/unordered/detail/allocator_helpers.hpp =================================================================== --- boost/unordered/detail/allocator_helpers.hpp (revision 74788) +++ boost/unordered/detail/allocator_helpers.hpp (working copy) @@ -444,7 +444,7 @@ boost::unordered::detail::has_construct::value>::type construct(Alloc&, T* p, T const& x) { - new ((void*) p) T(x); + new (static_cast(p)) T(x); } template Index: boost/unordered/detail/emplace_args.hpp =================================================================== --- boost/unordered/detail/emplace_args.hpp (revision 74788) +++ boost/unordered/detail/emplace_args.hpp (working copy) @@ -178,7 +178,7 @@ template \ void construct_from_tuple(T* ptr, namespace_::tuple<>) \ { \ - new ((void*) ptr) T(); \ + new (static_cast (ptr)) T(); \ } \ \ BOOST_PP_REPEAT_FROM_TO(1, n, \ @@ -189,7 +189,7 @@ void construct_from_tuple(T* ptr, \ namespace_::tuple const& x) \ { \ - new ((void*) ptr) T( \ + new (static_cast (ptr)) T( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_GET_TUPLE_ARG, namespace_) \ ); \ } @@ -332,7 +332,7 @@ BOOST_PP_ENUM_PARAMS_Z(z, num_params, A) \ > const& args) \ { \ - new((void*) address) T( \ + new(static_cast (address)) T( \ BOOST_PP_ENUM_##z(num_params, BOOST_UNORDERED_CALL_FORWARD, \ args.a)); \ } @@ -408,7 +408,7 @@ template inline void construct_impl2(T* address, BOOST_FWD_REF(A0) a0) { - new((void*) address) T( + new(static_cast (address)) T( boost::forward(a0) ); } Index: boost/unordered/detail/table.hpp =================================================================== --- boost/unordered/detail/table.hpp (revision 74788) +++ boost/unordered/detail/table.hpp (working copy) @@ -285,11 +285,11 @@ } value_type& value() { - return *(ValueType*) this; + return *value_ptr(); } value_type* value_ptr() { - return (ValueType*) this; + return reinterpret_cast (this); } private: Index: boost/mpl/assert.hpp =================================================================== --- boost/mpl/assert.hpp (revision 74788) +++ boost/mpl/assert.hpp (working copy) @@ -219,7 +219,7 @@ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed( \ - boost::mpl::assert_arg( (void (*) pred)0, 1 ) \ + boost::mpl::assert_arg( static_cast(0), 1 ) \ ) \ ) \ ) \ @@ -243,7 +243,7 @@ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed( \ - boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \ + boost::mpl::assert_not_arg( static_cast(0), 1 ) \ ) \ ) \ ) \ @@ -262,13 +262,13 @@ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ boost::mpl::assertion_failed( \ - (boost::mpl::failed ************ ( boost::mpl::assert_relation< \ + static_cast::************)) 0 ) \ + >::************)> (0) ) \ ) \ ) \ /**/ Index: boost/functional/hash/detail/hash_float.hpp =================================================================== --- boost/functional/hash/detail/hash_float.hpp (revision 74788) +++ boost/functional/hash/detail/hash_float.hpp (working copy) @@ -66,9 +66,9 @@ case FP_ZERO: return 0; case FP_INFINITE: - return (std::size_t)(v > 0 ? -1 : -2); + return static_cast(v > 0 ? -1 : -2); case FP_NAN: - return (std::size_t)(-3); + return static_cast(-3); case FP_NORMAL: case FP_SUBNORMAL: return float_hash_impl(v); Index: boost/functional/hash/hash.hpp =================================================================== --- boost/functional/hash/hash.hpp (revision 74788) +++ boost/functional/hash/hash.hpp (working copy) @@ -113,9 +113,9 @@ // Hopefully, this loop can be unrolled. for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) { - seed ^= (std::size_t) (positive >> i) + (seed<<6) + (seed>>2); + seed ^= static_cast (positive >> i) + (seed<<6) + (seed>>2); } - seed ^= (std::size_t) val + (seed<<6) + (seed>>2); + seed ^= static_cast (val) + (seed<<6) + (seed>>2); return seed; } @@ -133,9 +133,9 @@ // Hopefully, this loop can be unrolled. for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) { - seed ^= (std::size_t) (val >> i) + (seed<<6) + (seed>>2); + seed ^= static_cast (val >> i) + (seed<<6) + (seed>>2); } - seed ^= (std::size_t) val + (seed<<6) + (seed>>2); + seed ^= static_cast (val) + (seed<<6) + (seed>>2); return seed; } Index: boost/concept/detail/general.hpp =================================================================== --- boost/concept/detail/general.hpp (revision 74788) +++ boost/concept/detail/general.hpp (working copy) @@ -27,7 +27,7 @@ template struct requirement { - static void failed() { ((Model*)0)->~Model(); } + static void failed() { (static_cast(0))->~Model(); } }; struct failed {}; @@ -35,7 +35,7 @@ template struct requirement { - static void failed() { ((Model*)0)->~Model(); } + static void failed() { (static_cast(0))->~Model(); } }; # ifdef BOOST_OLD_CONCEPT_SUPPORT @@ -43,7 +43,7 @@ template struct constraint { - static void failed() { ((Model*)0)->constraints(); } + static void failed() { (static_cast(0))->constraints(); } }; template Index: boost/concept/detail/has_constraints.hpp =================================================================== --- boost/concept/detail/has_constraints.hpp (revision 74788) +++ boost/concept/detail/has_constraints.hpp (working copy) @@ -41,7 +41,7 @@ { BOOST_STATIC_CONSTANT( bool - , value = sizeof( detail::has_constraints_((Model*)0) ) == sizeof(detail::yes) ); + , value = sizeof( detail::has_constraints_(static_cast(0)) ) == sizeof(detail::yes) ); typedef mpl::bool_ type; }; Index: boost/concept/usage.hpp =================================================================== --- boost/concept/usage.hpp (revision 74788) +++ boost/concept/usage.hpp (working copy) @@ -19,7 +19,7 @@ template struct usage_requirements { - ~usage_requirements() { ((Model*)0)->~Model(); } + ~usage_requirements() { (static_cast(0))->~Model(); } }; # if BOOST_WORKAROUND(__GNUC__, <= 3)