Boost logo

Boost :

Subject: Re: [boost] [result_of] now uses decltype on release branch
From: Daniel Walker (daniel.j.walker_at_[hidden])
Date: 2012-09-06 22:46:33


On Sep 6, 2012, at 10:41 PM, Michel Morin wrote:

> Daniel Walker wrote:
>> Well, I'm not sure what you have in mind, but I went ahead and
>> fleshed out my approach from the other night.
>> I opened a ticket (#7343) and attached a patch.
>
> Great work, Daniel!
>
> One comment about a patch:
> I personally used
>
> typename boost::remove_reference<decltype(/* INVOKE */)>::type* = 0
>
> rather than
>
> boost::mpl::int_<sizeof(/* INVOKE */)>::type* = 0
>
> for `is_callable` metafunction.
>
> When the return type of INVOKE is an incomplete type,
> your `test` returns `fail` regardless of the callability.
> (The `pass` version of `test` is SFINAE'ed out,
> since sizeof needs a complete type.)

Excellent catch Michel. :-) Good eyes as always!

- Daniel


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