Topic: default function arguments and template non-type parameters
Author: taintedwheat@yahoo.com (Gina Yarmel)
Date: Fri, 23 Jan 2004 04:52:07 +0000 (UTC) Raw View
void f(int a = 0);
template<typename T, T * x>
struct foo {
foo() { x(); }
};
template<typename T>
void bar(T * x) {
x();
}
int main() {
foo<void (int), f> baz; // #1
bar(f); // #2
}
---------------------------
#2 is an error by 8.3.6/4 (I think?). Is #1 an error for the same
reason?
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]