
Jeffrey Lee Hellrung, Jr. wrote:
On Sun, Apr 21, 2013 at 7:48 AM, Daniel Walker
wrote: This is due to a dark corner of TR1: the result and result_type members are consulted in non-nullary functors but nullary functors always generate void. (See the section on known difference between boost::result_of and TR1 in the documentation.)
The rationale for this always confused me, with the end result (it seems) that it makes TR1 result_of basically unusable for nullary function calls.
result_type is consulted. result<> is not. type is void (instead of a
compile error) when there is no result_type.
The reason for the type being void is that in
template<class T> class reference_wrapper
{
private:
T & t_;
public:
typename result_of