public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/2752: template function is not instantiated
@ 2001-05-07  1:56 Phil Edwards
  0 siblings, 0 replies; 2+ messages in thread
From: Phil Edwards @ 2001-05-07  1:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Phil Edwards <pedwards@disaster.jaj.com>
To: peters@igpm.rwth-aachen.de
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/2752: template function is not instantiated
Date: Mon, 7 May 2001 03:28:38 -0400

 On Mon, May 07, 2001 at 08:16:01AM -0000, Peters wrote:
 >  It comes down to the question, whether the compiler should be able to
 >  deduce the template-argument SIZE of the_bug from a function-argument,
 >  in which SIZE is a template-argument of an *enclosing* class.
 >  (Note, that if one explicitly calls the_bug<10>, as in line X, the code
 >  compiles fine. )
 >  
 >  After browsing through Section 18.4.2 of the C++-Standard, I believe
 >  that compilers do not need to be able to perform this deduction, so the
 >  described problem is probably not a bug in gcc.
 
 What a relief; I had just spent twenty minutes deciphering 14.8.2 and came
 to the same conclusion.  :-)  Specifically, [14.8.2.4]/14 seems to address
 this situation.  The template argument ("<10>" here) must be explicitly
 specified, or deduced elsewhere, and I don't think it can be deduced in
 this context.
 
 Does this help, florin?
 
 
 Phil
 
 -- 
 pedwards at disaster dot jaj dot com  |  pme at sources dot redhat dot com
 devphil at several other less interesting addresses in various dot domains
 The gods do not protect fools.  Fools are protected by more capable fools.


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

* c++/2752: template function is not instantiated
@ 2001-05-06 17:16 florin
  0 siblings, 0 replies; 2+ messages in thread
From: florin @ 2001-05-06 17:16 UTC (permalink / raw)
  To: gcc-gnats; +Cc: florin

>Number:         2752
>Category:       c++
>Synopsis:       template function is not instantiated
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Sun May 06 17:16:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     florin@iucha.net
>Release:        gcc version 3.0 20010503 (prerelease) - snapshot from CodeSourcery
>Organization:
>Environment:
Reading specs from /usr/local/bin/../lib/gcc-lib/i386-pc-linux-gnu/3.0/specs
Configured with: ../configure --prefix=/tmp/gcc-20010503-root/usr/local --enable-shared --enable-threads --disable-checking i386-pc-linux-gnu
Thread model: posix
>Description:
g++ rejects the following legal code
>How-To-Repeat:
compile the file
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/cpp; name="templbug.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="templbug.cpp"

dGVtcGxhdGUgPGludCBTSVpFPgpjbGFzcyBCCnsKcHVibGljOgoKICAgY2xhc3MgUAogICB7CiAg
IHB1YmxpYzoKICAgICAgUChpbnQgeCkgOiB4Xyh4KSB7fQogICAgICBpbnQgeCgpIGNvbnN0IHsg
cmV0dXJuIHhfOyB9CiAgICAgIAogICBwcml2YXRlOgogICAgICBpbnQgeF87CiAgIH07CgogICBQ
IGdldF9hX1AoKSB7IHJldHVybiBQKFNJWkUvMik7IH0KICAgCn07CgoKY2xhc3MgRyA6IHByaXZh
dGUgQjwxMD4KewpwdWJsaWM6CgogICB2b2lkIHRlc3QoKTsKICAgCn07CgoKdGVtcGxhdGUgPGlu
dCBTSVpFPgpCPFNJWkU+OjpQIHRoZV9idWcoQjxTSVpFPjo6UCBwKQp7CiAgIC8vIGRvIG5vdGhp
bmcKICAgcmV0dXJuIHA7Cn0KCgp2b2lkIEc6OnRlc3QoKQp7CiAgIFAgcCA9IGdldF9hX1AoKTsK
CiAgIFAgcSA9IHRoZV9idWcocCk7Cn0KCgppbnQgbWFpbigpCnsKICAgRyBnOwoKICAgZy50ZXN0
KCk7CiAgIAogICByZXR1cm4gMDsKfQo=


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

end of thread, other threads:[~2001-05-07  1:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-07  1:56 c++/2752: template function is not instantiated Phil Edwards
  -- strict thread matches above, loose matches on Subject: below --
2001-05-06 17:16 florin

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).