public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/22361] New: Fails to identify
@ 2005-07-08  6:06 igodard at pacbell dot net
  2005-07-08 14:17 ` [Bug c++/22361] " bangerth at dealii dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: igodard at pacbell dot net @ 2005-07-08  6:06 UTC (permalink / raw)
  To: gcc-bugs

template<typename> class TP1 {};

template<template<typename> class A>
struct B {
    template<typename T> struct TP2 : public A<T> {};
    };

template<template<typename> class TP3, typename T>
void    F(const TP3<T>&) {}

int main() {
    B<TP1>::TP2<int> b;
    F(b);
    }


gets you:

~/ootbc/members/src$ c++ foo.cc
foo.cc: In function `int main()':
foo.cc:13: error: no matching function for call to `F(B<TP1>::TP2<int>&)'

Note that simplifying to :

struct B {
    template<typename> class TP2 {};
    };

template<template<typename> class TP3, typename T>
void    F(const TP3<T>&) {}

int main() {
    B::TP2<int> b;
    F(b);
    }

does work OK.

Ivan

-- 
           Summary: Fails to identify
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/22361] Fails to identify
  2005-07-08  6:06 [Bug c++/22361] New: Fails to identify igodard at pacbell dot net
@ 2005-07-08 14:17 ` bangerth at dealii dot org
  2005-07-08 18:50 ` igodard at pacbell dot net
  2005-07-08 20:53 ` bangerth at dealii dot org
  2 siblings, 0 replies; 4+ messages in thread
From: bangerth at dealii dot org @ 2005-07-08 14:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2005-07-08 14:16 -------
This is already fixed in 4.0. In previous versions, one can have a little 
fun if the compiler is configured with checking enabled: 
 
g/x> /home/bangerth/bin/gcc-2.95.3/bin/c++ -c x.cc 
x.cc: In function `int main()': 
x.cc:13: `' cannot be `restrict'-qualified 
x.cc:13: confused by earlier errors, bailing out 
 
g/x> /home/bangerth/bin/gcc-3.2.3/bin/c++ -c x.cc 
x.cc: In function `int main()': 
x.cc:13: no matching function for call to `F(B<TP1>::TP2<int>&)' 
 
g/x> /home/bangerth/bin/gcc-3.3*/bin/c++ -c x.cc 
x.cc: In function `int main()': 
x.cc:13: internal compiler error: tree check: expected class 't', have 'x' ( 
   tree_vec) in cp_type_quals, at cp/typeck.c:6567 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
g/x> /home/bangerth/bin/gcc-3.4*/bin/c++ -c x.cc 
x.cc: In function `int main()': 
x.cc:13: internal compiler error: tree check: expected class 't', have 
'x' (tree 
_vec) in cp_type_quals, at cp/typeck.c:6299 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Known to fail|                            |4.0.0
      Known to work|                            |2.95 3.2 3.3 3.4.3
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


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


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

* [Bug c++/22361] Fails to identify
  2005-07-08  6:06 [Bug c++/22361] New: Fails to identify igodard at pacbell dot net
  2005-07-08 14:17 ` [Bug c++/22361] " bangerth at dealii dot org
@ 2005-07-08 18:50 ` igodard at pacbell dot net
  2005-07-08 20:53 ` bangerth at dealii dot org
  2 siblings, 0 replies; 4+ messages in thread
From: igodard at pacbell dot net @ 2005-07-08 18:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From igodard at pacbell dot net  2005-07-08 18:49 -------
Er - aren't the "known to fail" and "known to work" reversed?

-- 


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


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

* [Bug c++/22361] Fails to identify
  2005-07-08  6:06 [Bug c++/22361] New: Fails to identify igodard at pacbell dot net
  2005-07-08 14:17 ` [Bug c++/22361] " bangerth at dealii dot org
  2005-07-08 18:50 ` igodard at pacbell dot net
@ 2005-07-08 20:53 ` bangerth at dealii dot org
  2 siblings, 0 replies; 4+ messages in thread
From: bangerth at dealii dot org @ 2005-07-08 20:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2005-07-08 20:48 -------
Yes, they were. Fixed now. 
W. 

-- 


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


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

end of thread, other threads:[~2005-07-08 20:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-08  6:06 [Bug c++/22361] New: Fails to identify igodard at pacbell dot net
2005-07-08 14:17 ` [Bug c++/22361] " bangerth at dealii dot org
2005-07-08 18:50 ` igodard at pacbell dot net
2005-07-08 20:53 ` 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).