
7 Sep
2012
7 Sep
'12
2:46 a.m.
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