|
Boost : |
Subject: [boost] [PATCH] [exception] Replace C cast with reinterpret_cast for Metrowerks C++
From: Joshua Juran (jjuran_at_[hidden])
Date: 2011-03-05 04:48:36
Metrowerks C++ 2.4.1 thinks the type of (T*)0 is T, rather than T*.
But reinterpret_cast works fine.
--- This patch doesn't affect the compilation of g++ 4.0.1. diff --git boost/exception/exception.hpp boost/exception/exception.hpp index fd516dd..87063af 100644 --- boost/exception/exception.hpp +++ boost/exception/exception.hpp @@ -334,7 +334,7 @@ boost struct enable_error_info_return_type { - typedef typename enable_error_info_helper <T,sizeof(exception_detail::dispatch_boost_exception((T*)0))>::type type; + typedef typename enable_error_info_helper < T ,sizeof (exception_detail ::dispatch_boost_exception(reinterpret_cast<T*>(0)))>::type type; }; }
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk