|
Boost : |
From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2007-08-22 13:24:39
Alexander Nasonov <alnsn <at> yandex.ru> writes:
> Function type if better:
>
> int& (*result_tag)() = 0;
> typedef result_of<BOOST_TYPEOF(result_tag)>::result_type result_type;
Actually, this contruct has a limitation too. In some cases, typename
is required:
template<class T>
void foo()
{
T& (*function_tag)() = 0;
typedef typename remove_reference<BOOST_TYPEOF(function_tag)>::type sig;
}
-- Alexander
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk