问题
On the Boost web site I found no information regarding the use or RTTI by boost::any.
I read in a few places that this is a requirement, but then I built a simple test project, and it builds both with and without RTTI.
So, is RTTI, with its performance and memory issues, needed by boost::any and similar classes?
回答1:
Since boost 1.57 RTTI is not needed for boost::any
. Rememeber that all objects used as boost::any
must by copyable.
https://svn.boost.org/trac/boost/ticket/10346
来源:https://stackoverflow.com/questions/38324511/does-boostany-need-rtti