public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/4137: conversion operator within template
@ 2003-01-02 21:33 paolo
  0 siblings, 0 replies; 3+ messages in thread
From: paolo @ 2003-01-02 21:33 UTC (permalink / raw)
  To: benko, gcc-bugs, gcc-prs, nobody

Synopsis: conversion operator within template

State-Changed-From-To: analyzed->closed
State-Changed-By: paolo
State-Changed-When: Thu Jan  2 13:33:45 2003
State-Changed-Why:
    Already fixed for 3.3 and 3.4.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4137


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

* Re: c++/4137: conversion operator within template
@ 2002-02-26 14:19 nathan
  0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2002-02-26 14:19 UTC (permalink / raw)
  To: benko, gcc-bugs, gcc-prs, nobody

Synopsis: conversion operator within template

State-Changed-From-To: open->analyzed
State-Changed-By: nathan
State-Changed-When: Tue Feb 26 14:16:48 2002
State-Changed-Why:
    confirmed

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4137


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

* c++/4137: conversion operator within template
@ 2001-08-27  7:06 benko
  0 siblings, 0 replies; 3+ messages in thread
From: benko @ 2001-08-27  7:06 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4137
>Category:       c++
>Synopsis:       conversion operator within template
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 27 07:06:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Benko Pal
>Release:        3.0.1
>Organization:
>Environment:
SuSE 7.1
>Description:
I do not know whether this is a bug in the compiler or
illegal code.
The following program does not compile:



template <typename c>
struct a
{
  typedef int b;
  
  operator b();
};

template <typename c>
a<c>::operator typename a<c>::b() // omitting `typename'
                                  // makes no difference
{
  return 0;
}



Workaround:



template <typename c>
struct a
{
  typedef int b;
  
  operator b() {return 0;}
};



Without templates there is no problem:


struct a
{
  typedef int b;
  
  operator b();
};

a::operator a::b()
{
  return 0;
}
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2003-01-02 21:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-02 21:33 c++/4137: conversion operator within template paolo
  -- strict thread matches above, loose matches on Subject: below --
2002-02-26 14:19 nathan
2001-08-27  7:06 benko

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