Bug 13916 - default function arguments and passage as template arguments
Summary: default function arguments and passage as template arguments
Status: RESOLVED DUPLICATE of bug 4205
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.3.2
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-29 04:15 UTC by Jim Apple
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: linux x86
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 Jim Apple 2004-01-29 04:15:46 UTC
void f(int a = 0);
void g(int);
                                                                               
          
template<typename T, T * x>
struct foo {
  foo() { x(); }
};
                                                                               
          
int main() {
  foo<void (int), f> bar;
  foo<void (int), g> baz;
}

bar passes, but baz doesn't.  If baz compiled, I would suspect this to be an
incarnation of bug 4205, but it doesn't, so it looks different to me.
Comment 1 Andrew Pinski 2004-01-29 04:18:33 UTC
Nope, this is exactly the same extension.

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