|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-07-20 12:55:36
From: "Greg Colvin" <gcolvin_at_[hidden]>
> From: Peter Dimov <pdimov_at_[hidden]>
> > How would you specify the pointer validity?
>
> End of full expression?
I often use the idiom (rephrased in 'any' terms)
if(int * p = any_cast<int>(&a))
{
// do something with *p
}
else if(double * p = any_cast<double>(&a))
{
// ditto
}
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk