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++/20174] New: rejects valid partial template function specialization


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


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