public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/21515] problem with template and template function compilation in a namespace
Date: Thu, 12 May 2005 17:49:00 -0000	[thread overview]
Message-ID: <20050512174945.19081.qmail@sourceware.org> (raw)
In-Reply-To: <20050511182420.21515.marciso@box43.pl>


------- Additional Comments From bangerth at dealii dot org  2005-05-12 17:49 -------
You can't do this: 
  template<typename T> 
  std::ostream & std::operator<< (std::ostream &, a::A<T> const &); 
If you want to overload something in namespace std, you have to open that 
namespace, put the declaration in it, and close it again. If you do this 
everything is fine, i.e. like so: 
 
namespace std 
{ 
  template<typename T> 
  ostream & operator<< (ostream &, a::A<T> const &); 
} 
 
The fact that we don't reject the declaration is a bug in gcc in itself, 
for which I'll open a PR in a minute. 
 
W. 

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


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


      parent reply	other threads:[~2005-05-12 17:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-11 18:24 [Bug c++/21515] New: problem with tempalte and tempalte " marciso at box43 dot pl
2005-05-11 18:28 ` [Bug c++/21515] " marciso at box43 dot pl
2005-05-11 18:31 ` marciso at box43 dot pl
2005-05-12 17:45 ` [Bug c++/21515] problem with template and template " bangerth at dealii dot org
2005-05-12 17:49 ` bangerth at dealii dot org [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050512174945.19081.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).