partial specialisation of a class member template of a template class

D Maley d.maley@stmarys-belfast.ac.uk
Tue Mar 2 03:33:00 GMT 1999


Should this be valid? - it compiles OK in VC++ 6, but not egcs 1.1. Without
the enclosing template struct P1<T1> its OK.

template <typename T1> struct P1 {

  template <typename S1, typename S2> struct P2 {
    P2(S1* object) { ; }
  };

  template <typename S1> struct P2<S1, S1> {
    P2(S1* object) { ; }
  };

};

int main()
{
  return 0;
}

        --- |================================================|
      ----  |-=|         Dave Maley, M.A., M.Phil.        |=-| ,---I
      ---   |================================================| |== U-----
        --- | Computer Manager, St. Mary's College, Belfast  | |== U (: |
      ---   |________________________________________________| |   U----'-----
     -----  |________________________________/   ____====______|   U'  ()___(|
        ---  #__ //,-,  ,-,  ,-,\\         \|   ///,-,  ,-, \\ -------/,-,\_[
                ''( 0 )( 0 )( 0 )'          o  -''( 0 )( 0 ) \\#####====( 0 )
     --------------'-'--'-'--'-'-------------------'-'--'-'--------------'-'----

St. Mary's University College
191 Falls Road, Belfast, BT12 6FE
N. Ireland.
Tel: +44 1232 327678
Fax: +44 1232 333719



More information about the Gcc-bugs mailing list