This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58569] Compilation error when a class contains multiple std::function
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 01 Oct 2013 07:11:40 +0000
- Subject: [Bug c++/58569] Compilation error when a class contains multiple std::function
- Auto-submitted: auto-generated
- References: <bug-58569-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58569
--- Comment #3 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> ---
(In reply to Paolo Carlini from comment #1)
[Somehow bugzilla lost my response]
Yes, foo is incomplete within a data member declaration of type foo and this
breaks std::is_convertible, because the arguments are not complete types. On
the other hand the user seems not to violate 17.6.4.8 [res.on.functions],
because foo() and foo(int) are both complete types. I don't see a good reasons
why std::function<foo(...)> should check std::is_convertible<foo, foo> when
instantiating the class template.