Boost logo

Boost :

From: Matthew King (mattl_at_[hidden])
Date: 2002-05-21 13:21:02


I'm trying to use boost::any on RH 7.1 with gcc 2.96... the following
code:

   boost::any as = std::string("foobar");
   boost::any_cast<char*>(as);

results in a segmentation fault when any_cast throws the
bad_any_cast()...

changing "char*" to "const char *" results in the exception being thrown
correctly.

changing bad_any_cast to not subclass std::bad_cast makes the "char*"
version work correctly (throw's bad cast, doesn't seg fault)

anyone seen this before? any ideas?

thanks in advance.

- matt


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk