Boost logo

Boost :

From: Markus Schoepflin (markus.schoepflin_at_[hidden])
Date: 2001-11-23 09:23:18


Hi all,

I just stumbled across two issues involving any.

First I think the templated any constructor should be declared
explicit, because currently this allows the following to be compiled:

struct something
{
  any value_;
};
something value;
const int dummy_i = boost::any_cast<DWORD>(value);

The intention was to write "boost::any_cast<DWORD>(value.value_)", of
course.

Secondly, the docs for any mention any_ptr in the example section. I
guess the examples should be rewritten to use any_cast.

Markus


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