|
Boost : |
From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2003-02-19 12:33:32
"David Abrahams" <dave_at_[hidden]> wrote in message
news:un0ks9qn8.fsf_at_boost-consulting.com...
> "Fernando Cacciola" <fernando_cacciola_at_[hidden]> writes:
>
> >> Suppose you have a
> >>
> >> variant<mpl::list<int&, std::string&> >
> >>
> > AFAICT references are not supported by variant either.
> > But if it were..
> >
> >> How do you check to see if it contains an int&?
> >
> > But extracting (or accessing, or peeking) (int&)*.
>
> Pointers to references are illegal.
>
Hugh, emm, of course..
Silly me..
I tried this with bcc5.5.1 before posing that:
int main()
{
typedef int& r ;
r* x =0 ;
}
which compiled OK (!?)
but I should *think* instead of blindly-trust my compiler!
-- Fernando Cacciola
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk