public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/7906: Templated class with nested non-templated class having an operator() fails to compile
@ 2002-09-13  7:23 nathan
  0 siblings, 0 replies; 4+ messages in thread
From: nathan @ 2002-09-13  7:23 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, loose, nobody

Synopsis: Templated class with nested non-templated class having an operator() fails to compile

State-Changed-From-To: open->analyzed
State-Changed-By: nathan
State-Changed-When: Fri Sep 13 07:23:31 2002
State-Changed-Why:
    confirmed

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


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

* Re: c++/7906: Templated class with nested non-templated class having an operator() fails to compile
@ 2003-04-10 13:57 bangerth
  0 siblings, 0 replies; 4+ messages in thread
From: bangerth @ 2003-04-10 13:57 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, loose, nobody

Synopsis: Templated class with nested non-templated class having an operator() fails to compile

State-Changed-From-To: analyzed->closed
State-Changed-By: bangerth
State-Changed-When: Thu Apr 10 13:57:56 2003
State-Changed-Why:
    Fixed in mainline (3.4)

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


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

* Re: c++/7906: Templated class with nested non-templated class having an operator() fails to compile
@ 2003-04-10  2:36 Giovanni Bajo
  0 siblings, 0 replies; 4+ messages in thread
From: Giovanni Bajo @ 2003-04-10  2:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: "Giovanni Bajo" <giovannibajo@libero.it>
To: <gcc-gnats@gcc.gnu.org>,
	<loose@astron.nl>,
	<gcc-bugs@gcc.gnu.org>,
	<nobody@gcc.gnu.org>,
	<gcc-prs@gcc.gnu.org>
Cc: "Wolfgang Bangerth" <bangerth@ices.utexas.edu>
Subject: Re: c++/7906: Templated class with nested non-templated class having an operator() fails to compile
Date: Thu, 10 Apr 2003 04:34:22 +0200

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
 r=7906
 
 Reconfirmed on 2.95 -> 3.3 20030401. The code does look legit to me in fact.
 Can anybody test it with the mainline? It really looks like a parsing bug.
 
 Giovanni Bajo
 


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

* c++/7906: Templated class with nested non-templated class having an operator() fails to compile
@ 2002-09-13  0:46 loose
  0 siblings, 0 replies; 4+ messages in thread
From: loose @ 2002-09-13  0:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7906
>Category:       c++
>Synopsis:       Templated class with nested non-templated class having an operator() fails to compile
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 13 00:46:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Marcel Loose
>Release:        g++ (GCC) 3.2
>Organization:
>Environment:
Linux master 2.4.19 #1 SMP Mon Aug 12 15:33:48 CEST 2002 i686 unknown
>Description:
The code in "How-To-Repeat" is legal, to the best of my knowledge. However, it fails to compile with the following error:

tTemplate.cc:19: no `Templated<T>::NonTemplated::operator std::vector<T, 
   std::allocator<_CharT> >::size_type() const' member function declared in 
   class `Templated<T>::NonTemplated'
tTemplate.cc:19: template definition of non-template `
   Templated<T>::NonTemplated::operator std::vector<T, std::allocator<_CharT> 
   >::size_type() const'
>How-To-Repeat:
#include <vector>

template <class T>
class Templated
{
private:
  typedef std::vector<T> buf_t;
  class NonTemplated
  {
  public:
    operator typename buf_t::size_type() const;
  private:
    typename buf_t::size_type myIndex;
  };
};

template <class T>
Templated<T>::NonTemplated::operator typename Templated<T>::buf_t::size_type() const
{
  return myIndex;
}


int main()
{
  Templated<int> tmpl;
  return 0; 
}
>Fix:

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


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

end of thread, other threads:[~2003-04-10 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-13  7:23 c++/7906: Templated class with nested non-templated class having an operator() fails to compile nathan
  -- strict thread matches above, loose matches on Subject: below --
2003-04-10 13:57 bangerth
2003-04-10  2:36 Giovanni Bajo
2002-09-13  0:46 loose

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