boost::result_of and pure virtual functor leads to compile error
Hi list, I am necountering an error when trying to use boost::result_of on a pure virtual base class. minimal example: struct Test{ typedef int result_type; virtual int operator()(int)=0; }; typedef boost::result_of<Test(int)>::type type; leads with gcc 4.8 (and with every compiler i know of) to the following output: Error: »type name« declared as function returning an abstract class type typedef boost::result_of<Test(int)>::type type; (actually in the original code where this showed up, gcc compiles it just fine only every other compiler fails, but in this very simple example, even gcc get's the message...) Any chance to use result_of in this setting? I clearly can't use the function call syntax here, which is a little bit annoying. Greetings, Oswin
On 4/29/2013 12:08 PM, oswin krause wrote:
Hi list,
I am necountering an error when trying to use boost::result_of on a pure virtual base class.
minimal example:
struct Test{ typedef int result_type; virtual int operator()(int)=0; }; typedef boost::result_of<Test(int)>::type type;
This is supposed to work: typedef boost::result_of<Test&(int)>::type type; ...but I see it doesn't. Can you file a bug? Thanks, -- Eric Niebler Boost.org http://www.boost.org
Done. any intermediate workarounds? On 30.04.2013 01:53, Eric Niebler wrote:
On 4/29/2013 12:08 PM, oswin krause wrote:
Hi list,
I am necountering an error when trying to use boost::result_of on a pure virtual base class.
minimal example:
struct Test{ typedef int result_type; virtual int operator()(int)=0; }; typedef boost::result_of<Test(int)>::type type; This is supposed to work:
typedef boost::result_of<Test&(int)>::type type;
...but I see it doesn't. Can you file a bug?
Thanks,
participants (2)
-
Eric Niebler
-
oswin krause