public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41341]  New: gcc fails to reject inclass partial specialization of iherited class template
@ 2009-09-11 21:39 tomek at jot23 dot org
  2009-09-11 21:40 ` [Bug c++/41341] " tomek at jot23 dot org
  2009-12-27  1:55 ` [Bug c++/41341] gcc fails to reject inclass partial specialization of inherited " paolo dot carlini at oracle dot com
  0 siblings, 2 replies; 3+ messages in thread
From: tomek at jot23 dot org @ 2009-09-11 21:39 UTC (permalink / raw)
  To: gcc-bugs

In the attached code partial specialization of struct apply in struct
METAFUNCTION2 should be rejected according to C++ Standard 14.7.3/3:

A declaration of a function template or class template being explicitly
specialized shall be in scope at the point of declaration of an explicit
specialization.

What's more troublesome is a fact that specialization in METAFUNCTION2 seems to
affect the template in METAFUNCTION. The program produces:

int
double
double

while I would expect:

int
HELPER<float, double>
double


-- 
           Summary: gcc fails to reject inclass partial specialization of
                    iherited class template
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tomek at jot23 dot org


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


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

* [Bug c++/41341] gcc fails to reject inclass partial specialization of iherited class template
  2009-09-11 21:39 [Bug c++/41341] New: gcc fails to reject inclass partial specialization of iherited class template tomek at jot23 dot org
@ 2009-09-11 21:40 ` tomek at jot23 dot org
  2009-12-27  1:55 ` [Bug c++/41341] gcc fails to reject inclass partial specialization of inherited " paolo dot carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: tomek at jot23 dot org @ 2009-09-11 21:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from tomek at jot23 dot org  2009-09-11 21:40 -------
Created an attachment (id=18568)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18568&action=view)
the offending code


-- 


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


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

* [Bug c++/41341] gcc fails to reject inclass partial specialization of inherited class template
  2009-09-11 21:39 [Bug c++/41341] New: gcc fails to reject inclass partial specialization of iherited class template tomek at jot23 dot org
  2009-09-11 21:40 ` [Bug c++/41341] " tomek at jot23 dot org
@ 2009-12-27  1:55 ` paolo dot carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-27  1:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from paolo dot carlini at oracle dot com  2009-12-27 01:54 -------
Fixed for 4.5.0, not a regression, closing as fixed.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Known to work|                            |4.5.0
         Resolution|                            |WORKSFORME
   Target Milestone|---                         |4.5.0


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


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

end of thread, other threads:[~2009-12-27  1:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-11 21:39 [Bug c++/41341] New: gcc fails to reject inclass partial specialization of iherited class template tomek at jot23 dot org
2009-09-11 21:40 ` [Bug c++/41341] " tomek at jot23 dot org
2009-12-27  1:55 ` [Bug c++/41341] gcc fails to reject inclass partial specialization of inherited " paolo dot carlini at oracle dot com

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