http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60594
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- > It looks like, somehow, instantiating the declaration of the std::function > copy constructor relies on the completeness of 'bar'. I suspect it's not the copy constructor, but that checking for copy constructibility performs overload resolution, which instantiates the SFINAE constraint on the function(F&&) constructor, which probably relies on completeness of the result_type