* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
@ 2003-11-17 18:36 ` pinskia at gcc dot gnu dot org
2003-11-17 18:44 ` cppljevans at cox-internet dot com
` (17 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-17 18:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-17 18:36 -------
We need a full testcase, can you provide one?
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
2003-11-17 18:36 ` [Bug c++/13088] " pinskia at gcc dot gnu dot org
@ 2003-11-17 18:44 ` cppljevans at cox-internet dot com
2003-11-17 22:00 ` bangerth at dealii dot org
` (16 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: cppljevans at cox-internet dot com @ 2003-11-17 18:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cppljevans at cox-internet dot com 2003-11-17 18:44 -------
Subject: Re: templatizing outer class hides specialization
of inner template class
On 11/17/2003 12:36 PM, pinskia at gcc dot gnu dot org wrote:
>------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-17 18:36 -------
>We need a full testcase, can you provide one?
>
>
>
Just did. Didn't include the .ii because it was too large.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
2003-11-17 18:36 ` [Bug c++/13088] " pinskia at gcc dot gnu dot org
2003-11-17 18:44 ` cppljevans at cox-internet dot com
@ 2003-11-17 22:00 ` bangerth at dealii dot org
2003-11-17 22:05 ` falk at debian dot org
` (15 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: bangerth at dealii dot org @ 2003-11-17 22:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2003-11-17 22:00 -------
You boost guys really have ways to write totally incomprehensible
testcases...
Anyway, the claim is justified, I guess. In essence, this boils down to
------------------
#include <iostream>
template <typename> struct S {
template <typename> struct Type {};
};
template <typename> struct X {
template <typename> struct Local;
};
template <typename U>
template <typename>
struct X<U>::Local {
static void id() { std::cout << "primary\n" ;}
};
template <typename U>
template <typename T>
struct X<U>::Local<typename S<U>::template Type<T> > {
static void id() { std::cout << "specialized\n" ;}
};
int main() {
X<int>::Local<S<int>::Type<int> >::id();
}
-------------------------------
For this, we get
g/x> /home/bangerth/bin/gcc-3.3.2/bin/c++ x.cc ; ./a.out
primary
The same holds for every other gcc version that doesn't ICE outright. On
the other hand, icc for example prints "specialized". I guess it's wrong
that we don't match the partial specialization of X::Local.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-11-17 22:00:47
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
` (2 preceding siblings ...)
2003-11-17 22:00 ` bangerth at dealii dot org
@ 2003-11-17 22:05 ` falk at debian dot org
2003-11-18 0:28 ` cppljevans at cox-internet dot com
` (14 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: falk at debian dot org @ 2003-11-17 22:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From falk at debian dot org 2003-11-17 22:05 -------
Just as a random factoid, the Compaq compiler thinks:
cxx: Error: test.cc, line 20: a partial specialization of a member class
template must be declared in the class of which it is a member
struct X<U>::Local<typename S<U>::template Type<T> > {
-------------^
cxx: Info: 1 error detected in the compilation of "test.cc".
I don't have enough C++-fu to know whether it is right.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
` (3 preceding siblings ...)
2003-11-17 22:05 ` falk at debian dot org
@ 2003-11-18 0:28 ` cppljevans at cox-internet dot com
2003-12-03 15:10 ` cppljevans at cox-internet dot com
` (13 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: cppljevans at cox-internet dot com @ 2003-11-18 0:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cppljevans at cox-internet dot com 2003-11-18 00:28 -------
Subject: Re: templatizing outer class hides specialization
of inner template class
On 11/17/2003 04:05 PM, falk at debian dot org wrote:
>------- Additional Comments From falk at debian dot org 2003-11-17 22:05 -------
>Just as a random factoid, the Compaq compiler thinks:
>
>cxx: Error: test.cc, line 20: a partial specialization of a member class
> template must be declared in the class of which it is a member
>struct X<U>::Local<typename S<U>::template Type<T> > {
>-------------^
>cxx: Info: 1 error detected in the compilation of "test.cc".
>
>I don't have enough C++-fu to know whether it is right
>
>
I think Compaq is right :( See
http://www.comeaucomputing.com/iso/cwg_defects.html#44
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
` (4 preceding siblings ...)
2003-11-18 0:28 ` cppljevans at cox-internet dot com
@ 2003-12-03 15:10 ` cppljevans at cox-internet dot com
2003-12-03 16:25 ` cppljevans at cox-internet dot com
` (12 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: cppljevans at cox-internet dot com @ 2003-12-03 15:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cppljevans at cox-internet dot com 2003-12-03 15:10 -------
(In reply to comment #6)
> Subject: Re: templatizing outer class hides specialization
> of inner template class
>
> On 11/17/2003 04:05 PM, falk at debian dot org wrote:
>
> >------- Additional Comments From falk at debian dot org 2003-11-17 22:05 -------
[snip]
> I think Compaq is right :( See
> http://www.comeaucomputing.com/iso/cwg_defects.html#44
>
Closer reading of the defect report changed my mind. In particular, the line:
Proposed resolution (04/01): In-class specializations of member templates are
not allowed.
Hence, Compaq must be wrong, unless there are different rules for partial
specializations. Will have to check on that.
Furthermore, the examples in paragraph 17 of 14.7.3 show examples
of out-of-class specializations.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
` (5 preceding siblings ...)
2003-12-03 15:10 ` cppljevans at cox-internet dot com
@ 2003-12-03 16:25 ` cppljevans at cox-internet dot com
2004-02-28 21:29 ` cppljevans at cox-internet dot com
` (11 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: cppljevans at cox-internet dot com @ 2003-12-03 16:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cppljevans at cox-internet dot com 2003-12-03 16:25 -------
(In reply to comment #9)
> (In reply to comment #6)
[snip]
> Hence, Compaq must be wrong, unless there are different rules for partial
> specializations. Will have to check on that.
The exmample code in paragraph 6 of section 14.5.4 supports the above
conclusion, i.e. Compaq is wrong about partial specialization of member
class template having to be declared in the class of which it is a
member.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
` (6 preceding siblings ...)
2003-12-03 16:25 ` cppljevans at cox-internet dot com
@ 2004-02-28 21:29 ` cppljevans at cox-internet dot com
2004-03-04 17:35 ` cppljevans at cox-internet dot com
` (10 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: cppljevans at cox-internet dot com @ 2004-02-28 21:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cppljevans at cox-internet dot com 2004-02-28 21:29 -------
John Spicer at Edg convinced me it wasn't a bug by citing
the standard 14.8.2.4p4.
Bug maybe should be changed to resolved or not valid.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
` (7 preceding siblings ...)
2004-02-28 21:29 ` cppljevans at cox-internet dot com
@ 2004-03-04 17:35 ` cppljevans at cox-internet dot com
2004-03-05 14:38 ` cppljevans at cox-internet dot com
` (9 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: cppljevans at cox-internet dot com @ 2004-03-04 17:35 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cppljevans at cox-internet dot com 2004-03-04 17:34 -------
The latest attachment, nested_deduction.zip, compares intel and g++ output,
which differ. I believe intel's is right; hence, there's still a bug
in g++. The g++ dated 20040225 was used in the test shown in attachment.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
` (8 preceding siblings ...)
2004-03-04 17:35 ` cppljevans at cox-internet dot com
@ 2004-03-05 14:38 ` cppljevans at cox-internet dot com
2004-03-05 14:42 ` giovannibajo at libero dot it
` (8 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: cppljevans at cox-internet dot com @ 2004-03-05 14:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cppljevans at cox-internet dot com 2004-03-05 14:38 -------
Although last test was on 3.4, the same error occurs in 3.3. I've just entered
the same bug, #14447, for gcc-3.4.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
` (9 preceding siblings ...)
2004-03-05 14:38 ` cppljevans at cox-internet dot com
@ 2004-03-05 14:42 ` giovannibajo at libero dot it
2004-06-04 5:23 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: giovannibajo at libero dot it @ 2004-03-05 14:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-03-05 14:42 -------
*** Bug 14447 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
` (10 preceding siblings ...)
2004-03-05 14:42 ` giovannibajo at libero dot it
@ 2004-06-04 5:23 ` pinskia at gcc dot gnu dot org
2004-06-04 5:24 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-04 5:23 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |15818
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
` (11 preceding siblings ...)
2004-06-04 5:23 ` pinskia at gcc dot gnu dot org
@ 2004-06-04 5:24 ` pinskia at gcc dot gnu dot org
2004-07-18 15:37 ` lerdsuwa at gcc dot gnu dot org
` (5 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-04 5:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-04 05:24 -------
I should note that the last attached testcase ICE on the compiler, I filed PR 15818 for that ICE.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
` (12 preceding siblings ...)
2004-06-04 5:24 ` pinskia at gcc dot gnu dot org
@ 2004-07-18 15:37 ` lerdsuwa at gcc dot gnu dot org
2004-07-19 16:11 ` lerdsuwa at gcc dot gnu dot org
` (4 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-07-18 15:37 UTC (permalink / raw)
To: gcc-bugs
--
Bug 13088 depends on bug 15818, which changed state.
Bug 15818 Summary: ICE on wierd templates
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15818
What |Old Value |New Value
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
` (13 preceding siblings ...)
2004-07-18 15:37 ` lerdsuwa at gcc dot gnu dot org
@ 2004-07-19 16:11 ` lerdsuwa at gcc dot gnu dot org
2004-07-19 16:29 ` lerdsuwa at gcc dot gnu dot org
` (3 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-07-19 16:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2004-07-19 16:11 -------
Will investigate.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |lerdsuwa at gcc dot gnu dot
|dot org |org
Status|REOPENED |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
` (14 preceding siblings ...)
2004-07-19 16:11 ` lerdsuwa at gcc dot gnu dot org
@ 2004-07-19 16:29 ` lerdsuwa at gcc dot gnu dot org
2004-08-16 18:52 ` bangerth at dealii dot org
` (2 subsequent siblings)
18 siblings, 0 replies; 23+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-07-19 16:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2004-07-19 16:29 -------
The testcase nested_deduction.cpp works now.
However the code in comment #4 still doesn't work
due to a flaw in template argument deduction.
We are deducing 'U' and 'T' together at the same time in
template <typename U>
template <typename T>
struct X<U>::Local<typename S<U>::template Type<T> >
rather than first substituting 'U' with 'int' and then
deducing 'T'.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
` (15 preceding siblings ...)
2004-07-19 16:29 ` lerdsuwa at gcc dot gnu dot org
@ 2004-08-16 18:52 ` bangerth at dealii dot org
2004-10-15 14:55 ` bangerth at dealii dot org
2004-11-28 10:48 ` lerdsuwa at gcc dot gnu dot org
18 siblings, 0 replies; 23+ messages in thread
From: bangerth at dealii dot org @ 2004-08-16 18:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-08-16 18:52 -------
Still present on mainline...
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2003-11-17 22:00:47 |2004-08-16 18:52:15
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
` (16 preceding siblings ...)
2004-08-16 18:52 ` bangerth at dealii dot org
@ 2004-10-15 14:55 ` bangerth at dealii dot org
2004-11-28 10:48 ` lerdsuwa at gcc dot gnu dot org
18 siblings, 0 replies; 23+ messages in thread
From: bangerth at dealii dot org @ 2004-10-15 14:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-10-15 14:55 -------
See also PR 4882.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread
* [Bug c++/13088] templatizing outer class hides specialization of inner template class
2003-11-17 18:26 [Bug c++/13088] New: templatizing outer class hides specialization of inner template class cppljevans at cox-internet dot com
` (17 preceding siblings ...)
2004-10-15 14:55 ` bangerth at dealii dot org
@ 2004-11-28 10:48 ` lerdsuwa at gcc dot gnu dot org
18 siblings, 0 replies; 23+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2004-11-28 10:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2004-11-28 10:47 -------
Work postponed to GCC 4.1. This bug is tricky to fix.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13088
^ permalink raw reply [flat|nested] 23+ messages in thread