From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2004-12-11 18:07:28
Mikhail Glushenkov wrote:
> This is an enhanced version of Unai Uribarri's
> patch (see
> Adds support for the following syntax:
> boost::any a = 7;
> int& i = any_cast<int&>(a);
> Current syntax for reference extraction is
> int& i = *any_cast<int>(&a);
> Old syntax is preserved.
> On compilers without support for partial
> template specialization users are required to
> provide explicit specializations of
> boost::remove_reference for their classes
> (usually via
> if they want to use the new syntax.
> Patch was tested on msvc 6 and 7.1, intel 8.1
> and gcc 3.3.1.
> If this patch will be accepted, I'll write
> tests/update documentation.
I've updated your patch to properly support T volatile x; any a(x);
It has been tested under Gentoo Linux on g++ 3.3.4 (hardened) and Intel
8.0 with and without BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION.
-- Alexander Nasonov
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk