I'm using std::any
with RTTI and exceptions disabled. It works and std::any_cast<T>()
is able to detect whether the type is correct as explained in std::any without RTTI, how does it work?. std::any::type()
is disabled without RTTI though.
I'd like to check whether my std::any
object contains a value of a given type. Is there any way to do that?