public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/10505
@ 2003-04-29 14:26 Wolfgang Bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Bangerth @ 2003-04-29 14:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR libstdc++/10505; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@ices.utexas.edu>
To: Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libstdc++/10505
Date: Tue, 29 Apr 2003 09:25:19 -0500 (CDT)

 [I guess we should continue in English and add this to the audit trail.]
 
 > Hm, ja. Scheint so. Allerdings lassen sich IMHO die praeprozessierten
 > Sourcen auf folgendes Problem reduzieren, was IMHO legalerweise abgelehnt
 > wird:
 > 
 > template <class A>
 > class Bar {
 > 	A barelem;
 > };
 > 
 > class Foo {
 > 	Bar<Foo> fooelem;
 > };
 
 Correct, this code is illegal.
 
 
 > Bleibt die Frage, ob das urspruengliche Konstrukt irgendwie legal ist:
 > 
 > class   Foo
 > {
 > public:
 > 	int             x;
 > 	std::list<Foo>  children;
 > };
 
 I think this should be legal code. It would only be illegal if 
 std::list<T> would have member variable of type _T_, rather than _T*_. I 
 am not aware of any wording in the standard, but I would guess that the 
 intent certainly is _not_ to have such members, but store the data in a 
 linked list and have pointers to it.
 
 
 > Auch hier wird std::list<> mit Foo instanziiert. Bei der normalen
 > Implementierung wird dabei offenbar nur ein Zeiger auf Foo irgendwo
 > angelegt, mit --enable-concept-checks dagegen ein echtes Element
 > vom Typ Foo, was nicht gehen kann. Wenn std::list in der Beziehung
 > irgendwelche Zugestaendnisse macht, dann koennte es sein, dass der
 > concept checks code buggy ist, ansonsten wuerde ich das bei naeherer
 > Betrachtung als user error ablehnen. Was meinst Du?
 
 Given the above, I would claim that the concepts check is in error. It 
 checks a requirement at the time of instantiation of the class that is 
 only needed at the time where actual member functions are instantiated. I 
 see no reason why the given code should be illegal.
 
 W.
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth              email:            bangerth@ices.utexas.edu
                                www: http://www.ices.utexas.edu/~bangerth/
 
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libstdc++/10505
@ 2003-04-29 17:06 Christian Ehrhardt
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Ehrhardt @ 2003-04-29 17:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR libstdc++/10505; it has been noted by GNATS.

From: "Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de>
To: Wolfgang Bangerth <bangerth@ices.utexas.edu>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libstdc++/10505
Date: Tue, 29 Apr 2003 18:57:18 +0200

 On Tue, Apr 29, 2003 at 09:25:19AM -0500, Wolfgang Bangerth wrote:
 > 
 > [I guess we should continue in English and add this to the audit trail.]
 
 Yes we should. Here's an english summery of a private (german) diskussion
 with Wolfgang (partly reproduced by Wolfgang above):
 
 * The bug apparently needs --enable-concept-checks at compile time of
   gcc to trigger. [ Could the submitter please confirm this? g++ -v will
   hopefully tell the configuration options. ]
 * The basic question is: Is std::list<Foo> allowed to contain
   a field of type ``Foo'' (as opposed to ``Foo *'')? Basically this is
   what happens with the current list implementation if --enable-concept-checks
   is used. The program breaks because it tries to instantiate std::list
   with an incomplete type.
 * If the answer to the above is yes, the Bug is a user error. Otherwise
   it is probably a problem in the concept checks code.
 
 Note: The standard explicitly permits incomplete types as template arguments
 in an instantiation.
 
    regards    Christian
 
 -- 
 THAT'S ALL FOLKS!


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-29 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-29 14:26 libstdc++/10505 Wolfgang Bangerth
2003-04-29 17:06 libstdc++/10505 Christian Ehrhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).