|
Boost Users : |
Subject: [Boost-users] [serialization] Warning "type qualifier is meaningless on cast type" in extended_type_info_typeid.hpp
From: Patrik Jonsson (patrik-web_at_[hidden])
Date: 2011-12-02 17:28:26
Hi,
When I compile code that uses the 1.48.0 serialization library with
icpc 12.3.174, I get this warning, along with screenfuls of
instantiation context:
/n/home00/pjonsson/include/boost/serialization/extended_type_info_typeid.hpp(134):
warning #191: type qualifier is meaningless on cast type
static_cast<T const * const>(p)
^
This is the offending code:
virtual void destroy(void const * const p) const {
boost::serialization::access::destroy(
static_cast<T const * const>(p)
);
The compiler is complaining (correctly, I think) that you can't
dictate whether something returned by value (here, the T const *) is
const or not. Changing the cast to:
static_cast<T const *>(p)
makes the warning go away. Perhaps someone can make this change?
Regards,
/Patrik J.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net