public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56480] New: Explicit specialization in a namespace enclosing the specialized template
@ 2013-02-28  8:18 zeratul976 at hotmail dot com
  2013-03-05  1:29 ` [Bug c++/56480] " redi at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: zeratul976 at hotmail dot com @ 2013-02-28  8:18 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56480
           Summary: Explicit specialization in a namespace enclosing the
                    specialized template
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zeratul976@hotmail.com


The following code:


namespace Foo 
{
    template <typename T>
    struct Meow
    {
    };
}

template <>
struct Foo::Meow<int>
{
};


fails to compile with gcc 4.8 (tested with 20130224 snapshot). 

I believe this code should be accepted in C++11 mode as per [temp.expl.spec]
p2: "An explicit specialization shall be declared in a namespace enclosing the
specialized template." This is a relaxation of the C++03 wording: "An explicit
specialization shall be declared in the namespace of which the template is a
member".

Recent versions of clang and MSVC compile the above code in C++11 mode.


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

end of thread, other threads:[~2021-08-23  8:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-28  8:18 [Bug c++/56480] New: Explicit specialization in a namespace enclosing the specialized template zeratul976 at hotmail dot com
2013-03-05  1:29 ` [Bug c++/56480] " redi at gcc dot gnu.org
2013-03-05  4:30 ` zeratul976 at hotmail dot com
2013-11-29 23:49 ` lichray at gmail dot com
2014-11-01 15:51 ` trippels at gcc dot gnu.org
2014-11-01 18:05 ` trippels at gcc dot gnu.org
2014-11-02 11:48 ` trippels at gcc dot gnu.org
2015-04-22 12:06 ` jakub at gcc dot gnu.org
2015-07-16  9:13 ` rguenth at gcc dot gnu.org
2021-08-04 20:42 ` pinskia at gcc dot gnu.org
2021-08-23  8:33 ` pinskia at gcc dot gnu.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).