[Bug libstdc++/68515] std::result_of<F(X)> doesn't work when F is abstract (with pure virtual functions)

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 9 10:53:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68515

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, the function type is definitely invalid. And you're right that the
result_of usage is wrong: if you can't create an object of the abstract type
then you also can't invoke it, so the result_of should always use const F& or
F&& or some reference type.


More information about the Gcc-bugs mailing list