Boost logo

Boost :

From: Zach Laine (whatwasthataddress_at_[hidden])
Date: 2007-08-22 11:57:52


On 8/22/07, Alexander Nasonov <alnsn_at_[hidden]> wrote:
> Zach Laine <whatwasthataddress <at> gmail.com> writes:
>
> > int *result_tag;
> > typedef BOOST_TYPEOF(*result_tag) result_type;
>
> This won't work for reference types and void.
>
> int& *result_tag;
> ^^^ error: pointer to reference
>
> void *result_tag;
> typedef BOOST_TYPEOF(*result_tag) result_type;
> ^ error: dereference of void
>
> Function type if better:
>
> int& (*result_tag)() = 0;
> typedef result_of<BOOST_TYPEOF(result_tag)>::result_type result_type;

Good point. That's what I meant, of course. ;)

Zach Laine


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk