public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/8222: call of member template inside template function
@ 2002-10-14  2:06 setzersn
  0 siblings, 0 replies; only message in thread
From: setzersn @ 2002-10-14  2:06 UTC (permalink / raw)
  To: gcc-gnats


>Number:         8222
>Category:       c++
>Synopsis:       call of member template inside template function
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 14 02:06:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     setzersn@gmx.de
>Release:        gcc version 3.2
>Organization:
>Environment:
sun-solaris2.5.1 (It happend on other systems, too)
>Description:
g++ prints an errormessage:
> g++ -Wall   -c -o template_derivation_1.o template_derivation_1.cpp
template_derivation_1.cpp: In function `void h(const C*)':
template_derivation_1.cpp:50: parse error before `>' token
>How-To-Repeat:
Just compile it
>Fix:
Use a dummy-parameter of type T* in the get-method and
call get( (X*)0 ) in order to select get<X>.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="gccmail.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="gccmail.cpp"

dGVtcGxhdGU8Y2xhc3MgVD4KY2xhc3MgU3ViOwoKY2xhc3MgQ3sKcHVibGljOgogIHZpcnR1YWwg
fkMoKXt9CgogICAvLyBKdXN0IGZvciBmdW4uIChJbiBkZWJ1Z2dpbmcgb3V0cHV0IEkgdXNlZCB0
aGlzIHRvIHNlZSB3aGljaCAiVCIgSSBoYWQpCiAgdmlydHVhbCBpbnQgc2l6ZU9mVCgpIGNvbnN0
ID0wOwogIAoKICB0ZW1wbGF0ZTxjbGFzcyBUPgogIGNvbnN0IFN1YjxUPiogZ2V0KCkgY29uc3R7
CiAgICByZXR1cm4gZHluYW1pY19jYXN0PGNvbnN0IFN1YjxUPio+KHRoaXMpOwogIH0KfTsKCnRl
bXBsYXRlPGNsYXNzIFQ+CmNsYXNzIFN1YjogcHVibGljIEN7CnB1YmxpYzoKICB2aXJ0dWFsIGlu
dCBzaXplT2ZUKCkgY29uc3QKICB7CiAgICByZXR1cm4gc2l6ZW9mKFQpOwogIH0KfTsKCnZvaWQg
Zyhjb25zdCBDKiBwKQp7CiAgICBwLT5nZXQ8aW50PigpOyAvLyBIZXJlLCBnKysgYWNjZXB0cyBp
dAp9CnRlbXBsYXRlPGNsYXNzIFQ+CnZvaWQgaChjb25zdCBDKiBwKQp7CiAgcC0+Z2V0PGludD4o
KTsgLy8gSGVyZSwgaXQgZG9lc24ndC4KfQoKdGVtcGxhdGU8Y2xhc3MgVD4Kdm9pZCB1c2UoVCl7
fSAvLyBKdXN0IHRvIGdldCByaWQgb2Ygd2FybmluZ3MgYWJvdXQgdW51c2VkIHZhcmlhYmxlcwoK
aW50IG1haW4oKQp7CiAgU3ViPGludD4gaTsKICBTdWI8ZG91YmxlPiBkOwogIGNvbnN0IFN1Yjxp
bnQ+KiBwaT1pLmdldDxpbnQ+KCk7CiAgY29uc3QgU3ViPGRvdWJsZT4qIHBkPWkuZ2V0PGRvdWJs
ZT4oKTsKICBDKiBjPSZpOwogIGg8aW50PihjKTsKCiAgdXNlKHBpKTsgdXNlKHBkKTsKfQo=


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-14  9:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-14  2:06 c++/8222: call of member template inside template function setzersn

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