public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <bug-17122-4@http.gcc.gnu.org/bugzilla/>]
* [Bug c++/17122] New: Unable to compile friend operator within template
@ 2004-08-20 15:04 ron at vaniwaarden dot org
  2004-08-20 15:20 ` [Bug c++/17122] " bangerth at dealii dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: ron at vaniwaarden dot org @ 2004-08-20 15:04 UTC (permalink / raw)
  To: gcc-bugs

The following does not compile even though it adds the '<>' just as instructed
by the warning:

template <class blah>                                                           
class foo;                                                                      
                                                                                
template <class blah>                                                           
void operator+(int, foo<blah>);                                                 
                                                                                
template <class blah>                                                           
class foo                                                                       
{                                                                               
public:                                                                         
  void operator+(int){}                                                         
  friend void operator+<>(int, foo);//eliminating <> generates warning to add 
                                    //them                                        
};                                                                              
template <class blah>                                                           
void operator+(int, foo<blah>){}                                                
                                                                                
int main()                                                                      
{                                                                               
  foo<double> inst;                                                             
  inst+1;                                                                       
  1+inst;                                                                       
};

-- 
           Summary: Unable to compile friend operator within template
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ron at vaniwaarden dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2015-04-14 16:02 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-17122-2867@http.gcc.gnu.org/bugzilla/>
2005-10-22 13:58 ` [Bug c++/17122] Unable to compile friend operator within template lerdsuwa at gcc dot gnu dot org
2006-01-20  4:39 ` pinskia at gcc dot gnu dot org
2006-01-22  4:15 ` relf at os2 dot ru
2006-01-24  2:38 ` relf at os2 dot ru
2006-03-12  4:15 ` relf at os2 dot ru
     [not found] <bug-17122-4@http.gcc.gnu.org/bugzilla/>
2012-04-12 12:44 ` redi at gcc dot gnu.org
2012-04-12 13:06 ` manu at gcc dot gnu.org
2012-04-12 14:07 ` redi at gcc dot gnu.org
2012-04-12 14:56 ` redi at gcc dot gnu.org
2015-04-14 16:02 ` sixenin at hotmail dot com
2004-08-20 15:04 [Bug c++/17122] New: " ron at vaniwaarden dot org
2004-08-20 15:20 ` [Bug c++/17122] " bangerth at dealii dot org
2004-08-20 15:53 ` pinskia at gcc dot gnu dot org
2004-08-20 16:35 ` ron at vaniwaarden dot org
2004-08-23 18:30 ` ron at vaniwaarden dot org
2004-08-23 18:35 ` pinskia at gcc dot gnu dot org
2004-10-17 15:19 ` lerdsuwa at gcc dot gnu dot org
2004-10-17 15:21 ` lerdsuwa at gcc dot gnu dot org
2005-01-16  1:26 ` pinskia at gcc dot gnu dot org

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