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

template<typename T> struct foo{ static T* p; };
template<typename T> T* foo<T>::p = 0;

template<typename T> struct A {};
template<typename T, template<typename> class C>
    struct bar{ static C<void>* p; };
template<typename T> A<void>* bar<T,A>::p = 0;

int main() {
    foo<int> f;
    bar<int, A> b;
    return 0;
    }

gets you:
~/ootbc/members/src$ g++ foo.cc
foo.cc:7: error: invalid use of undefined type `struct bar<T, A>'
foo.cc:6: error: declaration of `struct bar<T, A>'

As it works for the plain type case (foo), it looks like something's wrong in
the binding of template template parameters (bar).

Ivan

-- 
           Summary: Fails to identify member definition
           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=23263


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

end of thread, other threads:[~2005-08-08  2:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-06 20:23 [Bug c++/23263] New: Fails to identify member definition igodard at pacbell dot net
2005-08-06 20:29 ` [Bug c++/23263] " bangerth at dealii dot org
2005-08-06 20:40 ` igodard at pacbell dot net
2005-08-06 22:38 ` pinskia at gcc dot gnu dot org
2005-08-06 22:56 ` [Bug c++/23263] Incomprehensible message for invalid attempt to partially specialize a member bangerth at dealii dot org
2005-08-08  2:42 ` igodard at pacbell dot net

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