Just found the <..> is filtered out in the original post,

//extern "C" void foo (void*);
extern void foo (void*);

template <typename T, void(*cb)(T*)> class Test {};
typedef Test<void, foo> TestVoid

E.g., I want to wrap an resource like c_string (char *), and would be released 
with free(3). But I can not use free(3) as the 2nd template parameter. The 
documentation of SunStudio says the compiler accepts conversions from "C" to 
"C++" linkage, and fails in a template context.
--
This message posted from opensolaris.org

Reply via email to