N
neelsmail
Hi,
I want to give default value as NULL/0 for non-type template
parameter. I using SunStudio on Linux. I have tried following:
#define non_closer ((int(*)(FILE*))0L)
template<class T, int F(FILE*) = non_closer>
but compiler throws error:
error: '0u' is not a valid template argument for type 'int (*)(FILE*)'
because function '#'integer_cst' not supported by
dump_decl#<declaration error>' has not external linkage
Any idea how can I get this working?
Thanks in advance,
-Neel.
I want to give default value as NULL/0 for non-type template
parameter. I using SunStudio on Linux. I have tried following:
#define non_closer ((int(*)(FILE*))0L)
template<class T, int F(FILE*) = non_closer>
but compiler throws error:
error: '0u' is not a valid template argument for type 'int (*)(FILE*)'
because function '#'integer_cst' not supported by
dump_decl#<declaration error>' has not external linkage
Any idea how can I get this working?
Thanks in advance,
-Neel.