public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18007] New: Template template specialization matching problem
@ 2004-10-15  6:30 debian-gcc at lists dot debian dot org
  2004-10-15  6:30 ` [Bug c++/18007] " debian-gcc at lists dot debian dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2004-10-15  6:30 UTC (permalink / raw)
  To: gcc-bugs

[forwarded from http://bugs.debian.org/269513]


Gcc 3.3 and gcc 3.4 both give the error message "error: `type' is not
a member of `outer<dummy>::inner<dummy<int> >'" when trying to compile
the following:

template<typename dummy_var>
struct dummy { };

template<template<typename> class outer_func>
struct outer {
  template<typename inner_var>
  struct inner { };
  
  template<typename dummy_var>
  struct inner<outer_func<dummy_var> > { typedef dummy_var type; };
};


int main(){
  outer<dummy>::inner<dummy<int> >::type var = 0;

  return var;
}

Both cxx (Digital's compiler) and icc (Intel's compiler) have no such
problem.  It appears that gcc does not properly match against the
specialized inner struct in this case (i.e. it fails to match when the
specialized parameter is based on a template template parameter of an
enclosing struct).

-T

PS: Note that the following version (which contains an even more
explicit specialization) also does not work with gcc (and also does
work with both cxx and icc):

template<template<typename> class outer_func>
struct outer {
  template<typename inner_var, typename dummy=void>
  struct inner { };
  
  template<typename dummy>
  struct inner<outer_func<int>,dummy> { typedef int type; };
};

-- 
           Summary: Template template specialization matching problem
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/18007] Template template specialization matching problem
  2004-10-15  6:30 [Bug c++/18007] New: Template template specialization matching problem debian-gcc at lists dot debian dot org
@ 2004-10-15  6:30 ` debian-gcc at lists dot debian dot org
  2004-10-15 12:59 ` pinskia at gcc dot gnu dot org
  2004-10-15 14:50 ` bangerth at dealii dot org
  2 siblings, 0 replies; 4+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2004-10-15  6:30 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |3.3.5 3.4.2


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


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

* [Bug c++/18007] Template template specialization matching problem
  2004-10-15  6:30 [Bug c++/18007] New: Template template specialization matching problem debian-gcc at lists dot debian dot org
  2004-10-15  6:30 ` [Bug c++/18007] " debian-gcc at lists dot debian dot org
@ 2004-10-15 12:59 ` pinskia at gcc dot gnu dot org
  2004-10-15 14:50 ` bangerth at dealii dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-15 12:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-15 12:59 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2004-10-15 12:59:21
               date|                            |


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


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

* [Bug c++/18007] Template template specialization matching problem
  2004-10-15  6:30 [Bug c++/18007] New: Template template specialization matching problem debian-gcc at lists dot debian dot org
  2004-10-15  6:30 ` [Bug c++/18007] " debian-gcc at lists dot debian dot org
  2004-10-15 12:59 ` pinskia at gcc dot gnu dot org
@ 2004-10-15 14:50 ` bangerth at dealii dot org
  2 siblings, 0 replies; 4+ messages in thread
From: bangerth at dealii dot org @ 2004-10-15 14:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-10-15 14:50 -------
This is a duplicate of PR 4882. 
W. 

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

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


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


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

end of thread, other threads:[~2004-10-15 14:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-15  6:30 [Bug c++/18007] New: Template template specialization matching problem debian-gcc at lists dot debian dot org
2004-10-15  6:30 ` [Bug c++/18007] " debian-gcc at lists dot debian dot org
2004-10-15 12:59 ` pinskia at gcc dot gnu dot org
2004-10-15 14:50 ` bangerth at dealii 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).