1 year ago

#308211

test-img

Daniel

Template parameters in extern template

Is it possible to have a template parameter as the template argument in an extern template?

For instance having Bar being extern in the following code

template<typename T>
void Foo() {
    Bar<T>();
}

Extern with specific types such as extern template void Bar<int>(); works. However, I can't get some variant of extern template void Bar<T>(); to work.

c++

templates

extern

0 Answers

Your Answer

Accepted video resources