Opened 9 years ago

#8522 new Bugs

Using result_of on pure virtual functions lead to compile errors

Reported by: oswin.krause@… Owned by: Daniel Walker
Milestone: To Be Determined Component: result_of
Version: Boost 1.52.0 Severity: Problem
Keywords: Cc:

Description

minimal example:

struct Test{

typedef int result_type; virtual int operator()(int)=0;

}; typedef boost::result_of<Test(int)>::type type;

fails because Test is pure virtual and thus the function pointer is invalid.

from the mailing list:

"This is supposed to work:

typedef boost::result_of<Test&(int)>::type type;"

But apparently it does not:

/usr/include/boost/utility/result_of.hpp:166:8: Error: »Test&« is no class, structure or union type.

Change History (0)

Note: See TracTickets for help on using tickets.