This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/47343] New: incorrect location for declaration of class template partial specialization


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

           Summary: incorrect location for declaration of class template
                    partial specialization
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: redi@gcc.gnu.org


template<class T>
  struct X : T
  {
    void f();
  };

template<class T>
  inline void
  X<T>::f()
  { }

template<typename T>
  struct Y
  { };

template<class T>
  struct X< Y<T> >;  // here

template<class T>
  inline void
  X< Y<T> >::f()    // xxx
  { }

ps2.cc:21:16: error: invalid use of incomplete type 'struct X<Y<T> >'
ps2.cc:2:10: error: declaration of 'struct X<Y<T> >'

The declaration of the partial specialization is on line 17 not line 2

(related to PR 47342)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]