|
Boost : |
From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2007-08-22 11:51:33
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;
-- Alexander
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk