any_cast, as is implemented in boost 1.29, has one weakness; it doesn't
allow to compile this piece of code:
any x=int(5);
++any_cast(x);
because any_cast tries to instanciate a pointer to int&. The attached
patch solved this problem using boost::remove_reference from
boost/type_traits.hpp
I've modified any_cast to work properly with references.
In the boos 1.29 implementation, a code like this:
{
any x=5;
++any_cast(x);
}
doesn't compile because any_cast tries to instantiate a pointer to int
&. With the attached patch (which uses ::boost::remove_reference in
boost/type_trai