[Boost-bugs] [Boost C++ Libraries] #8522: Using result_of on pure virtual functions lead to compile errors

Subject: [Boost-bugs] [Boost C++ Libraries] #8522: Using result_of on pure virtual functions lead to compile errors
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-30 05:21:47


#8522: Using result_of on pure virtual functions lead to compile errors
---------------------------------+------------------------------------------
 Reporter: oswin.krause@… | Owner: djwalker
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: result_of
  Version: Boost 1.52.0 | Severity: Problem
 Keywords: |
---------------------------------+------------------------------------------
 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.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8522>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC