[Bug libstdc++/60594] std::function of a type with a declared (but not defined) return type fails to compile

chandlerc at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Mar 19 20:52:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60594

--- Comment #3 from Chandler Carruth <chandlerc at gmail dot com> ---
Personally, I've no idea what the standard says.

However, it seems extremely useful to be able to freely use std::function with
return types (and argument types) within the definition those types which is
how this actually started. It also seems reasonable to need to observe whether
the std::function will be copyable (it will) prior to completing it.

Without this, somewhat basic uses if std::function as a member with a
type-erased bit of logic pertaining to the enclosing class with value semantic
interfaces don't work.



More information about the Gcc-bugs mailing list