------- Comment #2 from simartin at gcc dot gnu dot org  2007-09-23 19:49 
-------
I've done tests with the current mainline and I wonder if this PR is still
"valid"...

We report an error for the following three cases:

1. Multiple specializations:
   template <typename T> class A {};
   template<> class A<int> {};
   template<> class A<int> {};

2. Multiple explicit instantiations:
   template <typename T> class B {};
   template class B<int>;
   template class B<int>;

3. Specialization following an explicit instantiation:
   template <typename T> class D {};
   template class D<int>;
   template<> class D<int> {};

The fact that we accept an explicit instantiation after a specialization is due
to DR 259.


-- 

simartin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simartin at gcc dot gnu dot
                   |                            |org


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

Reply via email to