...and I have another one, this is gcc bug finding day.
it's again related to partial template function specializations, but I open a
new report because this time it is rejects-valid:
(at least I think so)

template<typename AT>
struct A{
  template<typename T>
  void function(){}
};

template<>
template<typename TTT>
void A<int>::function<TTT>(){}

error: partial specialization `function<TTT>' of function template

that's right, but why is this an error?

if function has a parameter of type T, so you can specialize it without
explicitly giving a template parameter, it works.
(...::function(TTT){})

Comeau accepts both.

-- 
           Summary: rejects valid partial template function specialization
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sstrasser at systemhaus-gruppe dot de
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to