This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/41216] G++ failed to correctly resolve the template parameters.
- From: "paolo dot carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Sep 2009 20:06:35 -0000
- Subject: [Bug c++/41216] G++ failed to correctly resolve the template parameters.
- References: <bug-41216-18138@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from paolo dot carlini at oracle dot com 2009-09-01 20:06 -------
As a matter of fact, this snippet doesn't link:
struct Inner
{
Inner()
: data(0) {}
template<class IStream>
explicit Inner(IStream&);
int data;
};
int f()
{
Inner inner1;
Inner inner2(inner1);
}
Now, as a matter of fact, the fact that the above code doesn't link means that
Inner isn't CopyConstructible (First line of Table 30 in C++03), thus, it is
invalid to instantiate std::vector with it, as you are doing in Outter. I'm
adding Jason in CC just in case he has something to say about the C++ proper
issue.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu dot org
Status|UNCONFIRMED |RESOLVED
Component|libstdc++ |c++
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41216