Bug 20174 - rejects valid partial template function specialization
Summary: rejects valid partial template function specialization
Status: RESOLVED DUPLICATE of bug 14494
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.4
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-23 17:56 UTC by Stefan Straßer
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Straßer 2005-02-23 17:56:58 UTC
...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.
Comment 1 Andrew Pinski 2005-02-23 18:36:17 UTC

*** This bug has been marked as a duplicate of 14494 ***