[Bug libstdc++/60594] std::function of a type with a declared (but not defined) return type fails to compile
kariya_mitsuru at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Apr 8 04:16:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60594
Mitsuru Kariya <kariya_mitsuru at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kariya_mitsuru at hotmail dot com
--- Comment #5 from Mitsuru Kariya <kariya_mitsuru at hotmail dot com> ---
FYI, the BUG2 above is compiled successfully by gcc 4.7.3.
cf. http://melpon.org/wandbox/permlink/UZdP4fovs2ATM2iZ
Additionally, the sample code below cannot be compiled by gcc HEAD.
#include <functional>
struct S {
std::function<S()> f;
};
int main()
{
S l{ []{ return S{nullptr}; } };
}
cf. http://melpon.org/wandbox/permlink/HAZ7i5JE94KSQhM7
It is also compiled successfully by gcc 4.7.3.
And I think that struct S is not incomplete type (at least, at the point where
it is used).
More information about the Gcc-bugs
mailing list