public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Wolfgang Bangerth <bangerth@ices.utexas.edu> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: libstdc++/10505 Date: Tue, 29 Apr 2003 14:26:00 -0000 [thread overview] Message-ID: <20030429142600.8287.qmail@sources.redhat.com> (raw) 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/
next reply other threads:[~2003-04-29 14:26 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-04-29 14:26 Wolfgang Bangerth [this message] 2003-04-29 17:06 libstdc++/10505 Christian Ehrhardt
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20030429142600.8287.qmail@sources.redhat.com \ --to=bangerth@ices.utexas.edu \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).