[PATCH v2] [exception] Replace C cast with static_cast for Metrowerks C++

Metrowerks C++ 2.4.1 thinks the type of (T*)0 is T, rather than T*. But static_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 adaac68..afb2008 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(static_cast<T*>(0)))>::type type; }; }
participants (1)
-
Joshua Juran