public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: gisli@adams.com
To: gcc-gnats@gcc.gnu.org
Subject: c++/4166: recursive member template call fails to compile
Date: Wed, 29 Aug 2001 03:56:00 -0000 [thread overview]
Message-ID: <20010829104607.24531.qmail@sourceware.cygnus.com> (raw)
>Number: 4166
>Category: c++
>Synopsis: recursive member template call fails to compile
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Wed Aug 29 03:56:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Gisli Ottarsson
>Release: unknown-1.0
>Organization:
>Environment:
~ > gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)
>Description:
First, my apologies if this report pertains to the known limitation
"Two stage lookup in templates is not implemented". I am not smart
enough to know whether this is a two stage template lookup problem.
Perhaps your website should give an example of such a problem.
When I compile the attached, self contained program, which features
a member template for which an instantiation will call itself recursively,
compilation fails with the following error message:
gisli.cxx: In method `T *A::exhaustive_search (int) const [with T =
B]':
gisli.cxx:72: instantiated from here
gisli.cxx:56: no matching function for call to `A::exhaustive_search
(int &)'
For what it is worth, the program compiles and runs with recent SGI,
IBM and HP C++ compilers.
>How-To-Repeat:
g++ gisli.cxx
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="gisli.cxx"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="gisli.cxx"
I2luY2x1ZGUgPGlvc3RyZWFtPiAKI2luY2x1ZGUgPGxpc3Q+IAogCi8vIAovLyAgU2ltcGxlIGJh
c2UgZm9yIGEgdHJlZSBub2RlIHdpdGggYW4gaW50ZWdlciBpZCAKLy8gCmNsYXNzIEEgCnsgCiAg
IGludCBfaWQ7IAogICBBKiBfcGFyZW50OyAKICAgc3RkOjpsaXN0PEEqPiBraWRzOyAKIApw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qPigoKmkpKTsgCiAgICAgIGlmKG9iaiAmJiBvYmotPmlkKCk9PXNvdWdodF9pZCkgcmV0dXJu
IG9iajsgCiAgIH0gCiAgIGZvcihpPWtpZHMuYmVnaW4oKTsgaSE9a2lkcy5lbmQoKTsgKytpKSAK
ICAgeyAKICAgICAgVCogb2JqID0gKCppKS0+ZXhoYXVzdGl2ZV9zZWFyY2g8VD4oc291Z2h0X2lk
KTsgCiAgICAgIGlmKG9iaikgcmV0dXJuIG9iajsgCiAgIH0gCiAgIHJldHVybiAwOyAKfSAKIApp
bnQgbWFpbigpIAp7IAogICBBIHJvb3QoMCwwKTsgCiAKICAgQiBiMSgmcm9vdCwxKTsgCiAgIEIg
YjIoJmIxLDIpOyAKIAogICBDIGMxKCZyb290LDEpOyAKICAgQyBjMigmYjIsMik7IAogCiAgIEIq
IG9iaiA9IHJvb3QuZXhoYXVzdGl2ZV9zZWFyY2g8Qj4oMik7ICAgLy8gc2hvdWxkIGZpbmQgYjI7
CiAKICAgc3RkOjpjb3V0IDw8IG9iai0+aWQoKSA8PCBzdGQ6OmVuZGw7IAp9IAogCgoKCg==
next reply other threads:[~2001-08-29 3:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-29 3:56 gisli [this message]
2001-08-31 11:11 lerdsuwa
2002-10-26 2:29 lerdsuwa
2002-10-31 7:20 lerdsuwa
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=20010829104607.24531.qmail@sourceware.cygnus.com \
--to=gisli@adams.com \
--cc=gcc-gnats@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: link
Be 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).