On 10/04/2011 15:31, spir wrote:
I'd also like to know why pointer cannot be template *alias* parameters,
like in:
auto s2 = S!(&f)();
==>
Error: expression & f is not a valid template value argument

Denis

First of all, that error is useless, you should probably report a bug for that (particularly if it doesn't include a line number, I'm not sure if you've omitted that or not).

Secondly, alias parameters are used to pass a symbol to a template, &f is not a symbol, it's a pointer to the value held in symbol f.

--
Robert
http://octarineparrot.com/

Reply via email to