I can't think of a way to do what you want. You need something like an extern 
"C" template typedef, but C++ does not have template typedefs, and a template 
can't have extern "C" linkage.

If you must use an extern "C" function, for example because you can't control 
the declaration, you can give it a C++ wrapper:

extern "C" void foo (void*);
void foo_wrap(void* p) { return foo(p); }

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

You could ask this question in a C++ newsgroup, such as comp.lang.c++.moderated
A Solaris forum is not the best place to ask C++ language questions.
--
This message posted from opensolaris.org

Reply via email to