|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-07-21 05:46:25
Oleg Abrosimov wrote:
> Hello!
>
> In order to obtain a polymorphic behavior with boost::variant and
> keep a reference semantic in corresponding visitor I've added the
> following constructor to boost::reference_wrapper class:
>
> template<typename T1>
> reference_wrapper(reference_wrapper<T1> const& rw):
> t_(rw.get_pointer()) {}
This makes sense, but...
> it can be tested with:
>
> int i = 1;
> boost::reference_wrapper<double> = boost::ref(i);
... this doesn't; why should a reference to int be convertible to a
reference to double?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk