This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32158] uninitialized_fill compile failure if no default assignment operator
- From: "mark at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 May 2007 21:38:11 -0000
- Subject: [Bug c++/32158] uninitialized_fill compile failure if no default assignment operator
- References: <bug-32158-11211@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from mark at codesourcery dot com 2007-05-30 21:38 -------
Subject: Re: uninitialized_fill compile failure if no default
assignment operator
pcarlini at suse dot de wrote:
> ------- Comment #3 from pcarlini at suse dot de 2007-05-30 21:25 -------
> Thanks Mark. In fact, we have already a test for that, in ext/is_pod.cc. But we
> have a problem with templates. This:
>
> template<typename T>
> struct A
> {
> A() { }
> };
>
> has __is_pod(A<int>) true. Actually, the problem affects also other front-end
> traits, probably most of them :( :( They are not working correctly with
> templates. First blush, any hint where I should fix my implementation?
Perhaps you need to call complete_type in the traits implementation to
ensure that A<int> is completed, if it can be. (Or, if __is_pod
requires, by the language standards, a complete type, you can use
complete_type_or_else.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32158