public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14429] New: valid template template argument rejected
@ 2004-03-04  9:40 heinlein at informatik dot uni-ulm dot de
  2004-03-04 13:49 ` [Bug c++/14429] " bangerth at dealii dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: heinlein at informatik dot uni-ulm dot de @ 2004-03-04  9:40 UTC (permalink / raw)
  To: gcc-bugs

The following valid code is rejected with the error messages:
bug.cxx:6: type/value mismatch at argument 1 in template parameter list for `
   template<template<class U, U*p> class T> struct X'
bug.cxx:6:   expected a template of type `template<class U, U*p> class T', got 
   `template<class U, U*p> class T'
bug.cxx:6: ISO C++ forbids declaration of `x' with no type

template <template <typename U, U* p> class T>
struct X {};

template <template <typename U, U* p> class T>
struct Y {
    X<T> x;
};

-- 
           Summary: valid template template argument rejected
           Product: gcc
           Version: 3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: heinlein at informatik dot uni-ulm dot de
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/14429] valid template template argument rejected
  2004-03-04  9:40 [Bug c++/14429] New: valid template template argument rejected heinlein at informatik dot uni-ulm dot de
@ 2004-03-04 13:49 ` bangerth at dealii dot org
  2004-03-04 14:43 ` heinlein at informatik dot uni-ulm dot de
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bangerth at dealii dot org @ 2004-03-04 13:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-03-04 13:49 -------
Confirmed, but I'm not sure the code is valid. icc7 says, for example: 
 
g/x> icc -c -Xc -ansi x.cc 
x.cc(1): error: a parameter of a template template parameter cannot depend on 
the type of another template parameter 
  template <template <typename U, U* p> class T> 
                                     ^ 
 
x.cc(4): error: a parameter of a template template parameter cannot depend on 
the type of another template parameter 
  template <template <typename U, U* p> class T> 
 
I think we need some language lawyer here... 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nathan at gcc dot gnu dot
                   |                            |org


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


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

* [Bug c++/14429] valid template template argument rejected
  2004-03-04  9:40 [Bug c++/14429] New: valid template template argument rejected heinlein at informatik dot uni-ulm dot de
  2004-03-04 13:49 ` [Bug c++/14429] " bangerth at dealii dot org
@ 2004-03-04 14:43 ` heinlein at informatik dot uni-ulm dot de
  2004-03-04 14:52 ` nathan at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: heinlein at informatik dot uni-ulm dot de @ 2004-03-04 14:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From heinlein at informatik dot uni-ulm dot de  2004-03-04 14:43 -------
I cannot find such a restriction in [temp.param].

-- 


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


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

* [Bug c++/14429] valid template template argument rejected
  2004-03-04  9:40 [Bug c++/14429] New: valid template template argument rejected heinlein at informatik dot uni-ulm dot de
  2004-03-04 13:49 ` [Bug c++/14429] " bangerth at dealii dot org
  2004-03-04 14:43 ` heinlein at informatik dot uni-ulm dot de
@ 2004-03-04 14:52 ` nathan at gcc dot gnu dot org
  2004-03-26 10:12 ` lerdsuwa at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: nathan at gcc dot gnu dot org @ 2004-03-04 14:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nathan at gcc dot gnu dot org  2004-03-04 14:52 -------
I beleive the code is well formed. The EDG 3.3 frontend accepts it
in its pedantic mode.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-03-04 14:52:32
               date|                            |


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


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

* [Bug c++/14429] valid template template argument rejected
  2004-03-04  9:40 [Bug c++/14429] New: valid template template argument rejected heinlein at informatik dot uni-ulm dot de
                   ` (2 preceding siblings ...)
  2004-03-04 14:52 ` nathan at gcc dot gnu dot org
@ 2004-03-26 10:12 ` lerdsuwa at gcc dot gnu dot org
  2004-06-25 23:16 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-03-26 10:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-03-26 10:12 -------
Taking care of it.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |lerdsuwa at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/14429] valid template template argument rejected
  2004-03-04  9:40 [Bug c++/14429] New: valid template template argument rejected heinlein at informatik dot uni-ulm dot de
                   ` (3 preceding siblings ...)
  2004-03-26 10:12 ` lerdsuwa at gcc dot gnu dot org
@ 2004-06-25 23:16 ` pinskia at gcc dot gnu dot org
  2004-07-27 15:47 ` cvs-commit at gcc dot gnu dot org
  2004-07-27 15:48 ` lerdsuwa at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-25 23:16 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
   Last reconfirmed|2004-03-04 14:52:32         |2004-06-25 23:12:34
               date|                            |


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


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

* [Bug c++/14429] valid template template argument rejected
  2004-03-04  9:40 [Bug c++/14429] New: valid template template argument rejected heinlein at informatik dot uni-ulm dot de
                   ` (4 preceding siblings ...)
  2004-06-25 23:16 ` pinskia at gcc dot gnu dot org
@ 2004-07-27 15:47 ` cvs-commit at gcc dot gnu dot org
  2004-07-27 15:48 ` lerdsuwa at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-07-27 15:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-07-27 15:47 -------
Subject: Bug 14429

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	lerdsuwa@gcc.gnu.org	2004-07-27 15:47:10

Modified files:
	gcc/cp         : ChangeLog pt.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/template: ttp11.C ttp12.C 

Log message:
	PR c++/14429
	* pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
	when the type of ARG is not dependent.
	
	* g++.dg/template/ttp11.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4248&r2=1.4249
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.895&r2=1.896
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4057&r2=1.4058
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/ttp11.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/ttp12.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/14429] valid template template argument rejected
  2004-03-04  9:40 [Bug c++/14429] New: valid template template argument rejected heinlein at informatik dot uni-ulm dot de
                   ` (5 preceding siblings ...)
  2004-07-27 15:47 ` cvs-commit at gcc dot gnu dot org
@ 2004-07-27 15:48 ` lerdsuwa at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-07-27 15:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2004-07-27 15:48 -------
Fixed in the mainline,

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |3.5.0


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


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

end of thread, other threads:[~2004-07-27 15:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-04  9:40 [Bug c++/14429] New: valid template template argument rejected heinlein at informatik dot uni-ulm dot de
2004-03-04 13:49 ` [Bug c++/14429] " bangerth at dealii dot org
2004-03-04 14:43 ` heinlein at informatik dot uni-ulm dot de
2004-03-04 14:52 ` nathan at gcc dot gnu dot org
2004-03-26 10:12 ` lerdsuwa at gcc dot gnu dot org
2004-06-25 23:16 ` pinskia at gcc dot gnu dot org
2004-07-27 15:47 ` cvs-commit at gcc dot gnu dot org
2004-07-27 15:48 ` lerdsuwa 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).