public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35275]  New: Operator<< for embedded class of templetized class isn't found
@ 2008-02-21 10:00 yuri at tsoft dot com
  2008-02-23 16:20 ` [Bug c++/35275] " s__nakayama at infoseek dot jp
  2008-02-23 17:01 ` pcarlini at suse dot de
  0 siblings, 2 replies; 3+ messages in thread
From: yuri at tsoft dot com @ 2008-02-21 10:00 UTC (permalink / raw)
  To: gcc-bugs

The following code produces an error on the second line inside of main:
error: no match for 'operator<<' in 'std::cout << C<int>::E()'
C++ frontend fails to find the templetized operator<<.

---------- begin code ------------

#include <iostream>
using namespace std;

template<typename T>
struct C {
  struct E {
  };
};

template<typename T>
ostream& operator<<(ostream &ss, const C<T> &t) {
  return (ss);
}

template<typename T>
ostream& operator<<(ostream &ss, const typename C<T>::E &t) {
  return (ss);
}

main() {
  cout << C<int>();     // this compiles ok
  cout << C<int>::E();  // this fails
}


-- 
           Summary: Operator<< for embedded class of templetized class isn't
                    found
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: yuri at tsoft dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35275


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

* [Bug c++/35275] Operator<< for embedded class of templetized class isn't found
  2008-02-21 10:00 [Bug c++/35275] New: Operator<< for embedded class of templetized class isn't found yuri at tsoft dot com
@ 2008-02-23 16:20 ` s__nakayama at infoseek dot jp
  2008-02-23 17:01 ` pcarlini at suse dot de
  1 sibling, 0 replies; 3+ messages in thread
From: s__nakayama at infoseek dot jp @ 2008-02-23 16:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from s__nakayama at infoseek dot jp  2008-02-23 16:20 -------
This is a duplicate of #13399.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35275


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

* [Bug c++/35275] Operator<< for embedded class of templetized class isn't found
  2008-02-21 10:00 [Bug c++/35275] New: Operator<< for embedded class of templetized class isn't found yuri at tsoft dot com
  2008-02-23 16:20 ` [Bug c++/35275] " s__nakayama at infoseek dot jp
@ 2008-02-23 17:01 ` pcarlini at suse dot de
  1 sibling, 0 replies; 3+ messages in thread
From: pcarlini at suse dot de @ 2008-02-23 17:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pcarlini at suse dot de  2008-02-23 17:00 -------


*** This bug has been marked as a duplicate of 13399 ***


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35275


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

end of thread, other threads:[~2008-02-23 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-21 10:00 [Bug c++/35275] New: Operator<< for embedded class of templetized class isn't found yuri at tsoft dot com
2008-02-23 16:20 ` [Bug c++/35275] " s__nakayama at infoseek dot jp
2008-02-23 17:01 ` pcarlini at suse dot de

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