
On Monday 13 February 2006 20:08, Delfin Rojas wrote:
According to the documentation of boost::any_cast<T>, "if T is a reference to (possibly const qualified) ValueType, it [boost::any_cast] returns a reference to the held value."
Right. But this is still inconsistent both with variant's get<> and e.g.
static_cast<>. The static_cast<> behaviour can't be done in current C++
(since you can't partially specialise function templates), so maybe variant's
get<> should be changed?
Hmm, maybe I lied when I said static_cast<> syntax is not possible... Lemme
try. This should give static_cast<> semantics for any_cast (ie. <T> cast by
value,