extern "C" для шаблонной функции
Почему я не могу объявить шаблонную функцию с extern "C"?
extern "C"
template <class>
void foo();
int main() {}
Ответы (1 шт):
Автор решения: ueber
→ Ссылка
Потому что
The extern specifier is only allowed in the declarations of variables and functions (except class members or function parameters).
А шаблон не является ни функцией, ни переменной.